Browse Source

风电场卡片传参 动态

zhaomiao 4 years ago
parent
commit
e3dbc2b6b2

+ 3 - 2
components/windFarmcard/WindFarmcard.vue

@@ -1,6 +1,6 @@
 <template>
 	<view>
-		<view class="windStationCard" @tap="common.navTo('/components/windStationCardDetail/WindStationCardDetail?option=' + plusDrawerList.name.substring(0,2) )" v-if="plusDrawerList.windId!=0">
+		<view class="windStationCard" @tap="common.navTo('/components/windStationCardDetail/WindStationCardDetail?option=' + plusDrawerList.windId+'&windStationName='+plusDrawerList.name)" v-if="plusDrawerList.windId!=0">
 			<view class="windStationTitle">{{plusDrawerList.name}}</view>
 			<view class="powerAndSpeedContainer">
 				<view class="powerAndSpeedRed">
@@ -124,7 +124,8 @@
 
 		methods: {
 			getWindfieldid:function(plusDrawerList) {
-				this.plusDrawerList = plusDrawerList;				
+				this.plusDrawerList = plusDrawerList;	
+				console.log(this.plusDrawerList);
 			},
 			getWindfielddata:function(index_windStation_cardmodule){
 				this.cardmodule = false;

+ 6 - 3
components/windStationCardDetail/WindStationCardDetail.vue

@@ -229,8 +229,11 @@
 			};
 		},
 		onLoad(option) {
-			this.windStationName = option.option;
-			if (this.windStationName == '崇礼') {
+			this.FDC = option.option;
+			this.windStationName=option.windStationName;
+			console.log(option.option);
+			console.log("---")
+			/* if (this.windStationName == '崇礼') {
 				this.FDC = 'CL_FDC';
 			};
 			if (this.windStationName == '代县') {
@@ -238,7 +241,7 @@
 			};
 			if (this.windStationName == '康保') {
 				this.FDC = 'KB_FDC';
-			};
+			}; */
 			this.cWidth = uni.upx2px(750);
 			this.cHeight = uni.upx2px(400);