From 7f3942dfd616bf3ac413c9310125e4cdc7e27155 Mon Sep 17 00:00:00 2001 From: 13176889840 <13176889840@163.com> Date: Wed, 3 Nov 2021 16:28:56 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=B1=85=E6=B0=91=E4=BF=A1?= =?UTF-8?q?=E6=81=AF222?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/components/editResi.vue | 6 ------ src/views/modules/base/resi.vue | 36 ++++++++++++++++--------------- 2 files changed, 19 insertions(+), 23 deletions(-) diff --git a/src/views/components/editResi.vue b/src/views/components/editResi.vue index 67c6ef73..6909034a 100644 --- a/src/views/components/editResi.vue +++ b/src/views/components/editResi.vue @@ -472,7 +472,6 @@ export default { this.addList = [...this.mutiList] // console.log('addList----111', this.addList) } - // } this.addList.push(this.addCount++) if (this.fixed) { this.getGridList() this.getValiheList() @@ -483,11 +482,6 @@ export default { }, methods: { initForm () { - // console.log('formInfo', this.formInfo) - // if (Object.keys(this.formInfo).length > 0) { - // this.form = { ...this.formInfo } - // return - // } this.formList.forEach(async item => { if (item.optionSourceType === 'remote') { await this.getOptionsLists(item.optionSourceValue).then(res => { diff --git a/src/views/modules/base/resi.vue b/src/views/modules/base/resi.vue index 2ee44783..7793c065 100644 --- a/src/views/modules/base/resi.vue +++ b/src/views/modules/base/resi.vue @@ -266,8 +266,8 @@ export default { }, async handleEdit (row) { this.disabled = false - await this.getFormList() - this.getrowInfo(row.icResiUserId) + await this.getFormList('edit') + await this.getrowInfo(row.icResiUserId) }, async handleAdd () { await this.getFormList() @@ -588,7 +588,7 @@ export default { return this.$message.error('网络错误') }) }, - async getFormList () { + async getFormList (type) { await this.$http .post('/oper/customize/icform/getcustomerform', { formCode: 'resi_base_info', dynamic: true }) .then(({ data: res }) => { @@ -598,23 +598,25 @@ export default { console.log('获取详情成功getFormList') let { itemList, groupList } = res.data this.activeName = 'group' + res.data.groupList[0].groupId - itemList.forEach(async item => { - if (item.optionSourceType === 'remote') { - await this.getOptionsList(item.optionSourceValue).then(res => { - item.options = res - }) - } - }) - groupList.forEach(item => { - item.itemList.forEach(async n => { - n.tableName = item.tableName - if (n.optionSourceType === 'remote') { - await this.getOptionsList(n.optionSourceValue).then(res => { - n.options = res + if (type !== 'edit') { + itemList.forEach(async item => { + if (item.optionSourceType === 'remote') { + await this.getOptionsList(item.optionSourceValue).then(res => { + item.options = res }) } }) - }) + groupList.forEach(item => { + item.itemList.forEach(async n => { + n.tableName = item.tableName + if (n.optionSourceType === 'remote') { + await this.getOptionsList(n.optionSourceValue).then(res => { + n.options = res + }) + } + }) + }) + } this.formList = itemList this.tabsList = groupList }