瀏覽代碼

首页电站图,点位已绑定,但集电站坐标不确定,随意摆放了

mw_666 3 年之前
父節點
當前提交
40cc61d5c0

+ 1 - 0
src/views/Home/components/map.vue

@@ -303,6 +303,7 @@ export default {
       this.safeDay = res;
     },
     data(res) {
+		console.log(res)
       this.sourceMap = res;
     },
     xtData(res) {

+ 38 - 7
src/views/Home/components/map/DWK_GDC.vue

@@ -1,7 +1,7 @@
 <template>
 	<div class="svg-map">
-		<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 682 483" 
-			:style=" 'enable-background: new 0 0 682 483; left: ' + svgLeft + '; top: ' + svgTop + ';'
+		<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+			viewBox="0 0 682 483" :style=" 'enable-background: new 0 0 682 483; left: ' + svgLeft + '; top: ' + svgTop + ';'
       " xml:space="preserve" :width="svgWidth" :height="svgHeight">
 			<defs>
 				<g id="nx-map-panel">
@@ -53,13 +53,24 @@
 			</g>
 
 			<g>
-				<g class="pointer" transform="matrix(1,0,0,1,388,272)">
+				<g class="pointer" transform="matrix(1,0,0,1,388,272)" v-if="activeId === 'all' || activeId === 'DWK01_GC'" @click.stop="clickFj('DWK01_XL', '大武口1#')">
 					<use xlink:href="#nx-map-circle" x="0" y="0" />
 					<use xlink:href="#nx-map-panel" x="0" y="0" />
 					<rect x="55" y="45" width="130" height="23" stroke="#46C55A35" fill="#000000" opacity="0.8" />
-					<text x="60" y="62" fill="#919697" font-size="14">逆变器</text>
+					<text x="60" y="62" fill="#919697" font-size="14">1#集电线</text>
 					<text x="180" y="62" fill="#05bb4c" font-size="14" text-anchor="end">
-						126台
+						{{ sourceMap.DWK01_XL_fcgl }}万kw
+					</text>
+				</g>
+			</g>
+			<g>
+				<g class="pointer" transform="matrix(1,0,0,1,430,182)" v-if="activeId === 'all' || activeId === 'DWK02_GC'" @click.stop="clickFj('DWK02_XL', '大武口2#')">
+					<use xlink:href="#nx-map-circle" x="0" y="0" />
+					<use xlink:href="#nx-map-panel" x="0" y="0" />
+					<rect x="55" y="45" width="130" height="23" stroke="#46C55A35" fill="#000000" opacity="0.8" />
+					<text x="60" y="62" fill="#919697" font-size="14">2#集电线</text>
+					<text x="180" y="62" fill="#05bb4c" font-size="14" text-anchor="end">
+						{{ sourceMap.DWK02_XL_fcgl }}万kw
 					</text>
 				</g>
 			</g>
@@ -74,7 +85,12 @@
 		// 使用组件
 		components: {},
 		// 传入参数
-		props: {},
+		props: {
+			data: {
+				type: Object,
+				default: () => {},
+			},
+		},
 		// 自定义事件
 		emits: {
 			changePeriod: null,
@@ -82,7 +98,7 @@
 		// 数据
 		data() {
 			return {
-				activeId: "",
+				activeId: "all",
 				c1: false,
 				c2: false,
 				svgTop: 0,
@@ -93,6 +109,15 @@
 		},
 		// 函数
 		methods: {
+			changeshowType(id, planBtnName) {
+				this.activeId = id;
+				this.$emit("clickFj", id, planBtnName);
+				this.$emit("changePeriod", "大武口", planBtnName.substring(planBtnName.length - 2));
+			},
+			clickFj(id, planBtnName) {
+				this.$emit("clickFj", id, planBtnName);
+				this.$emit("changePeriod", "大武口", planBtnName.substring(planBtnName.length - 2));
+			},
 			click: function(id) {
 				this.activeId = id;
 			},
@@ -104,6 +129,7 @@
 		},
 		created() {
 			// 创建后
+			this.sourceMap = this.data;
 			setTimeout(() => {
 				this.c1 = true;
 				setTimeout(() => {
@@ -129,6 +155,11 @@
 		updated() {
 			// 数据更新后
 		},
+		watch: {
+			data(res) {
+				this.sourceMap = res;
+			},
+		},
 	};
 </script>
 

文件差異過大導致無法顯示
+ 300 - 340
src/views/Home/components/map/MCH_GDC.vue


文件差異過大導致無法顯示
+ 373 - 340
src/views/Home/components/map/PL_GDC.vue


文件差異過大導致無法顯示
+ 334 - 340
src/views/Home/components/map/XH_GDC.vue


文件差異過大導致無法顯示
+ 407 - 554
src/views/Home/components/map/XS_FDC.vue