Crunchy
2025-04-29 e5454b769d44a34af423bf87ac8a740bf8c20341
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
<!-- 设备故障 -->
<template>
  <div>
    <div class="search">
      <div class="search_thing">
        <div class="search_label">流程编号:</div>
        <div>
          <el-input size="small" placeholder="请输入" clearable v-model="search.processNumber" style="width: 100%;"
            @keyup.enter.native="getTableList(clickNodeVal.value)">
          </el-input>
        </div>
      </div>
      <div class="search_thing" style="padding-left: 30px;">
        <el-button size="mini" type="primary" @click="getTableList(clickNodeVal.value)">查询</el-button>
        <el-button size="mini" @click="resetSearch">重置</el-button>
      </div>
      <div class="btns">
        <el-button size="small" type="primary" @click="dialogVisible = true, addRecode()">新建</el-button>
        <el-button size="small" type="primary" @click="handleDown" :loading="outLoading">导出</el-button>
      </div>
    </div>
    <div>
      <div class="tables" style="margin-top: 16px;">
        <el-table :data="faultParam" style="width: 100%" height="calc(100vh - 20em)"
                  :header-cell-style="{ background: '#f8f8f9', color: '#515a6e' }" border>
          <!-- 表格列 -->
          <el-table-column header-align="center" align="center" width="70" prop="prop" label="序号"
            type="index"></el-table-column>
          <el-table-column prop="processNumber" label="流程编号" min-width="180"></el-table-column>
          <el-table-column prop="deviceName" label="设备名称" min-width="150"></el-table-column>
          <el-table-column prop="managementNumber" label="统一编号" min-width="150"></el-table-column>
          <el-table-column prop="faultSituation" label="故障情况" min-width="130"></el-table-column>
          <el-table-column prop="submitPerson" label="提交人" min-width="130"></el-table-column>
          <el-table-column prop="createTime" label="提交日期" min-width="150"></el-table-column>
          <el-table-column prop="currentState" label="当前状态" min-width="130"></el-table-column>
          <el-table-column prop="currentResponsible" label="当前责任人" width="180"></el-table-column>
          <!-- 操作按钮 -->
          <el-table-column label="操作" fixed="right" min-width="150">
            <template slot-scope="scope">
              <el-button size="small" type="text" @click="showDetailsDialog(scope.row)">查看详情</el-button>
              <el-button type="text" size="small" @click="handleDeleteClick(scope.$index, scope.row)">删除</el-button>
            </template>
          </el-table-column>
        </el-table>
        <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="1"
          style="margin-right: 5%;" :page-sizes="[10, 20, 30, 50, 100]" :page-size="search.size"
          layout="->,total, sizes, prev, pager, next, jumper" :total="search.total">
        </el-pagination>
      </div>
    </div>
    <el-dialog title="新增维修记录" top="5vh" :visible.sync="dialogVisible" width="60%" @open="openRecordAcceptance"
      :close-on-click-modal="false" :close-on-press-escape="false">
      <el-steps :active="currentStep" finish-status="success" align-center>
        <el-step v-for="(v, i) in steps" style="cursor:pointer" :title="v" :key="i"
          @click.native="choiceStep(i)"></el-step>
      </el-steps>
      <el-form ref="form" :model="form" label-position="right" label-width="120px">
        <!-- 提交 -->
        <div v-show="currentStepClick == 0">
          <el-card style="margin-top: 1em;">
            <el-row>
              <el-col :span="24">
                <el-form-item label="流程编号:">
                  <el-input v-model="form.processNumber" size="small" disabled></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="设备名称:">
                  <el-input v-model="form.deviceName" size="small" disabled></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="规格型号:">
                  <el-input v-model="form.specificationModel" size="small" disabled></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="设备编号:">
                  <el-input v-model="form.managementNumber" size="small" disabled></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="准确度量值:" prop="measureOfAccuracy"
                  :rules="[{ required: currentStep === 0, message: '请输入准确度量值', trigger: 'blur' }]">
                  <el-input v-model="form.measureOfAccuracy" size="small" :disabled="currentStep !== 0"></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="故障日期:" prop="faultDate">
                  <el-date-picker v-model="form.faultDate" type="date" placeholder="选择日期" size="small"
                    format="yyyy-MM-dd" style="width: 100%" value-format="yyyy-MM-dd" :disabled="currentStep !== 0">
                  </el-date-picker>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="要求修复日期:" prop="requestRepairDate">
                  <el-date-picker v-model="form.requestRepairDate" :picker-options="{ disabledDate: this.disabledDate }"
                    type="date" placeholder="选择日期" size="small" format="yyyy-MM-dd" style="width: 100%"
                    value-format="yyyy-MM-dd" :disabled="currentStep !== 0">
                  </el-date-picker>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item label="故障情况:" prop="faultSituation"
                  :rules="[{ required: currentStep === 0, message: '请输入故障情况', trigger: 'blur' }]">
                  <el-input v-model="form.faultSituation" type="textarea" size="small"
                    :disabled="currentStep !== 0"></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item label="相关附件:">
                  <el-input v-model="form.fileName" :disabled="true" size="small" style="width: 80%;">
                    <el-button slot="append" icon="el-icon-delete-solid" @click="deleteFile"
                      :disabled="currentStep !== 0"></el-button>
                  </el-input>
                  <el-upload ref="upload" style="float: right;" :action="action" :show-file-list="false"
                    :on-success="handleSuccess">
                    <el-button style="position: relative;top: -4px;" class="uploadFile" slot="trigger" size="small"
                      type="primary" :disabled="currentStep !== 0">附件上传
                    </el-button>
                  </el-upload>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="下环节负责人:" prop="submitNextPesponsible"
                  :rules="[{ required: currentStep === 0, message: '请输入下环节负责人', trigger: 'change' }]">
                  <el-select v-model="form.submitNextPesponsible" placeholder="请选择下环节负责人" size="small"
                    style="width: 100%" :disabled="currentStep !== 0">
                    <el-option v-for="(v, i) in users" :label="v.name" :value="v.name" :key="i"></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>
          </el-card>
          <el-row style="margin-top: 1em;">
            <el-col :span="4">
              操作人:{{ form.submitOperatingPersonnel }}
            </el-col>
            <el-col :span="6">
              日期:{{ form.submitDate }}
            </el-col>
          </el-row>
        </div>
        <!-- 设备管理员意见 -->
        <div v-show="currentStepClick == 1">
          <el-card style="margin-top: 1em; height: 45vh; overflow-y: scroll;">
            <el-row>
              <el-col :span="24">
                <el-form-item label="维修方式及费用:" prop="methodCost"
                  :rules="[{ required: currentStep === 1, message: '请输入维修方式及费用', trigger: 'blur' }]">
                  <el-input v-model="form.methodCost" type="textarea" size="small"
                    :disabled="currentStep !== 1"></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="24">
                <el-form-item label="审核意见:" prop="adminAuditOption"
                  :rules="[{ required: currentStep === 1, message: '请输入审核意见', trigger: 'blur' }]">
                  <el-input v-model="form.adminAuditOption" type="textarea" size="small"
                    :disabled="currentStep !== 1"></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="下环节负责人:" prop="adminNextPesponsible"
                  :rules="[{ required: currentStep === 1, message: '请输入下环节负责人', trigger: 'change' }]">
                  <el-select v-model="form.adminNextPesponsible" placeholder="请选择下环节负责人" size="small"
                    style="width: 100%" :disabled="currentStep !== 1">
                    <el-option v-for="(v, i) in users" :label="v.name" :value="v.name" :key="i"></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>
          </el-card>
          <el-row style="margin-top: 1em;">
            <el-col :span="4">
              操作人:{{ form.adminOperatingPersonnel }}
            </el-col>
            <el-col :span="6">
              日期:{{ form.adminDate }}
            </el-col>
          </el-row>
        </div>
        <!-- 技术负责人意见 -->
        <div v-show="currentStepClick == 2">
          <el-card style="margin-top: 1em; height: 45vh; overflow-y: scroll;">
            <el-row>
              <el-col :span="24">
                <el-form-item label="审核意见:" prop="technicalAuditOption"
                  :rules="[{ required: currentStep === 2, message: '请输入审核意见', trigger: 'blur' }]">
                  <el-input v-model="form.technicalAuditOption" type="textarea" size="small"
                    :disabled="currentStep !== 2"></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="下环节负责人:" prop="technicalNextPesponsible"
                  :rules="[{ required: currentStep === 2, message: '请输入下环节负责人', trigger: 'change' }]">
                  <el-select v-model="form.technicalNextPesponsible" placeholder="请选择下环节负责人" size="small"
                    style="width: 100%" :disabled="currentStep !== 2">
                    <el-option v-for="(v, i) in users" :label="v.name" :value="v.name" :key="i"></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>
          </el-card>
          <el-row style="margin-top: 1em;">
            <el-col :span="4">
              操作人:{{ form.technicalOperatingPersonnel }}
            </el-col>
            <el-col :span="6">
              日期:{{ form.technicalDate }}
            </el-col>
          </el-row>
        </div>
        <!-- 维修情况记录 -->
        <div v-show="currentStepClick == 3">
          <el-card style="margin-top: 1em; height: 45vh; overflow-y: scroll;">
            <el-row>
              <el-col :span="24">
                <el-form-item label="维修情况:" prop="maintainSituation"
                  :rules="[{ required: currentStep === 3, message: '请输入维修情况', trigger: 'blur' }]">
                  <el-input v-model="form.maintainSituation" type="textarea" size="small"
                    :disabled="currentStep !== 3"></el-input>
                </el-form-item>
              </el-col>
              <el-col :span="12">
                <el-form-item label="下环节负责人:" prop="maintainNextPesponsible"
                  :rules="[{ required: currentStep === 3, message: '请输入下环节负责人', trigger: 'change' }]">
                  <el-select v-model="form.maintainNextPesponsible" placeholder="请选择下环节负责人" size="small"
                    style="width: 100%" :disabled="currentStep !== 3">
                    <el-option v-for="(v, i) in users" :label="v.name" :value="v.name" :key="i"></el-option>
                  </el-select>
                </el-form-item>
              </el-col>
            </el-row>
          </el-card>
          <el-row style="margin-top: 1em;">
            <el-col :span="4">
              操作人:{{ form.maintainOperatingPersonnel }}
            </el-col>
            <el-col :span="6">
              日期:{{ form.maintainDate }}
            </el-col>
          </el-row>
        </div>
        <!-- 维修后的确认 -->
        <div v-show="currentStepClick == 4">
          <el-card style="margin-top: 1em; height: 45vh; overflow-y: scroll;">
            <el-row>
              <el-col :span="24">
                <el-form-item label="验收、确认、校准情况:" prop="checkCalSituation" label-width="200"
                  :rules="[{ required: currentStep === 4, message: '请输入验收、确认、校准情况', trigger: 'blur' }]">
                  <el-input v-model="form.checkCalSituation" type="textarea" size="small" style="width: 100%"
                    :disabled="currentStep !== 4"></el-input>
                </el-form-item>
              </el-col>
            </el-row>
          </el-card>
          <el-row style="margin-top: 1em;">
            <el-col :span="4">
              操作人:{{ form.afterMaintenanceOperatingPersonnel }}
            </el-col>
            <el-col :span="6">
              日期:{{ form.afterMaintenanceDate }}
            </el-col>
          </el-row>
        </div>
      </el-form>
      <span slot="footer" class="dialog-footer">
        <el-button @click="submitForm('3reject')" v-if="currentStep !== 0 && currentStep !== 5"
          :loading="sumbitLoading1">驳回</el-button>
        <el-button @click="submitForm('2save')" v-if="currentStep === 0" :loading="sumbitLoading2">保存</el-button>
        <el-button type="primary" v-if="currentStep !== 5" @click="submitForm('1submit')" :loading="sumbitLoading3">
          {{ currentStep === 0 ? '提交' : '通过' }}
        </el-button>
      </span>
    </el-dialog>
  </div>
