Przeglądaj źródła

Merge branch 'master' of http://10.1.235.20:3000/asiainfo/ebc into master

 Conflicts:
	location-rescue-service/src/main/java/com/ai/bss/location/rescue/controller/WorkEmployeeController.java
	location-rescue-service/src/main/java/com/ai/bss/location/rescue/service/interfaces/WorkEmployeeService.java
konghl 4 lat temu
rodzic
commit
33f605d78d

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

148
    GET_ONE_MAP_TAG: '/mapTag/queryOneMapTagInfo', // 查询地图标记信息
148
    GET_ONE_MAP_TAG: '/mapTag/queryOneMapTagInfo', // 查询地图标记信息
149
    ADD_MAP_TAG: '/mapTag/addMapTagInfo', // 新增地图标记信息
149
    ADD_MAP_TAG: '/mapTag/addMapTagInfo', // 新增地图标记信息
150
    DEL_MAP_TAG: '/mapTag/deleteMapTagInfo', // 删除地图标记信息
150
    DEL_MAP_TAG: '/mapTag/deleteMapTagInfo', // 删除地图标记信息
151
    UPD_MAP_TAG: '/mapTag/modifyMapTagInfo' // 查询地图标记信息用作修改
151
    UPD_MAP_TAG: '/mapTag/modifyMapTagInfo', // 查询地图标记信息用作修改
152
    MAP_TAG_TYPE: '/mapTag/queryMapAreaTypeList' // 查询标记类型下拉列表
152
  },
153
  },
