优化改进配置的 默认项
This commit is contained in:
@@ -58,7 +58,7 @@
|
|||||||
<div class="input-group item">
|
<div class="input-group item">
|
||||||
<span class="input-group-addon" style="width: 130px;">{{filter.label}}</span>
|
<span class="input-group-addon" style="width: 130px;">{{filter.label}}</span>
|
||||||
<select class="form-control" v-model="filter['type']" style="width: 100px">
|
<select class="form-control" v-model="filter['type']" style="width: 100px">
|
||||||
<option v-for="(t, index) in filter.filterType" :value="t.name" v-text="t.remark"></option>
|
<option v-for="(t, i) in filter.filterType" :value="t.name" v-text="t.remark"></option>
|
||||||
</select>
|
</select>
|
||||||
<span class="input-group-addon fix-border fix-padding"></span>
|
<span class="input-group-addon fix-border fix-padding"></span>
|
||||||
<input v-if="!filter.inType || filter.inType == 'INPUT'" type="text" class="form-control" v-model="filter['value']">
|
<input v-if="!filter.inType || filter.inType == 'INPUT'" type="text" class="form-control" v-model="filter['value']">
|
||||||
@@ -300,7 +300,14 @@
|
|||||||
});
|
});
|
||||||
},
|
},
|
||||||
loadCfg() {
|
loadCfg() {
|
||||||
getCfg({name: this.service}).then(res => this.cfg = res);
|
getCfg({name: this.service}).then(res => {
|
||||||
|
res['type'] = res.filters[0]['name']
|
||||||
|
|
||||||
|
for (i in res["filters"]) {
|
||||||
|
res["filters"][i]['type'] = res["filters"][i]['filterType'][0]['name']
|
||||||
|
}
|
||||||
|
this.cfg = res
|
||||||
|
});
|
||||||
},
|
},
|
||||||
dealFieldFmt(bean, colFmt) { //处理字典数据 及 自定义函数处理数据
|
dealFieldFmt(bean, colFmt) { //处理字典数据 及 自定义函数处理数据
|
||||||
|
|
||||||
|
|||||||
@@ -186,7 +186,6 @@
|
|||||||
<td style="padding: 1px;"><input v-model="item.label" class="form-control" style="width: 130px;padding: 0px"></td>
|
<td style="padding: 1px;"><input v-model="item.label" class="form-control" style="width: 130px;padding: 0px"></td>
|
||||||
<td style="padding: 1px;">
|
<td style="padding: 1px;">
|
||||||
<select v-model="item.inType" class="form-control" style="width: 130px">
|
<select v-model="item.inType" class="form-control" style="width: 130px">
|
||||||
<option></option>
|
|
||||||
<option v-for="x in inTypes" :value="x">{{x}}</option>
|
<option v-for="x in inTypes" :value="x">{{x}}</option>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
@@ -226,7 +225,6 @@
|
|||||||
<td style="padding: 1px;"><input v-model="item.label" class="form-control" style="padding: 0px"></td>
|
<td style="padding: 1px;"><input v-model="item.label" class="form-control" style="padding: 0px"></td>
|
||||||
<td style="padding: 1px;">
|
<td style="padding: 1px;">
|
||||||
<select v-model="item.inType" class="form-control" style="width: 130px">
|
<select v-model="item.inType" class="form-control" style="width: 130px">
|
||||||
<option></option>
|
|
||||||
<option v-for="x in exportFmtTypes" :value="x">{{x}}</option>
|
<option v-for="x in exportFmtTypes" :value="x">{{x}}</option>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
@@ -353,7 +351,6 @@
|
|||||||
<td style="padding: 1px;"><input v-model="item.label" class="form-control" style="width: 130px;padding: 0px"></td>
|
<td style="padding: 1px;"><input v-model="item.label" class="form-control" style="width: 130px;padding: 0px"></td>
|
||||||
<td style="padding: 1px;">
|
<td style="padding: 1px;">
|
||||||
<select v-model="item.inType" class="form-control" style="width: 130px">
|
<select v-model="item.inType" class="form-control" style="width: 130px">
|
||||||
<option></option>
|
|
||||||
<option v-for="x in inTypes" :value="x">{{x}}</option>
|
<option v-for="x in inTypes" :value="x">{{x}}</option>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
@@ -376,7 +373,7 @@
|
|||||||
<th>数据字段</th>
|
<th>数据字段</th>
|
||||||
<th>展示名称</th>
|
<th>展示名称</th>
|
||||||
<th>表单组件</th>
|
<th>表单组件</th>
|
||||||
<th>数据格式化</th>
|
<th>附加参数</th>
|
||||||
<th>表单校验</th>
|
<th>表单校验</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
@@ -389,7 +386,6 @@
|
|||||||
<td style="padding: 1px;"><input v-model="item.label" class="form-control" style="width: 100px;padding: 0px"></td>
|
<td style="padding: 1px;"><input v-model="item.label" class="form-control" style="width: 100px;padding: 0px"></td>
|
||||||
<td style="padding: 1px;">
|
<td style="padding: 1px;">
|
||||||
<select v-model="item.inType" class="form-control" style="width: 130px">
|
<select v-model="item.inType" class="form-control" style="width: 130px">
|
||||||
<option></option>
|
|
||||||
<option v-for="x in inTypes" :value="x">{{x}}</option>
|
<option v-for="x in inTypes" :value="x">{{x}}</option>
|
||||||
</select>
|
</select>
|
||||||
</td>
|
</td>
|
||||||
@@ -542,7 +538,7 @@
|
|||||||
shows: [],
|
shows: [],
|
||||||
exports: [],
|
exports: [],
|
||||||
imports: [],
|
imports: [],
|
||||||
filters: [{name: '', label: '', filterType: ['']}],
|
filters: [{name: '', label: '', filterType: [''], type:""}],
|
||||||
details: [],
|
details: [],
|
||||||
edits: [],
|
edits: [],
|
||||||
dels: {cate: "", sql: "", qtask: ""}
|
dels: {cate: "", sql: "", qtask: ""}
|
||||||
@@ -676,7 +672,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
let label = this.getFieldLabel(v[i])
|
let label = this.getFieldLabel(v[i])
|
||||||
filters.push({name: v[i], label, filterType: ["EQUAL"], checked: false})//构造filter 对象
|
filters.push({name: v[i], label, filterType: ["EQUAL"], checked: false, inType:"INPUT"})//构造filter 对象
|
||||||
}
|
}
|
||||||
|
|
||||||
// 去除删除的
|
// 去除删除的
|
||||||
@@ -715,6 +711,9 @@
|
|||||||
if (!shows[j]['label']) {
|
if (!shows[j]['label']) {
|
||||||
shows[j]['label'] = this.getFieldLabel(v[i])
|
shows[j]['label'] = this.getFieldLabel(v[i])
|
||||||
}
|
}
|
||||||
|
if (!shows[j]['inType']) {
|
||||||
|
shows[j]['inType'] = "INPUT"
|
||||||
|
}
|
||||||
/*if (!shows[j]['fmt']) {
|
/*if (!shows[j]['fmt']) {
|
||||||
shows[j]['fmt'] = this.getFiledInExt(v[i])
|
shows[j]['fmt'] = this.getFiledInExt(v[i])
|
||||||
}*/
|
}*/
|
||||||
@@ -800,7 +799,7 @@
|
|||||||
continue c
|
continue c
|
||||||
}
|
}
|
||||||
}*/
|
}*/
|
||||||
details.push({col: v[i], label: label})
|
details.push({col: v[i], label: label, inType: 'INPUT'})
|
||||||
}
|
}
|
||||||
|
|
||||||
//去除删除的
|
//去除删除的
|
||||||
@@ -834,7 +833,7 @@
|
|||||||
}
|
}
|
||||||
// 新的
|
// 新的
|
||||||
let label = this.getFieldLabel(v[i])
|
let label = this.getFieldLabel(v[i])
|
||||||
edits.push({col: v[i], label: label, cks:[]})
|
edits.push({col: v[i], label: label, cks:[], inType: 'INPUT'})
|
||||||
}
|
}
|
||||||
|
|
||||||
//去除删除的
|
//去除删除的
|
||||||
|
|||||||
Reference in New Issue
Block a user