Browse Source

Merge branch 'feature' of http://120.46.222.128:10021/elink-star/epmet-work-pc into feature

xiaowang-jumin
wxz 2 years ago
parent
commit
505df4cf4e
  1. 5
      src/views/components/addResi.vue
  2. 2
      src/views/components/editResi.vue
  3. 79
      src/views/components/resiExpand/editExpand.vue
  4. 12
      src/views/modules/communityService/gxxq/addForm.vue

5
src/views/components/addResi.vue

@ -890,11 +890,10 @@ export default {
},
{//1
label: "子女姓名",
check:'fourFont',
// check:'fourFont',
itemType: "input1",
formName: "childName",
opction: [
]
opction: []
},
{//2
label: "子女性别",

2
src/views/components/editResi.vue

@ -1400,7 +1400,7 @@ export default {
{
//1
label: "子女姓名",
check:'fourFont',
// check:'fourFont',
itemType: "input1",
formName: "childName",
pformName: "specialSupportDto",

79
src/views/components/resiExpand/editExpand.vue

@ -72,7 +72,6 @@
<el-cascader v-model.trim="form[itemj.id].partyOrgId" :props="casProps"
:options="itemk.opction" class="list_item_width_1" clearable size="small"
@change="handlePartyOrgCascadarChange" ></el-cascader>
<!-- {{form[itemj.id].partyOrgId}} -->
</template>
<template v-else-if="itemk.itemType == 'number'">
@ -277,42 +276,50 @@ export default {
}
}
},
showForm() {
this.$nextTick(() => {
console.log(this.form,'拓展组件form');
console.log(this.formList,'拓展组件formList');
const promises = this.formList.forEach((item) => {
item.form.map(async (group) => {
return group.children.reduce(async (accPromise, item) => {
const acc = await accPromise;
acc[item.formName] = null;
this.form[item.pformName].id = item.id
if (item.itemType == 'checkbox') {
this.form[item.pformName][item.formName] = item.value || []
} else if (item.itemType == 'cascader1' && item.orgPath) {
await this.getOrgTree()
this.form[item.pformName][item.formName] = item.orgPath.split(':') || null
} else{
this.form[item.pformName][item.formName] = item.value != null?item.value:null;
}
if (item.opctionUrl) {
try {
item.opction = await this.getDictDataForm(item.opctionUrl, item.opctionParams);
} catch (error) {
console.error('Error fetching options:', error);
}
}
return acc;
}, Promise.resolve({}));
})
})
Promise.all(promises).then((results) => {
async showForm() {
await this.$nextTick();
console.log(this.form, '拓展组件form');
console.log(this.formList, '拓展组件formList');
const promises = this.formList.map(async (item) => {
const groupPromises = item.form.map(async (group) => {
await group.children.reduce(async (accPromise, childItem) => {
const acc = await accPromise;
acc[childItem.formName] = null;
this.form[childItem.pformName].id = childItem.id;
if (childItem.itemType === 'checkbox') {
this.form[childItem.pformName][childItem.formName] = childItem.value || [];
} else if (childItem.itemType === 'cascader1' && childItem.orgPath) {
await this.getOrgTree();
let maxId = this.formList.filter(item => item.formId == 'parymemberInfoDto')[0].form[0].children.filter(item => item.formName == 'partyOrgId')[0].opction[0].id;
let orgId = JSON.parse(JSON.stringify(childItem.orgPath.split(':')));
orgId = orgId.slice(orgId.findIndex(item => item === maxId), orgId.length - 1)
this.form[childItem.pformName][childItem.formName] = orgId;
} else {
this.form[childItem.pformName][childItem.formName] = childItem.value != null ? childItem.value : null;
}
if (childItem.opctionUrl) {
try {
childItem.opction = await this.getDictDataForm(childItem.opctionUrl, childItem.opctionParams);
} catch (error) {
console.error('Error fetching options:', error);
}
}
return acc;
}, Promise.resolve({}));
});
return Promise.all(groupPromises);
});
try {
await Promise.all(promises);
console.log('Form processing complete');
} catch (error) {
console.error('Error processing form:', error);
}
},
}).catch((error) => {
console.error('Error fetching options:', error);
});
})
},
async getDictDataForm(url, params) {
try {
const { data } = await this.$http.post(url, params);

12
src/views/modules/communityService/gxxq/addForm.vue

@ -365,12 +365,12 @@ export default {
showLabelForm: false,
codeFilters: {
'1038': ['party_unit', 'community_org'],
'1039': ['party_unit', 'community_org'],
'1038': ['party_unit', 'community_org','public_welfare_post'],
'1039': ['party_unit', 'community_org', 'public_welfare_post'],
'1040': ['party_unit', 'community_org'],
'1041': ['party_unit', 'community_org', 'publicWelfare'],
'1042': ['party_unit', 'community_org', 'publicWelfare'],
'1043': ['party_unit', 'community_org', 'publicWelfare'],
'1041': ['party_unit', 'community_org', 'public_welfare_post'],
'1042': ['party_unit', 'community_org'],
'1043': ['party_unit', 'community_org'],
'1044': ['party_unit', 'community_org'],
},
};
@ -490,9 +490,7 @@ export default {
handelChangeCategoryCode() {
this.serviceOptions = [...this.originalServiceOptions];
const codeFilters = this.codeFilters;
console.log(this.serviceOptions);
const checkedCode = this.$refs['myCategoryCode'].getCheckedNodes()[0].parent.value;
console.log(checkedCode);
if (codeFilters[checkedCode] && Array.isArray(codeFilters[checkedCode])) {
this.serviceOptions = this.serviceOptions.filter(item => codeFilters[checkedCode].includes(item.value));
} else {

Loading…
Cancel
Save