home.html 4.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. <!doctype html>
  2. <html class="x-admin-sm">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="renderer" content="webkit|ie-comp|ie-stand">
  6. <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
  7. <meta name="viewport"
  8. content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi"/>
  9. <meta http-equiv="Cache-Control" content="no-siteapp"/>
  10. <link rel="stylesheet" href="/static/css/font.css">
  11. <link rel="stylesheet" href="/static/css/xadmin.css">
  12. <script src="/static/js/jquery.min.js"></script>
  13. <script src="/static/js/jquery.cookie.min.js"></script>
  14. <script src="/static/lib/layui/layui.js" charset="utf-8"></script>
  15. <script type="text/javascript" src="/static/js/xadmin.js"></script>
  16. </head>
  17. <body>
  18. <div class="layui-container">
  19. <div class="fly-panel">
  20. <div class="fly-none">
  21. <h2><i style="font-size: 64px;" class="iconfont">&#xe6af;</i></h2>
  22. <!-- <p> 你好,{{.T_name}}</p>-->
  23. <a style="color: #1E9FFF" onclick="window.parent.location.href='/Login'"> 退出登录 </a>
  24. <div class="layui-row">
  25. <div class="layui-col-md6"
  26. onclick="window.parent.xadmin.add_tab('设备管理','/Device/DeviceManager_html')">
  27. <i class="layui-icon" style="font-size: 100px;">&#xe610;</i>
  28. <H2 style="margin-top: -80px;">设备管理</H2>
  29. </div>
  30. <div class="layui-col-md6" onclick="window.parent.xadmin.add_tab('数据管理','/Data/DataList_html')">
  31. <i class="layui-icon" style="font-size: 100px;">&#xe62d;</i>
  32. <H2 style="margin-top: -80px;">数据管理</H2>
  33. </div>
  34. </div>
  35. <div class="layui-row getCompany" >
  36. <div style="margin-left: 450px; ">
  37. <div class="layui-col-md6" style="width: 200px; ">
  38. <label>
  39. <input type="text" placeholder="根据SN查询公司" class="layui-input layui-clear" id="sn"
  40. name="sn">
  41. </label>
  42. </div>
  43. <div class="layui-col-md6" style="margin-left: -140px;">
  44. <button type="button" class="layui-btn layui-bg-blue" onclick="GetCompanyBySn()">查询</button>
  45. </div>
  46. </div>
  47. </div>
  48. <div class="layui-row">
  49. <div class="layui-col-md6"
  50. onclick="window.parent.xadmin.add_tab('曲线管理','/Data/DataGenerator_html')">
  51. <i class="layui-icon" style="font-size: 100px;">&#xe629;</i>
  52. <H2 style="margin-top: -80px;">曲线管理</H2>
  53. </div>
  54. <div class="layui-col-md6"
  55. onclick="window.parent.xadmin.add_tab('报警管理','/Device/DeviceWarning_List_html')">
  56. <i class="layui-icon" style="font-size: 100px;">&#xe667;</i>
  57. <H2 style="margin-top: -80px;">报警管理</H2>
  58. </div>
  59. </div>
  60. </div>
  61. </div>
  62. </div>
  63. </body>
  64. <script>
  65. window.onload = function () {
  66. // 页面加载完成后执行的代码
  67. console.log("页面加载完成",{{.T_name}});
  68. if ({{.T_name}}!="宝智达-魏公梅") {
  69. var elementsByClassName = document.querySelector(".getCompany");
  70. elementsByClassName.style.display = 'none';
  71. }else{
  72. var elementsByClassName = document.querySelector(".getCompany");
  73. elementsByClassName.style.display = 'block';
  74. }
  75. }
  76. function GetCompanyBySn() {
  77. const snid = $("#sn").val();
  78. console.log(snid);
  79. $.ajax({
  80. url: '/Data/GetCompanyBySn',
  81. type: 'GET',
  82. data: {
  83. sn: snid,
  84. token: $.cookie("User_token")
  85. },
  86. success: function (data) {
  87. let company = data.Data;
  88. if (data.Code === 200) {
  89. layer.open({
  90. type: 1, // page 层类型
  91. area: ['200px', '200px'],
  92. title: '公司名称',
  93. shade: 0.6, // 遮罩透明度
  94. shadeClose: true, // 点击遮罩区域,关闭弹层
  95. maxmin: true, // 允许全屏最小化
  96. anim: 0, // 0-6 的动画形式,-1 不开启
  97. content: company
  98. });
  99. $("#sn").val("");
  100. }else{
  101. layui.layer.msg(data.Msg)
  102. $("#sn").val("");
  103. }
  104. }
  105. })
  106. }
  107. </script>
  108. </html>