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