153
  equipment: {
154
  equipment: {
154
    EQUIPMENT_TYPE: '/equipment/loadAllResourceToolType', // 获取所有设备类型
155
    EQUIPMENT_TYPE: '/equipment/loadAllResourceToolType', // 获取所有设备类型

+ 6 - 3
ebc-middle-platform/src/modules/system-management/map-mark.scss

15
      display: flex;
15
      display: flex;
16
      justify-content: space-between;
16
      justify-content: space-between;
17
      >div{
17
      >div{
18
        display: flex; 
19
        margin: 0 20px 16px 0;    
18
        display: flex;  
20
        line-height: 2;
19
        line-height: 2;
21
        .label-content{
20
        .label-content{
22
          display: flex; 
21
          display: flex; 
36
        }
35
        }
37
      }
36
      }
38
      .btns{
37
      .btns{
39
        min-width: 330px;
38
        min-width: 415px;
40
        button{
39
        button{
41
          margin: 0 2px;
40
          margin: 0 2px;
42
        }
41
        }
47
    margin: 20px auto;
46
    margin: 20px auto;
48
  }
47
  }
49
}
48
}
49
.loading--fix{
50
  color: #000;
51
  background-color: rgba(255, 255, 255, 0.8);
52
}
50
.modal{
53
.modal{
51
  .top{
54
  .top{
52
    display: flex;
55
    display: flex;

+ 171 - 174
ebc-middle-platform/src/modules/system-management/map-mark.vue

7
            <div class="label">部门:</div>
7
            <div class="label">部门:</div>
8
            <div class="input-rule">
8
            <div class="input-rule">
9
              <t-select-tree
9
              <t-select-tree
10
                v-model="queryCondition.department"
10
                v-model="queryCondition.entityId"
11
                :node-data="cloneNodes"
11
                :node-data="cloneNodes"
12
                node-key="id"
12
                node-key="id"
13
              ></t-select-tree>
13
              ></t-select-tree>
14
            </div>
14
            </div>
15
          </div>
15
          </div>
16
          <div class="label-content">
16
          <div class="label-content">
17
            <div class="label">标记类型:</div>
18
            <div class="input-rule">
19
              <t-select v-model="queryCondition.mapAreaType" placeholder="请输入...">
20
                <t-option
21
                  v-for="item in markTypes"
22
                  :key="item.mapAreaTypeId"
23
                  :value="item.mapAreaTypeId"
24
                >{{ item.mapAreaTypeName }}</t-option
25
                >
26
              </t-select>
27
            </div>
28
          </div>
29
          <div class="label-content">
17
            <div class="label">标记名称:</div>
30
            <div class="label">标记名称:</div>
18
            <div class="input-rule">
31
            <div class="input-rule">
19
              <t-input
32
              <t-input
20
                v-model="queryCondition.userName"
33
                v-model="queryCondition.mapAreaName"
21
                placeholder="请输入..."
34
                placeholder="请输入..."
22
              ></t-input>
35
              ></t-input>
23
            </div>
36
            </div>
26
            <t-button color="success" icon="search-outline" @click="onSearch">查询</t-button>
39
            <t-button color="success" icon="search-outline" @click="onSearch">查询</t-button>
27
            <t-button color="secondary" icon="loading" class="reset-btn" @click="onReset">重置</t-button>
40
            <t-button color="secondary" icon="loading" class="reset-btn" @click="onReset">重置</t-button>
28
            <t-button color="secondary" icon="upload-outline" @click="toExport">导出至Excel</t-button>
41
            <t-button color="secondary" icon="upload-outline" @click="toExport">导出至Excel</t-button>
42
            <t-button color="secondary" icon="delete-outline" @click="batchDelete">删除</t-button>
29
          </div>
43
          </div>
30
        </div>
44
        </div>
45
      </div>
46
      <div class="search-ctn" style="justify-content: flex-end;">
31
        <div class="btns">
47
        <div class="btns">
32
          <t-button color="success" icon="plus-outline" @click="markModal(1)"
33
          >考勤区域</t-button
34
          >
35
          <t-button color="success" icon="plus-outline" @click="markModal(2)"
36
          >作业区域</t-button
37
          >
38
          <t-button color="success" icon="plus-outline" @click="markModal(3)"
39
          >电子围栏</t-button
40
          >
41
          <t-button color="success" icon="plus-outline" @click="markModal(4)"
42
          >定点</t-button
48
          <t-button v-for="(item,index) in markTypes" :key="index+'type'" color="success" icon="plus-outline" @click="markModal(item.mapAreaTypeId)"
49
          >{{ item.mapAreaTypeName }}</t-button
43
          >
50
          >
44
        </div>
51
        </div>
45
      </div>
52
      </div>
46
    </div>
53
    </div>
47
    <div>
54
    <div>
48
      <t-table :data="table.data">
49
        <t-table-column prop="MAP_TAG_NAME" label="标记名称"></t-table-column>
50
        <t-table-column label="类型">
51
          <template slot-scope="scope">
52
            <div v-if="scope.row.MAP_TAG_TYPE == 1">考勤区域</div>
53
            <div v-if="scope.row.MAP_TAG_TYPE == 2">作业区域</div>
54
            <div v-if="scope.row.MAP_TAG_TYPE == 3">电子围栏</div>
55
            <div v-if="scope.row.MAP_TAG_TYPE == 4">定点</div>
56
          </template>
55
      <t-table :data="table.data" :loading="tableLoading" @selection-change="handleSelectionChange">
56
        <t-table-column type="selection" width="70"></t-table-column>
57
        <t-table-column prop="mapAreaName" label="标记名称"></t-table-column>
58
        <t-table-column :formatter="type_formatter" label="类型">
57
        </t-table-column>
59
        </t-table-column>
58
        <t-table-column
60
        <t-table-column
59
          :formatter="timestampToTime"
61
          :formatter="timestampToTime"
60
          prop="CREATE_DATE"
62
          prop="creatDate"
61
          label="创建时间"
63
          label="创建时间"
62
        ></t-table-column>
64
        ></t-table-column>
63
        <t-table-column fixed="right" label="操作" width="120">
65
        <t-table-column fixed="right" label="操作" width="120">
102
        <div>
104
        <div>
103
          <div class="label">部门:</div>
105
          <div class="label">部门:</div>
104
          <div class="input-rule">
106
          <div class="input-rule">
105
            <t-select-tree v-model="department"
107
            <t-select-tree v-model="department" :disabled="update"
106
                           :node-data="cloneNodes"
108
                           :node-data="cloneNodes"
107
                           style="width:200px"
108
                           node-key="id"
109
                           node-key="id"
110
                           style="width:200px"
109
            ></t-select-tree>
111
            ></t-select-tree>
110
          </div>
112
          </div>
111
        </div>
113
        </div>
115
            <t-select v-model="markType" style="width:100px" placeholder="请输入...">
117
            <t-select v-model="markType" style="width:100px" placeholder="请输入...">
116
              <t-option
118
              <t-option
117
                v-for="item in markTypes"
119
                v-for="item in markTypes"
118
                :key="item.id"
119
                :value="item.id"
120
              >{{ item.type }}</t-option
120
                :key="item.mapAreaTypeId"
121
                :value="item.mapAreaTypeId"
122
              >{{ item.mapAreaTypeName }}</t-option
121
              >
123
              >
122
            </t-select>
124
            </t-select>
123
          </div>
125
          </div>
198
        <div id="modalMap" class="right"></div>
200
        <div id="modalMap" class="right"></div>
199
      </div>
201
      </div>
200
    </t-modal>
202
    </t-modal>
203
    <t-loading v-model="fullLoading" fullscreen tip="加载中...."></t-loading>
201
  </div>
204
  </div>
202
</template>
205
</template>
203
<script>
206
<script>
215
          total: 0
218
          total: 0
216
        }
219
        }
217
      },
220
      },
