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() } }