</template>
 
<script>
import { dateFormat } from '@/utils/date'
import { mapGetters } from "vuex";
export default {
  props: {
    clickNodeVal: {
      type: Object,
      default: () => {
      }
    }
  },
  data() {
    return {
      search: {
        size: 20,
        current: 1,
        total: 0,
        processNumber: ''
      },
      users: [],
      currentStep: 0,
      currentStepClick: 0,
      steps: ['提交', '设备管理员意见', '技术负责人意见', '维修情况记录', '维修后的确认'],
      outLoading: false,
      form: {},
      faultParam: [],
      dialogVisible: false,
      sumbitLoading1: false,
      sumbitLoading2: false,
      sumbitLoading3: false,
    }
  },
  computed: {
    ...mapGetters(["nickName"]),
    action() {
      return this.javaApi + this.$api.personnel.saveCNASFile
    }
  },
  mounted() {
    this.getTableList(this.clickNodeVal.value)
  },
  methods: {
    //要求修复日期:禁用在故障日期前的日期
    disabledDate(time) {
      let selectDate = this.form.faultDate
      if (selectDate) {
        let selectTime = new Date(selectDate).getTime() - 28800000
        return time < selectTime
      }
      return false
    },
    //提交表单
    async submitForm(saveState) {
      let currentStepAction;
      // 设置该操作判断是否为提交,保存,驳回,通过 开启loding
      switch (saveState) {
        // 提交,通过
        case '1submit':
          currentStepAction = this.currentStep + 1
          this.sumbitLoading1 = true
          break
        // 保存
        case '2save':
          currentStepAction = this.currentStep
          this.sumbitLoading2 = true
          break
        // 驳回
        case '3reject':
          currentStepAction = this.currentStep - 1
          this.sumbitLoading3 = true
          break
        default:
          break
      }
      this.$refs.form.validate((valid) => {
        if (valid === true || saveState !== '1submit') {
          // 给当前环节设置创建人与时间
          const dateTime = dateFormat(new Date())
          // 获取当前环节操作人与日期
          switch (this.currentStep) {
            case 0:
              this.form.submitUser = this.nickName
              this.form.submitOperatingPersonnel = this.nickName
              this.form.submitDate = dateTime
              break
            case 1:
              this.form.adminOperatingPersonnel = this.nickName
              this.form.adminDate = dateTime
              break
            case 2:
              this.form.technicalOperatingPersonnel = this.nickName
              this.form.technicalDate = dateTime
              break
            case 3:
              this.form.maintainOperatingPersonnel = this.nickName
              this.form.maintainDate = dateTime
              break
            case 4:
              this.form.afterMaintenanceOperatingPersonnel = this.nickName
              this.form.afterMaintenanceDate = dateTime
              break
            default:
              break
          }
          // 获取当前环节负责人
          switch (saveState === '3reject' ? this.currentStep - 1 : this.currentStep) {
            case 0:
              this.form.currentResponsible = this.form.submitOperatingPersonnel
              break
            case 1:
              this.form.currentResponsible = this.form.departmentOperatingPersonnel
              break
            case 2:
              this.form.currentResponsible = this.form.measuringRoomOperatingPersonnel
              break
            case 3:
              this.form.currentResponsible = this.form.approvalOperatingPersonnel
              break
            default:
              break
          }
          // 获取当前状态
          this.form.currentState = currentStepAction === 5 ? '关闭' : this.steps[currentStepAction]
          this.form.deviceId = this.clickNodeVal.value
          this.$axios.post(this.$api.deviceCheck.addOrUpdateDeviceFaultOne, this.form, {
            headers: {
              'Content-Type': 'application/json'
            }
          }).then(res => {
            if (res.code == 200) {
              this.$message.success('提交成功')
              this.getTableList(this.clickNodeVal.value)
              this.dialogVisible = false
            }
            this.closeLoading()
          })
        } else {
          let step = this.steps[this.currentStep]
          this.$message.warning(step + '  流程中有必填项未填!');
          this.closeLoading()
        }
      });
    },
    closeLoading() {
      this.sumbitLoading1 = false
      this.sumbitLoading2 = false
      this.sumbitLoading3 = false
    },
    openRecordAcceptance() {
      // 获取设备基础信息
      this.$axios.get(this.$api.deviceScope.selectDeviceByCode + '?id=' + this.clickNodeVal.value).then(res => {
        this.form.deviceName = res.data.deviceName
        this.form.manufacturer = res.data.manufacturer
        this.form.specificationModel = res.data.specificationModel
        this.form.managementNumber = res.data.managementNumber
      });
      // 获取负责人信息
      this.getUserList()
    },
    // 获取负责人信息接口
    getUserList() {
      this.$axios.get(this.$api.deviceScope.selectUserList).then(res => {
        if (res.code == 200) {
          this.users = res.data
        }
      })
    },
    handleSizeChange(val) {
      this.search.size = val
      this.getTableList(this.clickNodeVal.value);
    },
    handleCurrentChange(val) {
      this.search.current = val
      this.getTableList(this.clickNodeVal.value);
    },
    deleteFile() {
      this.$confirm('此操作将永久删除该文件, 是否继续?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        this.$axios.delete(this.$api.personnel.deleteCNASFile + "?fileName=" + this.form.systemFileName).then(res => {
          if (res.code == 200) {
            this.$message.success('删除成功!')
          }
        })
      }).catch(() => {
        this.$message({
          type: 'info',
          message: '已取消删除'
        });
      });
    },
    choiceStep(index) {
      this.currentStepClick = index
    },
    //文档
    handleSuccess(response, file, fileList) {
      if (response.code == 200) {
        this.form.fileName = response.data
        this.$message.success('上传成功')
      } else {
        this.$message.error(response.message)
      }
    },
    onError(error, file, fileList) {
      // 文件上传失败时的处理逻辑
      this.$message.error('上传失败')
      this.$refs.upload.clearFiles()
    },
    beforeUpload(file) {
      if (file.size > 1024 * 1024 * 10) {
        this.$message.error('上传文件不超过10M');
        this.$refs.upload.clearFiles()
        return false;
      } else {
        return true;
      }
    },
    resetSearch() {
      this.search = {
        size: 20,
        current: 1,
        total: 0,
        processNumber: '',
      }
      this.getTableList(this.clickNodeVal.value);
    },
    //获取所有信息
    getTableList(deviceId) {
      this.$axios.get(this.$api.deviceCheck.deviceFaultOnePage + '?deviceId=' + deviceId + "&size=" + this.search.size + "&current=" + this.search.current + "&processNumber=" + this.search.processNumber).then(res => {
        if (res.code == 200) {
          this.faultParam = res.data.records
          this.search.total = res.data.total
        }
      })
    },
    //导出
    handleDown() {
      this.outLoading = true
      this.$axios.post(this.$api.deviceCheck.exportRewardAndPunishmentRecords, {
        deviceId: this.clickNodeVal.value
      }, { responseType: "blob" }).then(res => {
        this.outLoading = false
        this.$message.success('导出成功')
        const blob = new Blob([res], { type: 'application/octet-stream' });
        const url = URL.createObjectURL(blob);
        const link = document.createElement('a');
        link.href = url;
        link.download = '设备故障表.xlsx';
        link.click();
      }).finally(() => {
        this.outLoading = false
      })
    },
    selectAllByOne(row) {
      this.dialogVisible = true;
      this.formData = this.HaveJson(row);
    },
    //添加记录按钮
    addRecode() {
      this.currentStep = 0;
      this.currentStepClick = 0;
    },
    //查看详情
    showDetailsDialog(row) {
      this.form = { ...row }
      this.currentStep = this.steps.indexOf(this.form.currentState) === -1 ? 5 : this.steps.indexOf(this.form.currentState)
      this.currentStepClick = this.currentStep === 5 ? 0 : this.currentStep
      this.$nextTick(() => {
        this.$refs['form'].clearValidate()
      })
      this.dialogVisible = true
    },
    //删除操作
    handleDeleteClick(index, row) {
      this.$confirm('此操作将永久删除该数据, 是否继续?', '提示', {
        confirmButtonText: '确定',
        cancelButtonText: '取消',
        type: 'warning'
      }).then(() => {
        this.$axios.delete(this.$api.deviceCheck.deleteDeviceFaultOne + '?id=' + row.id).then(res => {
          if (res.code == 200) {
            this.$message.success('删除成功')
            this.getTableList(this.clickNodeVal.value)
          }
        })
      }).catch(() => {
        this.$message({
          type: 'info',
          message: '已取消删除'
        });
      });
    },
  },
  watch: {
    // 监听点击el-tree的数据,进行数据刷新
    clickNodeVal(newVal) {
      if (newVal.value) {
        this.getTableList(newVal.value);
      }
    },
    dialogVisible(newVal) {
      if (!newVal) {
        this.form = {}
        this.closeLoading()
        this.currentStep = 0 // 步骤条显示第几步
        this.currentStepClick = 0 // 点击步骤条变化
        this.$refs['form'].clearValidate()
      }
    }
  }
}
</script>
 
