main.html 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119
  1. <!DOCTYPE html>
  2. <html>
  3. <head>
  4. <meta charset="utf-8" />
  5. <meta name="keywords" content="dongke,mes,ibossmes">
  6. <meta name="description" content="制造企业生产过程执行管理系统">
  7. <meta name="author" content="xuwei">
  8. <title>东科软件</title>
  9. <script src="/plugins/xeasyui/xeasyui.js"></script>
  10. </head>
  11. <body class="easyui-layout">
  12. <!--页头-->
  13. <div data-options="region:'north'" style="height:50px;background-image:url('/img/top_bg.png');background-position-y:center;">
  14. <div style="display:flex;">
  15. <div style="">
  16. <img src="/img/logo3.png" style="height:30px;position:absolute;top:8px;left:10px;" />
  17. <span style="font-size:20px;position:absolute;top:12px;left:50px;"><span style="font-weight:600;">东科软件 <font color="red">D</font>ONG<font color="red">K</font>E iBOSS-MES</span><!--(Manufacturing Execution System)--></span>
  18. </div>
  19. <div style="margin-left:auto;padding:5px;">
  20. <!--<a href="javascript:$('#tree').layout();">测试</a>-->
  21. <a href="javascript:void(0)" id="tbExit" class="easyui-linkbutton" data-options="plain:true,iconCls:'icon-redo'" onclick="exit()">退出登录</a>
  22. </div>
  23. </div>
  24. </div>
  25. <!--左边栏-->
  26. <div id="tree" data-options="region:'west',split:true,title:'导航菜单'" style="width:260px;padding:4px;">
  27. <!--左侧菜单-->
  28. <div id="menu" ></div>
  29. </div>
  30. <!--主体-->
  31. <div data-options="region:'center',plain:true">
  32. <div id="tabs" class="easyui-tabs" data-options="fit:true,border:false,plain:false"></div>
  33. </div>
  34. <!--右边栏-->
  35. <!--<div data - options="region:'east',split:true" title = "East" style = "width:200px;" ></div> -->
  36. <!--页尾-->
  37. <div data-options="region:'south'" style="height:30px;text-align:center;background-color:#444;">
  38. <div style="padding-top:3px; color:lightgray">版权所有:© 2019-2020 沈阳东科云信软件有限公司 <a href="http://www.dongkesoft.com" target="_blank">http://www.dongkesoft.com</a></div>
  39. </div>
  40. <script>
  41. $(function () {
  42. //$.messager.alert("东科软件","您使用的是临时授权,已于2021年3月1日过期。为了不影响您的使用,请尽快联系东科软件更换新的授权文件。");
  43. //加载登录用户
  44. $.get('sessionget.ashx?r=' + Math.random(), function (data) {
  45. var json = JSON.parse(data);
  46. console.log("sessionget----",json)
  47. if (json['success'] == true) {
  48. $('#tbExit').linkbutton({
  49. text: json['rows'][0]['userCode'] + ' 退出登录'
  50. });
  51. // 250714 追加登录用户存储
  52. localStorage.setItem('accountId', json['rows'][0]["accountId"]);
  53. localStorage.setItem('userId', json['rows'][0]["userId"]);
  54. localStorage.setItem('accountCode', json['rows'][0]["accountCode"]);
  55. }
  56. else {
  57. $('#tbExit').linkbutton({
  58. text: ' 退出登录'
  59. });
  60. //$.messager.alert('用户登录', json['message'], 'error');
  61. $.messager.confirm('用户登录', json['message'] + '\n 点击确定重新登录!', function (r) {
  62. if (r) {
  63. window.location.href = "/mes";
  64. }
  65. });
  66. }
  67. });
  68. //加载导航菜单
  69. $('#menu').treeLoad({
  70. url: 'tree.ashx?r=' + Math.random()
  71. });
  72. //打开首页看板
  73. $('#tabs').tabsOpen({
  74. title: '欢迎',
  75. //url: 'dashboard.html?r=' + Math.random(),
  76. url: 'blank.html?r=' + Math.random(),
  77. closable: false
  78. });
  79. //接收url(通常是从winform过来的url)
  80. if (request('go') != '') {
  81. $('#tabs').tabsOpen({
  82. title: request('title'),
  83. url: request('go') + '?r=' + Math.random(),
  84. closable: true
  85. });
  86. }
  87. })
  88. //退出登录
  89. function exit() {
  90. $.messager.confirm('退出系统', '您确定退出系统吗?', function (r) {
  91. if (r) {
  92. $.get('logout.ashx?r=' + Math.random(), function (data) {
  93. var json = JSON.parse(data);
  94. if (json['success'] == true) {
  95. window.location.href = 'index.html';
  96. }
  97. else {
  98. $.messager.alert('退出登录', '退出操作失败!', 'error');
  99. }
  100. });
  101. }
  102. });
  103. }
  104. </script>
  105. </body>
  106. </html>