From 1e37450614248291b51bfaaec7eedcdf2a4803b1 Mon Sep 17 00:00:00 2001 From: XieYongHong <18010623010@163.com> Date: Fri, 21 Apr 2023 14:41:06 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E7=99=BB=E5=BD=95?= =?UTF-8?q?=E6=88=90=E5=8A=9F=E4=B9=8B=E5=90=8E=E5=9C=A8=E6=9F=90=E4=BA=9B?= =?UTF-8?q?=E6=83=85=E5=86=B5=E4=B8=8B=E6=97=A0=E6=B3=95=E8=BF=9B=E5=85=A5?= =?UTF-8?q?=E5=88=9D=E5=A7=8B=E5=8C=96=E9=A1=B5=E9=9D=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- README.md | 2 +- src/api/link/accessConfig.ts | 4 ++ src/api/link/plugin.ts | 8 +++- src/global.d.ts | 3 +- .../Detail/components/VariableDefinitions.vue | 2 +- src/views/notice/Template/Detail/index.vue | 4 ++ src/views/system/Department/user/index.vue | 2 +- src/views/user/Login/index.vue | 45 ++++++++++++------- 8 files changed, 47 insertions(+), 23 deletions(-) diff --git a/README.md b/README.md index 7d5dc0b2..f45922b6 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -

JetLinks-ui-vue v1.0.0

+

JetLinks-ui-vue

## 平台简介 diff --git a/src/api/link/accessConfig.ts b/src/api/link/accessConfig.ts index 86d03762..929a2d45 100644 --- a/src/api/link/accessConfig.ts +++ b/src/api/link/accessConfig.ts @@ -47,3 +47,7 @@ export const getClusters = () => export const getPluginList = (data: any) => server.post('/plugin/driver/_query/no-paging', data) export const getPluginConfig = (id: string) => server.get(`/plugin/driver/${id}/description`) + +export const getCommandsByAccess = (id: string) => server.get(`/gateway/device/${id}/commands`) + +export const getCommandsDevicesByAccessId = (id: string, data: any) => server.post(`/gateway/device/${id}/command/QueryDevicePage`, data) diff --git a/src/api/link/plugin.ts b/src/api/link/plugin.ts index 7cf5b335..b7fcce6d 100644 --- a/src/api/link/plugin.ts +++ b/src/api/link/plugin.ts @@ -7,6 +7,8 @@ export const uploadFile = `${BASE_API_PATH}/plugin/driver/upload` export const add = (data: any) => post('/plugin/driver', data) +export const update = (data: any) => patch('/plugin/driver', data) + export const removeFn = (id: string) => remove(`/plugin/driver/${id}`) export const detail = (id: string) => get(`/plugin/driver/${id}`) @@ -19,7 +21,7 @@ export const detail = (id: string) => get(`/plugin/driver/${id}`) */ export const getProductsById = (id: string) => get(`/plugin/driver/${id}/products`) -export const savePluginData = (type: string, pluginId: string, internalId: string, externalId: string ) => patch(`/plugin/mapping/${type}/${pluginId}/${internalId}`, externalId) +export const savePluginData = (type: string, pluginId: string, internalId: string, externalId: string ) => patch(`/plugin/mapping/${type}/${pluginId}/${internalId}`, externalId, { headers: {'Content-Type': "text/plain"}}) export const getPluginData = (type: string, pluginId: string, internalId: string ) => get(`/plugin/mapping/${type}/${pluginId}/${internalId}`) @@ -27,4 +29,6 @@ export const getPublic = (id: string, path: string) => get(`/plugin/driver/${id} export const getTypes = () => get(`/dictionary/internal-plugin-type/items`) -export const vailIdFn = (id: string ) => get(`/plugin/driver/id/_validate`, { id }) \ No newline at end of file +export const vailIdFn = (id: string ) => get(`/plugin/driver/id/_validate`, { id }) + +export const getProductByPluginId = (id: string) => get(`/plugin/driver/${id}/products`) \ No newline at end of file diff --git a/src/global.d.ts b/src/global.d.ts index 4c51f4b0..ee0117ad 100644 --- a/src/global.d.ts +++ b/src/global.d.ts @@ -12,4 +12,5 @@ declare module '*.js'; declare module '*.ts'; declare module 'js-cookie'; declare module 'jetlinks-ui-components'; -declare module 'vue3-json-viewer'; \ No newline at end of file +declare module 'vue3-json-viewer'; +declare module 'event-source-polyfill'; \ No newline at end of file diff --git a/src/views/notice/Template/Detail/components/VariableDefinitions.vue b/src/views/notice/Template/Detail/components/VariableDefinitions.vue index 82510ebc..d557ce3b 100644 --- a/src/views/notice/Template/Detail/components/VariableDefinitions.vue +++ b/src/views/notice/Template/Detail/components/VariableDefinitions.vue @@ -143,7 +143,7 @@ const handleTypeChange = (record: IVariable) => { record.format = 'timestamp'; break; case 'double': - record.format = '%.xf'; + record.format = '%.2f'; break; } }; diff --git a/src/views/notice/Template/Detail/index.vue b/src/views/notice/Template/Detail/index.vue index babc0e11..b958019a 100644 --- a/src/views/notice/Template/Detail/index.vue +++ b/src/views/notice/Template/Detail/index.vue @@ -1219,6 +1219,10 @@ const handleSubmit = () => { delete formData.value.template.ttsmessage; } + if (formData.value.provider === 'dingTalkRobotWebHook' && formData.value.template?.messageType === 'text') { + formData.value.template.text!.content = formData.value.template.message as string + } + formRef.value?.validate() .then(async () => { btnLoading.value = true; diff --git a/src/views/system/Department/user/index.vue b/src/views/system/Department/user/index.vue index 17867849..4043d02c 100644 --- a/src/views/system/Department/user/index.vue +++ b/src/views/system/Department/user/index.vue @@ -89,7 +89,7 @@