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