From 66c9448ba2abc35a678f01883fd319048908a5d0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9B=B9=E7=A3=8A?= <45566618@qq.com> Date: Thu, 12 Mar 2026 17:25:11 +0800 Subject: [PATCH] =?UTF-8?q?=E7=89=A9=E8=81=94=E6=99=BA=E8=83=BD=E7=94=B5?= =?UTF-8?q?=E8=A1=A8=E8=B0=83=E6=95=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iot/tq/electricity/electricity.data.ts | 51 +------------------ src/views/iot/tq/electricity/index.vue | 26 ++++------ 2 files changed, 13 insertions(+), 64 deletions(-) diff --git a/src/views/iot/tq/electricity/electricity.data.ts b/src/views/iot/tq/electricity/electricity.data.ts index 4e271f5..f48eff8 100644 --- a/src/views/iot/tq/electricity/electricity.data.ts +++ b/src/views/iot/tq/electricity/electricity.data.ts @@ -16,12 +16,7 @@ export const columns: BasicColumn[] = [ { title: 'SN', align: "center", - dataIndex: 'address' - }, - { - title: '采集器号', - align: "center", - dataIndex: 'cid' + dataIndex: 'sn' }, { title: '设备状态', @@ -39,24 +34,6 @@ export const columns: BasicColumn[] = [ return record.online?(record.online=='true'?'在线':'离线'):''; }, }, - { - title: '信号强度', - align: "center", - dataIndex: 'csq', - customRender:({record})=>{ - if(record.csq){ - if(record.csq < 10){ - return '低'; - }else if(record.csq > 20){ - return '高'; - }else{ - return '中'; - } - }else{ - return ''; - } - } - }, { title: '用电量KWH', align: "center", @@ -67,16 +44,6 @@ export const columns: BasicColumn[] = [ align: "center", dataIndex: 'readTime' }, - { - title: '上次上线时间', - align: "center", - dataIndex: 'connectTime' - }, - { - title: '上次掉线时间', - align: "center", - dataIndex: 'disconnectTime' - }, { title: '描述', align: "center", @@ -107,7 +74,7 @@ export const searchFormSchema: FormSchema[] = [ }, { label: 'SN', - field: 'address', + field: 'sn', component: 'Input', colProps: { span: 6 }, }, @@ -137,18 +104,4 @@ export const searchFormSchema: FormSchema[] = [ }, colProps: { span: 6 }, }, - { - label: '信号强度', - field: 'csq', - component: 'JDictSelectTag', - componentProps: { - placeholder: '请选择强度', - options: [ - { label: '高', value: '1' }, - { label: '中', value: '2' }, - { label: '低', value: '3' }, - ], - }, - colProps: { span: 6 }, - }, ]; diff --git a/src/views/iot/tq/electricity/index.vue b/src/views/iot/tq/electricity/index.vue index 53cba84..afecf17 100644 --- a/src/views/iot/tq/electricity/index.vue +++ b/src/views/iot/tq/electricity/index.vue @@ -6,9 +6,9 @@ :wrapper-col="wrapperCol"> - + - + @@ -109,7 +109,7 @@ import { reactive, ref, h, onMounted } from 'vue'; import { defHttp } from '/@/utils/http/axios'; import { Statistic } from 'ant-design-vue'; import { Modal } from "ant-design-vue"; -import { list, eleReset, eleControl, eleRead } from './electricity.api'; +import { list, eleReset, eleCutOff, eleConnected, eleRead } from './electricity.api'; import { Pagination } from 'ant-design-vue'; import { JInput } from '/@/components/Form'; import JDictSelectTag from '/@/components/Form/src/jeecg/components/JDictSelectTag.vue'; @@ -146,8 +146,7 @@ function searchReset() { // 抄电表 async function handleRead(record) { const params = { - 'cid': record.cid, - 'address': record.address, + 'sn': record.sn, }; await eleRead(params); setTimeout(() => { @@ -168,11 +167,10 @@ async function handleControlLz(record) { return; } const params = { - 'cid': record.cid, - 'address': record.address, - 'type': '10', + 'sn' : record.sn, + 'type': '10' }; - await eleControl(params); + await eleCutOff(params); setTimeout(() => { reload(); }, 4000); @@ -191,11 +189,10 @@ async function handleControlHz(record) { return; } const params = { - 'cid': record.cid, - 'address': record.address, - 'type': '11', + 'sn' : record.sn, + 'type': '11' }; - await eleControl(params); + await eleConnected(params); setTimeout(() => { reload(); }, 4000); @@ -204,8 +201,7 @@ async function handleControlHz(record) { // 电表清零 async function handleReset(record) { const params = { - 'cid': record.cid, - 'address': record.address, + 'sn' : record.sn }; await eleReset(params); setTimeout(() => {