chenhaozhe
2026-04-07 67d8e67ed9be878f0ed77345687ac48de2e53fc1
Merge branch 'master' of http://101.37.171.70:10101/r/MES-WEB-LayUI
2个文件已修改
306 ■■■■ 已修改文件
WebTM/layuiadmin/Scripts/webConfig.js 304 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/views/基础资料/公用基础资料/Gy_Material.html 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
WebTM/layuiadmin/Scripts/webConfig.js
@@ -1,176 +1,168 @@

function GetWEBURL() {
    //var WEBURL = "http://192.168.16.80:8011/";        //办公室服务器
    //var WEBURL = "http://61.164.86.218:8099/ABAPI/";
    //var WEBURL = "http://localhost/API/";             //颜晓军本地配置
    //var WEBURL = "http://localhost:8082/API/";        //杜贺本地配置
    //var WEBURL = "http://localhost:81/API/"           //翁涛涛本地配置
     var WEBURL = "http://localhost:8082/API/";        //张瑞广本地配置
    // var WEBURL = "http://localhost:81/API/";          //陈镐哲本地配置
    // var WEBURL = "http://localhost:8082/API/";        //张瑞广本地配置
    var WEBURL = "http://localhost:81/API/";          //陈镐哲本地配置
    //var WEBURL = "http://localhost:8082/LuBaoAPI/";   //李林俊本地配置
    //var WEBURL = "http://localhost:8080/API/";        //王仪本地配置
    //var WEBURL = "http://localhost:8082/LuBaoAPI/";   //余思杰本地配置
    //var WEBURL = "http://localhost:8088/ARAPI/";      //余思杰本地配置(安瑞)
    //var WEBURL = "http://47.96.97.237/API/";          //智云服务器
   /* var WEBURL = "http://localhost:8082/LuBaoAPI/";  //余思杰本地配置*/
    //var WEBURL = "http://localhost:81/API/";            // é™ˆé•å“²æœ¬åœ°é…ç½®*/
     //var WEBURL = "http://localhost:8082/LuBaoAPI/";  //李林俊本地配置
    //var WEBURL = "http://localhost:8088/ARAPI/";      //余思杰本地配置(安瑞)
    //var WEBURL = "http://61.164.86.218:8099/ABAPI/";  //奥邦
    //var WEBURL = "http://10.1.4.155/API/";            //江丰客户NEW
    //var WEBURL = "http://183.129.128.86:9090/API/";   //凯贝奈特客户服务器外网
    //var WEBURL = "http://192.168.1.253:8080/API/";    //凯贝奈特客户服务器内网
    //var WEBURL = "http://220.189.218.154:8092/API/";  //丸井四维尔服务器
    //var WEBURL = "http://192.168.0.214/API/";         //瑞与祺服务器
    //var WEBURL = "http://192.168.10.66/API/";         //森楷服务器
    //var WEBURL = "http://192.168.80.90:9090/API/";    //安瑞服务器
    //var WEBURL = "http://192.168.16.53:8081/API/";    //龙山汽配
    //var WEBURL = "http://122.227.158.218:8090/API/";  //龙山汽配外网
    //var WEBURL = "http://192.168.0.244:8082/API/";    //帅威内网
    //var WEBURL = "http://192.168.1.237:9003/API";     //夏宝内网
    //var WEBURL = "http://60.190.4.42:9003/API";       //夏宝外网
    //var WEBURL = "http://192.168.60.12/API";          //中控
    //var WEBURL = "http://192.168.6.5:8082/API/";      //舜成
    //var WEBURL = "http://121.36.199.126:8181/API/";   //三升
    //var WEBURL = "http://36.134.2.30:200/WEBS-API/";  //金帅
    //var WEBURL = "http://172.16.1.85/API/";           //迦南
    // var WEBURL = "http://61.164.64.222:8082/API_WW/"
    return WEBURL
function GetWEBURL() {
  //var WEBURL = "http://192.168.16.80:8011/";        //办公室服务器
  //var WEBURL = "http://61.164.86.218:8099/ABAPI/";
  //var WEBURL = "http://localhost/API/";             //颜晓军本地配置
  //var WEBURL = "http://localhost:8082/API/";        //杜贺本地配置
  //var WEBURL = "http://localhost:81/API/"           //翁涛涛本地配置
  var WEBURL = "http://localhost:8082/API/"; //张瑞广本地配置
  // var WEBURL = "http://localhost:81/API/";          //陈镐哲本地配置
  // var WEBURL = "http://localhost:8082/API/";        //张瑞广本地配置
  var WEBURL = "http://localhost:81/API/"; //陈镐哲本地配置
  //var WEBURL = "http://localhost:8082/LuBaoAPI/";   //李林俊本地配置
  //var WEBURL = "http://localhost:8080/API/";        //王仪本地配置
  //var WEBURL = "http://localhost:8082/LuBaoAPI/";   //余思杰本地配置
  //var WEBURL = "http://localhost:8088/ARAPI/";      //余思杰本地配置(安瑞)
  //var WEBURL = "http://47.96.97.237/API/";          //智云服务器
  /* var WEBURL = "http://localhost:8082/LuBaoAPI/";  //余思杰本地配置*/
  //var WEBURL = "http://localhost:81/API/";            // é™ˆé•å“²æœ¬åœ°é…ç½®*/
  //var WEBURL = "http://localhost:8082/LuBaoAPI/";  //李林俊本地配置
  //var WEBURL = "http://localhost:8088/ARAPI/";      //余思杰本地配置(安瑞)
  //var WEBURL = "http://61.164.86.218:8099/ABAPI/";  //奥邦
  //var WEBURL = "http://10.1.4.155/API/";            //江丰客户NEW
  //var WEBURL = "http://183.129.128.86:9090/API/";   //凯贝奈特客户服务器外网
  //var WEBURL = "http://192.168.1.253:8080/API/";    //凯贝奈特客户服务器内网
  //var WEBURL = "http://220.189.218.154:8092/API/";  //丸井四维尔服务器
  //var WEBURL = "http://192.168.0.214/API/";         //瑞与祺服务器
  //var WEBURL = "http://192.168.10.66/API/";         //森楷服务器
  //var WEBURL = "http://192.168.80.90:9090/API/";    //安瑞服务器
  //var WEBURL = "http://192.168.16.53:8081/API/";    //龙山汽配
  //var WEBURL = "http://122.227.158.218:8090/API/";  //龙山汽配外网
  //var WEBURL = "http://192.168.0.244:8082/API/";    //帅威内网
  //var WEBURL = "http://192.168.1.237:9003/API";     //夏宝内网
  //var WEBURL = "http://60.190.4.42:9003/API";       //夏宝外网
  //var WEBURL = "http://192.168.60.12/API";          //中控
  //var WEBURL = "http://192.168.6.5:8082/API/";      //舜成
  //var WEBURL = "http://121.36.199.126:8181/API/";   //三升
  //var WEBURL = "http://36.134.2.30:200/WEBS-API/";  //金帅
  //var WEBURL = "http://172.16.1.85/API/";           //迦南
  // var WEBURL = "http://61.164.64.222:8082/API_WW/"
  return WEBURL;
}
function GetWEBURlLanguage() {
    return GetWEBURL()
  return GetWEBURL();
}
layui.use(['jquery', 'layer'], function () {
    var $ = layui.jquery,
        layer = layui.layer;
    // å…¨å±€é…ç½®
    layer.config({
        scrollbar: false
    });
layui.use(["jquery", "layer"], function () {
  var $ = layui.jquery,
    layer = layui.layer;
  // å…¨å±€é…ç½®
  layer.config({
    scrollbar: false,
  });
    var pendingRequests = [];
  var pendingRequests = [];
    // å…¨å±€é…ç½® é»˜è®¤ä¸æ˜¾ç¤ºçˆ¶çº§æ»šåŠ¨æ¡†
    var _open = layer.open;
    layer.open = function (opts) {
        // åˆå¹¶é»˜è®¤é…ç½®
        var options = $.extend({}, layer.config, opts);
  // å…¨å±€é…ç½® é»˜è®¤ä¸æ˜¾ç¤ºçˆ¶çº§æ»šåŠ¨æ¡†
  var _open = layer.open;
  layer.open = function (opts) {
    // åˆå¹¶é»˜è®¤é…ç½®
    var options = $.extend({}, layer.config, opts);
        var oldSuccess = options.success;
        var oldEnd = options.end;
        var needHideScroll = options.scrollbar === false;
    var oldSuccess = options.success;
    var oldEnd = options.end;
    var needHideScroll = options.scrollbar === false;
        // æ‰“开弹窗时
        options.success = function (layero, index) {
            if (needHideScroll) {
                $('body').css('overflow', 'hidden');
            }
            if (oldSuccess) oldSuccess.call(this, layero, index);
        };
        // å…³é—­å¼¹çª—æ—¶
        options.end = function () {
            if (needHideScroll) {
                // åªæœ‰æœ€åŽä¸€ä¸ªå¼¹çª—关闭才恢复
                if ($('.layui-layer:visible').length <= 1) {
                    $('body').css('overflow', '');
                }
            }
            if (oldEnd) oldEnd.call(this);
        };
        return _open.call(this, options);
    // æ‰“开弹窗时
    options.success = function (layero, index) {
      if (needHideScroll) {
        $("body").css("overflow", "hidden");
      }
      if (oldSuccess) oldSuccess.call(this, layero, index);
    };
    // å…¨å±€æ‹¦æˆªæ‰€æœ‰ layui ajax è¯·æ±‚
    $(document).ajaxSend(function (event, jqxhr, settings) {
        var token = localStorage.getItem('token');
        pendingRequests.push(jqxhr);
        if (typeof token != 'undefined') {
            // è‡ªåŠ¨å¸¦ä¸Š token
            jqxhr.setRequestHeader('Authorization', 'Bearer ' + token);
    // å…³é—­å¼¹çª—æ—¶
    options.end = function () {
      if (needHideScroll) {
        // åªæœ‰æœ€åŽä¸€ä¸ªå¼¹çª—关闭才恢复
        if ($(".layui-layer:visible").length <= 1) {
          $("body").css("overflow", "");
        }
      }
      if (oldEnd) oldEnd.call(this);
    };
    });
    return _open.call(this, options);
  };
  // å…¨å±€æ‹¦æˆªæ‰€æœ‰ layui ajax è¯·æ±‚
  $(document).ajaxSend(function (event, jqxhr, settings) {
    var token = localStorage.getItem("token");
    pendingRequests.push(jqxhr);
    // ç»Ÿä¸€å¤„理 æœªè®¤è¯/未授权请求
    $(document).ajaxComplete(function (event, jqxhr, settings) {
        // HTTP çŠ¶æ€ç 
        var status = jqxhr.status;
        console.log(jqxhr)
        if (status === 401) {
            abortAllPendingRequests(pendingRequests);
            // æœªç™»å½• / token è¿‡æœŸ
            layer.confirm(jqxhr.responseJSON.Message, { icon: 7, title: '提示' }, function () {
                localStorage.removeItem('token');
                window.top.location.href = '/WEBTM/views/user/login.html'; // è·³åˆ°ç™»å½•页
    if (typeof token != "undefined") {
      // è‡ªåŠ¨å¸¦ä¸Š token
      jqxhr.setRequestHeader("Authorization", "Bearer " + token);
    }
  });
            });
        } else if (status === 403) {
            abortAllPendingRequests(pendingRequests);
            // æ— æƒé™
            layer.confirm(jqxhr.responseJSON.Message, {
                icon: 4, skin: 'layui-layer-lan', title: "温馨提示", closeBtn: 0, btn: ['确定']
            });
  // ç»Ÿä¸€å¤„理 æœªè®¤è¯/未授权请求
  $(document).ajaxComplete(function (event, jqxhr, settings) {
    // HTTP çŠ¶æ€ç 
    var status = jqxhr.status;
    console.log(jqxhr);
    if (status === 401) {
      abortAllPendingRequests(pendingRequests);
      // æœªç™»å½• / token è¿‡æœŸ
      layer.confirm(
        jqxhr.responseJSON.Message,
        { icon: 7, title: "提示" },
        function () {
          localStorage.removeItem("token");
          window.top.location.href = "/WEBTM/views/user/login.html"; // è·³åˆ°ç™»å½•页
        }
    });
      );
    } else if (status === 403) {
      abortAllPendingRequests(pendingRequests);
      // æ— æƒé™
      layer.confirm(jqxhr.responseJSON.Message, {
        icon: 4,
        skin: "layui-layer-lan",
        title: "温馨提示",
        closeBtn: 0,
        btn: ["确定"],
      });
    }
  });
});
var pendingRequests2 = []
if (typeof $ != 'undefined') {
    $(document).ajaxSend(function (event, jqxhr, settings) {
        var token = localStorage.getItem('token');
        pendingRequests2.push(jqxhr)
var pendingRequests2 = [];
if (typeof $ != "undefined") {
  $(document).ajaxSend(function (event, jqxhr, settings) {
    var token = localStorage.getItem("token");
    pendingRequests2.push(jqxhr);
        if (typeof token != 'undefined') {
            // è‡ªåŠ¨å¸¦ä¸Š token
            jqxhr.setRequestHeader('Authorization', 'Bearer ' + token);
    if (typeof token != "undefined") {
      // è‡ªåŠ¨å¸¦ä¸Š token
      jqxhr.setRequestHeader("Authorization", "Bearer " + token);
    }
  });
  // ç»Ÿä¸€å¤„理 æœªè®¤è¯/未授权请求
  $(document).ajaxComplete(function (event, jqxhr, settings) {
    // HTTP çŠ¶æ€ç 
    var status = jqxhr.status;
    if (status === 401) {
      // æœªç™»å½• / token è¿‡æœŸ
      abortAllPendingRequests(pendingRequests2);
      layer.confirm(
        jqxhr.responseJSON.Message,
        { icon: 7, title: "提示" },
        function () {
          localStorage.removeItem("token");
          window.top.location.href = "/views/user/login.html"; // è·³åˆ°ç™»å½•页
        }
    });
    // ç»Ÿä¸€å¤„理 æœªè®¤è¯/未授权请求
    $(document).ajaxComplete(function (event, jqxhr, settings) {
        // HTTP çŠ¶æ€ç 
        var status = jqxhr.status;
        if (status === 401) {
            // æœªç™»å½• / token è¿‡æœŸ
            abortAllPendingRequests(pendingRequests2)
            layer.confirm(jqxhr.responseJSON.Message, { icon: 7, title: '提示' }, function () {
                localStorage.removeItem('token');
                window.top.location.href = '/views/user/login.html'; // è·³åˆ°ç™»å½•页
            });
        } else if (status === 403) {
            // æ— æƒé™
            abortAllPendingRequests(pendingRequests2)
            layer.confirm(jqxhr.responseJSON.Message, {
                icon: 4, skin: 'layui-layer-lan', title: "温馨提示", closeBtn: 0, btn: ['确定']
            });
        }
    });
}
function abortAllPendingRequests(pendingRequests) {
    if (pendingRequests.length === 0) return;
    // éåŽ†å–æ¶ˆæ‰€æœ‰è¯·æ±‚
    $.each(pendingRequests, function (i, req) {
        try {
            req.abort(); // ä¸­æ–­è¯·æ±‚
        } catch (e) { }
    });
    // æ¸…空请求池
    pendingRequests = [];
}
      );
    } else if (status === 403) {
      // æ— æƒé™
      abortAllPendingRequests(pendingRequests2);
      layer.confirm(jqxhr.responseJSON.Message, {
        icon: 4,
        skin: "layui-layer-lan",
        title: "温馨提示",
        closeBtn: 0,
        btn: ["确定"],
      });
    }
  });
}
WebTM/views/»ù´¡×ÊÁÏ/¹«Óûù´¡×ÊÁÏ/Gy_Material.html
@@ -10,10 +10,10 @@
    <link rel="stylesheet" href="../../../layuiadmin/layui/css/layui.css" media="all">
    <link rel="stylesheet" href="../../../layuiadmin/style/admin.css" media="all">
    <script src="../../../layuiadmin/layui/layui.js"></script>
    <script src="../../../layuiadmin/layui/layui1.js"></script>
    <script src="../../../layuiadmin/Scripts/json2.js"></script>
    <script src="../../../layuiadmin/Scripts/jquery-1.4.1.js"></script>
    <script src="../../../layuiadmin/Scripts/webConfig.js"></script>
    <script src="../../../layuiadmin/layui/layui1.js"></script>
    <script src="../../../layuiadmin/layui/lay/modules/table.js"></script>
    <script src="../../../layuiadmin/HideButton_New.js"></script>
    <script src="../../../layuiadmin/PubCustom.js"></script>