修改问题
This commit is contained in:
@@ -176,13 +176,25 @@ Page({
|
||||
},
|
||||
onConfirm(e) {
|
||||
const { type, data = {} } = e.detail;
|
||||
const {collection} = this.data;
|
||||
const {collection, park, tenement} = this.data;
|
||||
switch(type) {
|
||||
case "park":
|
||||
this.setData({
|
||||
park: data.id,
|
||||
parkName: data.name,
|
||||
})
|
||||
if (park !== data.id) {
|
||||
this.setData({
|
||||
tenement: null,
|
||||
tenementName: null,
|
||||
building: null,
|
||||
buildingName: null,
|
||||
meterBox: null,
|
||||
meterBoxName: null,
|
||||
meter: null,
|
||||
meterName: null,
|
||||
})
|
||||
}
|
||||
break;
|
||||
case "tenement":
|
||||
this.setData({
|
||||
@@ -323,7 +335,7 @@ Page({
|
||||
ratio, area, card, collectionA, collectionB, collectionC,
|
||||
tenement, sharp, peak, flat, valley, overall, url
|
||||
} = this.data;
|
||||
if (!park || !meter || !address || !meterType) {
|
||||
if (!park || !meter || !address || meterType == null) {
|
||||
alertInfo("请填写必填项后保存")
|
||||
return;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user