221
      tableLoading: true,
222
      fullLoading: false,
218
      departments: [],
223
      departments: [],
219
      queryCondition: {
224
      queryCondition: {
220
        department: '',
221
        userName: ''
225
        entityId: null,
226
        mapAreaName: null,
227
        mapAreaType: null
222
      },
228
      },
223
      rangeDate: '',
229
      rangeDate: '',
224
      addMark: false,
230
      addMark: false,
226
      markName: '',
232
      markName: '',
227
      residenceTimeLength: '',
233
      residenceTimeLength: '',
228
      markType: 1,
234
      markType: 1,
229
      markTypes: [
230
        {
231
          id: 1,
232
          type: '考勤区域'
233
        },
234
        {
235
          id: 2,
236
          type: '作业区域'
237
        },
238
        {
239
          id: 3,
240
          type: '电子围栏'
241
        },
242
        {
243
          id: 4,
244
          type: '定点'
245
        }
246
      ],
235
      markTypes: [],
236
      department: '',
247
      modalData: [],
237
      modalData: [],
248
      map: null,
238
      map: null,
249
      polygonDrawer: null
239
      polygonDrawer: null,
240
      selection: []
250
    }
241
    }
251
  },
242
  },
252
  computed: {
243
  computed: {
253
    cloneNodes() {
244
    cloneNodes() {
254
      return this.departments.map((item) => {
245
      return this.departments.map((item) => {
255
        let obj = {
246
        let obj = {
256
          label: item.label,
257
          title: item.title,
258
          id: item.id,
259
          data: item.data
247
          label: item.name,
248
          title: item.name,
249
          id: item.code,
250
          data: item.id
260
        }
251
        }
261
        if (item.pid) {
262
          obj.pid = item.pid
252
        if (item.parentCode > 0) {
253
          obj.pid = item.parentCode
263
        }
254
        }
264
        return obj
255
        return obj
265
      })
256
      })
267
  },
258
  },
268
  created() {
259
  created() {
269
    this.getDepartmentsList()
260
    this.getDepartmentsList()
261
    this.getTagType()
270
    this.getList()
262
    this.getList()
271
  },
263
  },
272
  mounted() {
264
  mounted() {
278
        .post(services.workEmployee.GET_ALL_ORGANIZE, {})
270
        .post(services.workEmployee.GET_ALL_ORGANIZE, {})
279
        .then((res) => {
271
        .then((res) => {
280
          // 请求成功处理...
272
          // 请求成功处理...
281
          // this.departments = res.data
282
          this.departments = []
283
          for (let i = 0; i < res.data.length; i++) {
284
            if (res.data[i].parentCode > 0) {
285
              this.departments.push({
286
                label: res.data[i].name,
287
                title: res.data[i].name,
288
                id: res.data[i].code,
289
                data: res.data[i].id,
290
                pid: res.data[i].parentCode
291
              })
292
            } else {
293
              this.departments.push({
294
                label: res.data[i].name,
295
                title: res.data[i].name,
296
                id: res.data[i].code,
297
                data: res.data[i].id
298
              })
299
            }
300
          }
273
          this.departments = res.data
274
          // this.onReset()
275
        })
276
        .catch((res) => {
277
          // 请求失败处理...
278
        })
279
    },
280
    getTagType() {
281
      this.$test
282
        .post(services.mapTag.MAP_TAG_TYPE, {})
283
        .then((res) => {
284
          // 请求成功处理...
285
          console.log(res)
286
          this.markTypes = res.data.dataList
301
        })
287
        })
302
        .catch((res) => {
288
        .catch((res) => {
303
          // 请求失败处理...
289
          // 请求失败处理...
337
        this.layer.options.opacity = 1.0
323
        this.layer.options.opacity = 1.0
338
        this.layer.options.color = color
324
        this.layer.options.color = color
339
        this.layer.options.fillColor = color
325
        this.layer.options.fillColor = color
340
        // console.log(this.polygonDrawer.getPoints())
341
        this.modalData = this.layer._latlngs[0]
326
        this.modalData = this.layer._latlngs[0]
342
        this.polygonDrawer.editing(this.layer)
327
        this.polygonDrawer.editing(this.layer)
343
        this.polygonDrawer.disable()
328
        this.polygonDrawer.disable()
345
      })
330
      })
346
    },
331
    },
347
    getList() {
332
    getList() {
348
      var params = new FormData()
349
      params.append(
350
        'data',
351
        JSON.stringify({
352
          pageNum: this.table.pager.currentPage,
353
          pageSize: this.table.pager.size,
354
          mapTagName: this.queryCondition.userName
355
        })
356
      )
333
      this.tableLoading = true
334
      this.table.data = []
357
      this.$test
335
      this.$test
358
        .post(services.mapTag.GET_MAP_TAG, params)
336
        .post(services.mapTag.GET_MAP_TAG,
337
          {
338
            pageNumber: this.table.pager.currentPage,
339
            pageSize: this.table.pager.size,
340
            data: this.queryCondition
341
          })
359
        .then((res) => {
342
        .then((res) => {
360
          // 请求成功处理...
343
          // 请求成功处理...
361
          this.table.data = res.data.dataList
362
          this.table.pager.total = res.data.dataNum
344
          console.log(res)
345
          this.tableLoading = false
346
          this.table.data = res.data.data
347
          this.table.pager.total = res.data.total
363
          // this.table.pager.currentPage = pageNum
348
          // this.table.pager.currentPage = pageNum
364
        })
349
        })
365
        .catch((res) => {
350
        .catch((res) => {
366
          // 请求失败处理...
351
          // 请求失败处理...
367
        })
352
        })
368
    },
353
    },
354
    type_formatter(row, column) {
355
      var arr = this.markTypes.filter((item) => {
356
        return item.mapAreaTypeId === row.businessType
357
      })
358
      if (arr[0]) {
359
        return arr[0].mapAreaTypeName
360
      }
361
    },
369
    onChange(value) {
362
    onChange(value) {
370
      console.log('date change:' + value)
363
      console.log('date change:' + value)
371
    },
364
    },
372
    onReset() {
365
    onReset() {
373
      this.queryCondition.userName = ''
366
      console.log(this.departments)
367
      this.queryCondition = {
368
        entityId: this.departments[0].id,
369
        mapAreaName: null,
370
        mapAreaType: null
371
      }
374
      this.table.pager.currentPage = 1
372
      this.table.pager.currentPage = 1
375
      this.getList()
373
      this.getList()
376
    },
374
    },
377
    onSearch() {
375
    onSearch() {
376
      console.log(this.queryCondition)
378
      this.table.pager.currentPage = 1
377
      this.table.pager.currentPage = 1
379
      this.getList()
378
      this.getList()
380
    },
379
    },
423
      this.update = false
422
      this.update = false
424
      this.updateId = null
423
      this.updateId = null
425
      this.markName = ''
424
      this.markName = ''
425
      this.department = null
426
      this.residenceTimeLength = ''
426
      this.residenceTimeLength = ''
427
      this.modalData = []
427
      this.modalData = []
428
      this.polygonDrawer.enable()
428
      this.polygonDrawer.enable()
435
      }
435
      }
