hwh
2024-06-04 3989f167b217f60e6c52722a2726450e029c7800
HTML_09/js/public.js
@@ -264,4 +264,37 @@
      });
    });
  }  
}
//深拷贝
function deepClone(source) {
  if (typeof source !== 'object' || source == null) {
    return source;
  }
  const target = Array.isArray(source) ? [] : {};
  for (const key in source) {
    if (Object.prototype.hasOwnProperty.call(source, key)) {
      if (typeof source[key] === 'object' && source[key] !== null) {
        target[key] = deepClone(source[key]);
      } else {
        target[key] = source[key];
      }
    }
  }
  return target;
}
//调用打印
function openPrintDialog(printData){
  layer.open({
    type: 2,
    title: '打印',
    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));
    }
  });
}