Your Name
2022-08-25 6c6e0514283c7ff3016b845b600186b464e616c4
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
<template>
    <div class="app-container">
        <div class="filter-container">
            <div class="basic_search">
                <span>排查作业类型:</span>
                <el-select class="analyseUnit_box" v-model="listQuery.checkWorkType" placeholder="排查作业类型" filterable clearable>
                    <el-option v-for="item in checkWorkTypeList" :key="item.id" :label="item.name" :value="item.id"></el-option>
                </el-select>
            </div>
            <div class="basic_search">
                <span>排查作业状态:</span>
                <el-select class="analyseUnit_box" v-model="listQuery.checkWorkStatus" placeholder="排查作业状态" filterable clearable>
                    <el-option v-for="item in checkWorkStatusList" :key="item.id" :label="item.name" :value="item.id"></el-option>
                </el-select>
            </div>
            <div class="basic_search">
                <span>部门名称:</span>
                <el-select class="analyseUnit_box" v-model="listQuery.execDepId" placeholder="部门名称" filterable clearable>
                    <el-option v-for="item in departmentList" :key="item.id" :label="item.department" :value="item.id"></el-option>
                </el-select>
            </div>
            <div class="basic_search">
                <span>排查作业名称:</span>
                <el-input class="analyseUnit_box" v-model="listQuery.checkWorkName" placeholder="排查作业名称" clearable> </el-input>
            </div>
            <el-button class="filter-item" style="margin-left: 10px;margin-top: 10px" type="primary" icon="el-icon-refresh" @click="refreshHandle">搜索</el-button>
            <el-button class="filter-item" style="margin-left: 10px;margin-top: 10px" type="primary" icon="el-icon-plus" @click="showAnalyseUnitForm('','新增')">新增</el-button>
        </div>
 
        <div class="table_content">
            <el-table
                v-loading="listLoading"
                :key="tableKey"
                :data="inspectionTaskData"
                border
                fit
                highlight-current-row
                style="width: 100%;"
            >
                <el-table-column type="index" label="序号" width="60" />
                <el-table-column prop="checkWorkName" label="排查名称" show-overflow-tooltip></el-table-column>
                <el-table-column prop="checkWorkType" label="排查类型" show-overflow-tooltip>
                    <template slot-scope="scope">
                        {{ parseNumber(scope.row.checkWorkType, '排查类型') }}
                    </template>
                </el-table-column>
                <el-table-column prop="taskUnitName" label="任务单元" show-overflow-tooltip></el-table-column>
                <el-table-column prop="execDep" label="执行部门" show-overflow-tooltip>
                </el-table-column>
                <el-table-column prop="checkCycle" label="排查周期" show-overflow-tooltip>
                    <template slot-scope="scope">
                        <span>
                            {{ scope.row.checkCycle }}
                        </span>
                        <span>
                            {{ parseNumber(scope.row.checkCycleUnit, '排查周期') }}
                        </span>
                    </template>
                </el-table-column>
                <el-table-column prop="validTime" label="有效时间" show-overflow-tooltip>
                    <template slot-scope="scope">
                        <span>
                            {{ scope.row.validTime }}
                        </span>
                        <span>
                            {{ parseNumber(scope.row.validTimeUnit, '排查周期') }}
                        </span>
                    </template>
                </el-table-column>
                <el-table-column prop="validTime" label="提醒时间" show-overflow-tooltip>
                    <template slot-scope="scope">
                        <span>
                            {{ scope.row.noticeTime }}
                        </span>
                        <span>
                            {{ parseNumber(scope.row.noticeTimeUnit, '排查周期') }}
                        </span>
                    </template>
                </el-table-column>
                <el-table-column prop="createByUserName" label="创建人" show-overflow-tooltip></el-table-column>
                <el-table-column prop="gmtCreate" label="创建时间" show-overflow-tooltip></el-table-column>
                <el-table-column prop="lastEditUserName" label="最后修改人" show-overflow-tooltip></el-table-column>
                <el-table-column prop="gmtModitify" label="最后修改时间" show-overflow-tooltip></el-table-column>
                <el-table-column label="操作" align="center" width="280" class-name="small-padding fixed-width">
                    <template slot-scope="scope">
                        <el-button type="text" @click="showAnalyseUnitForm(scope.row,'编辑')">编辑</el-button>
                        <el-button type="text" style="color: red" @click="deleteById(scope.row)">删除</el-button>
                    </template>
                </el-table-column>
            </el-table>
            <br>
            <el-pagination
                v-show="recordTotal>0"
                :current-page="listQuery.pageIndex"
                :page-sizes="[10, 20, 30, 50]"
                :page-size="listQuery.pageSize"
                :total="recordTotal"
                layout="total, sizes, prev, pager, next, jumper"
                background
                style="float:right;"
                @size-change="handleSizeChange"
                @current-change="handleCurrentChange"
            />
            <br>
        </div>
 
        <el-dialog :title="title" :visible.sync="inspectionTaskVisible" append-to-body :close-on-click-modal="false" width="55%">
 
 
            <el-divider></el-divider>
 
            <div class="inspectionTask_form">
                <el-form ref="inspectionTaskForm" :rules="inspectionTaskFormRules" :model="inspectionTaskForm" label-position="right" label-width="120px">
                    <el-row :gutter="35">
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20">
                            <el-form-item label="排查类型" prop="checkWorkType">
                                <el-select class="analyseUnit_input" v-model="inspectionTaskForm.checkWorkType" placeholder="请输入排查类型" clearable> <el-option v-for="item in checkWorkTypeList" :key="item.id" :label="item.name" :value="item.id"></el-option></el-select>
                            </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20">
                            <el-form-item label="排查名称" prop="checkWorkName">
                                <el-input class="analyseUnit_input" v-model.trim="inspectionTaskForm.checkWorkName" placeholder="请输入排查名称" clearable></el-input>
                            </el-form-item>
                        </el-col>
 
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20">
                            <el-form-item label="排查周期" prop="checkCycle">
                                <el-input class="analyseUnit_input" type="number" v-model.trim="inspectionTaskForm.checkCycle" placeholder="请输入排查周期" clearable></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20">
                            <el-form-item label="时间单位" prop="checkCycleUnit">
                                <el-select class="analyseUnit_input" v-model="inspectionTaskForm.checkCycleUnit" placeholder="请输入时间单位" clearable>
                                    <el-option v-for="item in timeType" :key="item.id" :label="item.name" :value="item.id"></el-option>
                                </el-select>
                            </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20">
                            <el-form-item label="有效时间" prop="validTime">
                                <el-input class="analyseUnit_input" type="number" v-model.trim="inspectionTaskForm.validTime" placeholder="请输入有效时间" clearable></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20">
                            <el-form-item label="时间单位" prop="validTimeUnit">
                                <el-select class="analyseUnit_input" v-model="inspectionTaskForm.validTimeUnit" placeholder="请输入时间单位" clearable>
                                    <el-option v-for="item in timeType" :key="item.id" :label="item.name" :value="item.id"></el-option>
                                </el-select>
                            </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20">
                            <el-form-item label="提醒时间" prop="noticeTime">
                                <el-input class="analyseUnit_input" type="number" v-model.trim="inspectionTaskForm.noticeTime" placeholder="请输入提醒时间" clearable></el-input>
                            </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20">
                            <el-form-item label="时间单位" prop="noticeTimeUnit">
                                <el-select class="analyseUnit_input" v-model="inspectionTaskForm.noticeTimeUnit" placeholder="请输入时间单位" clearable>
                                    <el-option v-for="item in timeType" :key="item.id" :label="item.name" :value="item.id"></el-option>
                                </el-select>
                            </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20">
                            <el-form-item label="执行部门" prop="execDepId">
                                <el-select class="analyseUnit_input" v-model="inspectionTaskForm.execDepId"  clearable filterable   >
                                    <el-option
                                        v-for="item in departmentList"
                                        :key="item.id"
                                        :label="item.department"
                                        :value="item.id"
                                    ></el-option>
                                </el-select>
                            </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20">
                            <el-form-item label="任务单元" prop="taskUnitId">
                                <el-select class="analyseUnit_input" v-model="inspectionTaskForm.taskUnitId" placeholder="请输入任务单元" clearable filterable>
                                    <el-option v-for="item in taskUnitList" :key="item.taskUnitName" :label="item.taskUnitName" :value="item.id"></el-option>
                                </el-select>
                            </el-form-item>
                        </el-col>
                        <el-col :xs="24" :sm="24" :md="24" :lg="24" :xl="12" class="mb20">
                            <el-form-item label="首次任务开始时间" prop="firstStartTime">
                                <el-date-picker class="analyseUnit_input" type="datetime" value-format="yyyy-MM-dd HH:mm:ss" v-model="inspectionTaskForm.firstStartTime" placeholder="请选择首次任务开始时间" clearable></el-date-picker>
                            </el-form-item>
                        </el-col>
                    </el-row>
                </el-form>
            </div>
 
 
 
 
            <div  align="right">
                <el-button @click="inspectionTaskVisible = false">取消</el-button>
                <el-button type="primary" @click="submitAnalyseUnit()">确认</el-button>
            </div>
        </el-dialog>
    </div>
