1、调整智能电表-日志-抄表-上次抄表值、本次抄表值的显示逻辑:抄表失败显示'-' 超标值为0时统一格式化内容为0 其它情况直接展示

2、解决温湿度计查询无法应问题
3、调整温湿度计、智能电表、智能水表sn查询永远没有结果问题、调整sn为模糊查询
This commit is contained in:
1378012178@qq.com 2025-10-27 10:27:39 +08:00
parent cb8aada8b3
commit cce6e5100d
4 changed files with 552 additions and 511 deletions

View File

@ -10,6 +10,12 @@
<TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/> <TableAction :actions="getTableAction(record)" :dropDownActions="getDropDownAction(record)"/>
</template> </template>
<template v-slot:bodyCell="{ column, record, index, text }"> <template v-slot:bodyCell="{ column, record, index, text }">
<template v-if="column.dataIndex === 'requestValue'">
<span >{{ (text == null || text == undefined) ? '-' : ((text == '0' || text == '0.00') ? 0 : text ) }}</span>
</template>
<template v-if="column.dataIndex === 'resolveValue'">
<span >{{ (text == null || text == undefined) ? '-' : ((text == '0' || text == '0.00') ? 0 : text ) }}</span>
</template>
</template> </template>
</BasicTable> </BasicTable>
<!-- 表单区域 --> <!-- 表单区域 -->

View File

