Quellcode durchsuchen

终端管理页面

chenxr3 vor 4 Jahren
Ursprung
Commit
41cfbdbfac

+ 3 - 1
ebc-middle-platform/src/conf/services.js

190
    RESCUE_LOG: '/rescue/queryPageRescueLog' // // 查询历史报警信息
190
    RESCUE_LOG: '/rescue/queryPageRescueLog' // // 查询历史报警信息
191
  },
191
  },
192
  workEmployee: {
192
  workEmployee: {
193
    GET_JOB_POSTION: '/workEmployee/queryJobPositionList', // 查询人员信息
193
    GET_WORK_EMPLOYEE: '/workEmployee/queryWorkEmployee', // 查询人员信息
194
    GET_WORK_EMPLOYEE: '/workEmployee/queryWorkEmployee', // 查询人员信息
194
    GET_ALL_ORGANIZE: '/workEmployee/queryAllOrganize', // 查询部门信息
195
    GET_ALL_ORGANIZE: '/workEmployee/queryAllOrganize', // 查询部门信息
195
    ADD_WORK_EMPLOYEE: '/workEmployee/createWorkEmployee' // 新增人员信息
196
    ADD_WORK_EMPLOYEE: '/workEmployee/createWorkEmployee', // 新增人员信息
197
    UPD_WORK_EMPLOYEE: '/workEmployee/modifyWorkEmployee' // 修改人员信息
196
  }
198
  }
197
}
199
}

+ 124 - 100
ebc-middle-platform/src/modules/system-management/terminal-management.vue

6
          <div class="label">绑定状态:</div>
6
          <div class="label">绑定状态:</div>
7
          <div class="input-rule">
7
          <div class="input-rule">
8
            <t-select v-model="queryCondition.isBindDevice" placeholder="请选择...">
8
            <t-select v-model="queryCondition.isBindDevice" placeholder="请选择...">
9
              <t-option value="0">全部</t-option>
10
              <t-option value="1">已绑定</t-option>
9
              <t-option value="1">已绑定</t-option>
11
              <t-option value="2">未绑定</t-option>
10
              <t-option value="2">未绑定</t-option>
12
            </t-select>
11
            </t-select>
16
          <div class="label">终端类型:</div>
15
          <div class="label">终端类型:</div>
17
          <div class="input-rule">
16
          <div class="input-rule">
18
            <t-select v-model="queryCondition.type" placeholder="请选择...">
17
            <t-select v-model="queryCondition.type" placeholder="请选择...">
19
              <t-option v-for="(item, index) in deviceTypes" :key="index" :value="item.code">{{ item.value }}</t-option>
18
              <t-option v-for="(item, index) in deviceTypes" :key="index" :value="item.deviceTypeId">{{ item.deviceTypeName }}</t-option>
20
            </t-select>
19
            </t-select>
21
          </div>
20
          </div>
22
        </div>
21
        </div>
43
      </div>
42
      </div>
44
    </div>
43
    </div>
45
    <div>
44
    <div>
46
      <t-table :data="table.data" @selection-change="handleSelectionChange">
45
      <t-table :data="table.data" :loading="tableLoading" @selection-change="handleSelectionChange">
47
        <t-table-column type="selection" width="70"></t-table-column>
46
        <t-table-column type="selection" width="70"></t-table-column>
48
        <t-table-column prop="deviceTypeName" label="终端类型"></t-table-column>
47
        <t-table-column prop="deviceTypeName" label="终端类型"></t-table-column>
49
        <t-table-column prop="deviceNo" label="终端编号"></t-table-column>
48
        <t-table-column prop="deviceNo" label="终端编号"></t-table-column>
50
        <t-table-column prop="bindName" label="关联用户/船舶"></t-table-column>
49
        <t-table-column prop="bindName" label="关联用户/船舶"></t-table-column>
51
        <t-table-column prop="remarks" label="备注"></t-table-column>
50
        <t-table-column prop="remarks" label="备注"></t-table-column>