</template>
 
<script>
    import Cookies from "js-cookie";
    import { mapGetters } from 'vuex'
    import { computePageCount } from '@/utils'
    import inspectionPoint from './components/inpectionPoint'
    import {
        getInspectionTask,
        addInspectionTask,
        updateInspectionTask,
        deleteInspectionTask, closeInspectionTask
    } from "../../../../api/inspectionTask";
    import {getAllDepartment, getDepartmentList} from "../../../../api/departmentManage";
    import {safetyInspectionItemName} from "../../../../api/safetySelfInspection";
    import {getAllCheckUnitList} from "../../../../api/checkUnit";
    export default {
        name: 'index',
        filters: {
            parseHours(seconds){
                let arg1 = parseFloat(seconds)
                let arg2 = parseFloat(3600)
                let t1 = 0
                let t2 = 0
                let r1
                let r2
                try {
                    t1 = arg1.toString().split(".")[1].length;
                }catch (e){
 
                }
                try {
                    t2 = arg2.toString().split(".")[1].length;
                }catch (e){
                }
                r1 = Number(arg1.toString().replace(".",""))
                r2 = Number(arg2.toString().replace(".",""))
                return r1/r2*Math.pow(10,t2-t1)
            },
        },
        computed: {
            ...mapGetters([
                'userType'
            ])
        },
        components: {
            inspectionPoint
        },
        data() {
            return {
                tableKey: 0,
                ifShow:true,
                activeName:'inspectionPoint',
                inspectionTaskData: [],
                departmentList:[],
                userList:[],
                // noticeUidList:[],
                execUidList:[],
                statusList:[{name:'任务开启',id:1},{id:2,name:'任务关闭'},{id:3,name:'删除'},{id:4,name:'过期'}],
                intervalSecondsList:[{id:3600,name:'1小时'},{id:7200,name:'2小时'},{id:21600,name:'6小时'},{id:28800,name:'8小时'},{id:43200,name:'12小时'},{id:86400,name:'1天'},{id:17280,name:'2天'},{id:604800,name:'每周'},{id:2592000,name:'每月'},{id:7862400,name:'每季度'}],
                noticeSecondsList:[{id:600,name:'10分'},{id:3600,name:'1小时'},{id:7200,name:'2小时'},{id:21600,name:'6小时'},{id:43200,name:'12小时'},{id:86400,name:'1天'}],
                effectSecondsList:[{id:1800,name:'30分'},{id:3600,name:'1小时'},{id:7200,name:'2小时'},{id:21600,name:'6小时'},{id:43200,name:'12小时'},{id:86400,name:'1天'}],
                typeList:[{id:1,name:'日常检查'},{id:2,name:'周期检查'}],
                listLoading: false,
                pageSize: 10,
                recordTotal: 0,
                currentPage: 1,
                pageTotal: 0,
                title:'',
                company:'',
                code:'',
                // noticeDepartment:'',
                execDepartment:'',
                inspectionTaskVisible:false,
                inspectionTaskFormRules:{
                    checkWorkType: [{ required: true, message: '请填写排查作业类型', trigger: 'change' }],
                    checkWorkName: [{ required: true, message: '请选择排查作业名称', trigger: 'blur' }],
                    taskUnitId: [{ required: true, message: '请选择任务单元', trigger: 'change' }],
                    execUserId: [{ required: true, message: '请选择执行人', trigger: 'change' }],
                    checkCycle: [{ required: true, message: '请填写排查周期', trigger: 'blur' }],
                    checkCycleUnit: [{ required: true, message: '请选择时间单位', trigger: 'change' }],
                    validTime: [{ required: true, message: '请填写有效时间', trigger: 'blur' }],
                    validTimeUnit: [{ required: true, message: '请选择时间单位', trigger: 'change' }],
                    noticeTime: [{ required: true, message: '请填写提醒时间', trigger: 'blur' }],
                    noticeTimeUnit: [{ required: true, message: '请选择时间单位', trigger: 'change' }],
                    firstStartTime: [{ required: true, message: '请填写首次排查任务开始时间', trigger: 'blur' }],
                    depId: [{ required: true, message: '请选择部门', trigger: 'change' }]
                },
                inspectionTaskForm:{
                    checkWorkType: null,
                    checkWorkName: null,
                    taskUnitId: null,
                    execDepId: null,
                    checkCycle: null,
                    checkCycleUnit: null,
                    validTime: null,
                    validTimeUnit: null,
                    noticeTime: null,
                    noticeTimeUnit: null,
                    firstStartTime: null
                },
                listQuery:{
                    checkWorkType: null,
                    checkWorkStatus: null,
                    checkWorkName: null,
                    execDepId: null,
                    pageIndex: 1,
                    pageSize: 10,
 
                },
                checkWorkTypeList: [
                    { id: 1, name: '周期作业' },
                    { id: 2, name: '日常作业' }
                ],
                checkWorkStatusList: [
                    { id: 1, name: '开启' },
                    { id: 2, name: '关闭' }
                ],
                timeType: [
                    { id: 2, name: '小时' },
                    { id: 3, name: '日' },
                    { id: 4, name: '月' },
                    { id: 5, name: '年' }
                ],
                taskUnitList:[],
            }
        },
        created() {
            this.getInspectionTaskData()
            this.getDepartment()
            this.getUser()
            this.getCheckUnitData()
        },
        methods: {
            async getInspectionTaskData(){
                this.listLoading = true
                let res = await getInspectionTask(this.listQuery)
                if(res.data.code === '200'){
                    this.recordTotal = res.data.count
                    this.inspectionTaskData = res.data.data
                }else if(res.data.code === '300'){
                    this.inspectionTaskData = []
                }
                else{
                    this.$message({
                        message:res.data.message,
                        type:'warning'
                    })
                }
                this.listLoading = false
            },
 
            async getCheckUnitData(){
                let res = await getAllCheckUnitList();
                if (res.data.code === '200') {
                    this.taskUnitList = JSON.parse(JSON.stringify(res.data.data));
                } else {
                    this.$message({
                        type: 'warning',
                        message: res.data.msg
                    });
                }
            },
 
            async getDepartment(){
                let res = await getDepartmentList({pageSize:1000,pageIndex:1})
                if(res.data.code === '200'){
                    this.departmentList = res.data.result.result
                }else{
                    this.$message({
                        message:res.data.message,
                        type:'warning'
                    })
                }
            },
            // changeNotice(){
            //     if(this.noticeDepartment === '') {
            //         this.noticeUidList = []
            //         this.inspectionTaskForm.noticeUid = ''
            //     }
            //     this.noticeUidList = this.userList.filter( item => item.department === this.noticeDepartment)
            // },
            changeExec(){
                if(this.execDepartment === '') {
                    this.execUidList = []
                    this.inspectionTaskForm.execUid = ''
                }
                this.execUidList = this.userList.filter ( item => item.departmentname === this.execDepartment)
            },
            async getUser(){
                let res = await safetyInspectionItemName()
                if(res.data.code === '200'){
                    this.userList = res.data.result
                }else{
                    this.$message({
                        message:res.data.message,
                        type:'warning'
                    })
                }
            },
 
            parseNumber(value, type) {
                if (type === '排查类型') {
                    return this.checkWorkTypeList.find((item) => item.id === value).name;
                } else if (type === '排查周期') {
                    return this.timeType.find((item) => item.id == value).name;
                }
            },
 
            showAnalyseUnitForm(value,type){
                this.inspectionTaskVisible = true
                this.$nextTick(() =>{
                    this.$refs["inspectionTaskForm"].clearValidate()
                })
                if(type === '新增'){
                    this.ifShow = false
                    this.title = '新建巡检计划设定'
                    this.inspectionTaskForm = {
                        checkWorkType: null,
                        checkWorkName: null,
                        taskUnitId: null,
                        execDepId: null,
                        checkCycle: null,
                        checkCycleUnit: null,
                        validTime: null,
                        validTimeUnit: null,
                        noticeTime: null,
                        noticeTimeUnit: null,
                        firstStartTime: null
                    }
                }else{
                    this.ifShow = true
                    this.title = '编辑巡检计划设定'
                    // this.noticeDepartment = this.handleDepartment(JSON.parse(JSON.stringify(value)).noticeUid)
                    // this.changeNotice()
                    for( let key in this.inspectionTaskForm){
                        this.inspectionTaskForm[key] = JSON.parse(JSON.stringify(value))[key]
                    }
                    this.inspectionTaskForm.id = JSON.parse(JSON.stringify(value)).id
                }
            },
            handleDepartment(value){
                let department = ''
                for(let i in this.userList){
                    if(this.userList[i].id === value){
                        department = this.userList[i].departmentname
                    }
                }
                department = this.departmentList.find(item => item.department === department)
                return department.department
            },
            submitAnalyseUnit(){
                this.$refs["inspectionTaskForm"].validate((valid) =>{
                    if(valid){
                            if(this.title === '新建巡检计划设定'){
                                addInspectionTask(this.inspectionTaskForm).then((res)=>{
                                    if(res.data.code === '200'){
                                        this.inspectionTaskVisible = false
                                        this.getInspectionTaskData()
                                        this.$notify({
                                            type:'success',
                                            duration:2000,
                                            message:'新增成功',
                                            title:'成功'
                                        })
                                    }else{
                                        this.$message({
                                            type:'warning',
                                            message:res.data.message
                                        })
                                    }
                                })
                            }else{
                                updateInspectionTask(this.inspectionTaskForm).then((res)=>{
                                    if(res.data.code === '200'){
                                        this.inspectionTaskVisible = false
                                        this.getInspectionTaskData()
                                        this.$notify({
                                            type:'success',
                                            duration:2000,
                                            title:'成功',
                                            message:'编辑成功'
                                        })
                                    }else{
                                        this.$message({
                                            type:'warning',
                                            message:res.data.message
                                        })
                                    }
                                })
                            }
 
                    }else{
                        this.$message({
                            type:'warning',
                            message:'请完善基本信息'
                        })
                    }
                })
 
            },
            justifyTime(time,interval) {
                let timeStr = new Date(time.replace(/-/g,'/'))
                let date = parseInt(timeStr.getTime()/1000)
                let newTimeStr = new Date()
                let newDate = parseInt(newTimeStr.getTime()/1000)
                if(date - newDate - interval - 1800 >= 0){
                    return false
                }else{
                    return true
                }
            },
 
            openTask(val,type){
                if(val.status !== 2){
                    this.$message({
                        type:'warning',
                        message:'当前状态不可开启'
                    })
                    return
                }
                this.showAnalyseUnitForm(val,type)
                this.inspectionTaskForm.status = 1
            },
 
            closeTask(val){
                if(val.status !== 1){
                    this.$message({
                        type:'warning',
                        message:'当前状态不可关闭'
                    })
                    return
                }
                this.$confirm('关闭此条任务,是否继续','提示',{
                    confirmButtonText:'确定',
                    cancelButtonText:'取消',
                    type:'warning',
                }).then(()=> {
                    closeInspectionTask(val.workId).then( (res)=>{
                        if(res.data.code === '200'){
                            this.getInspectionTaskData()
                            this.$notify({
                                title:'成功',
                                message:'关闭成功',
                                type:'success',
                                duration:2000,
                            })
                        }else{
                            this.$message({
                                type:'warning',
                                message:res.data.message
                            })
                        }
                    })
                })
            },
 
            deleteById(val){
                this.$confirm('删除此条信息,是否继续','提示',{
                    confirmButtonText:'确定',
                    cancelButtonText:'取消',
                    type:'warning',
                }).then(()=> {
                    deleteInspectionTask({ id: val.id }).then( (res)=>{
                        if(res.data.code === '200'){
                            this.getInspectionTaskData()
                            this.$notify({
                                title:'成功',
                                message:'删除成功',
                                type:'success',
                                duration:2000,
                            })
                        }else{
                            this.$message({
                                type:'warning',
                                message:res.data.message
                            })
                        }
                    })
                })
            },
            receiveToForm(value) {
                this.inspectionTaskForm.riskControlMeasureIdList = []
                this.inspectionTaskForm.riskControlMeasureIdList = value.map( item => {
                    return item.id
                })
                // this.inspectionTaskForm.riskControlMeasureIdList.push({id:value.id})
            },
            refreshHandle(){
                this.getInspectionTaskData()
            },
            handleSizeChange(val){
                this.listQuery.pageSize = val
                this.getInspectionTaskData()
            },
            handleCurrentChange(val){
                this.listQuery.pageIndex = val
                this.getInspectionTaskData()
            },
        }
    }
</script>
<style scoped>
.basic_search{
    display:inline-block;
    padding-bottom: 10px;
    padding-left: 10px;
}
.analyseUnit_input{
    width:90%;
}
.analyseUnit_box{
    width:200px;
}
    /deep/.el-divider--horizontal {
     margin-top: 0px !important;
    }
 
    /deep/.el-dialog__body {
      padding-top: 10px !important;
    }
</style>