chenxr3 4 年 前
コミット
626a7699ce

+ 43 - 19
ebc-middle-platform/src/modules/system-management/equipment-management.vue

75
            <t-option v-for="(item,index) in typeList" :value="item.resourceToolType" :key="index+'type'">{{ item.name }}</t-option>
75
            <t-option v-for="(item,index) in typeList" :value="item.resourceToolType" :key="index+'type'">{{ item.name }}</t-option>
76
          </t-select>
76
          </t-select>
77
        </t-form-item>
77
        </t-form-item>
78
        <t-form-item label="设备名称" prop="name">
79
          <t-input v-model="formValidate.name" placeholder="请输入设备名称"></t-input>
80
        </t-form-item>
81
        <t-form-item label="设备编号" prop="number">
78
        <t-form-item label="设备编号" prop="number">
82
          <t-input v-model="formValidate.number" placeholder="请输入字母、数字、中划线、下划线、#"></t-input>
79
          <t-input v-model="formValidate.number" placeholder="请输入字母、数字、中划线、下划线、#"></t-input>
83
        </t-form-item>
80
        </t-form-item>
84
        <t-form-item label="半径" prop="radius">
85
          <t-input v-model="formValidate.radius" placeholder="请输入设备名称"></t-input>
81
        <t-form-item label="设备名称" prop="name">
82
          <t-input v-model="formValidate.name" placeholder="请输入设备名称"></t-input>
86
        </t-form-item>
83
        </t-form-item>
87
        <div v-if="formValidate.type!=='001'">
84
        <div v-if="formValidate.type!=='001'">
88
          <t-form-item label="经度" prop="lng">
85
          <t-form-item label="经度" prop="lng">
94
            <t-format-input v-model="formValidate.lat" :numeral-decimal-scale="8" numeral placeholder="请输入数字"></t-format-input>
91
            <t-format-input v-model="formValidate.lat" :numeral-decimal-scale="8" numeral placeholder="请输入数字"></t-format-input>
95
          </t-form-item>
92
          </t-form-item>
96
        </div>
93
        </div>
94
        <t-form-item label="半径" prop="radius">
95
          <t-input v-model="formValidate.radius" placeholder="请输入半径"></t-input>
96
        </t-form-item>
97
      </t-form>
97
      </t-form>
98
      <div slot="footer">
98
      <div slot="footer">
99
        <t-button @click="cancel">取消</t-button>
99
        <t-button @click="cancel">取消</t-button>
111
        <t-form-item label="设备名称" prop="resourceToolName">
111
        <t-form-item label="设备名称" prop="resourceToolName">
112
          <t-input v-model="updateRow.resourceToolName" placeholder="请输入设备名称"></t-input>
112
          <t-input v-model="updateRow.resourceToolName" placeholder="请输入设备名称"></t-input>
113
        </t-form-item>
113
        </t-form-item>
114
        <t-form-item label="半径" prop="radius">
115
          <t-input v-model="updateRow.radius" numeral placeholder="请输入设备半径"></t-input>
116
        </t-form-item>
117
        <div v-if="updateRow.resourceToolType!=='001'">
114
        <div v-if="updateRow.resourceToolType!=='001'">
118
          <t-form-item label="经度" prop="longitude">
115
          <t-form-item label="经度" prop="longitude">
119
            <t-format-input v-model="updateRow.longitude" :numeral-decimal-scale="8" numeral placeholder="请输入数字"></t-format-input>
116
            <t-format-input v-model="updateRow.longitude" :numeral-decimal-scale="8" numeral placeholder="请输入数字"></t-format-input>
124
            <t-format-input v-model="updateRow.latitude" :numeral-decimal-scale="8" numeral placeholder="请输入数字"></t-format-input>
121
            <t-format-input v-model="updateRow.latitude" :numeral-decimal-scale="8" numeral placeholder="请输入数字"></t-format-input>
125
          </t-form-item>
122
          </t-form-item>
126
        </div>
123
        </div>