52
        <t-table-column
51
        <t-table-column
53
            fixed="right"
54
            label="操作"
55
            width="220"
52
          fixed="right"
53
          label="操作"
54
          width="220"
56
        >
55
        >
57
          <template slot-scope="scope">
56
          <template slot-scope="scope">
58
            <a href="javascript:void(0)" size="sm" @click="() => handleClickUser(scope.row)">关联</a>
57
            <a href="javascript:void(0)" size="sm" @click="() => handleClickUser(scope.row)">关联</a>
75
      <t-form ref="formValidate" :model="formValidate" :rules="ruleValidate" :label-width="80" label-position="left">
74
      <t-form ref="formValidate" :model="formValidate" :rules="ruleValidate" :label-width="80" label-position="left">
76
        <t-form-item label="终端类型" prop="type">
75
        <t-form-item label="终端类型" prop="type">
77
          <t-select v-model="formValidate.type" label-in-value placeholder="请选择...">
76
          <t-select v-model="formValidate.type" label-in-value placeholder="请选择...">
78
            <t-option v-for="(item, index) in deviceTypes" :key="index" :value="item.code">{{ item.value }}</t-option>
77
            <t-option v-for="(item, index) in deviceTypes" :key="index" :value="item.deviceTypeId">{{ item.deviceTypeName }}</t-option>
79
          </t-select>
78
          </t-select>
80
        </t-form-item>
79
        </t-form-item>
81
        <t-form-item label="终端编号" prop="number">
80
        <t-form-item label="终端编号" prop="number">
83
        </t-form-item>
82
        </t-form-item>
84
        <t-form-item label="备注" prop="desc">
83
        <t-form-item label="备注" prop="desc">
85
          <t-input
84
          <t-input
86
              v-model="formValidate.desc"
87
              :autosize="{minRows: 2,maxRows: 5}"
88
              type="textarea"
89
              placeholder="请输入..."
85
            v-model="formValidate.desc"
86
            :autosize="{minRows: 2,maxRows: 5}"
87
            type="textarea"
88
            placeholder="请输入..."
90
          ></t-input>
89
          ></t-input>
91
        </t-form-item>
90
        </t-form-item>
92
      </t-form>
91
      </t-form>
105
        </t-form-item>
104
        </t-form-item>
106
        <t-form-item label="备注" prop="desc">
105
        <t-form-item label="备注" prop="desc">
107
          <t-input
106
          <t-input
108
              v-model="updateFormValidate.desc"
109
              :autosize="{minRows: 2,maxRows: 5}"
110
              type="textarea"
111
              placeholder="请输入..."
107
            v-model="updateFormValidate.desc"
108
            :autosize="{minRows: 2,maxRows: 5}"
109
            type="textarea"
110
            placeholder="请输入..."
112
          ></t-input>
111
          ></t-input>
113
        </t-form-item>
112
        </t-form-item>
114
      </t-form>
113
      </t-form>
128
              <t-radio v-for="(item,index) in radioList" :value="item.value" :key="index" :label="item.label"></t-radio>
127
              <t-radio v-for="(item,index) in radioList" :value="item.value" :key="index" :label="item.label"></t-radio>
129
            </t-radio-group>
128
            </t-radio-group>
130
          </t-form-item>
129
          </t-form-item>
131
          <t-form-item v-for="(item,index) in itemList" v-show="item.isShow" :key="index" :label="connectName" prop="user">
130
          <t-form-item v-for="(item,index) in itemList" v-if="item.isShow" :key="index" :label="connectName" prop="user">
132
            <div class="row">
131
            <div class="row">
133
              <div class="col-9">
132
              <div class="col-9">
134
                <t-select v-model="relevanceValidate.user"
133
                <t-select v-model="relevanceValidate.user"
135
                          :loading.sync="currentLoading"
136
                          placeholder="请选择"
134
                          placeholder="请选择"
137
                          filterable
135
                          filterable
138
                          clearable
136
                          clearable
