From 23d41237edb507e60c0ecb12e656949267619631 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E7=A3=8A?= <45566618@qq.com> Date: Wed, 30 Jul 2025 17:36:48 +0800 Subject: [PATCH] =?UTF-8?q?=E8=AE=BE=E5=A4=87=E7=BB=B4=E5=BA=A6-=E6=B0=B4?= =?UTF-8?q?=E8=A1=A8=E8=AE=BE=E5=A4=87=E5=90=8C=E6=AD=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iotsync/components/OrgApplyInfo.api.ts | 12 + src/views/iotsync/components/OrgSelect.vue | 417 +++++++++++++ .../tq/water/components/BusinessTable.vue | 210 +++++++ .../tq/water/components/SelectNuList.vue | 126 ++++ .../tq/water/components/SelectNuModal.vue | 70 +++ .../tq/water/components/SelectedTable.vue | 143 +++++ .../tq/water/components/SourceTable.vue | 204 +++++++ .../tq/water/components/SyncLogList.vue | 125 ++++ src/views/iotsync/tq/water/index.vue | 549 ++++++++++++++++++ src/views/iotsync/tq/water/water.api.ts | 49 ++ src/views/iotsync/tq/water/water.data.ts | 261 +++++++++ 11 files changed, 2166 insertions(+) create mode 100644 src/views/iotsync/components/OrgApplyInfo.api.ts create mode 100644 src/views/iotsync/components/OrgSelect.vue create mode 100644 src/views/iotsync/tq/water/components/BusinessTable.vue create mode 100644 src/views/iotsync/tq/water/components/SelectNuList.vue create mode 100644 src/views/iotsync/tq/water/components/SelectNuModal.vue create mode 100644 src/views/iotsync/tq/water/components/SelectedTable.vue create mode 100644 src/views/iotsync/tq/water/components/SourceTable.vue create mode 100644 src/views/iotsync/tq/water/components/SyncLogList.vue create mode 100644 src/views/iotsync/tq/water/index.vue create mode 100644 src/views/iotsync/tq/water/water.api.ts create mode 100644 src/views/iotsync/tq/water/water.data.ts diff --git a/src/views/iotsync/components/OrgApplyInfo.api.ts b/src/views/iotsync/components/OrgApplyInfo.api.ts new file mode 100644 index 0000000..d1ab3b1 --- /dev/null +++ b/src/views/iotsync/components/OrgApplyInfo.api.ts @@ -0,0 +1,12 @@ +import { defHttp } from '/@/utils/http/axios'; + +enum Api { + getOrgInfo = '/admin/orgapplyinfo/orgApplyInfo/getOrgInfo', +} + +/** + * 获取机构详细信息(包含sys_depart信息) + * @param params orgCode部门编码 不传查所有 + * @returns + */ +export const getOrgInfo = (params) => defHttp.get({ url: Api.getOrgInfo, params }); diff --git a/src/views/iotsync/components/OrgSelect.vue b/src/views/iotsync/components/OrgSelect.vue new file mode 100644 index 0000000..717b974 --- /dev/null +++ b/src/views/iotsync/components/OrgSelect.vue @@ -0,0 +1,417 @@ + + + + + + + 机构信息: + 请先选择机构 + {{ orgData?.departName }} + + + 重新选择 + + + + + + 机构编码: + {{ orgData?.orgCode || '-' }} + + + 加盟时间: + {{ orgData?.franchiseTime?.substring(0, 10) || '-' }} + + + 负责人: + {{ orgData?.orgLeader || '-' }} + + + + + 电话: + {{ orgData?.orgLeaderPhone || '-' }} + + + 地址: + {{ orgData?.comRegisterAddress || '-' }} + + + + + + + + + + + + + + + + + + + {{ item.departName }} + + 已选择 + + + + {{ item.orgCode }} + + + + 加盟时间:{{ item.franchiseTime?.substring(0, 10) }} + 机构负责人:{{ item.orgLeader }} + 负责人电话:{{ item.orgLeaderPhone }} + + 机构地址:{{ item.comRegisterAddress }} + + + + + + + + + + + 共 {{ orgTableList.total }} 条数据 + + + + + + + + + diff --git a/src/views/iotsync/tq/water/components/BusinessTable.vue b/src/views/iotsync/tq/water/components/BusinessTable.vue new file mode 100644 index 0000000..ff5f312 --- /dev/null +++ b/src/views/iotsync/tq/water/components/BusinessTable.vue @@ -0,0 +1,210 @@ + + + + + + + + + + + + + + diff --git a/src/views/iotsync/tq/water/components/SelectNuList.vue b/src/views/iotsync/tq/water/components/SelectNuList.vue new file mode 100644 index 0000000..005384b --- /dev/null +++ b/src/views/iotsync/tq/water/components/SelectNuList.vue @@ -0,0 +1,126 @@ + + + + + + + + + + + + + + diff --git a/src/views/iotsync/tq/water/components/SelectNuModal.vue b/src/views/iotsync/tq/water/components/SelectNuModal.vue new file mode 100644 index 0000000..ceea225 --- /dev/null +++ b/src/views/iotsync/tq/water/components/SelectNuModal.vue @@ -0,0 +1,70 @@ + + + + + + + + + + diff --git a/src/views/iotsync/tq/water/components/SelectedTable.vue b/src/views/iotsync/tq/water/components/SelectedTable.vue new file mode 100644 index 0000000..9c3e3fa --- /dev/null +++ b/src/views/iotsync/tq/water/components/SelectedTable.vue @@ -0,0 +1,143 @@ + + + + + + + + + + + + + + diff --git a/src/views/iotsync/tq/water/components/SourceTable.vue b/src/views/iotsync/tq/water/components/SourceTable.vue new file mode 100644 index 0000000..0c87a7a --- /dev/null +++ b/src/views/iotsync/tq/water/components/SourceTable.vue @@ -0,0 +1,204 @@ + + + + + + + + + + + + + + diff --git a/src/views/iotsync/tq/water/components/SyncLogList.vue b/src/views/iotsync/tq/water/components/SyncLogList.vue new file mode 100644 index 0000000..5233d18 --- /dev/null +++ b/src/views/iotsync/tq/water/components/SyncLogList.vue @@ -0,0 +1,125 @@ + + + + + + + + + + + + + + + + + + + + diff --git a/src/views/iotsync/tq/water/index.vue b/src/views/iotsync/tq/water/index.vue new file mode 100644 index 0000000..59e6282 --- /dev/null +++ b/src/views/iotsync/tq/water/index.vue @@ -0,0 +1,549 @@ + + + + + + + + + + + 来源 + + 源数据 + 已同步 + + + + + + SN + + + + + + 机构 + + {{item.departName}} + + + + + + 区域 + + {{item.nuName}} + + + + + + 查询 + 重置 + + + + + + + + + + + + + + + 源数据 + + 未选择 + 已选择 + + + {{sourceButtonText}} + + + + + + + 待同步 + {{ ' ' + Array.from(allSelectedItems.values()).length + ' ' }}条 + + + 待同步 + 已同步 + + + 重新选择 + 移除 + + + + + + + + + + + + + + + 刷新 + + + 同步 + + + 还原 + + + 源数据 + 分屏1 + 分屏2 + 分屏3 + 已选择 + + + + {{ toggleSearchStatus ? '收缩' : '展开' }} + + + + + + + + + + + + + diff --git a/src/views/iotsync/tq/water/water.api.ts b/src/views/iotsync/tq/water/water.api.ts new file mode 100644 index 0000000..259cdc1 --- /dev/null +++ b/src/views/iotsync/tq/water/water.api.ts @@ -0,0 +1,49 @@ +import { defHttp } from '/@/utils/http/axios'; + +enum Api { + sourceList = '/iot/tq/waterMeter/sourceList', + departList = '/iot/tq/waterMeter/departList', + nuList = '/iot/tq/waterMeter/nuList', + businessList = '/iot/tq/waterMeter/businessList', + nuSyncList = '/admin/nuBaseInfo/nuBaseInfo/list', + syncDevices = '/iot/tq/waterMeter/syncDevices', + syncLogList = '/iot/tq/waterMeter/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/tq/water/water.data.ts b/src/views/iotsync/tq/water/water.data.ts new file mode 100644 index 0000000..58c1613 --- /dev/null +++ b/src/views/iotsync/tq/water/water.data.ts @@ -0,0 +1,261 @@ +import {BasicColumn, FormSchema} from '/@/components/Table'; + +export const businessColumns: BasicColumn[] = [ + { + title: 'SN', + align: 'center', + dataIndex: 'address', + 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: 'address', + width: 140, + }, + // { + // title: '设备状态', + // align: "center", + // dataIndex: 'relayState', + // customRender:({record})=>{ + // return record.relayState?(record.relayState=='1'?'合闸':'拉闸'):''; + // }, + // width: 80, + // }, + // { + // title: '在线状态', + // align: "center", + // dataIndex: 'online', + // customRender:({record})=>{ + // return record.online?(record.online=='true'?'在线':'离线'):''; + // }, + // width: 80, + // }, + // { + // title: '用水量m³', + // align: "center", + // dataIndex: 'waterValue', + // width: 80, + // }, +]; + +//列表数据 +export const selectedSourceColumns: BasicColumn[] = [ + { + title: 'SN', + align: 'center', + dataIndex: 'address', + 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, + }, + // { + // title: '设备状态', + // align: "center", + // dataIndex: 'relayState', + // customRender:({record})=>{ + // return record.relayState?(record.relayState=='1'?'合闸':'拉闸'):''; + // }, + // width: 80, + // }, + // { + // title: '在线状态', + // align: "center", + // dataIndex: 'online', + // customRender:({record})=>{ + // return record.online?(record.online=='true'?'在线':'离线'):''; + // }, + // width: 80, + // }, + // { + // title: '用水量m³', + // align: "center", + // dataIndex: 'waterValue', + // width: 80, + // }, +]; + +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, + } +]; + +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: 'address', + 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: '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 }, + }, +];
加盟时间:{{ item.franchiseTime?.substring(0, 10) }}
机构负责人:{{ item.orgLeader }}
负责人电话:{{ item.orgLeaderPhone }}
+ 机构地址:{{ item.comRegisterAddress }}