hplus_main.jsp 38 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867
  1. <%@ page import="cn.com.lzt.tools.ServerType" %>
  2. <%@ page contentType="text/html;charset=UTF-8" language="java" %>
  3. <%@include file="/context/mytags.jsp"%>
  4. <html>
  5. <head>
  6. <meta charset="utf-8">
  7. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  8. <meta name="renderer" content="webkit">
  9. <%-- <title><t:mutiLang langKey="jeect.platform"/></title> --%>
  10. <title>美都管理平台</title>
  11. <meta name="keywords" content="">
  12. <meta name="description" content="">
  13. <link rel="shortcut icon" href="images/favicon.ico">
  14. <link href="plug-in-ui/hplus/css/bootstrap.min.css?v=3.3.6" rel="stylesheet">
  15. <link href="plug-in-ui/hplus/css/font-awesome.min.css?v=4.4.0" rel="stylesheet">
  16. <link rel="stylesheet" href="plug-in/ace/assets/css/font-awesome.min.css" />
  17. <!--[if IE 7]>
  18. <link rel="stylesheet" href="plug-in/ace/assets/css/font-awesome-ie7.min.css" />
  19. <![endif]-->
  20. <!-- Sweet Alert -->
  21. <link href="plug-in-ui/hplus/css/plugins/sweetalert/sweetalert.css" rel="stylesheet">
  22. <link href="plug-in-ui/hplus/css/animate.css" rel="stylesheet">
  23. <link href="plug-in-ui/hplus/css/style.css?v=4.1.0" rel="stylesheet">
  24. <!--右键菜单-->
  25. <link href="plug-in/hplus/smartMenu.css" rel="stylesheet">
  26. <!-- update-begain--Author: zhoujf Date:20170309 for: TASK #975 【首页提醒】我的任务 -->
  27. <style type="text/css">
  28. .nav.navbar-right > li > a {
  29. color: #1AB394;
  30. }
  31. </style>
  32. <!-- update-end--Author: zhoujf Date:20170309 for: TASK #975 【首页提醒】我的任务 -->
  33. </head>
  34. <body class="fixed-sidebar full-height-layout gray-bg" style="overflow:hidden">
  35. <div id="wrapper">
  36. <!--左侧导航开始-->
  37. <nav class="navbar-default navbar-static-side" role="navigation" style="z-index: 1991;">
  38. <div class="nav-close">
  39. <i class="fa fa-times-circle"></i>
  40. </div>
  41. <div class="sidebar-collapse">
  42. <ul class="nav" id="side-menu">
  43. <li class="nav-header">
  44. <div class="dropdown profile-element">
  45. <a data-toggle="dropdown" class="dropdown-toggle" href="#">
  46. <span class="clear" style="background-color:#3275C6;width:200px;height:60px;">
  47. <c:choose>
  48. <c:when test="${photoUrl != ''}">
  49. <%-- <img alt="image" width="48" height="48" src="tSysFileController/showOrDownByurl.do?dbPath=${photoUrl}" style="float:left;display:inline-block;margin:6px 0 6px 30px;border-radius:30px" /> --%>
  50. <img alt="image" width="48" height="48" src="${photoUrl}" style="float:left;display:inline-block;margin:6px 0 6px 30px;border-radius:30px" />
  51. </c:when>
  52. <c:otherwise>
  53. <img alt="image" width="48" height="48" src="images/userDefaultPhoto.jpg" style="float:left;display:inline-block;margin:6px 0 6px 30px;border-radius:30px" />
  54. </c:otherwise>
  55. </c:choose>
  56. <span class="block m-t-xs" style="float:left;display:inline-block;width:80px;font-weight:bold;color:#fff;line-height:20px;margin:10px 0 0 16px;"><strong class="font-bold">${realName }</strong></span>
  57. <span class="text-muted text-xs block" style="float:left;display:inline-block;margin-left:16px;color:#c8c8c8;" >${roleName }<b class="caret"></b></span>
  58. </span>
  59. </a>
  60. <ul class="dropdown-menu animated fadeInRight m-t-xs">
  61. <li>
  62. <a href="javascript:add('<t:mutiLang langKey="common.change.password"/>','userController.do?changepassword','',550,200)">
  63. <t:mutiLang langKey="common.change.password"/>
  64. </a>
  65. </li>
  66. <li><a href="javascript:openwindow('<t:mutiLang langKey="common.profile"/>','userController.do?userinfo')"><t:mutiLang langKey="common.profile"/></a></li>
  67. <li><a href="javascript:openwindow('<t:mutiLang langKey="common.ssms.getSysInfos"/>','tSSmsController.do?getSysInfos')"><t:mutiLang langKey="common.ssms.getSysInfos"/></a></li>
  68. </ul>
  69. </div>
  70. <div class="dropdown profile-element">
  71. <span class="clear" style="background-color:#12447D;width:200px;height:40px;text-align:center;line-height:40px;">
  72. <strong style="color:#fff;font-size: 14px;">导 航 菜 单</strong>
  73. </span>
  74. </div>
  75. <div class="logo-element" style="font-size: 14px;background-color:#12447D;height:60px;text-align:center;">
  76. <span>导航菜单</span>
  77. </div>
  78. </li>
  79. <t:menu style="hplus" menuFun="${menuMap}"></t:menu>
  80. </ul>
  81. </div>
  82. </nav>
  83. <!--左侧导航结束-->
  84. <!--右侧部分开始-->
  85. <div id="page-wrapper" class="gray-bg dashbard-1">
  86. <div class="row border-bottom">
  87. <nav class="navbar navbar-static-top" role="navigation" style="margin-bottom: 0">
  88. <div class="navbar-header" style="height: 60px;">
  89. <div class="form-group" style="margin: 10px auto auto 20px;">
  90. <img src="images/LOGO.png" />
  91. <%-- <img src="images/logob.png" />--%>
  92. <%
  93. Boolean isTest = ServerType.isTest();
  94. pageContext.setAttribute("isTest", isTest);
  95. %>
  96. <c:if test="${isTest}">
  97. <span style="color: red;font-size:25px;margin-left:30px;letter-spacing:20px;font-weight: bold">
  98. </span>
  99. </c:if>
  100. </div>
  101. </div>
  102. <ul class="nav navbar-top-links navbar-right" >
  103. <li class="dropdown" onfocus="bindFrameClick()">
  104. <img alt="image" width="18" height="18" src="plug-in/index/images/time.png" />
  105. <span id="_timer"></span>
  106. <!--
  107. <a class="dropdown-toggle count-info" data-toggle="dropdown" href="#">
  108. <span ><strong class="font-bold">${userName }</strong></span>
  109. <span >${roleName }<b class="caret"></b></span>
  110. </a>
  111. <ul class="dropdown-menu dropdown-alerts">
  112. <li>
  113. <a href="javascript:add('<t:mutiLang langKey="common.change.password"/>','userController.do?changepassword','',550,200)">
  114. <t:mutiLang langKey="common.change.password"/>
  115. </a>
  116. </li>
  117. <li><a href="javascript:openwindow('<t:mutiLang langKey="common.profile"/>','userController.do?userinfo')"><t:mutiLang langKey="common.profile"/></a></li>
  118. <li><a href="javascript:openwindow('<t:mutiLang langKey="common.ssms.getSysInfos"/>','tSSmsController.do?getSysInfos')"><t:mutiLang langKey="common.ssms.getSysInfos"/></a></li>
  119. <li><a href="javascript:add('<t:mutiLang langKey="common.change.style"/>','userController.do?changestyle','',550,250)"><t:mutiLang langKey="common.my.style"/></a></li>
  120. <li><a href="javascript:clearLocalstorage()"><t:mutiLang langKey="common.clear.localstorage"/></a></li>
  121. <li><a href="javascript:toJeecgYun()">云应用中心</a></li>
  122. <li><a href="http://yun.jeecg.org" target="_blank">云应用中心</li>
  123. <li class="divider"></li>
  124. <li><a href="javascript:logout()">注销</a></li>
  125. </ul>
  126. -->
  127. </li>
  128. <!-- //update-end--Author: chenj Date:20160726 for: TASK #1207 [改造]h+风格下,去掉logo下面的内容,迁移位置到右上角,主题位置 -->
  129. <!-- update-begain--Author: zhoujf Date:20170309 for: TASK #975 【首页提醒】我的任务 -->
  130. <%--<li > del-刘梦祥-2022年7月19日13:13:58(美都环卫没有这些功能)
  131. <a href="javascript:addOneTab('预警提醒', 'attendanceWarnMsgController.do?list', 'default');">
  132. <img alt="image" width="20" height="20" src="plug-in/index/images/ding.png" /><!-- (<span id="taskCount">0</span>) -->
  133. </a>
  134. </li>--%>
  135. <!-- update-end--Author: zhoujf Date:20170309 for: TASK #975 【首页提醒】我的任务 -->
  136. <%--<li > del-刘梦祥-2022年7月19日13:13:58(美都环卫没有这些功能)
  137. <a href="javascript:addOneTab('我的任务', 'taskController.do?goTaskListTab', 'default');">
  138. <img alt="image" width="20" height="20" src="plug-in/index/images/notice.png" /><!-- (<span id="taskCount">0</span>) -->
  139. </a>
  140. </li>
  141. <li >
  142. <a href="javascript:addOneTab('我的消息', 'sysMsgController.do?myMsgList', 'default');">
  143. <img alt="image" width="20" height="20" src="plug-in/index/images/info.png" /><!-- (<span id="taskCount">0</span>) -->
  144. </a>
  145. </li>--%>
  146. <%--add-刘梦祥-2022年7月19日13:14:38(添加提示按钮tag,同时修改我的消息页面。暂时展示信息接收人的提醒数据。)--%>
  147. <li >
  148. <a href="javascript:addOneTab('我的消息', 'sysMsgController.do?myMsgList', 'default');" style="position: relative;">
  149. <img alt="image" width="20" height="20" src="plug-in/index/images/info.png" />
  150. <div id="tagMsgCountBox">
  151. <div id="tagMsgCount">0</div>
  152. </div>
  153. </a>
  154. </li>
  155. <li class="dropdown">
  156. <a href="javascript:logout()" ><img alt="image" width="20" height="20" src="plug-in/index/images/exit.png" /></a>
  157. </li>
  158. </ul>
  159. </nav>
  160. </div>
  161. <div class="row content-tabs">
  162. <span class="navbar-minimalize roll-nav roll-left" onclick="setZhankai()">
  163. <img id="zhankai" src="plug-in/index/images/zhankai.png" style="margin-top:14px;"/>
  164. </span>
  165. <button class="roll-nav roll-left J_tabLeft" style="left:40"><i class="fa fa-backward"></i>
  166. </button>
  167. <nav class="page-tabs J_menuTabs" style="margin-left:80px;">
  168. <div class="page-tabs-content">
  169. <a href="javascript:;" class="active J_menuTab" data-id="homepageController.do?homepage">首页</a>
  170. </div>
  171. </nav>
  172. <button class="roll-nav roll-right J_tabRight"><i class="fa fa-forward"></i>
  173. </button>
  174. <div class="btn-group roll-nav roll-right">
  175. <button class="dropdown J_tabClose" data-toggle="dropdown">关闭操作<span class="caret"></span>
  176. </button>
  177. <ul role="menu" class="dropdown-menu dropdown-menu-right">
  178. <li class="J_tabCloseAll"><a>关闭全部选项卡</a>
  179. </li>
  180. <li class="J_tabCloseOther"><a>关闭其他选项卡</a>
  181. </li>
  182. </ul>
  183. </div>
  184. </div>
  185. <!-- update-begin--Author:zhoujf Date:20170710 for:TASK #2003 【UI改进】列表加载慢的时候会出现白板 -->
  186. <style type="text/css">
  187. <!--
  188. .proccess{display:none;border:0px solid;border-color:#009900;height:100%;line-height:600px;background-color:#fff;width:100%;text-align:center;margin:100px;position:absolute;top:0;left:0;}
  189. .proccess b{vertical-align:middle;background:url("plug-in/layer/skin/default/loading-0.gif") no-repeat 0 center;padding-left:55px;display:inline-block;}
  190. -->
  191. </style>
  192. <div class="row J_mainContent" id="content-main" style="margin-left:-13px;">
  193. <div class="proccess" id="panelloadingDiv"><b>&nbsp;</b></div>
  194. <iframe class="J_iframe" name="iframe0" width="100%" height="100%" src="homepageController.do?homepage" frameborder="0" data-id="homepageController.do?homepage" seamless></iframe>
  195. </div>
  196. <!-- update-end--Author:zhoujf Date:20170710 for:TASK #2003 【UI改进】列表加载慢的时候会出现白板 -->
  197. <!-- update-begin--Author:xuelin Date:20170611 for:TASK #2100 【列表样式美化】【样式专题】Jeecg平台任务 --1下面这条线,变明朗点-------------------- -->
  198. <div class="footer" style="border-top:none;text-align:center;">上海美都环卫服务有限公司</div>
  199. <!-- update-end--Author:xuelin Date:20170611 for:TASK #2100 【列表样式美化】【样式专题】Jeecg平台任务 --1下面这条线,变明朗点---------------------- -->
  200. </div>
  201. <!--右侧部分结束-->
  202. <!--右侧边栏开始
  203. <div id="right-sidebar">
  204. <div class="sidebar-container">
  205. <ul class="nav nav-tabs navs-3">
  206. <li class="active">
  207. <a data-toggle="tab" href="#tab-1">
  208. <i class="fa fa-gear"></i> 主题
  209. </a>
  210. </li>
  211. <li class=""><a data-toggle="tab" href="#tab-2">
  212. <i class="fa fa-comments-o" aria-hidden="true"></i>通知
  213. </a>
  214. </li>
  215. <li><a data-toggle="tab" href="#tab-3">
  216. <i class="fa fa-info-circle" aria-hidden="true"></i>公告
  217. </a>
  218. </li>
  219. </ul>
  220. <div class="tab-content">
  221. <div id="tab-1" class="tab-pane active">
  222. <div class="sidebar-title">
  223. <h3> <i class="fa fa-comments-o"></i> 主题设置</h3>
  224. <small><i class="fa fa-tim"></i> 你可以从这里选择和预览主题的布局和样式,这些设置会被保存在本地,下次打开的时候会直接应用这些设置。</small>
  225. </div>
  226. <div class="skin-setttings">
  227. <div class="title">主题设置</div>
  228. <div class="setings-item">
  229. <span>收起左侧菜单</span>
  230. <div class="switch">
  231. <div class="onoffswitch">
  232. <input type="checkbox" name="collapsemenu" class="onoffswitch-checkbox" id="collapsemenu">
  233. <label class="onoffswitch-label" for="collapsemenu">
  234. <span class="onoffswitch-inner"></span>
  235. <span class="onoffswitch-switch"></span>
  236. </label>
  237. </div>
  238. </div>
  239. </div>
  240. <div class="setings-item">
  241. <span>固定顶部</span>
  242. <div class="switch">
  243. <div class="onoffswitch">
  244. <input type="checkbox" name="fixednavbar" class="onoffswitch-checkbox" id="fixednavbar">
  245. <label class="onoffswitch-label" for="fixednavbar">
  246. <span class="onoffswitch-inner"></span>
  247. <span class="onoffswitch-switch"></span>
  248. </label>
  249. </div>
  250. </div>
  251. </div>
  252. <div class="setings-item">
  253. <span>
  254. 固定宽度
  255. </span>
  256. <div class="switch">
  257. <div class="onoffswitch">
  258. <input type="checkbox" name="boxedlayout" class="onoffswitch-checkbox" id="boxedlayout">
  259. <label class="onoffswitch-label" for="boxedlayout">
  260. <span class="onoffswitch-inner"></span>
  261. <span class="onoffswitch-switch"></span>
  262. </label>
  263. </div>
  264. </div>
  265. </div>
  266. <div class="title">皮肤选择</div>
  267. <div class="setings-item default-skin nb">
  268. <span class="skin-name ">
  269. <a href="#" class="s-skin-0">
  270. 默认皮肤
  271. </a>
  272. </span>
  273. </div>
  274. <div class="setings-item blue-skin nb">
  275. <span class="skin-name ">
  276. <a href="#" class="s-skin-1">
  277. 蓝色主题
  278. </a>
  279. </span>
  280. </div>
  281. <div class="setings-item yellow-skin nb">
  282. <span class="skin-name ">
  283. <a href="#" class="s-skin-3">
  284. 黄色/紫色主题
  285. </a>
  286. </span>
  287. </div>
  288. </div>
  289. </div>
  290. <div id="tab-2" class="tab-pane">
  291. <div class="sidebar-title">
  292. <h3> <i class="fa fa-comments-o"></i> 最新通知<small id="messageCount"><i class="fa fa-tim"></i> 您当前有0条未读通知</small></h3>
  293. </div>
  294. <ul class="sidebar-list">
  295. <li id="messageContent">
  296. </li>
  297. <li>
  298. <a href="javascript:goAllMessage();" id="messageFooter">
  299. 查看全部
  300. <i class="icon-arrow-right"></i>
  301. </a>
  302. </li>
  303. </ul>
  304. </div>
  305. <div id="tab-3" class="tab-pane">
  306. <div class="sidebar-title">
  307. <h3> <i class="fa fa-cube"></i> 最新公告<small id="noticeCount"><i class="fa fa-tim"></i> 您当前有0个公告</small></h3>
  308. </div>
  309. <ul class="sidebar-list">
  310. <li id="noticeContent">
  311. </li>
  312. <li>
  313. <a href="javascript:goAllNotice();" id="noticeFooter">
  314. 查看所有公告
  315. <i class="icon-arrow-right"></i>
  316. </a>
  317. </li>
  318. </ul>
  319. </div>
  320. </div>
  321. </div>
  322. </div>
  323. -->
  324. <!--右侧边栏结束-->
  325. <!--mini聊天窗口开始
  326. <%--<div class="small-chat-box fadeInRight animated">
  327. <div class="heading" draggable="true">
  328. <small class="chat-date pull-right">
  329. 2015.9.1
  330. </small> 与 Beau-zihan 聊天中
  331. </div>
  332. <div class="content">
  333. <div class="left">
  334. <div class="author-name">
  335. Beau-zihan <small class="chat-date">
  336. 10:02
  337. </small>
  338. </div>
  339. <div class="chat-message active">
  340. 你好
  341. </div>
  342. </div>
  343. <div class="right">
  344. <div class="author-name">
  345. 游客
  346. <small class="chat-date">
  347. 11:24
  348. </small>
  349. </div>
  350. <div class="chat-message">
  351. 你好,请问H+有帮助文档吗?
  352. </div>
  353. </div>
  354. <div class="left">
  355. <div class="author-name">
  356. Beau-zihan
  357. <small class="chat-date">
  358. 08:45
  359. </small>
  360. </div>
  361. <div class="chat-message active">
  362. 有,购买的H+源码包中有帮助文档,位于docs文件夹下
  363. </div>
  364. </div>
  365. <div class="right">
  366. <div class="author-name">
  367. 游客
  368. <small class="chat-date">
  369. 11:24
  370. </small>
  371. </div>
  372. <div class="chat-message">
  373. 那除了帮助文档还提供什么样的服务?
  374. </div>
  375. </div>
  376. <div class="left">
  377. <div class="author-name">
  378. Beau-zihan
  379. <small class="chat-date">
  380. 08:45
  381. </small>
  382. </div>
  383. <div class="chat-message active">
  384. 1.所有源码(未压缩、带注释版本);
  385. <br> 2.说明文档;
  386. <br> 3.终身免费升级服务;
  387. <br> 4.必要的技术支持;
  388. <br> 5.付费二次开发服务;
  389. <br> 6.授权许可;
  390. <br> ……
  391. <br>
  392. </div>
  393. </div>
  394. </div>
  395. <div class="form-chat">
  396. <div class="input-group input-group-sm">
  397. <input type="text" class="form-control"> <span class="input-group-btn"> <button
  398. class="btn btn-primary" type="button">发送
  399. </button> </span>
  400. </div>
  401. </div>
  402. </div>--%>
  403. <%--<div id="small-chat">
  404. <span class="badge badge-warning pull-right">5</span>
  405. <a class="open-small-chat">
  406. <i class="fa fa-comments"></i>
  407. </a>
  408. </div>--%>
  409. -->
  410. <!--mini聊天窗口结束-->
  411. </div>
  412. <!-- 全局js -->
  413. <script src="plug-in-ui/hplus/js/jquery.min.js?v=2.1.4"></script>
  414. <script src="plug-in-ui/hplus/js/bootstrap.min.js?v=3.3.6"></script>
  415. <script src="plug-in-ui/hplus/js/plugins/metisMenu/jquery.metisMenu.js"></script>
  416. <script src="plug-in-ui/hplus/js/plugins/slimscroll/jquery.slimscroll.min.js"></script>
  417. <script src="plug-in-ui/hplus/js/plugins/layer/layer.min.js"></script>
  418. <!-- 自定义js -->
  419. <script src="plug-in-ui/hplus/js/hplus.js?v=4.1.0"></script>
  420. <!--右键菜单-->
  421. <script type="text/javascript" src="plug-in/hplus/jquery-smartMenu.js"></script>
  422. <script type="text/javascript" src="plug-in/hplus/contabs.js"></script>
  423. <t:base type="tools"></t:base>
  424. <!-- 第三方插件 -->
  425. <script src="plug-in-ui/hplus/js/plugins/pace/pace.min.js"></script>
  426. <!-- Sweet alert -->
  427. <script src="plug-in-ui/hplus/js/plugins/sweetalert/sweetalert.min.js"></script>
  428. <script src="plug-in/jquery-plugs/storage/jquery.storageapi.min.js"></script>
  429. <!-- 弹出TAB -->
  430. <script type="text/javascript" src="plug-in/hplus/hplus-tab.js"></script>
  431. <!-- 在线聊天 -->
  432. <%--@include file="/context/layui.jsp"--%>
  433. <script>
  434. <%-- 定义定时器序号 --%>
  435. let IntervalIndex = 0;
  436. window.onload=getTime;
  437. var flg = true;
  438. function setZhankai(){
  439. if(flg) {
  440. document.getElementById("zhankai").src = "plug-in/index/images/shouqi.png";
  441. flg = false;
  442. } else {
  443. document.getElementById("zhankai").src = "plug-in/index/images/zhankai.png";
  444. flg = true;
  445. }
  446. }
  447. /**
  448. * 获取服务器时间
  449. **/
  450. function ajax(callback){
  451. if(typeof callback!='function') return;
  452. var ajaxObject;
  453. try{
  454. ajaxObject=new XMLHttpRequest();
  455. }catch(e){
  456. try{
  457. ajaxObject=new ActiveXObject('Microsoft.XMLHTTP');
  458. }catch(e){
  459. }
  460. }
  461. if(!ajaxObject) return;
  462. if(ajaxObject.overrideMimeType){
  463. ajaxObject.overrideMimeType('text/html');
  464. }
  465. //location.href可以换成其他url,但必须是同一个站点的链接,并且文件存在
  466. ajaxObject.open('get',location.href);
  467. ajaxObject.send(null);
  468. ajaxObject.onreadystatechange=function(){
  469. if(ajaxObject.readyState==4){
  470. if(ajaxObject.status==200){
  471. callback(ajaxObject);
  472. }
  473. }
  474. };
  475. }
  476. /**
  477. * 动态刷新
  478. **/
  479. function getTime(){
  480. ajax(
  481. function(ao){
  482. //只需要AJAX一次,将服务器时间获取后以毫秒为单位保存到一个变量中
  483. _timestamp=Date.parse(ao.getResponseHeader('Date'));
  484. _timestamp=_timestamp.toString().match(/^\d$/)?_timestamp:new Date().getTime();
  485. //设置定时器每过一秒动态刷新一次时间
  486. setInterval(
  487. function(){
  488. IntervalIndex ++;
  489. if(IntervalIndex % 10 === 0){
  490. getMyMsgCount();
  491. }
  492. let tagMsgCount = window.sessionStorage.getItem("tagMsgCount");
  493. if(tagMsgCount > 0){
  494. if(tagMsgCount > 99){
  495. $("#tagMsgCount").html("99+");
  496. }else{
  497. $("#tagMsgCount").html(tagMsgCount);
  498. }
  499. }
  500. //这里可以自定义时间显示格式
  501. document.getElementById('_timer').innerHTML=new Date(_timestamp).Format("yyyy-MM-dd hh:mm:ss");
  502. _timestamp+=1000;
  503. },
  504. 1000
  505. );
  506. }
  507. );
  508. }
  509. /**
  510. *对Date的扩展,将 Date 转化为指定格式的String
  511. *月(M)、日(d)、小时(h)、分(m)、秒(s)、季度(q) 可以用 1-2 个占位符,
  512. *年(y)可以用 1-4 个占位符,毫秒(S)只能用 1 个占位符(是 1-3 位的数字)
  513. *例子:
  514. *(new Date()).Format("yyyy-MM-dd hh:mm:ss.S") ==> 2006-07-02 08:09:04.423
  515. *(new Date()).Format("yyyy-M-d h:m:s.S") ==> 2006-7-2 8:9:4.18
  516. **/
  517. Date.prototype.Format = function (fmt) { //author: meizz
  518. var o = {
  519. "M+": this.getMonth() + 1, //月份
  520. "d+": this.getDate(), //日
  521. "h+": this.getHours(), //小时
  522. "m+": this.getMinutes(), //分
  523. "s+": this.getSeconds(), //秒
  524. "q+": Math.floor((this.getMonth() + 3) / 3), //季度
  525. "S": this.getMilliseconds() //毫秒
  526. };
  527. if (/(y+)/.test(fmt)) fmt = fmt.replace(RegExp.$1, (this.getFullYear() + "").substr(4 - RegExp.$1.length));
  528. for (var k in o)
  529. if (new RegExp("(" + k + ")").test(fmt)) fmt = fmt.replace(RegExp.$1, (RegExp.$1.length == 1) ? (o[k]) : (("00" + o[k]).substr(("" + o[k]).length)));
  530. return fmt;
  531. }
  532. function logout(){
  533. /*bootbox.confirm("<t:mutiLang langKey="common.exit.confirm"/>", function(result) {
  534. if(result)
  535. location.href="loginController.do?logout";
  536. });*/
  537. /*swal({
  538. title: "您确定要注销吗?",
  539. text: "注销后需要重新登录!",
  540. type: "warning",
  541. showCancelButton: true,
  542. confirmButtonColor: "#DD6B55",
  543. confirmButtonText: "确定",
  544. cancelButtonText: "取消",
  545. closeOnConfirm: false,
  546. closeOnCancel: true
  547. },
  548. function (isConfirm) {
  549. if (isConfirm) {
  550. //swal("注销成功!", "您已经成功注销。", "success");
  551. location.href="loginController.do?logout";
  552. } else {
  553. return false;
  554. }
  555. });*/
  556. layer.confirm('您确定要注销吗?', {
  557. btn: ['确定','取消'], //按钮
  558. shade: false //不显示遮罩
  559. }, function(){
  560. location.href="loginController.do?logout";
  561. }, function(){
  562. return;
  563. });
  564. }
  565. function clearLocalstorage(){
  566. var storage=$.localStorage;
  567. if(!storage)
  568. storage=$.cookieStorage;
  569. storage.removeAll();
  570. //bootbox.alert( "浏览器缓存清除成功!");
  571. layer.msg("浏览器缓存清除成功!");
  572. }
  573. function toJeecgYun(){
  574. window.open("http://yun.jeecg.org","_blank");
  575. }
  576. $(document).ready(function(){
  577. //加载公告
  578. // var url = "noticeController.do?getNoticeList";
  579. // jQuery.ajax({
  580. // url:url,
  581. // type:"GET",
  582. // dataType:"JSON",
  583. // async: false,
  584. // success:function(data){
  585. // if(data.success){
  586. // var noticeList = data.attributes.noticeList;
  587. // var noticeCount = data.obj;
  588. // //加载公告条数
  589. // if(noticeCount>99){
  590. // $("#noticeCount").html("99+");
  591. // }else{
  592. // $("#noticeCount").html(noticeCount);
  593. // }
  594. // //加载公告提示
  595. // var noticeTip = "";
  596. // noticeTip += "<i class='icon-warning-sign'></i>";
  597. // noticeTip += noticeCount+" "+data.attributes.tip;
  598. // $("#noticeTip").html(noticeTip);
  599. //
  600. // //加载公告条目
  601. // var noticeContent = "";
  602. // if(noticeList.length > 0){
  603. // for(var i=0;i<noticeList.length;i++){
  604. // noticeContent +="<li><a href='javascript:goNotice(&quot;"+noticeList[i].id+"&quot;)' ";
  605. // noticeContent +="style='word-break:keep-all;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;'>";
  606. // noticeContent +="<i class='btn btn-xs btn-primary fa fa-user'></i>";
  607. // noticeContent +="&nbsp;"+noticeList[i].noticeTitle + "</a></li></ul></li>";
  608. // }
  609. // }
  610. // //alert(noticeContent);
  611. // $("#noticeContent").html(noticeContent);
  612. //
  613. // //加载公告底部文字
  614. // var noticeSeeAll = data.attributes.seeAll +"<i class='ace-icon fa fa-arrow-right'></i>";
  615. // $("#noticeFooter").html(noticeSeeAll);
  616. // }
  617. // }
  618. // });
  619. //加载消息
  620. // var url = "tSSmsController.do?getMessageList";
  621. // $.ajax({
  622. // url:url,
  623. // type:"GET",
  624. // dataType:"JSON",
  625. // async: false,
  626. // success:function(data){
  627. // if(data.success){
  628. // var messageList = data.attributes.messageList;
  629. // var messageCount = data.obj;
  630. // //加载消息条数
  631. // if(messageCount>99){
  632. // $("#messageCount").html("99+");
  633. // }else{
  634. // $("#messageCount").html(messageCount);
  635. // }
  636. // //加载消息tip提示
  637. // var messageTip = "";
  638. // messageTip += "<i class='ace-icon fa fa-envelope-o'></i>";
  639. // messageTip += messageCount+" "+data.attributes.tip;
  640. // $("#messageTip").html(messageTip);
  641. //
  642. // //加载消息条目(有限)
  643. // var messageContent = "";
  644. // if(messageList.length > 0){
  645. // for(var i=0;i<messageList.length;i++){
  646. // messageContent +="<li><a href='javascript:goMessage(&quot;"+messageList[i].id+"&quot;)' class='clearfix'>";
  647. // messageContent +="<img src='plug-in/ace/avatars/avatar3.png' class='msg-photo' alt='Alex’s Avatar' />";
  648. // messageContent +="<span class='msg-body'><span class='msg-title'>";
  649. // messageContent +="<span class='blue'>"+messageList[i].esSender+":</span>";
  650. // messageContent += messageList[i].esTitle + "</span>";
  651. // messageContent +="<span class='msg-time'><i class='ace-icon fa fa-clock-o'></i><span>"+messageList[i].esSendtimeTxt+"</span></span>";
  652. // messageContent +="</span></a><input id='"+messageList[i].id+"_title' type='hidden' value='"+messageList[i].esTitle+"'>";
  653. // messageContent +="<input id='"+messageList[i].id+"_status' type='hidden' value='"+messageList[i].esStatus+"'>";
  654. // messageContent +="<input id='"+messageList[i].id+"_content' type='hidden' value='"+messageList[i].esContent+"'></li>";
  655. // }
  656. // }
  657. // $("#messageContent").html(messageContent);
  658. //
  659. // //加载消息底部文字
  660. // var messageSeeAll = data.attributes.seeAll +"<i class='ace-icon fa fa-arrow-right'></i>";
  661. // $("#messageFooter").html(messageSeeAll);
  662. // }
  663. // }
  664. // });
  665. //update-begin--Author:zhoujf Date:20170309 for:TASK #975 【首页提醒】我的任务
  666. //加载待办任务
  667. // del-刘梦祥-2022年8月2日13:20:51(暂时删除无用请求)
  668. // var url = "taskController.do?getTaskCount";
  669. // jQuery.ajax({
  670. // url:url,
  671. // type:"GET",
  672. // dataType:"JSON",
  673. // async: false,
  674. // success:function(data){
  675. // if(data.success){
  676. // var taskCount = data.obj;
  677. // //加载待办任务条数
  678. // if(taskCount > 0){
  679. // if(taskCount>99){
  680. // $("#tagMsgCount").html("99+");
  681. // }else{
  682. // $("#tagMsgCount").html(taskCount);
  683. // }
  684. // document.getElementById('tagMsgCountBox').style.display = "block";
  685. // }else{
  686. // document.getElementById('tagMsgCountBox').style.display = "none";
  687. // }
  688. // }
  689. // }
  690. // });
  691. //update-begin--Author:zhoujf Date:20170309 for:TASK #975 【首页提醒】我的任务
  692. getMyMsgCount();
  693. });
  694. function getMyMsgCount(){
  695. var url = "sysMsgController.do?getMyMsgCount";
  696. jQuery.ajax({
  697. url:url,
  698. type:"GET",
  699. dataType:"JSON",
  700. async: false,
  701. success:function(data){
  702. if(data && data > 0){
  703. window.sessionStorage.setItem("tagMsgCount",data)
  704. if(data>99){
  705. $("#tagMsgCount").html("99+");
  706. }else{
  707. $("#tagMsgCount").html(data);
  708. }
  709. document.getElementById('tagMsgCountBox').style.display = "block";
  710. }else{
  711. window.sessionStorage.setItem("tagMsgCount",0)
  712. hideTag();
  713. }
  714. }
  715. });
  716. };
  717. function hideTag(){
  718. // add-刘梦祥-2022年8月2日17:13:41(添加操作,隐藏tag标记)
  719. document.getElementById('tagMsgCountBox').style.display = "none";
  720. };
  721. function goAllNotice(){
  722. var addurl = "noticeController.do?noticeList";
  723. createdetailwindow("公告", addurl, 800, 400);
  724. }
  725. function goNotice(id){
  726. var addurl = "noticeController.do?goNotice&id="+id;
  727. createdetailwindow("通知公告详情", addurl, 750, 600);
  728. }
  729. function goAllMessage(){
  730. var addurl = "tSSmsController.do?getSysInfos";
  731. createdetailwindow("通知", addurl, 800, 400);
  732. }
  733. function goMessage(id){
  734. var title = $("#"+id+"_title").val();
  735. var content = $("#"+id+"_content").val();
  736. $("#msgId").val(id);
  737. $("#msgTitle").html(title);
  738. $("#msgContent").html(content);
  739. var status = $("#"+id+"_status").val();
  740. if(status==1){
  741. $("#msgStatus").html("未读");
  742. }else{
  743. $("#msgStatus").html("已读");
  744. }
  745. $('.theme-popover-mask').fadeIn(100);
  746. $('.theme-popover').slideDown(200);
  747. }
  748. function readMessage(){
  749. var msgId = $("#msgId").val();
  750. var url = "tSSmsController.do?readMessage";
  751. $.ajax({
  752. url:url,
  753. type:"GET",
  754. dataType:"JSON",
  755. data:{
  756. messageId:msgId
  757. },
  758. success:function(data){
  759. if(data.success){
  760. $("#msgStatus").html("已读");
  761. $("#"+msgId+"_status").val('2');
  762. }
  763. }
  764. });
  765. }
  766. //update-begin--Author:xuelin Date:20170328 for:[#1820]顶部个人信息弹出层不回缩现象--------------------
  767. //个人信息弹出层回缩
  768. function frameBodyClick(){
  769. $(".count-info").attr("aria-expanded","false").parent().removeClass("open");
  770. }
  771. //新增iframe中绑定click事件回调父级函数
  772. function bindFrameClick(){
  773. $(".J_iframe").contents().find("body").attr("onclick", "parent.frameBodyClick()");
  774. }
  775. //update-end--Author:xuelin Date:20170328 for:[#1820]顶部个人信息弹出层不回缩现象----------------------
  776. /* $(function(){
  777. console.log(3);
  778. }); */
  779. </script>
  780. </body>
  781. <style>
  782. #tagMsgCountBox{
  783. position: absolute;
  784. top: 0.5rem;
  785. right: 0;
  786. border-radius: 2rem;
  787. background-color: #F56C6CCC;
  788. text-align: center;
  789. color: #FFFFFFFF;
  790. border: 1px solid #F56C6C;
  791. display: none;
  792. animation-name: tagAnimation;
  793. animation-duration: 5s;
  794. animation-iteration-count: infinite;
  795. }
  796. #tagMsgCount{
  797. display: flex;
  798. align-content: center;
  799. justify-content: center;
  800. align-items: center;
  801. padding: 0 0.65rem;
  802. }
  803. @keyframes tagAnimation {
  804. 0% {top: 0.5rem;}
  805. 3% {top: 0rem;}
  806. 6% {top: 0.5rem;}
  807. 9% {top: 0.3rem;}
  808. 12% {top: 0.5rem;}
  809. 100% {top: 0.5rem;}
  810. }
  811. </style>
  812. </html>