diff --git a/src/assets/case/status_dealing.png b/src/assets/case/status_dealing.png deleted file mode 100644 index f553650..0000000 --- a/src/assets/case/status_dealing.png +++ /dev/null Binary files differ diff --git a/src/assets/case/status_dealing.png b/src/assets/case/status_dealing.png deleted file mode 100644 index f553650..0000000 --- a/src/assets/case/status_dealing.png +++ /dev/null Binary files differ diff --git a/src/assets/case/status_done.png b/src/assets/case/status_done.png deleted file mode 100644 index 9b3ecb8..0000000 --- a/src/assets/case/status_done.png +++ /dev/null Binary files differ diff --git a/src/assets/case/status_dealing.png b/src/assets/case/status_dealing.png deleted file mode 100644 index f553650..0000000 --- a/src/assets/case/status_dealing.png +++ /dev/null Binary files differ diff --git a/src/assets/case/status_done.png b/src/assets/case/status_done.png deleted file mode 100644 index 9b3ecb8..0000000 --- a/src/assets/case/status_done.png +++ /dev/null Binary files differ diff --git a/src/assets/case/status_overTime.png b/src/assets/case/status_overTime.png new file mode 100644 index 0000000..9b3ecb8 --- /dev/null +++ b/src/assets/case/status_overTime.png Binary files differ diff --git a/src/assets/case/status_dealing.png b/src/assets/case/status_dealing.png deleted file mode 100644 index f553650..0000000 --- a/src/assets/case/status_dealing.png +++ /dev/null Binary files differ diff --git a/src/assets/case/status_done.png b/src/assets/case/status_done.png deleted file mode 100644 index 9b3ecb8..0000000 --- a/src/assets/case/status_done.png +++ /dev/null Binary files differ diff --git a/src/assets/case/status_overTime.png b/src/assets/case/status_overTime.png new file mode 100644 index 0000000..9b3ecb8 --- /dev/null +++ b/src/assets/case/status_overTime.png Binary files differ diff --git a/src/assets/case/status_toCheck.png b/src/assets/case/status_toCheck.png new file mode 100644 index 0000000..19a8d89 --- /dev/null +++ b/src/assets/case/status_toCheck.png Binary files differ diff --git a/src/assets/case/status_dealing.png b/src/assets/case/status_dealing.png deleted file mode 100644 index f553650..0000000 --- a/src/assets/case/status_dealing.png +++ /dev/null Binary files differ diff --git a/src/assets/case/status_done.png b/src/assets/case/status_done.png deleted file mode 100644 index 9b3ecb8..0000000 --- a/src/assets/case/status_done.png +++ /dev/null Binary files differ diff --git a/src/assets/case/status_overTime.png b/src/assets/case/status_overTime.png new file mode 100644 index 0000000..9b3ecb8 --- /dev/null +++ b/src/assets/case/status_overTime.png Binary files differ diff --git a/src/assets/case/status_toCheck.png b/src/assets/case/status_toCheck.png new file mode 100644 index 0000000..19a8d89 --- /dev/null +++ b/src/assets/case/status_toCheck.png Binary files differ diff --git a/src/assets/case/status_toHandle.png b/src/assets/case/status_toHandle.png new file mode 100644 index 0000000..fea9fe9 --- /dev/null +++ b/src/assets/case/status_toHandle.png Binary files differ diff --git a/src/assets/case/status_dealing.png b/src/assets/case/status_dealing.png deleted file mode 100644 index f553650..0000000 --- a/src/assets/case/status_dealing.png +++ /dev/null Binary files differ diff --git a/src/assets/case/status_done.png b/src/assets/case/status_done.png deleted file mode 100644 index 9b3ecb8..0000000 --- a/src/assets/case/status_done.png +++ /dev/null Binary files differ diff --git a/src/assets/case/status_overTime.png b/src/assets/case/status_overTime.png new file mode 100644 index 0000000..9b3ecb8 --- /dev/null +++ b/src/assets/case/status_overTime.png Binary files differ diff --git a/src/assets/case/status_toCheck.png b/src/assets/case/status_toCheck.png new file mode 100644 index 0000000..19a8d89 --- /dev/null +++ b/src/assets/case/status_toCheck.png Binary files differ diff --git a/src/assets/case/status_toHandle.png b/src/assets/case/status_toHandle.png new file mode 100644 index 0000000..fea9fe9 --- /dev/null +++ b/src/assets/case/status_toHandle.png Binary files differ diff --git a/src/assets/case/status_toVerify.png b/src/assets/case/status_toVerify.png new file mode 100644 index 0000000..f553650 --- /dev/null +++ b/src/assets/case/status_toVerify.png Binary files differ diff --git a/src/assets/case/status_dealing.png b/src/assets/case/status_dealing.png deleted file mode 100644 index f553650..0000000 --- a/src/assets/case/status_dealing.png +++ /dev/null Binary files differ diff --git a/src/assets/case/status_done.png b/src/assets/case/status_done.png deleted file mode 100644 index 9b3ecb8..0000000 --- a/src/assets/case/status_done.png +++ /dev/null Binary files differ diff --git a/src/assets/case/status_overTime.png b/src/assets/case/status_overTime.png new file mode 100644 index 0000000..9b3ecb8 --- /dev/null +++ b/src/assets/case/status_overTime.png Binary files differ diff --git a/src/assets/case/status_toCheck.png b/src/assets/case/status_toCheck.png new file mode 100644 index 0000000..19a8d89 --- /dev/null +++ b/src/assets/case/status_toCheck.png Binary files differ diff --git a/src/assets/case/status_toHandle.png b/src/assets/case/status_toHandle.png new file mode 100644 index 0000000..fea9fe9 --- /dev/null +++ b/src/assets/case/status_toHandle.png Binary files differ diff --git a/src/assets/case/status_toVerify.png b/src/assets/case/status_toVerify.png new file mode 100644 index 0000000..f553650 --- /dev/null +++ b/src/assets/case/status_toVerify.png Binary files differ diff --git a/src/views/supControl/supControl.vue b/src/views/supControl/supControl.vue index a6532ac..510d96e 100644 --- a/src/views/supControl/supControl.vue +++ b/src/views/supControl/supControl.vue @@ -121,19 +121,30 @@ import SupStatisPanel from '@/views/supControl/SupStatisPanel' import { getCaseType, getCaseDetailType } from '@/api/callCase/callCase' import Leaflet from 'leaflet' -import markerIcon from 'leaflet/dist/images/marker-icon.png' -import markerIcon2x from 'leaflet/dist/images/marker-icon-2x.png' -import markerShadow from 'leaflet/dist/images/marker-shadow.png' -const greenIcon = Leaflet.icon({ - iconUrl: require('@/assets/case/status_dealing.png'), // icon阴影图片路径 - iconSize: [19, 31], // size of the icon - iconAnchor: [10, 31], // point of the icon which will correspond to marker's location - popupAnchor: [-0, -32] // point from which the popup should open relative to the iconAnchor +const toHandleIcon = Leaflet.icon({ + iconUrl: require('@/assets/case/status_toHandle.png'), + iconSize: [19, 31], + iconAnchor: [10, 31], + popupAnchor: [-0, -32] +}) + +const toVerifyIcon = Leaflet.icon({ + iconUrl: require('@/assets/case/status_toVerify.png'), + iconSize: [19, 31], + iconAnchor: [10, 31], + popupAnchor: [-0, -32] +}) + +const toCheckIcon = Leaflet.icon({ + iconUrl: require('@/assets/case/status_toCheck.png'), + iconSize: [19, 31], + iconAnchor: [10, 31], + popupAnchor: [-0, -32] }) const redIcon = Leaflet.icon({ - iconUrl: require('@/assets/case/status_done.png'), // icon阴影图片路径 + iconUrl: require('@/assets/case/status_overTime.png'), // icon阴影图片路径 iconSize: [19, 31], // size of the icon iconAnchor: [10, 31], // point of the icon which will correspond to marker's location popupAnchor: [-0, -32] // point from which the popup should open relative to the iconAnchor @@ -201,7 +212,15 @@ toCheckListOt: [], // 待核查超时 toCheckListNot: [], // 待核查 toHandleListOt: [], // 处置中超时 - toHandleListNot: [] // 处置中 + toHandleListNot: [], // 处置中 + layerGroup: [], + toVerifyCaseNot: null, + toVerifyCaseOt: null, + toCheckCaseNot: null, + toCheckCaseOt: null, + toHandleCaseNot: null, + toHandleCaseOt: null, + imageBaseUrl: this.baseConfig.baseUrl + '/static/' } }, computed: { @@ -233,6 +252,13 @@ mounted() { this.initMap() this.switchContent() + + this.layerGroup.push(this.toVerifyCaseNot) + this.layerGroup.push(this.toVerifyCaseOt) + this.layerGroup.push(this.toCheckCaseNot) + this.layerGroup.push(this.toCheckCaseOt) + this.layerGroup.push(this.toHandleCaseNot) + this.layerGroup.push(this.toHandleCaseOt) }, methods: { handleTimeTermChanged: function(caseCounts) { @@ -256,27 +282,64 @@ this.showCaseSelect = true this.showPartsSelect = false this.showPersonSelect = false - // 查询四个状态的案卷列表 - this.queryCaseList() + // 查询三个状态的案卷列表 + this.queryCaseToVerify() + this.queryCaseToCheck() + this.queryCaseToHandle() } }, // 切换不同案卷状态的显示与否 changeCaseScope: function() { // isOverTime: ''--全部,'Ot'--超时,'Not'--未超时 // caseStatusCode: 'toHandle'--待处置,'toVerify'--待核实,'toCheck'--待核查 - const filterStr = this.parts.caseStatusCode + 'Case' + this.isOverTime + let filterIndex = [] - graphicLayerIds.forEach(item => { - if (item.indexOf(filterStr) < 0) { - // 非案卷类图层全部隐藏 - this.showGraphicLayer(item, false) + const that = this + if (this.parts.caseStatusCode === '') { + if (this.isOverTime === 'Not') { + filterIndex = [0, 2, 4] + } else if (this.isOverTime === 'Ot') { + filterIndex = [1, 3, 5] } else { - this.showGraphicLayer(item, true) + filterIndex = [0, 1, 2, 3, 4, 5] } + } else if (this.parts.caseStatusCode === 'toHandle') { + if (this.isOverTime === 'Not') { + filterIndex = [4] + } else if (this.isOverTime === 'Ot') { + filterIndex = [5] + } else { + filterIndex = [4, 5] + } + } else if (this.parts.caseStatusCode === 'toVerify') { + if (this.isOverTime === 'Not') { + filterIndex = [0] + } else if (this.isOverTime === 'Ot') { + filterIndex = [1] + } else { + filterIndex = [0, 1] + } + } else if (this.parts.caseStatusCode === 'toCheck') { + if (this.isOverTime === 'Not') { + filterIndex = [2] + } else if (this.isOverTime === 'Ot') { + filterIndex = [3] + } else { + filterIndex = [2, 3] + } + } + + // 清除所有的图层 + this.layerGroup.forEach(item => { + that.map.removeLayer(item) + }) + + // 重新添加指定状态的图层 + filterIndex.forEach(i => { + that.layerGroup[i].addTo(that.map) }) }, - // 查询案卷列表 - queryCaseList: function() { + queryCaseToVerify: function() { const that = this const onePageParam = { limit: 1000, @@ -289,8 +352,6 @@ method: 'get', params: onePageParam }).then(response => { - console.log('待核实:') - console.log(response) if (response.code === 200) { if (response.data.total > 0) { // 查询有新结果时清除原有的列表 @@ -303,11 +364,20 @@ } else { // 未超时 that.toVerifyListNot.push(item) } - that.addCasePointOnMap(item) }) + + this.addCasePointOnMap(this.toVerifyListNot, this.toVerifyCaseNot, toVerifyIcon) + this.addCasePointOnMap(this.toVerifyListOt, this.toVerifyCaseOt, redIcon) } } }) + }, + queryCaseToCheck() { + const that = this + const onePageParam = { + limit: 1000, + offset: 1 + } // 查询待核查案卷 request({ @@ -315,8 +385,6 @@ method: 'get', params: onePageParam }).then(response => { - console.log('待核查:') - console.log(response) if (response.code === 200) { if (response.data.total > 0) { // 查询有新结果时清除原有的列表 @@ -329,11 +397,20 @@ } else { // 未超时 that.toCheckListNot.push(item) } - that.addCasePointOnMap(item) }) + + this.addCasePointOnMap(this.toCheckListNot, this.toCheckCaseNot, toCheckIcon) + this.addCasePointOnMap(this.toCheckListOt, this.toCheckCaseOt, redIcon) } } }) + }, + queryCaseToHandle() { + const that = this + const onePageParam = { + limit: 1000, + offset: 1 + } // 查询处理中案卷 request({ @@ -341,8 +418,6 @@ method: 'get', params: onePageParam }).then(response => { - console.log('处理中:') - console.log(response) if (response.code === 200) { if (response.data.total > 0) { // 查询有新结果时清除原有的列表 @@ -355,8 +430,10 @@ } else { // 未超时 that.toHandleListNot.push(item) } - that.addCasePointOnMap(item) }) + + this.addCasePointOnMap(this.toHandleListNot, this.toHandleCaseNot, toHandleIcon) + this.addCasePointOnMap(this.toHandleListOt, this.toHandleCaseOt, redIcon) } } }) @@ -418,53 +495,40 @@ clearPoint: function() { }, - addPictureMarkerOnMap: function(points, icon, layerId) { - const that = this - const gLayer = this.selectGraphicLayerById(layerId) - points.forEach(item => { - if (item.lng !== '' && item.lat !== '') { - const point = new that.esriObj.Point(item.lng, item.lat, item) - const marker = new that.esriObj.PictureMarkerSymbol(icon, 10, 15) - const graphic = new that.esriObj.Graphic({ - geometry: point, - symbol: marker, - attributes: item - }) - gLayer.items[0].add(graphic) + addCasePointOnMap: function(caseList, layerGroup, icon) { + caseList.forEach(caseDetail => { + let popupStr = '