Browse Source

修改提交

chenxr3 4 years ago
parent
commit
626a7699ce

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

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

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

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

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

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