优化: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

@@ -1,7 +1,7 @@
//import red from '../res/js/red'
const login = ({username, pwd}) => {
return red.postX("/user/login", {username, pwd, plattoken: 'xx'})
return red.postX("/user/login", {username, pwd, plattoken: ''})
}
const logout = () => {

View File

@@ -75,15 +75,20 @@
<a style="cursor: pointer">绝尘</a>
</div>-->
<div class="footer" @click="leftMiniSwitch()">
<i :class="['icon', leftMini? 'icon-caret-right':'icon-caret-left']"></i>
<!--<i :class="['icon', leftMini? 'icon-caret-right':'icon-caret-left']"></i>-->
{{leftMini ? 'MK' : 'Meta-Kit'}}
</div>
</nav>
</div>
<div class="col-md-11 col-xs-11">
<!-- 固定漂浮在left 用来收缩打开left -->
<div id="leftMiniBtn" @click="leftMiniSwitch()" :title="leftMini? '展开左侧菜单': '收起左侧菜单'" data-toggle="tooltip">
<i :class="['icon', leftMini? 'icon-caret-right':'icon-caret-left']" style="top: 50%"> </i>
</div>
<!--<div style="height: 40px;background-color: #fff;"></div>-->
<!-- load main body to here -->
<div id="main"></div>
<div class="footer">
<div class="main-footer">
Meta-Kit Dev-v0.2.1
</div>
</div>

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"],

View File

@@ -83,15 +83,18 @@ body {
width: 150px;
font-size: 22px;
}
.footer{
.footer,.main-footer {
position: fixed;
bottom: 0;
margin-left: -10px;
width: 100%;
height: 35px;
/*background-color: #eee;*/
padding: 8px;
width: 100%;
color: #808080;
padding: 8px;
}
.main-footer {
/*background-color: #eee;*/
/*left: 50px;*/
margin-left: -10px;
}
/*.list-head {
@@ -193,11 +196,12 @@ tr.dragging {
#left {
.footer {
background-color: #3b474c;
background-color: #1b1e2461!important;
cursor: pointer;
color: #ccc;
margin: auto;
left: -1px;
z-index: 999;
}
.user {
@@ -211,17 +215,21 @@ tr.dragging {
}
.leftMini {
#left {
width: auto;
width: 50px;
.icon {
font-size: 16px;
}
.footer {
margin: auto;
width: 50px;
}
}
.col-md-11 {
width: 96%!important;
}
.main-footer {
width: 100%;
}
}
.col-md-12>h3{
@@ -304,7 +312,7 @@ body,table,tr,/*th,td,*/.table-bordered,textarea,.form-control,button,pre,hr,.pa
border-color: #7f74c4!important;
color: #7f74c4!important;
}
.footer {
.main-footer {
background-color: #404a53 !important;
}
a:focus,a:hover {
@@ -372,7 +380,7 @@ body,table,tr,/*th,td,*/.table-bordered,textarea,.form-control,button,pre,hr,.pa
.dlist li.active a, .tlist li.active a, .tlist tr.active
/*,.dlist li a:hover, .tlist li a:hover, .tlist tr:hover*/{
border-left: 5px solid #a5cff8!important;
border-left: 5px solid #607d8b!important;
background-color: #4c5960;
}
@@ -384,3 +392,29 @@ body,table,tr,/*th,td,*/.table-bordered,textarea,.form-control,button,pre,hr,.pa
color: #fff;
}
#leftMiniBtn {
position: fixed;
left: 10.63%;
top: 40%;
/* 居中到容器中间*/
display: flex;
align-items: center;
justify-content: center;
width: 10px;
height: 100px;
border-radius: 0 15px 15px 0;
background-color: #404a53;
/*z-index: 9999;*/
cursor: pointer;
}
.leftMini {
#leftMiniBtn {
position: fixed;
left: 50px;
}
}

View File

@@ -122,6 +122,9 @@ public class DbSourceMysql implements DbSource {
case "DATE" -> {
row.put(columnLabel, rs.getDate(i));
}
case "BIT" -> {
row.put(columnLabel, rs.getShort(i));
}
default -> {
row.put(columnLabel, rs.getObject(i));
}