-
-
{{item.text}}
+
@@ -26,7 +32,11 @@
@@ -36,58 +46,146 @@
\ No newline at end of file
diff --git a/src/views/device/Instance/Detail/Modbus/index.vue b/src/views/device/Instance/Detail/Modbus/index.vue
new file mode 100644
index 00000000..78c4f085
--- /dev/null
+++ b/src/views/device/Instance/Detail/Modbus/index.vue
@@ -0,0 +1,7 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/device/Instance/Detail/OPCUA/index.vue b/src/views/device/Instance/Detail/OPCUA/index.vue
new file mode 100644
index 00000000..73af067d
--- /dev/null
+++ b/src/views/device/Instance/Detail/OPCUA/index.vue
@@ -0,0 +1,7 @@
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/device/Instance/Detail/Running/Property/PropertyCard.vue b/src/views/device/Instance/Detail/Running/Property/PropertyCard.vue
index 343cb6ef..220765b2 100644
--- a/src/views/device/Instance/Detail/Running/Property/PropertyCard.vue
+++ b/src/views/device/Instance/Detail/Running/Property/PropertyCard.vue
@@ -24,7 +24,7 @@
更新时间
diff --git a/src/views/device/Instance/Detail/Running/Property/ValueDetail.vue b/src/views/device/Instance/Detail/Running/Property/ValueDetail.vue
new file mode 100644
index 00000000..d6fbb976
--- /dev/null
+++ b/src/views/device/Instance/Detail/Running/Property/ValueDetail.vue
@@ -0,0 +1,55 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/device/Instance/Detail/Running/Property/ValueRender.vue b/src/views/device/Instance/Detail/Running/Property/ValueRender.vue
index 0f8cb129..dd28f2cf 100644
--- a/src/views/device/Instance/Detail/Running/Property/ValueRender.vue
+++ b/src/views/device/Instance/Detail/Running/Property/ValueRender.vue
@@ -1,11 +1,58 @@
- {{value?.value || '--'}}
+
--
+
+
+
+
![]()
+
+
+
![]()
+
+
+
+
![]()
+
+
+
+
+
![]()
+
+
+
+
+
![]()
+
+
+
+
+
![]()
+
+
+
+
+
![]()
+
+
+
+
+
+
![]()
+
+
+ {{JSON.stringify(value?.formatValue)}}
+
+
+ {{String(value?.formatValue)}}
+
+
\ No newline at end of file
diff --git a/src/views/device/Instance/Detail/components/EditTable/index.vue b/src/views/device/Instance/Detail/components/EditTable/index.vue
new file mode 100644
index 00000000..5bae38da
--- /dev/null
+++ b/src/views/device/Instance/Detail/components/EditTable/index.vue
@@ -0,0 +1,289 @@
+
+
+
+
+
+ 批量映射
+ 保存
+
+
+
+
+
+
+ 采集器
+
+
+
+
+
+
+
+
+
+ {{ item.label }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/device/Instance/Detail/components/MSelect.vue b/src/views/device/Instance/Detail/components/MSelect.vue
new file mode 100644
index 00000000..622d5a2f
--- /dev/null
+++ b/src/views/device/Instance/Detail/components/MSelect.vue
@@ -0,0 +1,113 @@
+
+
+ {{ item.name }}
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/views/device/Instance/Detail/index.vue b/src/views/device/Instance/Detail/index.vue
index f6a56de3..2d33e6ba 100644
--- a/src/views/device/Instance/Detail/index.vue
+++ b/src/views/device/Instance/Detail/index.vue
@@ -1,146 +1,261 @@
-
+
-
-
{{instanceStore.current.name}}
+
+
{{ instanceStore.current.name }}
-
-
+
+
启用设备
-
+
断开连接
-
-
+
+
- {{ instanceStore.current.id }}
+ {{
+ instanceStore.current.id
+ }}
- {{ instanceStore.current.productName }}
+ {{
+ instanceStore.current.productName
+ }}
-
+
-
+
\ No newline at end of file
From 906bc836cac40e62d7c0d3773ca54982dc0d2c1b Mon Sep 17 00:00:00 2001
From: jackhoo_98
Date: Wed, 22 Feb 2023 19:14:15 +0800
Subject: [PATCH 20/22] =?UTF-8?q?feat:=20=E8=BF=9C=E7=A8=8B=E5=8D=87?=
=?UTF-8?q?=E7=BA=A7=20=E5=88=97=E8=A1=A8/=E6=96=B0=E5=A2=9E/=E7=BC=96?=
=?UTF-8?q?=E8=BE=91?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/api/device/firmware.ts | 53 +++
src/components/AIcon/index.tsx | 2 +
src/views/device/Firmware/Save/FileUpload.vue | 96 +++++
src/views/device/Firmware/Save/index.vue | 388 ++++++++++++++++++
src/views/device/Firmware/index.vue | 268 ++++++++++++
src/views/device/Firmware/type.d.ts | 23 ++
src/views/link/Protocol/index.vue | 3 +-
7 files changed, 832 insertions(+), 1 deletion(-)
create mode 100644 src/api/device/firmware.ts
create mode 100644 src/views/device/Firmware/Save/FileUpload.vue
create mode 100644 src/views/device/Firmware/Save/index.vue
create mode 100644 src/views/device/Firmware/index.vue
create mode 100644 src/views/device/Firmware/type.d.ts
diff --git a/src/api/device/firmware.ts b/src/api/device/firmware.ts
new file mode 100644
index 00000000..f0108f98
--- /dev/null
+++ b/src/api/device/firmware.ts
@@ -0,0 +1,53 @@
+import server from '@/utils/request';
+import { BASE_API_PATH } from '@/utils/variable';
+
+export const FIRMWARE_UPLOAD = `${BASE_API_PATH}/file/upload`;
+
+export const save = (data: object) => server.post(`/firmware`, data);
+
+export const update = (data: object) => server.patch(`/firmware`, data);
+
+export const remove = (id: string) => server.remove(`/firmware/${id}`);
+
+export const query = (data: object) => server.post(`/firmware/_query/`, data);
+
+export const querySystemApi = (data?: object) =>
+ server.post(`/system/config/scopes`, data);
+
+export const task = (data: Record) =>
+ server.post(`/firmware/upgrade/task/detail/_query`, data);
+
+export const taskById = (id: string) =>
+ server.get(`/firmware/upgrade/task/${id}`);
+
+export const saveTask = (data: Record) =>
+ server.post(`/firmware/upgrade/task`, data);
+
+export const deleteTask = (id: string) =>
+ server.remove(`/firmware/upgrade/task/${id}`);
+
+export const history = (data: Record) =>
+ server.post(`/firmware/upgrade/history/_query`, data);
+
+export const historyCount = (data: Record) =>
+ server.post(`/firmware/upgrade/history/_count`, data);
+
+export const startTask = (id: string, data: string[]) =>
+ server.post(`/firmware/upgrade/task/${id}/_start`, data);
+
+export const stopTask = (id: string) =>
+ server.post(`/firmware/upgrade/task/${id}/_stop`);
+
+export const startOneTask = (data: string[]) =>
+ server.post(`/firmware/upgrade/task/_start`, data);
+
+// export const queryProduct = (data?: any) =>
+// server.post(`/device-product/_query/no-paging`, data);
+export const queryProduct = (data?: any) =>
+ server.post(`/device-product/detail/_query/no-paging`, data);
+
+export const queryDevice = () =>
+ server.get(`/device/instance/_query/no-paging?paging=false`);
+
+export const validateVersion = (productId: string, versionOrder: number) =>
+ server.get(`/firmware/${productId}/${versionOrder}/exists`);
diff --git a/src/components/AIcon/index.tsx b/src/components/AIcon/index.tsx
index 4ebea3b2..b5257f23 100644
--- a/src/components/AIcon/index.tsx
+++ b/src/components/AIcon/index.tsx
@@ -49,6 +49,8 @@ const iconKeys = [
'PartitionOutlined',
'ShareAltOutlined',
'playCircleOutlined',
+ 'FileTextOutlined',
+ 'UploadOutlined'
]
const Icon = (props: {type: string}) => {
diff --git a/src/views/device/Firmware/Save/FileUpload.vue b/src/views/device/Firmware/Save/FileUpload.vue
new file mode 100644
index 00000000..b7b6398b
--- /dev/null
+++ b/src/views/device/Firmware/Save/FileUpload.vue
@@ -0,0 +1,96 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/device/Firmware/Save/index.vue b/src/views/device/Firmware/Save/index.vue
new file mode 100644
index 00000000..ead74d77
--- /dev/null
+++ b/src/views/device/Firmware/Save/index.vue
@@ -0,0 +1,388 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 添加
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/device/Firmware/index.vue b/src/views/device/Firmware/index.vue
new file mode 100644
index 00000000..d8c34292
--- /dev/null
+++ b/src/views/device/Firmware/index.vue
@@ -0,0 +1,268 @@
+
+
+
+
+
+
+ 新增
+
+
+ {{ slotProps.productName }}
+
+
+ {{
+ moment(slotProps.createTime).format(
+ 'YYYY-MM-DD HH:mm:ss',
+ )
+ }}
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/device/Firmware/type.d.ts b/src/views/device/Firmware/type.d.ts
new file mode 100644
index 00000000..80a289c0
--- /dev/null
+++ b/src/views/device/Firmware/type.d.ts
@@ -0,0 +1,23 @@
+export type FormDataType = {
+ description: string;
+ name: string;
+ productId: string | undefined;
+ version: undefined;
+ versionOrder: undefined;
+ signMethod: string | undefined;
+ sign: string;
+ url: string;
+ size: number;
+ properties: Array;
+ id?: string;
+ format?: string;
+ mode?: object;
+ creatorId?: string;
+ createTime?: number;
+};
+
+export interface Properties {
+ id: string;
+ value: any;
+ keyid: number;
+}
diff --git a/src/views/link/Protocol/index.vue b/src/views/link/Protocol/index.vue
index 3ae666c1..f95d905d 100644
--- a/src/views/link/Protocol/index.vue
+++ b/src/views/link/Protocol/index.vue
@@ -153,6 +153,7 @@ import { getImage } from '@/utils/comm';
import { list, remove } from '@/api/link/protocol';
import { message } from 'ant-design-vue';
import Save from './Save/index.vue';
+import _ from 'lodash';
const tableRef = ref>({});
const router = useRouter();
@@ -261,7 +262,7 @@ const handlAdd = () => {
visible.value = true;
};
const handlEdit = (data: object) => {
- current.value = data;
+ current.value = _.cloneDeep(data);
visible.value = true;
};
From 67a2a42ae2b0dd622cf2d7d3c46c59147835d649 Mon Sep 17 00:00:00 2001
From: jackhoo_98
Date: Wed, 22 Feb 2023 19:36:53 +0800
Subject: [PATCH 21/22] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8DIcon=E7=BB=84?=
=?UTF-8?q?=E4=BB=B6iconKeys=E5=80=BC=E9=97=AE=E9=A2=98?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/AIcon/index.tsx | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/components/AIcon/index.tsx b/src/components/AIcon/index.tsx
index 4790d76a..35221782 100644
--- a/src/components/AIcon/index.tsx
+++ b/src/components/AIcon/index.tsx
@@ -49,7 +49,7 @@ const iconKeys = [
'PartitionOutlined',
'ShareAltOutlined',
'playCircleOutlined',
- 'RightOutlined'
+ 'RightOutlined',
'FileTextOutlined',
'UploadOutlined'
]
From 310cf92c577ef948f9cc379af242249311bab4d0 Mon Sep 17 00:00:00 2001
From: JiangQiming <291854119@qq.com>
Date: Wed, 22 Feb 2023 19:38:58 +0800
Subject: [PATCH 22/22] =?UTF-8?q?update:=20=E9=80=9A=E7=9F=A5=E6=A8=A1?=
=?UTF-8?q?=E6=9D=BF=E6=9C=AA=E9=80=89=E9=85=8D=E7=BD=AE=E4=B8=8D=E6=9F=A5?=
=?UTF-8?q?=E6=94=B6=E4=BF=A1=E9=83=A8=E9=97=A8=E5=92=8C=E6=94=B6=E4=BF=A1?=
=?UTF-8?q?=E4=BA=BA?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/notice/Template/Detail/components/ToOrg.vue | 1 +
src/views/notice/Template/Detail/components/ToTag.vue | 1 +
src/views/notice/Template/Detail/components/ToUser.vue | 1 +
3 files changed, 3 insertions(+)
diff --git a/src/views/notice/Template/Detail/components/ToOrg.vue b/src/views/notice/Template/Detail/components/ToOrg.vue
index fea66631..30422c50 100644
--- a/src/views/notice/Template/Detail/components/ToOrg.vue
+++ b/src/views/notice/Template/Detail/components/ToOrg.vue
@@ -30,6 +30,7 @@ const _value = computed({
const options = ref([]);
const queryData = async () => {
+ if (!props.configId) return;
const { result } = await templateApi.getDept(props.type, props.configId);
options.value = result.map((item: any) => ({
label: item.name,
diff --git a/src/views/notice/Template/Detail/components/ToTag.vue b/src/views/notice/Template/Detail/components/ToTag.vue
index 74c1f6c9..e304fc84 100644
--- a/src/views/notice/Template/Detail/components/ToTag.vue
+++ b/src/views/notice/Template/Detail/components/ToTag.vue
@@ -30,6 +30,7 @@ const _value = computed({
const options = ref([]);
const queryData = async () => {
+ if (!props.configId) return;
const { result } = await templateApi.getTags(props.configId);
options.value = result.map((item: any) => ({
label: item.name,
diff --git a/src/views/notice/Template/Detail/components/ToUser.vue b/src/views/notice/Template/Detail/components/ToUser.vue
index d5b7b41c..3edabeac 100644
--- a/src/views/notice/Template/Detail/components/ToUser.vue
+++ b/src/views/notice/Template/Detail/components/ToUser.vue
@@ -30,6 +30,7 @@ const _value = computed({
const options = ref([]);
const queryData = async () => {
+ if (!props.configId) return;
const { result } = await templateApi.getUser(props.type, props.configId);
options.value = result.map((item: any) => ({
label: item.name,