main.html 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110
  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> 报表系统</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. //加载登录用户
  43. $.get('sessionget.ashx?r=' + Math.random(), function (data) {
  44. var json = JSON.parse(data);
  45. if (json['success'] == true) {
  46. $('#tbExit').linkbutton({
  47. text: json['rows'][0]['userCode'] + ' 退出登录'
  48. });
  49. }
  50. else {
  51. $('#tbExit').linkbutton({
  52. text: ' 退出登录'
  53. });
  54. //$.messager.alert('用户登录', json['message'], 'error');
  55. $.messager.confirm('用户登录', json['message'] + '\n 点击确定重新登录!', function (r) {
  56. if (r) {
  57. window.location.href = "/mes";
  58. }
  59. });
  60. }
  61. });
  62. //加载导航菜单
  63. $('#menu').treeLoad({
  64. url: 'tree.ashx?r=' + Math.random()
  65. });
  66. //打开首页看板
  67. $('#tabs').tabsOpen({
  68. title: '欢迎',
  69. url: 'dashboard.html?r=' + Math.random(),
  70. closable: false
  71. });
  72. //接收url(通常是从winform过来的url)
  73. if (request('go') != '') {
  74. $('#tabs').tabsOpen({
  75. title: request('title'),
  76. url: request('go') + '?r=' + Math.random(),
  77. closable: true
  78. });
  79. }
  80. })
  81. //退出登录
  82. function exit() {
  83. $.messager.confirm('退出系统', '您确定退出系统吗?', function (r) {
  84. if (r) {
  85. $.get('logout.ashx?r=' + Math.random(), function (data) {
  86. var json = JSON.parse(data);
  87. if (json['success'] == true) {
  88. window.location.href = 'index.html';
  89. }
  90. else {
  91. $.messager.alert('退出登录', '退出操作失败!', 'error');
  92. }
  93. });
  94. }
  95. });
  96. }
  97. </script>
  98. </body>
  99. </html>