From de18ed868671be5e79f51a166dc77b9af6bbc7a8 Mon Sep 17 00:00:00 2001
From: mk <2403457699@qq.com>
Date: Mon, 22 Apr 2024 09:47:23 +0800
Subject: [PATCH] =?UTF-8?q?=E5=B1=85=E6=B0=91=E7=BC=96=E8=BE=91=E4=BF=AE?=
=?UTF-8?q?=E6=94=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/views/components/editResi.vue | 90 ++++++++++++++++++-
.../components/resiExpand/editExpand.vue | 18 ++--
2 files changed, 91 insertions(+), 17 deletions(-)
diff --git a/src/views/components/editResi.vue b/src/views/components/editResi.vue
index 10e4975e9..f856bf897 100644
--- a/src/views/components/editResi.vue
+++ b/src/views/components/editResi.vue
@@ -828,6 +828,10 @@
+
+
+
@@ -852,11 +856,14 @@ import {
} from "@/js/columns/constants";
import stafftag from "../modules/portrayal/jumin/cpts/staffTag.vue";
import resiExpand from "./resiExpand/editExpand.vue";
+import addExpand from "./resiExpand/index.vue";
+
export default {
data() {
return {
loading: false,
-
+ dialogTitle:null,
+ dialogVisible:false,
houseType: true,
formList: [],
orgOptions: [],
@@ -1648,7 +1655,7 @@ export default {
key === "partyFlag")
) {
const formId = key === "partyFlag" ? "parymemberInfoDto" : key;
- this.showDialog({ index: key, value: formId }, true);
+ this.loadExpand({ index: key, value: formId }, true);
for (let i in this.footerInputList) {
const incidenceFormId = this.incidence[formId].formId;
if (this.footerInputList[i].id === incidenceFormId) {
@@ -2086,7 +2093,7 @@ export default {
}
},
- showDialog({ index, value }, event) {
+ loadExpand({ index, value }, event,) {
// 设置 partyFlag
if (value === 1 || value === 0 || value === 2) {
this.form.baseInfoDto.categoryInfo.partyFlag = value;
@@ -2157,7 +2164,82 @@ export default {
}
}
},
+ showDialog({ index, value }, event) {
+ if (value == 1) {
+ value = 'parymemberInfoDto'
+ this.form.baseInfoDto.categoryInfo.partyFlag = 1;
+ } else if (value == 0) {
+ this.form.baseInfoDto.categoryInfo.partyFlag = 0;
+ } else if (value == 2) {
+ this.form.baseInfoDto.categoryInfo.partyFlag = 2;
+ }
+ if (index != 3 && index) {
+ this.form.baseInfoDto.categoryInfo[value] = event ? 1 : 0;
+ } else if (index == 3) {
+ if (event) {
+ this.form.baseInfoDto.categoryInfo.specialCrowdFlag = 1;
+ if (value == 'unitedFrontFlag' || value == 'petitionOfficerFlag') {
+ this.form.baseInfoDto.categoryInfo[value] = 1
+ }
+ this.form.specialDto.specialCategoryCodes.push(value);
+ } else {
+ this.form.specialDto.specialCategoryCodes = this.form.specialDto.specialCategoryCodes.filter(item => item != value);
+ if (value == 'unitedFrontFlag' || value == 'petitionOfficerFlag') {
+ this.form.baseInfoDto.categoryInfo[value] = 0
+ }
+ }
+ }
+ const map = {
+ 'parymemberInfoDto': { formId: 'parymemberInfoDto', formType: 'parymemberInfoDto', title: '党员信息' },
+ 'disabilityFlag': { formId: 'healthDto', formType: 'healthDto', title: '残疾信息' },
+ 'seriousIllnessFlag': { formId: 'seriousIllnessDto', formType: 'seriousIllnessDto', title: '大病信息' },
+ 'chronicDiseaseFlag': { formId: 'chronicDiseaseDto', formType: 'chronicDiseaseDto', title: '慢病信息' },
+ 'deathFlag': { formId: 'deathDto', formType: 'deathDto', title: '死亡' },
+ 'oldPeopleFlag': { formId: 'oldPeopleDto', formType: 'oldPeopleDto', title: '老年人信息' },
+ 'subsistenceAllowanceFlag': { formId: 'subsistenceAllowanceDto', formType: 'subsistenceAllowanceDto', title: '低保人员信息' },
+ 'veteranFlag': { formId: 'veteranDto', formType: 'veteranDto', title: '退役军人信息' },
+ 'ensureHouseFlag': { formId: 'ensureHouseDto', formType: 'ensureHouseDto', title: '保障性住房信息' },
+ 'specialSupportFlag': { formId: 'specialSupportDto', formType: 'specialSupportDto', title: '特扶人员' },
+ 'unitedFrontFlag': { formId: 'unitedFrontDto', formType: 'unitedFrontDto', title: '统战人员' },
+ 'volunteerFlag': { formId: 'volunteerDto', formType: 'volunteerDto', title: '志愿者' },
+ };
+
+ if (map[value] && event == true) {
+ this.dialogTitle = map[value].title;
+ this.dialogVisible = (event == true || value == "parymemberInfoDto") && this.dialogTitle != "";
+ this.$nextTick(() => {
+ this.$refs["addExpand"].formList = [
+ this.footerInputList.find((item) => item.id === map[value].formId),
+ ];
+ this.$refs["addExpand"].formType = map[value].formType;
+ this.$refs["addExpand"].showForm();
+ });
+ }else{
+ this.$refs["resiExpand"].formList = this.$refs[
+ "resiExpand"
+ ].formList.filter(
+ (item) => item.formId !== this.incidence[value].formId
+ );
+
+ this.footerInputList.forEach((item) => {
+ if (item.id === this.incidence[value].formId) {
+ item.children.forEach((child) => {
+ child.value = child.itemType === "checkbox" ? [] : null;
+ });
+ }
+ });
+ delete this.form[this.incidence[value].formType];
+ }
+ },
+ submitExpandAdd(form, formType) {
+ this.form[formType] = form[formType];
+ this.dialogVisible = false;
+ },
+ hideExpand(formType) {
+ delete this.form[formType];
+ this.dialogVisible = false;
+ },
// 提交扩展信息
submitExpand(_form, { changId, changPid, changType }) {
if (changType == "checkbox") {
@@ -2185,7 +2267,7 @@ export default {
}
},
},
- components: { stafftag, resiExpand },
+ components: { stafftag, resiExpand ,addExpand},
computed: {},
watch: {},
};
diff --git a/src/views/components/resiExpand/editExpand.vue b/src/views/components/resiExpand/editExpand.vue
index 97128f50b..644911953 100644
--- a/src/views/components/resiExpand/editExpand.vue
+++ b/src/views/components/resiExpand/editExpand.vue
@@ -70,6 +70,7 @@
+
@@ -95,6 +96,7 @@ export default {
return {
formType: null,
formList: [],
+ treeCheckKeyList:[],
form: {
// 党员信息
parymemberInfoDto: {
@@ -188,21 +190,12 @@ export default {
lazyLoad: (node, resolve) => {
this.handleNextOrgTreeClick(node, resolve)
},
- isLeaf: (data, node) => {
- console.log(data);
- //根据后台返回的数据判断是否还有下级 是否显示箭头图标
- //el-tree懒加载无子级数据时去掉下拉箭头
- if (data.partyOrgLevel == 7 || data.childrenQty == 0) {
- return true
- }
- },
checkStrictly: true,
multiple: false,
},
changId:null,
changPid:null,
changType:null,
- partyOrgIdPath:null
};
},
props: {
@@ -244,9 +237,8 @@ export default {
if (item.itemType == 'checkbox') {
this.form[item.pformName][item.formName] = item.value || []
} else if (item.itemType == 'cascader1' && item.orgPath) {
- this.partyOrgIdPath = item.orgPath.split(':')[0]
await this.getOrgTree()
- this.form[item.pformName][item.formName] = item.value || null
+ this.form[item.pformName][item.formName] = item.orgPath.split(':') || null
} else{
this.form[item.pformName][item.formName] = item.value != null?item.value:null;
}
@@ -285,7 +277,7 @@ export default {
await this.getTreeChildenList(node, resolve)
},
async getTreeChildenList(node, resolve) {
- if (node.data.partyOrgLevel <= 8) {
+ if (node.data.partyOrgLevel == 7) {
resolve(null);
return;
}
@@ -306,7 +298,7 @@ export default {
},
async getOrgTree() {
try {
- const { data } = await requestGet('/actual/base/party/org/listPartyOrgTreeRoot4Select', { partyOrgId:this.partyOrgIdPath,depth:8 })
+ const { data } = await requestGet('/actual/base/party/org/listPartyOrgTreeRoot')
this.formList.forEach(c => {
if (c.formId == "parymemberInfoDto") {
for (let i of c.form[0].children) {