Parcourir la source

fix(server,equipList2): 完善跨页面传参和设备型号判断逻辑

1. 修复跨页面通信时仅传递purId的问题,新增传递menu和device_model参数
2. 新增对名为zhiCbd的设备型号的判断,设置对应device_model为16
3. 适配equipList2页面接收多参数的逻辑变更
allen il y a 6 heures
Parent
commit
d960083eec
2 fichiers modifiés avec 8 ajouts et 4 suppressions
  1. 7 3
      pages/equipList2/index.vue
  2. 1 1
      pages/server/index.vue

+ 7 - 3
pages/equipList2/index.vue

@@ -278,7 +278,9 @@
 					this.device_model = 14;
 				}else if(name === 'gkcbd1'){
 					this.device_model = 15;
-				} else {
+				} else if(name === 'zhiCbd'){
+					this.device_model = 16;
+				}else {
 					this.device_model = item.device_model || '';
 				}
 				this.page = 1;
@@ -661,8 +663,10 @@
 		},
 		onLoad() {
 			const that = this;
-			uni.$on('purId', (purId) => {
-				that.pur_id = purId;
+			uni.$on('purId', (item) => {
+				that.pur_id = item.purId;
+				that.menu = item.menu;
+				that.device_model = item.device_model;
 			});
 			uni.$on('refreshData', (refreshData) => {
 				this.eqlist();

+ 1 - 1
pages/server/index.vue

@@ -141,7 +141,7 @@ export default {
 					url: '/pages/equipList2/index',
           success: () => {
             setTimeout(() => {
-              uni.$emit('purId',purId);
+              uni.$emit('purId',{purId,menu:item.children[0]?.menu || '',device_model:item.children[0]?.device_model || ''});
             }, 50);
           }
 				})