139
                          @load="$_onLoad"
140
                >
137
                >
141
                  <t-option v-for="(todo,index) in item.goList" :key="index" :value="todo">{{ todo.name }}({{ todo.code }})</t-option>
138
                  <t-option v-for="(todo,index) in item.goList" :key="index" :value="todo">{{ todo.name }}({{ todo.code }})</t-option>
142
                </t-select>
139
                </t-select>
162
      </div>
159
      </div>
163
      <div slot="footer">
160
      <div slot="footer">
164
        <t-button @click="cancelUserModal">取消</t-button>
161
        <t-button @click="cancelUserModal">取消</t-button>
165
        <t-button color="primary" @click="confirmUserModal">确定</t-button>
162
        <t-button :loading="loading" color="primary" @click="confirmUserModal">确定</t-button>
166
      </div>
163
      </div>
167
    </t-modal>
164
    </t-modal>
165
    <t-loading v-model="fullLoading" fullscreen tip="加载中...."></t-loading>
168
  </div>
166
  </div>
169
</template>
167
</template>
170
<script>
168
<script>
204
        }
202
        }
205
      },
203
      },
206
      queryCondition: {
204
      queryCondition: {
207
        isBindDevice: '0',
205
        isBindDevice: '',
208
        type: '',
206
        type: '',
209
        deviceNo: ''
207
        deviceNo: ''
210
      },
208
      },
211
      deviceTypes: [],
209
      deviceTypes: [],
212
      selections: [],
210
      selections: [],
211
      loading: false,
213
      currentLoading: false,
212
      currentLoading: false,
214
      connectName: '关联用户',
213
      connectName: '关联用户',
215
      rangeDate: '',
214
      rangeDate: '',
216
      modal: false,
215
      modal: false,
217
      updateModal: false,
216
      updateModal: false,
217
      tableLoading: true,
218
      fullLoading: false,
218
      updateFormValidate: {
219
      updateFormValidate: {
219
        number: '',
220
        number: '',
220
        type: '',
221
        type: '',
266
              }
267
              }
267
            }
268
            }
268
          }
269
          }
269
        ],
270
        ]
270
      },
271
      },
271
      relevance: false,
272
      relevance: false,
272
      relevanceValidate: {
273
      relevanceValidate: {
303
  },
304
  },
