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
48265e66
Commit
48265e66
authored
Jun 25, 2024
by
张伯涛
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
安全隐患管理详情抽屉
parent
af9dddcd
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
154 additions
and
30 deletions
+154
-30
saftyManage.ts
src/api/project/saftyManage.ts
+3
-0
drawerData.ts
src/views/project/tabs/drawer/drawerData.ts
+66
-0
potentialSafetyDrawer.vue
src/views/project/tabs/drawer/potentialSafetyDrawer.vue
+52
-0
potentialSafety.vue
src/views/project/tabs/potentialSafety.vue
+33
-30
No files found.
src/api/project/saftyManage.ts
View file @
48265e66
...
...
@@ -3,6 +3,7 @@ import { ProjectModel, ProjectParams } from '@/api/project/model/projectModel';
enum
Api
{
GetList
=
'/pro/dangerManagement/page'
,
potentialSafetyGetList
=
'/pro/dangerManagement/page'
,
UpdateProject
=
'/pro/dangerManagement/update'
,
DeleteProject
=
'/pro/dangerManagement/del'
,
}
...
...
@@ -10,6 +11,8 @@ enum Api {
export
const
getListByPage
=
(
params
?:
ProjectParams
)
=>
defHttp
.
post
<
ProjectModel
>
({
url
:
Api
.
GetList
,
data
:
params
});
export
const
potentialSafetyGetListByPage
=
(
params
?:
ProjectParams
)
=>
defHttp
.
post
<
ProjectModel
>
({
url
:
Api
.
potentialSafetyGetList
,
data
:
params
});
export
const
addItem
=
(
params
?:
any
)
=>
defHttp
.
post
<
ProjectModel
>
({
url
:
Api
.
UpdateProject
,
data
:
params
});
...
...
src/views/project/tabs/drawer/drawerData.ts
View file @
48265e66
...
...
@@ -287,3 +287,69 @@ export const changeSignatureDrawer: FormSchema[] = [
component
:
'Input'
,
},
];
//安全隐患管理详情抽屉
export
const
potentialSafetyDrawer
:
FormSchema
[]
=
[
{
label
:
'填报周期'
,
field
:
'fillingPeriod'
,
labelWidth
:
'140px'
,
required
:
true
,
component
:
'Input'
,
},
{
label
:
'隐患描述'
,
field
:
'describe'
,
labelWidth
:
'140px'
,
required
:
true
,
component
:
'Input'
,
},
{
label
:
'隐患级别'
,
field
:
'level'
,
labelWidth
:
'140px'
,
required
:
true
,
component
:
'Input'
,
},
{
label
:
'计划费用(万元)'
,
field
:
'planCost'
,
labelWidth
:
'140px'
,
required
:
true
,
component
:
'Input'
,
},
{
label
:
'实际费用(万元)'
,
field
:
'actualCost'
,
labelWidth
:
'140px'
,
required
:
true
,
component
:
'Input'
,
},
{
label
:
'计划时间'
,
field
:
'planTime'
,
labelWidth
:
'140px'
,
required
:
true
,
component
:
'Input'
,
},
{
label
:
'实际时间'
,
field
:
'actualTime'
,
labelWidth
:
'140px'
,
required
:
true
,
component
:
'Input'
,
},
{
label
:
'隐患治理后的评估情况'
,
field
:
'assessmentSituation'
,
labelWidth
:
'140px'
,
required
:
true
,
component
:
'Input'
,
},
{
label
:
'责任人'
,
field
:
'responsiblePerson'
,
labelWidth
:
'140px'
,
required
:
true
,
component
:
'Input'
,
},
];
src/views/project/tabs/drawer/potentialSafetyDrawer.vue
0 → 100644
View file @
48265e66
<
template
>
<BasicDrawer
v-bind=
"$attrs"
@
register=
"registerDrawer"
showFooter
:title=
"getTitle"
width=
"700px"
@
ok=
"handleSubmit"
>
<BasicForm
ref=
"formElRef"
@
register=
"registerForm"
/>
</BasicDrawer>
</
template
>
<
script
lang=
"ts"
setup
>
import
{
onMounted
,
ref
,
unref
}
from
'vue'
;
import
{
BasicForm
,
useForm
,
FormActionType
}
from
'@/components/Form'
;
import
{
potentialSafetyDrawer
}
from
'../drawer/drawerData'
;
import
{
BasicDrawer
,
useDrawerInner
}
from
'@/components/Drawer'
;
const
isUpdate
=
ref
(
true
);
const
formElRef
=
ref
<
Nullable
<
FormActionType
>>
(
null
);
const
[
registerForm
,
{
resetFields
,
setFieldsValue
}]
=
useForm
({
labelWidth
:
90
,
baseColProps
:
{
span
:
24
},
schemas
:
potentialSafetyDrawer
,
showActionButtonGroup
:
false
,
});
onMounted
(
async
()
=>
{});
const
[
registerDrawer
,
{
setDrawerProps
,
closeDrawer
}]
=
useDrawerInner
(
async
(
data
)
=>
{
resetFields
();
setDrawerProps
({
confirmLoading
:
false
});
if
(
data
.
disabled
==
true
)
{
getTitle
.
value
=
'查看变更签证管理'
;
const
formEl
=
unref
(
formElRef
);
if
(
!
formEl
)
return
;
await
formEl
.
setProps
({
disabled
:
true
,
});
}
if
(
unref
(
isUpdate
))
{
setFieldsValue
({
...
data
.
record
,
});
}
});
const
getTitle
=
ref
(
''
);
async
function
handleSubmit
()
{
closeDrawer
();
}
</
script
>
src/views/project/tabs/potentialSafety.vue
View file @
48265e66
<
template
>
<div>
<BasicTable
@
register=
"registerTable"
>
<template
#
bodyCell=
"
{ column, record, index }">
<template
v-if=
"column.key === 'serialNumber'"
>
...
...
@@ -12,28 +13,32 @@
:actions=
"[
{
label: '查看详情',
onClick: handleDetail.bind(null, record, 1),
ifShow: (_action) => {
return record.completionResult == '1';
},
onClick: handleDetail.bind(null, record, true),
},
]"
/>
</
template
>
</template>
</BasicTable>
<potential-safety-drawer
@
register=
"registerDrawer"
@
success=
"handleSuccess"
/>
</div>
</template>
<
script
lang=
"ts"
setup
>
import
{
useDrawer
}
from
'@/components/Drawer'
;
import
{
potentialSafetyDrawer
}
from
"@/views/project/tabs/drawer/drawerData"
;
import
{
potentialSafetyColumns
,
searchFormSchema
}
from
'./data'
;
import
{
BasicTable
,
useTable
,
TableAction
}
from
'@/components/Table'
;
import
{
g
etListByPage
}
from
'@/api/project/saftyManage'
;
import
{
potentialSafetyG
etListByPage
}
from
'@/api/project/saftyManage'
;
import
{
inject
}
from
'vue'
;
import
{
router
}
from
'@/router'
;
import
{
Tag
}
from
'ant-design-vue'
;
import
PotentialSafetyDrawer
from
"@/views/project/tabs/drawer/potentialSafetyDrawer.vue"
;
let
detailId
=
inject
(
'detailId'
);
console
.
log
(
'detailId'
,
detailId
);
const
[
registerDrawer
,
{
openDrawer
}]
=
useDrawer
();
const
[
registerTable
,
{
reload
}]
=
useTable
({
api
:
g
etListByPage
,
api
:
potentialSafetyG
etListByPage
,
columns
:
potentialSafetyColumns
,
formConfig
:
{
labelWidth
:
120
,
...
...
@@ -54,13 +59,11 @@
fixed
:
undefined
,
},
});
function
handleDetail
(
record
:
Recordable
,
disabled
:
number
)
{
router
.
push
({
path
:
'/potentialSafety/edit'
,
query
:
{
id
:
record
.
id
,
disabled
:
String
(
disabled
),
},
async
function
handleDetail
(
record
:
Recordable
,
disabled
:
boolean
)
{
openDrawer
(
true
,
{
record
,
isUpdate
:
true
,
disabled
,
});
}
</
script
>
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