Sfoglia il codice sorgente

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

konghl 4 anni fa
parent
commit
8c949cdf78

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

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

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

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

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

34
      </div>
34
      </div>
35
      <div class="search-ctn" style="justify-content: flex-end;">
35
      <div class="search-ctn" style="justify-content: flex-end;">
36
        <div class="btns">
36
        <div class="btns">
37
          <t-button color="success" icon="plus-outline" @click="addEquipment">新增</t-button>
37
          <t-button color="success" icon="upload-outline" @click="onReset">导入</t-button>
38
          <t-button color="success" icon="upload-outline" @click="onReset">导入</t-button>
38
          <t-button color="success" icon="download-outline" @click="onReset">下载模板</t-button>
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
        </div>
40
        </div>
41
      </div>
41
      </div>
42
    </div>
42
    </div>
61
            </div>
61
            </div>
62
          </template>
62
          </template>
63
        </t-table-column>
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
        <t-table-column
66
        <t-table-column
67
            fixed="right"
67
            fixed="right"
68
            label="操作"
68
            label="操作"
84
               @on-change="onPagerChange">
84
               @on-change="onPagerChange">
85
      </t-pager>
85
      </t-pager>
86
    </div>
86
    </div>
87
    <t-modal :visibled.sync="modal" title="新增设备" >
87
    <t-modal :visibled.sync="modal":mask-closable="false" title="新增设备" >
88
      <t-form ref="formValidate" :model="formValidate" :rules="ruleValidate" :label-width="80" label-position="left">
88
      <t-form ref="formValidate" :model="formValidate" :rules="ruleValidate" :label-width="80" label-position="left">
89
        <t-form-item label="设备类型" prop="type">
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
            <t-option v-for="(item, index) in typeList" :value="item.value" :key="index">{{ item.label }}</t-option>
91
            <t-option v-for="(item, index) in typeList" :value="item.value" :key="index">{{ item.label }}</t-option>
92
          </t-select>
92
          </t-select>
93
        </t-form-item>
93
        </t-form-item>
94
        <t-form-item label="设备名称" prop="name">
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
        </t-form-item>
96
        </t-form-item>
97
        <t-form-item label="设备编号" prop="number">
97
        <t-form-item label="设备编号" prop="number">
98
          <t-input v-model="formValidate.number" placeholder="请输入字母、数字、中划线、下划线、#"></t-input>
98
          <t-input v-model="formValidate.number" placeholder="请输入字母、数字、中划线、下划线、#"></t-input>
99
        </t-form-item>
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
      </t-form>
110
      </t-form>
107
      <div slot="footer">
111
      <div slot="footer">
108
        <t-button @click="cancel">取消</t-button>
112
        <t-button @click="cancel">取消</t-button>
109
        <t-button class="submit-button" @click="submit">保存</t-button>
113
        <t-button class="submit-button" @click="submit">保存</t-button>
110
      </div>
114
      </div>
111
    </t-modal>
115
    </t-modal>
112
    <t-modal :visibled.sync="updateModal" title="编辑设备" >
116
    <t-modal :visibled.sync="updateModal":mask-closable="false" title="编辑设备" >
113
      <t-form ref="updateRow" :model="updateRow" :rules="updateRowValidate" :label-width="80" label-position="left">
117
      <t-form ref="updateRow" :model="updateRow" :rules="updateRowValidate" :label-width="80" label-position="left">
114
        <t-form-item label="设备类型" prop="FACILITY_TYPE">
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
            <t-option v-for="(item, index) in typeList" :value="item.value" :key="index">{{ item.label }}</t-option>
120
            <t-option v-for="(item, index) in typeList" :value="item.value" :key="index">{{ item.label }}</t-option>
117
          </t-select>
121
          </t-select>
118
        </t-form-item>
122
        </t-form-item>
119
        <t-form-item label="设备名称" prop="FACILITY_NAME">
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
        </t-form-item>
125
        </t-form-item>
122
        <t-form-item label="设备编号" prop="FACILITY_CODE">
126
        <t-form-item label="设备编号" prop="FACILITY_CODE">
123
          {{ updateRow.FACILITY_CODE }}
127
          {{ updateRow.FACILITY_CODE }}
124
        </t-form-item>
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
      </t-form>
139
      </t-form>
132
      <div slot="footer">
140
      <div slot="footer">
133
        <t-button @click="cancel">取消</t-button>
141
        <t-button @click="cancel">取消</t-button>
148
      // currentLoading_n: false,
156
      // currentLoading_n: false,
149
      // searchResult_n: [],
157
      // searchResult_n: [],
150
      // demoDataA_n: [],
158
      // demoDataA_n: [],
159
      lngLatDisabled: false,
151
      typeList: [
160
      typeList: [
152
        {
161
        {
153
          value: '001',
162
          value: '001',
454
      this.formValidate.lng = ''
463
      this.formValidate.lng = ''
455
      this.formValidate.lat = ''
464
      this.formValidate.lat = ''
456
      this.table.pager.currentPage = 1
465
      this.table.pager.currentPage = 1
457
      this.getList()
458
    },
466
    },
459
    submit() {
467
    submit() {
460
      this.$refs.formValidate.validate(valid => {
468
      this.$refs.formValidate.validate(valid => {
474
          ).then(res => {
482
          ).then(res => {
475
            // 请求成功处理...
483
            // 请求成功处理...
476
            this.$Message.success('提交成功!')
484
            this.$Message.success('提交成功!')
485
            this.getList()
477
            this.cancel()
486
            this.cancel()
478
          }).catch(res => {
487
          }).catch(res => {
479
            // 请求失败处理...
488
            // 请求失败处理...
501
          ).then(res => {
510
          ).then(res => {
502
            // 请求成功处理...
511
            // 请求成功处理...
503
            this.$Message.success('提交成功!')
512
            this.$Message.success('提交成功!')
513
            this.getList()
504
            this.cancel()
514
            this.cancel()
505
          }).catch(res => {
515
          }).catch(res => {
506
            // 请求失败处理...
516
            // 请求失败处理...
511
      })
521
      })
512
    },
522
    },
513
    addEquipment() {
523
    addEquipment() {
524
      this.lngLatDisabled = false
514
      this.modal = true
525
      this.modal = true
515
    },
526
    },
516
    handleClick(row) {
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
    remove(row) {
542
    remove(row) {
521
      let that = this
543
      let that = this
540
        }
562
        }
541
      }
563
      }
542
      this.$Confirm.confirm(confirm)
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
      </div>
27
      </div>
28
      <div class="search-ctn" style="justify-content: flex-end;">
28
      <div class="search-ctn" style="justify-content: flex-end;">
29
        <div class="btns">
29
        <div class="btns">
30
          <t-button color="success" icon="plus-outline" @click="addTerminal">新增</t-button>
30
          <t-button color="success" icon="upload-outline" @click="onReset">导入</t-button>
31
          <t-button color="success" icon="upload-outline" @click="onReset">导入</t-button>
31
          <t-button color="success" icon="download-outline" @click="onReset">下载模板</t-button>
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
        </div>
33
        </div>
34
      </div>
34
      </div>
35
    </div>
35
    </div>
575
      this.updateModal = true
575
      this.updateModal = true
576
      this.updateFormValidate.number = row.deviceNo
576
      this.updateFormValidate.number = row.deviceNo
577
      this.updateFormValidate.id = row.deviceId
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
    handleClickUser(row) {
584
    handleClickUser(row) {
581
      this.initItemList()
585
      this.initItemList()