diff --git a/src/views/rule-engine/Scene/Save/action/Device/device/index.vue b/src/views/rule-engine/Scene/Save/action/Device/device/index.vue index 79ac407e..b5a1f4c1 100644 --- a/src/views/rule-engine/Scene/Save/action/Device/device/index.vue +++ b/src/views/rule-engine/Scene/Save/action/Device/device/index.vue @@ -43,14 +43,14 @@ { modelRef.deviceId = val; modelRef.source = 'upper'; modelRef.upperKey = val; - modelRef.selectorValues = [{ value: val, name: node.description }] as any; + modelRef.selectorValues = undefined // [{ value: val, name: node.description }] as any; emits('save', unref(modelRef), { name: node.description }); }; @@ -366,7 +366,7 @@ const onFormSave = () => { }); } } else { - resolve(_data); + resolve({..._data}); } }) .catch((err: any) => { diff --git a/src/views/rule-engine/Scene/Save/action/Device/index.vue b/src/views/rule-engine/Scene/Save/action/Device/index.vue index a015bbbe..fa28b4f8 100644 --- a/src/views/rule-engine/Scene/Save/action/Device/index.vue +++ b/src/views/rule-engine/Scene/Save/action/Device/index.vue @@ -136,11 +136,9 @@ const onSave = (_data: any) => { source: DeviceModel.source, selectorValues: DeviceModel.selectorValues, productId: DeviceModel.productId, + upperKey: DeviceModel.upperKey, message: _data.message, }; - if (DeviceModel.selector === 'variable') { - item.selector = 'fixed'; - } if (DeviceModel.selector === 'relation') { item.upperKey = 'scene.deviceId'; } @@ -167,6 +165,7 @@ const onSave = (_data: any) => { ? JSON.stringify(_options?.propertiesValue) : _options?.propertiesValue) } + console.log(item) emit('save', item, JSON.parse(JSON.stringify(_options))); }; @@ -181,7 +180,6 @@ const onProductChange = (_val: any, bol: boolean) => { JSON.parse(_val.metadata || '{}'), DeviceModel?.message, ); - console.log(flag) if (!flag) { DeviceModel.message = { messageType: 'INVOKE_FUNCTION', diff --git a/src/views/rule-engine/Scene/Save/action/ListItem/Item.vue b/src/views/rule-engine/Scene/Save/action/ListItem/Item.vue index 3db797eb..0c832ba9 100644 --- a/src/views/rule-engine/Scene/Save/action/ListItem/Item.vue +++ b/src/views/rule-engine/Scene/Save/action/ListItem/Item.vue @@ -242,7 +242,7 @@ v-else-if="data?.executor === 'device'" @click="onType('device')" > -