From 4004700a708b662b573696d75409dfd2b62cdf7a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=E6=9B=B9=E7=A3=8A?= <45566618@qq.com>
Date: Wed, 4 Mar 2026 17:41:12 +0800
Subject: [PATCH] =?UTF-8?q?=E7=94=B5=E8=A1=A8=E9=A1=B5=E9=9D=A2=E4=BC=98?=
=?UTF-8?q?=E5=8C=96?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
.../hs/electricity/components/DrawerModal.vue | 87 +++++++
.../components/ElectricityInfoForm.vue | 144 ++++++++++++
.../iot/hs/electricity/electricity.api.ts | 53 +++++
.../iot/hs/electricity/electricity.data.ts | 90 ++++++++
src/views/iot/hs/electricity/index.vue | 214 ++++++++++++++++++
src/views/iot/tq/water/water.data.ts | 6 +-
src/views/iot/yiweilian/humid/humid.data.ts | 14 +-
7 files changed, 598 insertions(+), 10 deletions(-)
create mode 100644 src/views/iot/hs/electricity/components/DrawerModal.vue
create mode 100644 src/views/iot/hs/electricity/components/ElectricityInfoForm.vue
create mode 100644 src/views/iot/hs/electricity/electricity.api.ts
create mode 100644 src/views/iot/hs/electricity/electricity.data.ts
create mode 100644 src/views/iot/hs/electricity/index.vue
diff --git a/src/views/iot/hs/electricity/components/DrawerModal.vue b/src/views/iot/hs/electricity/components/DrawerModal.vue
new file mode 100644
index 0000000..0cc7954
--- /dev/null
+++ b/src/views/iot/hs/electricity/components/DrawerModal.vue
@@ -0,0 +1,87 @@
+
+
+
+ 关闭
+ 确认
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/iot/hs/electricity/components/ElectricityInfoForm.vue b/src/views/iot/hs/electricity/components/ElectricityInfoForm.vue
new file mode 100644
index 0000000..422faf1
--- /dev/null
+++ b/src/views/iot/hs/electricity/components/ElectricityInfoForm.vue
@@ -0,0 +1,144 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/views/iot/hs/electricity/electricity.api.ts b/src/views/iot/hs/electricity/electricity.api.ts
new file mode 100644
index 0000000..2dd5125
--- /dev/null
+++ b/src/views/iot/hs/electricity/electricity.api.ts
@@ -0,0 +1,53 @@
+import { defHttp } from '/@/utils/http/axios';
+
+enum Api {
+ list = '/iot/hs/dsElectricityMeter/list',
+ save = '/iot/hs/dsElectricityMeter/add',
+ delete = '/iot/hs/dsElectricityMeter/delete',
+ eleReset = '/iot/hs/dsElectricityMeter/eleReset',
+ eleCutOff = '/iot/hs/dsElectricityMeter/eleControl',
+ eleConnected = '/iot/hs/dsElectricityMeter/eleControl',
+ eleRead = '/iot/hs/dsElectricityMeter/eleRead',
+}
+
+/**
+ * 电表列表接口
+ * @param params
+ */
+export const list = (params) => defHttp.get({ url: Api.list, params });
+
+/**
+ * 添加
+ * @param params
+ */
+export const save = (params) => defHttp.post({ url: Api.save, params });
+
+/**
+ * 删除
+ * @param id
+ */
+export const deleteMeter = (id) => defHttp.delete({ url: Api.delete, params:{ id } }, { joinParamsToUrl: true });
+
+/**
+ * 电表清零
+ * @param params
+ */
+export const eleReset = (params?) => defHttp.get({ url: Api.eleReset, params });
+
+/**
+ * 拉闸
+ * @param params
+ */
+export const eleCutOff = (params?) => defHttp.get({ url: Api.eleCutOff, params });
+
+/**
+ * 合闸
+ * @param params
+ */
+export const eleConnected = (params?) => defHttp.get({ url: Api.eleConnected, params });
+
+/**
+ * 抄电表
+ * @param params
+ */
+export const eleRead = (params?) => defHttp.get({ url: Api.eleRead, params });
diff --git a/src/views/iot/hs/electricity/electricity.data.ts b/src/views/iot/hs/electricity/electricity.data.ts
new file mode 100644
index 0000000..f862c5c
--- /dev/null
+++ b/src/views/iot/hs/electricity/electricity.data.ts
@@ -0,0 +1,90 @@
+import {BasicColumn} from '/@/components/Table';
+import {FormSchema} from '/@/components/Table';
+
+//列表数据
+export const columns: BasicColumn[] = [
+ // {
+ // title: '单元编码',
+ // align: "center",
+ // dataIndex: 'nuId'
+ // },
+ // {
+ // title: '单元名称',
+ // align: "center",
+ // dataIndex: 'nuName'
+ // },
+ {
+ title: '序号',
+ align: "center",
+ dataIndex: 'id'
+ },
+ {
+ title: '设备序号',
+ align: "center",
+ dataIndex: 'sn'
+ },
+ {
+ title: '设备维度',
+ align: "center",
+ dataIndex: 'dimension'
+ },
+ {
+ title: '设备状态',
+ align: "center",
+ dataIndex: 'relayState',
+ customRender:({record})=>{
+ return record.relayState?(record.relayState=='1'?'合闸':'拉闸'):'';
+ },
+ },
+ {
+ title: '分配状态',
+ align: "center",
+ dataIndex: 'izAllocate',
+ customRender:({record})=>{
+ if(record.izAllocate=='Y'){
+ return "已分配";
+ }else{
+ return "未分配";
+ }
+ },
+ },
+ {
+ title: '用电量KWH',
+ align: "center",
+ dataIndex: 'eleValue'
+ },
+ {
+ title: '上次抄表时间',
+ align: "center",
+ dataIndex: 'readTime'
+ },
+];
+
+export const searchFormSchema: FormSchema[] = [
+ {
+ label: '设备状态',
+ field: 'relayState',
+ component: 'JDictSelectTag',
+ componentProps: {
+ placeholder: '请选择状态',
+ options: [
+ { label: '合闸', value: '1' },
+ { label: '拉闸', value: '0' },
+ ],
+ },
+ // colProps: { span: 6 },
+ },
+ {
+ label: '分配状态',
+ field: 'izAllocate',
+ component: 'JDictSelectTag',
+ componentProps: {
+ placeholder: '请选择分配状态',
+ options: [
+ {label: '已分配', value: 'Y'},
+ {label: '未分配', value: 'N'},
+ ],
+ },
+ // colProps: { span: 6 },
+ }
+];
diff --git a/src/views/iot/hs/electricity/index.vue b/src/views/iot/hs/electricity/index.vue
new file mode 100644
index 0000000..c8fdb58
--- /dev/null
+++ b/src/views/iot/hs/electricity/index.vue
@@ -0,0 +1,214 @@
+
+
+
+
+
+
+ 添加设备
+
+
+
+
+ 合闸
+
+
+ 拉闸
+
+
+
+
+
+
+
+
+
+
+
+
+ {{tipTitle}}
+
+
+ {{tipContent}}
+
+
+ 知道了
+
+
+
+
+
+
diff --git a/src/views/iot/tq/water/water.data.ts b/src/views/iot/tq/water/water.data.ts
index 2c4be6c..331cffa 100644
--- a/src/views/iot/tq/water/water.data.ts
+++ b/src/views/iot/tq/water/water.data.ts
@@ -142,7 +142,7 @@ export const searchFormSchema: FormSchema[] = [
// colProps: { span: 6 },
// },
// {
- // label: '设备号',
+ // label: '设备序号',
// field: 'address',
// component: 'Input',
// colProps: { span: 4 },
@@ -154,8 +154,8 @@ export const searchFormSchema: FormSchema[] = [
componentProps: {
placeholder: '请选择状态',
options: [
- { label: '合闸', value: '1' },
- { label: '拉闸', value: '0' },
+ { label: '开闸', value: '1' },
+ { label: '关闸', value: '0' },
],
},
// colProps: { span: 4 },
diff --git a/src/views/iot/yiweilian/humid/humid.data.ts b/src/views/iot/yiweilian/humid/humid.data.ts
index 6c350b2..c989aa2 100644
--- a/src/views/iot/yiweilian/humid/humid.data.ts
+++ b/src/views/iot/yiweilian/humid/humid.data.ts
@@ -128,12 +128,12 @@ export const searchFormSchema: FormSchema[] = [
// },
// colProps: { span: 6 },
// },
- {
- label: '设备号',
- field: 'sn',
- component: 'Input',
- // colProps: { span: 4 },
- },
+ // {
+ // label: '设备序号',
+ // field: 'sn',
+ // component: 'Input',
+ // // colProps: { span: 4 },
+ // },
{
label: '在线状态',
field: 'status',
@@ -170,7 +170,7 @@ export const formSchema: FormSchema[] = [
ifShow: false,
},
{
- label: '设备号',
+ label: '设备序号',
field: 'sn',
component: 'Input',
dynamicDisabled: ({ values }) => {