From c03d70b2219ac4a152d4335ac13f64dd5eefb0c7 Mon Sep 17 00:00:00 2001 From: qiaomu <3520484422@qq.com> Date: Tue, 18 Nov 2025 10:52:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=AD=97=E7=AC=A6=E4=B8=B2?= =?UTF-8?q?=E6=A0=BC=E5=BC=8F=E7=9A=84=E6=95=B0=E5=AD=97=E4=B8=BA=E2=80=9C?= =?UTF-8?q?=E2=80=9D=E7=9A=84=E6=97=B6=E5=80=99=E6=8E=A5=E5=8F=A3=E6=8A=A5?= =?UTF-8?q?=E9=94=99=E7=9A=84=E9=97=AE=E9=A2=98=E5=92=8C=E8=A3=85=E8=A1=A8?= =?UTF-8?q?=E7=9A=84=E6=97=B6=E5=80=99=E6=9C=AA=E8=BF=87=E6=BB=A4=E5=B7=B2?= =?UTF-8?q?=E8=A3=85=E7=94=B5=E8=A1=A8=E7=9A=84=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/searchSelect/index.js | 2 +- .../tenement/components/bindMeter/index.js | 10 +++++----- .../tenement/components/unBindMeter/index.js | 10 +++++----- pages/workBenchNew/components/installMeter/index.js | 8 +++++++- .../workBenchTenement/components/bindMeter/index.js | 12 ++++++------ .../components/unBindMeter/index.js | 12 ++++++------ 6 files changed, 30 insertions(+), 24 deletions(-) diff --git a/components/searchSelect/index.js b/components/searchSelect/index.js index 558a7ca..b9b3870 100644 --- a/components/searchSelect/index.js +++ b/components/searchSelect/index.js @@ -222,7 +222,7 @@ Component({ }, async onSearchInventoryMeter() { const { searchText = "", park, filterBind } = this.data; - const { code, message, data: parks = [] } = await getInventoryMeter({keyword: searchText, park, isNeedBind: !filterBind, a : 1}); + const { code, message, data: parks = [] } = await getInventoryMeter({keyword: searchText, park, isNeedBind: !filterBind, status: 1}); if (code !== OK) { alertInfo(message) return diff --git a/pages/workBench/components/tenement/components/bindMeter/index.js b/pages/workBench/components/tenement/components/bindMeter/index.js index 3be41b4..9710e08 100644 --- a/pages/workBench/components/tenement/components/bindMeter/index.js +++ b/pages/workBench/components/tenement/components/bindMeter/index.js @@ -70,11 +70,11 @@ Component({ tenement, { code: meter, - overall:overall? Number(overall) : overall, - critical : critical ? Number(critical) : critical, - peak: peak ? Number(peak) : peak, - valley : valley ? Number(valley) : valley, - deepValley : deepValley ? Number(deepValley) : deepValley, + overall:overall? Number(overall) : (overall === "" ? null : overall), + critical : critical ? Number(critical) : (critical === "" ? null : critical), + peak: peak ? Number(peak) : (peak === "" ? null : peak), + valley : valley ? Number(valley) : (valley === "" ? null : valley), + deepValley : deepValley ? Number(deepValley) : (deepValley === "" ? null : deepValley), readAt: readAt || dayjs().format('YYYY-MM-DD HH:mm:ss') } ) diff --git a/pages/workBench/components/tenement/components/unBindMeter/index.js b/pages/workBench/components/tenement/components/unBindMeter/index.js index f3d72e2..87b9868 100644 --- a/pages/workBench/components/tenement/components/unBindMeter/index.js +++ b/pages/workBench/components/tenement/components/unBindMeter/index.js @@ -75,11 +75,11 @@ Component({ tenement, meterId, { - overall:overall? Number(overall) : overall, - critical : critical ? Number(critical) : critical, - peak: peak ? Number(peak) : peak, - valley : valley ? Number(valley) : valley, - deepValley: deepValley ? Number(deepValley) : deepValley, + overall:overall? Number(overall) : (overall === "" ? null : overall), + critical : critical ? Number(critical) : (critical === "" ? null : critical), + peak: peak ? Number(peak) : (peak === "" ? null : peak), + valley : valley ? Number(valley) : (valley === "" ? null : valley), + deepValley: deepValley ? Number(deepValley) : (deepValley === "" ? null : deepValley), readAt: readAt || dayjs().format('YYYY-MM-DD HH:mm:ss') }); if (code !== OK) { diff --git a/pages/workBenchNew/components/installMeter/index.js b/pages/workBenchNew/components/installMeter/index.js index 367a54e..b12503a 100644 --- a/pages/workBenchNew/components/installMeter/index.js +++ b/pages/workBenchNew/components/installMeter/index.js @@ -428,7 +428,13 @@ Page({ const { code, data, message } = await installMeter({ park, meterSn: meter, address, building, meterBox, meterType, ratio, area, card, collectionA, collectionB, collectionC, - tenement, sharp, peak, flat, valley, overall, url, sn + tenement, + sharp: sharp === "" ? null : sharp, + peak: peak === "" ? null : peak, + flat: flat === "" ? null : flat, + valley: valley === "" ? null : valley, + overall: overall === "" ? null : overall, + url, sn }) if (code !== OK) { alertInfo(message) diff --git a/pages/workBenchNew/components/workBenchTenement/components/bindMeter/index.js b/pages/workBenchNew/components/workBenchTenement/components/bindMeter/index.js index 9c14c04..086d5a5 100644 --- a/pages/workBenchNew/components/workBenchTenement/components/bindMeter/index.js +++ b/pages/workBenchNew/components/workBenchTenement/components/bindMeter/index.js @@ -70,12 +70,12 @@ Component({ tenement, { code: meter, - overall:overall? Number(overall) : overall, - critical : critical ? Number(critical) : critical, - peak: peak ? Number(peak) : peak, - flat: flat ? Number(flat) : flat, - valley : valley ? Number(valley) : valley, - deepValley: deepValley ? Number(deepValley) : deepValley, + overall:overall? Number(overall) : (overall === "" ? null : overall), + critical : critical ? Number(critical) : (critical === "" ? null : critical), + peak: peak ? Number(peak) : (peak === "" ? null : peak), + flat: flat ? Number(flat) : (flat === "" ? null : flat), + valley : valley ? Number(valley) : (valley === "" ? null : valley), + deepValley: deepValley ? Number(deepValley) : (deepValley === "" ? null : deepValley), readAt: readAt || dayjs().format('YYYY-MM-DD HH:mm:ss') } ) diff --git a/pages/workBenchNew/components/workBenchTenement/components/unBindMeter/index.js b/pages/workBenchNew/components/workBenchTenement/components/unBindMeter/index.js index 9aebbd2..883c9e5 100644 --- a/pages/workBenchNew/components/workBenchTenement/components/unBindMeter/index.js +++ b/pages/workBenchNew/components/workBenchTenement/components/unBindMeter/index.js @@ -81,12 +81,12 @@ Component({ tenement, meterId, { - overall:overall? Number(overall) : overall, - critical : critical ? Number(critical) : critical, - peak: peak ? Number(peak) : peak, - flat: flat ? Number(flat) : flat, - valley : valley ? Number(valley) : valley, - deepValley: deepValley ? Number(deepValley) : deepValley, + overall:overall? Number(overall) : (overall === "" ? null : overall), + critical : critical ? Number(critical) : (critical === "" ? null : critical), + peak: peak ? Number(peak) : (peak === "" ? null : peak), + flat: flat ? Number(flat) : (flat === "" ? null : flat), + valley : valley ? Number(valley) : (valley === "" ? null : valley), + deepValley: deepValley ? Number(deepValley) : (deepValley === null ? "" : deepValley), readAt: readAt || dayjs().format('YYYY-MM-DD HH:mm:ss') }); if (code !== OK) {