436
    },
436
    },
437
    timestampToTime(cjsj) {
437
    timestampToTime(cjsj) {
438
      var date = new Date(cjsj.CREATE_DATE) // 时间戳为10位需*1000,时间戳为13位的话不需乘1000
438
      var date = new Date(cjsj.creatDate) // 时间戳为10位需*1000,时间戳为13位的话不需乘1000
439
      var Y = date.getFullYear() + '-'
439
      var Y = date.getFullYear() + '-'
440
      var M =
440
      var M =
441
          (date.getMonth() + 1 < 10
441
          (date.getMonth() + 1 < 10
452
      return Y + M + D + ' ' + h + ':' + m + ':' + s
452
      return Y + M + D + ' ' + h + ':' + m + ':' + s
453
    },
453
    },
454
    submitMark() {
454
    submitMark() {
455
      if (this.modalData.length == 0) {
455
      console.log(this.layer.getPoints())
456
      if (this.modalData.length === 0) {
456
        this.$Confirm.warning({
457
        this.$Confirm.warning({
457
          title: '提示',
458
          title: '提示',
458
          content: '请输添加标记'
459
          content: '请输添加标记'
467
        })
468
        })
468
        return false
469
        return false
469
      }
470
      }
470
471
      if (this.department === '') {
472
        this.$Confirm.warning({
473
          title: '提示',
474
          content: '请选择部门'
475
        })
476
        return false
477
      }
471
      if (this.markType === 4 && !this.residenceTimeLength) {
478
      if (this.markType === 4 && !this.residenceTimeLength) {
472
        this.$Confirm.warning({
479
        this.$Confirm.warning({
473
          title: '提示',
480
          title: '提示',
475
        })
482
        })
476
        return false
483
        return false
477
      }
484
      }
478
479
      let arr = ''
480
      for (let i = 0; i < this.modalData.length; i++) {
481
        arr = arr + (this.modalData[i].lng + ' ' + this.modalData[i].lat + ',')
482
      }
483
      arr = arr + (this.modalData[0].lng + ' ' + this.modalData[0].lat)
484
      var params = new FormData()
485
      if (this.update) {
486
        params.append(
487
          'data',
488
          JSON.stringify({
489
            mapTagName: this.markName,
490
            mapTagType: this.markType,
491
            residenceTimeLength: this.residenceTimeLength,
492
            mapTagShape: arr,
493
            mapTagId: this.updateId
494
          })
495
        )
485
      if (this.update) { // 更新
486
        this.fullLoading = true
496
        this.$test
487
        this.$test
497
          .post(services.mapTag.UPD_MAP_TAG, params)
488
          .post(services.mapTag.UPD_MAP_TAG, {
489
            mapAreaId: this.updateId,
490
            mapAreaName: this.markName,
491
            businessType: this.markType,
492
            mapAreaContent: this.layer.getPoints(),
493
            entityId: this.department,
494
            limitDuration: this.residenceTimeLength ? this.residenceTimeLength : null
495
          })
498
          .then((res) => {
496
          .then((res) => {
499
            // 请求成功处理...
497
            // 请求成功处理...
498
            this.fullLoading = false
500
            this.getList()
499
            this.getList()
501
            this.polygonDrawer.disable()
500
            this.polygonDrawer.disable()
502
            this.modalData = []
501
            this.modalData = []
503
            this.markName = ''
502
            this.markName = ''
503
            this.department = null
504
            this.$Message.success('操作成功')
504
            this.$Message.success('操作成功')
505
            this.map.removeLayer(this.layer)
505
            this.map.removeLayer(this.layer)
506
            this.update = false
506
            this.update = false
507
          })
507
          })
508
          .catch((res) => {
508
          .catch((res) => {
509
            this.fullLoading = false
509
            // 请求失败处理...
510
            // 请求失败处理...
510
          })
511
          })
511
      } else {
512
        params.append(
513
          'data',
514
          JSON.stringify({
515
            mapTagName: this.markName,
516
            mapTagType: this.markType,
517
            residenceTimeLength: this.residenceTimeLength,
518
            mapTagShape: arr
519
          })
520
        )
521
512
      } else { // 新增
522
        this.update = false
513
        this.update = false
514
        this.fullLoading = true
523
        this.$test
515
        this.$test
524
          .post(services.mapTag.ADD_MAP_TAG, params)
516
          .post(services.mapTag.ADD_MAP_TAG, {
517
            mapAreaName: this.markName,
518
            businessType: this.markType,
519
            mapAreaContent: this.layer.getPoints(),
520
            entityId: this.department,
521
            limitDuration: this.residenceTimeLength ? this.residenceTimeLength : null
522
          })
525
          .then((res) => {
523
          .then((res) => {
526
            // 请求成功处理...
524
            // 请求成功处理...
525
            this.fullLoading = false
527
            this.$Message.success('操作成功')
526
            this.$Message.success('操作成功')
528
            this.map.removeLayer(this.layer)
527
            this.map.removeLayer(this.layer)
529
            this.polygonDrawer.disable()
528
            this.polygonDrawer.disable()
533
            this.getList()
532
            this.getList()
534
          })
533
          })
535
          .catch((res) => {
534
          .catch((res) => {
535
            this.fullLoading = false
536
            // 请求失败处理...
536
            // 请求失败处理...
537
          })
537
          })
538
      }
538
      }
569
      this.getList()
569
      this.getList()
570
    },
570
    },
571
    handleClick(row) {
571
    handleClick(row) {
572
      var params = new FormData()
573
      params.append(
574
        'data',
575
        JSON.stringify({
576
          mapTagId: row.MAP_TAG_ID
577
        })
578
      )
579
      this.$test
572
      this.$test
580
        .post(services.mapTag.GET_ONE_MAP_TAG, params)
573
        .post(services.mapTag.GET_ONE_MAP_TAG, {
574
          mapTagId: row.mapAreaId
575
        })
581
        .then((res) => {
576
        .then((res) => {
582
          // 请求成功处理...
577
          // 请求成功处理...
583
          this.modalData = []
578
          this.modalData = []
584
          var coverWktStr_blue = res.data.resultData.MAP_TAG_SHAPE
585
          // debugger
586
          // var arr = coverWktStr_blue.replace('POLYGON((','').split(',')[0].split(' ')
587
          // this.map.setView([arr[1], arr[0]], 10)
588
          console.log(res.data.resultData.MAP_TAG_SHAPE)
589
          var color
579
          var color
590
          if (row.MAP_TAG_TYPE == '3') {
580
          if (row.businessType == '3') {
591
            color = 'red'
581
            color = 'red'
592
          } else if (row.MAP_TAG_TYPE == '2') {
582
          } else if (row.businessType == '2') {
593
            color = 'green'
583
            color = 'green'
594
          } else {
584
          } else {
595
            color = 'blue'
585
            color = 'blue'
596
          }
586
          }
597
          var coverLayer_blue = new Ai.Polygon(coverWktStr_blue, {color: color, opacity: 1.0})
587
          var coverLayer = new Ai.Polygon(res.data.resultData.mapAreaContent, {color: color, opacity: 1.0})
598
          // this.map.addLayer(coverLayer_blue)
588
          // this.map.addLayer(coverLayer_blue)
599
          // 面设为编辑状态
589
          // 面设为编辑状态
600
          coverLayer_blue.snapediting = new Ai.PolylineSnap(
590
          coverLayer.snapediting = new Ai.PolylineSnap(
601
            this.map,
591
            this.map,
602
            coverLayer_blue
592
            coverLayer
603
          )
593
          )
604
          coverLayer_blue.snapediting.enable()
605
          this.layer = coverLayer_blue
606
          this.map.addLayer(coverLayer_blue)
594
          coverLayer.snapediting.enable()
595
          this.layer = coverLayer
596
          this.map.addLayer(coverLayer)
607
          this.polygonDrawer.editing(this.layer)
597
          this.polygonDrawer.editing(this.layer)
608
          this.modalData = coverLayer_blue._latlngs[0]
598
          this.modalData = coverLayer._latlngs[0]
609
          this.polygonDrawer.disable()
599
          this.polygonDrawer.disable()
610
          this.map.setViewPort([this.layer])
600
          this.map.setViewPort([this.layer])
611
        })
601
        })
612
        .catch((res) => {
602
        .catch((res) => {
613
          // 请求失败处理...
603
          // 请求失败处理...
614
        })
604
        })
615
      this.markName = row.MAP_TAG_NAME
616
      this.markType = parseInt(row.MAP_TAG_TYPE)
617
      this.updateId = row.MAP_TAG_ID
618
      this.residenceTimeLength = row.RESIDENCE_TIME_LENGTH
605
      this.markName = row.mapAreaName
606
      this.markType = row.businessType
607
      this.updateId = row.mapAreaId
608
      this.department = parseInt(row.entityId)
609
      this.residenceTimeLength = row.limitDuration
619
      this.addMark = true
610
      this.addMark = true
620
      this.update = true
611
      this.update = true
621
      this.polygonDrawer.enable()
612
      this.polygonDrawer.enable()
694
        that.modalData = coverLayer_blue._latlngs[0]
685
        that.modalData = coverLayer_blue._latlngs[0]
695
        that.polygonDrawer.disable()
686
        that.polygonDrawer.disable()
696
      }
687
      }
697
      // debugger
698
      reader.readAsArrayBuffer(f)
688
      reader.readAsArrayBuffer(f)
699
    },
689
    },
