@zscreate/form-component 1.1.149 → 1.1.151
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -73968,6 +73968,7 @@ var JMultiSelectTagvue_type_template_id_d8294bb8_staticRenderFns = []
|
|
|
73968
73968
|
|
|
73969
73969
|
;// CONCATENATED MODULE: ./src/api/api.js
|
|
73970
73970
|
|
|
73971
|
+
const jumpPDF = params => getAction("form/formdesiger/reviewJimuPdf", params);
|
|
73971
73972
|
const queryTreeList = params => getAction("/sys/permission/queryTreeList", params);
|
|
73972
73973
|
|
|
73973
73974
|
// 部门管理
|
|
@@ -119587,7 +119588,7 @@ module.exports = __WEBPACK_EXTERNAL_MODULE__7203__;
|
|
|
119587
119588
|
/***/ (function(module) {
|
|
119588
119589
|
|
|
119589
119590
|
"use strict";
|
|
119590
|
-
module.exports = {"i8":"1.1.
|
|
119591
|
+
module.exports = {"i8":"1.1.151"};
|
|
119591
119592
|
|
|
119592
119593
|
/***/ })
|
|
119593
119594
|
|
|
@@ -124868,6 +124869,138 @@ const messageBox = function (message, title, config = {}) {
|
|
|
124868
124869
|
var FilePreview = __webpack_require__(1961);
|
|
124869
124870
|
// EXTERNAL MODULE: ./src/form/modules/components/ImgUpload/downloadPage.vue + 3 modules
|
|
124870
124871
|
var downloadPage = __webpack_require__(5379);
|
|
124872
|
+
;// CONCATENATED MODULE: ./src/utils/print.js
|
|
124873
|
+
// 打印类属性、方法定义
|
|
124874
|
+
/* eslint-disable */
|
|
124875
|
+
|
|
124876
|
+
const Print = function (dom, options) {
|
|
124877
|
+
if (!(this instanceof Print)) return new Print(dom, options);
|
|
124878
|
+
this.options = this.extend({
|
|
124879
|
+
noPrint: '.no-print'
|
|
124880
|
+
}, options);
|
|
124881
|
+
if (typeof dom === 'string') {
|
|
124882
|
+
this.dom = document.querySelector(dom).cloneNode(true);
|
|
124883
|
+
} else {
|
|
124884
|
+
this.isDOM(dom);
|
|
124885
|
+
this.dom = this.isDOM(dom) ? dom.cloneNode(true) : dom.$el.cloneNode(true);
|
|
124886
|
+
}
|
|
124887
|
+
this.init();
|
|
124888
|
+
};
|
|
124889
|
+
Print.prototype = {
|
|
124890
|
+
init: function () {
|
|
124891
|
+
var content = this.getStyle() + this.getHtml();
|
|
124892
|
+
this.writeIframe(content);
|
|
124893
|
+
},
|
|
124894
|
+
extend: function (obj, obj2) {
|
|
124895
|
+
for (var k in obj2) {
|
|
124896
|
+
obj[k] = obj2[k];
|
|
124897
|
+
}
|
|
124898
|
+
return obj;
|
|
124899
|
+
},
|
|
124900
|
+
getStyle: function () {
|
|
124901
|
+
var str = '',
|
|
124902
|
+
styles = document.querySelectorAll('style,link');
|
|
124903
|
+
for (var i = 0; i < styles.length; i++) {
|
|
124904
|
+
str += styles[i].outerHTML;
|
|
124905
|
+
}
|
|
124906
|
+
str += '<style>' + (this.options.noPrint ? this.options.noPrint : '.no-print') + '{display:none;}</style>';
|
|
124907
|
+
// str += '<style>html,body,div{height: auto!important;font-size:14px}</style>';
|
|
124908
|
+
|
|
124909
|
+
// str +=
|
|
124910
|
+
// '<style>input,textarea{top: 50%!important; transform:translateY(-50%)!important}</style>';
|
|
124911
|
+
return str;
|
|
124912
|
+
},
|
|
124913
|
+
getHtml: function () {
|
|
124914
|
+
var inputs = this.dom.querySelectorAll('input');
|
|
124915
|
+
var textareas = this.dom.querySelectorAll('textarea');
|
|
124916
|
+
var selects = this.dom.querySelectorAll('select');
|
|
124917
|
+
if (!window._CONFIG['print_bg']) {
|
|
124918
|
+
var labelbg = this.dom.querySelectorAll('.ant-form-item-label, .table-content, .sub-table-col > span');
|
|
124919
|
+
for (var l = 0; l < labelbg.length; l++) {
|
|
124920
|
+
let item = labelbg[l];
|
|
124921
|
+
item.style.background = 'none';
|
|
124922
|
+
}
|
|
124923
|
+
}
|
|
124924
|
+
for (var k = 0; k < inputs.length; k++) {
|
|
124925
|
+
if (inputs[k].type == 'checkbox' || inputs[k].type == 'radio') {
|
|
124926
|
+
if (inputs[k].checked == true) {
|
|
124927
|
+
inputs[k].setAttribute('checked', 'checked');
|
|
124928
|
+
} else {
|
|
124929
|
+
inputs[k].removeAttribute('checked');
|
|
124930
|
+
}
|
|
124931
|
+
} else if (inputs[k].type == 'text') {
|
|
124932
|
+
inputs[k].setAttribute('value', inputs[k].value);
|
|
124933
|
+
} else {
|
|
124934
|
+
inputs[k].setAttribute('value', inputs[k].value);
|
|
124935
|
+
}
|
|
124936
|
+
}
|
|
124937
|
+
for (var k2 = 0; k2 < textareas.length; k2++) {
|
|
124938
|
+
if (textareas[k2].type == 'textarea') {
|
|
124939
|
+
textareas[k2].innerHTML = textareas[k2].value;
|
|
124940
|
+
}
|
|
124941
|
+
}
|
|
124942
|
+
for (var k3 = 0; k3 < selects.length; k3++) {
|
|
124943
|
+
if (selects[k3].type == 'select-one') {
|
|
124944
|
+
var child = selects[k3].children;
|
|
124945
|
+
for (var i in child) {
|
|
124946
|
+
if (child[i].tagName == 'OPTION') {
|
|
124947
|
+
if (child[i].selected == true) {
|
|
124948
|
+
child[i].setAttribute('selected', 'selected');
|
|
124949
|
+
} else {
|
|
124950
|
+
child[i].removeAttribute('selected');
|
|
124951
|
+
}
|
|
124952
|
+
}
|
|
124953
|
+
}
|
|
124954
|
+
}
|
|
124955
|
+
}
|
|
124956
|
+
return this.dom.outerHTML;
|
|
124957
|
+
},
|
|
124958
|
+
writeIframe: function (content) {
|
|
124959
|
+
var w,
|
|
124960
|
+
doc,
|
|
124961
|
+
iframe = document.createElement('iframe'),
|
|
124962
|
+
f = document.body.appendChild(iframe);
|
|
124963
|
+
iframe.id = 'myIframe';
|
|
124964
|
+
//iframe.style = "position:absolute;width:0;height:0;top:-10px;left:-10px;";
|
|
124965
|
+
iframe.setAttribute('style', 'position:absolute;width:0;height:0;top:-10px;left:-10px;');
|
|
124966
|
+
w = f.contentWindow || f.contentDocument;
|
|
124967
|
+
doc = f.contentDocument || f.contentWindow.document;
|
|
124968
|
+
doc.open();
|
|
124969
|
+
console.log(content);
|
|
124970
|
+
doc.write(content);
|
|
124971
|
+
doc.close();
|
|
124972
|
+
var _this = this;
|
|
124973
|
+
iframe.onload = function () {
|
|
124974
|
+
_this.toPrint(w);
|
|
124975
|
+
setTimeout(function () {
|
|
124976
|
+
document.body.removeChild(iframe);
|
|
124977
|
+
}, 100);
|
|
124978
|
+
};
|
|
124979
|
+
},
|
|
124980
|
+
toPrint: function (frameWindow) {
|
|
124981
|
+
try {
|
|
124982
|
+
setTimeout(function () {
|
|
124983
|
+
frameWindow.focus();
|
|
124984
|
+
try {
|
|
124985
|
+
if (!frameWindow.document.execCommand('print', false, null)) {
|
|
124986
|
+
frameWindow.print();
|
|
124987
|
+
}
|
|
124988
|
+
} catch (e) {
|
|
124989
|
+
frameWindow.print();
|
|
124990
|
+
}
|
|
124991
|
+
frameWindow.close();
|
|
124992
|
+
}, 10);
|
|
124993
|
+
} catch (err) {
|
|
124994
|
+
console.log('err', err);
|
|
124995
|
+
}
|
|
124996
|
+
},
|
|
124997
|
+
isDOM: typeof HTMLElement === 'object' ? function (obj) {
|
|
124998
|
+
return obj instanceof HTMLElement;
|
|
124999
|
+
} : function (obj) {
|
|
125000
|
+
return obj && typeof obj === 'object' && obj.nodeType === 1 && typeof obj.nodeName === 'string';
|
|
125001
|
+
}
|
|
125002
|
+
};
|
|
125003
|
+
/* harmony default export */ var print = (Print);
|
|
124871
125004
|
;// CONCATENATED MODULE: ./src/main.js
|
|
124872
125005
|
|
|
124873
125006
|
const version = (__webpack_require__(4147)/* .version */ .i8);
|
|
@@ -124881,6 +125014,7 @@ console.log("version:", version);
|
|
|
124881
125014
|
|
|
124882
125015
|
|
|
124883
125016
|
|
|
125017
|
+
|
|
124884
125018
|
const main_components = [layoutForPaper, Container, layoutItem["default"], FilePreview/* default */.Z];
|
|
124885
125019
|
const install = function (Vue, opts = {}, router = undefined) {
|
|
124886
125020
|
__webpack_require__.g.Vue = Vue;
|
|
@@ -124903,6 +125037,7 @@ if (typeof window !== 'undefined' && window.Vue) {
|
|
|
124903
125037
|
}
|
|
124904
125038
|
/* harmony default export */ var main = ({
|
|
124905
125039
|
install,
|
|
125040
|
+
Print: print,
|
|
124906
125041
|
...components/* default */.Z.componentList,
|
|
124907
125042
|
MessageBox: components_MessageBox
|
|
124908
125043
|
});
|