电表箱支持按建筑筛选,倍率必填,拆表传id
This commit is contained in:
@@ -19,6 +19,7 @@ Component({
|
||||
type: String,
|
||||
show: Boolean,
|
||||
park: String,
|
||||
building: String,
|
||||
isBack: Boolean,
|
||||
filterBind: Boolean,
|
||||
},
|
||||
@@ -248,8 +249,8 @@ Component({
|
||||
})
|
||||
},
|
||||
async onSearchMeterBox() {
|
||||
const { park } = this.data;
|
||||
const { code, message, data = [] } = await getParkBoxList({park});
|
||||
const { park, building } = this.data;
|
||||
const { code, message, data = [] } = await getParkBoxList({park, building});
|
||||
if (code !== OK) {
|
||||
alertInfo(message)
|
||||
return
|
||||
|
||||
@@ -384,7 +384,7 @@ Page({
|
||||
tenement, sharp, peak, flat, valley, overall, url, sn,
|
||||
collectionARatio, collectionBRatio, collectionCRatio
|
||||
} = this.data;
|
||||
if (!park || !(meter || sn) || !address || meterType == null || !building || !meterBox) {
|
||||
if (!park || !(meter || sn) || !address || meterType == null || !building || !meterBox || ratio == null) {
|
||||
alertInfo("请填写必填项后保存")
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -49,6 +49,7 @@
|
||||
placeholder="请选择电表箱"
|
||||
text="{{meterBoxName}}"
|
||||
bind:search="onMeterBoxFocus"
|
||||
|
||||
required="{{true}}"
|
||||
/>
|
||||
<searchSelectWrapper
|
||||
@@ -63,6 +64,7 @@
|
||||
placeholder="请输入倍率"
|
||||
type="input"
|
||||
text="ratio"
|
||||
required="{{true}}"
|
||||
bind:changeText="changeRatio"
|
||||
/>
|
||||
<searchSelectWrapper
|
||||
@@ -180,6 +182,7 @@
|
||||
title="{{title}}"
|
||||
type="{{type}}"
|
||||
park="{{park}}"
|
||||
building="{{building}}"
|
||||
bindconfirm="onConfirm"
|
||||
bindcancel="onCancel"
|
||||
placeholder="{{placeholder}}"
|
||||
|
||||
@@ -152,7 +152,7 @@ Page({
|
||||
alertInfo("请选择表号")
|
||||
return;
|
||||
}
|
||||
const { code, message } = await uninstallMeter({sn: meterInfo.meterSn, images: url, reason, tenement: meterInfo.tenement, critical, peak, flat, valley, overall, deepOverall})
|
||||
const { code, message } = await uninstallMeter({sn: meter, images: url, reason, tenement: meterInfo.tenement, critical, peak, flat, valley, overall, deepOverall})
|
||||
if (code !== OK) {
|
||||
alertInfo(message)
|
||||
return
|
||||
|
||||
@@ -49,8 +49,8 @@ export const getWorkMeterDetail = async function(code = '') {
|
||||
}
|
||||
|
||||
// 获取某一园区下的电表箱列表
|
||||
export const getParkBoxList = async function({park = "", keyword = "", page = 1}) {
|
||||
return await GET(`/box/${park}?page=${page}&keyword=${replaceSpecialIcon(keyword)}`);
|
||||
export const getParkBoxList = async function({park = "", keyword = "", page = 1, building =- ""}) {
|
||||
return await GET(`/box/${park}?page=${page}&keyword=${replaceSpecialIcon(keyword)}&building=${building}`);
|
||||
}
|
||||
|
||||
// 获取卡列表
|
||||
|
||||
Reference in New Issue
Block a user