1234567891011121314151617181920212223242526272829303132333435363738394041424344454647 |
- <style type="text/css">
- .queryform_item{float:left;width: 20%}
- .queryform_label{float:left;width: 7rem;text-align: right;}
- .queryform_inputblock{float:left;margin:1rem !important;width:13.5rem;}
- </style>
- <div class="children-content">
- <blockquote class="layui-elem-quote" style="padding:10px;line-height:25px;">
- 系统管理 / 运行日志
- </blockquote>
- <div id="runtime_log" style="position:relative;width:98%;height:100%;line-height: 2.4rem;padding: 1rem;border:1px solid #ccc;">
- <div></div>
- </div>
- </div>
- <script type="text/javascript">
- var offsetCount=0;
- $(document).ready(function () {
- var h=$(".main-body").height() - $(".layui-elem-quote").height() - 120 * hRate;
- $("#runtime_log").height(h).children("div:first").slimscroll({
- height: h + "px",
- width: "100%",
- alwaysVisible: false,
- wheelStep: 10,
- size: "6px",
- color: "#03aee7"
- });
- getRunLog();
- });
- function getRunLog(){
- $.getJSON(Global.AccessUrl+"/api/log/runtime_log",{"offset":offsetCount},function(jsondata){
- if(jsondata.code!=0){
- layer.msg(jsondata.msg)
- return
- }
- offsetCount = jsondata.count;
- //显示日志内容
- $("#runtime_log>div>div:first").append(jsondata.data.replace(/\n/g,'<br>'));
- setTimeout(function(){
- if($("#runtime_log").length==0){
- return;
- }
- getRunLog();
- },5000);
- })
- }
- </script>
|