|
|
@@ -1,12 +1,14 @@
|
|
1
|
1
|
<template>
|
|
2
|
2
|
<el-dialog :title="title" v-model="open" width="1100px" append-to-body>
|
|
3
|
3
|
<div class="contentWrap" v-loading="loading">
|
|
4
|
|
- <el-form ref="checkFormRef" :model="form" :rules="rules" scroll-to-error :scroll-into-view-options="{block: 'center'}" label-width="9em">
|
|
5
|
|
- <el-card header="基本信息" style="margin-bottom: 10px;" v-card-expand="{ isExpanded: true }">
|
|
|
4
|
+ <el-form ref="checkFormRef" :model="form" :rules="rules" scroll-to-error
|
|
|
5
|
+ :scroll-into-view-options="{ block: 'center' }" label-width="9em">
|
|
|
6
|
+ <el-card header="基本信息" style="margin-bottom: 10px;" v-card-expand="{ isExpanded: true }">
|
|
6
|
7
|
<el-row :gutter="16">
|
|
7
|
8
|
<el-col :span="12">
|
|
8
|
9
|
<el-form-item label="任务编号" prop="taskCode">
|
|
9
|
|
- <el-input :disabled="disabled" v-model="form.taskCode" :placeholder="disabled ? '-' : '请输入任务编号'" maxlength="30" />
|
|
|
10
|
+ <el-input :disabled="disabled" v-model="form.taskCode" :placeholder="disabled ? '-' : '请输入任务编号'"
|
|
|
11
|
+ maxlength="30" />
|
|
10
|
12
|
</el-form-item>
|
|
11
|
13
|
</el-col>
|
|
12
|
14
|
<el-col :span="12">
|
|
|
@@ -16,29 +18,20 @@
|
|
16
|
18
|
</el-col>
|
|
17
|
19
|
<el-col :span="12">
|
|
18
|
20
|
<el-form-item label="被检查人/科/班组" prop="checkedDepartmentName">
|
|
19
|
|
- <el-input
|
|
20
|
|
- v-if=" form.checkedLevel === 'DEPARTMENT_LEVEL' "
|
|
21
|
|
- :disabled="disabled"
|
|
22
|
|
- :value="form.checkedDepartmentName"
|
|
23
|
|
- :placeholder="disabled ? '-' : '请输入被检查人/科/班组'" />
|
|
24
|
|
- <el-input
|
|
25
|
|
- v-else-if=" form.checkedLevel === 'TEAM_LEVEL' "
|
|
26
|
|
- :disabled="disabled"
|
|
27
|
|
- :value="form.checkedTeamName"
|
|
28
|
|
- :placeholder="disabled ? '-' : '请输入被检查人/科/班组'" />
|
|
29
|
|
- <el-input
|
|
30
|
|
- v-else-if=" form.checkedLevel === 'PERSONNEL_LEVEL' "
|
|
31
|
|
- :disabled="disabled"
|
|
32
|
|
- :value="form.checkedPersonnelName"
|
|
33
|
|
- :placeholder="disabled ? '-' : '请输入被检查人/科/班组'" />
|
|
|
21
|
+ <el-input v-if="form.checkedLevel === 'DEPARTMENT_LEVEL'" :disabled="disabled"
|
|
|
22
|
+ :value="form.checkedDepartmentName" :placeholder="disabled ? '-' : '请输入被检查人/科/班组'" />
|
|
|
23
|
+ <el-input v-else-if="form.checkedLevel === 'TEAM_LEVEL'" :disabled="disabled"
|
|
|
24
|
+ :value="form.checkedTeamName" :placeholder="disabled ? '-' : '请输入被检查人/科/班组'" />
|
|
|
25
|
+ <el-input v-else-if="form.checkedLevel === 'PERSONNEL_LEVEL'" :disabled="disabled"
|
|
|
26
|
+ :value="form.checkedPersonnelName" :placeholder="disabled ? '-' : '请输入被检查人/科/班组'" />
|
|
|
27
|
+ <el-input v-else-if="form.checkedLevel === 'BRIGADE_LEVEL'" :disabled="disabled"
|
|
|
28
|
+ :value="form.checkedBrigadeName" :placeholder="disabled ? '-' : '请输入被检查人/科/班组'" />
|
|
34
|
29
|
<el-input :disabled="disabled" v-else />
|
|
35
|
30
|
</el-form-item>
|
|
36
|
31
|
</el-col>
|
|
37
|
32
|
<el-col :span="12">
|
|
38
|
33
|
<el-form-item label="检查地点" prop="nickName">
|
|
39
|
|
- <el-input
|
|
40
|
|
- :disabled="disabled"
|
|
41
|
|
- :value="viewText( form.terminlName, form.regionalName, form.channelName )"
|
|
|
34
|
+ <el-input :disabled="disabled" :value="viewText(form.terminlName, form.regionalName, form.channelName)"
|
|
42
|
35
|
:placeholder="disabled ? '-' : '请输入检查地点'" />
|
|
43
|
36
|
</el-form-item>
|
|
44
|
37
|
</el-col>
|
|
|
@@ -53,27 +46,20 @@
|
|
53
|
46
|
<el-card header="待整改任务" style="margin-bottom: 10px;" v-card-expand="{ isExpanded: true }">
|
|
54
|
47
|
<div>
|
|
55
|
48
|
<el-row :gutter="16">
|
|
56
|
|
- <el-col :span="24" v-for=" item of groupHandler( form.checkProjectItemList ) " :key="item.id"
|
|
|
49
|
+ <el-col :span="24" v-for="item of groupHandler(form.checkProjectItemList)" :key="item.id"
|
|
57
|
50
|
style="margin-bottom: 15px;">
|
|
58
|
51
|
<div class="title">{{ item.title }}</div>
|
|
59
|
|
- <div v-for=" attr in item.list " :key="attr.index" style="padding: 0 30px; box-sizing: border-box;">
|
|
|
52
|
+ <div v-for="attr in item.list" :key="attr.index" style="padding: 0 30px; box-sizing: border-box;">
|
|
60
|
53
|
<el-form-item :label="attr.projectName" label-width="auto"
|
|
61
|
54
|
:prop="`checkProjectItemList.${attr.index}.scoreLevel`">
|
|
62
|
|
- <el-switch
|
|
63
|
|
- :disabled="disabled"
|
|
64
|
|
- v-model="attr.scoreLevel"
|
|
65
|
|
- active-value="QUALIFIED"
|
|
66
|
|
- inactive-value="UNQUALIFIED"
|
|
67
|
|
- inline-prompt
|
|
68
|
|
- active-text="符合"
|
|
69
|
|
- inactive-text="不符合"
|
|
|
55
|
+ <el-switch :disabled="disabled" v-model="attr.scoreLevel" active-value="QUALIFIED"
|
|
|
56
|
+ inactive-value="UNQUALIFIED" inline-prompt active-text="符合" inactive-text="不符合"
|
|
70
|
57
|
style="--el-switch-on-color: rgb(98, 111, 240); --el-switch-off-color: #ff4949" />
|
|
71
|
58
|
</el-form-item>
|
|
72
|
|
- <div v-if=" attr.scoreLevel === 'UNQUALIFIED' " style="padding: 0 30px; box-sizing: border-box;">
|
|
73
|
|
- <el-form-item v-if="attr.checkUserList && attr.checkUserList.length" label="不合格人员" label-width="6em" prop="checkedPersonnelName">
|
|
74
|
|
- <el-input
|
|
75
|
|
- :disabled="disabled"
|
|
76
|
|
- :value="getUserName( attr.checkUserList )" />
|
|
|
59
|
+ <div v-if="attr.scoreLevel === 'UNQUALIFIED'" style="padding: 0 30px; box-sizing: border-box;">
|
|
|
60
|
+ <el-form-item v-if="attr.checkUserList && attr.checkUserList.length" label="不合格人员" label-width="6em"
|
|
|
61
|
+ prop="checkedPersonnelName">
|
|
|
62
|
+ <el-input :disabled="disabled" :value="getUserName(attr.checkUserList)" />
|
|
77
|
63
|
</el-form-item>
|
|
78
|
64
|
<el-form-item v-if="attr.problemDescription" label="问题描述" label-width="6em"
|
|
79
|
65
|
:prop="`checkProjectItemList.${attr.index}.problemDescription`">
|
|
|
@@ -82,52 +68,57 @@
|
|
82
|
68
|
</div>
|
|
83
|
69
|
</div>
|
|
84
|
70
|
</el-col>
|
|
85
|
|
- <el-col :span="24" v-if=" form.checkRecordBaseAttachmentList && form.checkRecordBaseAttachmentList.length ">
|
|
|
71
|
+ <el-col :span="24" v-if="form.checkRecordBaseAttachmentList && form.checkRecordBaseAttachmentList.length">
|
|
86
|
72
|
<div class="title">不合格照片</div>
|
|
87
|
73
|
<div class="imgList">
|
|
88
|
|
- <ImageUpload :modelValue="transformImglistData(form.checkRecordBaseAttachmentList)" :disabled="disabled" />
|
|
|
74
|
+ <ImageUpload :modelValue="transformImglistData(form.checkRecordBaseAttachmentList)"
|
|
|
75
|
+ :disabled="disabled" />
|
|
89
|
76
|
</div>
|
|
90
|
77
|
</el-col>
|
|
91
|
78
|
</el-row>
|
|
92
|
79
|
</div>
|
|
93
|
80
|
</el-card>
|
|
94
|
81
|
|
|
95
|
|
- <el-card header="整改要求" style="margin-bottom: 10px;" v-card-expand="{ isExpanded: true }">
|
|
|
82
|
+ <el-card header="整改要求" style="margin-bottom: 10px;" v-card-expand="{ isExpanded: true }">
|
|
96
|
83
|
<el-row :gutter="16">
|
|
97
|
84
|
<el-col :span="12">
|
|
98
|
85
|
<el-form-item label="负责人" prop="responsibleUserName">
|
|
99
|
|
- <el-input v-model="form.responsibleUserName" :disabled="disabled" :placeholder="disabled ? '-' : '请输入负责人'" />
|
|
|
86
|
+ <el-input v-model="form.responsibleUserName" :disabled="disabled"
|
|
|
87
|
+ :placeholder="disabled ? '-' : '请输入负责人'" />
|
|
100
|
88
|
</el-form-item>
|
|
101
|
89
|
</el-col>
|
|
102
|
90
|
|
|
103
|
91
|
<el-col :span="12">
|
|
104
|
92
|
<el-form-item label="整改期限" prop="rectificationDeadline">
|
|
105
|
|
- <el-input v-model="form.rectificationDeadline" :disabled="disabled" :placeholder="disabled ? '-' : '请输入整改期限'" />
|
|
|
93
|
+ <el-input v-model="form.rectificationDeadline" :disabled="disabled"
|
|
|
94
|
+ :placeholder="disabled ? '-' : '请输入整改期限'" />
|
|
106
|
95
|
</el-form-item>
|
|
107
|
96
|
</el-col>
|
|
108
|
97
|
<el-col :span="24">
|
|
109
|
98
|
<el-form-item label="整改要求" prop="rectificationSuggestions">
|
|
110
|
|
- <el-input type="textarea" v-model="form.rectificationSuggestions" :disabled="disabled" :placeholder="disabled ? '-' : '请输入整改要求'" />
|
|
|
99
|
+ <el-input type="textarea" v-model="form.rectificationSuggestions" :disabled="disabled"
|
|
|
100
|
+ :placeholder="disabled ? '-' : '请输入整改要求'" />
|
|
111
|
101
|
</el-form-item>
|
|
112
|
102
|
</el-col>
|
|
113
|
103
|
</el-row>
|
|
114
|
104
|
</el-card>
|
|
115
|
|
- <el-card header="整改详情" style="margin-bottom: 10px;" v-card-expand="{ isExpanded: true }">
|
|
|
105
|
+ <el-card header="整改详情" style="margin-bottom: 10px;" v-card-expand="{ isExpanded: true }">
|
|
116
|
106
|
<el-row :gutter="16">
|
|
117
|
107
|
<el-col :span="24">
|
|
118
|
108
|
<el-form-item label="整改详情" label-width="6em" prop="rectificationDetails">
|
|
119
|
|
- <el-input type="textarea" v-model="form.rectificationDetails" :disabled="disabled" :placeholder="'请输入整改要求'" />
|
|
|
109
|
+ <el-input type="textarea" v-model="form.rectificationDetails" :disabled="disabled"
|
|
|
110
|
+ :placeholder="'请输入整改要求'" />
|
|
120
|
111
|
</el-form-item>
|
|
121
|
112
|
</el-col>
|
|
122
|
113
|
<el-col :span="24" v-if="baseAttachmentList.length">
|
|
123
|
114
|
<div class="title">整改图片</div>
|
|
124
|
115
|
<div class="imgList">
|
|
125
|
|
- <ImageUpload v-model="baseAttachmentList" :disabled="disabled" />
|
|
|
116
|
+ <ImageUpload v-model="baseAttachmentList" :disabled="disabled" />
|
|
126
|
117
|
</div>
|
|
127
|
118
|
</el-col>
|
|
128
|
119
|
</el-row>
|
|
129
|
120
|
</el-card>
|
|
130
|
|
- <el-card header="审批历史" style="margin-bottom: 10px;" v-card-expand="{ isExpanded: true }">
|
|
|
121
|
+ <el-card header="审批历史" style="margin-bottom: 10px;" v-card-expand="{ isExpanded: true }">
|
|
131
|
122
|
<el-table :data="historyInstanceList">
|
|
132
|
123
|
<el-table-column label="审批人" align="center" prop="operatorName" width="180" />
|
|
133
|
124
|
<el-table-column label="审批时间" align="center" prop="operationTime" />
|
|
|
@@ -146,7 +137,7 @@
|
|
146
|
137
|
|
|
147
|
138
|
<script setup>
|
|
148
|
139
|
import { watch, ref, onMounted, reactive, onUnmounted, computed } from 'vue'
|
|
149
|
|
-import { getCheckCorrection, historyInstance} from "@/api/check/checkCorrection"
|
|
|
140
|
+import { getCheckCorrection, historyInstance } from "@/api/check/checkCorrection"
|
|
150
|
141
|
import { listUser } from "@/api/system/user"
|
|
151
|
142
|
const props = defineProps({
|
|
152
|
143
|
id: {
|
|
|
@@ -178,7 +169,7 @@ const getDetailInfo = () => {
|
|
178
|
169
|
} else {
|
|
179
|
170
|
return historyInstanceList.value = []
|
|
180
|
171
|
}
|
|
181
|
|
-
|
|
|
172
|
+
|
|
182
|
173
|
}).finally(() => {
|
|
183
|
174
|
loading.value = false
|
|
184
|
175
|
})
|
|
|
@@ -210,10 +201,10 @@ const transformImglistData = (imgList) => {
|
|
210
|
201
|
}
|
|
211
|
202
|
|
|
212
|
203
|
const baseAttachmentList = computed({
|
|
213
|
|
- get () {
|
|
|
204
|
+ get() {
|
|
214
|
205
|
return transformImglistData(form.value.baseAttachmentList)
|
|
215
|
206
|
},
|
|
216
|
|
- set (newValue) {
|
|
|
207
|
+ set(newValue) {
|
|
217
|
208
|
form.value.baseAttachmentList = newValue.map(item => {
|
|
218
|
209
|
return {
|
|
219
|
210
|
attachmentName: item.name,
|
|
|
@@ -228,13 +219,13 @@ const groupHandler = (list) => {
|
|
228
|
219
|
return list.reduce((cur, acc, index) => {
|
|
229
|
220
|
const findIndex = cur.findIndex(item => item.categoryCodeOne === acc.categoryCodeOne && item.categoryCodeTwo === acc.categoryCodeTwo)
|
|
230
|
221
|
if (findIndex >= 0) {
|
|
231
|
|
- cur[ findIndex ].list.push({ index, ...acc })
|
|
|
222
|
+ cur[findIndex].list.push({ index, ...acc })
|
|
232
|
223
|
} else {
|
|
233
|
224
|
cur.push({
|
|
234
|
225
|
title: `${acc.categoryNameOne}/${acc.categoryNameTwo}`,
|
|
235
|
226
|
categoryCodeOne: acc.categoryCodeOne,
|
|
236
|
227
|
categoryCodeTwo: acc.categoryCodeTwo,
|
|
237
|
|
- list: [ { index, ...acc } ]
|
|
|
228
|
+ list: [{ index, ...acc }]
|
|
238
|
229
|
})
|
|
239
|
230
|
}
|
|
240
|
231
|
return cur
|
|
|
@@ -252,12 +243,20 @@ const getUserInfo = () => {
|
|
252
|
243
|
}
|
|
253
|
244
|
|
|
254
|
245
|
const getUserName = (list) => {
|
|
|
246
|
+ let res = ''
|
|
255
|
247
|
if (Array.isArray(list) && list.length) {
|
|
256
|
|
- return list.map(attr => {
|
|
|
248
|
+ res = list.map(attr => {
|
|
257
|
249
|
return (listUserOption.value.find(item => item.value === attr.userId) || {}).label
|
|
258
|
250
|
}).filter(Boolean).join('、')
|
|
259
|
251
|
}
|
|
260
|
|
- return '-'
|
|
|
252
|
+
|
|
|
253
|
+ if (res) {
|
|
|
254
|
+ return res
|
|
|
255
|
+ } else {
|
|
|
256
|
+ res = list.map((item) => item.userName).join('、')
|
|
|
257
|
+ return res || '-'
|
|
|
258
|
+ }
|
|
|
259
|
+
|
|
261
|
260
|
}
|
|
262
|
261
|
|
|
263
|
262
|
const cancel = () => {
|