Browse Source

Merge branch 'v1.1' into dev

feature
mk 2 years ago
parent
commit
a56a60758f
  1. 38
      src/views/components/editResi.vue

38
src/views/components/editResi.vue

@ -274,7 +274,7 @@
clearable
size="small"
v-model="form.resideInfoDtos[index].gridId"
:options="orgOptions"
:options="form.resideInfoDtos[index].orgOptions"
:props="orgOptionProps"
@change="handleChangeAgency(index)"
:disabled="rowItem.accessable === 0"
@ -343,7 +343,6 @@
:rules="[
{ required: true, message: '请选择单元', trigger: 'blur' },
]"
:disabled="rowItem.accessable === 0"
>
<el-select
v-model.trim="form.resideInfoDtos[index].unitId"
@ -352,6 +351,7 @@
clearable
class="u-item-width-buildcascader f-bto0"
@change="handleChangeD(index)"
:disabled="rowItem.accessable === 0"
>
<el-option
v-for="item in rowItem.optionsD"
@ -1015,6 +1015,7 @@ export default {
optionsB: [],
optionsH: [],
optionsD: [],
orgOptions:[]
},
],
religionDto: {
@ -1047,6 +1048,7 @@ export default {
category: [],
},
},
orgOption:[],
footerInputList: [
{
id: "healthDto",
@ -1600,16 +1602,13 @@ export default {
};
},
async created() {
// await this.getDicts()
// await this.getOrgTreeList()
// await this.getResiDetail()
this.formCopy = JSON.parse(JSON.stringify(this.form));
},
async activated() {
this.resiId = this.$route.query.id;
this.loading = true;
await this.getDicts();
await this.getOrgTreeList();
await this.getOrgTreeListAll()
await this.getResiDetail();
},
methods: {
@ -1627,6 +1626,8 @@ export default {
promises.push(this.getBuildList(i));
promises.push(this.getHouseList(i));
promises.push(this.getUniList(i));
this.form.resideInfoDtos[i].orgOptions = []
this.getOrgTreeList(this.form.resideInfoDtos[i].agencyId,i);
}
this.form = { ...res.data.data };
@ -1779,16 +1780,29 @@ export default {
console.log("获取字典失败: ", error);
}
},
getOrgTreeList() {
getOrgTreeList(id,i) {
this.$http
.post("/gov/org/customeragency/rootagencygridtree", {agencyId:id})
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
} else {
this.form.resideInfoDtos[i].orgOptions.push(res.data);
}
})
.catch((err) => {
console.log(err);
return this.$message.error("网络错误");
});
},
getOrgTreeListAll() {
this.$http
.post("/gov/org/customeragency/agencygridtree", {})
.post("/gov/org/customeragency/agencygridtree", {})
.then(({ data: res }) => {
if (res.code !== 0) {
return this.$message.error(res.msg);
} else {
console.log("获取组织树成功", res.data);
this.orgOptions = [];
this.orgOptions.push(res.data);
this.orgOption.push(res.data)
}
})
.catch(() => {
@ -1948,6 +1962,7 @@ export default {
optionsB: [],
optionsH: [],
optionsD: [],
orgOptions:this.orgOption
});
},
handelClickDelHouse(i) {
@ -2050,6 +2065,7 @@ export default {
delete item.optionsB;
delete item.optionsH;
delete item.optionsD;
delete item.orgOptions;
});
delete this.form.integrityData;
this.submitForm(house);

Loading…
Cancel
Save