升级:1、增加界面夜间模式
2、qtask 功能交互升级
3、mysql连接管理增加心跳保活
4、其他修改
This commit is contained in:
@@ -10,7 +10,7 @@ body {
|
||||
|
||||
}
|
||||
#top {
|
||||
background-color: #404a53;
|
||||
background-color: #2B323BFF;
|
||||
padding: 5px 10px;
|
||||
margin: 0px;
|
||||
height: 50px;
|
||||
@@ -31,13 +31,13 @@ body {
|
||||
#top>.nav-tabs>li.active>a:hover,
|
||||
#top>.nav-tabs>li>a:hover {
|
||||
background-color: #404a53;
|
||||
color: #fff;
|
||||
/*color: #fff;*/
|
||||
border: 0;
|
||||
border-bottom: 3px solid #607d8b;
|
||||
}
|
||||
|
||||
#left {
|
||||
background-color: #404a53; /*padding-bottom: 0px; margin-bottom: 0px;*/
|
||||
background-color: #2B323BFF; /*padding-bottom: 0px; margin-bottom: 0px;*/
|
||||
}
|
||||
#main {
|
||||
margin-top: 15px;
|
||||
@@ -51,7 +51,7 @@ body {
|
||||
/*background-color: #fff;*/
|
||||
}
|
||||
#left .nav {
|
||||
background-color: #404a53;
|
||||
background-color: #2B323BFF;
|
||||
}
|
||||
|
||||
#left .menu > .nav > li > .nav > li > a {
|
||||
@@ -89,7 +89,7 @@ body {
|
||||
margin-left: -10px;
|
||||
width: 100%;
|
||||
height: 35px;
|
||||
background-color: #eee;
|
||||
/*background-color: #eee;*/
|
||||
padding: 8px;
|
||||
color: #808080;
|
||||
}
|
||||
@@ -104,9 +104,9 @@ table td,th{
|
||||
text-overflow: ellipsis;
|
||||
max-width: 173px;
|
||||
}
|
||||
th{
|
||||
/*th{
|
||||
background-color: #f1f1f1;
|
||||
}
|
||||
}*/
|
||||
|
||||
/*ddl-page*/
|
||||
.ddl .input-group {
|
||||
@@ -145,7 +145,7 @@ th{
|
||||
.table td, .table th{
|
||||
padding: 5px;
|
||||
}
|
||||
.table td {background-color: #fff;}
|
||||
/*.table td {background-color: #fff;}*/
|
||||
|
||||
/* 页面信息按钮样式 */
|
||||
#main .info {
|
||||
@@ -177,7 +177,7 @@ th{
|
||||
.tlist>li.active>a:focus,
|
||||
.tlist>li.active>a:hover,
|
||||
.tlist>li>a:hover {
|
||||
background-color: #e2effc;
|
||||
background-color: #404348;
|
||||
border-radius: 2px 0 0 2px;
|
||||
border-left: 5px solid #a5cff8;
|
||||
}
|
||||
@@ -189,4 +189,126 @@ th{
|
||||
tr.dragging {
|
||||
visibility: visible;
|
||||
opacity: .3;
|
||||
}
|
||||
}
|
||||
|
||||
#left {
|
||||
.footer {
|
||||
background-color: #3b474c;
|
||||
cursor: pointer;
|
||||
color: #ccc;
|
||||
margin: auto;
|
||||
left: -1px;
|
||||
}
|
||||
|
||||
.user {
|
||||
position: fixed;
|
||||
bottom: 35px;
|
||||
height: 35px;
|
||||
margin: auto;
|
||||
background-color: #404a53;
|
||||
color: #808080;
|
||||
}
|
||||
}
|
||||
.leftMini {
|
||||
#left {
|
||||
width: auto;
|
||||
.icon {
|
||||
font-size: 16px;
|
||||
}
|
||||
.footer {
|
||||
margin: auto;
|
||||
}
|
||||
}
|
||||
.col-md-11 {
|
||||
width: 96%!important;
|
||||
}
|
||||
}
|
||||
|
||||
.col-md-12>h3{
|
||||
margin-top: 0px;
|
||||
}
|
||||
|
||||
.base-info {
|
||||
padding-left: 10px;
|
||||
background-color: #ccc;
|
||||
width: 100%;
|
||||
}
|
||||
.base-input {
|
||||
margin-top: 5px;margin-bottom: 5px;height: 30px; border: 1px solid black;
|
||||
}
|
||||
.plat-switch {
|
||||
border: 0;
|
||||
background-color: #404a53!important;
|
||||
color: #fff;
|
||||
margin-left: -5px;
|
||||
height: 35px;
|
||||
}
|
||||
body,table,th,td,.table-bordered,textarea,.form-control,button,pre,hr,.panel,input,checkbox,
|
||||
.btn-default,.input-group-btn,.input-group,
|
||||
/*.nav-tabs>li.active>a,.nav-tabs>li:focus,*/
|
||||
.previous>a,.next>a,
|
||||
.dlist>li>a,
|
||||
.input-group-addon,
|
||||
.modal-content,.modal-header,.modal-body,.modal-footer,
|
||||
.base-info,.plat-switch,
|
||||
.tlist>li.active>a,.tlist>li>a,
|
||||
.alert-info {
|
||||
background-color: #22272e !important;
|
||||
color: #c3c5c7 !important;
|
||||
border-color: #9e9e9e50!important;
|
||||
|
||||
th {
|
||||
background-color: #3b4652 !important;
|
||||
color: #85878AFF!important;
|
||||
}
|
||||
a {
|
||||
color: #7f74c4;
|
||||
}
|
||||
.btn-primary {
|
||||
background-color: #8276c9!important;
|
||||
color: #3e3a57!important;
|
||||
}
|
||||
.btn-primary:focus, .btn-primary:hover {
|
||||
background-color: #998fd9 !important;
|
||||
}
|
||||
.btn {
|
||||
text-shadow: none;
|
||||
}
|
||||
.btn-default:focus,.btn-default:hover {
|
||||
border-color: #7f74c4!important;
|
||||
color: #7f74c4!important;
|
||||
}
|
||||
.footer {
|
||||
background-color: #404a53 !important;
|
||||
}
|
||||
a:focus,a:hover {
|
||||
color: #fff!important;
|
||||
}
|
||||
.nav-tabs.nav-stacked {
|
||||
border-right: 0;
|
||||
ul {
|
||||
li>a {
|
||||
padding: 7px 15px;
|
||||
border-radius: 0 25px 25px 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
.base-info,H3 {
|
||||
color: #85878AFF!important;
|
||||
}
|
||||
.nav-tabs.nav-stacked>li {
|
||||
margin-right: 5px;
|
||||
}
|
||||
.alert-info {
|
||||
background-color: #607d8b!important;
|
||||
}
|
||||
table {
|
||||
width: 100%;
|
||||
}
|
||||
}
|
||||
.plat-switch {
|
||||
border: 0;
|
||||
background-color: #404a53 !important;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
var red = {
|
||||
showMsg: function(option) {
|
||||
var defOption = {msg: "操作成功", type:"info", placement: "top"};
|
||||
var defOption = {msg: "操作成功", /*type:"success",*/ placement: "top"};
|
||||
|
||||
option = option || defOption;
|
||||
for (var k in defOption) {
|
||||
@@ -63,6 +63,66 @@ var red = {
|
||||
callback(data)
|
||||
})
|
||||
},
|
||||
get2(url, params = {}) {
|
||||
return new Promise(resolve => {
|
||||
// 创建一个包含自定义 headers 的配置对象
|
||||
const config = {
|
||||
method: 'get', // 指定请求方法为 GET
|
||||
url: url, // 指定请求的 URL
|
||||
headers: { // 设置 Header 参数
|
||||
//'Authorization': 'Bearer your-token', // 假设添加一个 Bearer 认证 token
|
||||
//'Content-Type': 'application/json', // 或者指定 Content-Type 等其他 Header
|
||||
//'Custom-Header': 'Some value' // 自定义 Header 参数
|
||||
'token': red.getData("token"),
|
||||
'plattoken': red.getPlatToken(),
|
||||
},
|
||||
params: params,
|
||||
};
|
||||
|
||||
axios.request(config).then(res => {
|
||||
// 未登录,前往登录
|
||||
if (res.data.retcode === -2) {
|
||||
location.href = "/user/login.html"
|
||||
}
|
||||
resolve(res.data.result)
|
||||
}).catch(error => {
|
||||
console.error(error); // 处理错误
|
||||
});
|
||||
})
|
||||
},
|
||||
post2(url, params = {}) {
|
||||
return new Promise(resolve => {
|
||||
// 创建一个包含自定义 headers 的配置对象
|
||||
const config = {
|
||||
method: 'post', // 指定请求方法为 GET
|
||||
url: url, // 指定请求的 URL
|
||||
data: params,
|
||||
headers: { // 设置 Header 参数
|
||||
//'Authorization': 'Bearer your-token', // 假设添加一个 Bearer 认证 token
|
||||
//'Content-Type': 'application/json', // 或者指定 Content-Type 等其他 Header
|
||||
//'Custom-Header': 'Some value' // 自定义 Header 参数
|
||||
'token': red.getData("token"),
|
||||
'plattoken': red.getPlatToken(),
|
||||
}
|
||||
};
|
||||
|
||||
axios.request(config).then(res => {
|
||||
// 未登录,前往登录
|
||||
if (res.data.retcode === -2) {
|
||||
location.href = "/user/login.html"
|
||||
}
|
||||
if (res.data.retcode !== 0) {
|
||||
//console.log(res)
|
||||
red.showError(res.data.retinfo)
|
||||
return
|
||||
}
|
||||
|
||||
resolve(res.data.result)
|
||||
}).catch(error => {
|
||||
console.error(error); // 处理错误
|
||||
});
|
||||
})
|
||||
},
|
||||
getX(url, params = {}) {
|
||||
if (!params['platToken'])
|
||||
params['platToken'] = red.getPlatToken()
|
||||
@@ -80,7 +140,7 @@ var red = {
|
||||
|
||||
resolve(data)
|
||||
}).catch(res => {
|
||||
console.log(res)
|
||||
//console.log(res)
|
||||
red.showMsg({type:"error", msg:'操作失败!'})
|
||||
})
|
||||
})
|
||||
@@ -118,19 +178,21 @@ var red = {
|
||||
})
|
||||
},
|
||||
post: function(url, params = {}, callback) {
|
||||
params['platToken'] = red.getPlatToken()
|
||||
//params['platToken'] = red.getPlatToken()
|
||||
axios.post(url, params).then(res => {
|
||||
let data = red.loginCheck(res.data)
|
||||
/*let data = red.loginCheck(res.data)
|
||||
if (data && data.code == -1) {
|
||||
red.showMsg({msg: data.message, type: "error"})
|
||||
return;
|
||||
}
|
||||
}*/
|
||||
|
||||
if (callback) {
|
||||
callback(data.code == 0 ? data.body : data)
|
||||
console.log("xx", res.data.body)
|
||||
callback(res.data.code === 0 ? res.data.body : data)
|
||||
} else {
|
||||
red.showMsg()
|
||||
}
|
||||
return res
|
||||
})
|
||||
},
|
||||
|
||||
@@ -194,6 +256,7 @@ var red = {
|
||||
location.href = "/user/login.html";
|
||||
}, 2000);
|
||||
}
|
||||
return json.data
|
||||
},
|
||||
replaceAll: function (d, s, t) {
|
||||
let reg=new RegExp(s,"g"); //创建正则RegExp对象
|
||||
@@ -206,6 +269,23 @@ var red = {
|
||||
},
|
||||
replace$: function (d) {
|
||||
return red.replaceAll(d, "[$]", ".");
|
||||
},
|
||||
wait(ms) {
|
||||
return new Promise(resolve => setTimeout(resolve, ms));
|
||||
},
|
||||
deepClone: function (obj) {
|
||||
if (obj === null) return obj;
|
||||
if (obj instanceof Date) return new Date(obj);
|
||||
if (obj instanceof RegExp) return new RegExp(obj);
|
||||
if (typeof obj !== 'object') return obj;
|
||||
|
||||
let cloneObj = new obj.constructor();
|
||||
for (let key in obj) {
|
||||
if (obj.hasOwnProperty(key)) {
|
||||
cloneObj[key] = this.deepClone(obj[key]);
|
||||
}
|
||||
}
|
||||
return cloneObj;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user