|
@@ -8,11 +8,11 @@
|
|
|
<template slot="append" v-if="item.Unit">{{item.Unit}}</template>
|
|
|
</el-input>
|
|
|
<el-input v-model="item.inputValue" v-else-if="item.InputMode == 'B1' || item.InputMode == 'L' || item.InputMode == 'M'"></el-input>
|
|
|
- <el-select v-model="item.inputValue" v-else-if="item.InputMode == 'D1' && item.SelectType == 'select'" placeholder="请选择">
|
|
|
+ <el-select v-model="item.inputValue" v-else-if="item.InputMode == 'D1L'" placeholder="请选择">
|
|
|
<el-option v-for="(soption,skey) in item.options" :key="skey" :label="soption.Name" :value="soption.Code">
|
|
|
</el-option>
|
|
|
</el-select>
|
|
|
- <el-cascader v-model="item.inputValue" v-else-if="item.InputMode == 'D1' && item.SelectType == 'cascader'" placeholder="请选择"
|
|
|
+ <el-cascader v-model="item.inputValue" v-else-if="item.InputMode == 'D1'" placeholder="请选择"
|
|
|
:props="item.props" :options="item.options" filterable :show-all-levels="false"></el-cascader>
|
|
|
<el-input v-model="item.inputValue" v-else></el-input>
|
|
|
</el-form-item>
|
|
@@ -59,6 +59,7 @@ export default {
|
|
|
let numbersInput = ['A1', 'A2'];
|
|
|
let stringInput = ['B1', 'L', 'M'];
|
|
|
let arrayInput = ['D1'];
|
|
|
+ let cascaderInput = ['D1L'];
|
|
|
this.inputData.map(item => {
|
|
|
if (numbersInput.indexOf(item.InputMode) != -1) {
|
|
|
item.inputValue = null;
|
|
@@ -68,21 +69,20 @@ export default {
|
|
|
}
|
|
|
else if (arrayInput.indexOf(item.InputMode) != -1) {
|
|
|
let options = JSON.parse(item.DataSource)
|
|
|
+ item.inputValue = '';
|
|
|
+ item.options = options;
|
|
|
+ }
|
|
|
+ else if(cascaderInput.indexOf(item.InputMode) != -1){
|
|
|
+ let options = JSON.parse(item.DataSource);
|
|
|
if (options[0] && options[0].Content) {
|
|
|
- item.SelectType = 'cascader';
|
|
|
item.props = {
|
|
|
value: 'Code',
|
|
|
label: 'Name',
|
|
|
children: 'Content'
|
|
|
}
|
|
|
- item.inputValue = [];
|
|
|
- }
|
|
|
- else {
|
|
|
- item.SelectType = 'select';
|
|
|
- item.inputValue = '';
|
|
|
}
|
|
|
item.options = options;
|
|
|
-
|
|
|
+ item.inputValue = [];
|
|
|
}
|
|
|
else {
|
|
|
item.inputValue = '';
|