main.html 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  1. {extend name="../../base/view/common/base" /}
  2. {block name="style"}
  3. <style type="text/css">
  4. .panel-num table {width: 100%;}
  5. .panel-num td {text-align: center; padding: 18px 0; border-left: 1px solid #f1f1f1; position: relative;}
  6. .panel-num td:nth-child(1) { border-left: none}
  7. .panel-num .num-title {padding-bottom: 9px; color: #999;}
  8. .panel-num .blue {font-size: 20px; font-weight: 300;}
  9. .panel-num td .badge {position: absolute;top: 0; right: 0;}
  10. .panel-num td .badge span { padding: 2px 4px; font-size: 12px; border-radius: 0 0 0 4px;}
  11. .dashboard-total td {border-top: 1px solid #f1f1f1}
  12. .dashboard-logs .layui-timeline-item {padding-bottom: 1px;}
  13. .info-td { width: 90px; text-align: right;background-color: #fafafa; color: #999; padding: 5px 3px;}
  14. .info-td {width: 90px; text-align: right;background-color: #fafafa; color: #999; padding: 5px 3px;}
  15. .layui-card-body .layui-timeline-title {padding-bottom: 0;font-size: 14px; margin-bottom:4px; color:#323232}
  16. .layui-card-body .layui-timeline-item {padding-bottom: 5px;}
  17. .layui-short-menu li { text-align: center;}
  18. .layui-short-menu li .iconfont {display: inline-block; font-weight:600; width: 100%; height: 58px; line-height: 58px; margin-bottom:5px; text-align: center;border-radius: 3px; font-size: 28px; background-color: #F8F8F8; color: #969696; transition: all .3s; -webkit-transition: all .3s;}
  19. .layui-short-menu li cite {color: #646464;}
  20. .layui-short-menu li:hover .iconfont{color: #1A75FF; background-color:#F2F8FF;}
  21. .layui-short-menu li:hover cite {color: #1A75FF;}
  22. .layui-matter-item li a{display: block; padding: 12px; background-color: #f8f8f8; color: #999; border-radius: 3px; transition: all .3s;-webkit-transition: all .3s;}
  23. .layui-matter-item li a:hover{background-color:#F2F8FF;}
  24. .layui-matter-item li cite {font-size: 24px;font-weight: 300;}
  25. .layui-right-bar a{display: inline-block; width: 100%; height: 75px; text-align: center;border-radius: 3px; background-color: #F8F8F8; color: #969696; transition: all .3s; -webkit-transition: all .3s;}
  26. .layui-right-bar a .iconfont{display: inline-block; font-weight:600; width: 100%; height: 44px; line-height: 48px; text-align: center;font-size: 28px;}
  27. .layui-right-bar a:hover{color: #1A75FF; background-color:#F2F8FF;}
  28. .layui-card-title{padding:12px 12px 0}
  29. .website{padding-bottom:3px;}
  30. .website .layui-btn,.website .layui-btn+.layui-btn{margin:6px; font-size:13px;}
  31. </style>
  32. {/block}
  33. <!-- 主体 -->
  34. {block name="body"}
  35. <div class="p-page">
  36. <div class="layui-row layui-col-space16">
  37. <div class="layui-col-md8">
  38. {volist name="$layout_selected" id="layout"}
  39. {if ( $layout.row == 1) AND ( $layout.name == 'count') }
  40. {include file="/index/layout_count" /}
  41. {/if}
  42. {if ( $layout.row == 1) AND ( $layout.name == 'event') }
  43. {include file="/index/layout_event" /}
  44. {/if}
  45. {if ( $layout.row == 1) AND ( $layout.name == 'note') }
  46. {include file="/index/layout_note" /}
  47. {/if}
  48. {if ( $layout.row == 1) AND ( $layout.name == 'project') }
  49. {include file="/index/layout_project" /}
  50. {/if}
  51. {if ( $layout.row == 1) AND ( $layout.name == 'task') }
  52. {include file="/index/layout_task" /}
  53. {/if}
  54. {if ( $layout.row == 1) AND ( $layout.name == 'chartview') }
  55. {include file="/index/layout_chartview" /}
  56. {/if}
  57. {if ( $layout.row == 1) AND ( $layout.name == 'chartyear') }
  58. {include file="/index/layout_chartyear" /}
  59. {/if}
  60. {/volist}
  61. </div>
  62. <div class="layui-col-md4">
  63. {volist name="$layout_selected" id="layout"}
  64. {if ( $layout.row == 2) AND ( $layout.name == 'fastentry') }
  65. {include file="/index/layout_fastentry" /}
  66. {/if}
  67. {if ( $layout.row == 2) AND ( $layout.name == 'approve') }
  68. {include file="/index/layout_approve" /}
  69. {/if}
  70. {if ( $layout.row == 2) AND ( $layout.name == 'links') }
  71. {include file="/index/layout_links" /}
  72. {/if}
  73. {if ( $layout.row == 2) AND ( $layout.name == 'system') }
  74. {include file="/index/layout_system" /}
  75. {/if}
  76. {if ( $layout.row == 2) AND ( $layout.name == 'ranking') }
  77. {include file="/index/layout_ranking" /}
  78. {/if}
  79. {if ( $layout.row == 2) AND ( $layout.name == 'action') }
  80. {include file="/index/layout_action" /}
  81. {/if}
  82. {/volist}
  83. </div>
  84. </div>
  85. </div>
  86. {/block}
  87. <!-- /主体 -->
  88. <!-- 脚本 -->
  89. {block name="script"}
  90. <script src="{__GOUGU__}/third_party/echart/echarts.min.js"></script>
  91. <script>
  92. function getRange() {
  93. let today = new Date();
  94. let tYear = today.getFullYear();
  95. let tMonth = today.getMonth() + 1;
  96. let tDate = today.getDate();
  97. let dateFirst = tYear + "-" + tMonth + "-" + tDate;
  98. let datelast = (tYear - 1) + "-" + tMonth + "-" + tDate;
  99. let dataRange = [];
  100. dataRange.push(dateFirst);
  101. dataRange.push(datelast);
  102. return dataRange;
  103. }
  104. function getDay(archiveCalendar) {
  105. var today = new Date();
  106. var dayArray = [];
  107. for (var i = 0; i < 366; i++) {
  108. var targetday_milliseconds = today.getTime() - 1000 * 60 * 60 * 24 * i;
  109. var date = new Date(targetday_milliseconds);
  110. dayArray.push(retunDay(date,archiveCalendar));
  111. }
  112. return dayArray;
  113. }
  114. function retunDay(day,archiveCalendar) {
  115. var tYear = day.getFullYear();
  116. var tMonth = day.getMonth();
  117. var tDate = day.getDate();
  118. tMonth = tMonth + 1;
  119. if (tMonth.toString().length == 1) {
  120. tMonth = "0" + tMonth;
  121. }
  122. if (tDate.toString().length == 1) {
  123. tDate = "0" + tDate;
  124. }
  125. var dateStr = tYear + "-" + tMonth + "-" + tDate;
  126. var dateArray = [];
  127. dateArray.push(dateStr);
  128. if (archiveCalendar[dateStr]) {
  129. dateArray.push(archiveCalendar[dateStr]);
  130. }
  131. else {
  132. dateArray.push(0);
  133. }
  134. return dateArray;
  135. }
  136. function setHour(num) {
  137. var str = num + ':00';
  138. if (num < 10) {
  139. str = '0' + num + ':00';
  140. }
  141. return str;
  142. }
  143. const moduleInit = ['tool','oaSchedule'];
  144. function gouguInit() {
  145. var tool = layui.tool,table = layui.table,work = layui.oaSchedule;
  146. if(typeof layoutNote ==='function'){
  147. layoutNote(table);
  148. }
  149. if(typeof layoutProject ==='function'){
  150. layoutProject(table);
  151. }
  152. if(typeof layoutTask ==='function'){
  153. layoutTask(table);
  154. }
  155. if(typeof layoutChartView ==='function'){
  156. layoutChartView();
  157. }
  158. if(typeof layoutChartYear ==='function'){
  159. layoutChartYear();
  160. }
  161. if(typeof layoutFastentry ==='function'){
  162. layoutFastentry(tool,work,table)
  163. }
  164. if(typeof layoutLinks ==='function'){
  165. layoutLinks()
  166. }
  167. if(typeof layoutSystem ==='function'){
  168. layoutSystem()
  169. }
  170. if(typeof layoutRaking ==='function'){
  171. layoutRaking()
  172. }
  173. if(typeof layoutAction ==='function'){
  174. layoutAction()
  175. }
  176. }
  177. setTimeout(function () {
  178. window.onresize = function () {
  179. if(logChart){
  180. chartView.resize();
  181. }
  182. if(myChart){
  183. myChart.resize();
  184. }
  185. if(logChart){
  186. logChart.resize();
  187. }
  188. }
  189. })
  190. </script>
  191. {/block}
  192. <!-- /脚本 -->