封装新增组件
This commit is contained in:
@@ -38,13 +38,25 @@
|
|||||||
<span :class="{'title-text-text':false}">{{item.enName}}</span><br>
|
<span :class="{'title-text-text':false}">{{item.enName}}</span><br>
|
||||||
<span :class="{'title-text-text':false}">{{item.name}}</span>
|
<span :class="{'title-text-text':false}">{{item.name}}</span>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="itemModel" :prop="item.name">
|
<a-form-model-item class="itemModel" :prop="item.attrModel">
|
||||||
<a-date-picker class="box-input" v-model="formInline[item.attrModel]" @change="onChange"
|
<a-date-picker class="box-input" v-model="formInline[item.attrModel]" @change="onChange"
|
||||||
style="width: 100%"/>
|
style="width: 100%"/>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
|
||||||
|
<a-col :span="12" v-else-if="item.type === 'NUMBER'">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<span class="Required">*</span>
|
||||||
|
<span :class="{'title-text-text':false}">{{item.enName}}</span><br>
|
||||||
|
<span :class="{'title-text-text':false}">{{item.name}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" :prop="item.attrModel">
|
||||||
|
<a-input-number class="box-input" v-model="formInline[item.attrModel]" :min="1" :max="99999999" @change="onChange" />
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
<a-col :span="12" v-else-if="item.type === 'SELECT'">
|
<a-col :span="12" v-else-if="item.type === 'SELECT'">
|
||||||
<div class="box-title-text">
|
<div class="box-title-text">
|
||||||
<div class="title-text">
|
<div class="title-text">
|
||||||
@@ -52,7 +64,7 @@
|
|||||||
<span :class="{'title-text-text':false}">{{item.enName}}</span><br>
|
<span :class="{'title-text-text':false}">{{item.enName}}</span><br>
|
||||||
<span :class="{'title-text-text':false}">{{item.name}}</span>
|
<span :class="{'title-text-text':false}">{{item.name}}</span>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="itemModel" :prop="item.name">
|
<a-form-model-item class="itemModel" :prop="item.attrModel">
|
||||||
<j-dict-select-tag class="box-input" v-model="formInline[item.attrModel]"
|
<j-dict-select-tag class="box-input" v-model="formInline[item.attrModel]"
|
||||||
:placeholder="$t('selectStatus')" :type="'select'"
|
:placeholder="$t('selectStatus')" :type="'select'"
|
||||||
:triggerChange="false" dictCode="valid_status"/>
|
:triggerChange="false" dictCode="valid_status"/>
|
||||||
@@ -67,7 +79,7 @@
|
|||||||
<span :class="{'title-text-text':false}">{{item.enName}}</span><br>
|
<span :class="{'title-text-text':false}">{{item.enName}}</span><br>
|
||||||
<span :class="{'title-text-text':false}">{{item.name}}</span>
|
<span :class="{'title-text-text':false}">{{item.name}}</span>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="itemModel" :prop="item.name">
|
<a-form-model-item class="itemModel" :prop="item.attrModel">
|
||||||
<j-multi-select-tag class="box-input" v-model="formInline[item.attrModel]"
|
<j-multi-select-tag class="box-input" v-model="formInline[item.attrModel]"
|
||||||
:placeholder="$t('selectStatus')" :type="'select'"
|
:placeholder="$t('selectStatus')" :type="'select'"
|
||||||
:triggerChange="false" dictCode="valid_status"/>
|
:triggerChange="false" dictCode="valid_status"/>
|
||||||
@@ -82,12 +94,24 @@
|
|||||||
<span :class="{'title-text-text':false}">{{item.enName}}</span><br>
|
<span :class="{'title-text-text':false}">{{item.enName}}</span><br>
|
||||||
<span :class="{'title-text-text':false}">{{item.name}}</span>
|
<span :class="{'title-text-text':false}">{{item.name}}</span>
|
||||||
</div>
|
</div>
|
||||||
<a-form-model-item class="itemModel" :prop="item.name">
|
<a-form-model-item class="itemModel" :prop="item.attrModel">
|
||||||
<j-dict-select-tag v-model="formInline[item.attrModel]" :placeholder="$t('selectStatus')"
|
<j-dict-select-tag v-model="formInline[item.attrModel]" :placeholder="$t('selectStatus')"
|
||||||
:type="'radio'" :triggerChange="false" dictCode="valid_status"/>
|
:type="'radio'" :triggerChange="false" dictCode="valid_status"/>
|
||||||
</a-form-model-item>
|
</a-form-model-item>
|
||||||
</div>
|
</div>
|
||||||
</a-col>
|
</a-col>
|
||||||
|
<a-col :span="24" v-else-if="item.type === 'TEXTAREA'">
|
||||||
|
<div class="box-title-text">
|
||||||
|
<div class="title-text">
|
||||||
|
<span class="Required">*</span>
|
||||||
|
<span :class="{'title-text-text':false}">{{item.enName}}</span><br>
|
||||||
|
<span :class="{'title-text-text':false}">{{item.name}}</span>
|
||||||
|
</div>
|
||||||
|
<a-form-model-item class="itemModel" :prop="item.attrModel">
|
||||||
|
<a-textarea :placeholder="$t('selectStatus')" v-model="formInline[item.attrModel]" :rows="4" />
|
||||||
|
</a-form-model-item>
|
||||||
|
</div>
|
||||||
|
</a-col>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</a-row>
|
</a-row>
|
||||||
@@ -173,6 +197,22 @@
|
|||||||
placeholder: '请输入标题',
|
placeholder: '请输入标题',
|
||||||
validStatus:'valid_status',
|
validStatus:'valid_status',
|
||||||
attrModel: 'selectAll'
|
attrModel: 'selectAll'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 7,
|
||||||
|
type: 'NUMBER',
|
||||||
|
name: '数字输入框',
|
||||||
|
enName: 'title',
|
||||||
|
placeholder: '请输入数字输入框',
|
||||||
|
attrModel: 'number'
|
||||||
|
},
|
||||||
|
{
|
||||||
|
id: 8,
|
||||||
|
type: 'TEXTAREA',
|
||||||
|
name: '文本框',
|
||||||
|
enName: 'title',
|
||||||
|
placeholder: '请输入文本框',
|
||||||
|
attrModel: 'number'
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
validatorRules: {},
|
validatorRules: {},
|
||||||
@@ -231,6 +271,10 @@
|
|||||||
.box-input .ant-select-selection--multiple .ant-select-selection__rendered > ul > li{
|
.box-input .ant-select-selection--multiple .ant-select-selection__rendered > ul > li{
|
||||||
margin-top:6px;
|
margin-top:6px;
|
||||||
}
|
}
|
||||||
|
.box-input .ant-input-number-input-wrap{
|
||||||
|
line-height: 38px;
|
||||||
|
height: 38px;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.box-title-text {
|
.box-title-text {
|
||||||
@@ -260,6 +304,7 @@
|
|||||||
.itemModel {
|
.itemModel {
|
||||||
width: calc(100% - 130px);
|
width: calc(100% - 130px);
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
|
margin-top: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.Required {
|
.Required {
|
||||||
|
|||||||
Reference in New Issue
Block a user