Procházet zdrojové kódy

fix:“参数调整补上MG330机型,优化闹钟页面,修复设备重复添加问题”

soobin před 1 rokem
rodič
revize
34ecdabaf9

+ 11 - 3
packageA/pages/remote/alarmClockItem.vue

@@ -184,12 +184,14 @@
 					.then(data => {
 						// this.merchantList = data;
 						// console.log("1223");
+						this.equipmentNameList = [];
 						var listName = data[0].equipmentList;
 						var equipmentNameList = this.equipmentNameList;
 						var co = {};
 						co["value"] = 'all';
 						co["label"] = this.$t('common.allDevice');
 						equipmentNameList.push(co);
+						console.log("设备1", equipmentNameList);
 						for (var i = 0; i < listName.length; i++) {
 							var cov = {};
 							cov["value"] = listName[i].id;
@@ -198,6 +200,7 @@
 							equipmentNameList.push(cov);
 						}
 						this.equipmentNameList = equipmentNameList;
+						console.log("设备2", equipmentNameList);
 						var listId = data[0].id;
 						if (listId != null && listId != '1') {
 							uni.setStorageSync("listName", listName);
@@ -430,7 +433,9 @@
 					if (code == clientId) {
 						n++;
 						var id = list[i].id;
-						this.equipmentIds.push(id);
+						if (!this.equipmentIds.includes(id)) {	
+							this.equipmentIds.push(id);
+						}
 						break;
 					}
 				}
@@ -555,9 +560,12 @@
 					.then(res => {
 						uni.showToast({
 							title: res.message,
-							duration: 2000
+							duration: 2000,
+							success: uni.navigateBack({
+								url: 'alarmClockList'
+							}),
 						});
-						uni.stopPullDownRefresh();
+						
 					}, _ => void uni.stopPullDownRefresh());
 			},
 			delet() {

+ 2 - 2
packageA/pages/remote/generalParameters.vue

@@ -88,7 +88,7 @@
 			</view>
 			<view class="line2"></view>
 			<!-- 320和301特有 -->
-			<view class="" v-show="equimentType=='MG301'||equimentType=='MG320'">
+			<view class="" v-show="equimentType=='MG301' || equimentType=='MG320' || equimentType=='MG330'">
 				<view class="line2"></view>
 				<view class="body">
 					<p class="p">{{$t('generalParameters.headLowSpeed')}}:</p>
@@ -131,7 +131,7 @@
 				</view>
 			</view>
 			<!-- //320特有 -->
-			<view class="" v-show="equimentType=='MG320'">
+			<view class="" v-show="equimentType=='MG320' || equimentType=='MG330'">
 				<view class="line2"></view>
 				<view class="body">
 					<p class="p">{{$t('generalParameters.headDuringHumidification')}}:</p>