From 839a34928b103f5101b075fa4a4e598298e5d158 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E7=A3=8A?= <45566618@qq.com> Date: Wed, 6 Aug 2025 11:29:01 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B8=A9=E6=B9=BF=E5=BA=A6=E5=90=8C=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/iotsync/tplink/camera/index.vue | 1 + src/views/iotsync/tq/electricity/index.vue | 1 + src/views/iotsync/tq/water/index.vue | 1 + .../yiweilian/components/BusinessTable.vue | 214 ++++++ .../yiweilian/components/SelectNuList.vue | 123 ++++ .../yiweilian/components/SelectNuModal.vue | 70 ++ .../yiweilian/components/SelectedTable.vue | 147 +++++ .../yiweilian/components/SourceTable.vue | 209 ++++++ .../yiweilian/components/SyncLogList.vue | 125 ++++ src/views/iotsync/yiweilian/humid.api.ts | 49 ++ src/views/iotsync/yiweilian/humid.data.ts | 255 ++++++++ src/views/iotsync/yiweilian/index.vue | 611 ++++++++++++++++-- 12 files changed, 1740 insertions(+), 66 deletions(-) create mode 100644 src/views/iotsync/yiweilian/components/BusinessTable.vue create mode 100644 src/views/iotsync/yiweilian/components/SelectNuList.vue create mode 100644 src/views/iotsync/yiweilian/components/SelectNuModal.vue create mode 100644 src/views/iotsync/yiweilian/components/SelectedTable.vue create mode 100644 src/views/iotsync/yiweilian/components/SourceTable.vue create mode 100644 src/views/iotsync/yiweilian/components/SyncLogList.vue create mode 100644 src/views/iotsync/yiweilian/humid.api.ts create mode 100644 src/views/iotsync/yiweilian/humid.data.ts diff --git a/src/views/iotsync/tplink/camera/index.vue b/src/views/iotsync/tplink/camera/index.vue index 320d532..8d1ba70 100644 --- a/src/views/iotsync/tplink/camera/index.vue +++ b/src/views/iotsync/tplink/camera/index.vue @@ -195,6 +195,7 @@ const selectedItems = ref([]);//已选择数据 */ const orgChanged = async (org) => { orgData.value = org; + dataType.value = 'source'; viewType.value = 'unselected'; businessView.value = 'unselected'; tabActiveKey.value = 'dataAsync'; diff --git a/src/views/iotsync/tq/electricity/index.vue b/src/views/iotsync/tq/electricity/index.vue index 7fd6d54..cc9bf7b 100644 --- a/src/views/iotsync/tq/electricity/index.vue +++ b/src/views/iotsync/tq/electricity/index.vue @@ -195,6 +195,7 @@ const selectedItems = ref([]);//已选择数据 */ const orgChanged = async (org) => { orgData.value = org; + dataType.value = 'source'; viewType.value = 'unselected'; businessView.value = 'unselected'; tabActiveKey.value = 'dataAsync'; diff --git a/src/views/iotsync/tq/water/index.vue b/src/views/iotsync/tq/water/index.vue index bbcc52e..0ecf3c9 100644 --- a/src/views/iotsync/tq/water/index.vue +++ b/src/views/iotsync/tq/water/index.vue @@ -195,6 +195,7 @@ const selectedItems = ref([]);//已选择数据 */ const orgChanged = async (org) => { orgData.value = org; + dataType.value = 'source'; viewType.value = 'unselected'; businessView.value = 'unselected'; tabActiveKey.value = 'dataAsync'; diff --git a/src/views/iotsync/yiweilian/components/BusinessTable.vue b/src/views/iotsync/yiweilian/components/BusinessTable.vue new file mode 100644 index 0000000..fb15a29 --- /dev/null +++ b/src/views/iotsync/yiweilian/components/BusinessTable.vue @@ -0,0 +1,214 @@ + + + + + diff --git a/src/views/iotsync/yiweilian/components/SelectNuList.vue b/src/views/iotsync/yiweilian/components/SelectNuList.vue new file mode 100644 index 0000000..67bb600 --- /dev/null +++ b/src/views/iotsync/yiweilian/components/SelectNuList.vue @@ -0,0 +1,123 @@ + + + + + diff --git a/src/views/iotsync/yiweilian/components/SelectNuModal.vue b/src/views/iotsync/yiweilian/components/SelectNuModal.vue new file mode 100644 index 0000000..ceea225 --- /dev/null +++ b/src/views/iotsync/yiweilian/components/SelectNuModal.vue @@ -0,0 +1,70 @@ + + + + + + diff --git a/src/views/iotsync/yiweilian/components/SelectedTable.vue b/src/views/iotsync/yiweilian/components/SelectedTable.vue new file mode 100644 index 0000000..eb96e3c --- /dev/null +++ b/src/views/iotsync/yiweilian/components/SelectedTable.vue @@ -0,0 +1,147 @@ + + + + + diff --git a/src/views/iotsync/yiweilian/components/SourceTable.vue b/src/views/iotsync/yiweilian/components/SourceTable.vue new file mode 100644 index 0000000..c0c8f83 --- /dev/null +++ b/src/views/iotsync/yiweilian/components/SourceTable.vue @@ -0,0 +1,209 @@ + + + + + diff --git a/src/views/iotsync/yiweilian/components/SyncLogList.vue b/src/views/iotsync/yiweilian/components/SyncLogList.vue new file mode 100644 index 0000000..33a238f --- /dev/null +++ b/src/views/iotsync/yiweilian/components/SyncLogList.vue @@ -0,0 +1,125 @@ + + + + + diff --git a/src/views/iotsync/yiweilian/humid.api.ts b/src/views/iotsync/yiweilian/humid.api.ts new file mode 100644 index 0000000..5ad166a --- /dev/null +++ b/src/views/iotsync/yiweilian/humid.api.ts @@ -0,0 +1,49 @@ +import { defHttp } from '/@/utils/http/axios'; + +enum Api { + sourceList = '/iot/yiweilian/humidDevice/sourceList', + departList = '/iot/yiweilian/humidDevice/departList', + nuList = '/iot/yiweilian/humidDevice/nuList', + businessList = '/iot/yiweilian/humidDevice/businessList', + nuSyncList = '/iot/yiweilian/humidDevice/nuSyncList', + syncDevices = '/iot/yiweilian/humidDevice/syncDevices', + syncLogList = '/iot/yiweilian/humidDevice/syncLogList', +} + +/** + * 列表接口 + * @param params + */ +export const sourceListApi = (params) => defHttp.get({ url: Api.sourceList, params }); +/** + * 列表接口 + * @param params + */ +export const departListApi = (params) => defHttp.get({ url: Api.departList, params }); +/** + * 列表接口 + * @param params + */ +export const nuListApi = (params) => defHttp.get({ url: Api.nuList, params }); +/** + * 列表接口 + * @param params + */ +export const businessListApi = (params) => defHttp.get({ url: Api.businessList, params }); +/** + * 列表接口 + * @param params + */ +export const nuSyncListApi = (params) => defHttp.get({ url: Api.nuSyncList, params }); +/** + * 同步设备 + * @param params + */ +export const syncDevicesApi = (params) => { + return defHttp.post({ url: Api.syncDevices, params }); +} +/** + * 列表接口 + * @param params + */ +export const syncLogListApi = (params) => defHttp.get({ url: Api.syncLogList, params }); diff --git a/src/views/iotsync/yiweilian/humid.data.ts b/src/views/iotsync/yiweilian/humid.data.ts new file mode 100644 index 0000000..02f8d39 --- /dev/null +++ b/src/views/iotsync/yiweilian/humid.data.ts @@ -0,0 +1,255 @@ +import {BasicColumn, FormSchema} from '/@/components/Table'; + +export const businessColumns: BasicColumn[] = [ + { + title: 'SN', + align: 'center', + dataIndex: 'sn', + width: 140, + }, + { + title: '名称', + align: 'center', + dataIndex: 'deviceName', + width: 140, + }, + { + title: '区域编码', + align: "center", + dataIndex: 'nuId', + resizable: true, + }, + { + title: '区域名称', + align: "center", + dataIndex: 'nuName', + resizable: true, + }, + { + title: '区域标签', + align: "center", + dataIndex: 'areaFlag_dictText', + resizable: true, + } +]; + +//列表数据 +export const unselectedSourceColumns: BasicColumn[] = [ + { + title: 'SN', + align: 'center', + dataIndex: 'sn', + width: 140, + }, + { + title: '名称', + align: 'center', + dataIndex: 'deviceName', + width: 140, + }, +]; + +//列表数据 +export const selectedSourceColumns: BasicColumn[] = [ + { + title: 'SN', + align: 'center', + dataIndex: 'sn', + width: 140, + }, + { + title: '名称', + align: 'center', + dataIndex: 'deviceName', + width: 140, + }, + { + title: '机构', + align: "center", + dataIndex: 'departName', + resizable: true, + }, + { + title: '区域编码', + align: "center", + dataIndex: 'nuId', + resizable: true, + }, + { + title: '区域名称', + align: "center", + dataIndex: 'nuName', + resizable: true, + }, + { + title: '区域标签', + align: "center", + dataIndex: 'areaFlag_dictText', + resizable: true, + }, +]; + +export const nusColumns: BasicColumn[] = [ + { + title: '区域编码', + align: "center", + dataIndex: 'nuId', + resizable: true, + }, + { + title: '区域名称', + align: "center", + dataIndex: 'nuName', + resizable: true, + }, + { + title: '区域标签', + align: "center", + dataIndex: 'areaFlag_dictText', + resizable: true, + }, + { + title: '绑定设备数量', + align: "center", + dataIndex: 'deviceNum' + } +]; + +export const nuFormSchema: FormSchema[] = [ + { + label: '区域标签', + field: 'areaFlag', + component: 'JDictSelectTag', + componentProps: { + dictCode: 'nu_type', + }, + colProps: { span: 6 }, + }, +]; + + +export const selectedColumns: BasicColumn[] = [ + { + title: 'SN', + align: 'center', + dataIndex: 'sn', + width: 140, + }, + { + title: '名称', + align: 'center', + dataIndex: 'deviceName', + width: 140, + }, + { + title: '操作区域', + align: 'center', + dataIndex: 'dataTypeText', + width: 80, + }, + { + title: '操作类型', + align: 'center', + dataIndex: 'actionType', + width: 80, + }, + { + title: '区域编码', + align: "center", + dataIndex: 'nuId', + resizable: true, + }, + { + title: '区域名称', + align: "center", + dataIndex: 'nuName', + resizable: true, + }, + { + title: '区域标签', + align: "center", + dataIndex: 'areaFlag_dictText', + resizable: true, + } +]; + +export const asyncMaincolumns: BasicColumn[] = [ + { + title: 'SN', + align: 'center', + dataIndex: 'sn', + }, + { + title: '设备名称', + align: "center", + dataIndex: 'deviceName', + }, + { + title: '设备类型', + align: "center", + dataIndex: 'serverType', + }, + { + title: '同步时间', + align: "center", + dataIndex: 'createTime', + } +]; + +export const asyncSeedColumns: BasicColumn[] = [ + { + title: '同步类型', + align: "center", + dataIndex: 'syncType', + }, + { + title: '同步状态', + align: "center", + dataIndex: 'status', + }, + { + title: '同步时间', + align: "center", + dataIndex: 'createTime', + }, + { + title: '现机构', + align: "center", + dataIndex: 'departName', + }, + { + title: '现区域', + align: "center", + dataIndex: 'nuId', + }, + { + title: '原机构', + align: "center", + dataIndex: 'oldDepartName', + }, + { + title: '原区域', + align: "center", + dataIndex: 'oldNuId', + }, +]; + +export const logFormSchema: FormSchema[] = [ + { + label: 'SN', + field: 'sn', + component: 'Input', + componentProps: { + placeholder: '请输入SN', + }, + // colProps: { span: 6 }, + }, + { + label: '名称', + field: 'deviceName', + component: 'Input', + componentProps: { + placeholder: '请输入名称', + }, + } +]; diff --git a/src/views/iotsync/yiweilian/index.vue b/src/views/iotsync/yiweilian/index.vue index 5a670d6..4c5bf20 100644 --- a/src/views/iotsync/yiweilian/index.vue +++ b/src/views/iotsync/yiweilian/index.vue @@ -1,86 +1,565 @@ - +