点位管理

This commit is contained in:
2024-01-09 15:09:36 +08:00
parent d931a58ca1
commit 51cfee116c

View File

@@ -175,7 +175,7 @@ export default {
this.val1 = this.optionNew1[i].label this.val1 = this.optionNew1[i].label
this.val2 = '' this.val2 = ''
this.active2 = '' this.active2 = ''
this._getPointListByRegion(this.optionNew1[i].value) this._getPointListByRegion(1, this.optionNew1[i].value)
} }
}, },
/** ---- */ /** ---- */
@@ -212,18 +212,27 @@ export default {
this.val3 = this.optionNew3[i].label this.val3 = this.optionNew3[i].label
this.val4 = '' this.val4 = ''
this.active4 = '' this.active4 = ''
this._getPointListByRegion(this.optionNew3[i].value) this._getPointListByRegion(2, this.optionNew3[i].value)
} }
}, },
/** 查询点位 */ /** 查询点位 */
async _getPointListByRegion (code) { async _getPointListByRegion (t, code) {
let res = await getPointListByRegion(code) let res = await getPointListByRegion(code)
if (res.code === '1') { if (res.code === '1') {
this.option2 = [...res.result] if (t === 1) {
this.option2.map(el => { this.option2 = [...res.result]
this.$set(el, 'value', el.point_code) this.option2.map(el => {
this.$set(el, 'label', el.point_name) this.$set(el, 'value', el.point_code)
}) this.$set(el, 'label', el.point_name)
})
}
if (t === 2) {
this.option4 = [...res.result]
this.option4.map(el => {
this.$set(el, 'value', el.point_code)
this.$set(el, 'label', el.point_name)
})
}
} else { } else {
this.Dialog(res.desc) this.Dialog(res.desc)
} }