<style scoped>
h4 {
  font-weight: 400;
  font-size: 16px;
  /* display: flex;
  justify-content: space-between; */
  margin: 10px 0;
}
 
/*
保存提交按钮样式
*/
h4 .title {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
 
h4 .title .line {
  display: inline-block;
  width: 3px;
  height: 16px;
  background: #3A7BFA;
  margin-right: 4px;
}
 
.tables {
  width: 100%;
  height: calc(100vh - 230px);
}
 
.el-from {
  max-width: 400px;
  margin: 0 auto;
}
 
.form-row {
  display: flex;
  justify-content: space-between;
}
 
.dialogBottom {
  margin-top: 14px;
  display: flex;
  justify-content: space-between;
}
 
.form-operation {
  display: flex;
  justify-content: center;
}
 
.form-item {
  display: flex;
  margin-right: 100px;
}
 
.label {
  margin-right: 20px;
  line-height: 40px;
}
 
.value {
  font-weight: normal;
  line-height: 40px;
}
 
.form-row .el-form-item {
  flex: 1;
  /* 每个表单项占据相同比例的空间 */
  margin-right: 100px;
  /* 可选:为右侧元素添加间距 */
}
 
.search {
  background-color: #fff;
  height: 40px;
  display: flex;
  align-items: center;
  position: relative;
}
 
.search_thing {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 40px;
}
 
.search_label {
  width: 70px;
  font-size: 14px;
  text-align: right;
}
 
.search_input {
  width: calc(100% - 120px);
}
 
.btns {
  position: absolute;
  right: 0px;
  top: 50%;
  transform: translate(0, -50%);
}
 
.form .search_label {
  width: 120px;
}
</style>