Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
W
web-project
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
紫光云
web-project
Commits
b6a2a7f9
Commit
b6a2a7f9
authored
Jun 18, 2024
by
高滢
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat(安全教育培训): 人员下拉
parent
c886a313
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
35 additions
and
18 deletions
+35
-18
safetyEducation.ts
src/api/project/safetyEducation.ts
+9
-10
index.vue
src/views/potentialSafety/index.vue
+6
-1
safetyDrawer.vue
src/views/potentialSafety/safetyDrawer.vue
+6
-2
educationDrawer.vue
src/views/safetyEducation/educationDrawer.vue
+7
-4
index.vue
src/views/safetyEducation/index.vue
+7
-1
No files found.
src/api/project/safetyEducation.ts
View file @
b6a2a7f9
...
...
@@ -2,23 +2,22 @@ import { defHttp } from '@/utils/http/axios';
import
{
ProjectModel
,
ProjectParams
}
from
'@/api/project/model/projectModel'
;
enum
Api
{
GetList
=
'/pro/educationTraining/page'
,
UpdateProject
=
'/pro/educationTraining/update'
,
DeleteProject
=
'/pro/educationTraining/del'
,
GetUserList
=
'/pro/sys/sysUser'
GetList
=
'/pro/educationTraining/page'
,
UpdateProject
=
'/pro/educationTraining/update'
,
DeleteProject
=
'/pro/educationTraining/del'
,
GetUserList
=
'/pro/sys/sysUser'
,
}
export
const
getListByPage
=
(
params
?:
ProjectParams
)
=>
defHttp
.
post
<
ProjectModel
>
({
url
:
Api
.
GetList
,
data
:
params
});
defHttp
.
post
<
ProjectModel
>
({
url
:
Api
.
GetList
,
data
:
params
});
export
const
addItem
=
(
params
?:
any
)
=>
defHttp
.
post
<
ProjectModel
>
({
url
:
Api
.
UpdateProject
,
data
:
params
});
defHttp
.
post
<
ProjectModel
>
({
url
:
Api
.
UpdateProject
,
data
:
params
});
export
const
updateItem
=
(
params
?:
any
)
=>
defHttp
.
post
<
ProjectModel
>
({
url
:
Api
.
UpdateProject
,
data
:
params
});
defHttp
.
post
<
ProjectModel
>
({
url
:
Api
.
UpdateProject
,
data
:
params
});
export
const
deleteItem
=
(
params
?:
any
)
=>
defHttp
.
delete
<
ProjectModel
>
({
url
:
Api
.
DeleteProject
,
params
});
defHttp
.
delete
<
ProjectModel
>
({
url
:
Api
.
DeleteProject
,
params
});
export
const
getUserList
=
(
params
?:
ProjectParams
)
=>
defHttp
.
post
<
ProjectModel
>
({
url
:
Api
.
GetUserList
,
data
:
params
});
export
const
getUserList
=
()
=>
defHttp
.
post
<
ProjectModel
>
({
url
:
Api
.
GetUserList
});
src/views/potentialSafety/index.vue
View file @
b6a2a7f9
...
...
@@ -43,6 +43,8 @@ import {
import
{
useDrawer
}
from
"@/components/Drawer"
;
import
SafetyDrawer
from
"@/views/potentialSafety/safetyDrawer.vue"
;
import
{
deleteItem
}
from
"@/api/project/saftyManage"
;
import
{
onMounted
}
from
"vue"
;
import
{
getUserList
}
from
"@/api/project/safetyEducation"
;
const
[
registerDrawer
,
{
openDrawer
}]
=
useDrawer
();
const
[
registerTable
,
{
reload
}]
=
useTable
({
api
:
getListByPage
,
...
...
@@ -62,7 +64,10 @@ const [registerTable, { reload }] = useTable({
fixed
:
undefined
,
},
});
onMounted
(
async
()
=>
{
const
data
=
await
getUserList
()
searchFormSchema
[
1
].
componentProps
.
options
=
data
})
async
function
handleEdit
(
record
:
Recordable
,
disabled
:
boolean
)
{
openDrawer
(
true
,
{
record
,
...
...
src/views/potentialSafety/safetyDrawer.vue
View file @
b6a2a7f9
...
...
@@ -13,11 +13,12 @@
</BasicDrawer>
</template>
<
script
lang=
"ts"
setup
>
import
{
ref
,
unref
}
from
'vue'
;
import
{
onMounted
,
ref
,
unref
}
from
'vue'
;
import
{
BasicForm
,
useForm
,
FormActionType
}
from
'@/components/Form'
;
import
{
formSchema
}
from
'./data'
;
import
{
BasicDrawer
,
useDrawerInner
}
from
'@/components/Drawer'
;
import
{
addItem
,
updateItem
}
from
'@/api/project/saftyManage'
;
import
{
getUserList
}
from
'@/api/project/safetyEducation'
;
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
isUpdate
=
ref
(
true
);
...
...
@@ -29,7 +30,10 @@
schemas
:
formSchema
,
showActionButtonGroup
:
false
,
});
onMounted
(
async
()
=>
{
const
data
=
await
getUserList
();
formSchema
[
8
].
componentProps
.
options
=
data
;
});
const
[
registerDrawer
,
{
setDrawerProps
,
closeDrawer
}]
=
useDrawerInner
(
async
(
data
)
=>
{
resetFields
();
setDrawerProps
({
confirmLoading
:
false
});
...
...
src/views/safetyEducation/educationDrawer.vue
View file @
b6a2a7f9
...
...
@@ -13,11 +13,11 @@
</BasicDrawer>
</template>
<
script
lang=
"ts"
setup
>
import
{
ref
,
unref
}
from
'vue'
;
import
{
onMounted
,
ref
,
unref
}
from
'vue'
;
import
{
BasicForm
,
useForm
,
FormActionType
}
from
'@/components/Form'
;
import
{
formSchema
}
from
'./data'
;
import
{
formSchema
,
searchFormSchema
}
from
'./data'
;
import
{
BasicDrawer
,
useDrawerInner
}
from
'@/components/Drawer'
;
import
{
addItem
,
updateItem
}
from
'@/api/project/safetyEducation'
;
import
{
addItem
,
getUserList
,
updateItem
}
from
'@/api/project/safetyEducation'
;
const
emit
=
defineEmits
([
'success'
,
'register'
]);
const
isUpdate
=
ref
(
true
);
...
...
@@ -29,7 +29,10 @@
schemas
:
formSchema
,
showActionButtonGroup
:
false
,
});
onMounted
(
async
()
=>
{
const
data
=
await
getUserList
();
formSchema
[
6
].
componentProps
.
options
=
data
;
});
const
[
registerDrawer
,
{
setDrawerProps
,
closeDrawer
}]
=
useDrawerInner
(
async
(
data
)
=>
{
resetFields
();
setDrawerProps
({
confirmLoading
:
false
});
...
...
src/views/safetyEducation/index.vue
View file @
b6a2a7f9
...
...
@@ -35,7 +35,7 @@
</template>
<
script
setup
lang=
"ts"
>
import
{
BasicTable
,
useTable
,
TableAction
}
from
'@/components/Table'
;
import
{
getListByPage
}
from
'@/api/project/safetyEducation'
;
import
{
getListByPage
,
getUserList
}
from
'@/api/project/safetyEducation'
;
import
{
columns
,
searchFormSchema
,
...
...
@@ -43,6 +43,8 @@ import {
import
{
useDrawer
}
from
"@/components/Drawer"
;
import
SafetyDrawer
from
"@/views/safetyEducation/educationDrawer.vue"
;
import
{
deleteItem
}
from
"@/api/project/safetyEducation"
;
import
{
onMounted
}
from
"vue"
;
import
{
getDepartmentList
}
from
"@/api/project/settlementManage"
;
const
[
registerDrawer
,
{
openDrawer
}]
=
useDrawer
();
const
[
registerTable
,
{
reload
}]
=
useTable
({
api
:
getListByPage
,
...
...
@@ -63,6 +65,10 @@ const [registerTable, { reload }] = useTable({
},
});
onMounted
(
async
()
=>
{
const
data
=
await
getUserList
()
searchFormSchema
[
1
].
componentProps
.
options
=
data
})
async
function
handleEdit
(
record
:
Recordable
,
disabled
:
boolean
)
{
openDrawer
(
true
,
{
record
,
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment