diff --git a/src/store/instance.ts b/src/store/instance.ts
index 92e06b47..63c49e0a 100644
--- a/src/store/instance.ts
+++ b/src/store/instance.ts
@@ -16,14 +16,10 @@ export const useInstanceStore = defineStore({
this.detail = current
},
async refresh(id: string) {
- const resp: any = await detail(id).catch((err) => {
- onlyMessage(err.response.data.message, 'error')
- })
+ const resp: any = await detail(id)
if(resp.status === 200){
this.current = resp.result
this.detail = resp.result
- } else {
- onlyMessage(resp?.message, 'error')
}
},
setTabActiveKey(key: string) {
diff --git a/src/utils/request.ts b/src/utils/request.ts
index 2b8d2cb7..2760425b 100644
--- a/src/utils/request.ts
+++ b/src/utils/request.ts
@@ -151,6 +151,8 @@ const errorHandler = (error: any) => {
path: LoginPath
})
}, 0)
+ } else if (status === 404) {
+ showNotification(error?.code, error?.response?.data?.message, '404')
}
} else if (error.response === undefined) {
showNotification(error.message, (error.stack + '').substr(0, 90), undefined)
diff --git a/src/views/edge/Device/index.vue b/src/views/edge/Device/index.vue
index 8aae7440..6545579f 100644
--- a/src/views/edge/Device/index.vue
+++ b/src/views/edge/Device/index.vue
@@ -53,7 +53,8 @@
@@ -85,8 +86,42 @@
+
+
+
+ {{ item.text }}
+
+
+
+
+
+
+ {{ o?.text }}
+
+
+
+
+
{
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')"
>
-
+
@@ -101,11 +109,11 @@ const confirm = () => {
};
const changeSelect = (item: any, state: boolean) => {
const arr = new Set(selectedRowKeys.value);
- console.log(item,state);
- if(state){
- arr.add(item.id)
- }else{
- arr.delete(item.id)
+ console.log(item, state);
+ if (state) {
+ arr.add(item.id);
+ } else {
+ arr.delete(item.id);
}
selectedRowKeys.value = [...arr.values()];
};
diff --git a/yarn.lock b/yarn.lock
index 45871ca3..5dcb1134 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -3700,8 +3700,8 @@ jetlinks-store@^0.0.3:
jetlinks-ui-components@^1.0.5:
version "1.0.5"
- resolved "http://47.108.170.157:9013/jetlinks-ui-components/-/jetlinks-ui-components-1.0.5.tgz#1cd2b4b99afdda515bffd05f7fc9dd61a3cff16d"
- integrity sha512-cIB/6wOiU+GHDKI3dUnGLa27VrHXuEOoOsqKI30GcKRHbdamBfApchOcvAON+SHpv19n5i3inKw8pNXaHOeKZw==
+ resolved "http://47.108.170.157:9013/jetlinks-ui-components/-/jetlinks-ui-components-1.0.5.tgz#c71ecae61776bff738f43efe46aac7264f092736"
+ integrity sha512-+1a/4nA5RCiInRFyyaVCMEWSBzNU8lzxOYTTpY0GiNhuJuhGE5AbBsVp9CXXF0lFECK2iqaAElY+QN4Wjms1Dw==
dependencies:
"@vueuse/core" "^9.12.0"
ant-design-vue "^3.2.15"