This commit is contained in:
bb_pan 2025-04-24 17:31:53 +08:00
parent 42cd4e2f55
commit 73f057edd7
1 changed files with 16 additions and 5 deletions

View File

@ -56,7 +56,7 @@
@change="selDeviceTypeChange" @change="selDeviceTypeChange"
style="width: 240px" style="width: 240px"
v-model="selDeviceTypeChangeValue" v-model="selDeviceTypeChangeValue"
:disabled="leaseApplyDetails.length > 0" :disabled="leaseApplyDetails.length > 0 || !queryParams.unitId || !queryParams.proId"
placeholder="请选择设备类型" placeholder="请选择设备类型"
clearable clearable
filterable filterable
@ -518,6 +518,7 @@ export default {
methods: { methods: {
// //
async GetUnitData() { async GetUnitData() {
this.selDeviceTypeChangeValue = ''
this.leaseApplyDetails.splice(0, this.leaseApplyDetails.length) this.leaseApplyDetails.splice(0, this.leaseApplyDetails.length)
const params = { const params = {
id: this.queryParams.proId /* */, id: this.queryParams.proId /* */,
@ -529,6 +530,7 @@ export default {
}, },
// //
async GetProData() { async GetProData() {
this.selDeviceTypeChangeValue = ''
this.leaseApplyDetails.splice(0, this.leaseApplyDetails.length) this.leaseApplyDetails.splice(0, this.leaseApplyDetails.length)
const params = { const params = {
id: this.queryParams.unitId, id: this.queryParams.unitId,
@ -544,10 +546,19 @@ export default {
agreementId: agreementId, agreementId: agreementId,
// this.agreementId // this.agreementId
} }
const loading = this.$loading({
const res = await getUseTypeTreee(params) lock: true,
console.log('resgetUseTypeTreee==========', res) text: '加载中...',
this.deviceTypeTree = res.data })
try {
const res = await getUseTypeTreee(params)
// console.log('resgetUseTypeTreee==========', res)
this.deviceTypeTree = res.data
loading.close()
} catch (error) {
console.log('🚀 ~ GetDeviceTypeTreeFn ~ error:', error)
loading.close()
}
}, },
// id // id
async GetAgreementInfoById() { async GetAgreementInfoById() {