| | |
| | | }); |
| | | }); |
| | | } |
| | | } |
| | | //深拷贝 |
| | | 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, 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); |
| | | } |
| | | }); |
| | | } |