diff --git a/src/components/SelectTree/singleSelect.vue b/src/components/SelectTree/singleSelect.vue index c203b5d..5a032ad 100644 --- a/src/components/SelectTree/singleSelect.vue +++ b/src/components/SelectTree/singleSelect.vue @@ -103,7 +103,7 @@ // 输入框显示值 labelModel: '', // 实际请求传值 - valueModel: '0' + valueModel: '' } }, computed: { diff --git a/src/components/SelectTree/singleSelect.vue b/src/components/SelectTree/singleSelect.vue index c203b5d..5a032ad 100644 --- a/src/components/SelectTree/singleSelect.vue +++ b/src/components/SelectTree/singleSelect.vue @@ -103,7 +103,7 @@ // 输入框显示值 labelModel: '', // 实际请求传值 - valueModel: '0' + valueModel: '' } }, computed: { diff --git a/src/views/deviceManage/components/listLevelData.vue b/src/views/deviceManage/components/listLevelData.vue new file mode 100644 index 0000000..a140aa6 --- /dev/null +++ b/src/views/deviceManage/components/listLevelData.vue @@ -0,0 +1,142 @@ + + + + + diff --git a/src/components/SelectTree/singleSelect.vue b/src/components/SelectTree/singleSelect.vue index c203b5d..5a032ad 100644 --- a/src/components/SelectTree/singleSelect.vue +++ b/src/components/SelectTree/singleSelect.vue @@ -103,7 +103,7 @@ // 输入框显示值 labelModel: '', // 实际请求传值 - valueModel: '0' + valueModel: '' } }, computed: { diff --git a/src/views/deviceManage/components/listLevelData.vue b/src/views/deviceManage/components/listLevelData.vue new file mode 100644 index 0000000..a140aa6 --- /dev/null +++ b/src/views/deviceManage/components/listLevelData.vue @@ -0,0 +1,142 @@ + + + + + diff --git a/src/views/deviceManage/components/listPressureData.vue b/src/views/deviceManage/components/listPressureData.vue new file mode 100644 index 0000000..3fb58a7 --- /dev/null +++ b/src/views/deviceManage/components/listPressureData.vue @@ -0,0 +1,155 @@ + + + + + diff --git a/src/components/SelectTree/singleSelect.vue b/src/components/SelectTree/singleSelect.vue index c203b5d..5a032ad 100644 --- a/src/components/SelectTree/singleSelect.vue +++ b/src/components/SelectTree/singleSelect.vue @@ -103,7 +103,7 @@ // 输入框显示值 labelModel: '', // 实际请求传值 - valueModel: '0' + valueModel: '' } }, computed: { diff --git a/src/views/deviceManage/components/listLevelData.vue b/src/views/deviceManage/components/listLevelData.vue new file mode 100644 index 0000000..a140aa6 --- /dev/null +++ b/src/views/deviceManage/components/listLevelData.vue @@ -0,0 +1,142 @@ + + + + + diff --git a/src/views/deviceManage/components/listPressureData.vue b/src/views/deviceManage/components/listPressureData.vue new file mode 100644 index 0000000..3fb58a7 --- /dev/null +++ b/src/views/deviceManage/components/listPressureData.vue @@ -0,0 +1,155 @@ + + + + + diff --git a/src/views/deviceManage/detailDevice.vue b/src/views/deviceManage/detailDevice.vue index c501fde..ce6ce89 100644 --- a/src/views/deviceManage/detailDevice.vue +++ b/src/views/deviceManage/detailDevice.vue @@ -63,6 +63,8 @@ import listHydrantData from './components/listHydrantData' import listWellLocaData from './components/listWellLocaData' import ListH2SData from './components/listH2SData' +import listLevelData from './components/listLevelData' +import listPressureData from './components/listPressureData' import SingleGasDetectorData from '@/views/deviceManage/components/listGasDetectorData' export default { @@ -80,7 +82,9 @@ listTubeData, listWellcoverData, listWellLocaData, - listHydrantData + listHydrantData, + listPressureData, + listLevelData }, data() { return { @@ -112,7 +116,9 @@ '10': 'list-liquid-gas-data', '11': 'list-hydrant-data', '12': 'list-tube-data', + '13': 'list-level-data', '14': 'list-h2-s-data', + '31': 'list-pressure-data', '101': 'single-gas-detector-data' } // 组件对照表 } @@ -124,6 +130,8 @@ this.deviceForm = row // 展示相对应的设备列表组件 this.cmpName = this.compDict[row.deviceType] + console.log(row.deviceType, 'row.deviceType') + console.log(this.cmpName, 'this.cmpName') setTimeout(() => { this.$refs.dataDetail.init() }, 100) diff --git a/src/components/SelectTree/singleSelect.vue b/src/components/SelectTree/singleSelect.vue index c203b5d..5a032ad 100644 --- a/src/components/SelectTree/singleSelect.vue +++ b/src/components/SelectTree/singleSelect.vue @@ -103,7 +103,7 @@ // 输入框显示值 labelModel: '', // 实际请求传值 - valueModel: '0' + valueModel: '' } }, computed: { diff --git a/src/views/deviceManage/components/listLevelData.vue b/src/views/deviceManage/components/listLevelData.vue new file mode 100644 index 0000000..a140aa6 --- /dev/null +++ b/src/views/deviceManage/components/listLevelData.vue @@ -0,0 +1,142 @@ + + + + + diff --git a/src/views/deviceManage/components/listPressureData.vue b/src/views/deviceManage/components/listPressureData.vue new file mode 100644 index 0000000..3fb58a7 --- /dev/null +++ b/src/views/deviceManage/components/listPressureData.vue @@ -0,0 +1,155 @@ + + + + + diff --git a/src/views/deviceManage/detailDevice.vue b/src/views/deviceManage/detailDevice.vue index c501fde..ce6ce89 100644 --- a/src/views/deviceManage/detailDevice.vue +++ b/src/views/deviceManage/detailDevice.vue @@ -63,6 +63,8 @@ import listHydrantData from './components/listHydrantData' import listWellLocaData from './components/listWellLocaData' import ListH2SData from './components/listH2SData' +import listLevelData from './components/listLevelData' +import listPressureData from './components/listPressureData' import SingleGasDetectorData from '@/views/deviceManage/components/listGasDetectorData' export default { @@ -80,7 +82,9 @@ listTubeData, listWellcoverData, listWellLocaData, - listHydrantData + listHydrantData, + listPressureData, + listLevelData }, data() { return { @@ -112,7 +116,9 @@ '10': 'list-liquid-gas-data', '11': 'list-hydrant-data', '12': 'list-tube-data', + '13': 'list-level-data', '14': 'list-h2-s-data', + '31': 'list-pressure-data', '101': 'single-gas-detector-data' } // 组件对照表 } @@ -124,6 +130,8 @@ this.deviceForm = row // 展示相对应的设备列表组件 this.cmpName = this.compDict[row.deviceType] + console.log(row.deviceType, 'row.deviceType') + console.log(this.cmpName, 'this.cmpName') setTimeout(() => { this.$refs.dataDetail.init() }, 100) diff --git a/src/views/deviceStatics/components/deviceCountByOffline.vue b/src/views/deviceStatics/components/deviceCountByOffline.vue index 44c02f9..a71765b 100644 --- a/src/views/deviceStatics/components/deviceCountByOffline.vue +++ b/src/views/deviceStatics/components/deviceCountByOffline.vue @@ -5,7 +5,7 @@
离线设备 - {{ total }} + {{ offline }}
@@ -145,6 +145,7 @@ }, // 查询条件 list: [], // 返回列表 total: 0, // 离线设备总数 + offline: 0, // 离线设备总数 listLoading: false, deviceTypeList: [], // 设备类型列表 columns: [ @@ -165,9 +166,12 @@ getOfflineDeviceList(this.listQuery).then(response => { this.tableOption.total = response.data.total this.total = response.data.total - this.list = response.data.rows + this.list = response.data.rows || [] this.listLoading = false }).catch(_ => { this.listLoading = false }) + deviceStaticByStatus().then(res => { + this.offline = res.data.offline + }) }, // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 changePage(val) { diff --git a/src/components/SelectTree/singleSelect.vue b/src/components/SelectTree/singleSelect.vue index c203b5d..5a032ad 100644 --- a/src/components/SelectTree/singleSelect.vue +++ b/src/components/SelectTree/singleSelect.vue @@ -103,7 +103,7 @@ // 输入框显示值 labelModel: '', // 实际请求传值 - valueModel: '0' + valueModel: '' } }, computed: { diff --git a/src/views/deviceManage/components/listLevelData.vue b/src/views/deviceManage/components/listLevelData.vue new file mode 100644 index 0000000..a140aa6 --- /dev/null +++ b/src/views/deviceManage/components/listLevelData.vue @@ -0,0 +1,142 @@ + + + + + diff --git a/src/views/deviceManage/components/listPressureData.vue b/src/views/deviceManage/components/listPressureData.vue new file mode 100644 index 0000000..3fb58a7 --- /dev/null +++ b/src/views/deviceManage/components/listPressureData.vue @@ -0,0 +1,155 @@ + + + + + diff --git a/src/views/deviceManage/detailDevice.vue b/src/views/deviceManage/detailDevice.vue index c501fde..ce6ce89 100644 --- a/src/views/deviceManage/detailDevice.vue +++ b/src/views/deviceManage/detailDevice.vue @@ -63,6 +63,8 @@ import listHydrantData from './components/listHydrantData' import listWellLocaData from './components/listWellLocaData' import ListH2SData from './components/listH2SData' +import listLevelData from './components/listLevelData' +import listPressureData from './components/listPressureData' import SingleGasDetectorData from '@/views/deviceManage/components/listGasDetectorData' export default { @@ -80,7 +82,9 @@ listTubeData, listWellcoverData, listWellLocaData, - listHydrantData + listHydrantData, + listPressureData, + listLevelData }, data() { return { @@ -112,7 +116,9 @@ '10': 'list-liquid-gas-data', '11': 'list-hydrant-data', '12': 'list-tube-data', + '13': 'list-level-data', '14': 'list-h2-s-data', + '31': 'list-pressure-data', '101': 'single-gas-detector-data' } // 组件对照表 } @@ -124,6 +130,8 @@ this.deviceForm = row // 展示相对应的设备列表组件 this.cmpName = this.compDict[row.deviceType] + console.log(row.deviceType, 'row.deviceType') + console.log(this.cmpName, 'this.cmpName') setTimeout(() => { this.$refs.dataDetail.init() }, 100) diff --git a/src/views/deviceStatics/components/deviceCountByOffline.vue b/src/views/deviceStatics/components/deviceCountByOffline.vue index 44c02f9..a71765b 100644 --- a/src/views/deviceStatics/components/deviceCountByOffline.vue +++ b/src/views/deviceStatics/components/deviceCountByOffline.vue @@ -5,7 +5,7 @@
离线设备 - {{ total }} + {{ offline }}
@@ -145,6 +145,7 @@ }, // 查询条件 list: [], // 返回列表 total: 0, // 离线设备总数 + offline: 0, // 离线设备总数 listLoading: false, deviceTypeList: [], // 设备类型列表 columns: [ @@ -165,9 +166,12 @@ getOfflineDeviceList(this.listQuery).then(response => { this.tableOption.total = response.data.total this.total = response.data.total - this.list = response.data.rows + this.list = response.data.rows || [] this.listLoading = false }).catch(_ => { this.listLoading = false }) + deviceStaticByStatus().then(res => { + this.offline = res.data.offline + }) }, // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 changePage(val) { diff --git a/src/views/deviceStatics/components/deviceCountByType.vue b/src/views/deviceStatics/components/deviceCountByType.vue index cdba870..b2023ce 100644 --- a/src/views/deviceStatics/components/deviceCountByType.vue +++ b/src/views/deviceStatics/components/deviceCountByType.vue @@ -39,7 +39,7 @@ // 获取各类型设备数量 fetchDeviceType() { deviceStaticsByType().then(response => { - this.chartData.rows = response.data + // this.chartData.rows = response.data || [] }) }, // 获取全部设备数量, 离线设备数量 diff --git a/src/components/SelectTree/singleSelect.vue b/src/components/SelectTree/singleSelect.vue index c203b5d..5a032ad 100644 --- a/src/components/SelectTree/singleSelect.vue +++ b/src/components/SelectTree/singleSelect.vue @@ -103,7 +103,7 @@ // 输入框显示值 labelModel: '', // 实际请求传值 - valueModel: '0' + valueModel: '' } }, computed: { diff --git a/src/views/deviceManage/components/listLevelData.vue b/src/views/deviceManage/components/listLevelData.vue new file mode 100644 index 0000000..a140aa6 --- /dev/null +++ b/src/views/deviceManage/components/listLevelData.vue @@ -0,0 +1,142 @@ + + + + + diff --git a/src/views/deviceManage/components/listPressureData.vue b/src/views/deviceManage/components/listPressureData.vue new file mode 100644 index 0000000..3fb58a7 --- /dev/null +++ b/src/views/deviceManage/components/listPressureData.vue @@ -0,0 +1,155 @@ + + + + + diff --git a/src/views/deviceManage/detailDevice.vue b/src/views/deviceManage/detailDevice.vue index c501fde..ce6ce89 100644 --- a/src/views/deviceManage/detailDevice.vue +++ b/src/views/deviceManage/detailDevice.vue @@ -63,6 +63,8 @@ import listHydrantData from './components/listHydrantData' import listWellLocaData from './components/listWellLocaData' import ListH2SData from './components/listH2SData' +import listLevelData from './components/listLevelData' +import listPressureData from './components/listPressureData' import SingleGasDetectorData from '@/views/deviceManage/components/listGasDetectorData' export default { @@ -80,7 +82,9 @@ listTubeData, listWellcoverData, listWellLocaData, - listHydrantData + listHydrantData, + listPressureData, + listLevelData }, data() { return { @@ -112,7 +116,9 @@ '10': 'list-liquid-gas-data', '11': 'list-hydrant-data', '12': 'list-tube-data', + '13': 'list-level-data', '14': 'list-h2-s-data', + '31': 'list-pressure-data', '101': 'single-gas-detector-data' } // 组件对照表 } @@ -124,6 +130,8 @@ this.deviceForm = row // 展示相对应的设备列表组件 this.cmpName = this.compDict[row.deviceType] + console.log(row.deviceType, 'row.deviceType') + console.log(this.cmpName, 'this.cmpName') setTimeout(() => { this.$refs.dataDetail.init() }, 100) diff --git a/src/views/deviceStatics/components/deviceCountByOffline.vue b/src/views/deviceStatics/components/deviceCountByOffline.vue index 44c02f9..a71765b 100644 --- a/src/views/deviceStatics/components/deviceCountByOffline.vue +++ b/src/views/deviceStatics/components/deviceCountByOffline.vue @@ -5,7 +5,7 @@
离线设备 - {{ total }} + {{ offline }}
@@ -145,6 +145,7 @@ }, // 查询条件 list: [], // 返回列表 total: 0, // 离线设备总数 + offline: 0, // 离线设备总数 listLoading: false, deviceTypeList: [], // 设备类型列表 columns: [ @@ -165,9 +166,12 @@ getOfflineDeviceList(this.listQuery).then(response => { this.tableOption.total = response.data.total this.total = response.data.total - this.list = response.data.rows + this.list = response.data.rows || [] this.listLoading = false }).catch(_ => { this.listLoading = false }) + deviceStaticByStatus().then(res => { + this.offline = res.data.offline + }) }, // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 changePage(val) { diff --git a/src/views/deviceStatics/components/deviceCountByType.vue b/src/views/deviceStatics/components/deviceCountByType.vue index cdba870..b2023ce 100644 --- a/src/views/deviceStatics/components/deviceCountByType.vue +++ b/src/views/deviceStatics/components/deviceCountByType.vue @@ -39,7 +39,7 @@ // 获取各类型设备数量 fetchDeviceType() { deviceStaticsByType().then(response => { - this.chartData.rows = response.data + // this.chartData.rows = response.data || [] }) }, // 获取全部设备数量, 离线设备数量 diff --git a/src/views/wellManage/addWell.vue b/src/views/wellManage/addWell.vue index 786ccb8..93006d7 100644 --- a/src/views/wellManage/addWell.vue +++ b/src/views/wellManage/addWell.vue @@ -159,7 +159,7 @@ - + @@ -299,6 +299,10 @@ area() { // 获取街道 return this.wellForm.area } + , + getPositin() { + return [this.wellForm.coordinateX || this.$store.getters.lng, this.wellForm.coordinateY || this.$store.getters.lat] + } }, watch: { firstDept(val) { // 监控权属单位变化 @@ -324,6 +328,7 @@ methods: { // 地图选点后的回调 getMapPostion(positionForm) { + console.log(positionForm, 'positionForm') // TODO: 此处获取的是高德坐标 this.wellForm.lngGaode = positionForm.longitude this.wellForm.latGaode = positionForm.latitude @@ -348,6 +353,7 @@ this.wellForm.position = res.formattedAddress // 完整地址 this.wellForm.qu = res.addressComponent.adcode // 区编码 this.wellForm.road = res.addressComponent.street // 道路 + // this.wellForm.area = res.addressComponent.towncode // 镇 }) }) } @@ -389,6 +395,18 @@ getAreaByDept(this.wellForm.deptid).then(response => { if (response.code === 200) { const pid = response.data.area + convertLnglat([response.data.lng, response.data.lat]).then(lnglat => { + // 2.逆地址解析 + reverseLnglat(lnglat).then(res => { + this.wellForm.lngGaode = response.data.lng + this.wellForm.latGaode = response.data.lat + this.wellForm.coordinateX = response.data.lng + this.wellForm.coordinateY = response.data.lat + this.wellForm.position = res.formattedAddress // 完整地址 + this.wellForm.qu = res.addressComponent.adcode // 区编码 + this.wellForm.road = res.addressComponent.street // 道路 + }) + }) getAreaList(pid).then(response => { this.quList = response.data }) diff --git a/src/components/SelectTree/singleSelect.vue b/src/components/SelectTree/singleSelect.vue index c203b5d..5a032ad 100644 --- a/src/components/SelectTree/singleSelect.vue +++ b/src/components/SelectTree/singleSelect.vue @@ -103,7 +103,7 @@ // 输入框显示值 labelModel: '', // 实际请求传值 - valueModel: '0' + valueModel: '' } }, computed: { diff --git a/src/views/deviceManage/components/listLevelData.vue b/src/views/deviceManage/components/listLevelData.vue new file mode 100644 index 0000000..a140aa6 --- /dev/null +++ b/src/views/deviceManage/components/listLevelData.vue @@ -0,0 +1,142 @@ + + + + + diff --git a/src/views/deviceManage/components/listPressureData.vue b/src/views/deviceManage/components/listPressureData.vue new file mode 100644 index 0000000..3fb58a7 --- /dev/null +++ b/src/views/deviceManage/components/listPressureData.vue @@ -0,0 +1,155 @@ + + + + + diff --git a/src/views/deviceManage/detailDevice.vue b/src/views/deviceManage/detailDevice.vue index c501fde..ce6ce89 100644 --- a/src/views/deviceManage/detailDevice.vue +++ b/src/views/deviceManage/detailDevice.vue @@ -63,6 +63,8 @@ import listHydrantData from './components/listHydrantData' import listWellLocaData from './components/listWellLocaData' import ListH2SData from './components/listH2SData' +import listLevelData from './components/listLevelData' +import listPressureData from './components/listPressureData' import SingleGasDetectorData from '@/views/deviceManage/components/listGasDetectorData' export default { @@ -80,7 +82,9 @@ listTubeData, listWellcoverData, listWellLocaData, - listHydrantData + listHydrantData, + listPressureData, + listLevelData }, data() { return { @@ -112,7 +116,9 @@ '10': 'list-liquid-gas-data', '11': 'list-hydrant-data', '12': 'list-tube-data', + '13': 'list-level-data', '14': 'list-h2-s-data', + '31': 'list-pressure-data', '101': 'single-gas-detector-data' } // 组件对照表 } @@ -124,6 +130,8 @@ this.deviceForm = row // 展示相对应的设备列表组件 this.cmpName = this.compDict[row.deviceType] + console.log(row.deviceType, 'row.deviceType') + console.log(this.cmpName, 'this.cmpName') setTimeout(() => { this.$refs.dataDetail.init() }, 100) diff --git a/src/views/deviceStatics/components/deviceCountByOffline.vue b/src/views/deviceStatics/components/deviceCountByOffline.vue index 44c02f9..a71765b 100644 --- a/src/views/deviceStatics/components/deviceCountByOffline.vue +++ b/src/views/deviceStatics/components/deviceCountByOffline.vue @@ -5,7 +5,7 @@
离线设备 - {{ total }} + {{ offline }}
@@ -145,6 +145,7 @@ }, // 查询条件 list: [], // 返回列表 total: 0, // 离线设备总数 + offline: 0, // 离线设备总数 listLoading: false, deviceTypeList: [], // 设备类型列表 columns: [ @@ -165,9 +166,12 @@ getOfflineDeviceList(this.listQuery).then(response => { this.tableOption.total = response.data.total this.total = response.data.total - this.list = response.data.rows + this.list = response.data.rows || [] this.listLoading = false }).catch(_ => { this.listLoading = false }) + deviceStaticByStatus().then(res => { + this.offline = res.data.offline + }) }, // 页数发生变化后的操作,可能是页码变化,可能是每页容量变化,此函数必写 changePage(val) { diff --git a/src/views/deviceStatics/components/deviceCountByType.vue b/src/views/deviceStatics/components/deviceCountByType.vue index cdba870..b2023ce 100644 --- a/src/views/deviceStatics/components/deviceCountByType.vue +++ b/src/views/deviceStatics/components/deviceCountByType.vue @@ -39,7 +39,7 @@ // 获取各类型设备数量 fetchDeviceType() { deviceStaticsByType().then(response => { - this.chartData.rows = response.data + // this.chartData.rows = response.data || [] }) }, // 获取全部设备数量, 离线设备数量 diff --git a/src/views/wellManage/addWell.vue b/src/views/wellManage/addWell.vue index 786ccb8..93006d7 100644 --- a/src/views/wellManage/addWell.vue +++ b/src/views/wellManage/addWell.vue @@ -159,7 +159,7 @@ - + @@ -299,6 +299,10 @@ area() { // 获取街道 return this.wellForm.area } + , + getPositin() { + return [this.wellForm.coordinateX || this.$store.getters.lng, this.wellForm.coordinateY || this.$store.getters.lat] + } }, watch: { firstDept(val) { // 监控权属单位变化 @@ -324,6 +328,7 @@ methods: { // 地图选点后的回调 getMapPostion(positionForm) { + console.log(positionForm, 'positionForm') // TODO: 此处获取的是高德坐标 this.wellForm.lngGaode = positionForm.longitude this.wellForm.latGaode = positionForm.latitude @@ -348,6 +353,7 @@ this.wellForm.position = res.formattedAddress // 完整地址 this.wellForm.qu = res.addressComponent.adcode // 区编码 this.wellForm.road = res.addressComponent.street // 道路 + // this.wellForm.area = res.addressComponent.towncode // 镇 }) }) } @@ -389,6 +395,18 @@ getAreaByDept(this.wellForm.deptid).then(response => { if (response.code === 200) { const pid = response.data.area + convertLnglat([response.data.lng, response.data.lat]).then(lnglat => { + // 2.逆地址解析 + reverseLnglat(lnglat).then(res => { + this.wellForm.lngGaode = response.data.lng + this.wellForm.latGaode = response.data.lat + this.wellForm.coordinateX = response.data.lng + this.wellForm.coordinateY = response.data.lat + this.wellForm.position = res.formattedAddress // 完整地址 + this.wellForm.qu = res.addressComponent.adcode // 区编码 + this.wellForm.road = res.addressComponent.street // 道路 + }) + }) getAreaList(pid).then(response => { this.quList = response.data }) diff --git a/src/views/wellManage/detailMapLonLat.vue b/src/views/wellManage/detailMapLonLat.vue index 27ea317..aa157e4 100644 --- a/src/views/wellManage/detailMapLonLat.vue +++ b/src/views/wellManage/detailMapLonLat.vue @@ -7,6 +7,7 @@