diff --git a/src/views/components/editResi.vue b/src/views/components/editResi.vue index bcacbaf0..542b5841 100644 --- a/src/views/components/editResi.vue +++ b/src/views/components/editResi.vue @@ -236,6 +236,7 @@ v-model.trim="form[n.columnName]" :options="n.options" :disabled="disabled" + :props="{ emitPath: false }" clearable size="small" class="resi-cell-select"> diff --git a/src/views/components/resiForm.vue b/src/views/components/resiForm.vue index 7246d608..ec8bea49 100644 --- a/src/views/components/resiForm.vue +++ b/src/views/components/resiForm.vue @@ -198,6 +198,7 @@ v-else-if="n.itemType === 'cascader'" v-model.trim="form[n.columnName]" :options="n.options" + :props="{ emitPath: false }" clearable size="small" class="resi-cell-select"> diff --git a/src/views/modules/communityParty/members/cpts/record.vue b/src/views/modules/communityParty/members/cpts/record.vue index cc7d8795..18800117 100644 --- a/src/views/modules/communityParty/members/cpts/record.vue +++ b/src/views/modules/communityParty/members/cpts/record.vue @@ -54,8 +54,8 @@ {{ scope.row.startDate + ' - ' + scope.row.endDate }} - + diff --git a/src/views/modules/communityParty/members/crateForm.vue b/src/views/modules/communityParty/members/crateForm.vue index e0269b0a..11775d81 100644 --- a/src/views/modules/communityParty/members/crateForm.vue +++ b/src/views/modules/communityParty/members/crateForm.vue @@ -216,11 +216,11 @@ export default { address: '', rdsj: '', sszb: '', - isLd: '', + isLd: '0', ldzh: '', - partyZw: '', - isDyzxh: '', - isMxx: '', + partyZw: '0', + isDyzxh: '0', + isMxx: '0', culture: '', remark: '' }, @@ -239,6 +239,7 @@ export default { handler(val) { if (Object.keys(val).length > 0) { this.form = { ...val } + if (val.icResiUserId) this.isAuto = true console.log('val----------in', val) this.partyOrgs = val.orgPids.split(':') console.log('partyOrgs-----', this.partyOrgs) diff --git a/src/views/modules/shequ/cpts/people-more.vue b/src/views/modules/shequ/cpts/people-more.vue index 49d0755d..4ebad94f 100644 --- a/src/views/modules/shequ/cpts/people-more.vue +++ b/src/views/modules/shequ/cpts/people-more.vue @@ -484,20 +484,9 @@ export default { if (Array.isArray(options)) { let valueArr = value.split(","); if (type == "cascader") { - if (valueArr.length > 0) { - let level1 = options.find((item) => item.value == valueArr[0]); - if (level1) { - if (valueArr.length > 1 && level1.children) { - let level2 = level1.children.find( - (item) => item.value == valueArr[1] - ); - if (level2) { - return level1.label + "-" + level2.label; - } - } - return level1.label; - } - } + let finalValue = []; + this.getNodePath(options, value, finalValue); + return finalValue.join("-"); } else { return valueArr .map((val) => { @@ -513,6 +502,24 @@ export default { return "--"; }, + getNodePath(node, val, path) { // node:所有数据,val:后台返回的id, path:要渲染的数组id + for (let i = 0; i < node.length; i++) { + const ele = node[i]; + if (ele.value === val) { + path.push(ele.label); + return path + } else if (ele.children && ele.children.length > 0) { + if (ele.children.some(row => row.value === val)) { + path.unshift(ele.label); + this.getNodePath(ele.children,val,path); + } else { + this.getNodePath(ele.children,val,path); + } + } + } + return path; + }, + //加载组织数据 async getField() { const url = "/oper/customize/icform/getcustomerform";