dedsudiyu 9 meses atrás
pai
commit
2a228532ed

+ 7 - 6
pages_manage/views/emergencyEvacuationBig.vue

@@ -257,9 +257,7 @@
 			console.log('option', option);
 			if (option.item) {
 				let obj = JSON.parse(decodeURIComponent(option.item));
-				console.log('obj', obj);
 				this.$set(this, 'warnData', obj);
-				console.log('obj', obj);
 				this.$set(this, 'buildingId', obj.buildId);
 				this.$set(this, 'deptId', obj.buildId);
 				this.$set(this, 'floorId', obj.floorId);
@@ -267,7 +265,6 @@
 				this.$set(this.itemData, 'subjectId', obj.subId);
 				this.$set(this, 'groupId', obj.groupId);
 				this.$set(this, 'pageType', 2);
-				console.log('groupId', this.groupId);
 			}
 		},
 		onShow() {
@@ -1141,9 +1138,13 @@
 			},
 			//过滤'预案发生'标记文字并返回数据
 			textFiltration(str) {
-				if (str.indexOf("(预案发生)") != -1) {
-					return str.slice(str.indexOf(")") + 1);
-				} else {
+				if(str){
+					if (str.indexOf("(预案发生)") != -1) {
+						return str.slice(str.indexOf(")") + 1);
+					} else {
+						return str
+					}
+				}else{
 					return str
 				}
 			},

+ 62 - 12
pages_manage/views/laboratory/airConditioning.vue

@@ -13,7 +13,8 @@
 			</view>
 			<view class="panel-b" v-if="infraredControllerForm.switchType == 1 && infraredControllerForm.functionType != 3">
 				<view @click="subtract">-</view>
-				<view v-for="(item,index) in infraredControllerData.orderList" :key="index" v-if="item.value == infraredControllerForm.orderType">{{item.value}}</view>
+				<view v-for="(item,index) in infraredControllerData.refrigerationList" :key="index" v-if="infraredControllerForm.functionType==1&&item.value == infraredControllerForm.orderType">{{item.value}}</view>
+				<view v-for="(item,index) in infraredControllerData.heatingList" :key="index" v-if="infraredControllerForm.functionType==2&&item.value == infraredControllerForm.orderType">{{item.value}}</view>
 				<view @click="add">+</view>
 			</view>
 			<view class="panel-button" @click="mangerControl">确定</view>
@@ -49,7 +50,8 @@
             {label:'制热',value:'2'},
             {label:'通风',value:'3'},
           ],
-          orderList:[
+          //制冷
+          refrigerationList:[
             {label:"18°C",value:18},
             {label:"19°C",value:19},
             {label:"20°C",value:20},
@@ -60,6 +62,19 @@
             {label:"25°C",value:25},
             {label:"26°C",value:26},
             {label:"27°C",value:27},
+            {label:"28°C",value:28},
+          ],
+          //制热
+          heatingList:[
+            {label:"22°C",value:22},
+            {label:"23°C",value:23},
+            {label:"24°C",value:24},
+            {label:"25°C",value:25},
+            {label:"26°C",value:26},
+            {label:"27°C",value:27},
+            {label:"28°C",value:28},
+            {label:"29°C",value:29},
+            {label:"30°C",value:30},
           ],
         }
 			}
@@ -101,23 +116,58 @@
 			  this.$parent.buttonClick('conditioningClose','');
 			},
 			switchFun(){
-				if(this.infraredControllerForm.switchType==0){
-					this.$set(this.infraredControllerForm, 'switchType',1);
-				}else{
-					this.$set(this.infraredControllerForm, 'switchType',0);
-				}
+        if(!this.infraredControllerForm.switchType){
+          if (this.infraredControllerForm.functionType == 1){
+            if(this.infraredControllerForm.orderType<18 || this.infraredControllerForm.orderType>28){
+              this.$set(this.infraredControllerForm,'orderType',18);
+            }
+          } else if(this.infraredControllerForm.functionType == 2){
+            if(this.infraredControllerForm.orderType<22 || this.infraredControllerForm.orderType>30){
+              this.$set(this.infraredControllerForm,'orderType',22);
+            }
+          }else if(this.infraredControllerForm.functionType == 3){
+            this.$set(this.infraredControllerForm,'orderType',18);
+          }else{
+            this.$set(this.infraredControllerForm,'functionType',1);
+            this.$set(this.infraredControllerForm,'orderType',18);
+          }
+        }
+        this.$set(this.infraredControllerForm,'switchType',!this.infraredControllerForm.switchType);
 			},
 			temperatureFun(value){
-				this.$set(this.infraredControllerForm, 'functionType',value);
+        if(this.infraredControllerForm.functionType != value){
+          if (value == 1){
+            if(this.infraredControllerForm.orderType<18 || this.infraredControllerForm.orderType>28){
+              this.$set(this.infraredControllerForm,'orderType',18);
+            }
+          } else if(value == 2){
+            if(this.infraredControllerForm.orderType<22 || this.infraredControllerForm.orderType>30){
+              this.$set(this.infraredControllerForm,'orderType',22);
+            }
+          }
+          this.$set(this.infraredControllerForm,'functionType',value);
+        }
 			},
 			add() {
-        if(this.infraredControllerForm.orderType<27){
-          this.infraredControllerForm.orderType++
+        if (this.infraredControllerForm.functionType == 1){
+          if(this.infraredControllerForm.orderType<28){
+            this.infraredControllerForm.orderType++
+          }
+        } else if(this.infraredControllerForm.functionType == 2){
+          if(this.infraredControllerForm.orderType<30){
+            this.infraredControllerForm.orderType++
+          }
         }
 			},
 			subtract() {
-        if(this.infraredControllerForm.orderType>18){
-          this.infraredControllerForm.orderType--
+        if (this.infraredControllerForm.functionType == 1){
+          if(this.infraredControllerForm.orderType>18){
+            this.infraredControllerForm.orderType--
+          }
+        } else if(this.infraredControllerForm.functionType == 2){
+          if(this.infraredControllerForm.orderType>22){
+            this.infraredControllerForm.orderType--
+          }
         }
 			},