zhaowc
2024-08-29 1ac2c31898b2a10906c0058b1b62f73f5ea6daf9
HTML/js/public.js
@@ -13,7 +13,7 @@
{
  sendData(IP + "/Basis/GetFunSettingByNo?funSetNo="+"Fun013", {}, 'get', function (res) {
    console.log(res.data.SetValue)
    if (res.code == 200) { //成功
    if (res.code == 0) { //成功
      if(res.data.IsEnable == 'NO')
      {
          pageCnt = parseInt(res.data.SetValue);
@@ -38,8 +38,15 @@
  if (url!=IP+"/WeatherForecast/Login") {
    if (!$.cookie('token')) {
      callbackFun("登录人信息已失效");
      try{
        parent.window.location.href = '/views/Login.html';
      }
      catch(error){
        window.location.href = '/views/Login.html';
      }
      return;
    }
    if(isExpired = isTokenExpired($.cookie('token'))){
    if(isTokenExpired($.cookie('token'))){
      try{
        parent.window.location.href = '/views/Login.html';
      }
@@ -203,9 +210,9 @@
  var bodyHeight = $("#body").outerHeight();
  var topHeight = $("#top").outerHeight();
  var centerHeight = $("#center").outerHeight();
//   console.log(bodyHeight);
//   console.log(topHeight);
//   console.log(centerHeight);
  console.log(bodyHeight);
  console.log(topHeight);
  console.log(centerHeight);
  var hh = bodyHeight - topHeight-centerHeight - 26 ;//6是body上内边距 
  return hh;
@@ -268,7 +275,7 @@
function GetIsSetColW()
{
  sendData(IP + "/Basis/GetFunSettingByNo?funSetNo="+"Fun014", {}, 'get', function (res) {
    if (res.code == 200) { //成功
    if (res.code == 0) { //成功
      if(res.data.IsEnable == 'NO')
      {
        isSetColW=true;
@@ -358,11 +365,30 @@
  });
}
//分页格式化
var FnParseData = function (res) {
  return {
    "code": res.code == 200 ? 0 : res.code, // 解析接口状态
    "code": res.code == 0 ? 0 : res.code, // 解析接口状态
    "msg": res.msg, // 解析提示文本
    "count": res.data.Total, // 解析数据长度
    "data": res.data.Items // 解析数据列表
  };
}
//调用打印
function openPrintDialog(printData, printType){
  layer.open({
    type: 2,
    title: '打印',
    // content: '../../js/hiprint/custom.html',
    content: '/views/SystemSettings/PrintModule.html',
    maxmin: true,
    area: ['100%', '100%'],
    data: printData,
    success: function (layero, index) {
      var body = layer.getChildFrame('body',index);
      body.find('#printData').val(JSON.stringify(printData));
      body.find('#printType').val(printType);
    }
  });
}