Преглед на файлове

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

konghl преди 4 години
родител
ревизия
46d45bf56c

+ 21 - 3
ebc-middle-platform/src/http.js

@ -153,8 +153,12 @@ function requestError(error) {
153 153
 * @returns {Object|Promise} 返回`Axios`响应对象或Promise对象
154 154
 */
155 155
function responseInterceptor(response) {
156
  GLoading.$create().finish()
157
  return response
156
  if (response.data.success) {
157
    return response.data
158
  } else {
159
    TMessage.danger(response.data.fail.message)
160
    return Promise.reject()
161
  }
158 162
}
159 163
160 164
/**
@ -178,9 +182,23 @@ function responseError(error) {
178 182
  return Promise.reject(error)
179 183
}
180 184
185
// axios.interceptors.response.use(
186
//   response => {
187
//     console.log(response)
188
//     if (response.data.success) {
189
//       return response
190
//     } else {
191
//       // this.$Message.warning(response.data.fail.message)
192
//     }
193
//   },
194
//   error => {
195
//     return Promise.reject(error)
196
//   }
197
// )
198
181 199
// 默认服务调用拦截器设置
182 200
http.$http.interceptors.request.use(requestInterceptor, requestError)
183
http.$http.interceptors.response.use(responseInterceptor, responseError)
201
http.$test.interceptors.response.use(responseInterceptor, responseError)
184 202
185 203
// 注册插件
186 204
Vue.use(HttpPlugin)

+ 1 - 0
ebc-middle-platform/src/modules/system-management/equipment-management.scss

@ -44,6 +44,7 @@
44 44
  }
45 45
}
46 46
.loading--fix{
47
  position: absolute;
47 48
  color: #000;
48 49
  background-color: rgba(255, 255, 255, 0.8);
49 50
}

+ 32 - 36
ebc-middle-platform/src/modules/system-management/equipment-management.vue

@ -379,14 +379,15 @@ export default {
379 379
  },
380 380
  methods: {
381 381
    async getType() {
382
      this.fullLoading = true
382 383
      await this.$test.post(services.equipment.EQUIPMENT_TYPE, {}
383 384
      ).then(res => {
384 385
        // 请求成功处理...
385
        if (res.data.success) {
386
          this.typeList = res.data.data
387
        }
386
        this.fullLoading = false
387
        this.typeList = res.data
388 388
      }).catch(res => {
389 389
        // 请求失败处理...
390
        this.fullLoading = false
390 391
      })
391 392
    },
392 393
    getList() {
@ -404,12 +405,11 @@ export default {
404 405
        // 请求成功处理...
405 406
        console.log(res)
406 407
        this.tableLoading = false
407
        if (res.data.success) {
408
          this.table.data = res.data.data.data
409
          this.table.pager.total = res.data.data.total
410
        }
408
        this.table.data = res.data.data
409
        this.table.pager.total = res.data.total
411 410
      }).catch(res => {
412 411
        // 请求失败处理...
412
        this.tableLoading = false
413 413
      })
414 414
    },
415 415
    type_formatter(row, column) {
@ -445,6 +445,7 @@ export default {
445 445
    },
446 446
    checkReptition(data) {
447 447
      return new Promise((resolve) => {
448
        this.fullLoading = true
448 449
        this.$test.post(services.equipment.GET_EQUIPMENT, {
449 450
          pageNumber: 1,
450 451
          pageSize: 10,
@ -452,18 +453,16 @@ export default {
452 453
        }
453 454
        ).then(res => {
454 455
        // 请求成功处理...
456
          this.fullLoading = false
455 457
          console.log(res)
456
          if (res.data.success) {
457
            if (res.data.data.totalPage > 0 && res.data.data.data[0].resourceToolId === this.updateRow.resourceToolId) {
458
              resolve(false)
459
            } else {
460
              resolve(res.data.data.totalPage > 0)
461
            }
462
          } else {
458
          if (res.data.totalPage > 0 && res.data.data[0].resourceToolId === this.updateRow.resourceToolId) {
463 459
            resolve(false)
460
          } else {
461
            resolve(res.data.totalPage > 0)
464 462
          }
465 463
        }).catch(res => {
466 464
        // 请求失败处理...
465
          this.fullLoading = false
467 466
          resolve(false)
468 467
        })
469 468
      })
@ -504,21 +503,20 @@ export default {
504 503
          ).then(res => {
505 504
            // 请求成功处理...
506 505
            this.fullLoading = false
507
            if (res.data.success) {
508
              this.$Message.success('提交成功!')
509
              this.getList()
510
              this.modal = false
511
              this.formValidate = {
512
                type: '',
513
                name: '',
514
                radius: null,
515
                number: '',
516
                lng: '',
517
                lat: ''
518
              }
506
            this.$Message.success('提交成功!')
507
            this.getList()
508
            this.modal = false
509
            this.formValidate = {
510
              type: '',
511
              name: '',
512
              radius: null,
513
              number: '',
514
              lng: '',
515
              lat: ''
519 516
            }
520 517
          }).catch(res => {
521 518
            // 请求失败处理...
519
            this.fullLoading = false
522 520
          })
523 521
        } else {
524 522
          this.$Message.danger('表单验证失败!')
@ -537,13 +535,12 @@ export default {
537 535
          ).then(res => {
538 536
            // 请求成功处理...
539 537
            this.fullLoading = false
540
            if (res.data.success) {
541
              this.$Message.success('提交成功!')
542
              this.getList()
543
              this.updateModal = false
544
            }
538
            this.$Message.success('提交成功!')
539
            this.getList()
540
            this.updateModal = false
545 541
          }).catch(res => {
546 542
            // 请求失败处理...
543
            this.fullLoading = false
547 544
          })
548 545
        } else {
549 546
          this.$Message.danger('表单验证失败!')
@ -580,13 +577,12 @@ export default {
580 577
          ).then(res => {
581 578
            // 请求成功处理...
582 579
            this.fullLoading = false
583
            if (res.data.success) {
584
              this.$Message.success('操作成功')
585
              this.table.pager.currentPage = 1
586
              this.getList()
587
            }
580
            this.$Message.success('操作成功')
581
            this.table.pager.currentPage = 1
582
            this.getList()
588 583
          }).catch(res => {
589 584
            // 请求失败处理...
585
            this.fullLoading = false
590 586
          })
591 587
        }
592 588
      })

+ 1 - 0
ebc-middle-platform/src/modules/system-management/map-mark.scss

@ -47,6 +47,7 @@
47 47
  }
48 48
}
49 49
.loading--fix{
50
  position: absolute;
50 51
  color: #000;
51 52
  background-color: rgba(255, 255, 255, 0.8);
52 53
}

+ 19 - 3
ebc-middle-platform/src/modules/system-management/map-mark.vue

@ -266,27 +266,33 @@ export default {
266 266
  },
267 267
  methods: {
268 268
    getDepartmentsList() {
269
      this.fullLoading = true
269 270
      this.$test
270 271
        .post(services.workEmployee.GET_ALL_ORGANIZE, {})
271 272
        .then((res) => {
272 273
          // 请求成功处理...
274
          this.fullLoading = false
273 275
          this.departments = res.data
274 276
          // this.onReset()
275 277
        })
276 278
        .catch((res) => {
277 279
          // 请求失败处理...
280
          this.fullLoading = false
278 281
        })
279 282
    },
280 283
    getTagType() {
284
      this.fullLoading = true
281 285
      this.$test
282 286
        .post(services.mapTag.MAP_TAG_TYPE, {})
283 287
        .then((res) => {
284 288
          // 请求成功处理...
289
          this.fullLoading = false
285 290
          console.log(res)
286
          this.markTypes = res.data.dataList
291
          this.markTypes = res.data
287 292
        })
288 293
        .catch((res) => {
289 294
          // 请求失败处理...
295
          this.fullLoading = false
290 296
        })
291 297
    },
292 298
    loadMap() {
@ -349,6 +355,7 @@ export default {
349 355
        })
350 356
        .catch((res) => {
351 357
          // 请求失败处理...
358
          this.tableLoading = false
352 359
        })
353 360
    },
354 361
    type_formatter(row, column) {
@ -569,12 +576,14 @@ export default {
569 576
      this.getList()
570 577
    },
571 578
    handleClick(row) {
579
      this.fullLoading = true
572 580
      this.$test
573 581
        .post(services.mapTag.GET_ONE_MAP_TAG, {
574 582
          mapTagId: row.mapAreaId
575 583
        })
576 584
        .then((res) => {
577 585
          // 请求成功处理...
586
          this.fullLoading = false
578 587
          this.modalData = []
579 588
          var color
580 589
          if (row.businessType == '3') {
@ -584,7 +593,7 @@ export default {
584 593
          } else {
585 594
            color = 'blue'
586 595
          }
587
          var coverLayer = new Ai.Polygon(res.data.resultData.mapAreaContent, {color: color, opacity: 1.0})
596
          var coverLayer = new Ai.Polygon(res.data[0].mapAreaContent, {color: color, opacity: 1.0})
588 597
          // this.map.addLayer(coverLayer_blue)
589 598
          // 面设为编辑状态
590 599
          coverLayer.snapediting = new Ai.PolylineSnap(
@ -601,6 +610,7 @@ export default {
601 610
        })
602 611
        .catch((res) => {
603 612
          // 请求失败处理...
613
          this.fullLoading = false
604 614
        })
605 615
      this.markName = row.mapAreaName
606 616
      this.markType = row.businessType
@ -704,7 +714,13 @@ export default {
704 714
      this.selection = arr
705 715
    },
706 716
    batchDelete() {
707
      this.delete(this.selection)
717
      this.$Confirm.confirm({
718
        title: '请确认',
719
        content: '删除后不可恢复,确认删除吗?',
720
        ok: () => {
721
          this.delete(this.selection)
722
        }
723
      })
708 724
    },
709 725
    delete(ids) {
710 726
      this.fullLoading = true

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

@ -92,6 +92,7 @@
92 92
  color: #ffffff;
93 93
}
94 94
.loading--fix{
95
  position: absolute;
95 96
  color: #000;
96 97
  background-color: rgba(255, 255, 255, 0.8);
97 98
}