From 7821fde0a9fb95e2dccba205a87706288f57d237 Mon Sep 17 00:00:00 2001
From: lideqin <694785430@qq.com>
Date: Tue, 26 Sep 2023 10:14:31 +0800
Subject: [PATCH] =?UTF-8?q?[update]=20=E8=81=94=E8=B0=83=E4=BC=81=E6=A0=87?=
=?UTF-8?q?=E6=96=B0=E5=A2=9E=E7=BC=96=E8=BE=91=E5=92=8C=E8=AF=A6=E6=83=85?=
=?UTF-8?q?=E7=9A=84=E7=A8=BD=E6=9F=A5=E5=86=85=E5=AE=B9?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
---
src/components/customField/AddForm.vue | 3 ++-
.../standard/detail/EnterpriseStandardDetail.vue | 7 ++++---
.../standard/modules/CheckContentModal.vue | 11 ++++++-----
.../standard/modules/EnterpriseStandardModal.vue | 11 +++++++----
4 files changed, 19 insertions(+), 13 deletions(-)
diff --git a/src/components/customField/AddForm.vue b/src/components/customField/AddForm.vue
index 062c6c34..550db550 100644
--- a/src/components/customField/AddForm.vue
+++ b/src/components/customField/AddForm.vue
@@ -376,7 +376,7 @@ export default {
this.$forceUpdate()
this.getForm()
},
- edit (item) {
+ edit (item, callback) {
this.loading = true
this.getForm(() => {
if (!this.getDocumentInfoFunc || typeof this.getDocumentInfoFunc !== 'function') {
@@ -390,6 +390,7 @@ export default {
const formList = Object.values(this.dataList).reduce((acc, cur) => acc.concat(cur), [])
const treeMultipleField = formList.filter(tt => tt.fieldShowType === FieldType.TREE.value)
this.formInline = res.result
+ callback && callback(this.formInline)
treeMultipleField.forEach(field => {
const valueArr = []
if (this.formInline[field.dbFieldName]) {
diff --git a/src/views/enterpriseStandardLibrary/standard/detail/EnterpriseStandardDetail.vue b/src/views/enterpriseStandardLibrary/standard/detail/EnterpriseStandardDetail.vue
index af556d88..30f66453 100644
--- a/src/views/enterpriseStandardLibrary/standard/detail/EnterpriseStandardDetail.vue
+++ b/src/views/enterpriseStandardLibrary/standard/detail/EnterpriseStandardDetail.vue
@@ -84,7 +84,7 @@
稽查内容
-
+
{
if (res.success) {
this.detailData = res.result
+ this.dataSource = this.detailData.checkList
this.fileField.forEach(item => {
if (this.detailData[item]) {
const fileList = this.detailData[item].split(',')
diff --git a/src/views/enterpriseStandardLibrary/standard/modules/CheckContentModal.vue b/src/views/enterpriseStandardLibrary/standard/modules/CheckContentModal.vue
index 95431508..576234d2 100644
--- a/src/views/enterpriseStandardLibrary/standard/modules/CheckContentModal.vue
+++ b/src/views/enterpriseStandardLibrary/standard/modules/CheckContentModal.vue
@@ -20,12 +20,12 @@
+ v-decorator.trim="[ 'clause', validatorRules.clause ]" />
+ v-decorator.trim="[ 'requirement', validatorRules.requirement ]" />
@@ -58,13 +58,13 @@ export default {
sm: { span: 16 }
},
validatorRules: {
- subjectToClause: {
+ clause: {
rules: [
{ required: true, message: this.$t('pleaseEnter') + this.$t('enterpriseStandardLibrary.standard.subjectToClause') }
],
validateTrigger: 'blur'
},
- standardContentOrRequirements: {
+ requirement: {
rules: [
{ required: true, message: this.$t('pleaseEnter') + this.$t('enterpriseStandardLibrary.standard.standardContentOrRequirements') }
],
@@ -92,7 +92,7 @@ export default {
this.form.resetFields()
this.model = Object.assign({}, record)
this.$nextTick(() => {
- this.form.setFieldsValue(pick(this.model, 'subjectToClause', 'standardContentOrRequirements'))
+ this.form.setFieldsValue(pick(this.model, 'clause', 'requirement'))
})
},
getFileInfo (fileId) {
@@ -115,6 +115,7 @@ export default {
close () {
this.visible = false
this.model = {}
+ this.index = undefined
},
handleCancel () {
this.close()
diff --git a/src/views/enterpriseStandardLibrary/standard/modules/EnterpriseStandardModal.vue b/src/views/enterpriseStandardLibrary/standard/modules/EnterpriseStandardModal.vue
index d46c1f93..82fc2399 100644
--- a/src/views/enterpriseStandardLibrary/standard/modules/EnterpriseStandardModal.vue
+++ b/src/views/enterpriseStandardLibrary/standard/modules/EnterpriseStandardModal.vue
@@ -87,14 +87,14 @@ export default {
title: this.$t('enterpriseStandardLibrary.standard.subjectToClause'),
align: 'center',
width: 180,
- dataIndex: 'subjectToClause',
+ dataIndex: 'clause',
scopedSlots: { customRender: 'text' }
},
{
title: this.$t('enterpriseStandardLibrary.standard.standardContentOrRequirements'),
align: 'center',
width: 180,
- dataIndex: 'standardContentOrRequirements',
+ dataIndex: 'requirement',
scopedSlots: { customRender: 'text' }
},
{
@@ -124,7 +124,9 @@ export default {
this.visible = true
this.type = 'edit'
this.$nextTick(() => {
- this.$refs.addForm.edit(record)
+ this.$refs.addForm.edit(record, (res) => {
+ this.dataSource = res.checkList
+ })
})
},
// 稽查内容的添加
@@ -175,7 +177,7 @@ export default {
url = this.url.add
}
const param = Object.assign({}, formInline)
- // param.checkList = this.dataSource
+ param.checkList = this.dataSource
postAction(url, param).then((res) => {
if (res.success) {
this.$message.success(this.$t('operationSuccessful'))
@@ -193,6 +195,7 @@ export default {
},
close () {
this.visible = false
+ this.dataSource = []
this.$refs.addForm.clearValidate()
}
}