700
    remove(row) {
690
    remove(row) {
701
      let that = this
702
      let confirm = {
691
      this.$Confirm.confirm({
703
        title: '请确认',
692
        title: '请确认',
704
        content: '删除后不可恢复,确认删除吗?',
693
        content: '删除后不可恢复,确认删除吗?',
705
        ok: function () {
706
          var params = new FormData()
707
          params.append(
708
            'data',
709
            JSON.stringify({
710
              mapTagId: row.MAP_TAG_ID
711
            })
712
          )
713
          // debugger
714
          this.$test
715
            .post(services.mapTag.DEL_MAP_TAG, params)
716
            .then((res) => {
717
              // 请求成功处理...
718
              // debugger
719
              this.$Message.success('操作成功')
720
              that.getList()
721
            })
722
            .catch((res) => {
723
              // 请求失败处理...
724
            })
694
        ok: () => {
695
          this.delete([row.mapAreaId])
725
        }
696
        }
726
      }
727
      this.$Confirm.confirm(confirm)
697
      })
698
    },
699
    handleSelectionChange(val) {
700
      var arr = []
701
      val.forEach(element => {
702
        arr.push(element.mapAreaId)
703
      })
704
      this.selection = arr
705
    },
706
    batchDelete() {
707
      this.delete(this.selection)
708
    },
709
    delete(ids) {
710
      this.fullLoading = true
711
      this.$test
712
        .post(services.mapTag.DEL_MAP_TAG, {
713
          mapTagIds: ids
714
        })
715
        .then((res) => {
716
          // 请求成功处理...
717
          this.fullLoading = false
718
          this.$Message.success('操作成功')
719
          this.getList()
720
        })
721
        .catch((res) => {
722
          this.fullLoading = false
723
          // 请求失败处理...
724
        })
728
    }
725
    }
