main.html 4.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113
  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_blue.png');background-position-y:center;">
  14. <div style="display:flex;">
  15. <div style="">
  16. <img src="/img/hegii2.png" style="height:20px;position:absolute;top:15px;left:10px;" />
  17. <span style="font-size:20px;position:absolute;top:12px;left:170px;font-weight:600"> MES-BI </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. if (request("client") == "web")
  58. window.location.href = "/mes";
  59. else
  60. window.location.href = "http://172.18.32.33/?port=9000";
  61. }
  62. });
  63. }
  64. });
  65. //加载导航菜单
  66. $('#menu').treeLoad({
  67. url: 'tree.ashx?r=' + Math.random()
  68. });
  69. //打开首页看板
  70. $('#tabs').tabsOpen({
  71. title: '欢迎',
  72. url: 'blank.html?r=' + Math.random(),
  73. closable: false
  74. });
  75. //接收url(通常是从winform过来的url)
  76. if (request('go') != '') {
  77. $('#tabs').tabsOpen({
  78. title: request('title'),
  79. url: request('go') + '?r=' + Math.random(),
  80. closable: true
  81. });
  82. }
  83. })
  84. //退出登录
  85. function exit() {
  86. $.messager.confirm('退出系统', '您确定退出系统吗?', function (r) {
  87. if (r) {
  88. $.get('logout.ashx?r=' + Math.random(), function (data) {
  89. var json = JSON.parse(data);
  90. if (json['success'] == true) {
  91. window.location.href = 'index.html';
  92. }
  93. else {
  94. $.messager.alert('退出登录', '退出操作失败!', 'error');
  95. }
  96. });
  97. }
  98. });
  99. }
  100. </script>
  101. </body>
  102. </html>