瀏覽代碼

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

konghl 4 年之前
父節點
當前提交
8c949cdf78

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

@ -155,7 +155,8 @@ export default {
155 155
    GET_EQUIPMENT: '/equipment/queryEquipmentInfo', // 查询设备管理信息
156 156
    ADD_EQUIPMENT: '/equipment/modifyEquipmentInfo', // 新增/修改设备管理信息
157 157
    DEL_EQUIPMENT: '/equipment/deleteEquipmentInfo', // 删除设备管理信息
158
    REPETITION_EQUIPMENT: '/equipment/verifyEquipmentInfoRepetition' // 删除设备管理信息
158
    REPETITION_EQUIPMENT: '/equipment/verifyEquipmentInfoRepetition', // 删除设备管理信息
159
    GET_ONE_EQUIPMENT: '/equipment/queryOneEquipmentInfo' // 查询单个设备信息
159 160
  },
160 161
  device: {
161 162
    GET_ASSOCIATINFO: '/device/queryAssociatInfo', // 关联列表信息查询

+ 0 - 1
ebc-middle-platform/src/modules/attendance/track.vue

@ -91,7 +91,6 @@ export default {
91 91
        .post(services.trackAnalysis.GET_TRACKANALYSIS, params)
92 92
        .then((res) => {
93 93
        // 请求成功处理...
94
          debugger
95 94
          this.table.data = res.data.result.list
96 95
          this.table.pager.total = res.data.result.total
97 96
        })

+ 61 - 24
ebc-middle-platform/src/modules/system-management/equipment-management.vue

@ -34,9 +34,9 @@
34 34
      </div>
35 35
      <div class="search-ctn" style="justify-content: flex-end;">
36 36
        <div class="btns">
37
          <t-button color="success" icon="plus-outline" @click="addEquipment">新增</t-button>
37 38
          <t-button color="success" icon="upload-outline" @click="onReset">导入</t-button>
38 39
          <t-button color="success" icon="download-outline" @click="onReset">下载模板</t-button>
39
          <t-button color="success" icon="plus-outline" @click="addEquipment">新增</t-button>
40 40
        </div>
41 41
      </div>
42 42
    </div>
@ -61,8 +61,8 @@
61 61
            </div>
62 62
          </template>
63 63
        </t-table-column>
64
        <t-table-column prop="LONGITUDE" label="经度"></t-table-column>
65
        <t-table-column prop="LATITUDE" label="纬度"></t-table-column>
64
        <t-table-column :formatter="longLatFormatter" prop="LONGITUDE" label="经度"></t-table-column>
65
        <t-table-column :formatter="longLatFormatter" prop="LATITUDE" label="纬度"></t-table-column>
66 66
        <t-table-column
67 67
            fixed="right"
68 68
            label="操作"
@ -84,50 +84,58 @@
84 84
               @on-change="onPagerChange">
85 85
      </t-pager>
86 86
    </div>
87
    <t-modal :visibled.sync="modal" title="新增设备" >
87
    <t-modal :visibled.sync="modal":mask-closable="false" title="新增设备" >
88 88
      <t-form ref="formValidate" :model="formValidate" :rules="ruleValidate" :label-width="80" label-position="left">
89 89
        <t-form-item label="设备类型" prop="type">
90
          <t-select v-model="formValidate.type" placeholder="请选择设备类型" clearable>
90
          <t-select v-model="formValidate.type" placeholder="请选择设备类型" clearable @change="typeChange(1)">
91 91
            <t-option v-for="(item, index) in typeList" :value="item.value" :key="index">{{ item.label }}</t-option>
92 92
          </t-select>
93 93
        </t-form-item>
94 94
        <t-form-item label="设备名称" prop="name">
95
          <t-input v-model="formValidate.name" placeholder="请输入风机名称"></t-input>
95
          <t-input v-model="formValidate.name" placeholder="请输入设备名称"></t-input>
96 96
        </t-form-item>
97 97
        <t-form-item label="设备编号" prop="number">
98 98
          <t-input v-model="formValidate.number" placeholder="请输入字母、数字、中划线、下划线、#"></t-input>
99 99
        </t-form-item>
100
        <t-form-item label="经度" prop="lng">
101
          <t-input v-model="formValidate.lng" placeholder="请输入数字"></t-input>
102
           </t-form-item>
103
        <t-form-item label="纬度" prop="lat">
104
          <t-input v-model="formValidate.lat" placeholder="请输入数字"></t-input>
105
        </t-form-item>
100
        <div v-if="!lngLatDisabled">
101
          <t-form-item label="经度" prop="lng">
102
               <t-format-input v-model="formValidate.lng" numeral numeral-decimal-scale=8 placeholder="请输入数字"></t-format-input>
103
          </t-form-item>
104
        </div>
105
        <div v-if="!lngLatDisabled">
106
          <t-form-item label="纬度" prop="lat">
107
            <t-format-input v-model="formValidate.lat" numeral numeral-decimal-scale=8 placeholder="请输入数字"></t-format-input>
108
          </t-form-item>
109
        </div>
106 110
      </t-form>
107 111
      <div slot="footer">
108 112
        <t-button @click="cancel">取消</t-button>
109 113
        <t-button class="submit-button" @click="submit">保存</t-button>
110 114
      </div>
111 115
    </t-modal>
112
    <t-modal :visibled.sync="updateModal" title="编辑设备" >
116
    <t-modal :visibled.sync="updateModal":mask-closable="false" title="编辑设备" >
113 117
      <t-form ref="updateRow" :model="updateRow" :rules="updateRowValidate" :label-width="80" label-position="left">
114 118
        <t-form-item label="设备类型" prop="FACILITY_TYPE">
115
          <t-select v-model="updateRow.FACILITY_TYPE" placeholder="请选择设备类型" clearable>
119
          <t-select v-model="updateRow.FACILITY_TYPE" placeholder="请选择设备类型" clearable @change="typeChange(2)">
116 120
            <t-option v-for="(item, index) in typeList" :value="item.value" :key="index">{{ item.label }}</t-option>
117 121
          </t-select>
118 122
        </t-form-item>
119 123
        <t-form-item label="设备名称" prop="FACILITY_NAME">
120
          <t-input v-model="updateRow.FACILITY_NAME" placeholder="请输入风机名称"></t-input>
124
          <t-input v-model="updateRow.FACILITY_NAME" placeholder="请输入设备名称"></t-input>
121 125
        </t-form-item>
122 126
        <t-form-item label="设备编号" prop="FACILITY_CODE">
123 127
          {{ updateRow.FACILITY_CODE }}
124 128
        </t-form-item>
125
        <t-form-item label="经度" prop="LONGITUDE">
126
          <t-input v-model="updateRow.LONGITUDE" placeholder="请输入数字"></t-input>
127
           </t-form-item>
128
        <t-form-item label="纬度" prop="LATITUDE">
129
          <t-input v-model="updateRow.LATITUDE" placeholder="请输入数字"></t-input>
130
        </t-form-item>
129
        <div v-if="!lngLatDisabled">
130
          <t-form-item label="经度" prop="LONGITUDE">
131
               <t-format-input v-model="updateRow.LONGITUDE" numeral numeral-decimal-scale=8 placeholder="请输入数字"></t-format-input>
132
          </t-form-item>
133
        </div>
134
        <div v-if="!lngLatDisabled">
135
          <t-form-item label="纬度" prop="LATITUDE">
136
            <t-format-input v-model="updateRow.LATITUDE" numeral numeral-decimal-scale=8 placeholder="请输入数字"></t-format-input>
137
          </t-form-item>
138
        </div>
131 139
      </t-form>
132 140
      <div slot="footer">
133 141
        <t-button @click="cancel">取消</t-button>
@ -148,6 +156,7 @@ export default {
148 156
      // currentLoading_n: false,
149 157
      // searchResult_n: [],
150 158
      // demoDataA_n: [],
159
      lngLatDisabled: false,
151 160
      typeList: [
152 161
        {
153 162
          value: '001',
@ -454,7 +463,6 @@ export default {
454 463
      this.formValidate.lng = ''
455 464
      this.formValidate.lat = ''
456 465
      this.table.pager.currentPage = 1
457
      this.getList()
458 466
    },
459 467
    submit() {
460 468
      this.$refs.formValidate.validate(valid => {
@ -474,6 +482,7 @@ export default {
474 482
          ).then(res => {
475 483
            // 请求成功处理...
476 484
            this.$Message.success('提交成功!')
485
            this.getList()
477 486
            this.cancel()
478 487
          }).catch(res => {
479 488
            // 请求失败处理...
@ -501,6 +510,7 @@ export default {
501 510
          ).then(res => {
502 511
            // 请求成功处理...
503 512
            this.$Message.success('提交成功!')
513
            this.getList()
504 514
            this.cancel()
505 515
          }).catch(res => {
506 516
            // 请求失败处理...
@ -511,11 +521,23 @@ export default {
511 521
      })
512 522
    },
513 523
    addEquipment() {
524
      this.lngLatDisabled = false
514 525
      this.modal = true
515 526
    },
516 527
    handleClick(row) {
517
      this.updateModal = true
518
      this.updateRow = row
528
      var params = new FormData()
529
      params.append('data', JSON.stringify({
530
        FACILITY_ID: row.FACILITY_ID
531
      }))
532
      this.$test.post(services.equipment.GET_ONE_EQUIPMENT, params
533
      ).then(res => {
534
        // 请求成功处理...
535
        this.updateModal = true
536
        this.updateRow = res.data.resultData
537
        this.typeChange(2)
538
      }).catch(res => {
539
        // 请求失败处理...
540
      })
519 541
    },
520 542
    remove(row) {
521 543
      let that = this
@ -540,6 +562,21 @@ export default {
540 562
        }
541 563
      }
542 564
      this.$Confirm.confirm(confirm)
565
    },
566
    longLatFormatter(cjsj, column, cellValue, index) {
567
      if (cjsj.FACILITY_TYPE==1) {
568
        return '--'
569
      }
570
      return cellValue
571
    },
572
    typeChange(t) {
573
      var value
574
      if (t === 1) {
575
        value = this.formValidate.type
576
      } else {
577
        value = this.updateRow.FACILITY_TYPE
578
      }
579
      this.lngLatDisabled = (value == 1)
543 580
    }
544 581
  }
545 582
}

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

@ -27,9 +27,9 @@
27 27
      </div>
28 28
      <div class="search-ctn" style="justify-content: flex-end;">
29 29
        <div class="btns">
30
          <t-button color="success" icon="plus-outline" @click="addTerminal">新增</t-button>
30 31
          <t-button color="success" icon="upload-outline" @click="onReset">导入</t-button>
31 32
          <t-button color="success" icon="download-outline" @click="onReset">下载模板</t-button>
32
          <t-button color="success" icon="plus-outline" @click="addTerminal">新增</t-button>
33 33
        </div>
34 34
      </div>
35 35
    </div>
@ -575,7 +575,11 @@ export default {
575 575
      this.updateModal = true
576 576
      this.updateFormValidate.number = row.deviceNo
577 577
      this.updateFormValidate.id = row.deviceId
578
      this.updateFormValidate.desc = row.remarks
578
      if (row.remarks === '无') {
579
        this.updateFormValidate.desc = ''
580
      } else {
581
        this.updateFormValidate.desc = row.remarks
582
      }
579 583
    },
580 584
    handleClickUser(row) {
581 585
      this.initItemList()