修改参数模版添加问题

This commit is contained in:
gaosong
2023-12-13 16:24:42 +08:00
parent 981fb5af3e
commit eac1e31c68
@@ -15,15 +15,15 @@
<a-col :span="12"> <a-col :span="12">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="Required" v-if="!disabled">*</span> <span class="Required" v-if="!disabled">*</span>
<span class="title-text-text" <span class="title-text-text"
:title="$t('NNiONumber')">{{$t('NNiONumber')}}</span> :title="$t('NNiONumber')">{{ $t('NNiONumber') }}</span>
</div> </div>
<a-form-model-item class="itemModel" prop="nioNumber"> <a-form-model-item class="itemModel" prop="nioNumber">
<a-input class="box-input" <a-input class="box-input"
:disabled="disabled" :disabled="disabled"
v-model.trim="formInline.nioNumber" v-model.trim="formInline.nioNumber"
:placeholder="$t('PleaseEnter')+$t('NNiONumber')"/> :placeholder="$t('PleaseEnter')+$t('NNiONumber')" />
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
@@ -31,14 +31,14 @@
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="Required" v-if="!disabled">*</span> <span class="Required" v-if="!disabled">*</span>
<span class="title-text-text" :title="$t('NRequired')">{{$t('NRequired')}}</span> <span class="title-text-text" :title="$t('NRequired')">{{ $t('NRequired') }}</span>
</div> </div>
<a-form-model-item class="itemModel" prop="isMust"> <a-form-model-item class="itemModel" prop="isMust">
<a-select allowClear :disabled="disabled" <a-select allowClear :disabled="disabled"
:placeholder="$t('PleaseSelect')+$t('NRequired')" v-model='formInline.isMust'> :placeholder="$t('PleaseSelect')+$t('NRequired')" v-model="formInline.isMust">
<a-select-option :key="'1'" :value="'1'">{{$t('yes')}} <a-select-option :key="'1'" :value="'1'">{{ $t('yes') }}
</a-select-option> </a-select-option>
<a-select-option :key="'0'" :value="'0'">{{$t('notOnlyRz')}} <a-select-option :key="'0'" :value="'0'">{{ $t('notOnlyRz') }}
</a-select-option> </a-select-option>
</a-select> </a-select>
</a-form-model-item> </a-form-model-item>
@@ -49,51 +49,52 @@
<a-col :span="12"> <a-col :span="12">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="Required" v-if="!disabled">*</span> <span class="Required" v-if="!disabled">*</span>
<span class="title-text-text" <span class="title-text-text"
:title="$t('Paraname')">{{$t('Paraname')}}</span> :title="$t('Paraname')">{{ $t('Paraname') }}</span>
</div> </div>
<a-form-model-item class="itemModel" prop="paramsName"> <a-form-model-item class="itemModel" prop="paramsName">
<a-input class="box-input" <a-input class="box-input"
:disabled="disabled" :disabled="disabled"
v-model.trim="formInline.paramsName" v-model.trim="formInline.paramsName"
:placeholder="$t('PleaseEnter')+$t('Paraname')"/> :placeholder="$t('PleaseEnter')+$t('Paraname')" />
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
<!-- <a-col :span="12">--> <!-- <a-col :span="12">-->
<!-- <div class="box-title-text">--> <!-- <div class="box-title-text">-->
<!-- <div class="title-text">--> <!-- <div class="title-text">-->
<!-- <span class="Required">*</span>--> <!-- <span class="Required">*</span>-->
<!-- <span class="title-text-text" :title="$t('NtechnicalField')">{{$t('NtechnicalField')}}</span>--> <!-- <span class="title-text-text" :title="$t('NtechnicalField')">{{$t('NtechnicalField')}}</span>-->
<!-- </div>--> <!-- </div>-->
<!-- <a-form-model-item class="itemModel" prop="technologyTerritory">--> <!-- <a-form-model-item class="itemModel" prop="technologyTerritory">-->
<!-- <a-tree-select--> <!-- <a-tree-select-->
<!-- tree-node-filter-prop="title"--> <!-- tree-node-filter-prop="title"-->
<!-- v-model="formInline.technologyTerritory"--> <!-- v-model="formInline.technologyTerritory"-->
<!-- :maxTagCount="1"--> <!-- :maxTagCount="1"-->
<!-- class="box-input"--> <!-- class="box-input"-->
<!-- :getPopupContainer="triggerNode=> triggerNode.parentNode"--> <!-- :getPopupContainer="triggerNode=> triggerNode.parentNode"-->
<!-- style="width: 100%"--> <!-- style="width: 100%"-->
<!-- :tree-data="CategoryTreeList"--> <!-- :tree-data="CategoryTreeList"-->
<!-- tree-checkable--> <!-- tree-checkable-->
<!-- :placeholder="$t('PleaseSelect')+$t('NtechnicalField')"--> <!-- :placeholder="$t('PleaseSelect')+$t('NtechnicalField')"-->
<!-- />--> <!-- />-->
<!-- </a-form-model-item>--> <!-- </a-form-model-item>-->
<!-- </div>--> <!-- </div>-->
<!-- </a-col>--> <!-- </a-col>-->
<a-col :span="12"> <a-col :span="12">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="Required" v-if="!disabled">*</span> <span class="Required" v-if="!disabled">*</span>
<span class="title-text-text" :title="$t('NareaOfResponsibility')">{{$t('NareaOfResponsibility')}}</span> <span class="title-text-text"
:title="$t('NareaOfResponsibility')">{{ $t('NareaOfResponsibility') }}</span>
</div> </div>
<a-form-model-item class="itemModel" prop="dutyTerritory"> <a-form-model-item class="itemModel" prop="dutyTerritory">
<j-dict-select-tag class="box-input" v-model="formInline.dutyTerritory" <j-dict-select-tag class="box-input" v-model="formInline.dutyTerritory"
:disabled="disabled" :disabled="disabled"
:placeholder="$t('PleaseSelect')+$t('NareaOfResponsibility')" :placeholder="$t('PleaseSelect')+$t('NareaOfResponsibility')"
:type="'select'" :type="'select'"
:triggerChange="false" :dictCode="'duty_territory'"/> :triggerChange="false" :dictCode="'duty_territory'" />
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
@@ -102,16 +103,16 @@
<a-col :span="12"> <a-col :span="12">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="Required" v-if="!disabled">*</span> <span class="Required" v-if="!disabled">*</span>
<span class="title-text-text" <span class="title-text-text"
:title="$t('Parabatch')">{{$t('Parabatch')}}</span> :title="$t('Parabatch')">{{ $t('Parabatch') }}</span>
</div> </div>
<a-form-model-item class="itemModel" prop="paramsBatch"> <a-form-model-item class="itemModel" prop="paramsBatch">
<j-dict-select-tag class="box-input" v-model="formInline.paramsBatch" <j-dict-select-tag class="box-input" v-model="formInline.paramsBatch"
:disabled="disabled" :disabled="disabled"
:placeholder="$t('PleaseSelect')+$t('Parabatch')" :placeholder="$t('PleaseSelect')+$t('Parabatch')"
:type="'select'" :type="'select'"
:triggerChange="false" :dictCode="'params_batch'"/> :triggerChange="false" :dictCode="'params_batch'" />
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
@@ -122,47 +123,47 @@
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="title-text-text" <span class="title-text-text"
:title="$t('NParameterDescription')">{{$t('NParameterDescription')}}</span> :title="$t('NParameterDescription')">{{ $t('NParameterDescription') }}</span>
</div> </div>
<a-form-model-item class="itemModel-text" prop="description"> <a-form-model-item class="itemModel-text" prop="description">
<a-input class="box-input add-input" <a-input class="box-input add-input"
style='height: 95px; width: 100%' style="height: 95px; width: 100%"
type="textarea" type="textarea"
:disabled="disabled" :disabled="disabled"
v-model.trim="formInline.description" v-model.trim="formInline.description"
:placeholder="$t('PleaseEnter')+$t('NParameterDescription')"/> :placeholder="$t('PleaseEnter')+$t('NParameterDescription')" />
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
<!-- v-if='required'--> <!-- v-if='required'-->
<a-row :gutter="24" > <a-row :gutter="24">
<a-col :span="24"> <a-col :span="24">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="Required" v-if="!disabled">*</span> <span class="Required" v-if="!disabled">*</span>
<span class="title-text-text" <span class="title-text-text"
:title="$t('NcertificationCategory')">{{$t('NcertificationCategory')}}</span> :title="$t('NcertificationCategory')">{{ $t('NcertificationCategory') }}</span>
</div> </div>
<a-form-model-item class="itemModel-multi" prop="certCategory"> <a-form-model-item class="itemModel-multi" prop="certCategory">
<j-multi-select-tag-only-rz class="box-input" v-model="formInline.certCategory" <j-multi-select-tag-only-rz class="box-input" v-model="formInline.certCategory"
@change='Onchange' @change="Onchange"
v-on:changelabel='Onchangelabel' v-on:changelabel="Onchangelabel"
:disabled="disabled" :disabled="disabled"
:placeholder="$t('PleaseSelect')+$t('NcertificationCategory')" :placeholder="$t('PleaseSelect')+$t('NcertificationCategory')"
:type="'checkbox'" :type="'checkbox'"
:triggerChange="false" :dictCode="'cert_category'"/> :triggerChange="false" :dictCode="'cert_category'" />
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
<a-row :gutter="24" style='margin-top: 5px'> <a-row :gutter="24" style="margin-top: 5px">
<a-col :span="12"> <a-col :span="12">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="Required" v-if="!disabled">*</span> <span class="Required" v-if="!disabled">*</span>
<span class="title-text-text" <span class="title-text-text"
:title="$t('NcontrolType')">{{$t('NcontrolType')}}</span> :title="$t('NcontrolType')">{{ $t('NcontrolType') }}</span>
</div> </div>
<a-form-model-item class="itemModel" prop="controlType"> <a-form-model-item class="itemModel" prop="controlType">
<a-select :placeholder="$t('PleaseSelect')+$t('NcontrolType')" <a-select :placeholder="$t('PleaseSelect')+$t('NcontrolType')"
@@ -178,16 +179,19 @@
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
<!-- 控件校验--> <!-- 控件校验-->
<a-col :span="12" v-if='this.formInline.controlType =="1" || this.formInline.controlType =="5" || this.formInline.controlType =="6" || this.formInline.controlType =="7" || this.formInline.controlType =="10"'> <a-col :span="12"
v-if='this.formInline.controlType =="1" || this.formInline.controlType =="5" || this.formInline.controlType =="6" || this.formInline.controlType =="7" || this.formInline.controlType =="10"'>
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="Required" v-if="!disabled">*</span> <span class="Required" v-if="!disabled">*</span>
<span class="title-text-text" :title="$t('NcontrolVerification')">{{$t('NcontrolVerification')}}</span> <span class="title-text-text"
:title="$t('NcontrolVerification')">{{ $t('NcontrolVerification') }}</span>
</div> </div>
<a-form-model-item class="itemModel" prop="controlVerify"> <a-form-model-item class="itemModel" prop="controlVerify">
<a-select :disabled="disabled" <a-select :disabled="disabled"
:placeholder="$t('PleaseSelect')+$t('NcontrolVerification')" allowClear v-model="formInline.controlVerify"> :placeholder="$t('PleaseSelect')+$t('NcontrolVerification')" allowClear
v-model="formInline.controlVerify">
<a-select-option v-for="(item, key) in controlVerification" :key="key" :value="item.value"> <a-select-option v-for="(item, key) in controlVerification" :key="key" :value="item.value">
<span style="display: inline-block;width: 100%" :title=" item.label "> <span style="display: inline-block;width: 100%" :title=" item.label ">
{{ item.label }} {{ item.label }}
@@ -202,7 +206,7 @@
<div class="title-text"> <div class="title-text">
<span class="Required" v-if="!disabled">*</span> <span class="Required" v-if="!disabled">*</span>
<span class="title-text-text" <span class="title-text-text"
:title="$t('DefaultValue')">{{$t('DefaultValue')}}</span> :title="$t('DefaultValue')">{{ $t('DefaultValue') }}</span>
</div> </div>
<a-form-model-item class="itemModel" prop="titleDefaultValue"> <a-form-model-item class="itemModel" prop="titleDefaultValue">
<a-input class="box-input" <a-input class="box-input"
@@ -210,19 +214,20 @@
:disabled="disabled" :disabled="disabled"
:maxlength="100" :maxlength="100"
v-model="formInline.titleDefaultValue" v-model="formInline.titleDefaultValue"
:placeholder="$t('PleaseEnter')+$t('DefaultValue')"/> :placeholder="$t('PleaseEnter')+$t('DefaultValue')" />
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
<!-- 控件备选值--> <!-- 控件备选值-->
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :span="12" v-if='this.formInline.controlType =="2" || this.formInline.controlType =="3" || this.formInline.controlType =="5" || this.formInline.controlType =="6" || this.formInline.controlType =="8" || this.formInline.controlType =="9" || this.formInline.controlType =="10"'> <a-col :span="12"
v-if='this.formInline.controlType =="2" || this.formInline.controlType =="3" || this.formInline.controlType =="5" || this.formInline.controlType =="6" || this.formInline.controlType =="8" || this.formInline.controlType =="9" || this.formInline.controlType =="10"'>
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="Required" v-if="!disabled">*</span> <span class="Required" v-if="!disabled">*</span>
<span class="title-text-text" <span class="title-text-text"
:title="$t('NcontrolAlternatives')">{{$t('NcontrolAlternatives')}}</span> :title="$t('NcontrolAlternatives')">{{ $t('NcontrolAlternatives') }}</span>
</div> </div>
<a-form-model-item class="itemModel" prop="controlValues"> <a-form-model-item class="itemModel" prop="controlValues">
<a-input class="box-input add-input" <a-input class="box-input add-input"
@@ -230,47 +235,49 @@
type="textarea" type="textarea"
@input="onInput" @input="onInput"
v-model.trim="formInline.controlValues" v-model.trim="formInline.controlValues"
:placeholder="$t('PleaseEnter')+$t('NcontrolAlternatives')"/> :placeholder="$t('PleaseEnter')+$t('NcontrolAlternatives')" />
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
<!-- 附件模板--> <!-- 附件模板-->
<a-col :span="12" v-if='this.formInline.controlType =="4" || this.formInline.controlType =="7" || this.formInline.controlType =="8" || this.formInline.controlType =="9" || this.formInline.controlType =="10"'> <a-col :span="12"
v-if='this.formInline.controlType =="4" || this.formInline.controlType =="7" || this.formInline.controlType =="8" || this.formInline.controlType =="9" || this.formInline.controlType =="10"'>
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="title-text-text" <span class="title-text-text"
:title="$t('NattachmentTemplate')">{{$t('NattachmentTemplate')}}</span> :title="$t('NattachmentTemplate')">{{ $t('NattachmentTemplate') }}</span>
</div> </div>
<a-form-model-item class="itemModel" prop="paramsTemplateName"> <a-form-model-item class="itemModel" prop="paramsTemplateName">
<a-button type="primary" class="button-text" <a-button type="primary" class="button-text"
@click="clickButtonToUpload('fileTemplateConnectId')"> @click="clickButtonToUpload('fileTemplateConnectId')">
{{ (formInline.fileTemplateConnectId === 'null' || formInline.fileTemplateConnectId === '' || {{ (formInline.fileTemplateConnectId === 'null' || formInline.fileTemplateConnectId === '' ||
formInline.fileTemplateConnectId == null) ? $t('clickUpload') : $t('viewUploadedFiles')}} formInline.fileTemplateConnectId == null) ? $t('clickUpload') : $t('viewUploadedFiles') }}
</a-button> </a-button>
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
<!-- v-if='required'--> <!-- v-if='required'-->
<a-row :gutter="24" > <a-row :gutter="24">
<a-col :span="24" > <a-col :span="24">
<a-tabs> <a-tabs>
<a-tab-pane v-for='(item,index) in contentList' :tab="item.cut == 'cn' ? item.text : item.textEn" :key="index + 1"> <a-tab-pane v-for="(item,index) in contentList" :tab="item.cut == 'cn' ? item.text : item.textEn"
:key="index + 1">
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :span="12"> <a-col :span="12">
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="Required" v-if="!disabled">*</span> <span class="Required" v-if="!disabled">*</span>
<span class="title-text-text" <span class="title-text-text"
:title="$t('ParameterNo')">{{$t('ParameterNo')}}</span> :title="$t('ParameterNo')">{{ $t('ParameterNo') }}</span>
</div> </div>
<a-form-model-item class="itemModel"> <a-form-model-item class="itemModel">
<a-input class="box-input" <a-input class="box-input"
:disabled="disabled" :disabled="disabled"
v-model.trim="item.paramsNumber" v-model.trim="item.paramsNumber"
:placeholder="$t('PleaseEnter')+$t('ParameterNo')"/> :placeholder="$t('PleaseEnter')+$t('ParameterNo')" />
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
@@ -278,13 +285,13 @@
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="Required" v-if="!disabled">*</span> <span class="Required" v-if="!disabled">*</span>
<span class="title-text-text" :title="$t('NParameterName')">{{$t('NParameterName')}}</span> <span class="title-text-text" :title="$t('NParameterName')">{{ $t('NParameterName') }}</span>
</div> </div>
<a-form-model-item class="itemModel"> <a-form-model-item class="itemModel">
<a-input class="box-input" <a-input class="box-input"
:disabled="disabled" :disabled="disabled"
v-model.trim="item.paramsName" v-model.trim="item.paramsName"
:placeholder="$t('PleaseEnter')+$t('NParameterName')"/> :placeholder="$t('PleaseEnter')+$t('NParameterName')" />
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
@@ -294,21 +301,21 @@
<div class="box-title-text"> <div class="box-title-text">
<div class="title-text"> <div class="title-text">
<span class="title-text-text" <span class="title-text-text"
:title="$t('NParameterDescription')">{{$t('NParameterDescription')}}</span> :title="$t('NParameterDescription')">{{ $t('NParameterDescription') }}</span>
</div> </div>
<a-form-model-item class="itemModel"> <a-form-model-item class="itemModel">
<a-input class="box-input add-input" <a-input class="box-input add-input"
style='height: 95px; width: 100%' style="height: 95px; width: 100%"
:disabled="disabled" :disabled="disabled"
type="textarea" type="textarea"
:maxLength="1000" :maxLength="1000"
v-model="item.description" v-model="item.description"
:placeholder="$t('PleaseEnter')+$t('NParameterDescription')"/> :placeholder="$t('PleaseEnter')+$t('NParameterDescription')" />
</a-form-model-item> </a-form-model-item>
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
<!-- </a-form-model>--> <!-- </a-form-model>-->
</a-tab-pane> </a-tab-pane>
</a-tabs> </a-tabs>
</a-col> </a-col>
@@ -316,8 +323,9 @@
</a-form-model> </a-form-model>
</a-spin> </a-spin>
<div class="drawer-bootom-button"> <div class="drawer-bootom-button">
<a-button style="margin-right: 8px" @click="handleCancel">{{$t('cancel')}}</a-button> <a-button style="margin-right: 8px" @click="handleCancel">{{ $t('cancel') }}</a-button>
<a-button @click="handleSubmit" type="primary" v-if="!disabled" :loading="confirmLoading">{{$t('submit')}}</a-button> <a-button @click="handleSubmit" type="primary" v-if="!disabled" :loading="confirmLoading">{{ $t('submit') }}
</a-button>
</div> </div>
</a-drawer> </a-drawer>
<uploadFileChange :isParameter="true" ref="uploadFile" @uploadSuccess="uploadSuccess"></uploadFileChange> <uploadFileChange :isParameter="true" ref="uploadFile" @uploadSuccess="uploadSuccess"></uploadFileChange>
@@ -328,6 +336,7 @@
import PersonnelSelection from '@/components/PersonnelSelection/index' import PersonnelSelection from '@/components/PersonnelSelection/index'
import { getAction, postAction, downloadFile, putAction } from '@/api/manage' import { getAction, postAction, downloadFile, putAction } from '@/api/manage'
import uploadFileChange from '@/components/uploadFileChange/file' import uploadFileChange from '@/components/uploadFileChange/file'
export default { export default {
name: 'addModel', name: 'addModel',
components: { components: {
@@ -335,11 +344,11 @@ export default {
PersonnelSelection PersonnelSelection
}, },
props: { props: {
url: { url: {
type: Object, type: Object,
default: {}, default: {},
require: true require: true
}, },
certCategoryParamsInfoEOListItem: { certCategoryParamsInfoEOListItem: {
type: Array, type: Array,
default: [], default: [],
@@ -349,39 +358,39 @@ export default {
data() { data() {
return { return {
controlType: [ // 控件类型 controlType: [ // 控件类型
{value:'1', label: this.$t('Ntext') }, { value: '1', label: this.$t('Ntext') },
{value:'2', label: this.$t('NDropdownradio') }, { value: '2', label: this.$t('NDropdownradio') },
{value:'3', label: this.$t('NDropdownmultipleselection') }, { value: '3', label: this.$t('NDropdownmultipleselection') },
{value:'4', label: this.$t('Nenclosure') }, { value: '4', label: this.$t('Nenclosure') },
{value:'5', label: this.$t('Atext') }, { value: '5', label: this.$t('Atext') },
{value:'6', label: this.$t('Btext') }, { value: '6', label: this.$t('Btext') },
{value:'7', label: this.$t('Ctext') }, { value: '7', label: this.$t('Ctext') },
{value:'8', label: this.$t('Dtext') }, { value: '8', label: this.$t('Dtext') },
{value:'9', label: this.$t('Etext') }, { value: '9', label: this.$t('Etext') },
{value:'10', label: this.$t('Ftext') }, { value: '10', label: this.$t('Ftext') },
{value:'11', label: this.$t('Gtext') }, { value: '11', label: this.$t('Gtext') }
], ],
controlVerification: [ // 控件校验 controlVerification: [ // 控件校验
{value:'1', label: this.$t('Nnothing') }, { value: '1', label: this.$t('Nnothing') },
{value:'2', label: this.$t('Nchinese') }, { value: '2', label: this.$t('Nchinese') },
{value:'3', label: this.$t('NpositiveInteger') }, { value: '3', label: this.$t('NpositiveInteger') },
{value:'4', label: this.$t('NPositivefloatingpointnumber') }, { value: '4', label: this.$t('NPositivefloatingpointnumber') },
{value:'5', label: this.$t('NintegerOrDecimal')}, { value: '5', label: this.$t('NintegerOrDecimal') },
{value:'6', label: this.$t('NOneDecimalPlace') }, { value: '6', label: this.$t('NOneDecimalPlace') },
{value:'7', label: this.$t('NTwoDecimalplaces') }, { value: '7', label: this.$t('NTwoDecimalplaces') },
{value:'8', label: this.$t('NThreedecimalplaces') }, { value: '8', label: this.$t('NThreedecimalplaces') },
{value:'9', label: this.$t('NFourDecimalplaces') }, { value: '9', label: this.$t('NFourDecimalplaces') }
], ],
CategoryTreeList: [], // 技术领域 CategoryTreeList: [], // 技术领域
certCategoryParamsInfoEOList: [], // 认证类别得tab栏 certCategoryParamsInfoEOList: [], // 认证类别得tab栏
formInline: {}, formInline: {},
confirmLoading: false, confirmLoading: false,
required:true, required: true,
visible: false, visible: false,
rules: { rules: {
nioNumber:[ nioNumber: [
{ required: true, message: this.$t('PleaseEnter')+this.$t('NiONumber'), trigger: 'blur' }, { required: true, message: this.$t('PleaseEnter') + this.$t('NiONumber'), trigger: 'blur' },
{ min:1, max: 20, message: this.$t('cantExeed')+'20'+this.$t('characters'), trigger: 'blur' }, { min: 1, max: 20, message: this.$t('cantExeed') + '20' + this.$t('characters'), trigger: 'blur' },
{ {
pattern: /^[0-9a-zA-Z-/ ]{1,}$/, pattern: /^[0-9a-zA-Z-/ ]{1,}$/,
message: this.$t('onlyThree'), message: this.$t('onlyThree'),
@@ -392,57 +401,57 @@ export default {
// { required: true, message: this.$t('pleaseSelect')+this.$t('certificationCategory'), type: 'array', trigger: 'change' }, // { required: true, message: this.$t('pleaseSelect')+this.$t('certificationCategory'), type: 'array', trigger: 'change' },
], ],
isMust: [ isMust: [
{ required: true, message: this.$t('PleaseEnter')+this.$t('Required'), trigger: 'change' }, { required: true, message: this.$t('PleaseEnter') + this.$t('Required'), trigger: 'change' }
], ],
paramsName: [ paramsName: [
{ required: true, message: this.$t('pleaseSelect')+this.$t('Paraname'), trigger: 'blur' }, { required: true, message: this.$t('pleaseSelect') + this.$t('Paraname'), trigger: 'blur' },
{ min:1, max: 500, message: this.$t('cantExeed')+'500'+this.$t('characters'), trigger: 'blur' }, { min: 1, max: 500, message: this.$t('cantExeed') + '500' + this.$t('characters'), trigger: 'blur' }
], ],
technologyTerritory: [ technologyTerritory: [
{ required: true, message: this.$t('pleaseSelect')+this.$t('technicalField'), trigger: 'change' }, { required: true, message: this.$t('pleaseSelect') + this.$t('technicalField'), trigger: 'change' }
], ],
paramsBatch: [ paramsBatch: [
{ required: true, message: this.$t('PleaseSelect')+this.$t('parameterBatch'), trigger: 'change' }, { required: true, message: this.$t('PleaseSelect') + this.$t('parameterBatch'), trigger: 'change' }
], ],
dutyTerritory: [ dutyTerritory: [
{ required: true, message: this.$t('PleaseSelect')+this.$t('areaOfResponsibility'), trigger: 'change' }, { required: true, message: this.$t('PleaseSelect') + this.$t('areaOfResponsibility'), trigger: 'change' }
], ],
description: [ description: [
{ min:1, max: 2000, message: this.$t('cantExeed')+'2000'+this.$t('characters'), trigger: 'blur' }, { min: 1, max: 2000, message: this.$t('cantExeed') + '2000' + this.$t('characters'), trigger: 'blur' }
], ],
controlType: [ controlType: [
{ required: true, message: this.$t('pleaseSelect')+this.$t('controlType'), trigger: 'change' }, { required: true, message: this.$t('pleaseSelect') + this.$t('controlType'), trigger: 'change' }
], ],
controlVerify: [ controlVerify: [
{ required: true, message: this.$t('PleaseEnter')+this.$t('controlVerification'), trigger: 'change' }, { required: true, message: this.$t('PleaseEnter') + this.$t('controlVerification'), trigger: 'change' }
], ],
controlValues: [ controlValues: [
{ required: true, message: this.$t('PleaseEnter')+this.$t('controlAlternatives'), trigger: 'blur' }, { required: true, message: this.$t('PleaseEnter') + this.$t('controlAlternatives'), trigger: 'blur' },
{ min:1, max: 500, message: this.$t('cantExeed')+'500'+this.$t('characters'), trigger: 'blur' }, { min: 1, max: 500, message: this.$t('cantExeed') + '500' + this.$t('characters'), trigger: 'blur' },
{ validator: this.test } { validator: this.test }
], ],
titleDefaultValue: [ titleDefaultValue: [
{ required: true, message: this.$t('PleaseEnter')+this.$t('DefaultValue'), trigger: 'blur' }, { required: true, message: this.$t('PleaseEnter') + this.$t('DefaultValue'), trigger: 'blur' },
{ min:1, max: 100, message: this.$t('cantExeed')+'100'+this.$t('characters'), trigger: 'blur' }, { min: 1, max: 100, message: this.$t('cantExeed') + '100' + this.$t('characters'), trigger: 'blur' }
], ]
}, },
rulesItem: { rulesItem: {
paramsNumber: [ paramsNumber: [
{ required: true, message: this.$t('PleaseEnter')+this.$t('standard'), trigger: 'change' } { required: true, message: this.$t('PleaseEnter') + this.$t('standard'), trigger: 'change' }
] ]
}, },
disabled: false, disabled: false,
projectNameList: [], projectNameList: [],
title: '', title: '',
cut:'', cut: '',
stateOne: '', stateOne: '',
contentList : [], contentList: [],
contentListed: [], // 编辑 contentList 所带出来的数据 contentListed: [], // 编辑 contentList 所带出来的数据
SelectChangelabel: false, // 控件校验 SelectChangelabel: false, // 控件校验
inputChangelabel: false, // 控件备选值校验 inputChangelabel: false, // 控件备选值校验
buttonChangelabel: false, // 模板校验 buttonChangelabel: false, // 模板校验
contentListStart: [], // 认证类别编辑 contentListStart: [], // 认证类别编辑
flag: 1, // 判断师新增,编辑 默认新增 flag: 1 // 判断师新增,编辑 默认新增
} }
}, },
mounted() { mounted() {
@@ -466,7 +475,7 @@ export default {
} }
}, },
getcontentListedEdit() { getcontentListedEdit() {
getAction('sys/dict/getDictItems/cert_category', { }).then((res) => { getAction('sys/dict/getDictItems/cert_category', {}).then((res) => {
if (res.success) { if (res.success) {
let tt = [] let tt = []
res.result.forEach((item) => { res.result.forEach((item) => {
@@ -474,17 +483,17 @@ export default {
certCategory: item.value, certCategory: item.value,
paramsNumber: item.paramsNumber, // 编号 paramsNumber: item.paramsNumber, // 编号
paramsName: item.paramsName, //参数名称 paramsName: item.paramsName, //参数名称
description: item.description, // 描述 description: item.description // 描述
} }
tt.push(Object.assign(obj,item)) tt.push(Object.assign(obj, item))
}) })
this.contentListStart = tt this.contentListStart = tt
console.log(this.contentListStart) console.log(this.contentListStart)
} }
}) })
}, },
controlTypeChange(value){ controlTypeChange(value) {
this.$refs.ruleForm.clearValidate(['controlVerify','titleDefaultValue','controlValues']) this.$refs.ruleForm.clearValidate(['controlVerify', 'titleDefaultValue', 'controlValues'])
// if(value == 11){ // if(value == 11){
// this.required = false // this.required = false
// }else { // }else {
@@ -515,20 +524,20 @@ export default {
}, },
Onchangelabel(val) { Onchangelabel(val) {
let _tt = [] let _tt = []
if(this.flag == 1) { if (this.flag == 1) {
if(this.cut == 'cn'){ if (this.cut == 'cn') {
this.contentListStart.forEach((itemVal) => { this.contentListStart.forEach((itemVal) => {
val.forEach((item) => { val.forEach((item) => {
if(itemVal.value === item.value) { if (itemVal.value === item.value) {
itemVal.cut = 'cn' itemVal.cut = 'cn'
_tt.push(itemVal) _tt.push(itemVal)
} }
}) })
}) })
}else { } else {
this.contentListStart.forEach((itemVal) => { this.contentListStart.forEach((itemVal) => {
val.forEach((item) => { val.forEach((item) => {
if(itemVal.value === item.value) { if (itemVal.value === item.value) {
itemVal.cut = 'en' itemVal.cut = 'en'
_tt.push(itemVal) _tt.push(itemVal)
} }
@@ -540,10 +549,10 @@ export default {
} else { } else {
let _mm = [] let _mm = []
if(this.cut == 'cn'){ if (this.cut == 'cn') {
this.contentListStart.forEach((itemVal) => { this.contentListStart.forEach((itemVal) => {
val.forEach((item) => { val.forEach((item) => {
if(itemVal.value === item.value) { if (itemVal.value === item.value) {
itemVal.cut = 'cn' itemVal.cut = 'cn'
_mm.push(itemVal) _mm.push(itemVal)
} }
@@ -552,20 +561,20 @@ export default {
_mm.forEach((item) => { _mm.forEach((item) => {
this.contentListed.forEach((itemVal) => { this.contentListed.forEach((itemVal) => {
// 原编辑的数据 // 原编辑的数据
if(itemVal.certCategory === item.value) { if (itemVal.certCategory === item.value) {
item.textVal= itemVal.textVal, item.textVal = itemVal.textVal,
item.certCategory= itemVal.certCategory, item.certCategory = itemVal.certCategory,
item.paramsNumber= itemVal.paramsNumber, // 编号 item.paramsNumber = itemVal.paramsNumber, // 编号
item.paramsName= itemVal.paramsName, //参数名称 item.paramsName = itemVal.paramsName, //参数名称
item.cut= itemVal.cut, //中英文标识 item.cut = itemVal.cut, //中英文标识
item.description= itemVal.description // 描述 item.description = itemVal.description // 描述
} }
}) })
}) })
}else { } else {
this.contentListStart.forEach((itemVal) => { this.contentListStart.forEach((itemVal) => {
val.forEach((item) => { val.forEach((item) => {
if(itemVal.value === item.value) { if (itemVal.value === item.value) {
itemVal.cut = 'en' itemVal.cut = 'en'
_mm.push(itemVal) _mm.push(itemVal)
} }
@@ -574,13 +583,13 @@ export default {
_mm.forEach((item) => { _mm.forEach((item) => {
this.contentListed.forEach((itemVal) => { this.contentListed.forEach((itemVal) => {
// 原编辑的数据 // 原编辑的数据
if(itemVal.certCategory === item.value) { if (itemVal.certCategory === item.value) {
item.textVal= itemVal.textVal, item.textVal = itemVal.textVal,
item.certCategory= itemVal.certCategory, item.certCategory = itemVal.certCategory,
item.paramsNumber= itemVal.paramsNumber, // 编号 item.paramsNumber = itemVal.paramsNumber, // 编号
item.paramsName= itemVal.paramsName, //参数名称 item.paramsName = itemVal.paramsName, //参数名称
item.cut= itemVal.cut, //中英文标识 item.cut = itemVal.cut, //中英文标识
item.description= itemVal.description // 描述 item.description = itemVal.description // 描述
} }
}) })
}) })
@@ -594,23 +603,24 @@ export default {
let arr = [] let arr = []
let newArray = [] let newArray = []
this.arr = [] this.arr = []
this.contentListStart.forEach((item,index) => { this.contentListStart.forEach((item, index) => {
this.arr.push(item.certCategory) this.arr.push(item.certCategory)
}) })
console.log(this.arr) console.log(this.arr)
this.tabList = val.split(',') this.tabList = val.split(',')
this.arr.forEach(item => { this.arr.forEach(item => {
if (!this.tabList.includes(item)) { if (!this.tabList.includes(item)) {
newArray.push(item); newArray.push(item)
this.contentList.forEach((item1,index1) => { this.contentList.forEach((item1, index1) => {
if(item == item1.certCategory){ if (item == item1.certCategory) {
item1.paramsNumber= '', // 编号 item1.paramsNumber = '', // 编号
item1.paramsName= '', //参数名称 item1.paramsName = '', //参数名称
item1.description= '' // 描述 item1.description = '' // 描述
} }
}) })
console.log(this.contentList) console.log(this.contentList)
}; }
}) })
}, },
@@ -618,7 +628,7 @@ export default {
let value = r.target.value let value = r.target.value
r.target.value = value.replace(/[!#]/g, '') r.target.value = value.replace(/[!#]/g, '')
this.formInline.controlValues = r.target.value this.formInline.controlValues = r.target.value
this.formInline = {...this.formInline} this.formInline = { ...this.formInline }
}, },
getSysCategoryTree() { getSysCategoryTree() {
getAction('/sys/category/getSysCategoryTree', {}).then((res) => { getAction('/sys/category/getSysCategoryTree', {}).then((res) => {
@@ -647,7 +657,7 @@ export default {
// 获取认证类别 // 获取认证类别
this.getcontentListedEdit() this.getcontentListedEdit()
this.formInline.isMust = '0' this.formInline.isMust = '0'
this.formInline = {...this.formInline} this.formInline = { ...this.formInline }
this.contentListed = [] // 防止编辑数据带出 this.contentListed = [] // 防止编辑数据带出
this.contentList = [] this.contentList = []
this.$nextTick(() => { this.$nextTick(() => {
@@ -674,19 +684,19 @@ export default {
this.flag = 0 this.flag = 0
// 获取认证类别 // 获取认证类别
this.getcontentListedEdit() this.getcontentListedEdit()
value.certCategoryParamsInfoEOList.map((item, index) => { value.certCategoryParamsInfoEOList.map((item, index) => {
if(this.cut == 'cn'){ if (this.cut == 'cn') {
item.cut = 'cn' item.cut = 'cn'
this.contentListed.push(item) this.contentListed.push(item)
item.text = item.certCategory_dictText item.text = item.certCategory_dictText
}else { } else {
item.cut = 'en' item.cut = 'en'
this.contentListed.push(item) this.contentListed.push(item)
item.textEn = item.certCategory_dictText item.textEn = item.certCategory_dictText
} }
}) })
this.contentList = this.contentListed this.contentList = this.contentListed
console.log(this.contentList) console.log(this.contentList)
}, },
viewModel(value) { viewModel(value) {
@@ -710,11 +720,11 @@ export default {
// 获取认证类别 // 获取认证类别
this.getcontentListedEdit() this.getcontentListedEdit()
value.certCategoryParamsInfoEOList.map((item, index) => { value.certCategoryParamsInfoEOList.map((item, index) => {
if(this.cut == 'cn'){ if (this.cut == 'cn') {
item.cut = 'cn' item.cut = 'cn'
this.contentListed.push(item) this.contentListed.push(item)
item.text = item.certCategory_dictText item.text = item.certCategory_dictText
}else { } else {
item.cut = 'en' item.cut = 'en'
this.contentListed.push(item) this.contentListed.push(item)
item.textEn = item.certCategory_dictText item.textEn = item.certCategory_dictText
@@ -729,49 +739,49 @@ export default {
this.$refs['ruleForm'].resetFields() this.$refs['ruleForm'].resetFields()
}, },
handleSubmit() { handleSubmit() {
// && this.formInline.controlType != 11 // && this.formInline.controlType != 11
if(this.formInline.certCategory == undefined ) { if (this.formInline.certCategory == undefined) {
this.$message.warning(this.$t('certificationCategory')+this.$t('cannotEmpty')) this.$message.warning(this.$t('certificationCategory') + this.$t('cannotEmpty'))
return return
} }
let falg = 1 let falg = 1
this.contentList.forEach((item,index) => { this.contentList.forEach((item, index) => {
let reg = /^[0-9a-zA-Z-/. ]{1,}$/ let reg = /^[0-9a-zA-Z-/. ]{1,}$/
// 编号的限制 // 编号的限制
if(item.paramsNumber == '' || item.paramsNumber === undefined ) { if (item.paramsNumber == '' || item.paramsNumber === undefined) {
this.$message.warning(this.$t('standard')+this.$t('cannotEmpty')) this.$message.warning(this.$t('standard') + this.$t('cannotEmpty'))
falg = 0 falg = 0
return return
} else if(item.paramsNumber.length > 20){ } else if (item.paramsNumber.length > 20) {
this.$message.warning(this.$t('standard')+this.$t('cantExeed')+'20'+this.$t('Characters')) this.$message.warning(this.$t('standard') + this.$t('cantExeed') + '20' + this.$t('Characters'))
falg = 0 falg = 0
return return
} else if(item.paramsNumber.match(reg) === null) { } else if (item.paramsNumber.match(reg) === null) {
this.$message.warning(this.$t('standard')+this.$t('onlyThree')) this.$message.warning(this.$t('standard') + this.$t('onlyThree'))
falg = 0
return
}
// 参数名称的限制
if (item.paramsNumber == '' || item.paramsNumber === undefined) {
this.$message.warning(this.$t('ParameterName') + this.$t('cannotEmpty'))
falg = 0
return
} else if (item.paramsName.length > 500) {
this.$message.warning(this.$t('ParameterName') + this.$t('cantExeed') + '500' + this.$t('Characters'))
falg = 0
return
}
if (item.description !== undefined && item.description !== null) {
// 参数说明的限制
if (item.description.length > 2000) {
this.$message.warning(this.$t('ParameterDescription') + this.$t('cantExeed') + '2000' + this.$t('Characters'))
falg = 0 falg = 0
return return
} }
// 参数名称的限制 }
if(item.paramsNumber == '' || item.paramsNumber === undefined) { })
this.$message.warning(this.$t('ParameterName')+this.$t('cannotEmpty'))
falg = 0
return
} else if(item.paramsName.length > 500){
this.$message.warning(this.$t('ParameterName')+this.$t('cantExeed')+'500'+this.$t('Characters'))
falg = 0
return
}
if(item.description !== undefined && item.description !== null){
// 参数说明的限制
if(item.description.length > 2000){
this.$message.warning(this.$t('ParameterDescription')+this.$t('cantExeed')+'2000'+this.$t('Characters'))
falg = 0
return
}
}
})
if(falg === 1) { if (falg === 1) {
this.$refs.ruleForm.validate(valid => { this.$refs.ruleForm.validate(valid => {
if (valid) { if (valid) {
let url = '' let url = ''
@@ -791,6 +801,11 @@ export default {
} }
}) })
let querycontentList = JSON.parse(JSON.stringify(this.contentList)) let querycontentList = JSON.parse(JSON.stringify(this.contentList))
if (querycontentList && querycontentList.length > 0) {
for (let i = 0; i < querycontentList.length; i++) {
delete querycontentList[i].id
}
}
query.certCategoryParamsInfoEOList = querycontentList query.certCategoryParamsInfoEOList = querycontentList
// if(this.formInline.controlType == 11){ // if(this.formInline.controlType == 11){
// query.certCategoryParamsInfoEOList = [] // query.certCategoryParamsInfoEOList = []
@@ -824,8 +839,8 @@ export default {
this.formInline[value] = id this.formInline[value] = id
this.formInline = { ...this.formInline } this.formInline = { ...this.formInline }
}, },
projectNameChange(value){ projectNameChange(value) {
}, }
} }
} }
</script> </script>
@@ -833,9 +848,11 @@ export default {
.formAdd .ant-form-item-label { .formAdd .ant-form-item-label {
width: 130px; width: 130px;
} }
/deep/.add-input{
min-height: 95px!important; /deep/ .add-input {
min-height: 95px !important;
} }
.formAdd .ant-form-item-control-wrapper { .formAdd .ant-form-item-control-wrapper {
display: inline-block; display: inline-block;
width: 100%; width: 100%;
@@ -886,9 +903,11 @@ export default {
display: flex; display: flex;
/*align-items: center;*/ /*align-items: center;*/
} }
/deep/.ant-form-item-control {
/deep/ .ant-form-item-control {
line-height: 10px; line-height: 10px;
} }
.title-text { .title-text {
width: 114px; width: 114px;
text-align: right; text-align: right;
@@ -908,11 +927,13 @@ export default {
height: 38px; height: 38px;
width: 100%; width: 100%;
} }
.itemModel-text { .itemModel-text {
width: calc(100% - 130px); width: calc(100% - 130px);
display: inline-block; display: inline-block;
margin-top: 2px; margin-top: 2px;
} }
.itemModel { .itemModel {
width: calc(100% - 130px); width: calc(100% - 130px);
display: inline-block; display: inline-block;
@@ -938,7 +959,7 @@ export default {
position: absolute; position: absolute;
bottom: 0; bottom: 0;
width: 100%; width: 100%;
z-index:100; z-index: 100;
border-top: 1px solid #e8e8e8; border-top: 1px solid #e8e8e8;
padding: 10px 16px; padding: 10px 16px;
text-align: right; text-align: right;
@@ -951,7 +972,8 @@ export default {
.ant-input-disabled { .ant-input-disabled {
color: rgba(0, 0, 0, 0.65) !important; color: rgba(0, 0, 0, 0.65) !important;
} }
.ant-select-disabled{
.ant-select-disabled {
color: rgba(0, 0, 0, 0.65) !important; color: rgba(0, 0, 0, 0.65) !important;
} }
</style> </style>