优化:1、增加左侧菜单收缩按钮

2、meta 预览默认选中历史查看
     3、数据查询tinyint转short
This commit is contained in:
2024-04-05 20:13:40 +08:00
parent 36a30ba2b3
commit 8bdedd7370
6 changed files with 85 additions and 23 deletions

View File

@@ -86,16 +86,17 @@
<div class="col-xs-4" v-for="(filter,index) in cfg.filters" v-if="filter.checked">
<div class="input-group " style="padding-top: 3px">
<span class="input-group-addon" style="max-width: 100px;">{{filter.label}}</span>
<span class="input-group-addon" style="max-width: 100px;" :title="filter.label" data-toggle="tooltip">{{filter.label}}</span>
<select class="form-control" v-model="filter['type']">
<option v-for="(t, i) in filter.filterType" :value="t.name" v-text="t.remark"></option>
</select>
<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']">
<select v-if="filter.inType == 'DICT'" class="form-control" v-model="filter['value']">
<!-- option v-for="(t, index) in filter.filterType" :value="t.name" v-text="t.remark"></option -->
<option value=""> 字典值一</option>
<option value=""> 字典值二</option>
<option value=""></option>
<option v-for="(t, index) in getDict(filter.inExt)" :value="t.value" v-text="t.label"></option>
<!--<option value=""> 字典值一</option>
<option value=""> 字典值二</option>-->
</select>
<span class="input-group-addon" title="删除过滤条件">
@@ -298,7 +299,8 @@
}
})
},
service() {
service(v) {
red.setData("meta:service", v)
this.loadCfg(function () {
vm.limit = {pn: 1, ps: 20, total: 0};
vm.findList();
@@ -326,9 +328,20 @@
return;
},
serviceList() {
getServiceList(json => {
vm.services = json;
vm.service = json[0].name;
getServiceList(res => {
vm.services = res;
// 如果有缓存数据,优先取上一次访问页面
if (red.getData("meta:service")) {
for (let i in res) {
if (res[i].name === red.getData("meta:service")) {
vm.service = res[i].name;
break
}
}
} else {
vm.service = res[0].name;
}
});
},
loadCfg(back) {
@@ -536,7 +549,11 @@
},
showInfo() {
$('#f-info').modal({moveable: true})
}
},
getDict(code) {
console.log(this.dictData[code])
return this.dictData[code] || []
},
},
mounted() {
this.serviceList();

View File

@@ -365,8 +365,11 @@
</select>
</td>
<td>
<input v-show="item.inType == 'DICT' || item.inType == 'CHECKBOX' || item.inType == 'REDIO'" v-model="item.inExt" class="form-control">
<input v-show="item.inType == 'CHECKBOX' || item.inType == 'REDIO'" v-model="item.inExt" class="form-control">
<input disabled v-show="!(item.inType == 'DICT' || item.inType == 'CHECKBOX' || item.inType == 'REDIO')" v-model="item.inExt" class="form-control">
<select v-show="item.inType == 'DICT'" v-model="item.inExt" class="form-control">
<option v-for="x in dictType" :value="x.value">{{x.label}}</option>
</select>
</td>
<!--
<td style="padding: 1px;overflow: inherit;">
@@ -597,7 +600,7 @@
EQUAL:"等于", NOTEQUAL:"不等于", IN: "包含", NOTIN:"不包含", LIKE: "模糊查询", RANGE: "范围"
},
findTypes: ["INPUT", "DICT", "CHECKBOX", "RADIO", "DAY", "TIME"],
inTypes: ["INPUT", "DICT", "INPUT_DAY", "INPUT_TIME", "INPUT_FUNC", "FUNC", "QTASK", "HIDDEN", "FILE"],
inTypes: ["INPUT", "DICT", "INPUT_DAY", "INPUT_TIME", /*"INPUT_FUNC", "FUNC", "QTASK",*/ "HIDDEN", "FILE"],
ckTypes: [{label:"必填", name: "NOTNULL"},{label:"IP", name: "IP"},{label:"IPv4", name: "IPv4"},{label:"电话号码", name: "phone"}],
dataTypes: ["bigint(20)", "varchar(255)", "varchar(64)", "varchar(32)", "varchar(16)", "int(11)", "int(3)", "int(2)", "datetime"],
filterCate: ["EQUAL", "NOTEQUAL", "LIKE", "IN"],