diff --git a/src/views/components/editResi.vue b/src/views/components/editResi.vue index d3b243f5f..db0aba95f 100644 --- a/src/views/components/editResi.vue +++ b/src/views/components/editResi.vue @@ -237,6 +237,7 @@ :options="n.options" :props="{ checkStrictly: true }" :disabled="disabled" + :props="{ emitPath: false }" clearable size="small" class="resi-cell-select"> @@ -348,7 +349,7 @@ export default { _form = { ...obj } // return _form } - const itemTypes = ['cascader', 'daterange', 'timerange'] + const itemTypes = ['daterange', 'timerange'] arr.forEach(item => { if (item.multiSelect || itemTypes.includes(item.itemType)) { if (item.columnValue && item.columnValue.indexOf(',') > -1) _form[item.columnName] = item.columnValue.split(',') diff --git a/src/views/components/resiForm.vue b/src/views/components/resiForm.vue index 7246d608c..505fe55c0 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"> @@ -295,16 +296,28 @@ export default { } let initForm = (obj, arr) => { let _form = {} - console.log('formInfo---arr', arr) - if (Object.keys(obj).length > 0) { - _form = { ...obj } - return _form - } + console.log('formInfo---obj', obj) + // if (Object.keys(obj).length > 0) { + // for(const n in obj) { + // if (obj[n] == null) obj[n] = '' + // } + // _form = { ...obj } + // return _form + // } + const len = Object.keys(obj).length arr.forEach(item => { - - if (item.multiSelect) _form[item.columnName] = [] - else if (item.itemType == 'radio' && item.defaultValue == '0') _form[item.columnName] = item.defaultValue - else _form[item.columnName] = '' + if (len) { + if (obj[item.columnName]) { + _form[item.columnName] = obj[item.columnName] + item.isChange = true + } + + } else { + if (item.multiSelect) _form[item.columnName] = [] + else if (item.itemType == 'radio' && item.defaultValue == '0') _form[item.columnName] = item.defaultValue + else _form[item.columnName] = '' + } + // if (item.optionSourceType === 'remote') { // this.getOptionsLists(item.optionSourceValue).then(res => { @@ -339,9 +352,10 @@ export default { let rules = initRules(this.formList) console.log('rulessss', rules) let tempFormList = [ ...this.formList ].map(item => { + const isChange = (item.itemType == 'radio' && item.defaultValue == '0') && true return { ...item, - isChange: (item.itemType == 'radio' && item.defaultValue == '0') ? true : false + isChange: isChange || item.isChange || false } }) let constForm = { @@ -354,6 +368,8 @@ export default { } return { openSearch: false, + isParty: false, + partyInfo: [], fixedForm: { GRID_ID: '', VILLAGE_ID: '', @@ -532,7 +548,10 @@ export default { // console.log('columnName', item.columnName, columnName) if (item.columnName === columnName && item.itemType === 'radio' && item.childGroup) { console.log('columnName', item.columnName, columnName) - this.$emit('changegroup', { value, childGroup: item.childGroup }) + if (this.isParty) { + this.$emit('changegroup', { value, partyInfo: this.partyInfo, childGroup: item.childGroup }) + } else this.$emit('changegroup', { value, childGroup: item.childGroup }) + } }) }, @@ -671,7 +690,7 @@ export default { if (this.supportAdd) newForm = this.handlerMuscForm() return newForm }, - validateIdcard (idCard) { + validateIdcard (idCard, type) { this.$http .post('/epmetuser/icresiuser/getUserRoleByIdCard', { idCard }) .then(({ data: res }) => { @@ -679,8 +698,23 @@ export default { return this.$message.error(res.msg) } else { console.log('获取查询详情成功', res.data) + if (res.data.isVolunteer == '1') this.form.IS_VOLUNTEER = '1' else this.form.IS_VOLUNTEER = '0' + + if (res.data.isPartyMember == '1') { + this.form.IS_PARTY = '1' + this.isParty = true + this.partyInfo = res.data.detail.ic_party_member + } else this.form.IS_PARTY = '0' + + // if (type == 'vol') { + // this.isParty = false + + // } else if (res.data.isPartyMember == '1' && val == 'party') { + // this.isParty = true + // } + } }) .catch(() => { diff --git a/src/views/modules/base/resi.vue b/src/views/modules/base/resi.vue index 10efef011..5700c7756 100644 --- a/src/views/modules/base/resi.vue +++ b/src/views/modules/base/resi.vue @@ -202,6 +202,7 @@ :name="'group' + item.groupId"> @@ -832,7 +833,7 @@ export default { }, async handleChangeGroup (val) { console.log('changeguoprrrrr----', val) - let { childGroup, value } = val + let { childGroup, value, partyInfo } = val let hasT = false let i = 0 @@ -855,7 +856,10 @@ export default { // console.log('') } }) - list.push(childGroup) + if (partyInfo && partyInfo.length > 0 && childGroup.tableName == 'ic_party_member') { + list.push({...childGroup, formInfo: partyInfo[0] }) + } else list.push(childGroup) + } } else { // console.log('changegroup----000', value) diff --git a/src/views/modules/communityParty/members/cpts/record.vue b/src/views/modules/communityParty/members/cpts/record.vue index cc7d8795a..188001175 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 e0269b0aa..8f8ac56df 100644 --- a/src/views/modules/communityParty/members/crateForm.vue +++ b/src/views/modules/communityParty/members/crateForm.vue @@ -1,12 +1,12 @@