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 1/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=B1=85=E6=B0=91?= =?UTF-8?q?=E4=BF=A1=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 } From 6e0f9885d65d38d2224324418a9541e0d1a5baeb Mon Sep 17 00:00:00 2001 From: 13176889840 <13176889840@163.com> Date: Wed, 3 Nov 2021 16:50:37 +0800 Subject: [PATCH 2/6] =?UTF-8?q?=E5=AE=8C=E5=96=84=E5=B1=85=E6=B0=91?= =?UTF-8?q?=E4=BF=A1=E6=81=AF444?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/components/editResi.vue | 1 + src/views/components/resiSearch.vue | 1 + src/views/modules/base/resi.vue | 18 ++++++++++++------ 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/src/views/components/editResi.vue b/src/views/components/editResi.vue index 6909034a..0170b276 100644 --- a/src/views/components/editResi.vue +++ b/src/views/components/editResi.vue @@ -569,6 +569,7 @@ export default { // console.log('handlerMuscForm----000', this.$refs['baseForms' + item.row || item][0].handleForm()) arr.push([ ...this.$refs['baseForms' + item.row][0].handleForm() ]) }) + if (arr.length === 0) return arr let arr2 = arr.reduce(function (a, b) { return a.concat(b) }) let hash = {} let i = 0 diff --git a/src/views/components/resiSearch.vue b/src/views/components/resiSearch.vue index 2a0bf6aa..f4c5b830 100644 --- a/src/views/components/resiSearch.vue +++ b/src/views/components/resiSearch.vue @@ -516,6 +516,7 @@ export default { margin-bottom: 20px; } .resi-search { + padding-right: 140px; .el-col { text-align: right; } diff --git a/src/views/modules/base/resi.vue b/src/views/modules/base/resi.vue index 7793c065..55b0e6df 100644 --- a/src/views/modules/base/resi.vue +++ b/src/views/modules/base/resi.vue @@ -85,7 +85,7 @@
取消 - 提交 + 提交
@@ -111,7 +111,7 @@
取消 - 提交 + 提交
@@ -130,6 +130,7 @@ export default { }, data () { return { + btnLoading: false, disabled: false, pageLoading: false, dialogEditVisible: false, @@ -400,8 +401,9 @@ export default { }) this.dialogVisible = false }, - submitAdd (arr) { - this.$http + async submitAdd (arr) { + this.btnLoading = true + await this.$http .post('/epmetuser/icresiuser/add', arr) .then(({ data: res }) => { if (res.code !== 0) { @@ -420,12 +422,15 @@ export default { .catch(() => { return this.$message.error('网络错误') }) + this.btnLoading = false }, - submitEdit (arr) { - this.$http + async submitEdit (arr) { + this.btnLoading = true + await this.$http .post('/epmetuser/icresiuser/edit', arr) .then(({ data: res }) => { if (res.code !== 0) { + return this.$message.error(res.msg) } else { this.$message.success('提交成功') @@ -441,6 +446,7 @@ export default { .catch(() => { return this.$message.error('网络错误') }) + this.btnLoading = false }, getTableHeader () { this.$http From 26edc30f444bae085ebeea6a75bc5843a420928d Mon Sep 17 00:00:00 2001 From: 13176889840 <13176889840@163.com> Date: Wed, 3 Nov 2021 16:55:30 +0800 Subject: [PATCH 3/6] =?UTF-8?q?=E5=AE=8C=E5=96=84=E5=B1=85=E6=B0=91?= =?UTF-8?q?=E4=BF=A1=E6=81=AF555?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/base/resi.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/modules/base/resi.vue b/src/views/modules/base/resi.vue index 55b0e6df..1e4571c4 100644 --- a/src/views/modules/base/resi.vue +++ b/src/views/modules/base/resi.vue @@ -25,7 +25,7 @@ :prop="item.columnName" :label="item.label" align="center" - width="180"> + :width="item.itemType === 'radio' ? 80 : 180"> From 2d53279d11bc950d81c543e2d90a138b551413df Mon Sep 17 00:00:00 2001 From: 13176889840 <13176889840@163.com> Date: Wed, 3 Nov 2021 16:58:42 +0800 Subject: [PATCH 4/6] =?UTF-8?q?=E5=B1=85=E6=B0=91=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E5=AE=8C=E5=96=84666?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/modules/base/resi.vue | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/views/modules/base/resi.vue b/src/views/modules/base/resi.vue index 1e4571c4..97833f12 100644 --- a/src/views/modules/base/resi.vue +++ b/src/views/modules/base/resi.vue @@ -11,6 +11,7 @@ @@ -130,6 +131,7 @@ export default { }, data () { return { + tableLoading: false, btnLoading: false, disabled: false, pageLoading: false, @@ -462,14 +464,15 @@ export default { return this.$message.error('网络错误') }) }, - getTableData () { + async getTableData () { + this.tableLoading = true let params = { formCode: 'resi_base_info', pageNo: this.currentPage, pageSize: this.pageSize, conditions: this.conditions } - this.$http + await this.$http .post('/epmetuser/icresiuser/listresi', params) .then(({ data: res }) => { if (res.code !== 0) { @@ -482,6 +485,7 @@ export default { .catch(() => { return this.$message.error('网络错误') }) + this.tableLoading = false }, getrowInfo (id) { let params = { From 7fe43a49fe731e35dc5573fe57035c1949b1659e Mon Sep 17 00:00:00 2001 From: 13176889840 <13176889840@163.com> Date: Thu, 4 Nov 2021 13:44:16 +0800 Subject: [PATCH 5/6] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=B1=85=E6=B0=91?= =?UTF-8?q?=E4=BF=A1=E6=81=AF=E6=9F=A5=E8=AF=A2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/views/components/editResi.vue | 38 +++++++++++++------------- src/views/components/resiForm.vue | 40 ++++++++++++++-------------- src/views/components/resiSearch.vue | 41 +++++++++-------------------- 3 files changed, 51 insertions(+), 68 deletions(-) diff --git a/src/views/components/editResi.vue b/src/views/components/editResi.vue index 0170b276..e213ffaa 100644 --- a/src/views/components/editResi.vue +++ b/src/views/components/editResi.vue @@ -18,7 +18,7 @@
-
- - - -
-
- - @@ -210,7 +210,7 @@ clearable> -->