diff --git a/src/api/account/center.ts b/src/api/account/center.ts index 2a6eacc7..8faebadd 100644 --- a/src/api/account/center.ts +++ b/src/api/account/center.ts @@ -1,4 +1,5 @@ import server from '@/utils/request' +import { BASE_API_PATH } from '@/utils/variable' export const getSsoBinds_api = (): any =>server.get(`/application/sso/me/bindings`) diff --git a/src/utils/request.ts b/src/utils/request.ts index b2c72b21..2174df10 100644 --- a/src/utils/request.ts +++ b/src/utils/request.ts @@ -203,7 +203,7 @@ request.interceptors.response.use(response => { }, errorHandler) export default { - request: axios, + request, post, get, patch, 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 b5a1f4c1..1a04129c 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 @@ -258,6 +258,10 @@ const onSelectorChange = (val: string) => { modelRef.selector = val; }; +/** + * 切换设备 + * @param _detail + */ const onDeviceChange = (_detail: any) => { if (_detail) { if (_detail.id) { @@ -269,10 +273,16 @@ const onDeviceChange = (_detail: any) => { modelRef.deviceId = ''; modelRef.selectorValues = [] as any; } + modelRef.upperKey = '' emits('save', unref(modelRef), { name: _detail.name }); } }; +/** + * 变量选择 + * @param val + * @param options + */ const onRelationChange = (val: any, options: any) => { modelRef.deviceId = 'deviceId'; modelRef.source = 'upper'; @@ -281,6 +291,11 @@ const onRelationChange = (val: any, options: any) => { emits('save', unref(modelRef), { relationName: options.label }); }; +/** + * + * @param val + * @param arr + */ const onTagChange = (val: any[], arr: any[]) => { if (val) { modelRef.deviceId = 'deviceId'; diff --git a/src/views/system/Apply/index.vue b/src/views/system/Apply/index.vue index cba40b5d..62fa0745 100644 --- a/src/views/system/Apply/index.vue +++ b/src/views/system/Apply/index.vue @@ -49,7 +49,7 @@ >