diff --git a/src/api/threat.js b/src/api/threat.js index 21b08f6..e2495ae 100644 --- a/src/api/threat.js +++ b/src/api/threat.js @@ -6,55 +6,31 @@ import Vue from 'vue' // 水保隐患 -export function getWaterThreat() { +export function getThreat(type) { const baseConfig = Vue.prototype.baseConfig const { sign, username, timestamp } = getSignTimeStamp() return request({ url: baseConfig.biUrl + '/factdata/index/getData', method: 'post', data: { - 'showField': 'WD01_03,WD54_03,WD56_03,DES01,DES02,DES03,DES04,DES04,DES05,DES06,DES07,DES08,DES09,DES10', - 'indexId': '07D36AD4AE93444185EE571C032A8658', - 'type': 0, + 'showField': 'WD63_04,WD63_05,WD63_06,WD63_07,WD63_08,WD63_09,WD63_10,WD63_11,WD63_12,WD63_13,WD63_14,WD63_15,WD63_16', + 'dimId': '5CD7C73A7BC24A7F9A7EF8F60F1275CA', 'distinct': true, + 'type': 1, 'conditionList': [ [ { - 'leftSymbolList': [ - '21' - ], - 'rightSymbolList': [ - '22', - '23' - ], - 'condition': '7', - 'dimId': '734AFA44DDC745009F4C27AABA1127F0', - 'key': 'WD56_03' - }, - { - 'leftSymbolList': [ - '21' - ], - 'rightSymbolList': [ - '22', - '23' - ], - 'condition': '7', - 'dimId': '5F356EF944164C548A835D5C6481AAE0', - 'key': 'WD54_03' - }, - { - 'leftSymbolList': [ - '21' - ], - 'rightSymbolList': [ - '22' - ], - 'condition': '7', - 'dimId': 'YEAR8MONTH8DAY66PACKINGDATA99DAY', - 'key': 'WD01_03' + 'condition': '3', + 'key': 'WD63_04', + 'indexDimValues': type } - + ], + [ + { + 'condition': '2', + 'key': 'WD63_05', + 'indexDimValues': '完工' + } ] ], 'pageNo': null, diff --git a/src/api/threat.js b/src/api/threat.js index 21b08f6..e2495ae 100644 --- a/src/api/threat.js +++ b/src/api/threat.js @@ -6,55 +6,31 @@ import Vue from 'vue' // 水保隐患 -export function getWaterThreat() { +export function getThreat(type) { const baseConfig = Vue.prototype.baseConfig const { sign, username, timestamp } = getSignTimeStamp() return request({ url: baseConfig.biUrl + '/factdata/index/getData', method: 'post', data: { - 'showField': 'WD01_03,WD54_03,WD56_03,DES01,DES02,DES03,DES04,DES04,DES05,DES06,DES07,DES08,DES09,DES10', - 'indexId': '07D36AD4AE93444185EE571C032A8658', - 'type': 0, + 'showField': 'WD63_04,WD63_05,WD63_06,WD63_07,WD63_08,WD63_09,WD63_10,WD63_11,WD63_12,WD63_13,WD63_14,WD63_15,WD63_16', + 'dimId': '5CD7C73A7BC24A7F9A7EF8F60F1275CA', 'distinct': true, + 'type': 1, 'conditionList': [ [ { - 'leftSymbolList': [ - '21' - ], - 'rightSymbolList': [ - '22', - '23' - ], - 'condition': '7', - 'dimId': '734AFA44DDC745009F4C27AABA1127F0', - 'key': 'WD56_03' - }, - { - 'leftSymbolList': [ - '21' - ], - 'rightSymbolList': [ - '22', - '23' - ], - 'condition': '7', - 'dimId': '5F356EF944164C548A835D5C6481AAE0', - 'key': 'WD54_03' - }, - { - 'leftSymbolList': [ - '21' - ], - 'rightSymbolList': [ - '22' - ], - 'condition': '7', - 'dimId': 'YEAR8MONTH8DAY66PACKINGDATA99DAY', - 'key': 'WD01_03' + 'condition': '3', + 'key': 'WD63_04', + 'indexDimValues': type } - + ], + [ + { + 'condition': '2', + 'key': 'WD63_05', + 'indexDimValues': '完工' + } ] ], 'pageNo': null, diff --git a/src/components/Button/button2.vue b/src/components/Button/button2.vue index 973aa02..90266fe 100644 --- a/src/components/Button/button2.vue +++ b/src/components/Button/button2.vue @@ -53,6 +53,9 @@ margin-right: 5px; text-align: center; } + .button:hover{ + cursor: pointer; + } .button-no-select{ background: url("../../assets/button_images/button2_blue.png") no-repeat; background-size: 100% 100%; diff --git a/src/api/threat.js b/src/api/threat.js index 21b08f6..e2495ae 100644 --- a/src/api/threat.js +++ b/src/api/threat.js @@ -6,55 +6,31 @@ import Vue from 'vue' // 水保隐患 -export function getWaterThreat() { +export function getThreat(type) { const baseConfig = Vue.prototype.baseConfig const { sign, username, timestamp } = getSignTimeStamp() return request({ url: baseConfig.biUrl + '/factdata/index/getData', method: 'post', data: { - 'showField': 'WD01_03,WD54_03,WD56_03,DES01,DES02,DES03,DES04,DES04,DES05,DES06,DES07,DES08,DES09,DES10', - 'indexId': '07D36AD4AE93444185EE571C032A8658', - 'type': 0, + 'showField': 'WD63_04,WD63_05,WD63_06,WD63_07,WD63_08,WD63_09,WD63_10,WD63_11,WD63_12,WD63_13,WD63_14,WD63_15,WD63_16', + 'dimId': '5CD7C73A7BC24A7F9A7EF8F60F1275CA', 'distinct': true, + 'type': 1, 'conditionList': [ [ { - 'leftSymbolList': [ - '21' - ], - 'rightSymbolList': [ - '22', - '23' - ], - 'condition': '7', - 'dimId': '734AFA44DDC745009F4C27AABA1127F0', - 'key': 'WD56_03' - }, - { - 'leftSymbolList': [ - '21' - ], - 'rightSymbolList': [ - '22', - '23' - ], - 'condition': '7', - 'dimId': '5F356EF944164C548A835D5C6481AAE0', - 'key': 'WD54_03' - }, - { - 'leftSymbolList': [ - '21' - ], - 'rightSymbolList': [ - '22' - ], - 'condition': '7', - 'dimId': 'YEAR8MONTH8DAY66PACKINGDATA99DAY', - 'key': 'WD01_03' + 'condition': '3', + 'key': 'WD63_04', + 'indexDimValues': type } - + ], + [ + { + 'condition': '2', + 'key': 'WD63_05', + 'indexDimValues': '完工' + } ] ], 'pageNo': null, diff --git a/src/components/Button/button2.vue b/src/components/Button/button2.vue index 973aa02..90266fe 100644 --- a/src/components/Button/button2.vue +++ b/src/components/Button/button2.vue @@ -53,6 +53,9 @@ margin-right: 5px; text-align: center; } + .button:hover{ + cursor: pointer; + } .button-no-select{ background: url("../../assets/button_images/button2_blue.png") no-repeat; background-size: 100% 100%; diff --git a/src/components/Map/MarsMap.vue b/src/components/Map/MarsMap.vue index eb4d420..c400842 100644 --- a/src/components/Map/MarsMap.vue +++ b/src/components/Map/MarsMap.vue @@ -180,85 +180,6 @@ }) this.map.addLayer(geoJsonLayer1) }, - // 材质线的管线 - addPipe2() { - const { mars3d } = this - var graphicLayer = new mars3d.layer.GraphicLayer() - this.map.addLayer(graphicLayer) - axios.get('static/geojson/pipe.json').then((res) => { - if (res.status === 200) { - const features = res.data.features - for (const feature of features) { - this.addMaterialLine(graphicLayer, feature.geometry.coordinates) - } - } - }) - }, - // 添加线方法 - addMaterialLine(graphicLayer, arr, options) { - const { mars3d, Cesium } = this - const positionsArr = arr.map(item => { - return Cesium.Cartesian3.fromDegrees(item[0], item[1], item[2]) - }) - console.log(positionsArr) - var primitive = new mars3d.graphic.PolylinePrimitive({ - positions: positionsArr, - style: { - width: 10, - material: mars3d.MaterialUtil.createMaterial(mars3d.MaterialType.LineFlow, { - image: 'static/images/map/LinkPulse.png', - color: '#ff0000', - repeat: new Cesium.Cartesian2(10.0, 1.0), - speed: 2 - }) - } - }) - graphicLayer.addGraphic(primitive) - }, - // 添加mapV管线 - addPipe3() { - axios.get('static/geojson/pipe.json').then((res) => { - if (res.status === 200) { - const features = res.data.features - for (const feature of features) { - this.addMapvLine(feature.geometry.coordinates) - } - } - }) - // var graphicLayer = new mars3d.layer.GraphicLayer() - // this.map.addLayer(graphicLayer) - }, - addMapvLine(arr, options) { - const { mars3d } = this - const timeData = arr.map((item, index) => { - return { - geometry: { - type: 'Point', - coordinates: [item[0], item[1]] - }, - count: 1, - time: index - } - }) - var options2 = { - fillStyle: 'rgba(51,255,255, 0.2)', - globalCompositeOperation: 'lighter', - size: 3, - animation: { - stepsRange: { - start: 0, - end: 100 - }, - trails: 3, - duration: 5 - }, - draw: 'simple', - depthTest: false - } - var dataSet2 = new mapv.DataSet(timeData) - var mapVLayer2 = new mars3d.layer.MapVLayer(options2, dataSet2) - this.map.addLayer(mapVLayer2) - }, // 添加省地块 addProvincePolygon() { const { mars3d, colorful, colorList } = this @@ -274,6 +195,7 @@ }) const color = colorful ? colorList[i] : '#3a77da' const graphic = new mars3d.graphic.PolygonEntity({ + name: features[i].properties.name, positions: coordinates, style: { height: -10000, @@ -282,7 +204,7 @@ diffHeight: 10000.0, color: color, opacity: 1, - outline: colorful ? false : true, + outline: !colorful, outlineColor: '#4764c9', outlineWidth: 3, outlineOpacity: 1, @@ -314,21 +236,23 @@ }) graphicLayer.addGraphic(graphic) } - // graphicLayer.on(mars3d.EventType.mouseOver, event => { - // console.log('鼠标移入图层', event) - // console.log(event) - // var entity = event.czmObject - // if (entity && entity.polygon) { - // this.highlightedEntity(entity) - // } - // }) - // graphicLayer.on(mars3d.EventType.mouseOut, event => { - // console.log('鼠标移出图层', event) - // var entity = event.czmObject - // if (entity && entity.polygon) { - // this.clearLastHighlightedEntity() - // } - // }) + graphicLayer.on(mars3d.EventType.mouseOver, event => { + console.log('鼠标移入图层', event) + console.log(event) + this.$emit('mouseIn', event) + // var entity = event.czmObject + // if (entity && entity.polygon) { + // this.highlightedEntity(entity) + // } + }) + graphicLayer.on(mars3d.EventType.mouseOut, event => { + console.log('鼠标移出图层', event) + this.$emit('mouseOut', event) + // var entity = event.czmObject + // if (entity && entity.polygon) { + // this.clearLastHighlightedEntity() + // } + }) } }) }, diff --git a/src/api/threat.js b/src/api/threat.js index 21b08f6..e2495ae 100644 --- a/src/api/threat.js +++ b/src/api/threat.js @@ -6,55 +6,31 @@ import Vue from 'vue' // 水保隐患 -export function getWaterThreat() { +export function getThreat(type) { const baseConfig = Vue.prototype.baseConfig const { sign, username, timestamp } = getSignTimeStamp() return request({ url: baseConfig.biUrl + '/factdata/index/getData', method: 'post', data: { - 'showField': 'WD01_03,WD54_03,WD56_03,DES01,DES02,DES03,DES04,DES04,DES05,DES06,DES07,DES08,DES09,DES10', - 'indexId': '07D36AD4AE93444185EE571C032A8658', - 'type': 0, + 'showField': 'WD63_04,WD63_05,WD63_06,WD63_07,WD63_08,WD63_09,WD63_10,WD63_11,WD63_12,WD63_13,WD63_14,WD63_15,WD63_16', + 'dimId': '5CD7C73A7BC24A7F9A7EF8F60F1275CA', 'distinct': true, + 'type': 1, 'conditionList': [ [ { - 'leftSymbolList': [ - '21' - ], - 'rightSymbolList': [ - '22', - '23' - ], - 'condition': '7', - 'dimId': '734AFA44DDC745009F4C27AABA1127F0', - 'key': 'WD56_03' - }, - { - 'leftSymbolList': [ - '21' - ], - 'rightSymbolList': [ - '22', - '23' - ], - 'condition': '7', - 'dimId': '5F356EF944164C548A835D5C6481AAE0', - 'key': 'WD54_03' - }, - { - 'leftSymbolList': [ - '21' - ], - 'rightSymbolList': [ - '22' - ], - 'condition': '7', - 'dimId': 'YEAR8MONTH8DAY66PACKINGDATA99DAY', - 'key': 'WD01_03' + 'condition': '3', + 'key': 'WD63_04', + 'indexDimValues': type } - + ], + [ + { + 'condition': '2', + 'key': 'WD63_05', + 'indexDimValues': '完工' + } ] ], 'pageNo': null, diff --git a/src/components/Button/button2.vue b/src/components/Button/button2.vue index 973aa02..90266fe 100644 --- a/src/components/Button/button2.vue +++ b/src/components/Button/button2.vue @@ -53,6 +53,9 @@ margin-right: 5px; text-align: center; } + .button:hover{ + cursor: pointer; + } .button-no-select{ background: url("../../assets/button_images/button2_blue.png") no-repeat; background-size: 100% 100%; diff --git a/src/components/Map/MarsMap.vue b/src/components/Map/MarsMap.vue index eb4d420..c400842 100644 --- a/src/components/Map/MarsMap.vue +++ b/src/components/Map/MarsMap.vue @@ -180,85 +180,6 @@ }) this.map.addLayer(geoJsonLayer1) }, - // 材质线的管线 - addPipe2() { - const { mars3d } = this - var graphicLayer = new mars3d.layer.GraphicLayer() - this.map.addLayer(graphicLayer) - axios.get('static/geojson/pipe.json').then((res) => { - if (res.status === 200) { - const features = res.data.features - for (const feature of features) { - this.addMaterialLine(graphicLayer, feature.geometry.coordinates) - } - } - }) - }, - // 添加线方法 - addMaterialLine(graphicLayer, arr, options) { - const { mars3d, Cesium } = this - const positionsArr = arr.map(item => { - return Cesium.Cartesian3.fromDegrees(item[0], item[1], item[2]) - }) - console.log(positionsArr) - var primitive = new mars3d.graphic.PolylinePrimitive({ - positions: positionsArr, - style: { - width: 10, - material: mars3d.MaterialUtil.createMaterial(mars3d.MaterialType.LineFlow, { - image: 'static/images/map/LinkPulse.png', - color: '#ff0000', - repeat: new Cesium.Cartesian2(10.0, 1.0), - speed: 2 - }) - } - }) - graphicLayer.addGraphic(primitive) - }, - // 添加mapV管线 - addPipe3() { - axios.get('static/geojson/pipe.json').then((res) => { - if (res.status === 200) { - const features = res.data.features - for (const feature of features) { - this.addMapvLine(feature.geometry.coordinates) - } - } - }) - // var graphicLayer = new mars3d.layer.GraphicLayer() - // this.map.addLayer(graphicLayer) - }, - addMapvLine(arr, options) { - const { mars3d } = this - const timeData = arr.map((item, index) => { - return { - geometry: { - type: 'Point', - coordinates: [item[0], item[1]] - }, - count: 1, - time: index - } - }) - var options2 = { - fillStyle: 'rgba(51,255,255, 0.2)', - globalCompositeOperation: 'lighter', - size: 3, - animation: { - stepsRange: { - start: 0, - end: 100 - }, - trails: 3, - duration: 5 - }, - draw: 'simple', - depthTest: false - } - var dataSet2 = new mapv.DataSet(timeData) - var mapVLayer2 = new mars3d.layer.MapVLayer(options2, dataSet2) - this.map.addLayer(mapVLayer2) - }, // 添加省地块 addProvincePolygon() { const { mars3d, colorful, colorList } = this @@ -274,6 +195,7 @@ }) const color = colorful ? colorList[i] : '#3a77da' const graphic = new mars3d.graphic.PolygonEntity({ + name: features[i].properties.name, positions: coordinates, style: { height: -10000, @@ -282,7 +204,7 @@ diffHeight: 10000.0, color: color, opacity: 1, - outline: colorful ? false : true, + outline: !colorful, outlineColor: '#4764c9', outlineWidth: 3, outlineOpacity: 1, @@ -314,21 +236,23 @@ }) graphicLayer.addGraphic(graphic) } - // graphicLayer.on(mars3d.EventType.mouseOver, event => { - // console.log('鼠标移入图层', event) - // console.log(event) - // var entity = event.czmObject - // if (entity && entity.polygon) { - // this.highlightedEntity(entity) - // } - // }) - // graphicLayer.on(mars3d.EventType.mouseOut, event => { - // console.log('鼠标移出图层', event) - // var entity = event.czmObject - // if (entity && entity.polygon) { - // this.clearLastHighlightedEntity() - // } - // }) + graphicLayer.on(mars3d.EventType.mouseOver, event => { + console.log('鼠标移入图层', event) + console.log(event) + this.$emit('mouseIn', event) + // var entity = event.czmObject + // if (entity && entity.polygon) { + // this.highlightedEntity(entity) + // } + }) + graphicLayer.on(mars3d.EventType.mouseOut, event => { + console.log('鼠标移出图层', event) + this.$emit('mouseOut', event) + // var entity = event.czmObject + // if (entity && entity.polygon) { + // this.clearLastHighlightedEntity() + // } + }) } }) }, diff --git a/src/components/Map/components/disasterLayer.vue b/src/components/Map/components/disasterLayer.vue index de9f12f..3bbeaeb 100644 --- a/src/components/Map/components/disasterLayer.vue +++ b/src/components/Map/components/disasterLayer.vue @@ -23,7 +23,7 @@ }, // 颜色类型:single单色柱,multi多色柱 scale: { type: Number, - default: 1 + default: 0.5 }, // 图片缩放倍数 height: { type: Number, diff --git a/src/api/threat.js b/src/api/threat.js index 21b08f6..e2495ae 100644 --- a/src/api/threat.js +++ b/src/api/threat.js @@ -6,55 +6,31 @@ import Vue from 'vue' // 水保隐患 -export function getWaterThreat() { +export function getThreat(type) { const baseConfig = Vue.prototype.baseConfig const { sign, username, timestamp } = getSignTimeStamp() return request({ url: baseConfig.biUrl + '/factdata/index/getData', method: 'post', data: { - 'showField': 'WD01_03,WD54_03,WD56_03,DES01,DES02,DES03,DES04,DES04,DES05,DES06,DES07,DES08,DES09,DES10', - 'indexId': '07D36AD4AE93444185EE571C032A8658', - 'type': 0, + 'showField': 'WD63_04,WD63_05,WD63_06,WD63_07,WD63_08,WD63_09,WD63_10,WD63_11,WD63_12,WD63_13,WD63_14,WD63_15,WD63_16', + 'dimId': '5CD7C73A7BC24A7F9A7EF8F60F1275CA', 'distinct': true, + 'type': 1, 'conditionList': [ [ { - 'leftSymbolList': [ - '21' - ], - 'rightSymbolList': [ - '22', - '23' - ], - 'condition': '7', - 'dimId': '734AFA44DDC745009F4C27AABA1127F0', - 'key': 'WD56_03' - }, - { - 'leftSymbolList': [ - '21' - ], - 'rightSymbolList': [ - '22', - '23' - ], - 'condition': '7', - 'dimId': '5F356EF944164C548A835D5C6481AAE0', - 'key': 'WD54_03' - }, - { - 'leftSymbolList': [ - '21' - ], - 'rightSymbolList': [ - '22' - ], - 'condition': '7', - 'dimId': 'YEAR8MONTH8DAY66PACKINGDATA99DAY', - 'key': 'WD01_03' + 'condition': '3', + 'key': 'WD63_04', + 'indexDimValues': type } - + ], + [ + { + 'condition': '2', + 'key': 'WD63_05', + 'indexDimValues': '完工' + } ] ], 'pageNo': null, diff --git a/src/components/Button/button2.vue b/src/components/Button/button2.vue index 973aa02..90266fe 100644 --- a/src/components/Button/button2.vue +++ b/src/components/Button/button2.vue @@ -53,6 +53,9 @@ margin-right: 5px; text-align: center; } + .button:hover{ + cursor: pointer; + } .button-no-select{ background: url("../../assets/button_images/button2_blue.png") no-repeat; background-size: 100% 100%; diff --git a/src/components/Map/MarsMap.vue b/src/components/Map/MarsMap.vue index eb4d420..c400842 100644 --- a/src/components/Map/MarsMap.vue +++ b/src/components/Map/MarsMap.vue @@ -180,85 +180,6 @@ }) this.map.addLayer(geoJsonLayer1) }, - // 材质线的管线 - addPipe2() { - const { mars3d } = this - var graphicLayer = new mars3d.layer.GraphicLayer() - this.map.addLayer(graphicLayer) - axios.get('static/geojson/pipe.json').then((res) => { - if (res.status === 200) { - const features = res.data.features - for (const feature of features) { - this.addMaterialLine(graphicLayer, feature.geometry.coordinates) - } - } - }) - }, - // 添加线方法 - addMaterialLine(graphicLayer, arr, options) { - const { mars3d, Cesium } = this - const positionsArr = arr.map(item => { - return Cesium.Cartesian3.fromDegrees(item[0], item[1], item[2]) - }) - console.log(positionsArr) - var primitive = new mars3d.graphic.PolylinePrimitive({ - positions: positionsArr, - style: { - width: 10, - material: mars3d.MaterialUtil.createMaterial(mars3d.MaterialType.LineFlow, { - image: 'static/images/map/LinkPulse.png', - color: '#ff0000', - repeat: new Cesium.Cartesian2(10.0, 1.0), - speed: 2 - }) - } - }) - graphicLayer.addGraphic(primitive) - }, - // 添加mapV管线 - addPipe3() { - axios.get('static/geojson/pipe.json').then((res) => { - if (res.status === 200) { - const features = res.data.features - for (const feature of features) { - this.addMapvLine(feature.geometry.coordinates) - } - } - }) - // var graphicLayer = new mars3d.layer.GraphicLayer() - // this.map.addLayer(graphicLayer) - }, - addMapvLine(arr, options) { - const { mars3d } = this - const timeData = arr.map((item, index) => { - return { - geometry: { - type: 'Point', - coordinates: [item[0], item[1]] - }, - count: 1, - time: index - } - }) - var options2 = { - fillStyle: 'rgba(51,255,255, 0.2)', - globalCompositeOperation: 'lighter', - size: 3, - animation: { - stepsRange: { - start: 0, - end: 100 - }, - trails: 3, - duration: 5 - }, - draw: 'simple', - depthTest: false - } - var dataSet2 = new mapv.DataSet(timeData) - var mapVLayer2 = new mars3d.layer.MapVLayer(options2, dataSet2) - this.map.addLayer(mapVLayer2) - }, // 添加省地块 addProvincePolygon() { const { mars3d, colorful, colorList } = this @@ -274,6 +195,7 @@ }) const color = colorful ? colorList[i] : '#3a77da' const graphic = new mars3d.graphic.PolygonEntity({ + name: features[i].properties.name, positions: coordinates, style: { height: -10000, @@ -282,7 +204,7 @@ diffHeight: 10000.0, color: color, opacity: 1, - outline: colorful ? false : true, + outline: !colorful, outlineColor: '#4764c9', outlineWidth: 3, outlineOpacity: 1, @@ -314,21 +236,23 @@ }) graphicLayer.addGraphic(graphic) } - // graphicLayer.on(mars3d.EventType.mouseOver, event => { - // console.log('鼠标移入图层', event) - // console.log(event) - // var entity = event.czmObject - // if (entity && entity.polygon) { - // this.highlightedEntity(entity) - // } - // }) - // graphicLayer.on(mars3d.EventType.mouseOut, event => { - // console.log('鼠标移出图层', event) - // var entity = event.czmObject - // if (entity && entity.polygon) { - // this.clearLastHighlightedEntity() - // } - // }) + graphicLayer.on(mars3d.EventType.mouseOver, event => { + console.log('鼠标移入图层', event) + console.log(event) + this.$emit('mouseIn', event) + // var entity = event.czmObject + // if (entity && entity.polygon) { + // this.highlightedEntity(entity) + // } + }) + graphicLayer.on(mars3d.EventType.mouseOut, event => { + console.log('鼠标移出图层', event) + this.$emit('mouseOut', event) + // var entity = event.czmObject + // if (entity && entity.polygon) { + // this.clearLastHighlightedEntity() + // } + }) } }) }, diff --git a/src/components/Map/components/disasterLayer.vue b/src/components/Map/components/disasterLayer.vue index de9f12f..3bbeaeb 100644 --- a/src/components/Map/components/disasterLayer.vue +++ b/src/components/Map/components/disasterLayer.vue @@ -23,7 +23,7 @@ }, // 颜色类型:single单色柱,multi多色柱 scale: { type: Number, - default: 1 + default: 0.5 }, // 图片缩放倍数 height: { type: Number, diff --git a/src/components/Map/components/supplyLayer.vue b/src/components/Map/components/supplyLayer.vue index 7fdbe56..9c4e07b 100644 --- a/src/components/Map/components/supplyLayer.vue +++ b/src/components/Map/components/supplyLayer.vue @@ -136,6 +136,8 @@ if (graphic.name === city) { // graphic.openTooltip() graphic.openPopup() + } else { + graphic.closePopup() } } }, diff --git a/src/api/threat.js b/src/api/threat.js index 21b08f6..e2495ae 100644 --- a/src/api/threat.js +++ b/src/api/threat.js @@ -6,55 +6,31 @@ import Vue from 'vue' // 水保隐患 -export function getWaterThreat() { +export function getThreat(type) { const baseConfig = Vue.prototype.baseConfig const { sign, username, timestamp } = getSignTimeStamp() return request({ url: baseConfig.biUrl + '/factdata/index/getData', method: 'post', data: { - 'showField': 'WD01_03,WD54_03,WD56_03,DES01,DES02,DES03,DES04,DES04,DES05,DES06,DES07,DES08,DES09,DES10', - 'indexId': '07D36AD4AE93444185EE571C032A8658', - 'type': 0, + 'showField': 'WD63_04,WD63_05,WD63_06,WD63_07,WD63_08,WD63_09,WD63_10,WD63_11,WD63_12,WD63_13,WD63_14,WD63_15,WD63_16', + 'dimId': '5CD7C73A7BC24A7F9A7EF8F60F1275CA', 'distinct': true, + 'type': 1, 'conditionList': [ [ { - 'leftSymbolList': [ - '21' - ], - 'rightSymbolList': [ - '22', - '23' - ], - 'condition': '7', - 'dimId': '734AFA44DDC745009F4C27AABA1127F0', - 'key': 'WD56_03' - }, - { - 'leftSymbolList': [ - '21' - ], - 'rightSymbolList': [ - '22', - '23' - ], - 'condition': '7', - 'dimId': '5F356EF944164C548A835D5C6481AAE0', - 'key': 'WD54_03' - }, - { - 'leftSymbolList': [ - '21' - ], - 'rightSymbolList': [ - '22' - ], - 'condition': '7', - 'dimId': 'YEAR8MONTH8DAY66PACKINGDATA99DAY', - 'key': 'WD01_03' + 'condition': '3', + 'key': 'WD63_04', + 'indexDimValues': type } - + ], + [ + { + 'condition': '2', + 'key': 'WD63_05', + 'indexDimValues': '完工' + } ] ], 'pageNo': null, diff --git a/src/components/Button/button2.vue b/src/components/Button/button2.vue index 973aa02..90266fe 100644 --- a/src/components/Button/button2.vue +++ b/src/components/Button/button2.vue @@ -53,6 +53,9 @@ margin-right: 5px; text-align: center; } + .button:hover{ + cursor: pointer; + } .button-no-select{ background: url("../../assets/button_images/button2_blue.png") no-repeat; background-size: 100% 100%; diff --git a/src/components/Map/MarsMap.vue b/src/components/Map/MarsMap.vue index eb4d420..c400842 100644 --- a/src/components/Map/MarsMap.vue +++ b/src/components/Map/MarsMap.vue @@ -180,85 +180,6 @@ }) this.map.addLayer(geoJsonLayer1) }, - // 材质线的管线 - addPipe2() { - const { mars3d } = this - var graphicLayer = new mars3d.layer.GraphicLayer() - this.map.addLayer(graphicLayer) - axios.get('static/geojson/pipe.json').then((res) => { - if (res.status === 200) { - const features = res.data.features - for (const feature of features) { - this.addMaterialLine(graphicLayer, feature.geometry.coordinates) - } - } - }) - }, - // 添加线方法 - addMaterialLine(graphicLayer, arr, options) { - const { mars3d, Cesium } = this - const positionsArr = arr.map(item => { - return Cesium.Cartesian3.fromDegrees(item[0], item[1], item[2]) - }) - console.log(positionsArr) - var primitive = new mars3d.graphic.PolylinePrimitive({ - positions: positionsArr, - style: { - width: 10, - material: mars3d.MaterialUtil.createMaterial(mars3d.MaterialType.LineFlow, { - image: 'static/images/map/LinkPulse.png', - color: '#ff0000', - repeat: new Cesium.Cartesian2(10.0, 1.0), - speed: 2 - }) - } - }) - graphicLayer.addGraphic(primitive) - }, - // 添加mapV管线 - addPipe3() { - axios.get('static/geojson/pipe.json').then((res) => { - if (res.status === 200) { - const features = res.data.features - for (const feature of features) { - this.addMapvLine(feature.geometry.coordinates) - } - } - }) - // var graphicLayer = new mars3d.layer.GraphicLayer() - // this.map.addLayer(graphicLayer) - }, - addMapvLine(arr, options) { - const { mars3d } = this - const timeData = arr.map((item, index) => { - return { - geometry: { - type: 'Point', - coordinates: [item[0], item[1]] - }, - count: 1, - time: index - } - }) - var options2 = { - fillStyle: 'rgba(51,255,255, 0.2)', - globalCompositeOperation: 'lighter', - size: 3, - animation: { - stepsRange: { - start: 0, - end: 100 - }, - trails: 3, - duration: 5 - }, - draw: 'simple', - depthTest: false - } - var dataSet2 = new mapv.DataSet(timeData) - var mapVLayer2 = new mars3d.layer.MapVLayer(options2, dataSet2) - this.map.addLayer(mapVLayer2) - }, // 添加省地块 addProvincePolygon() { const { mars3d, colorful, colorList } = this @@ -274,6 +195,7 @@ }) const color = colorful ? colorList[i] : '#3a77da' const graphic = new mars3d.graphic.PolygonEntity({ + name: features[i].properties.name, positions: coordinates, style: { height: -10000, @@ -282,7 +204,7 @@ diffHeight: 10000.0, color: color, opacity: 1, - outline: colorful ? false : true, + outline: !colorful, outlineColor: '#4764c9', outlineWidth: 3, outlineOpacity: 1, @@ -314,21 +236,23 @@ }) graphicLayer.addGraphic(graphic) } - // graphicLayer.on(mars3d.EventType.mouseOver, event => { - // console.log('鼠标移入图层', event) - // console.log(event) - // var entity = event.czmObject - // if (entity && entity.polygon) { - // this.highlightedEntity(entity) - // } - // }) - // graphicLayer.on(mars3d.EventType.mouseOut, event => { - // console.log('鼠标移出图层', event) - // var entity = event.czmObject - // if (entity && entity.polygon) { - // this.clearLastHighlightedEntity() - // } - // }) + graphicLayer.on(mars3d.EventType.mouseOver, event => { + console.log('鼠标移入图层', event) + console.log(event) + this.$emit('mouseIn', event) + // var entity = event.czmObject + // if (entity && entity.polygon) { + // this.highlightedEntity(entity) + // } + }) + graphicLayer.on(mars3d.EventType.mouseOut, event => { + console.log('鼠标移出图层', event) + this.$emit('mouseOut', event) + // var entity = event.czmObject + // if (entity && entity.polygon) { + // this.clearLastHighlightedEntity() + // } + }) } }) }, diff --git a/src/components/Map/components/disasterLayer.vue b/src/components/Map/components/disasterLayer.vue index de9f12f..3bbeaeb 100644 --- a/src/components/Map/components/disasterLayer.vue +++ b/src/components/Map/components/disasterLayer.vue @@ -23,7 +23,7 @@ }, // 颜色类型:single单色柱,multi多色柱 scale: { type: Number, - default: 1 + default: 0.5 }, // 图片缩放倍数 height: { type: Number, diff --git a/src/components/Map/components/supplyLayer.vue b/src/components/Map/components/supplyLayer.vue index 7fdbe56..9c4e07b 100644 --- a/src/components/Map/components/supplyLayer.vue +++ b/src/components/Map/components/supplyLayer.vue @@ -136,6 +136,8 @@ if (graphic.name === city) { // graphic.openTooltip() graphic.openPopup() + } else { + graphic.closePopup() } } }, diff --git a/src/components/Map/components/threatLayer.vue b/src/components/Map/components/threatLayer.vue index 4b2295b..a0acbc4 100644 --- a/src/components/Map/components/threatLayer.vue +++ b/src/components/Map/components/threatLayer.vue @@ -13,6 +13,7 @@