123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- <!doctype html>
- <html class="x-admin-sm">
- <head>
- <meta charset="UTF-8">
- <meta name="renderer" content="webkit|ie-comp|ie-stand">
- <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
- <meta name="viewport"
- content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi"/>
- <meta http-equiv="Cache-Control" content="no-siteapp"/>
- <link rel="stylesheet" href="/static/css/font.css">
- <link rel="stylesheet" href="/static/css/xadmin.css">
- <script src="/static/js/jquery.min.js"></script>
- <script src="/static/js/jquery.cookie.min.js"></script>
- <script src="/static/lib/layui/layui.js" charset="utf-8"></script>
- <script type="text/javascript" src="/static/js/xadmin.js"></script>
- </head>
- <body>
- <div class="layui-container">
- <div class="fly-panel">
- <div class="fly-none">
- <h2><i style="font-size: 64px;" class="iconfont"></i></h2>
- <!-- <p> 你好,{{.T_name}}</p>-->
- <a style="color: #1E9FFF" onclick="window.parent.location.href='/Login'"> 退出登录 </a>
- <div class="layui-row">
- <div class="layui-col-md6"
- onclick="window.parent.xadmin.add_tab('设备管理','/Device/DeviceManager_html')">
- <i class="layui-icon" style="font-size: 100px;"></i>
- <H2 style="margin-top: -80px;">设备管理</H2>
- </div>
- <div class="layui-col-md6" onclick="window.parent.xadmin.add_tab('数据管理','/Data/DataList_html')">
- <i class="layui-icon" style="font-size: 100px;"></i>
- <H2 style="margin-top: -80px;">数据管理</H2>
- </div>
- </div>
- <div class="layui-row getCompany" >
- <div style="margin-left: 450px; ">
- <div class="layui-col-md6" style="width: 200px; ">
- <label>
- <input type="text" placeholder="根据SN查询公司" class="layui-input layui-clear" id="sn"
- name="sn">
- </label>
- </div>
- <div class="layui-col-md6" style="margin-left: -140px;">
- <button type="button" class="layui-btn layui-bg-blue" onclick="GetCompanyBySn()">查询</button>
- </div>
- </div>
- </div>
- <div class="layui-row">
- <div class="layui-col-md6"
- onclick="window.parent.xadmin.add_tab('曲线管理','/Data/DataGenerator_html')">
- <i class="layui-icon" style="font-size: 100px;"></i>
- <H2 style="margin-top: -80px;">曲线管理</H2>
- </div>
- <div class="layui-col-md6"
- onclick="window.parent.xadmin.add_tab('报警管理','/Device/DeviceWarning_List_html')">
- <i class="layui-icon" style="font-size: 100px;"></i>
- <H2 style="margin-top: -80px;">报警管理</H2>
- </div>
- </div>
- </div>
- </div>
- </div>
- </body>
- <script>
- window.onload = function () {
- // 页面加载完成后执行的代码
- console.log("页面加载完成",{{.T_name}});
- if ({{.T_name}}!="宝智达-魏公梅") {
- var elementsByClassName = document.querySelector(".getCompany");
- elementsByClassName.style.display = 'none';
- }else{
- var elementsByClassName = document.querySelector(".getCompany");
- elementsByClassName.style.display = 'block';
- }
- }
- function GetCompanyBySn() {
- const snid = $("#sn").val();
- console.log(snid);
- $.ajax({
- url: '/Data/GetCompanyBySn',
- type: 'GET',
- data: {
- sn: snid,
- token: $.cookie("User_token")
- },
- success: function (data) {
- let company = data.Data;
- if (data.Code === 200) {
- layer.open({
- type: 1, // page 层类型
- area: ['200px', '200px'],
- title: '公司名称',
- shade: 0.6, // 遮罩透明度
- shadeClose: true, // 点击遮罩区域,关闭弹层
- maxmin: true, // 允许全屏最小化
- anim: 0, // 0-6 的动画形式,-1 不开启
- content: company
- });
- $("#sn").val("");
- }else{
- layui.layer.msg(data.Msg)
- $("#sn").val("");
- }
- }
- })
- }
- </script>
- </html>
|