提交 0b8a2f11 编写于 作者: doc_wei's avatar doc_wei

添加页面加载动画

上级 165d7700
因为 它太大了无法显示 source diff 。你可以改为 查看blob
[skyeye-promote][ERROR] [2019-01-19 19:16:30] org.springframework.scheduling.support.TaskUtils$LoggingErrorHandler.handleError(96) | Unexpected error occurred in scheduled task.
redis.clients.jedis.exceptions.JedisConnectionException: Could not get a resource from the pool
at redis.clients.util.Pool.getResource(Pool.java:53)
at redis.clients.jedis.JedisPool.getResource(JedisPool.java:226)
at redis.clients.jedis.JedisSlotBasedConnectionHandler.getConnectionFromSlot(JedisSlotBasedConnectionHandler.java:66)
at redis.clients.jedis.JedisClusterCommand.runWithRetries(JedisClusterCommand.java:116)
at redis.clients.jedis.JedisClusterCommand.runWithRetries(JedisClusterCommand.java:141)
at redis.clients.jedis.JedisClusterCommand.runWithRetries(JedisClusterCommand.java:141)
at redis.clients.jedis.JedisClusterCommand.runWithRetries(JedisClusterCommand.java:141)
at redis.clients.jedis.JedisClusterCommand.runWithRetries(JedisClusterCommand.java:141)
at redis.clients.jedis.JedisClusterCommand.run(JedisClusterCommand.java:31)
at redis.clients.jedis.JedisCluster.set(JedisCluster.java:103)
at com.skyeye.jedis.impl.JedisClientServiceImpl.set(JedisClientServiceImpl.java:57)
at com.skyeye.start.thread.MonitorThread.queryComMation(MonitorThread.java:89)
at sun.reflect.GeneratedMethodAccessor84.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:483)
at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:65)
at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:54)
at org.springframework.scheduling.concurrent.ReschedulingRunnable.run(ReschedulingRunnable.java:93)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:744)
Caused by: redis.clients.jedis.exceptions.JedisConnectionException: java.net.SocketTimeoutException: connect timed out
at redis.clients.jedis.Connection.connect(Connection.java:207)
at redis.clients.jedis.BinaryClient.connect(BinaryClient.java:93)
at redis.clients.jedis.BinaryJedis.connect(BinaryJedis.java:1767)
at redis.clients.jedis.JedisFactory.makeObject(JedisFactory.java:106)
at org.apache.commons.pool2.impl.GenericObjectPool.create(GenericObjectPool.java:889)
at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:433)
at org.apache.commons.pool2.impl.GenericObjectPool.borrowObject(GenericObjectPool.java:362)
at redis.clients.util.Pool.getResource(Pool.java:49)
... 24 more
Caused by: java.net.SocketTimeoutException: connect timed out
at java.net.DualStackPlainSocketImpl.waitForConnect(Native Method)
at java.net.DualStackPlainSocketImpl.socketConnect(DualStackPlainSocketImpl.java:85)
at java.net.AbstractPlainSocketImpl.doConnect(AbstractPlainSocketImpl.java:345)
at java.net.AbstractPlainSocketImpl.connectToAddress(AbstractPlainSocketImpl.java:206)
at java.net.AbstractPlainSocketImpl.connect(AbstractPlainSocketImpl.java:188)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:172)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:392)
at java.net.Socket.connect(Socket.java:589)
at redis.clients.jedis.Connection.connect(Connection.java:184)
... 31 more
......@@ -16,7 +16,7 @@ html #layuicss-layer{display: none; position: absolute; width: 1989px;}
.layui-layer-close{position:absolute;}
.layui-layer-content{position:relative;}
.layui-layer-border{border: 1px solid #B2B2B2; border: 1px solid rgba(0,0,0,.1); box-shadow: 1px 1px 5px rgba(0,0,0,.2);}
.layui-layer-load{background:url(loading-1.gif) #eee center center no-repeat;}
/*.layui-layer-load{background:url(loading-1.gif) #eee center center no-repeat;}*/
.layui-layer-ico{ background:url(icon.png) no-repeat;}
.layui-layer-dialog .layui-layer-ico,
.layui-layer-setwin a,
......@@ -95,7 +95,7 @@ html #layuicss-layer{display: none; position: absolute; width: 1989px;}
.layui-layer-iframe iframe{display: block; width: 100%;}
.layui-layer-loading{border-radius:100%; background:none; box-shadow:none; border:none;}
.layui-layer-loading .layui-layer-content{width:60px; height:24px; background:url(loading-0.gif) no-repeat;}
/*.layui-layer-loading .layui-layer-content{width:60px; height:24px; background:url(loading-0.gif) no-repeat;}*/
.layui-layer-loading .layui-layer-loading1{width:37px; height:37px; background:url(loading-1.gif) no-repeat;}
.layui-layer-loading .layui-layer-loading2, .layui-layer-ico16{width:32px; height:32px; background:url(loading-2.gif) no-repeat;}
.layui-layer-tips{background: none; box-shadow:none; border:none;}
......
......@@ -6240,6 +6240,35 @@ select option{
.page-load{
width: 100%;
height: 100%;
top: 0;
left: 0;
position: fixed;
background-color: aqua;
}
.page-icon{
width: 100%;
text-align: center;
margin-top: 9%;
}
.page-icon-title{
font-size: 66px;
}
.page-icon-load{
width: 100%;
text-align: center;
margin-top: 25px;
color: white;
}
.page-icon-title-load{
}
.page-load font{
}
/*******************************************自定义样式end********************************************/
......
......@@ -97,6 +97,7 @@ layui.define(['layer', 'winui'], function (exports) {
//打开回调
success: function (layero, index) {
common.setWindowBody(layero);
common.showLoading(layero, options);
},
//关闭回调
cancel: function (index, windowDom) {
......@@ -385,6 +386,40 @@ layui.define(['layer', 'winui'], function (exports) {
hideWindow: function (param) {
$(common.getWindow(param)).addClass('layui-hide');
},
//显示加载进度
showLoading: function(window, options){
var body = $(window).find('iframe').contents().find('body');
if (body) {
var str = '<div class="page-load" ';
if(!isNull(options.loadBgColor)){
str += 'style="background-color:' + options.loadBgColor + ';';
if(!isNull(options.zIndex)){
var zIndex = options.zIndex + 1;
str += 'z-index:' + zIndex;
}
str += '"';
}
str += '>';
if(!isNull(options.loadIcon)){
str += '<div class="page-icon">';
str += '<i class="fa page-icon-title fa-fw ' + options.loadIcon + '" ';
if(!isNull(options.loadIconColor)){
str += 'style="color: ' + options.loadIconColor + '" ';
}else{
str += 'style="color: white" ';
}
str += '></i></div>';
}
str += '<div class="page-icon-load"><i class="fa page-icon-title-load fa-fw fa-spin fa-spinner"></i>';
str += '<font>加载中</font></div></div>';
body.append(str);
$(window).ready(function(e){
setTimeout(function(e){
body.find(".page-load").remove();
}, 1500);
});
}
}
};
//基础事件
......
......@@ -470,6 +470,8 @@
title: title,
content: content,
loadBgColor: menuIconBg,
loadIcon: menuIcon,
loadIconColor: menuIconColor,
area: ['90vw','90vh'],
maxOpen: maxOpen,
refresh:true
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册