[update] 参数模板

This commit is contained in:
zhaomeijing
2022-06-10 10:20:54 +08:00
parent ffa94947cd
commit 6b3d3f9f8e
2 changed files with 28 additions and 14 deletions
@@ -162,11 +162,6 @@ export default {
align: 'center',
dataIndex: 'description'
},
{
title: this.$t('status'),
align: 'center',
dataIndex: 'state_dictText'
},
{
title: this.$t('createTime'),
align: 'center',
@@ -162,7 +162,7 @@
:title="$t('controlType')">{{$t('controlType')}}</span>
</div>
<a-form-model-item class="itemModel" prop="controlType">
<a-select :placeholder="$t('PleaseSelect')+$t('controlType')" v-model="formInline.controlType">
<a-select :placeholder="$t('PleaseSelect')+$t('controlType')" allowClear v-model="formInline.controlType" @change='onSelectChange'>
<a-select-option v-for="(item, key) in controlType" :key="key" :value="item.value">
<span style="display: inline-block;width: 100%" :title=" item.label ">
{{ item.label }}
@@ -173,13 +173,13 @@
</div>
</a-col>
<!-- 控件校验-->
<a-col :span="12" v-if='formInline.controlType =="1" || formInline.controlType =="5" || formInline.controlType =="6" || formInline.controlType =="7" || formInline.controlType =="10"'>
<a-col :span="12" v-if='SelectChangelabel'>
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('controlVerification')">{{$t('controlVerification')}}</span>
</div>
<a-form-model-item class="itemModel" prop="technologyTerritory">
<a-select :placeholder="$t('PleaseSelect')+$t('controlVerification')" v-model="formInline.controlVerify">
<a-form-model-item class="itemModel" prop="controlVerify">
<a-select :placeholder="$t('PleaseSelect')+$t('controlVerification')" 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 }}
@@ -191,8 +191,8 @@
</a-col>
</a-row>
<!-- 控件备选值-->
<a-row :gutter="24" v-if='formInline.controlType =="2" || formInline.controlType =="3" || formInline.controlType =="5" || formInline.controlType =="6" || formInline.controlType =="8" || formInline.controlType =="9" || formInline.controlType =="10"'>
<a-col :span="12">
<a-row :gutter="24">
<a-col :span="12" v-if='inputChangelabel'>
<div class="box-title-text">
<div class="title-text">
<span class="Required">*</span>
@@ -209,7 +209,7 @@
</div>
</a-col>
<!-- 附件模板-->
<a-col :span="12" v-if='formInline.controlType =="4" || formInline.controlType =="7" || formInline.controlType =="8" || formInline.controlType =="9" || formInline.controlType =="10"'>
<a-col :span="12" v-if='buttonChangelabel'>
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
@@ -229,7 +229,6 @@
<a-col :span="24" >
<a-tabs>
<a-tab-pane v-for='(item,index) in contentList' :tab="item.textVal" :key="index + 1">
<!-- <a-form-model :model="formInline" class="formAdd" :rules="rulesItem" ref="ruleFormItem" key='ruleFormItem'>-->
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
@@ -397,7 +396,10 @@ export default {
title: '',
stateOne: '',
contentList : [],
contentListed: [] // 编辑 contentList 所带出来的数据
contentListed: [], // 编辑 contentList 所带出来的数据
SelectChangelabel: false, // 控件校验
inputChangelabel: false, // 控件备选值校验
buttonChangelabel: false, // 模板校验
}
},
mounted() {
@@ -405,6 +407,23 @@ export default {
this.getSysCategoryTree()
},
methods: {
onSelectChange() {
if(this.formInline.controlType =="1" || this.formInline.controlType =="5" || this.formInline.controlType =="6" || this.formInline.controlType =="7" || this.formInline.controlType =="10") {
this.SelectChangelabel = true
} else {
this.SelectChangelabel = false
}
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") {
this.inputChangelabel = true
} else {
this.inputChangelabel = false
}
if(this.formInline.controlType =="4" || this.formInline.controlType =="7" || this.formInline.controlType =="8" || this.formInline.controlType =="9" || this.formInline.controlType =="10") {
this.buttonChangelabel = true
} else {
this.buttonChangelabel = false
}
},
uploadSuccess(data) {
let attIdList = []
if (data && data.length > 0) {