@ -2,30 +2,35 @@
<div style="padding: 4px;"> <div style="padding: 4px;">
<!--查询区域--> <!--查询区域-->
<div class="jeecg-basic-table-form-container"> <div class="jeecg-basic-table-form-container">
<a-form ref="formRef" @keyup.enter.native="reload" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol"> <a-form ref="formRef" @keyup.enter.native="reload" :model="queryParam" :label-col="labelCol"
:wrapper-col="wrapperCol">
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :lg="6"> <a-col :lg="6">
<a-form-item name="address"> <a-form-item name="address">
<template #label><span title="SN">SN</span></template> <template #label><span title="SN">SN</span></template>
<j-input placeholder="请输入SN" v-model:value="queryParam.address" allow-clear ></j-input> <j-input placeholder="请输入SN" v-model:value="queryParam.address" allow-clear :type="'default'"></j-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :lg="6"> <a-col :lg="6">
<a-form-item name="nuId"> <a-form-item name="nuId">
<template #label><span title="区域">区域</span></template> <template #label><span title="区域">区域</span></template>
<j-dict-select-tag type='list' v-model:value="queryParam.nuId" :dictCode="`nu_base_info,nu_name,nu_id`" placeholder="请选区域" allow-clear /> <j-dict-select-tag type='list' v-model:value="queryParam.nuId" :dictCode="`nu_base_info,nu_name,nu_id`"
placeholder="请选区域" allow-clear />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-button type="primary" preIcon="ant-design:search-outlined" @click="reload">查询</a-button> <a-button type="primary" preIcon="ant-design:search-outlined" @click="reload">查询</a-button>
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button> <a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset"
style="margin-left: 8px">重置</a-button>
</a-col> </a-col>
</a-row> </a-row>
</a-form> </a-form>
</div> </div>
<a-row style="margin-top: -18px;"> <a-row style="margin-top: -18px;">
<a-col v-for="(item,index) in tableData.records" :key="index" :xs="24" :sm="24" :md="12" :lg="12" :xl="8" :xxl="6" style="padding: 8px 6px 6px 8px;"> <a-col v-for="(item, index) in tableData.records" :key="index" :xs="24" :sm="24" :md="12" :lg="12" :xl="8" :xxl="6"
<a-card style="width: 100%;border-radius: 8px;" :headStyle="{ height: '70px', padding: '0 24px',border:'0px' }" :bodyStyle="{ padding: '24px 24px 4px 24px' }"> style="padding: 8px 6px 6px 8px;">
<a-card style="width: 100%;border-radius: 8px;" :headStyle="{ height: '70px', padding: '0 24px', border: '0px' }"
:bodyStyle="{ padding: '24px 24px 4px 24px' }">
<template #title> <template #title>
<a-row style="font-weight: normal;"> <a-row style="font-weight: normal;">
<a-col :span="18" style="font-size: 14px;"> <a-col :span="18" style="font-size: 14px;">
@ -43,14 +48,16 @@
<a-row style="margin-top:-10px;"> <a-row style="margin-top:-10px;">
<a-col :span="12" style="margin-top: -10px;">{{ item.nuId_dictText ? item.nuId_dictText : '未配置' }}</a-col> <a-col :span="12" style="margin-top: -10px;">{{ item.nuId_dictText ? item.nuId_dictText : '未配置' }}</a-col>
<a-col :span="12" style="text-align: right;margin-top: -10px;"> <a-col :span="12" style="text-align: right;margin-top: -10px;">
<span style="text-align: right;background:#f6f6f6;padding: 2px 10px;border-radius:5px;">NUID: {{item.nuId?item.nuId:'未配置'}}</span> <span style="text-align: right;background:#f6f6f6;padding: 2px 10px;border-radius:5px;">NUID:
{{ item.nuId ? item.nuId : '未配置' }}</span>
</a-col> </a-col>
<a-col :span="14" style="text-align: right;font-size: 44px;font-weight: bold;margin-top:18px;"> <a-col :span="14" style="text-align: right;font-size: 44px;font-weight: bold;margin-top:18px;">
<span>{{ item.eleValue ? item.eleValue : '0.00' }}</span> <span>{{ item.eleValue ? item.eleValue : '0.00' }}</span>
</a-col> </a-col>
<a-col :span="8" style="padding: 12px 0 0 5px;margin-top:18px;"> <a-col :span="8" style="padding: 12px 0 0 5px;margin-top:18px;">
<div style="font-size: 12px;margin: 5px 0 -5px 2px;padding:2px;">KWH</div> <div style="font-size: 12px;margin: 5px 0 -5px 2px;padding:2px;">KWH</div>
<div style="margin-top:-3px;"><span style="background:#eeeeee;padding: 2px;border-radius:5px;font-size:11px;">用电量</span></div> <div style="margin-top:-3px;"><span
style="background:#eeeeee;padding: 2px;border-radius:5px;font-size:11px;">用电量</span></div>
</a-col> </a-col>
</a-row> </a-row>
<a-divider /> <a-divider />
@ -59,11 +66,13 @@
<span class="tbClass"><img src="../../../../assets/iot/a1.png" style="width:20px;" /></span><br /> <span class="tbClass"><img src="../../../../assets/iot/a1.png" style="width:20px;" /></span><br />
<span class="antTitle">抄表</span> <span class="antTitle">抄表</span>
</span> </span>
<span style="display:inline-block;margin-left:10%;cursor: pointer;" @click="handleControlLz(item)" v-if="item.relayState=='1'"> <span style="display:inline-block;margin-left:10%;cursor: pointer;" @click="handleControlLz(item)"
v-if="item.relayState == '1'">
<span class="tbClass"><img src="../../../../assets/iot/a5.png" style="width:20px;" /></span><br /> <span class="tbClass"><img src="../../../../assets/iot/a5.png" style="width:20px;" /></span><br />
<span class="antTitle">拉闸</span> <span class="antTitle">拉闸</span>
</span> </span>
<span style="display:inline-block;margin-left:10%;cursor: pointer;" @click="handleControlHz(item)" v-if="item.relayState=='0'"> <span style="display:inline-block;margin-left:10%;cursor: pointer;" @click="handleControlHz(item)"
v-if="item.relayState == '0'">
<span class="tbClass"><img src="../../../../assets/iot/a2.png" style="width:20px;" /></span><br /> <span class="tbClass"><img src="../../../../assets/iot/a2.png" style="width:20px;" /></span><br />
<span class="antTitle">合闸</span> <span class="antTitle">合闸</span>
</span> </span>
@ -243,6 +252,7 @@ const pageParams = ref({ pageNo: 1, pageSize: 8 })
display: block; display: block;
position: absolute; position: absolute;
} }
.zxClass { .zxClass {
font-size: 14px; font-size: 14px;
background: linear-gradient(to right, #1ea0fa, #017de9); background: linear-gradient(to right, #1ea0fa, #017de9);
@ -266,11 +276,13 @@ const pageParams = ref({ pageNo: 1, pageSize: 8 })
width: 50px; width: 50px;
margin-top: 11px; margin-top: 11px;
} }
.tbClass { .tbClass {
background: #f6f6f6; background: #f6f6f6;
padding: 8px; padding: 8px;
border-radius: 5px; border-radius: 5px;
} }
.antTitle { .antTitle {
margin-top: 10px; margin-top: 10px;
display: block; display: block;

View File

@ -2,30 +2,35 @@
<div style="padding: 4px;"> <div style="padding: 4px;">
<!--查询区域--> <!--查询区域-->
<div class="jeecg-basic-table-form-container"> <div class="jeecg-basic-table-form-container">
<a-form ref="formRef" @keyup.enter.native="reload" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol"> <a-form ref="formRef" @keyup.enter.native="reload" :model="queryParam" :label-col="labelCol"
:wrapper-col="wrapperCol">
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :lg="6"> <a-col :lg="6">
<a-form-item name="address"> <a-form-item name="address">
<template #label><span title="SN">SN</span></template> <template #label><span title="SN">SN</span></template>
<j-input placeholder="请输入SN" v-model:value="queryParam.address" allow-clear ></j-input> <j-input placeholder="请输入SN" v-model:value="queryParam.address" :type="'default'" allow-clear></j-input>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :lg="6"> <a-col :lg="6">
<a-form-item name="nuId"> <a-form-item name="nuId">
<template #label><span title="区域">区域</span></template> <template #label><span title="区域">区域</span></template>
<j-dict-select-tag type='list' v-model:value="queryParam.nuId" :dictCode="`nu_base_info,nu_name,nu_id`" placeholder="请选区域" allow-clear /> <j-dict-select-tag type='list' v-model:value="queryParam.nuId" :dictCode="`nu_base_info,nu_name,nu_id`"
placeholder="请选区域" allow-clear />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="6" :lg="7" :md="8" :sm="24">
<a-button type="primary" preIcon="ant-design:search-outlined" @click="reload">查询</a-button> <a-button type="primary" preIcon="ant-design:search-outlined" @click="reload">查询</a-button>
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" style="margin-left: 8px">重置</a-button> <a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset"
style="margin-left: 8px">重置</a-button>
</a-col> </a-col>
</a-row> </a-row>
</a-form> </a-form>
</div> </div>
<a-row style="margin-top: -18px;"> <a-row style="margin-top: -18px;">
<a-col v-for="(item,index) in tableData.records" :key="index" :xs="24" :sm="24" :md="12" :lg="12" :xl="8" :xxl="6" style="padding: 8px 6px 6px 8px;"> <a-col v-for="(item, index) in tableData.records" :key="index" :xs="24" :sm="24" :md="12" :lg="12" :xl="8" :xxl="6"
<a-card style="width: 100%;border-radius: 8px;" :headStyle="{ height: '70px', padding: '0 24px',border:'0px' }" :bodyStyle="{ padding: '24px 24px 4px 24px' }"> style="padding: 8px 6px 6px 8px;">
<a-card style="width: 100%;border-radius: 8px;" :headStyle="{ height: '70px', padding: '0 24px', border: '0px' }"
:bodyStyle="{ padding: '24px 24px 4px 24px' }">
<template #title> <template #title>
<a-row style="font-weight: normal;"> <a-row style="font-weight: normal;">
<a-col :span="18" style="font-size: 14px;"> <a-col :span="18" style="font-size: 14px;">
@ -43,14 +48,16 @@
<a-row style="margin-top:-10px;"> <a-row style="margin-top:-10px;">
<a-col :span="12" style="margin-top: -10px;">{{ item.nuId_dictText ? item.nuId_dictText : '未配置' }}</a-col> <a-col :span="12" style="margin-top: -10px;">{{ item.nuId_dictText ? item.nuId_dictText : '未配置' }}</a-col>
<a-col :span="12" style="text-align: right;margin-top: -10px;"> <a-col :span="12" style="text-align: right;margin-top: -10px;">
<span style="text-align: right;background:#f6f6f6;padding: 2px 10px;border-radius:5px;">NUID: {{item.nuId?item.nuId:'未配置'}}</span> <span style="text-align: right;background:#f6f6f6;padding: 2px 10px;border-radius:5px;">NUID:
{{ item.nuId ? item.nuId : '未配置' }}</span>
</a-col> </a-col>
<a-col :span="14" style="text-align: right;font-size: 44px;font-weight: bold;margin-top:18px;"> <a-col :span="14" style="text-align: right;font-size: 44px;font-weight: bold;margin-top:18px;">
<span>{{ item.waterValue ? item.waterValue : '0.00' }}</span> <span>{{ item.waterValue ? item.waterValue : '0.00' }}</span>
</a-col> </a-col>
<a-col :span="8" style="padding: 12px 0 0 5px;margin-top:18px;"> <a-col :span="8" style="padding: 12px 0 0 5px;margin-top:18px;">
<div style="font-size: 12px;margin: 8px 0 -5px 2px;"></div> <div style="font-size: 12px;margin: 8px 0 -5px 2px;"></div>
<div style="margin-top:-3px;"><span style="background:#eeeeee;padding: 2px;border-radius:5px;font-size:11px;">用水量</span></div> <div style="margin-top:-3px;"><span
style="background:#eeeeee;padding: 2px;border-radius:5px;font-size:11px;">用水量</span></div>
</a-col> </a-col>
</a-row> </a-row>
<a-divider /> <a-divider />
@ -59,11 +66,13 @@
<span class="tbClass"><img src="../../../../assets/iot/a1.png" style="width:20px;" /></span><br /> <span class="tbClass"><img src="../../../../assets/iot/a1.png" style="width:20px;" /></span><br />
<span class="antTitle">抄表</span> <span class="antTitle">抄表</span>
</span> </span>
<span style="display:inline-block;margin-left:10%;cursor: pointer;" @click="handleControlLz(item)" v-if="item.relayState=='0'"> <span style="display:inline-block;margin-left:10%;cursor: pointer;" @click="handleControlLz(item)"
v-if="item.relayState == '0'">
<span class="tbClass"><img src="../../../../assets/iot/a10.png" style="width:20px;" /></span><br /> <span class="tbClass"><img src="../../../../assets/iot/a10.png" style="width:20px;" /></span><br />
<span class="antTitle">开阀</span> <span class="antTitle">开阀</span>
</span> </span>
<span style="display:inline-block;margin-left:10%;cursor: pointer;" @click="handleControlHz(item)" v-if="item.relayState=='1'"> <span style="display:inline-block;margin-left:10%;cursor: pointer;" @click="handleControlHz(item)"
v-if="item.relayState == '1'">
<span class="tbClass"><img src="../../../../assets/iot/a11.png" style="width:20px;" /></span><br /> <span class="tbClass"><img src="../../../../assets/iot/a11.png" style="width:20px;" /></span><br />
<span class="antTitle">关阀</span> <span class="antTitle">关阀</span>
</span> </span>
@ -243,6 +252,7 @@ const pageParams = ref({ pageNo: 1, pageSize: 8 })
display: block; display: block;
position: absolute; position: absolute;
} }
.zxClass { .zxClass {
font-size: 14px; font-size: 14px;
background: linear-gradient(to right, #1ea0fa, #017de9); background: linear-gradient(to right, #1ea0fa, #017de9);
@ -266,11 +276,13 @@ const pageParams = ref({ pageNo: 1, pageSize: 8 })
width: 50px; width: 50px;
margin-top: 11px; margin-top: 11px;
} }
.tbClass { .tbClass {
background: #f6f6f6; background: #f6f6f6;
padding: 8px; padding: 8px;
border-radius: 5px; border-radius: 5px;
} }
.antTitle { .antTitle {
margin-top: 10px; margin-top: 10px;
display: block; display: block;

View File

@ -2,23 +2,25 @@
<div style="padding: 4px;"> <div style="padding: 4px;">
<!--查询区域--> <!--查询区域-->
<div class="jeecg-basic-table-form-container"> <div class="jeecg-basic-table-form-container">
<a-form ref="formRef" @keyup.enter.native="reload" :model="queryParam" :label-col="labelCol" :wrapper-col="wrapperCol"> <a-form ref="formRef" @keyup.enter.native="reload" :model="queryParam" :label-col="labelCol"
:wrapper-col="wrapperCol">
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :lg="6"> <a-col :lg="6">
<a-form-item name="sn"> <a-form-item name="sn">
<template #label><span title="SN">SN</span></template> <template #label><span title="SN">SN</span></template>
<j-input placeholder="请输入SN" v-model:value="queryParam.sn" allow-clear ></j-input> <JInput placeholder="请输入SN" v-model:value="queryParam.sn" allow-clear :type="'default'"></JInput>
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :lg="6"> <a-col :lg="6">
<a-form-item name="nuId"> <a-form-item name="nuId">
<template #label><span title="区域">区域</span></template> <template #label><span title="区域">区域</span></template>
<j-dict-select-tag type='list' v-model:value="queryParam.nuId" :dictCode="`nu_base_info,nu_name,nu_id`" placeholder="请选区域" allow-clear /> <j-dict-select-tag type='list' v-model:value="queryParam.nuId" :dictCode="`nu_base_info,nu_name,nu_id`"
placeholder="请选区域" allow-clear />
</a-form-item> </a-form-item>
</a-col> </a-col>
<a-col :xl="6" :lg="7" :md="8" :sm="24"> <a-col :xl="6" :lg="7" :md="8" :sm="24">
<span class="table-page-search-submitButtons"> <span class="table-page-search-submitButtons">
<a-button type="primary" preIcon="ant-design:search-outlined" @click="searchQuery">查询</a-button> <a-button type="primary" preIcon="ant-design:search-outlined" @click="reload">查询</a-button>
<a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset" <a-button type="primary" preIcon="ant-design:reload-outlined" @click="searchReset"
style="margin-left: 8px">重置</a-button> style="margin-left: 8px">重置</a-button>
</span> </span>
@ -27,8 +29,11 @@
</a-form> </a-form>
</div> </div>
<a-row style="margin-top: -18px;"> <a-row style="margin-top: -18px;">
<a-col v-for="(item,index) in tableData.records" :key="index" :xs="24" :sm="24" :md="12" :lg="12" :xl="8" :xxl="6" style="padding: 8px 6px 6px 8px;"> <a-col v-for="(item, index) in tableData.records" :key="index" :xs="24" :sm="24" :md="12" :lg="12" :xl="8"
<a-card style="width: 100%;border-radius: 8px;" :headStyle="{ height: '70px', padding: '0 24px',border:'0px' }" :bodyStyle="{ padding: '24px 24px 4px 24px' }"> :xxl="6" style="padding: 8px 6px 6px 8px;">
<a-card style="width: 100%;border-radius: 8px;"
:headStyle="{ height: '70px', padding: '0 24px', border: '0px' }"
:bodyStyle="{ padding: '24px 24px 4px 24px' }">
<template #title> <template #title>
<a-row style="font-weight: normal;"> <a-row style="font-weight: normal;">
<a-col :span="18" style="font-size: 14px;"> <a-col :span="18" style="font-size: 14px;">
@ -46,7 +51,8 @@
<a-row style="margin-top:-10px;"> <a-row style="margin-top:-10px;">
<a-col :span="12" style="margin-top: -10px;">{{ item.nuId_dictText ? item.nuId_dictText : '未配置' }}</a-col> <a-col :span="12" style="margin-top: -10px;">{{ item.nuId_dictText ? item.nuId_dictText : '未配置' }}</a-col>
<a-col :span="12" style="text-align: right;margin-top: -10px;"> <a-col :span="12" style="text-align: right;margin-top: -10px;">
<span style="text-align: right;background:#f6f6f6;padding: 2px 10px;border-radius:5px;">NUID: {{item.nuId?item.nuId:'未配置'}}</span> <span style="text-align: right;background:#f6f6f6;padding: 2px 10px;border-radius:5px;">NUID:
{{ item.nuId ? item.nuId : '未配置' }}</span>
</a-col> </a-col>
<a-col :span="24" style="padding: 12px 0 0 5px;margin-top:18px;"> <a-col :span="24" style="padding: 12px 0 0 5px;margin-top:18px;">
<a-row> <a-row>
@ -59,8 +65,10 @@
<a-divider type="vertical" style="height: 40px;" /> <a-divider type="vertical" style="height: 40px;" />
</a-col> </a-col>
<a-col :span="11" style="text-align: center;"> <a-col :span="11" style="text-align: center;">
<span style="margin-top:0px;"><img src="../../../assets/iot/a9.png" style="width:25px;margin-top: -15px;" /></span> <span style="margin-top:0px;"><img src="../../../assets/iot/a9.png"
<span style="font-size: 30px;font-weight:700;margin-left: 6px;">{{item.humidity?item.humidity:'-'}}</span> style="width:25px;margin-top: -15px;" /></span>
<span style="font-size: 30px;font-weight:700;margin-left: 6px;">{{ item.humidity ? item.humidity : '-'
}}</span>
<span style="font-size: 16px;">%</span> <span style="font-size: 16px;">%</span>
</a-col> </a-col>
</a-row> </a-row>
@ -203,6 +211,7 @@ const pageParams = ref({ pageNo: 1, pageSize: 8 })
display: block; display: block;
position: absolute; position: absolute;
} }
.zxClass { .zxClass {
font-size: 14px; font-size: 14px;
background: linear-gradient(to right, #1ea0fa, #017de9); background: linear-gradient(to right, #1ea0fa, #017de9);
@ -226,11 +235,13 @@ const pageParams = ref({ pageNo: 1, pageSize: 8 })
width: 50px; width: 50px;
margin-top: 11px; margin-top: 11px;
} }
.tbClass { .tbClass {
background: #f6f6f6; background: #f6f6f6;
padding: 8px; padding: 8px;
border-radius: 5px; border-radius: 5px;
} }
.antTitle { .antTitle {
margin-top: 10px; margin-top: 10px;
display: block; display: block;