|
|
@@ -118,8 +118,10 @@
|
|
118
|
118
|
</el-form-item>
|
|
119
|
119
|
</el-col>
|
|
120
|
120
|
<el-col :span="12">
|
|
121
|
|
- <el-form-item label="区域" prop="areaName">
|
|
122
|
|
- <el-input v-model="form.areaName" placeholder="请输入区域" />
|
|
|
121
|
+ <el-form-item label="区域" prop="areaId">
|
|
|
122
|
+ <el-select v-model="form.areaId" placeholder="请选择区域" style="width: 100%">
|
|
|
123
|
+ <el-option v-for="item in areaOptions" :key="item.code" :label="item.name" :value="item.positionId" />
|
|
|
124
|
+ </el-select>
|
|
123
|
125
|
</el-form-item>
|
|
124
|
126
|
</el-col>
|
|
125
|
127
|
</el-row>
|
|
|
@@ -141,25 +143,33 @@
|
|
141
|
143
|
<el-row :gutter="20">
|
|
142
|
144
|
<el-col :span="12">
|
|
143
|
145
|
<el-form-item label="漏检时间" prop="missCheckTime">
|
|
144
|
|
- <el-input v-model="form.missCheckTime" placeholder="请输入漏检时间" />
|
|
|
146
|
+ <el-time-picker v-model="form.missCheckTime" placeholder="请选择漏检时间" value-format="HH:mm"
|
|
|
147
|
+ style="width: 100%" />
|
|
145
|
148
|
</el-form-item>
|
|
146
|
149
|
</el-col>
|
|
147
|
150
|
<el-col :span="12">
|
|
148
|
151
|
<el-form-item label="漏检时间段" prop="missCheckTimePeriod">
|
|
149
|
|
- <el-input v-model="form.missCheckTimePeriod" placeholder="请输入漏检时间段" />
|
|
|
152
|
+ <el-select v-model="form.missCheckTimePeriod" placeholder="请选择漏检时间段" style="width: 100%">
|
|
|
153
|
+ <el-option v-for="item in blocked_time_period" :key="item.value" :label="item.label"
|
|
|
154
|
+ :value="item.value" />
|
|
|
155
|
+ </el-select>
|
|
150
|
156
|
</el-form-item>
|
|
151
|
157
|
</el-col>
|
|
152
|
158
|
</el-row>
|
|
153
|
159
|
<el-row :gutter="20">
|
|
154
|
160
|
<el-col :span="12">
|
|
155
|
|
- <el-form-item label="上岗位置" prop="channelName">
|
|
156
|
|
- <el-input v-model="form.channelName" placeholder="请输入上岗位置" />
|
|
|
161
|
+ <el-form-item label="上岗位置" prop="channelId">
|
|
|
162
|
+ <el-select v-model="form.channelId" placeholder="请选择上岗位置" style="width: 100%">
|
|
|
163
|
+ <el-option v-for="item in channelOptions" :key="item.code" :label="item.name"
|
|
|
164
|
+ :value="item.positionId" />
|
|
|
165
|
+ </el-select>
|
|
157
|
166
|
</el-form-item>
|
|
158
|
167
|
</el-col>
|
|
159
|
168
|
<el-col :span="12">
|
|
160
|
169
|
<el-form-item label="分管主管" prop="supervisorId">
|
|
161
|
170
|
<el-select v-model="form.supervisorId" placeholder="请选择分管主管" style="width: 100%">
|
|
162
|
|
- <el-option v-for="item in supervisorOptions" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
171
|
+ <el-option v-for="item in supervisorOptions" :key="item.value" :label="item.label"
|
|
|
172
|
+ :value="item.value" />
|
|
163
|
173
|
</el-select>
|
|
164
|
174
|
</el-form-item>
|
|
165
|
175
|
</el-col>
|
|
|
@@ -168,14 +178,16 @@
|
|
168
|
178
|
<el-col :span="12">
|
|
169
|
179
|
<el-form-item label="代管主管" prop="actingSupervisorId">
|
|
170
|
180
|
<el-select v-model="form.actingSupervisorId" placeholder="请选择代管主管" style="width: 100%">
|
|
171
|
|
- <el-option v-for="item in supervisorOptions" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
181
|
+ <el-option v-for="item in supervisorOptions" :key="item.value" :label="item.label"
|
|
|
182
|
+ :value="item.value" />
|
|
172
|
183
|
</el-select>
|
|
173
|
184
|
</el-form-item>
|
|
174
|
185
|
</el-col>
|
|
175
|
186
|
<el-col :span="12">
|
|
176
|
187
|
<el-form-item label="分管班组长" prop="teamLeaderId">
|
|
177
|
188
|
<el-select v-model="form.teamLeaderId" placeholder="请选择分管班组长" style="width: 100%">
|
|
178
|
|
- <el-option v-for="item in teamLeaderOptions" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
189
|
+ <el-option v-for="item in teamLeaderOptions" :key="item.value" :label="item.label"
|
|
|
190
|
+ :value="item.value" />
|
|
179
|
191
|
</el-select>
|
|
180
|
192
|
</el-form-item>
|
|
181
|
193
|
</el-col>
|
|
|
@@ -183,7 +195,10 @@
|
|
183
|
195
|
<el-row :gutter="20">
|
|
184
|
196
|
<el-col :span="12">
|
|
185
|
197
|
<el-form-item label="物品位置" prop="itemLocation">
|
|
186
|
|
- <el-input v-model="form.itemLocation" placeholder="请输入物品位置" />
|
|
|
198
|
+ <el-select v-model="form.itemLocation" placeholder="请选择物品位置" style="width: 100%">
|
|
|
199
|
+ <el-option v-for="item in blocked_item_position" :key="item.value" :label="item.label"
|
|
|
200
|
+ :value="item.value" />
|
|
|
201
|
+ </el-select>
|
|
187
|
202
|
</el-form-item>
|
|
188
|
203
|
</el-col>
|
|
189
|
204
|
<el-col :span="12">
|
|
|
@@ -206,7 +221,8 @@
|
|
206
|
221
|
<el-col :span="12">
|
|
207
|
222
|
<el-form-item label="判别类型" prop="discriminationType">
|
|
208
|
223
|
<el-select v-model="form.discriminationType" placeholder="请选择判别类型" style="width: 100%">
|
|
209
|
|
- <el-option v-for="item in discrimination_type" :key="item.value" :label="item.label" :value="item.value" />
|
|
|
224
|
+ <el-option v-for="item in discrimination_type" :key="item.value" :label="item.label"
|
|
|
225
|
+ :value="item.value" />
|
|
210
|
226
|
</el-select>
|
|
211
|
227
|
</el-form-item>
|
|
212
|
228
|
</el-col>
|
|
|
@@ -222,18 +238,17 @@
|
|
222
|
238
|
</el-col>
|
|
223
|
239
|
<el-col :span="12">
|
|
224
|
240
|
<el-form-item label="开机年限" prop="machineOperatingYears">
|
|
225
|
|
- <el-input v-model="form.machineOperatingYears" placeholder="请输入开机年限" />
|
|
|
241
|
+ <el-select v-model="form.machineOperatingYears" placeholder="请选择开机年限" style="width: 100%">
|
|
|
242
|
+ <el-option v-for="item in blocked_operating_years" :key="item.value" :label="item.label"
|
|
|
243
|
+ :value="item.value" />
|
|
|
244
|
+ </el-select>
|
|
226
|
245
|
</el-form-item>
|
|
227
|
246
|
</el-col>
|
|
228
|
247
|
</el-row>
|
|
229
|
248
|
<el-row :gutter="20">
|
|
230
|
249
|
<el-col :span="12">
|
|
231
|
250
|
<el-form-item label="证书级别" prop="certificateLevel">
|
|
232
|
|
- <el-select v-model="form.certificateLevel" placeholder="请选择证书级别" style="width: 100%">
|
|
233
|
|
- <el-option label="初级" value="初级" />
|
|
234
|
|
- <el-option label="中级" value="中级" />
|
|
235
|
|
- <el-option label="高级" value="高级" />
|
|
236
|
|
- </el-select>
|
|
|
251
|
+ <el-input v-model="form.certificateLevel" placeholder="请输入证书级别" />
|
|
237
|
252
|
</el-form-item>
|
|
238
|
253
|
</el-col>
|
|
239
|
254
|
<el-col :span="12">
|
|
|
@@ -248,12 +263,18 @@
|
|
248
|
263
|
<el-row :gutter="20">
|
|
249
|
264
|
<el-col :span="12">
|
|
250
|
265
|
<el-form-item label="漏检原因分类" prop="missCheckReasonCategory">
|
|
251
|
|
- <el-input v-model="form.missCheckReasonCategory" placeholder="请输入漏检原因分类" />
|
|
|
266
|
+ <el-select v-model="form.missCheckReasonCategory" placeholder="请选择漏检原因分类" style="width: 100%">
|
|
|
267
|
+ <el-option v-for="item in blocked_miss_check_reason" :key="item.value" :label="item.label"
|
|
|
268
|
+ :value="item.value" />
|
|
|
269
|
+ </el-select>
|
|
252
|
270
|
</el-form-item>
|
|
253
|
271
|
</el-col>
|
|
254
|
272
|
<el-col :span="12">
|
|
255
|
273
|
<el-form-item label="月考成绩" prop="monthlyAssessment">
|
|
256
|
|
- <el-input v-model="form.monthlyAssessment" placeholder="请输入月考成绩" />
|
|
|
274
|
+ <el-select v-model="form.monthlyAssessment" placeholder="请选择月考成绩" style="width: 100%">
|
|
|
275
|
+ <el-option v-for="item in blocked_monthly_exam_result" :key="item.value" :label="item.label"
|
|
|
276
|
+ :value="item.value" />
|
|
|
277
|
+ </el-select>
|
|
257
|
278
|
</el-form-item>
|
|
258
|
279
|
</el-col>
|
|
259
|
280
|
</el-row>
|
|
|
@@ -286,12 +307,13 @@
|
|
286
|
307
|
<el-upload ref="uploadRef" :auto-upload="false" :on-change="handleFileChange" :show-file-list="false"
|
|
287
|
308
|
accept=".xlsx,.xls">
|
|
288
|
309
|
<el-button type="primary">选取文件</el-button>
|
|
289
|
|
- <div class="el-upload__tip">只能上传xls/xlsx文件</div>
|
|
290
|
|
- <div class="el-upload__tip">
|
|
291
|
|
- <el-link type="primary" :underline="false" style="font-size: 12px; vertical-align: baseline"
|
|
292
|
|
- @click="importTemplate">下载模板</el-link>
|
|
293
|
|
- </div>
|
|
|
310
|
+
|
|
294
|
311
|
</el-upload>
|
|
|
312
|
+ <div class="el-upload__tip">只能上传xls/xlsx文件</div>
|
|
|
313
|
+ <div class="el-upload__tip">
|
|
|
314
|
+ <el-link type="primary" :underline="false" style="font-size: 12px; vertical-align: baseline"
|
|
|
315
|
+ @click="importTemplate">下载模板</el-link>
|
|
|
316
|
+ </div>
|
|
295
|
317
|
<template #footer>
|
|
296
|
318
|
<div class="dialog-footer">
|
|
297
|
319
|
<el-button type="primary" @click="submitImport">确 定</el-button>
|
|
|
@@ -304,6 +326,7 @@
|
|
304
|
326
|
|
|
305
|
327
|
<script setup>
|
|
306
|
328
|
import { ref, reactive, onMounted, getCurrentInstance } from 'vue'
|
|
|
329
|
+import { listPosition } from '@/api/system/position'
|
|
307
|
330
|
import { listMissedInspection, getMissedInspection, delMissedInspection, addMissedInspection, updateMissedInspection, exportMissedInspection, downloadTemplate } from '@/api/blockingData/missedInspection'
|
|
308
|
331
|
import { listDept } from '@/api/system/dept'
|
|
309
|
332
|
import { listUser } from '@/api/system/user'
|
|
|
@@ -358,7 +381,7 @@ const rules = {
|
|
358
|
381
|
}
|
|
359
|
382
|
|
|
360
|
383
|
// 字典数据
|
|
361
|
|
-const { discrimination_type } = useDict('discrimination_type')
|
|
|
384
|
+const { discrimination_type, blocked_time_period, blocked_item_position, blocked_monthly_exam_result, blocked_operating_years, blocked_miss_check_reason } = useDict('discrimination_type', 'blocked_time_period', 'blocked_item_position', 'blocked_monthly_exam_result', 'blocked_operating_years', 'blocked_miss_check_reason')
|
|
362
|
385
|
|
|
363
|
386
|
// 大队选项
|
|
364
|
387
|
const brigadeOptions = ref([])
|
|
|
@@ -368,7 +391,23 @@ const personOptions = ref([])
|
|
368
|
391
|
const teamLeaderOptions = ref([])
|
|
369
|
392
|
// 主管选项
|
|
370
|
393
|
const supervisorOptions = ref([])
|
|
|
394
|
+// 区域选项
|
|
|
395
|
+const areaOptions = ref([])
|
|
|
396
|
+// 上岗位置选项
|
|
|
397
|
+const channelOptions = ref([])
|
|
|
398
|
+
|
|
|
399
|
+/** 获取职位列表 */
|
|
|
400
|
+function getPositionList() {
|
|
|
401
|
+ // 获取区域选项
|
|
|
402
|
+ listPosition({ positionType: 'REGIONAL' }).then(response => {
|
|
|
403
|
+ areaOptions.value = response.data || []
|
|
|
404
|
+ })
|
|
371
|
405
|
|
|
|
406
|
+ // 获取上岗位置选项
|
|
|
407
|
+ listPosition({ positionType: 'TERMINL' }).then(response => {
|
|
|
408
|
+ channelOptions.value = response.data || []
|
|
|
409
|
+ })
|
|
|
410
|
+}
|
|
372
|
411
|
|
|
373
|
412
|
/** 查询漏检列表 */
|
|
374
|
413
|
function getList() {
|
|
|
@@ -427,11 +466,13 @@ function reset() {
|
|
427
|
466
|
Object.assign(form, {
|
|
428
|
467
|
id: null,
|
|
429
|
468
|
brigadeId: null,
|
|
|
469
|
+ areaId: null,
|
|
430
|
470
|
areaName: null,
|
|
431
|
471
|
reviewedUserId: null,
|
|
432
|
472
|
reviewDate: null,
|
|
433
|
473
|
missCheckTime: null,
|
|
434
|
474
|
missCheckTimePeriod: null,
|
|
|
475
|
+ channelId: null,
|
|
435
|
476
|
channelName: null,
|
|
436
|
477
|
supervisorId: null,
|
|
437
|
478
|
actingSupervisorId: null,
|
|
|
@@ -494,6 +535,54 @@ function handleUpdate(row) {
|
|
494
|
535
|
function submitForm() {
|
|
495
|
536
|
proxy.$refs.missedInspectionRef.validate(valid => {
|
|
496
|
537
|
if (valid) {
|
|
|
538
|
+ // 处理大队ID和名称映射
|
|
|
539
|
+ if (form.brigadeId) {
|
|
|
540
|
+ const brigade = brigadeOptions.value.find(item => item.value === form.brigadeId)
|
|
|
541
|
+ form.brigadeName = brigade ? brigade.label : null
|
|
|
542
|
+ }
|
|
|
543
|
+
|
|
|
544
|
+ // 处理区域ID和名称映射
|
|
|
545
|
+ if (form.areaId) {
|
|
|
546
|
+ const area = areaOptions.value.find(item => item.positionId === form.areaId)
|
|
|
547
|
+ form.areaName = area ? area.positionName : null
|
|
|
548
|
+ }
|
|
|
549
|
+
|
|
|
550
|
+ // 处理被回查人ID和名称映射
|
|
|
551
|
+ if (form.reviewedUserId) {
|
|
|
552
|
+ const reviewedUser = personOptions.value.find(item => item.value === form.reviewedUserId)
|
|
|
553
|
+ form.reviewedUserName = reviewedUser ? reviewedUser.label : null
|
|
|
554
|
+ }
|
|
|
555
|
+
|
|
|
556
|
+ // 处理上岗位置ID和名称映射
|
|
|
557
|
+ if (form.channelId) {
|
|
|
558
|
+ const channel = channelOptions.value.find(item => item.positionId === form.channelId)
|
|
|
559
|
+ form.channelName = channel ? channel.positionName : null
|
|
|
560
|
+ }
|
|
|
561
|
+
|
|
|
562
|
+ // 处理分管主管ID和名称映射
|
|
|
563
|
+ if (form.supervisorId) {
|
|
|
564
|
+ const supervisor = supervisorOptions.value.find(item => item.value === form.supervisorId)
|
|
|
565
|
+ form.supervisorName = supervisor ? supervisor.label : null
|
|
|
566
|
+ }
|
|
|
567
|
+
|
|
|
568
|
+ // 处理代管主管ID和名称映射
|
|
|
569
|
+ if (form.actingSupervisorId) {
|
|
|
570
|
+ const actingSupervisor = supervisorOptions.value.find(item => item.value === form.actingSupervisorId)
|
|
|
571
|
+ form.actingSupervisorName = actingSupervisor ? actingSupervisor.label : null
|
|
|
572
|
+ }
|
|
|
573
|
+
|
|
|
574
|
+ // 处理分管班组长ID和名称映射
|
|
|
575
|
+ if (form.teamLeaderId) {
|
|
|
576
|
+ const teamLeader = teamLeaderOptions.value.find(item => item.value === form.teamLeaderId)
|
|
|
577
|
+ form.teamLeaderName = teamLeader ? teamLeader.label : null
|
|
|
578
|
+ }
|
|
|
579
|
+
|
|
|
580
|
+ // 处理回查人ID和名称映射
|
|
|
581
|
+ if (form.reviewUserId) {
|
|
|
582
|
+ const reviewUser = personOptions.value.find(item => item.value === form.reviewUserId)
|
|
|
583
|
+ form.reviewUserName = reviewUser ? reviewUser.label : null
|
|
|
584
|
+ }
|
|
|
585
|
+
|
|
497
|
586
|
if (form.id != null) {
|
|
498
|
587
|
updateMissedInspection(form).then(response => {
|
|
499
|
588
|
proxy.$modal.msgSuccess('修改成功')
|
|
|
@@ -564,6 +653,7 @@ onMounted(() => {
|
|
564
|
653
|
getList()
|
|
565
|
654
|
getDeptList()
|
|
566
|
655
|
getUserList()
|
|
|
656
|
+ getPositionList()
|
|
567
|
657
|
})
|
|
568
|
658
|
</script>
|
|
569
|
659
|
|