lipengtao 6 years ago
parent
commit
08b11bf8ba

+ 5 - 2
src/views/baseInfoManage/boxesConfig/index.vue

@ -215,7 +215,7 @@ export default {
215 215
              setTimeout(function() {
216 216
                that.pop('已成功添加采集盒')
217 217
              }, 1000)
218
              this.resetForm(this.ruleForm2)
218
              this.resetForm('ruleForm2')
219 219
              this.dialogTableVisible = false
220 220
            }).catch(error => {
221 221
              console.log(error)
@ -334,7 +334,10 @@ export default {
334 334
      this.dialogTableVisible = true
335 335
    },
336 336
    handleUpdate(row) {
337
      this.resetTemp(row)
337
      const that = this
338
      setTimeout(function() {
339
        that.resetTemp(row)
340
      }, 500)
338 341
      this.dialogTableVisible = true
339 342
    },
340 343
    querySearchAsync(queryString, cb) {

+ 6 - 3
src/views/baseInfoManage/bridgesInfo/index.vue

@ -320,7 +320,7 @@ export default {
320 320
              setTimeout(function() {
321 321
                that.pop('已成功添加桥梁')
322 322
              }, 1000)
323
              this.resetForm(this.ruleForm2)
323
              this.resetForm('ruleForm2')
324 324
              this.dialogTableVisible = false
325 325
            }).catch(error => {
326 326
              console.log(error)
@ -441,9 +441,12 @@ export default {
441 441
      this.dialogTableVisible = true
442 442
    },
443 443
    handleUpdate(row) {
444
      this.resetTemp(row)
444
      const that = this
445
      setTimeout(function() {
446
        that.resetTemp(row)
447
        that.imageUrl = '/data/bridge' + row.img
448
      }, 500)
445 449
      this.dialogTableVisible = true
446
      this.imageUrl = '/data/bridge' + row.img
447 450
    },
448 451
    handleSelect(item) {
449 452
      this.ruleForm2.deviceId = item.id

+ 5 - 2
src/views/baseInfoManage/sensorsConfig/index.vue

@ -266,7 +266,7 @@ export default {
266 266
              setTimeout(function() {
267 267
                that.pop('已成功添加传感器')
268 268
              }, 1000)
269
              this.resetForm(this.ruleForm2)
269
              this.resetForm('ruleForm2')
270 270
              this.dialogTableVisible = false
271 271
            }).catch(error => {
272 272
              console.log(error)
@ -383,7 +383,10 @@ export default {
383 383
      this.dialogTableVisible = true
384 384
    },
385 385
    handleUpdate(row) {
386
      this.resetTemp(row)
386
      const that = this
387
      setTimeout(function() {
388
        that.resetTemp(row)
389
      }, 500)
387 390
      this.dialogTableVisible = true
388 391
    },
389 392
    querySearchAsync(queryString, cb) {

+ 5 - 2
src/views/baseInfoManage/serversConfig/index.vue

@ -215,7 +215,7 @@ export default {
215 215
              setTimeout(function() {
216 216
                that.pop('已成功添加服务器')
217 217
              }, 1000)
218
              this.resetForm(this.ruleForm2)
218
              this.resetForm('ruleForm2')
219 219
              this.dialogTableVisible = false
220 220
            }).catch(error => {
221 221
              console.log(error)
@ -330,7 +330,10 @@ export default {
330 330
      this.dialogTableVisible = true
331 331
    },
332 332
    handleUpdate(row) {
333
      this.resetTemp(row)
333
      const that = this
334
      setTimeout(function() {
335
        that.resetTemp(row)
336
      }, 500)
334 337
      this.dialogTableVisible = true
335 338
    },
336 339
    querySearchAsync(queryString, cb) {

+ 31 - 25
src/views/city/linkage.vue

@ -41,7 +41,7 @@ export default {
41 41
  props: ['addrCode'],
42 42
  data() {
43 43
    return {
44
      mapJson: '../../static/map.json',
44
      firstFlag: false,
45 45
      province: [],
46 46
      sheng: '',
47 47
      shi: '',
@ -54,30 +54,7 @@ export default {
54 54
  },
55 55
  watch: {
56 56
    addrCode: function() {
57
      if (!this.addrCode) {
58
        this.sheng = ''
59
        this.shi = ''
60
        this.qu = ''
61
        return
62
      }
63
      const s = this.addrCode.substring(0, 2) + '0000'
64
      const si = this.addrCode.substring(0, 4) + '00'
65
      const x = this.addrCode
66
      this.province.map(item => {
67
        if (item.id === s) {
68
          this.sheng = item.value
69
          item.children.map(item => {
70
            if (item.id === si) {
71
              this.shi = item.value
72
              item.children.map(item => {
73
                if (x === item.id) {
74
                  this.qu = item.value
75
                }
76
              })
77
            }
78
          })
79
        }
80
      })
57
      this.initpsq()
81 58
    }
82 59
  },
83 60
  methods: {
@ -114,6 +91,9 @@ export default {
114 91
              }
115 92
            }
116 93
          }
94
          if (!that.firstFlag) {
95
            that.initpsq()
96
          }
117 97
        } else {
118 98
          console.log(response.status)
119 99
        }
@ -151,6 +131,32 @@ export default {
151 131
      }
152 132
      this.E = e
153 133
      this.$emit('paren', this.E)
134
    },
135
    initpsq: function() {
136
      if (!this.addrCode) {
137
        this.sheng = ''
138
        this.shi = ''
139
        this.qu = ''
140
        return
141
      }
142
      const s = this.addrCode.substring(0, 2) + '0000'
143
      const si = this.addrCode.substring(0, 4) + '00'
144
      const x = this.addrCode
145
      this.province.map(item => {
146
        if (item.id === s) {
147
          this.sheng = item.value
148
          item.children.map(item => {
149
            if (item.id === si) {
150
              this.shi = item.value
151
              item.children.map(item => {
152
                if (x === item.id) {
153
                  this.qu = item.value
154
                }
155
              })
156
            }
157
          })
158
        }
159
      })
154 160
    }
155 161
  },
156 162
  created: function() {