Преглед изворни кода

首页风场期次和线路字切换

mw_666 пре 3 година
родитељ
комит
09860f8e12

+ 11 - 3
src/views/Home/components/map.vue

@@ -28,7 +28,7 @@
     <div class="name-box" v-if="currentMode != 'NX'">
       <div class="name-box-title" @click="onBackStation">{{ currentTitle }}</div>
       <div class="name-box-period" v-show="currentPeriod != 'ZERO'">
-        <span class="name-box-period-label">期次:</span>
+        <span class="name-box-period-label">{{textType}}:</span>
         <span class="name-box-period-value"
           >{{ currentName }}{{ currentPeriod }}</span
         >
@@ -221,6 +221,7 @@ export default {
   // 数据
   data() {
     return {
+		textType:'期次',
       fcId: "",
       safeDay: "",
       showType: "all",
@@ -281,10 +282,17 @@ export default {
       this.mapIndex = 1;
       this.$emit("mapClick", wpId, planBtnName);
     },
-    clickFj(wpId, planBtnName) {
+    clickFj(wpId, planBtnName,textType) {
+		console.log(textType)
       this.$emit("mapClick", wpId, planBtnName);
     },
-    changePeriod: function (name, period) {
+    changePeriod: function (name, period,textType) {
+		console.log(textType)
+		if(textType){
+			this.textType = '期次'
+		}else{
+			this.textType = '线路'
+		}
       this.currentName = name;
       this.currentPeriod = period;
       this.currentMode = "SUB";

+ 2 - 2
src/views/Home/components/map/MHS_FDC.vue

@@ -320,7 +320,7 @@ export default {
     changeshowType(id, planBtnName) {
       this.activeId = id;
       this.$emit("clickFj", id, planBtnName);
-      this.$emit("changePeriod", "麻黄山", planBtnName.substring(planBtnName.length - 2));
+      this.$emit("changePeriod", "麻黄山", planBtnName.substring(planBtnName.length - 2),1);
     },
     clickFj(id, planBtnName) {
       this.$emit("clickFj", id, planBtnName);
@@ -353,7 +353,7 @@ export default {
           elsImage[index].style.display = "block";
           let period = this.getAttribute("data-period");
           let strs = period.split(",");
-          that.$emit("changePeriod", "麻黄山", strs[1].substring(strs[1].length - 2));
+          that.$emit("changePeriod", "麻黄山", strs[1].substring(strs[1].length - 2),1);
           that.changeshowType(strs[0], strs[1]);
           that.$emit("clickFj", strs[0], strs[1]);
           this.style.opacity = 0;

+ 2 - 2
src/views/Home/components/map/NSS_FDC.vue

@@ -495,7 +495,7 @@ export default {
     changeshowType(id, planBtnName) {
       this.activeId = id;
       this.$emit("clickFj", id, planBtnName);
-      this.$emit("changePeriod", "牛首山", planBtnName.substring(planBtnName.length - 2));
+      this.$emit("changePeriod", "牛首山", planBtnName.substring(planBtnName.length - 2),1);
     },
     clickFj(id, planBtnName) {
       this.$emit("clickFj", id, planBtnName);
@@ -531,7 +531,7 @@ export default {
           elsImage[index].style.display = "block";
           let period = this.getAttribute("data-period");
           let strs = period.split(",");
-          that.$emit("changePeriod", "牛首山", strs[1].substring(strs[1].length - 2));
+          that.$emit("changePeriod", "牛首山", strs[1].substring(strs[1].length - 2),1);
           that.changeshowType(strs[0], strs[1]);
           that.$emit("clickFj", strs[0], strs[1]);
           this.style.opacity = 0.2;

+ 2 - 2
src/views/Home/components/map/QS_FDC.vue

@@ -458,7 +458,7 @@ export default {
     changeshowType(id, planBtnName) {
       this.activeId = id;
       this.$emit("clickFj", id, planBtnName);
-      this.$emit("changePeriod", "青山", planBtnName.substring(planBtnName.length - 2));
+      this.$emit("changePeriod", "青山", planBtnName.substring(planBtnName.length - 2),1);
     },
     clickFj(id, planBtnName) {
       this.$emit("clickFj", id, planBtnName);
@@ -494,7 +494,7 @@ export default {
           elsImage[index].style.display = "block";
           let period = this.getAttribute("data-period");
           let strs = period.split(",");
-          that.$emit("changePeriod", "青山", strs[1].substring(strs[1].length - 2));
+          that.$emit("changePeriod", "青山", strs[1].substring(strs[1].length - 2),1);
           that.changeshowType(strs[0], strs[1]);
           that.$emit("clickFj", strs[0], strs[1]);
           this.style.opacity = 0.2;

+ 2 - 2
src/views/Home/components/map/SBQ_FDC.vue

@@ -578,7 +578,7 @@ export default {
     changeshowType(id, planBtnName) {
       this.activeId = id;
       this.$emit("clickFj", id, planBtnName);
-      this.$emit("changePeriod", "石板泉", planBtnName.substring(planBtnName.length - 2));
+      this.$emit("changePeriod", "石板泉", planBtnName.substring(planBtnName.length - 2),1);
     },
     clickFj(id, planBtnName) {
       this.$emit("clickFj", id, planBtnName);
@@ -614,7 +614,7 @@ export default {
           elsImage[index].style.display = "block";
           let period = this.getAttribute("data-period");
           let strs = period.split(",");
-          that.$emit("changePeriod", "石板泉", strs[1].substring(strs[1].length - 2));
+          that.$emit("changePeriod", "石板泉", strs[1].substring(strs[1].length - 2),1);
           that.changeshowType(strs[0], strs[1]);
           that.$emit("clickFj", strs[0], strs[1]);
           this.style.opacity = 0.2;

+ 5 - 5
src/views/Home/components/map/XS_FDC.vue

@@ -58,7 +58,7 @@
                     c-2-6.4-3.9-12.7-10.9-15.7c-1.9-0.8-2-3.3-2.3-5.3c-0.3-2.9,1.5-5.1,2.9-7.3c1.8-2.8,2.3-5-0.4-7.9c-2.6-2.7-2.8-6.2-0.6-9.6
                     c1.1-1.7,2.1-3.6,0.2-5.4c-3.3-3.3-6.1-7-10.3-9.3c-6.6-3.6-6.7-3.9-4.6-11.4c0.8-2.8,1.4-5.7-1-7.9c-6.7-6.3-7.6-16-13.4-22.9
                     C3.7,327,2.8,323.8,0,322z" fill="#119933" opacity="0" class="map-float"
-						data-period="XS02_GC,香山二期" />
+						data-period="XS02_GC,香山二期,1" />
 					<path d="M592,14c1.7,0,3.3,0,5,0c2,2.3,4.7,3.7,7.4,5c7,3.4,14.2,6.6,21.2,10.2c11.2,5.7,19.3,13.5,17.5,27.5c-0.3,2.6,0,5.3,0.1,8
                     c0.7,14.2-0.7,28.2-3.7,42.1c-0.8,3.6-1.6,6.3,2.4,8.2c1.8,0.9,2.8,2.8,3.1,4.9c0.9,5.6,2,11.2,0.9,16.9c-0.8,4.2,0.6,5.4,4.4,4.2
                     c5.3-1.6,9,0.2,11.7,4.8c1,1.8,2.8,2.8,4.5,3.9c2,1.3,1.8,2.6,0,3.9c-1.9,1.4-3.8,2.7-5.7,4c-1.5,1-2.5,2.2-1.3,4.1
@@ -75,7 +75,7 @@
                     c3.3-9.3,8.8-17.5,14.3-25.7c0.9-1.3,2.5-1.5,3.8-2.2c5-2.7,9.9-5.5,11.5-11.6c0.4-1.7,1.4-3.1,2.8-4.1c8.6-6.4,13-15.3,15.7-25.4
                     c1-3.7,3.1-5.9,6.6-7.5c6.4-3,13.3-1.6,19.6-1.4c12.9,0.3,24.3-2.5,35.2-9c2.5-1.5,5.2-2.9,8-2.3c5.3,1.2,10.2-0.2,15.2-1.7
                     c2.9-0.8,5.8-1.8,7.9,1.7c1.1,1.8,2.8,1.7,4.4,0.6C581.7,16.7,586.9,15.5,592,14z" fill="#119933"
-						opacity="0" class="map-float" data-period="XS01_GC,香山一期" />
+						opacity="0" class="map-float" data-period="XS01_GC,香山一期,1" />
 				</g>
 			</g>
 			<g>
@@ -171,10 +171,10 @@
 			changeshowType(id, planBtnName) {
 				this.activeId = id;
 				this.$emit("clickFj", id, planBtnName);
-				this.$emit("changePeriod", "香山", planBtnName.substring(planBtnName.length - 2));
+				this.$emit("changePeriod", "香山", planBtnName.substring(planBtnName.length - 2),1);
 			},
 			clickFj(id, planBtnName) {
-				this.$emit("clickFj", id, planBtnName);
+				this.$emit("clickFj", id, planBtnName,2);
 				this.$emit("changePeriod", "香山", planBtnName.substring(planBtnName.length - 2));
 			},
 			click: function(id) {
@@ -207,7 +207,7 @@
 						elsImage[index].style.display = "block";
 						let period = this.getAttribute("data-period");
 						let strs = period.split(",");
-						that.$emit("changePeriod", "香山", strs[1].substring(strs[1].length - 2));
+						that.$emit("changePeriod", "香山", strs[1].substring(strs[1].length - 2),1);
 						that.changeshowType(strs[0], strs[1]);
 						that.$emit("clickFj", strs[0], strs[1]);
 						this.style.opacity = 0.2;