[add] 参数模板列表

This commit is contained in:
zhaomeijing
2022-04-27 16:15:32 +08:00
parent ca6150f30c
commit 00f0f76862
4 changed files with 252 additions and 7 deletions
@@ -33,8 +33,8 @@
<a-form-model-item class="itemModel" prop="state">
<a-select :placeholder="$t('PleaseSelect')+$t('Required')">
<a-select-option v-for="(item, key) in isRequired" :key="key" :value="item.value">
<span style="display: inline-block;width: 100%" :title=" item.text || item.label ">
{{ item.text || item.label }}
<span style="display: inline-block;width: 100%" :title=" item.label ">
{{ item.label }}
</span>
</a-select-option>
</a-select>
@@ -76,6 +76,192 @@
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('parameterBatch')">{{$t('parameterBatch')}}</span>
</div>
<a-form-model-item class="itemModel" prop="paramsTemplateName">
<j-dict-select-tag class="box-input" v-model="formInline.state"
:disabled="disabled"
:placeholder="$t('PleaseSelect')+$t('parameterBatch')"
:type="'select'"
:triggerChange="false" :dictCode="'params_batch'"/>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text" :title="$t('areaOfResponsibility')">{{$t('areaOfResponsibility')}}</span>
</div>
<a-form-model-item class="itemModel" prop="technologyTerritory">
<j-dict-select-tag class="box-input" v-model="formInline.state"
:disabled="disabled"
:placeholder="$t('PleaseSelect')+$t('areaOfResponsibility')"
:type="'select'"
:triggerChange="false" :dictCode="'duty_territory'"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('ParameterDescription')">{{$t('ParameterDescription')}}</span>
</div>
<a-form-model-item class="itemModel" prop="paramsTemplateName">
<a-input class="box-input"
:disabled="disabled"
v-model="formInline.paramsTemplateName"
:placeholder="$t('PleaseEnter')+$t('ParameterDescription')"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('ParameterName')">{{$t('certificationCategory')}}</span>
</div>
<a-form-model-item class="itemModel" prop="paramsTemplateName">
<j-multi-select-tag class="box-input" v-model="stateOne"
@change='Onchange'
v-on:changelabel='Onchangelabel'
:disabled="disabled"
:placeholder="$t('PleaseSelect')+$t('certificationCategory')"
:type="'checkbox'"
:triggerChange="false" :dictCode="'cert_category'"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('controlType')">{{$t('controlType')}}</span>
</div>
<a-form-model-item class="itemModel" prop="paramsTemplateName">
<a-select :placeholder="$t('PleaseSelect')+$t('controlType')">
<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 }}
</span>
</a-select-option>
</a-select>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<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')">
<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 }}
</span>
</a-select-option>
</a-select>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('controlAlternatives')">{{$t('controlAlternatives')}}</span>
</div>
<a-form-model-item class="itemModel" prop="paramsTemplateName">
<a-input class="box-input"
:disabled="disabled"
v-model="formInline.paramsTemplateName"
:placeholder="$t('PleaseEnter')+$t('controlAlternatives')"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('attachmentTemplate')">{{$t('attachmentTemplate')}}</span>
</div>
<a-form-model-item class="itemModel" prop="paramsTemplateName">
<a-input class="box-input"
:disabled="disabled"
v-model="formInline.paramsTemplateName"
:placeholder="$t('PleaseEnter')+$t('attachmentTemplate')"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="24">
<a-tabs default-active-key="1">
<a-tab-pane v-for='(item,index) in tabCertificationCategory' :key='index' key="1" :tab="item.text">
<a-row :gutter="24">
<a-col :span="12">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('controlType')">{{$t('controlType')}}</span>
</div>
<a-form-model-item class="itemModel" prop="paramsTemplateName">
<a-input class="box-input"
:disabled="disabled"
v-model="formInline.paramsTemplateName"
:placeholder="$t('PleaseEnter')+$t('NiONumber')"/>
</a-form-model-item>
</div>
</a-col>
<a-col :span="12">
<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-input class="box-input"
:disabled="disabled"
v-model="formInline.paramsTemplateName"
:placeholder="$t('PleaseEnter')+$t('NiONumber')"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
<a-row :gutter="24">
<a-col :span="24">
<div class="box-title-text">
<div class="title-text">
<span class="title-text-text"
:title="$t('controlType')">{{$t('controlType')}}</span>
</div>
<a-form-model-item class="itemModel" prop="paramsTemplateName">
<a-input class="box-input"
:disabled="disabled"
v-model="formInline.paramsTemplateName"
:placeholder="$t('PleaseEnter')+$t('NiONumber')"/>
</a-form-model-item>
</div>
</a-col>
</a-row>
</a-tab-pane>
</a-tabs>
</a-col>
</a-row>
</a-form-model>
</a-spin>
<div class="drawer-bootom-button">
@@ -96,11 +282,35 @@ export default {
props: ['url'],
data() {
return {
isRequired: [
isRequired: [ // 是否必填
{value:1, label: '是' },
{value:0, label: '否' }
],
CategoryTreeList: [],
controlType: [ // 控件类型
{value:1, label: '文本' },
{value:2, label: '下拉单选' },
{value:3, label: '下拉多选' },
{value:4, label: '附件' },
{value:5, label: '文本+下拉单选' },
{value:6, label: '文本+下拉多选' },
{value:7, label: '文本+附件' },
{value:8, label: '下拉单选+附件' },
{value:9, label: '下拉多选+附件' },
{value:10, label: '文本+下拉单选+附件' },
],
controlVerification: [ // 控件校验
{value:1, label: '无' },
{value:2, label: '中文' },
{value:3, label: '正整数' },
{value:4, label: '正浮点数' },
{value:5, label: '整数或小数' },
{value:6, label: '一位小数' },
{value:7, label: '两位小数' },
{value:8, label: '三位小数' },
{value:9, label: '四位小数' },
],
CategoryTreeList: [], // 技术领域
tabCertificationCategory: [], // 认证类别得tab栏
formInline: {},
confirmLoading: false,
visible: false,
@@ -126,7 +336,8 @@ export default {
},
disabled: false,
projectNameList: [],
title: ''
title: '',
stateOne: ''
}
},
mounted() {
@@ -134,6 +345,21 @@ export default {
this.getSysCategoryTree()
},
methods: {
Onchangelabel(val) {
console.log(val,'val。。。')
if(val.length > 0) {
this.tabCertificationCategory = val
} else {
this.tabCertificationCategory = []
console.log(this.tabCertificationCategory,'this.tabCertificationCategorythis.tabCertificationCategory')
}
},
Onchange() {
},
callback() {
},
getSysCategoryTree() {
getAction('/sys/category/getSysCategoryTree', {}).then((res) => {
if (res.success) {