[update 解读流程] 字段长度优先以数据库字段为准

This commit is contained in:
danshihao
2024-09-27 16:46:17 +08:00
parent dd2a9a8392
commit 69cecaf3e9
@@ -32,13 +32,13 @@
<!--相对上一版变化点说明-->
<a-form-item :label="$t('workCenter.standardInterpretationProcess.explanationOfChangePoints')" :colon="false">
<a-input :placeholder="$t('pleaseEnter') + $t('workCenter.standardInterpretationProcess.explanationOfChangePoints')"
:maxLength="500"
:max-length="formFieldsLength.changeDescription || 2000"
:disabled="disabled"
v-decorator="['changeDescription']" />
</a-form-item>
<!--法规注解-->
<a-form-item :label="$t('workCenter.standardInterpretationProcess.regulatoryAnnotations')" :colon="false">
<a-input :max-length="1000"
<a-input :max-length="formFieldsLength.regulatoryNotes || 1000"
:disabled="disabled"
:placeholder="$t('pleaseEnter')+$t('workCenter.standardInterpretationProcess.regulatoryAnnotations')"
v-decorator="['regulatoryNotes']"/>
@@ -175,56 +175,56 @@
</a-form-item>
<!--技术规范/设计指南-->
<a-form-item :label="$t('workCenter.standardInterpretationProcess.technicalSpecificationsDesignGuidelines')" :colon="false">
<a-input :max-length="500"
<a-input :max-length="formFieldsLength.technicalSpecificationDesignGuide || 500"
:disabled="disabled"
:placeholder="$t('pleaseEnter')+$t('workCenter.standardInterpretationProcess.technicalSpecificationsDesignGuidelines')"
v-decorator="['technicalSpecificationDesignGuide']"/>
</a-form-item>
<!--图纸模板-->
<a-form-item :label="$t('workCenter.standardInterpretationProcess.drawingTemplate')" :colon="false">
<a-input :max-length="500"
<a-input :max-length="formFieldsLength.drawingTemplate || 500"
:disabled="disabled"
:placeholder="$t('pleaseEnter')+$t('workCenter.standardInterpretationProcess.drawingTemplate')"
v-decorator="['drawingTemplate']"/>
</a-form-item>
<!--技术协议模板-->
<a-form-item :label="$t('workCenter.standardInterpretationProcess.technicalAgreementTemplate')" :colon="false">
<a-input :max-length="500"
<a-input :max-length="formFieldsLength.technicalAgreementTemplate || 2000"
:disabled="disabled"
:placeholder="$t('pleaseEnter')+$t('workCenter.standardInterpretationProcess.technicalAgreementTemplate')"
v-decorator="['technicalAgreementTemplate']"/>
</a-form-item>
<!--校核报告模板/checklist-->
<a-form-item :label="$t('workCenter.standardInterpretationProcess.verificationReportTemplate')" :colon="false">
<a-input :max-length="500"
<a-input :max-length="formFieldsLength.verificationReportTemplateChecklist || 2000"
:disabled="disabled"
:placeholder="$t('pleaseEnter')+$t('workCenter.standardInterpretationProcess.verificationReportTemplate')"
v-decorator="['verificationReportTemplateChecklist']"/>
</a-form-item>
<!--DVP模板-->
<a-form-item :label="$t('workCenter.standardInterpretationProcess.dvpTemplate')" :colon="false">
<a-input :max-length="500"
<a-input :max-length="formFieldsLength.dvpTemplate || 2000"
:disabled="disabled"
:placeholder="$t('pleaseEnter')+$t('workCenter.standardInterpretationProcess.dvpTemplate')"
v-decorator="['dvpTemplate']"/>
</a-form-item>
<!--DFEMA-->
<a-form-item :label="$t('workCenter.standardInterpretationProcess.dfema')" :colon="false">
<a-input :max-length="500"
<a-input :max-length="formFieldsLength.dfema || 500"
:disabled="disabled"
:placeholder="$t('pleaseEnter')+$t('workCenter.standardInterpretationProcess.dfema')"
v-decorator="['dfema']"/>
</a-form-item>
<!--关键技术分解表-->
<a-form-item :label="$t('workCenter.standardInterpretationProcess.specialListTemplate')" :colon="false">
<a-input :max-length="500"
<a-input :max-length="formFieldsLength.keyTechnologyDecompositionTable || 500"
:disabled="disabled"
:placeholder="$t('pleaseEnter')+$t('workCenter.standardInterpretationProcess.specialListTemplate')"
v-decorator="['keyTechnologyDecompositionTable']"/>
</a-form-item>
<!--其他文件或模板-->
<a-form-item :label="$t('workCenter.standardInterpretationProcess.otherFilesOrTemplates')" :colon="false">
<a-input :max-length="500"
<a-input :max-length="formFieldsLength.otherDocumentsTemplates || 500"
:disabled="disabled"
:placeholder="$t('pleaseEnter')+$t('workCenter.standardInterpretationProcess.otherFilesOrTemplates')"
v-decorator="['otherDocumentsTemplates']"/>
@@ -239,14 +239,14 @@
</a-form-item>
<!--P3证明符合性的交付物名称-->
<a-form-item :label="$t('workCenter.standardInterpretationProcess.pThree')" :colon="false">
<a-input :max-length="500"
<a-input :max-length="formFieldsLength.p3 || 500"
:disabled="disabled"
:placeholder="$t('pleaseEnter')+$t('workCenter.standardInterpretationProcess.pThree')"
v-decorator="['p3']"/>
</a-form-item>
<!--P5证明符合性的交付物名称-->
<a-form-item :label="$t('workCenter.standardInterpretationProcess.pFive')" :colon="false">
<a-input :max-length="500"
<a-input :max-length="formFieldsLength.p5 || 500"
:disabled="disabled"
:placeholder="$t('pleaseEnter')+$t('workCenter.standardInterpretationProcess.pFive')"
v-decorator="['p5']"/>
@@ -254,7 +254,7 @@
<!--备注-->
<a-form-item :label="$t('workCenter.standardInterpretationProcess.notes')" :colon="false">
<a-textarea :placeholder="$t('pleaseEnter') + $t('workCenter.standardInterpretationProcess.notes')"
:maxLength="500"
:max-length="formFieldsLength.remarks || 500"
:rows="4"
:disabled="disabled"
v-decorator="['remarks']" />
@@ -278,6 +278,7 @@ import STreeSelect from '@comp/STreeSelect'
import { getFormDictTreeList } from '@api/api'
import { findNodeByField } from '@/utils/util'
import TreeDataSelection from '@comp/selection/TreeDataSelection'
import { getDocSplitEditForm } from '@api/documentToolApi'
export default {
name: 'InterpretationClauseTableModal',
components: { TreeDataSelection, STreeSelect, StandardSelection, JMultipleDatePicker },
@@ -300,9 +301,27 @@ export default {
sm: { span: 20 }
},
// 专业领域下拉
professionalFieldTreeList: []
professionalFieldTreeList: [],
// 表单的字段长度
formFieldsLength: {}
}
},
mounted () {
// 下划线转换成小驼峰
function toCamelCase (str) {
return str.replace(/_([a-z])/g, (match, letter) => letter.toUpperCase())
}
getDocSplitEditForm().then(res => {
if (res.success) {
const formModelList = res.result || []
const obj = {}
formModelList.forEach(item => {
obj[toCamelCase(item.dbFieldName)] = item.dbLength
})
this.formFieldsLength = obj
}
})
},
methods: {
add () {
this.edit()