diff --git a/src/api/gasOverview.js b/src/api/gasOverview.js index e0b52d4..00d5fce 100644 --- a/src/api/gasOverview.js +++ b/src/api/gasOverview.js @@ -12,11 +12,18 @@ } // 气体流量计数量 -export function deviceCount(params) { +// export function deviceCount(params) { +// return request({ +// url: 'device/count/15', +// method: 'get', +// params +// }) +// } +// 气体流量计数量 +export function deviceCount(type) { return request({ - url: 'device/count/15', - method: 'get', - params + url: 'device/count/' + type, + method: 'get' }) } diff --git a/src/api/gasOverview.js b/src/api/gasOverview.js index e0b52d4..00d5fce 100644 --- a/src/api/gasOverview.js +++ b/src/api/gasOverview.js @@ -12,11 +12,18 @@ } // 气体流量计数量 -export function deviceCount(params) { +// export function deviceCount(params) { +// return request({ +// url: 'device/count/15', +// method: 'get', +// params +// }) +// } +// 气体流量计数量 +export function deviceCount(type) { return request({ - url: 'device/count/15', - method: 'get', - params + url: 'device/count/' + type, + method: 'get' }) } diff --git a/src/views/dashboard/components/waterNote.vue b/src/views/dashboard/components/waterNote.vue index 8717f74..1d916ab 100644 --- a/src/views/dashboard/components/waterNote.vue +++ b/src/views/dashboard/components/waterNote.vue @@ -91,7 +91,11 @@ return { list: this.currentList, content: item.content, num: index, type: '1' } }) console.log(currentList) - updateNoteList(currentList).then(res => { + const params = { + type: '1', + list: currentList + } + updateNoteList(params).then(res => { this.editMode = false this.$message.success('保存成功') }).catch(e => { diff --git a/src/api/gasOverview.js b/src/api/gasOverview.js index e0b52d4..00d5fce 100644 --- a/src/api/gasOverview.js +++ b/src/api/gasOverview.js @@ -12,11 +12,18 @@ } // 气体流量计数量 -export function deviceCount(params) { +// export function deviceCount(params) { +// return request({ +// url: 'device/count/15', +// method: 'get', +// params +// }) +// } +// 气体流量计数量 +export function deviceCount(type) { return request({ - url: 'device/count/15', - method: 'get', - params + url: 'device/count/' + type, + method: 'get' }) } diff --git a/src/views/dashboard/components/waterNote.vue b/src/views/dashboard/components/waterNote.vue index 8717f74..1d916ab 100644 --- a/src/views/dashboard/components/waterNote.vue +++ b/src/views/dashboard/components/waterNote.vue @@ -91,7 +91,11 @@ return { list: this.currentList, content: item.content, num: index, type: '1' } }) console.log(currentList) - updateNoteList(currentList).then(res => { + const params = { + type: '1', + list: currentList + } + updateNoteList(params).then(res => { this.editMode = false this.$message.success('保存成功') }).catch(e => { diff --git a/src/views/gasDashboard/components/PanelGroup.vue b/src/views/gasDashboard/components/PanelGroup.vue index 3c21739..12eccf9 100644 --- a/src/views/gasDashboard/components/PanelGroup.vue +++ b/src/views/gasDashboard/components/PanelGroup.vue @@ -89,7 +89,7 @@ }) }, getDeviceCount() { - deviceCount().then(response => { + deviceCount('15').then(response => { this.dataGroup[0].context = response.data }) }, diff --git a/src/api/gasOverview.js b/src/api/gasOverview.js index e0b52d4..00d5fce 100644 --- a/src/api/gasOverview.js +++ b/src/api/gasOverview.js @@ -12,11 +12,18 @@ } // 气体流量计数量 -export function deviceCount(params) { +// export function deviceCount(params) { +// return request({ +// url: 'device/count/15', +// method: 'get', +// params +// }) +// } +// 气体流量计数量 +export function deviceCount(type) { return request({ - url: 'device/count/15', - method: 'get', - params + url: 'device/count/' + type, + method: 'get' }) } diff --git a/src/views/dashboard/components/waterNote.vue b/src/views/dashboard/components/waterNote.vue index 8717f74..1d916ab 100644 --- a/src/views/dashboard/components/waterNote.vue +++ b/src/views/dashboard/components/waterNote.vue @@ -91,7 +91,11 @@ return { list: this.currentList, content: item.content, num: index, type: '1' } }) console.log(currentList) - updateNoteList(currentList).then(res => { + const params = { + type: '1', + list: currentList + } + updateNoteList(params).then(res => { this.editMode = false this.$message.success('保存成功') }).catch(e => { diff --git a/src/views/gasDashboard/components/PanelGroup.vue b/src/views/gasDashboard/components/PanelGroup.vue index 3c21739..12eccf9 100644 --- a/src/views/gasDashboard/components/PanelGroup.vue +++ b/src/views/gasDashboard/components/PanelGroup.vue @@ -89,7 +89,7 @@ }) }, getDeviceCount() { - deviceCount().then(response => { + deviceCount('15').then(response => { this.dataGroup[0].context = response.data }) }, diff --git a/src/views/gasDashboard/components/waterNote.vue b/src/views/gasDashboard/components/waterNote.vue index 0b705fc..9388294 100644 --- a/src/views/gasDashboard/components/waterNote.vue +++ b/src/views/gasDashboard/components/waterNote.vue @@ -66,7 +66,6 @@ // ] // this.originList = JSON.parse(JSON.stringify(this.currentList)) getNoteList('2').then(response => { - console.log(response, '=====1234') this.currentList = JSON.parse(response.data) }) }, @@ -92,16 +91,12 @@ return { content: item.content, num: index } }) console.log(currentList) -<<<<<<< HEAD - updateNoteList(currentList).then(res => { -======= const params = { type: '1', list: currentList } updateNoteList(params).then(res => { console.log(res, '======7890') ->>>>>>> e6bfd4632c0a242465974fc63c94bbb267c63d41 this.editMode = false this.$message.success('保存成功') }).catch(e => { @@ -153,5 +148,4 @@ background-color: #FFFFFF; } } - diff --git a/src/api/gasOverview.js b/src/api/gasOverview.js index e0b52d4..00d5fce 100644 --- a/src/api/gasOverview.js +++ b/src/api/gasOverview.js @@ -12,11 +12,18 @@ } // 气体流量计数量 -export function deviceCount(params) { +// export function deviceCount(params) { +// return request({ +// url: 'device/count/15', +// method: 'get', +// params +// }) +// } +// 气体流量计数量 +export function deviceCount(type) { return request({ - url: 'device/count/15', - method: 'get', - params + url: 'device/count/' + type, + method: 'get' }) } diff --git a/src/views/dashboard/components/waterNote.vue b/src/views/dashboard/components/waterNote.vue index 8717f74..1d916ab 100644 --- a/src/views/dashboard/components/waterNote.vue +++ b/src/views/dashboard/components/waterNote.vue @@ -91,7 +91,11 @@ return { list: this.currentList, content: item.content, num: index, type: '1' } }) console.log(currentList) - updateNoteList(currentList).then(res => { + const params = { + type: '1', + list: currentList + } + updateNoteList(params).then(res => { this.editMode = false this.$message.success('保存成功') }).catch(e => { diff --git a/src/views/gasDashboard/components/PanelGroup.vue b/src/views/gasDashboard/components/PanelGroup.vue index 3c21739..12eccf9 100644 --- a/src/views/gasDashboard/components/PanelGroup.vue +++ b/src/views/gasDashboard/components/PanelGroup.vue @@ -89,7 +89,7 @@ }) }, getDeviceCount() { - deviceCount().then(response => { + deviceCount('15').then(response => { this.dataGroup[0].context = response.data }) }, diff --git a/src/views/gasDashboard/components/waterNote.vue b/src/views/gasDashboard/components/waterNote.vue index 0b705fc..9388294 100644 --- a/src/views/gasDashboard/components/waterNote.vue +++ b/src/views/gasDashboard/components/waterNote.vue @@ -66,7 +66,6 @@ // ] // this.originList = JSON.parse(JSON.stringify(this.currentList)) getNoteList('2').then(response => { - console.log(response, '=====1234') this.currentList = JSON.parse(response.data) }) }, @@ -92,16 +91,12 @@ return { content: item.content, num: index } }) console.log(currentList) -<<<<<<< HEAD - updateNoteList(currentList).then(res => { -======= const params = { type: '1', list: currentList } updateNoteList(params).then(res => { console.log(res, '======7890') ->>>>>>> e6bfd4632c0a242465974fc63c94bbb267c63d41 this.editMode = false this.$message.success('保存成功') }).catch(e => { @@ -153,5 +148,4 @@ background-color: #FFFFFF; } } - diff --git a/src/views/gasOverview/gasOverviewSimple copy.vue b/src/views/gasOverview/gasOverviewSimple copy.vue new file mode 100644 index 0000000..8a725e7 --- /dev/null +++ b/src/views/gasOverview/gasOverviewSimple copy.vue @@ -0,0 +1,958 @@ + + + + + + + + + + + 搜索 + + + + + + + + + + + + + + + + + + + + + 告警列表 + + + + + + + + + + + {{ scope.row[column.value] }} + + + + + + + + + {{ item.name }} + + + + + + + + + + + + diff --git a/src/api/gasOverview.js b/src/api/gasOverview.js index e0b52d4..00d5fce 100644 --- a/src/api/gasOverview.js +++ b/src/api/gasOverview.js @@ -12,11 +12,18 @@ } // 气体流量计数量 -export function deviceCount(params) { +// export function deviceCount(params) { +// return request({ +// url: 'device/count/15', +// method: 'get', +// params +// }) +// } +// 气体流量计数量 +export function deviceCount(type) { return request({ - url: 'device/count/15', - method: 'get', - params + url: 'device/count/' + type, + method: 'get' }) } diff --git a/src/views/dashboard/components/waterNote.vue b/src/views/dashboard/components/waterNote.vue index 8717f74..1d916ab 100644 --- a/src/views/dashboard/components/waterNote.vue +++ b/src/views/dashboard/components/waterNote.vue @@ -91,7 +91,11 @@ return { list: this.currentList, content: item.content, num: index, type: '1' } }) console.log(currentList) - updateNoteList(currentList).then(res => { + const params = { + type: '1', + list: currentList + } + updateNoteList(params).then(res => { this.editMode = false this.$message.success('保存成功') }).catch(e => { diff --git a/src/views/gasDashboard/components/PanelGroup.vue b/src/views/gasDashboard/components/PanelGroup.vue index 3c21739..12eccf9 100644 --- a/src/views/gasDashboard/components/PanelGroup.vue +++ b/src/views/gasDashboard/components/PanelGroup.vue @@ -89,7 +89,7 @@ }) }, getDeviceCount() { - deviceCount().then(response => { + deviceCount('15').then(response => { this.dataGroup[0].context = response.data }) }, diff --git a/src/views/gasDashboard/components/waterNote.vue b/src/views/gasDashboard/components/waterNote.vue index 0b705fc..9388294 100644 --- a/src/views/gasDashboard/components/waterNote.vue +++ b/src/views/gasDashboard/components/waterNote.vue @@ -66,7 +66,6 @@ // ] // this.originList = JSON.parse(JSON.stringify(this.currentList)) getNoteList('2').then(response => { - console.log(response, '=====1234') this.currentList = JSON.parse(response.data) }) }, @@ -92,16 +91,12 @@ return { content: item.content, num: index } }) console.log(currentList) -<<<<<<< HEAD - updateNoteList(currentList).then(res => { -======= const params = { type: '1', list: currentList } updateNoteList(params).then(res => { console.log(res, '======7890') ->>>>>>> e6bfd4632c0a242465974fc63c94bbb267c63d41 this.editMode = false this.$message.success('保存成功') }).catch(e => { @@ -153,5 +148,4 @@ background-color: #FFFFFF; } } - diff --git a/src/views/gasOverview/gasOverviewSimple copy.vue b/src/views/gasOverview/gasOverviewSimple copy.vue new file mode 100644 index 0000000..8a725e7 --- /dev/null +++ b/src/views/gasOverview/gasOverviewSimple copy.vue @@ -0,0 +1,958 @@ + + + + + + + + + + + 搜索 + + + + + + + + + + + + + + + + + + + + + 告警列表 + + + + + + + + + + + {{ scope.row[column.value] }} + + + + + + + + + {{ item.name }} + + + + + + + + + + + + diff --git a/src/views/gasOverview/gasOverviewSimple.vue b/src/views/gasOverview/gasOverviewSimple.vue index cf9ebf6..cd9d7a2 100644 --- a/src/views/gasOverview/gasOverviewSimple.vue +++ b/src/views/gasOverview/gasOverviewSimple.vue @@ -226,61 +226,36 @@ handleCheckedCitiesChange(val) { console.log(val) if (val.length === 0) { - window.map.removeLayer(zs_model_layer) - window.map.removeLayer(fs_model_layer) - window.map.removeLayer(rq_model_layer) - window.map.removeLayer(qt_model_layer) - window.map.removeLayer(zs_icon_layer) - window.map.removeLayer(fs_icon_layer) - window.map.removeLayer(rq_icon_layer) - window.map.removeLayer(qt_icon_layer) - window.map.removeLayer(well_model_layer) + this.clearAllModel() } + this.clearAllModel() val.forEach(item => { - // if (item.indexOf('腐蚀速率监测仪') === -1) { - // window.map.removeLayer(zs_model_layer) - // window.map.removeLayer(rq_model_layer) - // window.map.removeLayer(qt_model_layer) - // window.map.removeLayer(zs_icon_layer) - // window.map.removeLayer(rq_icon_layer) - // window.map.removeLayer(qt_icon_layer) - // window.map.removeLayer(well_model_layer) - // this.wellMode() - // this.fsModel() - // } else if (item.indexOf('气体流量计') === -1) { - // window.map.removeLayer(zs_model_layer) - // window.map.removeLayer(rq_model_layer) - // window.map.removeLayer(fs_model_layer) - // window.map.removeLayer(zs_icon_layer) - // window.map.removeLayer(rq_icon_layer) - // window.map.removeLayer(fs_icon_layer) - // window.map.removeLayer(well_model_layer) - // this.wellMode() - // this.qtModel() - // } else if (item.indexOf('气体泄露监测仪') === -1) { - // window.map.removeLayer(zs_model_layer) - // window.map.removeLayer(qt_model_layer) - // window.map.removeLayer(fs_model_layer) - // window.map.removeLayer(zs_icon_layer) - // window.map.removeLayer(qt_icon_layer) - // window.map.removeLayer(fs_icon_layer) - // window.map.removeLayer(well_model_layer) - // this.wellMode() - // this.rqModel() - // } else - if (item.indexOf('供水泄露监测仪') === -1) { - window.map.removeLayer(rq_model_layer) - window.map.removeLayer(qt_model_layer) - window.map.removeLayer(fs_model_layer) - window.map.removeLayer(rq_icon_layer) - window.map.removeLayer(qt_icon_layer) - window.map.removeLayer(fs_icon_layer) - window.map.removeLayer(well_model_layer) + if (item.indexOf('腐蚀速率监测仪') !== -1) { this.wellMode() - this.zsModel() + this.fsModel() + } else if (item.indexOf('气体流量计') !== -1) { + this.wellMode() + this.qtModel() + } else if (item.indexOf('气体泄漏检测仪') !== -1) { + this.rqModel() + } else if (item.indexOf('供水泄漏检测仪') !== -1) { + this.wellMode() + this.zsMoel() } }) }, + // 清除所有设备图层 + clearAllModel() { + window.map.removeLayer(zs_model_layer) + window.map.removeLayer(fs_model_layer) + window.map.removeLayer(rq_model_layer) + window.map.removeLayer(qt_model_layer) + window.map.removeLayer(fs_icon_layer) + window.map.removeLayer(zs_icon_layer) + window.map.removeLayer(rq_icon_layer) + window.map.removeLayer(qt_icon_layer) + window.map.removeLayer(well_model_layer) + }, // 获取设备类型 fetchDeviceType() { getDeviceType(this.listQuery).then(response => { @@ -429,9 +404,9 @@ async initPoints() { this.wellMode() this.zsMoel() - // this.rqModel() - // this.qtModel() - // this.fsModel() + this.rqModel() + this.qtModel() + this.fsModel() }, // 井 wellMode() {