diff --git a/src/components/Button/button3.vue b/src/components/Button/button3.vue new file mode 100644 index 0000000..973aa02 --- /dev/null +++ b/src/components/Button/button3.vue @@ -0,0 +1,103 @@ + + + + + + diff --git a/src/components/Button/button3.vue b/src/components/Button/button3.vue new file mode 100644 index 0000000..973aa02 --- /dev/null +++ b/src/components/Button/button3.vue @@ -0,0 +1,103 @@ + + + + + + diff --git a/src/components/Map/MarsMap.vue b/src/components/Map/MarsMap.vue index 3528987..eb4d420 100644 --- a/src/components/Map/MarsMap.vue +++ b/src/components/Map/MarsMap.vue @@ -4,7 +4,7 @@ ref="map" :id="`mars3d-container${mapKey}`" :class="['mars3d-container', customClass, { 'mars3d-container-compare-rh' : compare }]"> - + @@ -37,6 +37,10 @@ return {} } }, + labelShow: { + type: Boolean, + default: true + }, // 地块上文字是否显示 // 是否分屏显示 compare: { type: Boolean, @@ -51,7 +55,17 @@ customClass: { type: String, default: '' - } + }, + colorful: { + type: Boolean, + default: false + }, + colorList: { + type: Array, + default: () => { + return ['#2F50F3', '#417EE0', '#1D2EB7', '#2E5EA8', '#386ADE', '#2D5BA7', '#4991DB', '#4991DB', '#4C96E6', '#2F50F3', '#0385BD', '#4A94DC'] + } + }// 地块使用的颜色列表 }, data() { return { @@ -93,9 +107,7 @@ var map = new mars3d.Map(`mars3d-container${this.mapKey}`, mapOptions) this.map = map this[`map${this.mapKey}`] = map - console.log('>>>>> 地图创建成功 >>>>', map) - // 挂载到全局对象下,所有组件通过 this.map 访问 // Vue.prototype[`map${this.mapKey}`] = map @@ -111,10 +123,8 @@ map._viewer.scene.backgroundColor = new mars3d.Cesium.Color(0.0, 0.0, 0.0, 0.0) map._viewer.scene.globe.baseColor = new mars3d.Cesium.Color(0.0, 0.0, 0.0, 0.0) map._viewer.scene.globe.baseColor.alpha = 0 + // 添加各市地块 this.addProvincePolygon() - // this.addLine() - this.addPipe() - // this.addPipe2() this.map.fixedLight = true // 抛出事件 this.$emit('onload', map) @@ -138,36 +148,6 @@ width: 5, // 宽度 height: 20000, clampToGround: false - // label: { - // // 面中心点,显示文字的配置 - // text: '{name}', // 对应的属性名称 - // opacity: 1, - // font_size: 20, - // color: '#ffffff', - // - // font_family: '楷体', - // outline: true, - // outlineColor: '#ffffff', - // outlineWidth: 1, - // - // background: false, - // backgroundColor: '#000000', - // backgroundOpacity: 0.1, - // - // font_weight: 'normal', - // font_style: 'normal', - // - // scaleByDistance: true, - // scaleByDistance_far: 20000000, - // scaleByDistance_farValue: 0.1, - // scaleByDistance_near: 1000, - // scaleByDistance_nearValue: 1, - // - // distanceDisplayCondition: false, - // distanceDisplayCondition_far: 10000, - // distanceDisplayCondition_near: 0, - // visibleDepth: false - // } } }, flyTo: true @@ -281,7 +261,7 @@ }, // 添加省地块 addProvincePolygon() { - const { mars3d } = this + const { mars3d, colorful, colorList } = this var graphicLayer = new mars3d.layer.DivLayer() this.polygonLayer = graphicLayer this.map.addLayer(graphicLayer) @@ -292,6 +272,7 @@ const coordinates = (features[i].geometry.coordinates[0][0]).map(item => { return [item[0], item[1], 0] }) + const color = colorful ? colorList[i] : '#3a77da' const graphic = new mars3d.graphic.PolygonEntity({ positions: coordinates, style: { @@ -299,16 +280,16 @@ // heightReference: mars3d.Cesium.HeightReference.RELATIVE_TO_GROUND, hasShadows: true, diffHeight: 10000.0, - color: '#3a77da', + color: color, opacity: 1, - outline: true, + outline: colorful ? false : true, outlineColor: '#4764c9', outlineWidth: 3, outlineOpacity: 1, arcType: mars3d.Cesium.ArcType.GEODESIC, label: { // 面中心点,显示文字的配置 - text: features[i].properties.name, // 对应的属性名称 + text: this.labelShow ? features[i].properties.name : '', // 对应的属性名称 opacity: 1, font_size: 20, color: '#ffffff', diff --git a/src/components/Button/button3.vue b/src/components/Button/button3.vue new file mode 100644 index 0000000..973aa02 --- /dev/null +++ b/src/components/Button/button3.vue @@ -0,0 +1,103 @@ + + + + + + diff --git a/src/components/Map/MarsMap.vue b/src/components/Map/MarsMap.vue index 3528987..eb4d420 100644 --- a/src/components/Map/MarsMap.vue +++ b/src/components/Map/MarsMap.vue @@ -4,7 +4,7 @@ ref="map" :id="`mars3d-container${mapKey}`" :class="['mars3d-container', customClass, { 'mars3d-container-compare-rh' : compare }]"> - + @@ -37,6 +37,10 @@ return {} } }, + labelShow: { + type: Boolean, + default: true + }, // 地块上文字是否显示 // 是否分屏显示 compare: { type: Boolean, @@ -51,7 +55,17 @@ customClass: { type: String, default: '' - } + }, + colorful: { + type: Boolean, + default: false + }, + colorList: { + type: Array, + default: () => { + return ['#2F50F3', '#417EE0', '#1D2EB7', '#2E5EA8', '#386ADE', '#2D5BA7', '#4991DB', '#4991DB', '#4C96E6', '#2F50F3', '#0385BD', '#4A94DC'] + } + }// 地块使用的颜色列表 }, data() { return { @@ -93,9 +107,7 @@ var map = new mars3d.Map(`mars3d-container${this.mapKey}`, mapOptions) this.map = map this[`map${this.mapKey}`] = map - console.log('>>>>> 地图创建成功 >>>>', map) - // 挂载到全局对象下,所有组件通过 this.map 访问 // Vue.prototype[`map${this.mapKey}`] = map @@ -111,10 +123,8 @@ map._viewer.scene.backgroundColor = new mars3d.Cesium.Color(0.0, 0.0, 0.0, 0.0) map._viewer.scene.globe.baseColor = new mars3d.Cesium.Color(0.0, 0.0, 0.0, 0.0) map._viewer.scene.globe.baseColor.alpha = 0 + // 添加各市地块 this.addProvincePolygon() - // this.addLine() - this.addPipe() - // this.addPipe2() this.map.fixedLight = true // 抛出事件 this.$emit('onload', map) @@ -138,36 +148,6 @@ width: 5, // 宽度 height: 20000, clampToGround: false - // label: { - // // 面中心点,显示文字的配置 - // text: '{name}', // 对应的属性名称 - // opacity: 1, - // font_size: 20, - // color: '#ffffff', - // - // font_family: '楷体', - // outline: true, - // outlineColor: '#ffffff', - // outlineWidth: 1, - // - // background: false, - // backgroundColor: '#000000', - // backgroundOpacity: 0.1, - // - // font_weight: 'normal', - // font_style: 'normal', - // - // scaleByDistance: true, - // scaleByDistance_far: 20000000, - // scaleByDistance_farValue: 0.1, - // scaleByDistance_near: 1000, - // scaleByDistance_nearValue: 1, - // - // distanceDisplayCondition: false, - // distanceDisplayCondition_far: 10000, - // distanceDisplayCondition_near: 0, - // visibleDepth: false - // } } }, flyTo: true @@ -281,7 +261,7 @@ }, // 添加省地块 addProvincePolygon() { - const { mars3d } = this + const { mars3d, colorful, colorList } = this var graphicLayer = new mars3d.layer.DivLayer() this.polygonLayer = graphicLayer this.map.addLayer(graphicLayer) @@ -292,6 +272,7 @@ const coordinates = (features[i].geometry.coordinates[0][0]).map(item => { return [item[0], item[1], 0] }) + const color = colorful ? colorList[i] : '#3a77da' const graphic = new mars3d.graphic.PolygonEntity({ positions: coordinates, style: { @@ -299,16 +280,16 @@ // heightReference: mars3d.Cesium.HeightReference.RELATIVE_TO_GROUND, hasShadows: true, diffHeight: 10000.0, - color: '#3a77da', + color: color, opacity: 1, - outline: true, + outline: colorful ? false : true, outlineColor: '#4764c9', outlineWidth: 3, outlineOpacity: 1, arcType: mars3d.Cesium.ArcType.GEODESIC, label: { // 面中心点,显示文字的配置 - text: features[i].properties.name, // 对应的属性名称 + text: this.labelShow ? features[i].properties.name : '', // 对应的属性名称 opacity: 1, font_size: 20, color: '#ffffff', diff --git a/src/components/Map/components/earthquakeLayer.vue b/src/components/Map/components/earthquakeLayer.vue new file mode 100644 index 0000000..e7efdc1 --- /dev/null +++ b/src/components/Map/components/earthquakeLayer.vue @@ -0,0 +1,128 @@ + + + + + + diff --git a/src/components/Button/button3.vue b/src/components/Button/button3.vue new file mode 100644 index 0000000..973aa02 --- /dev/null +++ b/src/components/Button/button3.vue @@ -0,0 +1,103 @@ + + + + + + diff --git a/src/components/Map/MarsMap.vue b/src/components/Map/MarsMap.vue index 3528987..eb4d420 100644 --- a/src/components/Map/MarsMap.vue +++ b/src/components/Map/MarsMap.vue @@ -4,7 +4,7 @@ ref="map" :id="`mars3d-container${mapKey}`" :class="['mars3d-container', customClass, { 'mars3d-container-compare-rh' : compare }]"> - + @@ -37,6 +37,10 @@ return {} } }, + labelShow: { + type: Boolean, + default: true + }, // 地块上文字是否显示 // 是否分屏显示 compare: { type: Boolean, @@ -51,7 +55,17 @@ customClass: { type: String, default: '' - } + }, + colorful: { + type: Boolean, + default: false + }, + colorList: { + type: Array, + default: () => { + return ['#2F50F3', '#417EE0', '#1D2EB7', '#2E5EA8', '#386ADE', '#2D5BA7', '#4991DB', '#4991DB', '#4C96E6', '#2F50F3', '#0385BD', '#4A94DC'] + } + }// 地块使用的颜色列表 }, data() { return { @@ -93,9 +107,7 @@ var map = new mars3d.Map(`mars3d-container${this.mapKey}`, mapOptions) this.map = map this[`map${this.mapKey}`] = map - console.log('>>>>> 地图创建成功 >>>>', map) - // 挂载到全局对象下,所有组件通过 this.map 访问 // Vue.prototype[`map${this.mapKey}`] = map @@ -111,10 +123,8 @@ map._viewer.scene.backgroundColor = new mars3d.Cesium.Color(0.0, 0.0, 0.0, 0.0) map._viewer.scene.globe.baseColor = new mars3d.Cesium.Color(0.0, 0.0, 0.0, 0.0) map._viewer.scene.globe.baseColor.alpha = 0 + // 添加各市地块 this.addProvincePolygon() - // this.addLine() - this.addPipe() - // this.addPipe2() this.map.fixedLight = true // 抛出事件 this.$emit('onload', map) @@ -138,36 +148,6 @@ width: 5, // 宽度 height: 20000, clampToGround: false - // label: { - // // 面中心点,显示文字的配置 - // text: '{name}', // 对应的属性名称 - // opacity: 1, - // font_size: 20, - // color: '#ffffff', - // - // font_family: '楷体', - // outline: true, - // outlineColor: '#ffffff', - // outlineWidth: 1, - // - // background: false, - // backgroundColor: '#000000', - // backgroundOpacity: 0.1, - // - // font_weight: 'normal', - // font_style: 'normal', - // - // scaleByDistance: true, - // scaleByDistance_far: 20000000, - // scaleByDistance_farValue: 0.1, - // scaleByDistance_near: 1000, - // scaleByDistance_nearValue: 1, - // - // distanceDisplayCondition: false, - // distanceDisplayCondition_far: 10000, - // distanceDisplayCondition_near: 0, - // visibleDepth: false - // } } }, flyTo: true @@ -281,7 +261,7 @@ }, // 添加省地块 addProvincePolygon() { - const { mars3d } = this + const { mars3d, colorful, colorList } = this var graphicLayer = new mars3d.layer.DivLayer() this.polygonLayer = graphicLayer this.map.addLayer(graphicLayer) @@ -292,6 +272,7 @@ const coordinates = (features[i].geometry.coordinates[0][0]).map(item => { return [item[0], item[1], 0] }) + const color = colorful ? colorList[i] : '#3a77da' const graphic = new mars3d.graphic.PolygonEntity({ positions: coordinates, style: { @@ -299,16 +280,16 @@ // heightReference: mars3d.Cesium.HeightReference.RELATIVE_TO_GROUND, hasShadows: true, diffHeight: 10000.0, - color: '#3a77da', + color: color, opacity: 1, - outline: true, + outline: colorful ? false : true, outlineColor: '#4764c9', outlineWidth: 3, outlineOpacity: 1, arcType: mars3d.Cesium.ArcType.GEODESIC, label: { // 面中心点,显示文字的配置 - text: features[i].properties.name, // 对应的属性名称 + text: this.labelShow ? features[i].properties.name : '', // 对应的属性名称 opacity: 1, font_size: 20, color: '#ffffff', diff --git a/src/components/Map/components/earthquakeLayer.vue b/src/components/Map/components/earthquakeLayer.vue new file mode 100644 index 0000000..e7efdc1 --- /dev/null +++ b/src/components/Map/components/earthquakeLayer.vue @@ -0,0 +1,128 @@ + + + + + + diff --git a/src/components/Map/components/liquidFactoryLayer.vue b/src/components/Map/components/liquidFactoryLayer.vue new file mode 100644 index 0000000..6845b93 --- /dev/null +++ b/src/components/Map/components/liquidFactoryLayer.vue @@ -0,0 +1,112 @@ + + + + + + diff --git a/src/components/Button/button3.vue b/src/components/Button/button3.vue new file mode 100644 index 0000000..973aa02 --- /dev/null +++ b/src/components/Button/button3.vue @@ -0,0 +1,103 @@ + + + + + + diff --git a/src/components/Map/MarsMap.vue b/src/components/Map/MarsMap.vue index 3528987..eb4d420 100644 --- a/src/components/Map/MarsMap.vue +++ b/src/components/Map/MarsMap.vue @@ -4,7 +4,7 @@ ref="map" :id="`mars3d-container${mapKey}`" :class="['mars3d-container', customClass, { 'mars3d-container-compare-rh' : compare }]"> - + @@ -37,6 +37,10 @@ return {} } }, + labelShow: { + type: Boolean, + default: true + }, // 地块上文字是否显示 // 是否分屏显示 compare: { type: Boolean, @@ -51,7 +55,17 @@ customClass: { type: String, default: '' - } + }, + colorful: { + type: Boolean, + default: false + }, + colorList: { + type: Array, + default: () => { + return ['#2F50F3', '#417EE0', '#1D2EB7', '#2E5EA8', '#386ADE', '#2D5BA7', '#4991DB', '#4991DB', '#4C96E6', '#2F50F3', '#0385BD', '#4A94DC'] + } + }// 地块使用的颜色列表 }, data() { return { @@ -93,9 +107,7 @@ var map = new mars3d.Map(`mars3d-container${this.mapKey}`, mapOptions) this.map = map this[`map${this.mapKey}`] = map - console.log('>>>>> 地图创建成功 >>>>', map) - // 挂载到全局对象下,所有组件通过 this.map 访问 // Vue.prototype[`map${this.mapKey}`] = map @@ -111,10 +123,8 @@ map._viewer.scene.backgroundColor = new mars3d.Cesium.Color(0.0, 0.0, 0.0, 0.0) map._viewer.scene.globe.baseColor = new mars3d.Cesium.Color(0.0, 0.0, 0.0, 0.0) map._viewer.scene.globe.baseColor.alpha = 0 + // 添加各市地块 this.addProvincePolygon() - // this.addLine() - this.addPipe() - // this.addPipe2() this.map.fixedLight = true // 抛出事件 this.$emit('onload', map) @@ -138,36 +148,6 @@ width: 5, // 宽度 height: 20000, clampToGround: false - // label: { - // // 面中心点,显示文字的配置 - // text: '{name}', // 对应的属性名称 - // opacity: 1, - // font_size: 20, - // color: '#ffffff', - // - // font_family: '楷体', - // outline: true, - // outlineColor: '#ffffff', - // outlineWidth: 1, - // - // background: false, - // backgroundColor: '#000000', - // backgroundOpacity: 0.1, - // - // font_weight: 'normal', - // font_style: 'normal', - // - // scaleByDistance: true, - // scaleByDistance_far: 20000000, - // scaleByDistance_farValue: 0.1, - // scaleByDistance_near: 1000, - // scaleByDistance_nearValue: 1, - // - // distanceDisplayCondition: false, - // distanceDisplayCondition_far: 10000, - // distanceDisplayCondition_near: 0, - // visibleDepth: false - // } } }, flyTo: true @@ -281,7 +261,7 @@ }, // 添加省地块 addProvincePolygon() { - const { mars3d } = this + const { mars3d, colorful, colorList } = this var graphicLayer = new mars3d.layer.DivLayer() this.polygonLayer = graphicLayer this.map.addLayer(graphicLayer) @@ -292,6 +272,7 @@ const coordinates = (features[i].geometry.coordinates[0][0]).map(item => { return [item[0], item[1], 0] }) + const color = colorful ? colorList[i] : '#3a77da' const graphic = new mars3d.graphic.PolygonEntity({ positions: coordinates, style: { @@ -299,16 +280,16 @@ // heightReference: mars3d.Cesium.HeightReference.RELATIVE_TO_GROUND, hasShadows: true, diffHeight: 10000.0, - color: '#3a77da', + color: color, opacity: 1, - outline: true, + outline: colorful ? false : true, outlineColor: '#4764c9', outlineWidth: 3, outlineOpacity: 1, arcType: mars3d.Cesium.ArcType.GEODESIC, label: { // 面中心点,显示文字的配置 - text: features[i].properties.name, // 对应的属性名称 + text: this.labelShow ? features[i].properties.name : '', // 对应的属性名称 opacity: 1, font_size: 20, color: '#ffffff', diff --git a/src/components/Map/components/earthquakeLayer.vue b/src/components/Map/components/earthquakeLayer.vue new file mode 100644 index 0000000..e7efdc1 --- /dev/null +++ b/src/components/Map/components/earthquakeLayer.vue @@ -0,0 +1,128 @@ + + + + + + diff --git a/src/components/Map/components/liquidFactoryLayer.vue b/src/components/Map/components/liquidFactoryLayer.vue new file mode 100644 index 0000000..6845b93 --- /dev/null +++ b/src/components/Map/components/liquidFactoryLayer.vue @@ -0,0 +1,112 @@ + + + + + + diff --git a/src/components/Map/components/manageStationLayer.vue b/src/components/Map/components/manageStationLayer.vue new file mode 100644 index 0000000..c0aff38 --- /dev/null +++ b/src/components/Map/components/manageStationLayer.vue @@ -0,0 +1,117 @@ + + + + + + diff --git a/src/components/Button/button3.vue b/src/components/Button/button3.vue new file mode 100644 index 0000000..973aa02 --- /dev/null +++ b/src/components/Button/button3.vue @@ -0,0 +1,103 @@ + + + + + + diff --git a/src/components/Map/MarsMap.vue b/src/components/Map/MarsMap.vue index 3528987..eb4d420 100644 --- a/src/components/Map/MarsMap.vue +++ b/src/components/Map/MarsMap.vue @@ -4,7 +4,7 @@ ref="map" :id="`mars3d-container${mapKey}`" :class="['mars3d-container', customClass, { 'mars3d-container-compare-rh' : compare }]"> - + @@ -37,6 +37,10 @@ return {} } }, + labelShow: { + type: Boolean, + default: true + }, // 地块上文字是否显示 // 是否分屏显示 compare: { type: Boolean, @@ -51,7 +55,17 @@ customClass: { type: String, default: '' - } + }, + colorful: { + type: Boolean, + default: false + }, + colorList: { + type: Array, + default: () => { + return ['#2F50F3', '#417EE0', '#1D2EB7', '#2E5EA8', '#386ADE', '#2D5BA7', '#4991DB', '#4991DB', '#4C96E6', '#2F50F3', '#0385BD', '#4A94DC'] + } + }// 地块使用的颜色列表 }, data() { return { @@ -93,9 +107,7 @@ var map = new mars3d.Map(`mars3d-container${this.mapKey}`, mapOptions) this.map = map this[`map${this.mapKey}`] = map - console.log('>>>>> 地图创建成功 >>>>', map) - // 挂载到全局对象下,所有组件通过 this.map 访问 // Vue.prototype[`map${this.mapKey}`] = map @@ -111,10 +123,8 @@ map._viewer.scene.backgroundColor = new mars3d.Cesium.Color(0.0, 0.0, 0.0, 0.0) map._viewer.scene.globe.baseColor = new mars3d.Cesium.Color(0.0, 0.0, 0.0, 0.0) map._viewer.scene.globe.baseColor.alpha = 0 + // 添加各市地块 this.addProvincePolygon() - // this.addLine() - this.addPipe() - // this.addPipe2() this.map.fixedLight = true // 抛出事件 this.$emit('onload', map) @@ -138,36 +148,6 @@ width: 5, // 宽度 height: 20000, clampToGround: false - // label: { - // // 面中心点,显示文字的配置 - // text: '{name}', // 对应的属性名称 - // opacity: 1, - // font_size: 20, - // color: '#ffffff', - // - // font_family: '楷体', - // outline: true, - // outlineColor: '#ffffff', - // outlineWidth: 1, - // - // background: false, - // backgroundColor: '#000000', - // backgroundOpacity: 0.1, - // - // font_weight: 'normal', - // font_style: 'normal', - // - // scaleByDistance: true, - // scaleByDistance_far: 20000000, - // scaleByDistance_farValue: 0.1, - // scaleByDistance_near: 1000, - // scaleByDistance_nearValue: 1, - // - // distanceDisplayCondition: false, - // distanceDisplayCondition_far: 10000, - // distanceDisplayCondition_near: 0, - // visibleDepth: false - // } } }, flyTo: true @@ -281,7 +261,7 @@ }, // 添加省地块 addProvincePolygon() { - const { mars3d } = this + const { mars3d, colorful, colorList } = this var graphicLayer = new mars3d.layer.DivLayer() this.polygonLayer = graphicLayer this.map.addLayer(graphicLayer) @@ -292,6 +272,7 @@ const coordinates = (features[i].geometry.coordinates[0][0]).map(item => { return [item[0], item[1], 0] }) + const color = colorful ? colorList[i] : '#3a77da' const graphic = new mars3d.graphic.PolygonEntity({ positions: coordinates, style: { @@ -299,16 +280,16 @@ // heightReference: mars3d.Cesium.HeightReference.RELATIVE_TO_GROUND, hasShadows: true, diffHeight: 10000.0, - color: '#3a77da', + color: color, opacity: 1, - outline: true, + outline: colorful ? false : true, outlineColor: '#4764c9', outlineWidth: 3, outlineOpacity: 1, arcType: mars3d.Cesium.ArcType.GEODESIC, label: { // 面中心点,显示文字的配置 - text: features[i].properties.name, // 对应的属性名称 + text: this.labelShow ? features[i].properties.name : '', // 对应的属性名称 opacity: 1, font_size: 20, color: '#ffffff', diff --git a/src/components/Map/components/earthquakeLayer.vue b/src/components/Map/components/earthquakeLayer.vue new file mode 100644 index 0000000..e7efdc1 --- /dev/null +++ b/src/components/Map/components/earthquakeLayer.vue @@ -0,0 +1,128 @@ + + + + + + diff --git a/src/components/Map/components/liquidFactoryLayer.vue b/src/components/Map/components/liquidFactoryLayer.vue new file mode 100644 index 0000000..6845b93 --- /dev/null +++ b/src/components/Map/components/liquidFactoryLayer.vue @@ -0,0 +1,112 @@ + + + + + + diff --git a/src/components/Map/components/manageStationLayer.vue b/src/components/Map/components/manageStationLayer.vue new file mode 100644 index 0000000..c0aff38 --- /dev/null +++ b/src/components/Map/components/manageStationLayer.vue @@ -0,0 +1,117 @@ + + + + + + diff --git a/src/components/Map/components/pipeLayer.vue b/src/components/Map/components/pipeLayer.vue new file mode 100644 index 0000000..64142a7 --- /dev/null +++ b/src/components/Map/components/pipeLayer.vue @@ -0,0 +1,103 @@ + + + + + + diff --git a/src/components/Button/button3.vue b/src/components/Button/button3.vue new file mode 100644 index 0000000..973aa02 --- /dev/null +++ b/src/components/Button/button3.vue @@ -0,0 +1,103 @@ + + + + + + diff --git a/src/components/Map/MarsMap.vue b/src/components/Map/MarsMap.vue index 3528987..eb4d420 100644 --- a/src/components/Map/MarsMap.vue +++ b/src/components/Map/MarsMap.vue @@ -4,7 +4,7 @@ ref="map" :id="`mars3d-container${mapKey}`" :class="['mars3d-container', customClass, { 'mars3d-container-compare-rh' : compare }]"> - + @@ -37,6 +37,10 @@ return {} } }, + labelShow: { + type: Boolean, + default: true + }, // 地块上文字是否显示 // 是否分屏显示 compare: { type: Boolean, @@ -51,7 +55,17 @@ customClass: { type: String, default: '' - } + }, + colorful: { + type: Boolean, + default: false + }, + colorList: { + type: Array, + default: () => { + return ['#2F50F3', '#417EE0', '#1D2EB7', '#2E5EA8', '#386ADE', '#2D5BA7', '#4991DB', '#4991DB', '#4C96E6', '#2F50F3', '#0385BD', '#4A94DC'] + } + }// 地块使用的颜色列表 }, data() { return { @@ -93,9 +107,7 @@ var map = new mars3d.Map(`mars3d-container${this.mapKey}`, mapOptions) this.map = map this[`map${this.mapKey}`] = map - console.log('>>>>> 地图创建成功 >>>>', map) - // 挂载到全局对象下,所有组件通过 this.map 访问 // Vue.prototype[`map${this.mapKey}`] = map @@ -111,10 +123,8 @@ map._viewer.scene.backgroundColor = new mars3d.Cesium.Color(0.0, 0.0, 0.0, 0.0) map._viewer.scene.globe.baseColor = new mars3d.Cesium.Color(0.0, 0.0, 0.0, 0.0) map._viewer.scene.globe.baseColor.alpha = 0 + // 添加各市地块 this.addProvincePolygon() - // this.addLine() - this.addPipe() - // this.addPipe2() this.map.fixedLight = true // 抛出事件 this.$emit('onload', map) @@ -138,36 +148,6 @@ width: 5, // 宽度 height: 20000, clampToGround: false - // label: { - // // 面中心点,显示文字的配置 - // text: '{name}', // 对应的属性名称 - // opacity: 1, - // font_size: 20, - // color: '#ffffff', - // - // font_family: '楷体', - // outline: true, - // outlineColor: '#ffffff', - // outlineWidth: 1, - // - // background: false, - // backgroundColor: '#000000', - // backgroundOpacity: 0.1, - // - // font_weight: 'normal', - // font_style: 'normal', - // - // scaleByDistance: true, - // scaleByDistance_far: 20000000, - // scaleByDistance_farValue: 0.1, - // scaleByDistance_near: 1000, - // scaleByDistance_nearValue: 1, - // - // distanceDisplayCondition: false, - // distanceDisplayCondition_far: 10000, - // distanceDisplayCondition_near: 0, - // visibleDepth: false - // } } }, flyTo: true @@ -281,7 +261,7 @@ }, // 添加省地块 addProvincePolygon() { - const { mars3d } = this + const { mars3d, colorful, colorList } = this var graphicLayer = new mars3d.layer.DivLayer() this.polygonLayer = graphicLayer this.map.addLayer(graphicLayer) @@ -292,6 +272,7 @@ const coordinates = (features[i].geometry.coordinates[0][0]).map(item => { return [item[0], item[1], 0] }) + const color = colorful ? colorList[i] : '#3a77da' const graphic = new mars3d.graphic.PolygonEntity({ positions: coordinates, style: { @@ -299,16 +280,16 @@ // heightReference: mars3d.Cesium.HeightReference.RELATIVE_TO_GROUND, hasShadows: true, diffHeight: 10000.0, - color: '#3a77da', + color: color, opacity: 1, - outline: true, + outline: colorful ? false : true, outlineColor: '#4764c9', outlineWidth: 3, outlineOpacity: 1, arcType: mars3d.Cesium.ArcType.GEODESIC, label: { // 面中心点,显示文字的配置 - text: features[i].properties.name, // 对应的属性名称 + text: this.labelShow ? features[i].properties.name : '', // 对应的属性名称 opacity: 1, font_size: 20, color: '#ffffff', diff --git a/src/components/Map/components/earthquakeLayer.vue b/src/components/Map/components/earthquakeLayer.vue new file mode 100644 index 0000000..e7efdc1 --- /dev/null +++ b/src/components/Map/components/earthquakeLayer.vue @@ -0,0 +1,128 @@ + + + + + + diff --git a/src/components/Map/components/liquidFactoryLayer.vue b/src/components/Map/components/liquidFactoryLayer.vue new file mode 100644 index 0000000..6845b93 --- /dev/null +++ b/src/components/Map/components/liquidFactoryLayer.vue @@ -0,0 +1,112 @@ + + + + + + diff --git a/src/components/Map/components/manageStationLayer.vue b/src/components/Map/components/manageStationLayer.vue new file mode 100644 index 0000000..c0aff38 --- /dev/null +++ b/src/components/Map/components/manageStationLayer.vue @@ -0,0 +1,117 @@ + + + + + + diff --git a/src/components/Map/components/pipeLayer.vue b/src/components/Map/components/pipeLayer.vue new file mode 100644 index 0000000..64142a7 --- /dev/null +++ b/src/components/Map/components/pipeLayer.vue @@ -0,0 +1,103 @@ + + + + + + diff --git a/src/components/Map/components/routeLayer.vue b/src/components/Map/components/routeLayer.vue new file mode 100644 index 0000000..203bd89 --- /dev/null +++ b/src/components/Map/components/routeLayer.vue @@ -0,0 +1,133 @@ + + + + + + diff --git a/src/components/Button/button3.vue b/src/components/Button/button3.vue new file mode 100644 index 0000000..973aa02 --- /dev/null +++ b/src/components/Button/button3.vue @@ -0,0 +1,103 @@ + + + + + + diff --git a/src/components/Map/MarsMap.vue b/src/components/Map/MarsMap.vue index 3528987..eb4d420 100644 --- a/src/components/Map/MarsMap.vue +++ b/src/components/Map/MarsMap.vue @@ -4,7 +4,7 @@ ref="map" :id="`mars3d-container${mapKey}`" :class="['mars3d-container', customClass, { 'mars3d-container-compare-rh' : compare }]"> - + @@ -37,6 +37,10 @@ return {} } }, + labelShow: { + type: Boolean, + default: true + }, // 地块上文字是否显示 // 是否分屏显示 compare: { type: Boolean, @@ -51,7 +55,17 @@ customClass: { type: String, default: '' - } + }, + colorful: { + type: Boolean, + default: false + }, + colorList: { + type: Array, + default: () => { + return ['#2F50F3', '#417EE0', '#1D2EB7', '#2E5EA8', '#386ADE', '#2D5BA7', '#4991DB', '#4991DB', '#4C96E6', '#2F50F3', '#0385BD', '#4A94DC'] + } + }// 地块使用的颜色列表 }, data() { return { @@ -93,9 +107,7 @@ var map = new mars3d.Map(`mars3d-container${this.mapKey}`, mapOptions) this.map = map this[`map${this.mapKey}`] = map - console.log('>>>>> 地图创建成功 >>>>', map) - // 挂载到全局对象下,所有组件通过 this.map 访问 // Vue.prototype[`map${this.mapKey}`] = map @@ -111,10 +123,8 @@ map._viewer.scene.backgroundColor = new mars3d.Cesium.Color(0.0, 0.0, 0.0, 0.0) map._viewer.scene.globe.baseColor = new mars3d.Cesium.Color(0.0, 0.0, 0.0, 0.0) map._viewer.scene.globe.baseColor.alpha = 0 + // 添加各市地块 this.addProvincePolygon() - // this.addLine() - this.addPipe() - // this.addPipe2() this.map.fixedLight = true // 抛出事件 this.$emit('onload', map) @@ -138,36 +148,6 @@ width: 5, // 宽度 height: 20000, clampToGround: false - // label: { - // // 面中心点,显示文字的配置 - // text: '{name}', // 对应的属性名称 - // opacity: 1, - // font_size: 20, - // color: '#ffffff', - // - // font_family: '楷体', - // outline: true, - // outlineColor: '#ffffff', - // outlineWidth: 1, - // - // background: false, - // backgroundColor: '#000000', - // backgroundOpacity: 0.1, - // - // font_weight: 'normal', - // font_style: 'normal', - // - // scaleByDistance: true, - // scaleByDistance_far: 20000000, - // scaleByDistance_farValue: 0.1, - // scaleByDistance_near: 1000, - // scaleByDistance_nearValue: 1, - // - // distanceDisplayCondition: false, - // distanceDisplayCondition_far: 10000, - // distanceDisplayCondition_near: 0, - // visibleDepth: false - // } } }, flyTo: true @@ -281,7 +261,7 @@ }, // 添加省地块 addProvincePolygon() { - const { mars3d } = this + const { mars3d, colorful, colorList } = this var graphicLayer = new mars3d.layer.DivLayer() this.polygonLayer = graphicLayer this.map.addLayer(graphicLayer) @@ -292,6 +272,7 @@ const coordinates = (features[i].geometry.coordinates[0][0]).map(item => { return [item[0], item[1], 0] }) + const color = colorful ? colorList[i] : '#3a77da' const graphic = new mars3d.graphic.PolygonEntity({ positions: coordinates, style: { @@ -299,16 +280,16 @@ // heightReference: mars3d.Cesium.HeightReference.RELATIVE_TO_GROUND, hasShadows: true, diffHeight: 10000.0, - color: '#3a77da', + color: color, opacity: 1, - outline: true, + outline: colorful ? false : true, outlineColor: '#4764c9', outlineWidth: 3, outlineOpacity: 1, arcType: mars3d.Cesium.ArcType.GEODESIC, label: { // 面中心点,显示文字的配置 - text: features[i].properties.name, // 对应的属性名称 + text: this.labelShow ? features[i].properties.name : '', // 对应的属性名称 opacity: 1, font_size: 20, color: '#ffffff', diff --git a/src/components/Map/components/earthquakeLayer.vue b/src/components/Map/components/earthquakeLayer.vue new file mode 100644 index 0000000..e7efdc1 --- /dev/null +++ b/src/components/Map/components/earthquakeLayer.vue @@ -0,0 +1,128 @@ + + + + + + diff --git a/src/components/Map/components/liquidFactoryLayer.vue b/src/components/Map/components/liquidFactoryLayer.vue new file mode 100644 index 0000000..6845b93 --- /dev/null +++ b/src/components/Map/components/liquidFactoryLayer.vue @@ -0,0 +1,112 @@ + + + + + + diff --git a/src/components/Map/components/manageStationLayer.vue b/src/components/Map/components/manageStationLayer.vue new file mode 100644 index 0000000..c0aff38 --- /dev/null +++ b/src/components/Map/components/manageStationLayer.vue @@ -0,0 +1,117 @@ + + + + + + diff --git a/src/components/Map/components/pipeLayer.vue b/src/components/Map/components/pipeLayer.vue new file mode 100644 index 0000000..64142a7 --- /dev/null +++ b/src/components/Map/components/pipeLayer.vue @@ -0,0 +1,103 @@ + + + + + + diff --git a/src/components/Map/components/routeLayer.vue b/src/components/Map/components/routeLayer.vue new file mode 100644 index 0000000..203bd89 --- /dev/null +++ b/src/components/Map/components/routeLayer.vue @@ -0,0 +1,133 @@ + + + + + + diff --git a/src/components/Map/components/stationLayer.vue b/src/components/Map/components/stationLayer.vue new file mode 100644 index 0000000..444c7d1 --- /dev/null +++ b/src/components/Map/components/stationLayer.vue @@ -0,0 +1,112 @@ + + + + + + diff --git a/src/components/Button/button3.vue b/src/components/Button/button3.vue new file mode 100644 index 0000000..973aa02 --- /dev/null +++ b/src/components/Button/button3.vue @@ -0,0 +1,103 @@ + + + + + + diff --git a/src/components/Map/MarsMap.vue b/src/components/Map/MarsMap.vue index 3528987..eb4d420 100644 --- a/src/components/Map/MarsMap.vue +++ b/src/components/Map/MarsMap.vue @@ -4,7 +4,7 @@ ref="map" :id="`mars3d-container${mapKey}`" :class="['mars3d-container', customClass, { 'mars3d-container-compare-rh' : compare }]"> - + @@ -37,6 +37,10 @@ return {} } }, + labelShow: { + type: Boolean, + default: true + }, // 地块上文字是否显示 // 是否分屏显示 compare: { type: Boolean, @@ -51,7 +55,17 @@ customClass: { type: String, default: '' - } + }, + colorful: { + type: Boolean, + default: false + }, + colorList: { + type: Array, + default: () => { + return ['#2F50F3', '#417EE0', '#1D2EB7', '#2E5EA8', '#386ADE', '#2D5BA7', '#4991DB', '#4991DB', '#4C96E6', '#2F50F3', '#0385BD', '#4A94DC'] + } + }// 地块使用的颜色列表 }, data() { return { @@ -93,9 +107,7 @@ var map = new mars3d.Map(`mars3d-container${this.mapKey}`, mapOptions) this.map = map this[`map${this.mapKey}`] = map - console.log('>>>>> 地图创建成功 >>>>', map) - // 挂载到全局对象下,所有组件通过 this.map 访问 // Vue.prototype[`map${this.mapKey}`] = map @@ -111,10 +123,8 @@ map._viewer.scene.backgroundColor = new mars3d.Cesium.Color(0.0, 0.0, 0.0, 0.0) map._viewer.scene.globe.baseColor = new mars3d.Cesium.Color(0.0, 0.0, 0.0, 0.0) map._viewer.scene.globe.baseColor.alpha = 0 + // 添加各市地块 this.addProvincePolygon() - // this.addLine() - this.addPipe() - // this.addPipe2() this.map.fixedLight = true // 抛出事件 this.$emit('onload', map) @@ -138,36 +148,6 @@ width: 5, // 宽度 height: 20000, clampToGround: false - // label: { - // // 面中心点,显示文字的配置 - // text: '{name}', // 对应的属性名称 - // opacity: 1, - // font_size: 20, - // color: '#ffffff', - // - // font_family: '楷体', - // outline: true, - // outlineColor: '#ffffff', - // outlineWidth: 1, - // - // background: false, - // backgroundColor: '#000000', - // backgroundOpacity: 0.1, - // - // font_weight: 'normal', - // font_style: 'normal', - // - // scaleByDistance: true, - // scaleByDistance_far: 20000000, - // scaleByDistance_farValue: 0.1, - // scaleByDistance_near: 1000, - // scaleByDistance_nearValue: 1, - // - // distanceDisplayCondition: false, - // distanceDisplayCondition_far: 10000, - // distanceDisplayCondition_near: 0, - // visibleDepth: false - // } } }, flyTo: true @@ -281,7 +261,7 @@ }, // 添加省地块 addProvincePolygon() { - const { mars3d } = this + const { mars3d, colorful, colorList } = this var graphicLayer = new mars3d.layer.DivLayer() this.polygonLayer = graphicLayer this.map.addLayer(graphicLayer) @@ -292,6 +272,7 @@ const coordinates = (features[i].geometry.coordinates[0][0]).map(item => { return [item[0], item[1], 0] }) + const color = colorful ? colorList[i] : '#3a77da' const graphic = new mars3d.graphic.PolygonEntity({ positions: coordinates, style: { @@ -299,16 +280,16 @@ // heightReference: mars3d.Cesium.HeightReference.RELATIVE_TO_GROUND, hasShadows: true, diffHeight: 10000.0, - color: '#3a77da', + color: color, opacity: 1, - outline: true, + outline: colorful ? false : true, outlineColor: '#4764c9', outlineWidth: 3, outlineOpacity: 1, arcType: mars3d.Cesium.ArcType.GEODESIC, label: { // 面中心点,显示文字的配置 - text: features[i].properties.name, // 对应的属性名称 + text: this.labelShow ? features[i].properties.name : '', // 对应的属性名称 opacity: 1, font_size: 20, color: '#ffffff', diff --git a/src/components/Map/components/earthquakeLayer.vue b/src/components/Map/components/earthquakeLayer.vue new file mode 100644 index 0000000..e7efdc1 --- /dev/null +++ b/src/components/Map/components/earthquakeLayer.vue @@ -0,0 +1,128 @@ + + + + + + diff --git a/src/components/Map/components/liquidFactoryLayer.vue b/src/components/Map/components/liquidFactoryLayer.vue new file mode 100644 index 0000000..6845b93 --- /dev/null +++ b/src/components/Map/components/liquidFactoryLayer.vue @@ -0,0 +1,112 @@ + + + + + + diff --git a/src/components/Map/components/manageStationLayer.vue b/src/components/Map/components/manageStationLayer.vue new file mode 100644 index 0000000..c0aff38 --- /dev/null +++ b/src/components/Map/components/manageStationLayer.vue @@ -0,0 +1,117 @@ + + + + + + diff --git a/src/components/Map/components/pipeLayer.vue b/src/components/Map/components/pipeLayer.vue new file mode 100644 index 0000000..64142a7 --- /dev/null +++ b/src/components/Map/components/pipeLayer.vue @@ -0,0 +1,103 @@ + + + + + + diff --git a/src/components/Map/components/routeLayer.vue b/src/components/Map/components/routeLayer.vue new file mode 100644 index 0000000..203bd89 --- /dev/null +++ b/src/components/Map/components/routeLayer.vue @@ -0,0 +1,133 @@ + + + + + + diff --git a/src/components/Map/components/stationLayer.vue b/src/components/Map/components/stationLayer.vue new file mode 100644 index 0000000..444c7d1 --- /dev/null +++ b/src/components/Map/components/stationLayer.vue @@ -0,0 +1,112 @@ + + + + + + diff --git a/src/components/Map/components/valveLayer.vue b/src/components/Map/components/valveLayer.vue new file mode 100644 index 0000000..5dff411 --- /dev/null +++ b/src/components/Map/components/valveLayer.vue @@ -0,0 +1,111 @@ + + + + + + diff --git a/src/components/Button/button3.vue b/src/components/Button/button3.vue new file mode 100644 index 0000000..973aa02 --- /dev/null +++ b/src/components/Button/button3.vue @@ -0,0 +1,103 @@ + + + + + + diff --git a/src/components/Map/MarsMap.vue b/src/components/Map/MarsMap.vue index 3528987..eb4d420 100644 --- a/src/components/Map/MarsMap.vue +++ b/src/components/Map/MarsMap.vue @@ -4,7 +4,7 @@ ref="map" :id="`mars3d-container${mapKey}`" :class="['mars3d-container', customClass, { 'mars3d-container-compare-rh' : compare }]"> - + @@ -37,6 +37,10 @@ return {} } }, + labelShow: { + type: Boolean, + default: true + }, // 地块上文字是否显示 // 是否分屏显示 compare: { type: Boolean, @@ -51,7 +55,17 @@ customClass: { type: String, default: '' - } + }, + colorful: { + type: Boolean, + default: false + }, + colorList: { + type: Array, + default: () => { + return ['#2F50F3', '#417EE0', '#1D2EB7', '#2E5EA8', '#386ADE', '#2D5BA7', '#4991DB', '#4991DB', '#4C96E6', '#2F50F3', '#0385BD', '#4A94DC'] + } + }// 地块使用的颜色列表 }, data() { return { @@ -93,9 +107,7 @@ var map = new mars3d.Map(`mars3d-container${this.mapKey}`, mapOptions) this.map = map this[`map${this.mapKey}`] = map - console.log('>>>>> 地图创建成功 >>>>', map) - // 挂载到全局对象下,所有组件通过 this.map 访问 // Vue.prototype[`map${this.mapKey}`] = map @@ -111,10 +123,8 @@ map._viewer.scene.backgroundColor = new mars3d.Cesium.Color(0.0, 0.0, 0.0, 0.0) map._viewer.scene.globe.baseColor = new mars3d.Cesium.Color(0.0, 0.0, 0.0, 0.0) map._viewer.scene.globe.baseColor.alpha = 0 + // 添加各市地块 this.addProvincePolygon() - // this.addLine() - this.addPipe() - // this.addPipe2() this.map.fixedLight = true // 抛出事件 this.$emit('onload', map) @@ -138,36 +148,6 @@ width: 5, // 宽度 height: 20000, clampToGround: false - // label: { - // // 面中心点,显示文字的配置 - // text: '{name}', // 对应的属性名称 - // opacity: 1, - // font_size: 20, - // color: '#ffffff', - // - // font_family: '楷体', - // outline: true, - // outlineColor: '#ffffff', - // outlineWidth: 1, - // - // background: false, - // backgroundColor: '#000000', - // backgroundOpacity: 0.1, - // - // font_weight: 'normal', - // font_style: 'normal', - // - // scaleByDistance: true, - // scaleByDistance_far: 20000000, - // scaleByDistance_farValue: 0.1, - // scaleByDistance_near: 1000, - // scaleByDistance_nearValue: 1, - // - // distanceDisplayCondition: false, - // distanceDisplayCondition_far: 10000, - // distanceDisplayCondition_near: 0, - // visibleDepth: false - // } } }, flyTo: true @@ -281,7 +261,7 @@ }, // 添加省地块 addProvincePolygon() { - const { mars3d } = this + const { mars3d, colorful, colorList } = this var graphicLayer = new mars3d.layer.DivLayer() this.polygonLayer = graphicLayer this.map.addLayer(graphicLayer) @@ -292,6 +272,7 @@ const coordinates = (features[i].geometry.coordinates[0][0]).map(item => { return [item[0], item[1], 0] }) + const color = colorful ? colorList[i] : '#3a77da' const graphic = new mars3d.graphic.PolygonEntity({ positions: coordinates, style: { @@ -299,16 +280,16 @@ // heightReference: mars3d.Cesium.HeightReference.RELATIVE_TO_GROUND, hasShadows: true, diffHeight: 10000.0, - color: '#3a77da', + color: color, opacity: 1, - outline: true, + outline: colorful ? false : true, outlineColor: '#4764c9', outlineWidth: 3, outlineOpacity: 1, arcType: mars3d.Cesium.ArcType.GEODESIC, label: { // 面中心点,显示文字的配置 - text: features[i].properties.name, // 对应的属性名称 + text: this.labelShow ? features[i].properties.name : '', // 对应的属性名称 opacity: 1, font_size: 20, color: '#ffffff', diff --git a/src/components/Map/components/earthquakeLayer.vue b/src/components/Map/components/earthquakeLayer.vue new file mode 100644 index 0000000..e7efdc1 --- /dev/null +++ b/src/components/Map/components/earthquakeLayer.vue @@ -0,0 +1,128 @@ + + + + + + diff --git a/src/components/Map/components/liquidFactoryLayer.vue b/src/components/Map/components/liquidFactoryLayer.vue new file mode 100644 index 0000000..6845b93 --- /dev/null +++ b/src/components/Map/components/liquidFactoryLayer.vue @@ -0,0 +1,112 @@ + + + + + + diff --git a/src/components/Map/components/manageStationLayer.vue b/src/components/Map/components/manageStationLayer.vue new file mode 100644 index 0000000..c0aff38 --- /dev/null +++ b/src/components/Map/components/manageStationLayer.vue @@ -0,0 +1,117 @@ + + + + + + diff --git a/src/components/Map/components/pipeLayer.vue b/src/components/Map/components/pipeLayer.vue new file mode 100644 index 0000000..64142a7 --- /dev/null +++ b/src/components/Map/components/pipeLayer.vue @@ -0,0 +1,103 @@ + + + + + + diff --git a/src/components/Map/components/routeLayer.vue b/src/components/Map/components/routeLayer.vue new file mode 100644 index 0000000..203bd89 --- /dev/null +++ b/src/components/Map/components/routeLayer.vue @@ -0,0 +1,133 @@ + + + + + + diff --git a/src/components/Map/components/stationLayer.vue b/src/components/Map/components/stationLayer.vue new file mode 100644 index 0000000..444c7d1 --- /dev/null +++ b/src/components/Map/components/stationLayer.vue @@ -0,0 +1,112 @@ + + + + + + diff --git a/src/components/Map/components/valveLayer.vue b/src/components/Map/components/valveLayer.vue new file mode 100644 index 0000000..5dff411 --- /dev/null +++ b/src/components/Map/components/valveLayer.vue @@ -0,0 +1,111 @@ + + + + + + diff --git a/src/components/Map/components/weatherLayer.vue b/src/components/Map/components/weatherLayer.vue index ad444ae..98afe91 100644 --- a/src/components/Map/components/weatherLayer.vue +++ b/src/components/Map/components/weatherLayer.vue @@ -20,7 +20,7 @@ size: { type: String, default: '' - }, // 颜色类型:single单色柱,multi多色柱 + }, // 大小 scale: { type: Number, default: 1 diff --git a/src/components/Button/button3.vue b/src/components/Button/button3.vue new file mode 100644 index 0000000..973aa02 --- /dev/null +++ b/src/components/Button/button3.vue @@ -0,0 +1,103 @@ + + + + + + diff --git a/src/components/Map/MarsMap.vue b/src/components/Map/MarsMap.vue index 3528987..eb4d420 100644 --- a/src/components/Map/MarsMap.vue +++ b/src/components/Map/MarsMap.vue @@ -4,7 +4,7 @@ ref="map" :id="`mars3d-container${mapKey}`" :class="['mars3d-container', customClass, { 'mars3d-container-compare-rh' : compare }]"> - + @@ -37,6 +37,10 @@ return {} } }, + labelShow: { + type: Boolean, + default: true + }, // 地块上文字是否显示 // 是否分屏显示 compare: { type: Boolean, @@ -51,7 +55,17 @@ customClass: { type: String, default: '' - } + }, + colorful: { + type: Boolean, + default: false + }, + colorList: { + type: Array, + default: () => { + return ['#2F50F3', '#417EE0', '#1D2EB7', '#2E5EA8', '#386ADE', '#2D5BA7', '#4991DB', '#4991DB', '#4C96E6', '#2F50F3', '#0385BD', '#4A94DC'] + } + }// 地块使用的颜色列表 }, data() { return { @@ -93,9 +107,7 @@ var map = new mars3d.Map(`mars3d-container${this.mapKey}`, mapOptions) this.map = map this[`map${this.mapKey}`] = map - console.log('>>>>> 地图创建成功 >>>>', map) - // 挂载到全局对象下,所有组件通过 this.map 访问 // Vue.prototype[`map${this.mapKey}`] = map @@ -111,10 +123,8 @@ map._viewer.scene.backgroundColor = new mars3d.Cesium.Color(0.0, 0.0, 0.0, 0.0) map._viewer.scene.globe.baseColor = new mars3d.Cesium.Color(0.0, 0.0, 0.0, 0.0) map._viewer.scene.globe.baseColor.alpha = 0 + // 添加各市地块 this.addProvincePolygon() - // this.addLine() - this.addPipe() - // this.addPipe2() this.map.fixedLight = true // 抛出事件 this.$emit('onload', map) @@ -138,36 +148,6 @@ width: 5, // 宽度 height: 20000, clampToGround: false - // label: { - // // 面中心点,显示文字的配置 - // text: '{name}', // 对应的属性名称 - // opacity: 1, - // font_size: 20, - // color: '#ffffff', - // - // font_family: '楷体', - // outline: true, - // outlineColor: '#ffffff', - // outlineWidth: 1, - // - // background: false, - // backgroundColor: '#000000', - // backgroundOpacity: 0.1, - // - // font_weight: 'normal', - // font_style: 'normal', - // - // scaleByDistance: true, - // scaleByDistance_far: 20000000, - // scaleByDistance_farValue: 0.1, - // scaleByDistance_near: 1000, - // scaleByDistance_nearValue: 1, - // - // distanceDisplayCondition: false, - // distanceDisplayCondition_far: 10000, - // distanceDisplayCondition_near: 0, - // visibleDepth: false - // } } }, flyTo: true @@ -281,7 +261,7 @@ }, // 添加省地块 addProvincePolygon() { - const { mars3d } = this + const { mars3d, colorful, colorList } = this var graphicLayer = new mars3d.layer.DivLayer() this.polygonLayer = graphicLayer this.map.addLayer(graphicLayer) @@ -292,6 +272,7 @@ const coordinates = (features[i].geometry.coordinates[0][0]).map(item => { return [item[0], item[1], 0] }) + const color = colorful ? colorList[i] : '#3a77da' const graphic = new mars3d.graphic.PolygonEntity({ positions: coordinates, style: { @@ -299,16 +280,16 @@ // heightReference: mars3d.Cesium.HeightReference.RELATIVE_TO_GROUND, hasShadows: true, diffHeight: 10000.0, - color: '#3a77da', + color: color, opacity: 1, - outline: true, + outline: colorful ? false : true, outlineColor: '#4764c9', outlineWidth: 3, outlineOpacity: 1, arcType: mars3d.Cesium.ArcType.GEODESIC, label: { // 面中心点,显示文字的配置 - text: features[i].properties.name, // 对应的属性名称 + text: this.labelShow ? features[i].properties.name : '', // 对应的属性名称 opacity: 1, font_size: 20, color: '#ffffff', diff --git a/src/components/Map/components/earthquakeLayer.vue b/src/components/Map/components/earthquakeLayer.vue new file mode 100644 index 0000000..e7efdc1 --- /dev/null +++ b/src/components/Map/components/earthquakeLayer.vue @@ -0,0 +1,128 @@ + + + + + + diff --git a/src/components/Map/components/liquidFactoryLayer.vue b/src/components/Map/components/liquidFactoryLayer.vue new file mode 100644 index 0000000..6845b93 --- /dev/null +++ b/src/components/Map/components/liquidFactoryLayer.vue @@ -0,0 +1,112 @@ + + + + + + diff --git a/src/components/Map/components/manageStationLayer.vue b/src/components/Map/components/manageStationLayer.vue new file mode 100644 index 0000000..c0aff38 --- /dev/null +++ b/src/components/Map/components/manageStationLayer.vue @@ -0,0 +1,117 @@ + + + + + + diff --git a/src/components/Map/components/pipeLayer.vue b/src/components/Map/components/pipeLayer.vue new file mode 100644 index 0000000..64142a7 --- /dev/null +++ b/src/components/Map/components/pipeLayer.vue @@ -0,0 +1,103 @@ + + + + + + diff --git a/src/components/Map/components/routeLayer.vue b/src/components/Map/components/routeLayer.vue new file mode 100644 index 0000000..203bd89 --- /dev/null +++ b/src/components/Map/components/routeLayer.vue @@ -0,0 +1,133 @@ + + + + + + diff --git a/src/components/Map/components/stationLayer.vue b/src/components/Map/components/stationLayer.vue new file mode 100644 index 0000000..444c7d1 --- /dev/null +++ b/src/components/Map/components/stationLayer.vue @@ -0,0 +1,112 @@ + + + + + + diff --git a/src/components/Map/components/valveLayer.vue b/src/components/Map/components/valveLayer.vue new file mode 100644 index 0000000..5dff411 --- /dev/null +++ b/src/components/Map/components/valveLayer.vue @@ -0,0 +1,111 @@ + + + + + + diff --git a/src/components/Map/components/weatherLayer.vue b/src/components/Map/components/weatherLayer.vue index ad444ae..98afe91 100644 --- a/src/components/Map/components/weatherLayer.vue +++ b/src/components/Map/components/weatherLayer.vue @@ -20,7 +20,7 @@ size: { type: String, default: '' - }, // 颜色类型:single单色柱,multi多色柱 + }, // 大小 scale: { type: Number, default: 1 diff --git a/src/views/maps/mapOverview2.vue b/src/views/maps/mapOverview2.vue index 9709de4..d9103b0 100644 --- a/src/views/maps/mapOverview2.vue +++ b/src/views/maps/mapOverview2.vue @@ -6,7 +6,8 @@