729
  }
726
  }
730
}
727
}

+ 4 - 0
ebc-middle-platform/src/modules/system-management/terminal-management.scss

90
.submit-button{
90
.submit-button{
91
  background-color: #147BD1;
91
  background-color: #147BD1;
92
  color: #ffffff;
92
  color: #ffffff;
93
}
94
.loading--fix{
95
  color: #000;
96
  background-color: rgba(255, 255, 255, 0.8);
93
}
97
}

+ 19 - 9
location-rescue-service/src/main/java/com/ai/bss/location/rescue/controller/WorkEmployeeController.java

90
        return result;
90
        return result;
91
    }
91
    }
92
92
93
    /**
94
     * 删除用户信息
95
     */
96
    @ResponseBody
97
    @RequestMapping("/deleteWorkEmployee")
98
    public boolean deleteWorkEmployee(@RequestBody List<EmployeeDto> employeeDtoList) throws Exception {
99
        boolean result = userManageService.deleteWorkEmployee(employeeDtoList);
100
        return result;
101
    }
93
	/**
94
	 * 删除用户信息
95
	 */
96
	@ResponseBody
97
	@RequestMapping("/deleteWorkEmployee")
98
	public boolean deleteWorkEmployee(@RequestBody Map<String, String> params) throws Exception {
99
		boolean result = userManageService.deleteWorkEmployee(params);
100
		return result;
101
	}
