From 2eafb3a179ec5a27f20fefac476167be3e213c55 Mon Sep 17 00:00:00 2001 From: lideqin <694785430@qq.com> Date: Tue, 19 Sep 2023 17:35:16 +0800 Subject: [PATCH] =?UTF-8?q?[update]=20=E6=96=B0=E5=A2=9E=E8=A1=A8=E5=8D=95?= =?UTF-8?q?=E7=BC=96=E8=BE=91=E6=97=B6=E5=AD=97=E5=85=B8=E5=9B=9E=E6=98=BE?= =?UTF-8?q?=E9=97=AE=E9=A2=98=EF=BC=8C=E6=A0=87=E5=87=86=E9=80=89=E6=8B=A9?= =?UTF-8?q?=E4=BC=A0source=EF=BC=8C=E4=BC=81=E6=A0=87=E8=AF=A6=E6=83=85?= =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/customField/AddForm.vue | 17 ++++++++------ .../selection/StandardSelectionModal.vue | 7 +++++- .../standard/EnterpriseStandardList.vue | 6 ++--- .../detail/EnterpriseStandardDetail.vue | 23 +++++++++++++++---- .../modules/EnterpriseStandardModal.vue | 10 ++++---- 5 files changed, 42 insertions(+), 21 deletions(-) diff --git a/src/components/customField/AddForm.vue b/src/components/customField/AddForm.vue index 43c2b354..fdd3bcee 100644 --- a/src/components/customField/AddForm.vue +++ b/src/components/customField/AddForm.vue @@ -35,7 +35,7 @@ v-model="formInline[item.dbFieldName]" :filedName="item.dbFieldName" @nameChange="userSelectNameChange" - :nameStr="formInline[item.dbFieldName + '_name']" + :nameStr="formInline[item.dbFieldName + '_dictText']" type="radio" :disabled="disabled || disabledFieldList.includes(item.dbFieldName)" /> @@ -104,6 +104,7 @@ - +
@@ -372,7 +373,8 @@ export default { this.loading = false return } - this.getDocumentInfoFunc({ id: item.id }).then((res) => { + // type标识是新增表单还是详情页 + this.getDocumentInfoFunc({ id: item.id, type: this.type }).then((res) => { if (res.success) { // 处理树结构多选回显 const formList = Object.values(this.dataList).reduce((acc, cur) => acc.concat(cur), []) @@ -390,6 +392,10 @@ export default { this.formInline[field.dbFieldName] = valueArr } }) + const dictField = formList.filter(tt => tt.fieldShowType === FieldType.OPTION_SINGLE.value) + dictField.forEach(field => { + this.formInline[field.dbFieldName] = this.formInline[field.dbFieldName] || null + }) this.loading = false } else { this.loading = false @@ -455,7 +461,6 @@ export default { rules[res.dbFieldName] = rule } }) - console.log(rules) this.rules = rules this.isFormInline = true this.confirmLoading = false @@ -508,7 +513,7 @@ export default { }, // 选择用户得到用户名 userSelectNameChange (value, fieldName) { - this.formInline[fieldName + '_name'] = value + this.formInline[fieldName + '_dictText'] = value }, submit () { this.$refs.ruleForm.validate(valid => { @@ -539,8 +544,6 @@ export default {