modifybgman.jsp 16 KB

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