diff --git a/src/views/index/supplierAdd.vue b/src/views/index/supplierAdd.vue index 902cf4f8..f1ee4726 100644 --- a/src/views/index/supplierAdd.vue +++ b/src/views/index/supplierAdd.vue @@ -158,7 +158,7 @@ children: 'children', label: 'title', }, - areaProps: { multiple: true, checkStrictly: true, value: 'id',label: 'title', emitPath: false, }, + areaProps: { multiple: true, checkStrictly: true, value: 'id',label: 'title', emitPath: false}, configId: '', wechatId: '', } @@ -295,7 +295,15 @@ }, async getAreaTree() { let res = await getArea(); - this.areaList = res?.data; + let result = res?.data + result?.map(item=>{ + if( item.parentId == 0 ) { + this.$set(item , 'disabled' ,true) + } else { + this.$set(item , 'disabled' ,false) + } + }) + this.areaList = result; }, /*async getSupplierServiceTree(){ let res = await supplierServicePartTree({