dedsudiyu 10 månader sedan
förälder
incheckning
70e50e9e76
2 ändrade filer med 17 tillägg och 4 borttagningar
  1. 1 1
      pages/views/saoCode/saoCode.vue
  2. 16 3
      pages_manage/views/laboratory/infoPage.vue

+ 1 - 1
pages/views/saoCode/saoCode.vue

@@ -186,7 +186,7 @@
 				});
 				if (data.code == 200) {
 					uni.redirectTo({
-						url: '/pages_manage/views/laboratory/infoPage?infoData=' + encodeURIComponent(JSON.stringify(data.data))
+						url: '/pages_manage/views/laboratory/infoPage?infoData=' + encodeURIComponent(JSON.stringify(data.data))+'&saoCode=true'
 					});
 				}
 			},

+ 16 - 3
pages_manage/views/laboratory/infoPage.vue

@@ -21,8 +21,11 @@
 			</view>
 		</view>
 		<view class="tab-btn">
-			<view :class="currentIndex==index?'color-B':''" v-for="(item,index) in tabData" :key="index"
-				@click="tabFun(index)">{{item}}</view>
+			<view :class="currentIndex==0?'color-B':''" @click="tabFun(0)" v-if="!saoCodeType">物联控制</view>
+			<view :class="currentIndex==1?'color-B':''" @click="tabFun(1)">安全信息牌</view>
+			<view :class="currentIndex==2?'color-B':''" @click="tabFun(2)" v-if="!saoCodeType">进出记录</view>
+			<!-- <view :class="currentIndex==index?'color-B':''" v-for="(item,index) in tabData" :key="index"
+				@click="tabFun(index)">{{item}}</view> -->
 		</view>
 		<!-- 物联控制 -->
 		<iotControl ref="iotControl" v-if="pageType == 2" :subjectData="subjectData"></iotControl>
@@ -66,7 +69,7 @@
 				newData: {},
 				tabData: ['物联控制', '安全信息牌', '进出记录'],
 				currentIndex: 0,
-				pageType: 2,
+				pageType: 0,
 				//语音广播弹窗
 				broadcastPage: false,
 				//空调弹窗
@@ -79,6 +82,7 @@
 				subjectData: null,
 				// 空调弹窗
 				airConditioningData: null,
+				saoCodeType:false,
 			}
 		},
 		// 父页面  
@@ -91,6 +95,15 @@
 		onLoad(option) {
 			this.$set(this, 'newData', JSON.parse(decodeURIComponent(option.infoData)));
 			this.$set(this, 'subjectData', JSON.parse(decodeURIComponent(option.infoData)));
+			if(option.saoCode){
+				this.$set(this,'saoCodeType',true);
+				this.$set(this,'currentIndex',1);
+				this.$set(this,'pageType',3);
+			}else{
+				this.$set(this,'saoCodeType',false);
+				this.$set(this,'currentIndex',0);
+				this.$set(this,'pageType',2);
+			}
 		},
 		created() {