Explorar el Código

修复告警配置中修改配置之后设备信息没有复现的问题

yanglzh hace 2 años
padre
commit
8f9f3da0aa
Se han modificado 1 ficheros con 3 adiciones y 3 borrados
  1. 3 3
      src/views/iot/alarm/setting/component/edit.vue

+ 3 - 3
src/views/iot/alarm/setting/component/edit.vue

@@ -313,7 +313,7 @@ export default defineComponent({
 						});
 					});
 					state.ruleForm = res.data;
-					setType();
+					setType(true);
 				});
 			}
 			state.isShowDialog = true;
@@ -505,8 +505,8 @@ export default defineComponent({
 			});
 		};
 
-		const setType = () => {
-			state.ruleForm.deviceKey = ''
+		const setType = (notResetDeviceKey: boolean) => {
+			!notResetDeviceKey && (state.ruleForm.deviceKey = '')
 			let product_id = 0;
 			state.productData.forEach((item, index) => {
 				if (item.key == state.ruleForm.productKey) {