From 611fa0ea18344330947ff83e27c477cbd94a14ea Mon Sep 17 00:00:00 2001 From: JiangQiming <291854119@qq.com> Date: Wed, 22 Feb 2023 17:22:42 +0800 Subject: [PATCH 01/13] =?UTF-8?q?update:=20=E7=B1=BB=E5=9E=8B=E6=94=B9?= =?UTF-8?q?=E5=8F=98=E9=87=8D=E7=BD=AE=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/notice/Template/Detail/index.vue | 23 ++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/src/views/notice/Template/Detail/index.vue b/src/views/notice/Template/Detail/index.vue index 09850394..33cf4936 100644 --- a/src/views/notice/Template/Detail/index.vue +++ b/src/views/notice/Template/Detail/index.vue @@ -791,6 +791,27 @@ const formData = ref({ configId: '', }); +/** + * 重置公用字段值 + */ +const resetPublicFiles = () => { + formData.value.template.message = ''; + formData.value.configId = undefined; + + if ( + formData.value.type === 'dingTalk' || + formData.value.type === 'weixin' + ) { + formData.value.template.toTag = undefined; + formData.value.template.toUser = undefined; + } + if (formData.value.type === 'weixin') + formData.value.template.toParty = undefined; + if (formData.value.type === 'email') + formData.value.template.toParty = undefined; + // formData.value.description = ''; +}; + // 根据通知方式展示对应的字段 watch( () => formData.value.type, @@ -806,6 +827,7 @@ watch( if (val !== 'email') getConfigList(); clearValid(); + resetPublicFiles(); if (val === 'sms') { getTemplateList(); @@ -820,6 +842,7 @@ watch( formData.value.template = TEMPLATE_FIELD_MAP[formData.value.type][val]; clearValid(); + resetPublicFiles(); }, ); From 5cd3065b39bde0d18ef205aa4dcdcac93cfe0c8b Mon Sep 17 00:00:00 2001 From: JiangQiming <291854119@qq.com> Date: Wed, 22 Feb 2023 17:29:12 +0800 Subject: [PATCH 02/13] =?UTF-8?q?update:=20=E6=96=B0=E5=A2=9E=E9=BB=98?= =?UTF-8?q?=E8=AE=A4=E5=80=BC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/notice/const.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/views/notice/const.ts b/src/views/notice/const.ts index 9bd71ca6..32116d21 100644 --- a/src/views/notice/const.ts +++ b/src/views/notice/const.ts @@ -184,11 +184,11 @@ export const TEMPLATE_FIELD_MAP = { }, voice: { aliyun: { - templateType: '', + templateType: 'tts', templateCode: '', ttsCode: '', message: '', - playTimes: undefined, + playTimes: 1, calledShowNumbers: '', calledNumber: '', } From ea98e6c7883fb842ff8104ec20f269c90ee46994 Mon Sep 17 00:00:00 2001 From: JiangQiming <291854119@qq.com> Date: Wed, 22 Feb 2023 17:55:08 +0800 Subject: [PATCH 03/13] =?UTF-8?q?update:=20=E7=B1=BB=E5=9E=8B=E6=94=B9?= =?UTF-8?q?=E5=8F=98=E6=B8=85=E7=A9=BA=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/notice/Template/Detail/index.vue | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/src/views/notice/Template/Detail/index.vue b/src/views/notice/Template/Detail/index.vue index 33cf4936..2ba78972 100644 --- a/src/views/notice/Template/Detail/index.vue +++ b/src/views/notice/Template/Detail/index.vue @@ -13,6 +13,7 @@ v-model:value="formData.type" placeholder="请选择通知方式" :disabled="!!formData.id" + @change="resetPublicFiles" > { configList.value = result; }; +/** + * 通知类型改变 + */ +const handleProviderChange = () => { + getConfigList(); + resetPublicFiles(); +}; + /** * link消息类型 图片链接 */ -const handleChange = (info: UploadChangeParam) => { +const handleLinkChange = (info: UploadChangeParam) => { if (info.file.status === 'done') { formData.value.template.link.picUrl = info.file.response?.result; } From 474bc29aab765ebf87ef90f2c73770019b0c8f3c Mon Sep 17 00:00:00 2001 From: 100011797 <2642441182@qq.com> Date: Wed, 22 Feb 2023 18:09:48 +0800 Subject: [PATCH 04/13] =?UTF-8?q?feat:=20=E8=AE=BE=E5=A4=87=E8=AF=A6?= =?UTF-8?q?=E6=83=85modbus=E5=92=8Copcua?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/device/instance.ts | 89 ++++-- src/components/AIcon/index.tsx | 1 + .../Detail/Diagnose/Message/Dialog/index.vue | 198 +++++++----- .../Diagnose/Message/Function/index.vue | 2 +- .../Detail/Diagnose/Message/index.vue | 160 ++++++++-- .../device/Instance/Detail/Diagnose/index.vue | 5 +- .../device/Instance/Detail/EdgeMap/index.vue | 289 ++++++++++++++++++ .../device/Instance/Detail/Modbus/index.vue | 7 + .../device/Instance/Detail/OPCUA/index.vue | 7 + .../Detail/Running/Property/PropertyCard.vue | 2 +- .../Detail/Running/Property/ValueDetail.vue | 55 ++++ .../Detail/Running/Property/ValueRender.vue | 111 ++++++- .../Detail/Running/Property/index.vue | 5 + .../device/Instance/Detail/Running/index.vue | 1 + .../components/EditTable/PatchMapping.vue | 192 ++++++++++++ .../Detail/components/EditTable/index.vue | 289 ++++++++++++++++++ .../Instance/Detail/components/MSelect.vue | 113 +++++++ src/views/device/Instance/Detail/index.vue | 245 +++++++++++---- 18 files changed, 1573 insertions(+), 198 deletions(-) create mode 100644 src/views/device/Instance/Detail/EdgeMap/index.vue create mode 100644 src/views/device/Instance/Detail/Modbus/index.vue create mode 100644 src/views/device/Instance/Detail/OPCUA/index.vue create mode 100644 src/views/device/Instance/Detail/Running/Property/ValueDetail.vue create mode 100644 src/views/device/Instance/Detail/components/EditTable/PatchMapping.vue create mode 100644 src/views/device/Instance/Detail/components/EditTable/index.vue create mode 100644 src/views/device/Instance/Detail/components/MSelect.vue diff --git a/src/api/device/instance.ts b/src/api/device/instance.ts index cac9e9c2..35907a23 100644 --- a/src/api/device/instance.ts +++ b/src/api/device/instance.ts @@ -83,22 +83,22 @@ export const batchDeleteDevice = (data: string[]) => server.put(`/device-instanc * @param type 文件类型 * @returns */ - export const deviceTemplateDownload = (productId: string, type: string) => `${BASE_API_PATH}/device-instance/${productId}/template.${type}` +export const deviceTemplateDownload = (productId: string, type: string) => `${BASE_API_PATH}/device-instance/${productId}/template.${type}` - /** - * 设备导入 - * @param productId 产品id - * @param type 文件类型 - * @returns - */ - export const deviceImport = (productId: string, fileUrl: string, autoDeploy: boolean) => `${BASE_API_PATH}/device-instance/${productId}/import?fileUrl=${fileUrl}&autoDeploy=${autoDeploy}&:X_Access_Token=${LocalStore.get(TOKEN_KEY)}` - - /** - * 设备导出 - * @param productId 产品id - * @param type 文件类型 - * @returns - */ +/** + * 设备导入 + * @param productId 产品id + * @param type 文件类型 + * @returns + */ +export const deviceImport = (productId: string, fileUrl: string, autoDeploy: boolean) => `${BASE_API_PATH}/device-instance/${productId}/import?fileUrl=${fileUrl}&autoDeploy=${autoDeploy}&:X_Access_Token=${LocalStore.get(TOKEN_KEY)}` + +/** + * 设备导出 + * @param productId 产品id + * @param type 文件类型 + * @returns + */ export const deviceExport = (productId: string, type: string) => `${BASE_API_PATH}/device-instance${!!productId ? '/' + productId : ''}/export.${type}` /** @@ -143,7 +143,7 @@ export const _disconnect = (id: string) => server.post(`/device-instance/${id}/d */ export const queryUserListNoPaging = () => server.post(`/user/_query/no-paging`, { paging: false, - sorts: [{name: 'name', order: "asc"}] + sorts: [{ name: 'name', order: "asc" }] }) /** @@ -347,4 +347,59 @@ export const settingProperties = (deviceId: string, data: any) => server.put(`/d * @param data * @returns */ - export const execute = (id: string, action: string, data: any) => server.post(`/device/invoked/${id}/function/${action}`, data) +export const execute = (id: string, action: string, data: any) => server.post(`/device/invoked/${id}/function/${action}`, data) + +/** + * 查询通道列表不分页 + * @param data + * @returns + */ +export const queryChannelNoPaging = (data: any) => server.post(`data-collect/channel/_query/no-paging`, data) + +/** + * 查询采集器列表不分页 + * @param data + * @returns + */ +export const queryCollectorNoPaging = (data: any) => server.post(`/data-collect/collector/_query/no-paging`, data) + +/** + * 查询点位列表不分页 + * @param data + * @returns + */ +export const queryPointNoPaging = (data: any) => server.post(`/data-collect/point/_query/no-paging`, data) + +/** + * 查询映射列表 + * @param thingType + * @param thingId + * @param params + * @returns + */ +export const queryMapping = (thingType: string, thingId: any, params?: any) => server.get(`/things/collector/${thingType}/${thingId}/_query`, params) + +/** + * 删除映射 + * @param thingType + * @param thingId + * @param data + * @returns + */ +export const removeMapping = (thingType: string, thingId: any, data?: any) => server.post(`/things/collector/${thingType}/${thingId}/_delete`, data) + +/** + * 映射树 + * @param data + * @returns + */ +export const treeMapping = (data?: any) => server.post(`/data-collect/channel/_all/tree`, data) + +/** + * 保存映射 + * @param thingId + * @param provider + * @param data + * @returns + */ +export const saveMapping = (thingId: any, provider: string, data?: any) => server.patch(`/things/collector/device/${thingId}/${provider}`, data) \ No newline at end of file diff --git a/src/components/AIcon/index.tsx b/src/components/AIcon/index.tsx index 4ebea3b2..b9783b5a 100644 --- a/src/components/AIcon/index.tsx +++ b/src/components/AIcon/index.tsx @@ -49,6 +49,7 @@ const iconKeys = [ 'PartitionOutlined', 'ShareAltOutlined', 'playCircleOutlined', + 'RightOutlined' ] const Icon = (props: {type: string}) => { diff --git a/src/views/device/Instance/Detail/Diagnose/Message/Dialog/index.vue b/src/views/device/Instance/Detail/Diagnose/Message/Dialog/index.vue index 1e4d60f2..1da53219 100644 --- a/src/views/device/Instance/Detail/Diagnose/Message/Dialog/index.vue +++ b/src/views/device/Instance/Detail/Diagnose/Message/Dialog/index.vue @@ -1,20 +1,47 @@