102
103
	/**
104
	 * 修改用户信息
105
	 */
106
	@ResponseBody
107
	@RequestMapping("/modifyWorkEmployee")
108
	public boolean modifyWorkEmployee(@RequestBody EmployeeDto employeeDto ) throws Exception {
109
		boolean result = userManageService.modifyWorkEmployee(employeeDto);
110
		return result;
111
	}
102
112
103
    /**
113
    /**
104
     * 获取已绑定终端的人员列表
114
     * 获取已绑定终端的人员列表

+ 22 - 5
location-rescue-service/src/main/java/com/ai/bss/location/rescue/service/impl/WorkEmployeeServiceImpl.java

89
    }
89
    }
90
90
91
    @Override
91
    @Override
92
    public boolean deleteWorkEmployee(List<EmployeeDto> employeeDtoList) {
92
    public boolean deleteWorkEmployee(Map<String, String> params) {
93
        boolean success = false;
93
        boolean success = false;
94
        for(EmployeeDto employeeDto:employeeDtoList ){
95
            CommonRequest<EmployeeDto> request = CommonRequest.<EmployeeDto>builder().data(employeeDto).build();
96
            CommonResponse<Void> response = employeeService.deleteWorkEmployee(request);
97
            success = response.isSuccess();
94
        if (params.get("ids")!=null&&!"".equals(params.get("ids"))) {
95
            String ids = params.get("ids");
96
            String[] idsArray = ids.split(",");
97
            EmployeeDto employeeDto=new EmployeeDto();
98
            for(String id: idsArray){
99
                long lid = Long.parseLong(id);
100
                employeeDto.setId(lid);
101
                CommonRequest<EmployeeDto> request = CommonRequest.<EmployeeDto>builder().data(employeeDto).build();
102
                CommonResponse<Void> response = employeeService.deleteWorkEmployee(request);
103
                success = response.isSuccess();
104
            }
105
            return success;
106
        }else {
107
            return success;
98
        }
108
        }
109
    }
110
111
    @Override
112
    public boolean modifyWorkEmployee(EmployeeDto employeeDto) {
113
        CommonRequest<EmployeeDto> request = CommonRequest.<EmployeeDto>builder().data(employeeDto).build();
114
        CommonResponse<Void> response = employeeService.modifyEmployee(request);
115
        boolean success = response.isSuccess();
99
        return success;
116
        return success;
100
    }
117
    }
101
118

+ 3 - 0
location-rescue-service/src/main/java/com/ai/bss/location/rescue/service/interfaces/WorkEmployeeService.java

34
34
35
	boolean createWorkEmployee(EmployeeDto employeeDto) throws Exception;
35
	boolean createWorkEmployee(EmployeeDto employeeDto) throws Exception;
36
36
37
	boolean deleteWorkEmployee(Map<String, String> params);
38
39
	boolean modifyWorkEmployee(EmployeeDto employeeDto);
37
	boolean deleteWorkEmployee(List<EmployeeDto> employeeDtoList);
40
	boolean deleteWorkEmployee(List<EmployeeDto> employeeDtoList);
38
41
39
	/**
42
	/**