124
        <t-form-item label="半径" prop="radius">
125
          <t-input v-model="updateRow.radius" numeral placeholder="请输入半径"></t-input>
126
        </t-form-item>
127
      </t-form>
127
      </t-form>
128
      <div slot="footer">
128
      <div slot="footer">
129
        <t-button @click="cancel">取消</t-button>
129
        <t-button @click="cancel">取消</t-button>
237
        ],
237
        ],
238
        radius: [
238
        radius: [
239
          {
239
          {
240
            required: true,
241
            message: '半径不能为空',
242
            trigger: 'blur'
243
          },
244
          {
240
            message: '请输入数字',
245
            message: '请输入数字',
241
            trigger: 'blur',
246
            trigger: 'blur',
242
            validator: function(rule, value, callback) {
247
            validator: function(rule, value, callback) {
322
        ],
327
        ],
323
        radius: [
328
        radius: [
324
          {
329
          {
330
            required: true,
331
            message: '半径不能为空',
332
            trigger: 'blur'
333
          },
334
          {
325
            message: '请输入数字',
335
            message: '请输入数字',
326
            trigger: 'blur',
336
            trigger: 'blur',
327
            validator: function(rule, value, callback) {
337
            validator: function(rule, value, callback) {
379
  },
389
  },
380
  methods: {
390
  methods: {
381
    async getType() {
391
    async getType() {
382
      this.fullLoading = true
392
      // this.fullLoading = true
383
      await this.$test.post(services.equipment.EQUIPMENT_TYPE, {}
393
      await this.$test.post(services.equipment.EQUIPMENT_TYPE, {}
384
      ).then(res => {
394
      ).then(res => {
385
        // 请求成功处理...
395
        // 请求成功处理...
386
        this.fullLoading = false
396
        // this.fullLoading = false
387
        this.typeList = res.data
397
        this.typeList = res.data
388
      }).catch(res => {
398
      }).catch(res => {
389
        // 请求失败处理...
399
        // 请求失败处理...
445
    },
455
    },
446
    checkReptition(data) {
456
    checkReptition(data) {
447
      return new Promise((resolve) => {
457
      return new Promise((resolve) => {
448
        this.fullLoading = true
458
        // this.fullLoading = true
449
        this.$test.post(services.equipment.GET_EQUIPMENT, {
459
        this.$test.post(services.equipment.GET_EQUIPMENT, {
450
          pageNumber: 1,
460
          pageNumber: 1,
451
          pageSize: 10,
461
          pageSize: 10,
453
        }
463
        }
454
        ).then(res => {
464
        ).then(res => {
455
        // 请求成功处理...
465
        // 请求成功处理...
456
          this.fullLoading = false
466
        //   this.fullLoading = false
457
          console.log(res)
467
          console.log(res)
458
          if (res.data.totalPage > 0 && res.data.data[0].resourceToolId === this.updateRow.resourceToolId) {
468
          if (res.data.totalPage > 0 && res.data.data[0].resourceToolId === this.updateRow.resourceToolId) {
459
            resolve(false)
469
            resolve(false)
476
      this.getList()
486
      this.getList()
477
    },
487
    },
478
    cancel() {
488
    cancel() {
489
      this.$refs['formValidate'].resetFields()
490
      this.$refs['updateRow'].resetFields()
479
      this.modal = false
491
      this.modal = false
480
      this.updateModal = false
492
      this.updateModal = false
481
      this.formValidate = {
493
      this.formValidate = {
552
    },
564
    },
553
    handleClick(row) {
565
    handleClick(row) {
554
      this.updateModal = true
566
      this.updateModal = true
555
      console.log(row)
556
      var name
557
      this.typeList.forEach(element => {
558
        if (element.resourceToolType === row.resourceToolType) {
559
          name = element.name
567
      this.$test.post(services.equipment.GET_EQUIPMENT, {
568
        pageNumber: 1,
569
        pageSize: 1,
570
        data: {
571
          resourceToolType: '',
572
          resourceToolNameAsLike: '',
573
          resourceToolCode: row.resourceToolCode
560
        }
574
        }
575
      }).then(res => {
576
        // 请求成功处理...
577
        this.updateRow = res.data.data[0]
578
        var name
579
        this.typeList.forEach(element => {
580
          if (element.resourceToolType === this.updateRow.resourceToolType) {
581
            name = element.name
582
          }
583
        })
584
        this.updateRow.name = name
585
      }).catch(res => {
586
        // 请求失败处理...
561
      })
587
      })
562
      row.name = name
563
      this.updateRow = row
564
    },
588
    },
565
    remove(row) {
589
    remove(row) {
566
      this.delete([row.resourceToolId])
590
      this.delete([row.resourceToolId])

+ 5 - 29
ebc-middle-platform/src/modules/system-management/map-mark.vue

150
        <div class="left">
150
        <div class="left">
151
          <div class="header">
151
          <div class="header">
152
            <div>坐标列表</div>
152
            <div>坐标列表</div>
153
            <div class="import-down">
154
              <a href="javascript:void(0)" size="sm" @click="handleFile1()"
155
              >导入</a
156
              >
157
              <input
158
                id="file"
159
                type="file"
160
                accept="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
161
                style="display: none"
162
                @change="handleFile($event)"
163
              />
164
              <span class="mod-line">|</span>
165
              <a href="javascript:void(0)" size="sm" @click="downloadTemplate()"
166
              >下载模板</a
167
              >
168
            </div>
169
          </div>
153
          </div>
170
          <div>
154
          <div>
171
            <t-table :data="modalData" size="sm" height="500">
155
            <t-table :data="modalData" size="sm" height="500">
194
            <div>
178
            <div>
195
              2、可编辑坐标列表中的经纬度值调整对应点坐标,对应点在地图中处于选中态
179
              2、可编辑坐标列表中的经纬度值调整对应点坐标,对应点在地图中处于选中态
196
            </div>
180
            </div>
197
            <div>3、导入将清空已绘制信息</div>
198
          </div>
181
          </div>
199
        </div>
182
        </div>
200
        <div id="modalMap" class="right"></div>
183
        <div id="modalMap" class="right" style = "margin:0 auto;width: 100%;height:500px" ></div>
201
      </div>
184
      </div>
202
    </t-modal>
185
    </t-modal>
203
    <t-loading v-model="fullLoading" fullscreen tip="加载中...."></t-loading>
186
    <t-loading v-model="fullLoading" fullscreen tip="加载中...."></t-loading>
266
  },
249
  },
267
  methods: {
250
  methods: {
268
    getDepartmentsList() {
251
    getDepartmentsList() {
269
      this.fullLoading = true
252
      // this.fullLoading = true
270
      this.$test
253
      this.$test
271
        .post(services.workEmployee.GET_ALL_ORGANIZE, {})
254
        .post(services.workEmployee.GET_ALL_ORGANIZE, {})
272
        .then((res) => {
255
        .then((res) => {
273
          // 请求成功处理...
256
          // 请求成功处理...
274
          this.fullLoading = false
257
          // this.fullLoading = false
275
          this.departments = res.data
258
          this.departments = res.data
276
          // this.onReset()
259
          // this.onReset()
277
        })
260
        })
281
        })
264
        })
282
    },
265
    },
283
    getTagType() {
266
    getTagType() {
284
      this.fullLoading = true
267
      // this.fullLoading = true
285
      this.$test
268
      this.$test
286
        .post(services.mapTag.MAP_TAG_TYPE, {})
269
        .post(services.mapTag.MAP_TAG_TYPE, {})
287
        .then((res) => {
270
        .then((res) => {
288
          // 请求成功处理...
271
          // 请求成功处理...
289
          this.fullLoading = false
272
          // this.fullLoading = false
290
          console.log(res)
273
          console.log(res)
291
          this.markTypes = res.data
274
          this.markTypes = res.data
292
        })
275
        })
315
      this.polygonDrawer = Ai.DrawPolygon(this.map, options) // 初始化多边形绘制工具
298
      this.polygonDrawer = Ai.DrawPolygon(this.map, options) // 初始化多边形绘制工具
316
      this.polygonDrawer.enable() // 激活多边形绘制工具
299
      this.polygonDrawer.enable() // 激活多边形绘制工具
317
      this.map.on(AiDrawEvent.CREATED, (e) => {
300
      this.map.on(AiDrawEvent.CREATED, (e) => {
318
        // debugger
319
        console.log(e)
301
        console.log(e)
320
        this.layer = this.polygonDrawer.polygon(e) // 获取多边形信息
302
        this.layer = this.polygonDrawer.polygon(e) // 获取多边形信息
321
        var color
303
        var color
401
        .post(services.excel.EXPROT_MAP_TAG, params)
383
        .post(services.excel.EXPROT_MAP_TAG, params)
402
        .then((res) => {
384
        .then((res) => {
403
          // 请求成功处理...
385
          // 请求成功处理...
404
          // debugger
405
          console.log(res)
386
          console.log(res)
406
          this.downloadDoc(res.data)
387
          this.downloadDoc(res.data)
407
        })
388
        })
410
        })
391
        })
411
    },
392
    },
412
    downloadDoc(response) {
393
    downloadDoc(response) {
413
      // debugger
414
      var blob = new Blob([response], {
394
      var blob = new Blob([response], {
415
        type: 'application/vnd.ms-excel;charset=utf-8'
395
        type: 'application/vnd.ms-excel;charset=utf-8'
416
      })
396
      })
467
        })
447
        })
468
        return false
448
        return false
469
      }
449
      }
470
      // debugger
471
      if (this.markName === '') {
450
      if (this.markName === '') {
472
        this.$Confirm.warning({
451
        this.$Confirm.warning({
473
          title: '提示',
452
          title: '提示',
649
      var files = e.target.files
628
      var files = e.target.files
650
      var f = files[0]
629
      var f = files[0]
651
      var reader = new FileReader()
630
      var reader = new FileReader()
652
      // debugger
653
      reader.onload = function (e) {
631
      reader.onload = function (e) {
654
        // debugger
655
        var data = new Uint8Array(e.target.result)
632
        var data = new Uint8Array(e.target.result)
656
        var workbook = XLSX.read(data, { type: 'array' })
633
        var workbook = XLSX.read(data, { type: 'array' })
657
        /* DO SOMETHING WITH workbook HERE */
634
        /* DO SOMETHING WITH workbook HERE */
674
          5
651
          5
675
        ) // 地图定位
652
        ) // 地图定位
676
        // that.map.center =  []
653
        // that.map.center =  []
677
        // debugger
678
        coverWktStr_blue = coverWktStr_blue.substring(
654
        coverWktStr_blue = coverWktStr_blue.substring(
679
          0,
655
          0,
680
          coverWktStr_blue.length - 1
656
          coverWktStr_blue.length - 1

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

328
      this.$test.post(services.device.GET_ASSOCIATINFO, {bindType: '1', name: name} // 查询人员
328
      this.$test.post(services.device.GET_ASSOCIATINFO, {bindType: '1', name: name} // 查询人员
329
      ).then(res => {
329
      ).then(res => {
330
        // 请求成功处理...
330
        // 请求成功处理...
331
        debugger
332
        this.currentLoading = false
331
        this.currentLoading = false
333
        this.itemList[0].goList = res.data
332
        this.itemList[0].goList = res.data
334
      }).catch(res => {
333
      }).catch(res => {
469
            that.getList()
468
            that.getList()
470
          }).catch(res => {
469
          }).catch(res => {
471
            // 请求失败处理...
470
            // 请求失败处理...
471
            that.fullLoading = false
472
          })
472
          })
473
        } else {
473
        } else {
474
          this.$Message.danger('表单验证失败!')
474
          this.$Message.danger('表单验证失败!')