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