我将免费使用BALKAN OrgChartJS和旧的getOrgChart
当在Chrome浏览器中打印时,我遇到了打印问题。没有问题,只打印Firefox和edge浏览器。Chrome是最后一次更新
打印后
这是我的代码:
getOrgChart.prototype.print = function () {
var b = this,
d = this._X.element,
k = this._X._zN,
g = [],
h = d.parentNode,
j = k.style.display,
a = document.body,
c = a.childNodes,
e;
if (b._an) {
return
}
b._an = true;
for (e = 0; e < c.length; e++) {
var f = c[e];
if (f.nodeType === 1) {
g[e] = f.style.display;
f.style.display = "none"
}
}
k.style.display = "none";
a.appendChild(d);
window.focus();
window.print();
setTimeout(function () {
h.appendChild(d);
for (e = 0; e < c.length; e++) {
var i = c[e];
if (i.nodeType === 1) {
i.style.display = g[e]
}
}
k.style.display = j;
b._an = false
}, 1000)
};