304
  methods: {
305
  methods: {
305
    getList() {
306
    getList() {
307
      this.tableLoading = true
308
      this.table.data = []
306
      this.$test.post(services.device.GET_DEVICE, {
309
      this.$test.post(services.device.GET_DEVICE, {
307
        pageNumber: this.table.pager.currentPage,
310
        pageNumber: this.table.pager.currentPage,
308
        pageSize: this.table.pager.size,
311
        pageSize: this.table.pager.size,
309
        IsBindDevice: this.queryCondition.isBindDevice,
310
        deviceNo: this.queryCondition.deviceNo,
311
        deviceTypeId: this.queryCondition.type
312
        data: {
313
          IsBindDevice: this.queryCondition.isBindDevice,
314
          deviceNo: this.queryCondition.deviceNo,
315
          deviceTypeId: this.queryCondition.type
316
        }
312
      }).then(res => {
317
      }).then(res => {
313
        // 请求成功处理...
318
        // 请求成功处理...
319
        this.tableLoading = false
314
        this.table.data = res.data.dataList
320
        this.table.data = res.data.dataList
315
        this.table.pager.total = res.data.dataNum
321
        this.table.pager.total = res.data.dataNum
316
      }).catch(res => {
322
      }).catch(res => {
317
        // 请求失败处理...
323
        // 请求失败处理...
324
        this.tableLoading = false
318
      })
325
      })
319
    },
326
    },
320
    initItemList(name) { // 获取人员和设备的数据
327
    initItemList(name) { // 获取人员和设备的数据
321
      this.$test.post(services.device.GET_ASSOCIATINFO, {bindType: '1', name:name} // 查询人员
328
      this.$test.post(services.device.GET_ASSOCIATINFO, {bindType: '1', name: name} // 查询人员
322
      ).then(res => {
329
      ).then(res => {
323
        // 请求成功处理...
330
        // 请求成功处理...
324
        this.currentLoading = false
331
        this.currentLoading = false
326
      }).catch(res => {
333
      }).catch(res => {
327
        // 请求失败处理...
334
        // 请求失败处理...
328
      })
335
      })
329
      this.$test.post(services.device.GET_ASSOCIATINFO, {bindType: '2', name:name} // 查询设备
336
      this.$test.post(services.device.GET_ASSOCIATINFO, {bindType: '2', name: name} // 查询设备
330
      ).then(res => {
337
      ).then(res => {
331
        // 请求成功处理...
338
        // 请求成功处理...
332
        this.currentLoading = false
339
        this.currentLoading = false
354
      this.initItemList(filterValue)
361
      this.initItemList(filterValue)
355
    },
362
    },
356
    cancelUserModal() {
363
    cancelUserModal() {
357
      this.relevance = false
358
      this.$refs['relevanceValidate'].resetFields()
364
      this.$refs['relevanceValidate'].resetFields()
365
      this.itemList.forEach(e => {
366
        e.isShow = false
367
      })
368
      this.relevance = false
359
    },
369
    },
360
    confirmUserModal() { // 绑定操作提交
370
    confirmUserModal() { // 绑定操作提交
371
      var that = this
361
      this.$refs['relevanceValidate'].validate(valid => {
372
      this.$refs['relevanceValidate'].validate(valid => {
362
        if (valid) {
373
        if (valid) {
363
          var params = new FormData()
364
          if (this.relevanceValidate.type === '1') {
365
            params.append('data', JSON.stringify({
366
              type: '1',
367
              PARTY_TYPE: 1,
368
              PARTY_CODE: this.relevanceValidate.user.employeeNo,
369
              PARTY_TERMINAL_ID: this.relevanceValidate.PARTY_TERMINAL_ID,
370
              PARTY_NAME: this.relevanceValidate.user.userName,
371
              PARTY_POST: this.relevanceValidate.user.duty,
372
              DEVICE_ID: this.relevanceValidate.id
373
            }))
374
          this.loading = true
375
          var id = ''
376
          if (that.relevanceValidate.type === '1') {
377
            id = that.relevanceValidate.user.id
374
          } else {
378
          } else {
375
            params.append('data', JSON.stringify({
376
              type: '2',
377
              FACILITY_ID: this.relevanceValidate.user.id,
378
              DEVICE_ID: this.relevanceValidate.id
379
            }))
379
            id = that.relevanceValidate.user.id
380
          }
381
          that.fullLoading = true
382
          that.$test.post(services.device.BIND_DEVICE, {
383
            bindType: this.relevanceValidate.type,
384
            deviceId: this.relevanceValidate.id,
385
            associatedId: id
380
          }
386
          }
381
          this.$test.post(services.device.BIND_DEVICE, params
382
          ).then(res => {
387
          ).then(res => {
383
            // 请求成功处理...
388
            // 请求成功处理...
389
            this.fullLoading = false
384
            if (res.data.result) {
390
            if (res.data.result) {
385
              this.relevance = false
391
              this.relevance = false
392
              this.loading = false
386
              this.$Message.success('提交成功!')
393
              this.$Message.success('提交成功!')
387
              this.getList()
394
              this.getList()
388
            }
395
            }
389
          }).catch(res => {
396
          }).catch(res => {
390
            // 请求失败处理...
397
            // 请求失败处理...
398
            this.loading = false
399
            this.fullLoading = false
391
          })
400
          })
392
        }
401
        }
393
      })
402
      })
414
      })
423
      })
415
    },
424
    },
416
    onReset() {
425
    onReset() {
417
      this.queryCondition.isBindDevice = 0
426
      this.queryCondition.isBindDevice = ''
418
      this.queryCondition.type = ''
427
      this.queryCondition.type = ''
419
      this.queryCondition.deviceNo = ''
428
      this.queryCondition.deviceNo = ''
420
      this.onSearch()
429
      this.onSearch()
447
      var that = this
456
      var that = this
448
      this.$refs.formValidate.validate(valid => {
457
      this.$refs.formValidate.validate(valid => {
449
        if (valid) {
458
        if (valid) {
450
          debugger
459
          that.fullLoading = true
451
          that.$test.post(services.device.ADD_DEVICE, {
460
          that.$test.post(services.device.ADD_DEVICE, {
452
            deviceTypeId: that.formValidate.type.value,
461
            deviceTypeId: that.formValidate.type.value,
453
            deviceTypeName: that.formValidate.type.label,
462
            deviceTypeName: that.formValidate.type.label,
455
            remarks: that.formValidate.desc
464
            remarks: that.formValidate.desc
456
          }).then(res => {
465
          }).then(res => {
457
            // 请求成功处理...
466
            // 请求成功处理...
467
            that.fullLoading = false
458
            if (res.data.result) {
468
            if (res.data.result) {
459
              that.$Message.success('提交成功!')
469
              that.$Message.success('提交成功!')
460
              that.cancel()
470
              that.cancel()
461
              this.getList()
471
              that.getList()
462
            } else {
472
            } else {
463
              this.$Message.danger(res.data.errMsg)
473
              that.$Message.danger(res.data.errMsg)
464
            }
474
            }
465
          }).catch(res => {
475
          }).catch(res => {
466
            // 请求失败处理...
476
            // 请求失败处理...
471
      })
481
      })
472
    },
482
    },
473
    updateSubmit() { // 编辑提交
483
    updateSubmit() { // 编辑提交
484
      this.fullLoading = true
474
      this.$test.post(services.device.UPD_DEVICE, {
485
      this.$test.post(services.device.UPD_DEVICE, {
475
        deviceId: this.updateFormValidate.id,
486
        deviceId: this.updateFormValidate.id,
476
        deviceTypeName: this.updateFormValidate.type,
487
        deviceTypeName: this.updateFormValidate.type,
478
        remarks: this.updateFormValidate.desc
489
        remarks: this.updateFormValidate.desc
479
      }).then(res => {
490
      }).then(res => {
480
        // 请求成功处理...
491
        // 请求成功处理...
492
        this.fullLoading = false
481
        if (res.data.result) {
493
        if (res.data.result) {
482
          this.$Message.success('提交成功!')
494
          this.$Message.success('提交成功!')
483
          this.cancel()
495
          this.cancel()
487
        }
499
        }
488
      }).catch(res => {
500
      }).catch(res => {
489
        // 请求失败处理...
501
        // 请求失败处理...
502
        this.fullLoading = false
490
      })
503
      })
491
    },
504
    },
492
    solution(row) { // 解绑
505
    solution(row) { // 解绑
498
      } else {
511
      } else {
499
        this.$Confirm.confirm({
512
        this.$Confirm.confirm({
500
          title: '确认要解除终端' + row.deviceNo + '和' + row.bindName + '的关联关系吗?',
513
          title: '确认要解除终端' + row.deviceNo + '和' + row.bindName + '的关联关系吗?',
501
          content: '解绑后将不可通过终端' + row.deviceNo + '获取' + row.bindName + '的定位信息',
514
          content: '解绑后将不可通过终端 ' + row.deviceNo + ' 获取 ' + row.bindName + '的定位信息',
502
          ok: () => {
515
          ok: () => {
503
            var params = new FormData()
504
            params.append('data', JSON.stringify({
505
              DEVICE_ID: row.deviceId
506
            }))
507
            // console.log(that.formValidate.desc)
508
            this.$test.post(services.device.UNBIND_DEVICE, params
516
            this.fullLoading = true
517
            this.$test.post(services.device.UNBIND_DEVICE, {deviceId: row.deviceId}
509
            ).then(res => {
518
            ).then(res => {
510
              // 请求成功处理...
519
              // 请求成功处理...
520
              this.fullLoading = false
511
              if (res.data.result) {
521
              if (res.data.result) {
512
                this.$Message.success('解绑成功!')
522
                this.$Message.success('解绑成功!')
513
                this.getList()
523
                this.getList()
516
              }
526
              }
517
            }).catch(res => {
527
            }).catch(res => {
518
              // 请求失败处理...
528
              // 请求失败处理...
529
              this.fullLoading = false
519
            })
530
            })
520
          },
531
          },
521
          cancel: () => {
532
          cancel: () => {
525
      }
536
      }
526
    },
537
    },
527
    toBatchSolution(row) { // 批量解绑
538
    toBatchSolution(row) { // 批量解绑
528
      // if (row.bindName === '--') {
529
      //   this.$Confirm.info({
530
      //     title: '提示',
531
      //     content: '该终端未绑定对象,无需解绑'
532
      //   })
533
      // } else {
534
      //   this.$Confirm.confirm({
535
      //     title: '确认要解除终端' + row.deviceNo + '和' + row.bindName + '的关联关系吗?',
536
      //     content: '解绑后将不可通过终端' + row.deviceNo + '获取' + row.bindName + '的定位信息',
537
      //     ok: () => {
538
      //       var params = new FormData()
539
      //       params.append('data', JSON.stringify({
540
      //         DEVICE_ID: row.deviceId
541
      //       }))
542
      //       // console.log(that.formValidate.desc)
543
      //       this.$test.post(services.device.UNBIND_DEVICE, params
544
      //       ).then(res => {
545
      //         // 请求成功处理...
546
      //         if (res.data.result) {
547
      //           this.$Message.success('解绑成功!')
548
      //           this.getList()
549
      //         } else {
550
      //           this.$Message.danger('解绑失败!')
551
      //         }
552
      //       }).catch(res => {
553
      //         // 请求失败处理...
554
      //       })
555
      //     },
556
      //     cancel: () => {
557
      //       console.log('点击了取消')
558
      //     }
559
      //   })
560
      // }
539
      if (this.selections.length === 0) {
540
        this.$Confirm.info({
541
          title: '提示',
542
          content: '请选中需要删除的终端。'
543
        })
544
      } else {
545
        var deviceId = ''
546
        for (let i = 0; i < this.selections.length; i++) {
547
          deviceId += this.selections[i].deviceId + ','
548
        }
549
        deviceId = deviceId.substring(0, deviceId.length - 1)
550
        this.$Confirm.confirm({
551
          title: '确认要解除选中终端的关联关系吗?',
552
          content: '解绑后将不可通过终端获取定位信息',
553
          ok: () => {
554
            this.fullLoading = true
555
            this.$test.post(services.device.UNBIND_DEVICE, {deviceId: deviceId}
556
            ).then(res => {
557
              // 请求成功处理...
558
              this.fullLoading = false
559
              if (res.data.result) {
560
                this.$Message.success('解绑成功!')
561
                this.getList()
562
              } else {
563
                this.$Message.danger('解绑失败!')
564
              }
565
            }).catch(res => {
566
              // 请求失败处理...
567
              this.fullLoading = false
568
            })
569
          },
570
          cancel: () => {
571
            console.log('点击了取消')
572
          }
573
        })
574
      }
561
    },
575
    },
562
    handleClick(row) {
576
    handleClick(row) {
563
      this.$test.post(services.device.GET_ONE_DEVICE, {deviceId: row.deviceId}
577
      this.$test.post(services.device.GET_ONE_DEVICE, {deviceId: row.deviceId}
589
      this.$test.post(services.device.GET_BIND_DEVICE, {deviceId: row.deviceId}
603
      this.$test.post(services.device.GET_BIND_DEVICE, {deviceId: row.deviceId}
590
      ).then(res => {
604
      ).then(res => {
591
        // 请求成功处理...
605
        // 请求成功处理...
592
        if (res.data.resultData.bindName == '--') {
606
        if (res.data.resultData == null) {
593
          this.relevanceValidate.msgisShow = false
607
          this.relevanceValidate.msgisShow = false
594
          this.relevanceValidate.msg = ''
608
          this.relevanceValidate.msg = ''
595
        } else {
609
        } else {
596
          this.relevanceValidate.msgisShow = true
610
          this.relevanceValidate.msgisShow = true
597
          this.relevanceValidate.msg = '当前终端已关联 ' + res.data.resultData.bindName + ' ,点击保存更改关联关系'
611
          var name = ''
612
          if (res.data.resultData.bindType === '1') {
613
            name = res.data.resultData.name
614
          } else {
615
            name = res.data.resultData.resourceToolName
616
          }
617
          this.relevanceValidate.msg = '当前终端已关联 ' + name + ' ,点击保存更改关联关系'
598
        }
618
        }
599
      }).catch(res => {
619
      }).catch(res => {
600
        // 请求失败处理...
620
        // 请求失败处理...
601
      })
621
      })
602
    },
622
    },
603
    removeD(row) {
623
    removeD(row) {
604
      let that = this
605
      let confirm = {
624
      let confirm = {
606
        title: '请确认',
625
        title: '请确认',
607
        content: '删除后不可恢复,确认删除吗?',
626
        content: '删除后不可恢复,确认删除吗?',
608
        ok: function () {
627
        ok: () => {
628
          this.fullLoading = true
609
          this.$test.post(services.device.DEL_DEVICE, {deviceId: row.deviceId}
629
          this.$test.post(services.device.DEL_DEVICE, {deviceId: row.deviceId}
610
          ).then(res => {
630
          ).then(res => {
611
            // 请求成功处理...
631
            // 请求成功处理...
632
            this.fullLoading = false
612
            if (res.data.result) {
633
            if (res.data.result) {
613
              that.$Message.success('操作成功')
614
              that.getList()
634
              this.$Message.success('操作成功')
635
              this.getList()
615
            } else {
636
            } else {
616
              that.$Message.danger(res.data.errMsg)
637
              this.$Message.danger(res.data.errMsg)
617
            }
638
            }
618
          }).catch(res => {
639
          }).catch(res => {
619
            // 请求失败处理...
640
            // 请求失败处理...
641
            this.fullLoading = false
620
          })
642
          })
621
        }
643
        }
622
      }
644
      }
634
          deviceId += this.selections[i].deviceId + ','
656
          deviceId += this.selections[i].deviceId + ','
635
        }
657
        }
636
        deviceId = deviceId.substring(0, deviceId.length - 1)
658
        deviceId = deviceId.substring(0, deviceId.length - 1)
637
        let that = this
638
        let confirm = {
659
        let confirm = {
639
          title: '请确认',
660
          title: '请确认',
640
          content: '删除后不可恢复,确认删除吗?',
661
          content: '删除后不可恢复,确认删除吗?',
641
          ok: function () {
662
          ok: () => {
663
            this.fullLoading = true
642
            this.$test.post(services.device.DEL_DEVICE, {deviceId: deviceId}
664
            this.$test.post(services.device.DEL_DEVICE, {deviceId: deviceId}
643
            ).then(res => {
665
            ).then(res => {
644
              // 请求成功处理...
666
              // 请求成功处理...
667
              this.fullLoading = false
645
              if (res.data.result) {
668
              if (res.data.result) {
646
                that.$Message.success('操作成功')
647
                that.getList()
669
                this.$Message.success('操作成功')
670
                this.getList()
648
              } else {
671
              } else {
649
                that.$Message.danger(res.data.errMsg)
672
                this.$Message.danger(res.data.errMsg)
650
              }
673
              }
651
            }).catch(res => {
674
            }).catch(res => {
652
              // 请求失败处理...
675
              // 请求失败处理...
676
              this.fullLoading = false
653
            })
677
            })
654
          }
678
          }
655
        }
679
        }