testingbgman.jsp 18 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507
  1. <%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
  2. <%@ page import="com.runzhixing.constant.Constant"%>
  3. <%@ page import="com.runzhixing.bean.User"%>
  4. <%@ page import="com.runzhixing.bean.Announcement"%>
  5. <%@ page import="java.util.List"%>
  6. <%@ page import="com.runzhixing.packageProcedure.InformationAnnouncementProcedure"%>
  7. <%
  8. String path = request.getContextPath();
  9. String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
  10. String username = (String)session.getAttribute("username");
  11. String place = (String) session.getAttribute("place");
  12. if(place!=null&&!place.trim().equals("")){
  13. String end = place.substring(place.length()-1,place.length());
  14. if(end.equals("市")||end.equals("县")) place= place.substring(0,place.length()-1);
  15. }
  16. User uu = (User)session.getAttribute(Constant.userMark);
  17. String s = uu.getPrivilegeCode();
  18. if(s.length()>6) {
  19. s = s.substring(0, 6);
  20. }
  21. s = s.replaceAll("(00)*$", "");//// 一直过滤到最高行政地域(删去尾部的 00 )
  22. List<Announcement> list = new InformationAnnouncementProcedure().areatedmachinerunningstate1(5000, 1, -1, s, s, null, null, null, 0);
  23. int id=-1;
  24. String title="";
  25. String anTime="";
  26. if(list.size()>0){
  27. for(Announcement an:list){
  28. if(an.getId()>id){
  29. id=an.getId();
  30. title = an.getTitle();
  31. anTime = an.getPublishTime1();
  32. }
  33. }
  34. }
  35. //查询各部门有效期
  36. String validity="";
  37. List<Announcement> list1 = new InformationAnnouncementProcedure()
  38. .checkValidity((String)request.getSession().getAttribute("PrivilegeCode"),(String)request.getSession().getAttribute("sOperatorNo"),s,Integer.parseInt((String)session.getAttribute(Constant.moudel)));
  39. if (list1.size() > 0) {
  40. Announcement an = new Announcement();
  41. an=list1.get(0);
  42. if(an.getL()>0){
  43. validity+="<span style='color: yellow;'>证书快过期!";
  44. }else{
  45. validity+="<span style='color: red;'>证书已过期!";
  46. }
  47. validity+= "<br/>站点编号:"+an.getStationNo()+" <br/>站点名:"+an.getStationName()+" <br/>有效期:"+an.getValidity()+" <br/>联系人:"+an.getManager()+" <br/>电话:"+an.getPhone();
  48. validity+="</span>";
  49. }
  50. if (list1.size() > 1) {
  51. validity+="<br/><a href='CheckValidity' target='_blank'>还有"+(list1.size()-1)+"条过期信息,点击查询&gt;&gt;</a>";
  52. }
  53. %>
  54. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  55. <html xmlns="http://www.w3.org/1999/xhtml">
  56. <head id="Head1">
  57. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  58. <meta http-equiv="X-UA-Compatible" content="IE=9"/>
  59. <meta http-equiv="X-UA-Compatible" content="IE=10"/>
  60. <title>CNG气瓶实时动态监管集成系统</title>
  61. <link href="css/default.css" rel="stylesheet" type="text/css" />
  62. <link rel="stylesheet" type="text/css" href="css/easyui/themes/default/easyui.css">
  63. <link rel="stylesheet" type="text/css" href="css/easyui/themes/icon.css">
  64. <link rel="stylesheet" type="text/css" href="css/easyui/demo/demo.css">
  65. <script type="text/javascript" src="css/easyui/jquery.min.js"></script>
  66. <script type="text/javascript" src="css/easyui/jquery.easyui.min.js"></script>
  67. <script type="text/javascript" src="js/easyui/XiuCai.index.js"> </script>
  68. <style type="text/css">
  69. .hzb a:HOVER{
  70. color: red;
  71. text-decoration: underline;
  72. }
  73. .hzb a{
  74. color: #f08300;
  75. text-decoration: underline;
  76. }
  77. </style>
  78. <script type="text/javascript">
  79. $(document).ready(function(){
  80. var newAnnTitle = document.getElementById("newAnnTitle").value;
  81. var newAnnID = document.getElementById("newAnnID").value;
  82. var newAnnTIME = document.getElementById("newAnnTIME").value;
  83. if(!newAnnID){
  84. show1("暂时没有公告!");
  85. }else{
  86. if(newAnnID=="-1"){
  87. show1("暂时没有公告!");
  88. }else{
  89. if(!newAnnTitle){
  90. show1("有新公告,标题:"+'<span class="hzb"><a href="Detailbyid?hiddenID='+newAnnID+'" target="_blank">'+无标题+'('+newAnnTIME+')'+'</span></a>');
  91. }else{
  92. show1("有新公告,标题:"+'<span class="hzb"><a href="Detailbyid?hiddenID='+newAnnID+'" target="_blank">'+newAnnTitle+'('+newAnnTIME+')'+'</span></a>');
  93. }
  94. }
  95. }
  96. var validity = document.getElementById("validity").value;
  97. if(validity){
  98. $.messager.show({
  99. title: '证书信息提示',
  100. msg: validity,
  101. timeout: 0,
  102. showType: 'slide' ,
  103. width:400,
  104. height:200
  105. });
  106. }
  107. });
  108. var _menus = {
  109. "menus": [{
  110. "menuid": "55",
  111. "icon": "icon-more",
  112. "menuname": "信息管理",
  113. "menus": [{
  114. "menuid": "31",
  115. "menuname": "公告信息查看",
  116. "icon": "icon-search",
  117. "url": "jsp/rzx/infoMan/CheckAnnouncementInfofilling.jsp"
  118. }]
  119. },
  120. {
  121. "menuid": "56",
  122. "icon": "icon-large-smartart",
  123. "menuname": "检验情况",
  124. "menus": [{
  125. "menuid": "144",
  126. "menuname": "当天检验情况",
  127. "icon": "icon-large-chart",
  128. "url": "jsp/rzx/filling/todayTesting.jsp"
  129. }]
  130. },
  131. {
  132. "menuid": "1",
  133. "icon": "icon-tip",
  134. "menuname": "数据管理",
  135. "menus": [{
  136. "menuid": "121",
  137. "menuname": "特种设备数据录入",
  138. "icon": "icon-filter",
  139. "url": "jsp/rzx/dataMan/Specialequipmentdatainto.jsp"
  140. }]
  141. },
  142. {
  143. "menuid": "56",
  144. "icon": "icon-search",
  145. "menuname": "数据查询",
  146. "menus": [
  147. {
  148. "menuid": "195",
  149. "menuname": "检验数据查询",
  150. "icon": "icon-search",
  151. "url": "jsp/rzx/dataQuery/TestingdataQuerytesting.jsp"
  152. },{
  153. "menuid": "165",
  154. "menuname": "监检数据查询",
  155. "icon": "icon-search",
  156. "url": "jsp/rzx/dataQuery/checkSeeQuerytesting.jsp"
  157. },
  158. {
  159. "menuid": "205",
  160. "menuname": "车辆数据查询",
  161. "icon": "icon-search",
  162. "url": "jsp/rzx/dataQuery/CarsdataQuerytesting.jsp"
  163. },{
  164. "menuid": "165",
  165. "menuname": "气瓶数据查询",
  166. "icon": "icon-search",
  167. "url": "jsp/rzx/dataQuery/CylinderdataQuery1testing.jsp?clear=1"
  168. },{
  169. "menuid": "165",
  170. "menuname": "标签发放信息",
  171. "icon": "icon-search",
  172. "url": "jsp/rzx/dataQuery/tagIssuingInfotesting.jsp"
  173. },
  174. {
  175. "menuid": "215",
  176. "menuname": "特种设备数据查询",
  177. "icon": "icon-search",
  178. "url": "jsp/rzx/dataQuery/SpecialequipmentdataQuerytesting.jsp"
  179. }]
  180. },
  181. {
  182. "menuid": "56",
  183. "icon": "icon-large-chart",
  184. "menuname": "数据统计",
  185. "menus": [{
  186. "menuid": "145",
  187. "menuname": "标签数据统计",
  188. "icon": "icon-large-chart",
  189. "url": "jsp/rzx/dataStatistics/TagdataStatistics.jsp"
  190. },
  191. {
  192. "menuid": "155",
  193. "menuname": "车辆数据统计",
  194. "icon": "icon-large-shapes",
  195. "url": "jsp/rzx/dataStatistics/CarsdataStatistics.jsp"
  196. },
  197. {
  198. "menuid": "165",
  199. "menuname": "气瓶数据统计",
  200. "icon": "icon-large-smartart",
  201. "url": "jsp/rzx/dataStatistics/CylinderdataStatistics.jsp"
  202. },{
  203. "menuid": "165",
  204. "menuname": "标签发放信息统计",
  205. "icon": "icon-search",
  206. "url": "jsp/rzx/dataStatistics/tagIssuingInfoStatistics.jsp"
  207. }]
  208. },
  209. {
  210. "menuid": "56",
  211. "icon": "icon-more",
  212. "menuname": "系统管理",
  213. "menus": [{
  214. "menuid": "143",
  215. "menuname": "站点信息查看",
  216. "icon": "icon-more",
  217. "url": "jsp/rzx/systemMan/testingStationInfoCheck.jsp"
  218. },
  219. {
  220. "menuid": "153",
  221. "menuname": "工作人员信息",
  222. "icon": "icon-tip",
  223. "url": "jsp/rzx/systemMan/testingworkPersonInfo.jsp"
  224. }
  225. ]
  226. }]
  227. };
  228. //设置登录窗口
  229. function openlogin() {
  230. $('#l').window({
  231. title: '登陆',
  232. width: 300,
  233. modal: true,
  234. shadow: true,
  235. closed: true,
  236. height: 160,
  237. resizable:false
  238. });
  239. }
  240. function openPwd() {
  241. $('#w').window({
  242. title: '修改密码',
  243. width: 300,
  244. modal: true,
  245. shadow: true,
  246. closed: true,
  247. height: 'auto',
  248. resizable:false
  249. });
  250. }
  251. //关闭修改密码窗口
  252. function closePwd() {
  253. $('#w').window('close');
  254. }
  255. //关闭登录窗口
  256. function closelogin() {
  257. $('#l').window('close');
  258. }
  259. //登陆
  260. function serverLogin() {
  261. var $name = $('#txtName');
  262. var $pass = $('#txtPass');
  263. if ($name.val() == '') {
  264. msgShow('系统提示', '请输入用户名!', 'warning');
  265. return false;
  266. }
  267. if ($pass.val() == '') {
  268. msgShow('系统提示', '请输入密码!', 'warning');
  269. return false;
  270. }
  271. $.post('ajax/ajax_login?name=' + $name.val()+'&pass='+$pass.val(), function(msg) {
  272. msgShow('系统提示', '恭喜,登陆成功!<br>欢迎您:' + msg, 'info');
  273. $name.val('');
  274. $pass.val('');
  275. $('#l').window('close');
  276. })
  277. }
  278. //修改密码
  279. function serverAlterpass() {
  280. var $oldpass = $('#txtOldPass').val().replace(/\s+/g,"");;
  281. var $newpass = $('#txtNewPass').val().replace(/\s+/g,"");;
  282. var $rePass = $('#txtRePass').val().replace(/\s+/g,"");;
  283. if ($oldpass == '') {
  284. msgShow('系统提示', '请输入旧密码!', 'warning');
  285. return false;
  286. }
  287. if ($newpass == '') {
  288. msgShow('系统提示', '请输入新密码!', 'warning');
  289. return false;
  290. }
  291. if ($rePass == '') {
  292. msgShow('系统提示', '请再一次输入新密码!', 'warning');
  293. return false;
  294. }
  295. if ($newpass != $rePass) {
  296. msgShow('系统提示', '两次密码不一至!请重新输入', 'warning');
  297. return false;
  298. }
  299. $.ajax({
  300. type:"POST",
  301. contentType: "application/x-www-form-urlencoded; charset=UTF-8",
  302. data:$('#alterpasswordform').serialize(),
  303. url:"ajax/alterpassword",
  304. success:function (data){
  305. var obj=eval("(" + data + ")");
  306. $.each(obj.rows, function(i,item){
  307. if(item.sresult=="0"){
  308. $('#txtOldPass').val('');
  309. $('#txtNewPass').val('');
  310. $('#txtRePass').val('');
  311. $('#w').window('close');
  312. // msgShow('系统提示', '恭喜,密码修改成功!<br>您的新密码为:' + item.pass, 'info');
  313. show("修改成功您的新密码为:"+item.pass.substring(0,1)+"********");
  314. }else if(item.sresult=="2"){
  315. show("修改错误");
  316. }else if(item.sresult=="3"){
  317. show("用户不存在");
  318. }else if(item.sresult=="4"){
  319. show("旧密码错误");
  320. }
  321. });
  322. }
  323. });
  324. }
  325. function show(message) {
  326. $.messager.show({
  327. title: '提示信息',
  328. msg: message,
  329. timeout: 2000,
  330. showType: 'slide'
  331. });
  332. }
  333. function show1(message) {
  334. $.messager.show({
  335. title: '提示信息',
  336. msg: message,
  337. timeout: 15000,
  338. showType: 'slide'
  339. });
  340. }
  341. $(function() {
  342. openlogin();
  343. openPwd();
  344. $('#login').click(function() {
  345. $('#l').window('open');
  346. });
  347. $('#btnlogin').click(function() {
  348. serverLogin();
  349. })
  350. $('#btnloginCancel').click(function(){closelogin();})
  351. $('#editpass').click(function() {
  352. $('#w').window('open');
  353. });
  354. $('#btnEp').click(function() {
  355. serverAlterpass();
  356. })
  357. $('#btnCancel').click(function(){closePwd();})
  358. $('#loginOut').click(function() {
  359. $.messager.confirm('系统提示', '您确定要退出本次登录吗?', function(r) {
  360. if (r) {
  361. location.href = 'jsp/login/loginre.jsp';
  362. }
  363. });
  364. })
  365. });
  366. </script>
  367. </head>
  368. <body class="easyui-layout" style="overflow-y: hidden" fit="true" scroll="no">
  369. <noscript>
  370. <div style=" position:absolute; z-index:100000; height:2046px;top:0px;left:0px; width:100%; background:white; text-align:center;">
  371. <img src="images/noscript.gif" alt='抱歉,请开启脚本支持!' />
  372. </div></noscript>
  373. <div id="loading-mask" style="position:absolute;top:0px; left:0px; width:100%; height:100%; background:#D2E0F2; z-index:20000">
  374. <div id="pageloading" style="position:absolute; top:50%; left:50%; margin:-120px 0px 0px -120px; text-align:center; border:2px solid #8DB2E3; width:200px; height:40px; font-size:14px;padding:10px; font-weight:bold; background:#fff; color:#15428B;">
  375. <img src="images/loading.gif" align="absmiddle" /> 正在加载中,请稍候...</div>
  376. </div>
  377. <div region="north" split="true" border="false" style="overflow: hidden; height: 30px;
  378. background: url(images/rzx/layout-browser-hd-bg.gif) #7f99be repeat-x center 50%;
  379. line-height: 20px;color: #fff; font-family: Verdana, 微软雅黑,黑体">
  380. <span style="float:right; padding-right:20px;" class="head">欢迎您 <%=username %> <a href="#" id="editpass">修改密码</a> <a href="#" id="loginOut">安全退出</a></span>
  381. <span style="padding-left:10px; font-size: 16px; "><img src="images/rzx/blocks.gif" width="20" height="20" align="absmiddle" />气瓶电子标签动态监管集成系统-<%=place %> 检验站管理</span>
  382. </div>
  383. <div region="south" split="true" style="height: 30px; background: #D2E0F2; ">
  384. <div class="footer">By 四川润智兴科技有限公司 版权所有</div>
  385. </div>
  386. <div region="west" split="true" title="导航菜单" style="width:180px;" id="west">
  387. <div id="nav">
  388. <!-- 导航内容 -->
  389. </div>
  390. </div>
  391. <div id="mainPanle" region="center" style="background: #eee; overflow-y:hidden">
  392. <div id="tabs" class="easyui-tabs" fit="true" border="false" >
  393. <div title="欢迎使用" style="padding:20px;overflow:hidden; color:#f08300; " >
  394. <center><h1 style="font-size:24px;">气瓶电子标签动态监管集成系统-<%=place %> 检验站管理</h1></center>
  395. </div>
  396. </div>
  397. </div>
  398. <!--修改密码窗口-->
  399. <div id="w" class="easyui-window" title="修改密码" collapsible="false" minimizable="false"
  400. maximizable="false" icon="icon-save" style="width: 300px; height: auto; padding: 5px;
  401. background: #fafafa;">
  402. <form id="alterpasswordform">
  403. <div fit="true" >
  404. <div region="center" border="false" style="padding: 0px; background: #fff; border: 1px solid #ccc;height: auto;">
  405. <table cellpadding=3>
  406. <tr>
  407. <td>旧密码:</td>
  408. <td><input id="txtOldPass" name="txtOldPass" type="Password" class="txt01" /></td>
  409. </tr>
  410. <tr>
  411. <td>新密码:</td>
  412. <td><input id="txtNewPass" name="txtNewPass" type="Password" class="txt01" /></td>
  413. </tr>
  414. <tr>
  415. <td>确认密码:</td>
  416. <td><input id="txtRePass" type="Password" name="txtRePass" class="txt01" /></td>
  417. </tr>
  418. </table>
  419. </div>
  420. <div region="south" border="false" style="text-align: right; height: 30px; line-height: 30px;">
  421. <a id="btnEp" class="easyui-linkbutton" icon="icon-ok" href="javascript:void(0)" >
  422. 确定</a> <a id="btnCancel" class="easyui-linkbutton" icon="icon-cancel" href="javascript:void(0)">取消</a>
  423. </div>
  424. </div>
  425. </form>
  426. </div>
  427. <!--登陆窗口-->
  428. <div id="l" class="easyui-window" title="登陆窗口" collapsible="false" minimizable="false"
  429. maximizable="false" icon="icon-save" style="width: 300px; height: 150px; padding: 15px;
  430. background: #fafafa;">
  431. <div class="easyui-layout" fit="true">
  432. <div region="center" border="false" style="padding: 10px; background: #fff; border: 1px solid #ccc;">
  433. <table cellpadding=3>
  434. <tr>
  435. <td>用户名:</td>
  436. <td><input id="txtName" type="text" class="txt01" /></td>
  437. </tr>
  438. <tr>
  439. <td>密码:</td>
  440. <td><input id="txtPass" type="Password" class="txt01" /></td>
  441. </tr>
  442. </table>
  443. </div>
  444. <div region="south" border="false" style="text-align: right; ">
  445. <a id="btnlogin" class="easyui-linkbutton" icon="icon-ok" href="javascript:void(0)" >
  446. 确定</a> <a id="btnloginCancel" class="easyui-linkbutton" icon="icon-cancel" href="javascript:void(0)">取消</a>
  447. </div>
  448. </div>
  449. </div>
  450. <div id="mm" class="easyui-menu" style="width:150px;">
  451. <div id="tabupdate">刷新</div>
  452. <div class="menu-sep"></div>
  453. <div id="close">关闭</div>
  454. <div id="closeall">全部关闭</div>
  455. <div id="closeother">除此之外全部关闭</div>
  456. <div class="menu-sep"></div>
  457. <div id="closeright">当前页右侧全部关闭</div>
  458. <div id="closeleft">当前页左侧全部关闭</div>
  459. <div class="menu-sep"></div>
  460. <div id="exit">退出</div>
  461. </div>
  462. <input type="hidden" value="<%=title %>" name="newAnnTitle" id="newAnnTitle"/>
  463. <input type="hidden" value="<%=id %>" name="newAnnID" id="newAnnID"/>
  464. <input type="hidden" value="<%=anTime %>" name="newAnnTIME" id="newAnnTIME"/>
  465. <input type="hidden" value="<%=validity%>" name="validity" id="validity"/>
  466. </body>
  467. </html>