orion-design 0.1.30 → 0.1.31
Sign up to get free protection for your applications and to get access to all the features.
- package/README.md +5 -5
- package/dist/Throne/index.js +30 -14
- package/dist/Throne/index.js.map +1 -1
- package/dist/_commonjsHelpers-DWwsNxpa.js +9 -0
- package/dist/_commonjsHelpers-DWwsNxpa.js.map +1 -0
- package/dist/components/Button/index.js +40 -33
- package/dist/components/Button/index.js.map +1 -1
- package/dist/components/Flex/index.js +122 -89
- package/dist/components/Flex/index.js.map +1 -1
- package/dist/components/Form/Form.js +2 -2
- package/dist/components/Form/Form.js.map +1 -1
- package/dist/components/Form/LovInput/LovInput.js +2 -2
- package/dist/components/Form/LovInput/LovInput.js.map +1 -1
- package/dist/components/Form/LovInput/hooks/useLov.js +5 -5
- package/dist/components/Form/LovInput/hooks/useLov.js.map +1 -1
- package/dist/components/Form/LovInput/index.js +4 -4
- package/dist/components/Form/hooks/FormItemValidateTrigger.js +2 -2
- package/dist/components/Form/hooks/FormItemValidateTrigger.js.map +1 -1
- package/dist/components/Form/hooks/index.js +128 -66
- package/dist/components/Form/hooks/index.js.map +1 -1
- package/dist/components/Form/index.js +836 -656
- package/dist/components/Form/index.js.map +1 -1
- package/dist/components/Form/utils/index.js +30 -18
- package/dist/components/Form/utils/index.js.map +1 -1
- package/dist/components/LovTable/index.js +179 -105
- package/dist/components/LovTable/index.js.map +1 -1
- package/dist/components/Modal/index.js +111 -56
- package/dist/components/Modal/index.js.map +1 -1
- package/dist/components/Modal/types.js +4 -3
- package/dist/components/Modal/types.js.map +1 -1
- package/dist/components/Modal/useModal.js +5 -5
- package/dist/components/Modal/useModal.js.map +1 -1
- package/dist/components/Pagetable/hooks/useColumns.js +88 -80
- package/dist/components/Pagetable/hooks/useColumns.js.map +1 -1
- package/dist/components/Pagetable/index.js +687 -542
- package/dist/components/Pagetable/index.js.map +1 -1
- package/dist/components/Pagetable/utils/index.js +92 -54
- package/dist/components/Pagetable/utils/index.js.map +1 -1
- package/dist/components/Querytable/hooks/useColumns.js +82 -74
- package/dist/components/Querytable/hooks/useColumns.js.map +1 -1
- package/dist/components/Querytable/index.js +579 -469
- package/dist/components/Querytable/index.js.map +1 -1
- package/dist/components/Querytable/utils/index.js +92 -54
- package/dist/components/Querytable/utils/index.js.map +1 -1
- package/dist/components/RichTextEditor/index.js +100 -74
- package/dist/components/RichTextEditor/index.js.map +1 -1
- package/dist/components/Tabs/constants.js +2 -2
- package/dist/components/Tabs/constants.js.map +1 -1
- package/dist/components/Tabs/index.js +603 -358
- package/dist/components/Tabs/index.js.map +1 -1
- package/dist/components/Tabs/tab-bar.js +6 -6
- package/dist/components/Tabs/tab-bar.js.map +1 -1
- package/dist/components/Tabs/tab-pane.js +3 -3
- package/dist/components/Tabs/tab-pane.js.map +1 -1
- package/dist/components/_constants/aria.js +2 -2
- package/dist/components/_constants/aria.js.map +1 -1
- package/dist/components/_constants/event.js +6 -4
- package/dist/components/_constants/event.js.map +1 -1
- package/dist/components/_constants/index.js +6 -6
- package/dist/components/_hooks/index.js +7 -7
- package/dist/components/_hooks/use-namespace/index.js +74 -39
- package/dist/components/_hooks/use-namespace/index.js.map +1 -1
- package/dist/components/_hooks/use-ordered-children/index.js +29 -19
- package/dist/components/_hooks/use-ordered-children/index.js.map +1 -1
- package/dist/components/_util/arrays.js +9 -5
- package/dist/components/_util/arrays.js.map +1 -1
- package/dist/components/_util/browser.js +6 -6
- package/dist/components/_util/browser.js.map +1 -1
- package/dist/components/_util/classNames.js +22 -17
- package/dist/components/_util/classNames.js.map +1 -1
- package/dist/components/_util/dom/aria.js +74 -39
- package/dist/components/_util/dom/aria.js.map +1 -1
- package/dist/components/_util/dom/element.js +9 -8
- package/dist/components/_util/dom/element.js.map +1 -1
- package/dist/components/_util/dom/event.js +14 -7
- package/dist/components/_util/dom/event.js.map +1 -1
- package/dist/components/_util/dom/index.js +36 -36
- package/dist/components/_util/dom/position.js +49 -25
- package/dist/components/_util/dom/position.js.map +1 -1
- package/dist/components/_util/dom/scroll.js +103 -61
- package/dist/components/_util/dom/scroll.js.map +1 -1
- package/dist/components/_util/dom/style.js +65 -50
- package/dist/components/_util/dom/style.js.map +1 -1
- package/dist/components/_util/easings.js +8 -4
- package/dist/components/_util/easings.js.map +1 -1
- package/dist/components/_util/error.js +12 -11
- package/dist/components/_util/error.js.map +1 -1
- package/dist/components/_util/functions.js +3 -3
- package/dist/components/_util/i18n.js +2 -2
- package/dist/components/_util/i18n.js.map +1 -1
- package/dist/components/_util/index.js +137 -137
- package/dist/components/_util/isValid.js +4 -2
- package/dist/components/_util/isValid.js.map +1 -1
- package/dist/components/_util/objects.js +18 -14
- package/dist/components/_util/objects.js.map +1 -1
- package/dist/components/_util/props-util/index.js +46 -20
- package/dist/components/_util/props-util/index.js.map +1 -1
- package/dist/components/_util/props-util/initDefaultProps.js +18 -10
- package/dist/components/_util/props-util/initDefaultProps.js.map +1 -1
- package/dist/components/_util/raf.js +5 -4
- package/dist/components/_util/raf.js.map +1 -1
- package/dist/components/_util/rand.js +4 -3
- package/dist/components/_util/rand.js.map +1 -1
- package/dist/components/_util/strings.js +9 -8
- package/dist/components/_util/strings.js.map +1 -1
- package/dist/components/_util/throttleByRaf.js +16 -10
- package/dist/components/_util/throttleByRaf.js.map +1 -1
- package/dist/components/_util/type.js +41 -38
- package/dist/components/_util/type.js.map +1 -1
- package/dist/components/_util/types.js +41 -22
- package/dist/components/_util/types.js.map +1 -1
- package/dist/components/_util/typescript.js +2 -2
- package/dist/components/_util/typescript.js.map +1 -1
- package/dist/components/_util/util.js +85 -43
- package/dist/components/_util/util.js.map +1 -1
- package/dist/components/_util/vue/global-node.js +27 -15
- package/dist/components/_util/vue/global-node.js.map +1 -1
- package/dist/components/_util/vue/icon.js +29 -25
- package/dist/components/_util/vue/icon.js.map +1 -1
- package/dist/components/_util/vue/index.js +41 -41
- package/dist/components/_util/vue/install.js +35 -18
- package/dist/components/_util/vue/install.js.map +1 -1
- package/dist/components/_util/vue/props/index.js +6 -6
- package/dist/components/_util/vue/props/runtime.js +46 -30
- package/dist/components/_util/vue/props/runtime.js.map +1 -1
- package/dist/components/_util/vue/refs.js +12 -6
- package/dist/components/_util/vue/refs.js.map +1 -1
- package/dist/components/_util/vue/size.js +5 -3
- package/dist/components/_util/vue/size.js.map +1 -1
- package/dist/components/_util/vue/validator.js +5 -4
- package/dist/components/_util/vue/validator.js.map +1 -1
- package/dist/components/_util/vue/vnode.js +100 -54
- package/dist/components/_util/vue/vnode.js.map +1 -1
- package/dist/components/_util/vue-types/index.js +231 -220
- package/dist/components/_util/vue-types/index.js.map +1 -1
- package/dist/components/components.js +20 -20
- package/dist/components/index.js +38 -35
- package/dist/components/index.js.map +1 -1
- package/dist/components-B3d9m_tn.js +27 -0
- package/dist/components-B3d9m_tn.js.map +1 -0
- package/dist/error/OrionError.js +8 -4
- package/dist/error/OrionError.js.map +1 -1
- package/dist/functions-BeMkokbY.js +63 -0
- package/dist/functions-BeMkokbY.js.map +1 -0
- package/dist/index-BOKLZnqH.js +54 -0
- package/dist/index-BOKLZnqH.js.map +1 -0
- package/dist/index-D1m0KTpK.js +69 -0
- package/dist/index-D1m0KTpK.js.map +1 -0
- package/dist/index-DR5ZP7mD.js +160 -0
- package/dist/index-DR5ZP7mD.js.map +1 -0
- package/dist/index-DkwIULcN.js +200 -0
- package/dist/index-DkwIULcN.js.map +1 -0
- package/dist/index.css +797 -1
- package/dist/index.js +36 -36
- package/dist/print/LodopFuncs.js +101 -43
- package/dist/print/LodopFuncs.js.map +1 -1
- package/dist/print/index.js +200 -108
- package/dist/print/index.js.map +1 -1
- package/dist/request/ErrorHandlerChain.js +17 -14
- package/dist/request/ErrorHandlerChain.js.map +1 -1
- package/dist/request/RequestFilterChain.js +16 -13
- package/dist/request/RequestFilterChain.js.map +1 -1
- package/dist/request/ResponseParserChain.js +17 -14
- package/dist/request/ResponseParserChain.js.map +1 -1
- package/dist/request/disivion/DateSerializer.js +47 -22
- package/dist/request/disivion/DateSerializer.js.map +1 -1
- package/dist/request/disivion/DivisionErrorHandler.js +40 -25
- package/dist/request/disivion/DivisionErrorHandler.js.map +1 -1
- package/dist/request/disivion/DivisionResponseParser.js +16 -10
- package/dist/request/disivion/DivisionResponseParser.js.map +1 -1
- package/dist/request/disivion/index.js +305 -201
- package/dist/request/disivion/index.js.map +1 -1
- package/dist/request/error/BizExceptionResponseError.js +11 -5
- package/dist/request/error/BizExceptionResponseError.js.map +1 -1
- package/dist/request/error/ExceptionResponseError.js +11 -5
- package/dist/request/error/ExceptionResponseError.js.map +1 -1
- package/dist/request/error/ResponseError.js +9 -4
- package/dist/request/error/ResponseError.js.map +1 -1
- package/dist/request/error/SessionExceptionResponseError.js +11 -5
- package/dist/request/error/SessionExceptionResponseError.js.map +1 -1
- package/dist/request/index.js +11 -11
- package/dist/utils/DateUtil.js +48 -33
- package/dist/utils/DateUtil.js.map +1 -1
- package/dist/utils/NumberUtil.js +6 -6
- package/dist/utils/NumberUtil.js.map +1 -1
- package/dist/utils/cloneDeep.js +2 -2
- package/dist/utils/delay.js +3 -3
- package/dist/utils/delay.js.map +1 -1
- package/dist/utils/functions.js +3 -3
- package/dist/utils/index.js +12 -12
- package/dist/utils/md5.js +191 -93
- package/dist/utils/md5.js.map +1 -1
- package/dist/utils/uuid.js +35 -25
- package/dist/utils/uuid.js.map +1 -1
- package/dist/version/index.js +2 -2
- package/dist/version/version.d.ts +1 -1
- package/dist/version/version.js +2 -2
- package/dist/version/version.js.map +1 -1
- package/package.json +1 -1
package/dist/index.js
CHANGED
@@ -1,39 +1,39 @@
|
|
1
|
-
import { default as
|
2
|
-
import { default as
|
3
|
-
import { install
|
4
|
-
import { default as
|
5
|
-
import { default as
|
6
|
-
import { default as
|
7
|
-
import { default as
|
8
|
-
import { S
|
9
|
-
import { Colflex
|
10
|
-
import { default as
|
11
|
-
import { default as
|
12
|
-
import { default as
|
13
|
-
import { default as
|
14
|
-
import { default as
|
15
|
-
import { default as
|
16
|
-
import { formContextKey
|
17
|
-
import { lovContextKey
|
1
|
+
import { default as default2 } from "./error/OrionError.js";
|
2
|
+
import { default as default3 } from "./Throne/index.js";
|
3
|
+
import { install } from "./components/index.js";
|
4
|
+
import { default as default4 } from "./version/version.js";
|
5
|
+
import { default as default5 } from "./components/Modal/useModal.js";
|
6
|
+
import { default as default6 } from "./components/Form/LovInput/hooks/useLov.js";
|
7
|
+
import { default as default7 } from "./components/Button/index.js";
|
8
|
+
import { S } from "./index-BOKLZnqH.js";
|
9
|
+
import { Colflex, Flexitem, Rowflex } from "./components/Flex/index.js";
|
10
|
+
import { default as default8 } from "./components/Tabs/index.js";
|
11
|
+
import { default as default9 } from "./components/Pagetable/index.js";
|
12
|
+
import { default as default10 } from "./components/Querytable/index.js";
|
13
|
+
import { default as default11 } from "./components/Modal/index.js";
|
14
|
+
import { default as default12 } from "./components/Form/index.js";
|
15
|
+
import { default as default13 } from "./components/LovTable/index.js";
|
16
|
+
import { formContextKey } from "./components/Form/Form.js";
|
17
|
+
import { lovContextKey } from "./components/Form/LovInput/LovInput.js";
|
18
18
|
export {
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
19
|
+
default7 as Button,
|
20
|
+
Colflex,
|
21
|
+
Flexitem,
|
22
|
+
default12 as Form,
|
23
|
+
default13 as LovTable,
|
24
|
+
default11 as Modal,
|
25
|
+
default2 as OrionError,
|
26
|
+
default9 as Pagetable,
|
27
|
+
default10 as Querytable,
|
28
|
+
Rowflex,
|
29
|
+
S as Space,
|
30
|
+
default8 as Tabs,
|
31
|
+
default3 as Throne,
|
32
|
+
formContextKey,
|
33
|
+
install,
|
34
|
+
lovContextKey,
|
35
|
+
default6 as useLov,
|
36
|
+
default5 as useOModal,
|
37
|
+
default4 as version
|
38
38
|
};
|
39
39
|
//# sourceMappingURL=index.js.map
|
package/dist/print/LodopFuncs.js
CHANGED
@@ -1,65 +1,123 @@
|
|
1
|
-
var
|
2
|
-
function
|
1
|
+
var CreatedOKLodopObject, CLodopIsLocal;
|
2
|
+
function needCLodop() {
|
3
3
|
try {
|
4
|
-
var
|
5
|
-
if (
|
6
|
-
|
7
|
-
if (
|
8
|
-
if (i)
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
4
|
+
var ua = navigator.userAgent;
|
5
|
+
if (ua.match(/Windows\sPhone/i)) return true;
|
6
|
+
if (ua.match(/iPhone|iPod|iPad/i)) return true;
|
7
|
+
if (ua.match(/Android/i)) return true;
|
8
|
+
if (ua.match(/Edge\D?\d+/i)) return true;
|
9
|
+
var verTrident = ua.match(/Trident\D?\d+/i);
|
10
|
+
var verIE = ua.match(/MSIE\D?\d+/i);
|
11
|
+
var verOPR = ua.match(/OPR\D?\d+/i);
|
12
|
+
var verFF = ua.match(/Firefox\D?\d+/i);
|
13
|
+
var x64 = ua.match(/x64/i);
|
14
|
+
if (!verTrident && !verIE && x64) return true;
|
15
|
+
else if (verFF) {
|
16
|
+
verFF = verFF[0].match(/\d+/);
|
17
|
+
if (verFF[0] >= 41 || x64) return true;
|
18
|
+
} else if (verOPR) {
|
19
|
+
verOPR = verOPR[0].match(/\d+/);
|
20
|
+
if (verOPR[0] >= 32) return true;
|
21
|
+
} else if (!verTrident && !verIE) {
|
22
|
+
var verChrome = ua.match(/Chrome\D?\d+/i);
|
23
|
+
if (verChrome) {
|
24
|
+
verChrome = verChrome[0].match(/\d+/);
|
25
|
+
if (verChrome[0] >= 41) return true;
|
26
|
+
}
|
16
27
|
}
|
17
|
-
return
|
18
|
-
} catch {
|
19
|
-
return
|
28
|
+
return false;
|
29
|
+
} catch (err) {
|
30
|
+
return true;
|
20
31
|
}
|
21
32
|
}
|
22
|
-
if (
|
23
|
-
var
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
33
|
+
if (needCLodop()) {
|
34
|
+
var head = document.head || document.getElementsByTagName("head")[0] || document.documentElement;
|
35
|
+
var JS1 = document.createElement("script");
|
36
|
+
JS1.src = "http://localhost:8000/CLodopfuncs.js?priority=1";
|
37
|
+
JS1.async = true;
|
38
|
+
JS1.defer = true;
|
39
|
+
head.insertBefore(JS1, head.firstChild);
|
40
|
+
var JS2 = document.createElement("script");
|
41
|
+
JS2.async = true;
|
42
|
+
JS2.defer = true;
|
43
|
+
JS2.src = "http://localhost:18000/CLodopfuncs.js?priority=0";
|
44
|
+
head.insertBefore(JS2, head.firstChild);
|
45
|
+
CLodopIsLocal = !!(JS1.src + JS2.src).match(/\/\/localho|\/\/127.0.0./i);
|
46
|
+
if (JS1.attachEvent) {
|
47
|
+
var onChange = function() {
|
48
|
+
if (window.event.srcElement.readyState == "loaded") ;
|
29
49
|
};
|
30
|
-
|
50
|
+
JS1.attachEvent("onreadystatechange", onChange);
|
51
|
+
JS2.attachEvent("onreadystatechange", onChange);
|
31
52
|
}
|
32
53
|
}
|
33
|
-
function
|
34
|
-
var
|
54
|
+
function getLodop(oOBJECT, oEMBED) {
|
55
|
+
var strHtmInstall = "<br><font color='#FF00FF'>打印控件未安装!安装后请刷新页面或重新进入。</font>";
|
56
|
+
var strHtmUpdate = "<br><font color='#FF00FF'>打印控件需要升级!升级后请重新进入。</font>";
|
57
|
+
var strHtm64_Install = "<br><font color='#FF00FF'>打印控件未安装!安装后请刷新页面或重新进入。</font>";
|
58
|
+
var strHtm64_Update = "<br><font color='#FF00FF'>打印控件需要升级!升级后请重新进入。</font>";
|
59
|
+
var strHtmFireFox = "<br><br><font color='#FF00FF'>(注意:如曾安装过Lodop旧版附件npActiveXPLugin,请在【工具】->【附加组件】->【扩展】中先卸它)</font>";
|
60
|
+
var strHtmChrome = "<br><br><font color='#FF00FF'>(如果此前正常,仅因浏览器升级或重安装而出问题,需重新执行以上安装)</font>";
|
61
|
+
var strCLodopInstall_1 = "<br><font color='#FF00FF'>Web打印服务CLodop未安装启动";
|
62
|
+
var strCLodopInstall_2 = "<br>(若此前已安装过,请确认是否打开)";
|
63
|
+
var strCLodopInstall_3 = ",成功后请刷新本页面。</font>";
|
64
|
+
var strCLodopUpdate = "<br><font color='#FF00FF'>Web打印服务CLodop需升级!升级后请刷新页面。</font>";
|
65
|
+
var LODOP;
|
35
66
|
try {
|
36
|
-
var
|
37
|
-
|
67
|
+
var ua = navigator.userAgent;
|
68
|
+
var isIE = !!ua.match(/MSIE/i) || !!ua.match(/Trident/i);
|
69
|
+
if (needCLodop()) {
|
38
70
|
try {
|
39
|
-
|
40
|
-
} catch {
|
71
|
+
LODOP = getCLodop();
|
72
|
+
} catch (err) {
|
41
73
|
}
|
42
|
-
if (!
|
74
|
+
if (!LODOP) {
|
43
75
|
console.log("lodop控件加载失败,请检查lodop控件是否已经安装并启动,如未启动可以在系统托盘中【右键->启动智慧医院打印服务】手动启动。");
|
44
76
|
return;
|
45
77
|
}
|
46
|
-
if (
|
47
|
-
|
48
|
-
else {
|
49
|
-
document.body.innerHTML = C + (y ? v : "") + H + document.body.innerHTML;
|
78
|
+
if (!LODOP) {
|
79
|
+
document.body.innerHTML = strCLodopInstall_1 + (CLodopIsLocal ? strCLodopInstall_2 : "") + strCLodopInstall_3 + document.body.innerHTML;
|
50
80
|
return;
|
81
|
+
} else {
|
82
|
+
if (CLODOP.CVERSION < "4.0.8.8") {
|
83
|
+
document.body.innerHTML = strCLodopUpdate + document.body.innerHTML;
|
84
|
+
}
|
85
|
+
if (oEMBED && oEMBED.parentNode) oEMBED.parentNode.removeChild(oEMBED);
|
86
|
+
if (oOBJECT && oOBJECT.parentNode) oOBJECT.parentNode.removeChild(oOBJECT);
|
51
87
|
}
|
52
88
|
} else {
|
53
|
-
var
|
54
|
-
if (
|
55
|
-
|
89
|
+
var is64IE = isIE && !!ua.match(/x64/i);
|
90
|
+
if (oOBJECT || oEMBED) {
|
91
|
+
if (isIE) LODOP = oOBJECT;
|
92
|
+
else LODOP = oEMBED;
|
93
|
+
} else if (!CreatedOKLodopObject) {
|
94
|
+
LODOP = document.createElement("object");
|
95
|
+
LODOP.setAttribute("width", 0);
|
96
|
+
LODOP.setAttribute("height", 0);
|
97
|
+
LODOP.setAttribute("style", "position:absolute;left:0px;top:-100px;width:0px;height:0px;");
|
98
|
+
if (isIE) LODOP.setAttribute("classid", "clsid:2105C259-1E0C-4534-8141-A753534CB4CA");
|
99
|
+
else LODOP.setAttribute("type", "application/x-print-lodop");
|
100
|
+
document.documentElement.appendChild(LODOP);
|
101
|
+
CreatedOKLodopObject = LODOP;
|
102
|
+
} else LODOP = CreatedOKLodopObject;
|
103
|
+
if (!LODOP || !LODOP.VERSION) {
|
104
|
+
if (ua.indexOf("Chrome") >= 0) document.body.innerHTML = strHtmChrome + document.body.innerHTML;
|
105
|
+
if (ua.indexOf("Firefox") >= 0) document.body.innerHTML = strHtmFireFox + document.body.innerHTML;
|
106
|
+
document.body.innerHTML = (is64IE ? strHtm64_Install : strHtmInstall) + document.body.innerHTML;
|
107
|
+
return LODOP;
|
108
|
+
}
|
109
|
+
}
|
110
|
+
if (LODOP.VERSION < "6.2.2.6") {
|
111
|
+
if (!needCLodop()) document.body.innerHTML = (is64IE ? strHtm64_Update : strHtmUpdate) + document.body.innerHTML;
|
56
112
|
}
|
57
|
-
|
58
|
-
|
59
|
-
|
113
|
+
LODOP.SET_LICENSES("山大地纬软件股份有限公司", "CC9365E1BB34FA000175B357CD91F188454", "山大地緯軟件股份有限公司", "82F5D8E72ECF427F20ADD7E937E13D817E1");
|
114
|
+
LODOP.SET_LICENSES("THIRD LICENSE", "", "Shanda DareWay Software Co., Ltd", "1485033B74404D944BEA7FFAFB213175AF4");
|
115
|
+
return LODOP;
|
116
|
+
} catch (err) {
|
117
|
+
alert("getLodop出错:" + err);
|
60
118
|
}
|
61
119
|
}
|
62
120
|
export {
|
63
|
-
|
121
|
+
getLodop
|
64
122
|
};
|
65
123
|
//# sourceMappingURL=LodopFuncs.js.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"LodopFuncs.js","sources":["../../src/print/LodopFuncs.ts"],"sourcesContent":["//@ts-nocheck\r\n//==本JS是加载Lodop插件及CLodop服务的综合示例,可直接使用,建议看懂后融进自己页面程序==\r\nvar CreatedOKLodopObject, CLodopIsLocal, CLodopJsState\r\n\r\n//==判断是否需要CLodop(那些不支持插件的浏览器):==\r\nfunction needCLodop() {\r\n try {\r\n var ua = navigator.userAgent\r\n if (ua.match(/Windows\\sPhone/i)) return true\r\n if (ua.match(/iPhone|iPod|iPad/i)) return true\r\n if (ua.match(/Android/i)) return true\r\n if (ua.match(/Edge\\D?\\d+/i)) return true\r\n\r\n var verTrident = ua.match(/Trident\\D?\\d+/i)\r\n var verIE = ua.match(/MSIE\\D?\\d+/i)\r\n var verOPR = ua.match(/OPR\\D?\\d+/i)\r\n var verFF = ua.match(/Firefox\\D?\\d+/i)\r\n var x64 = ua.match(/x64/i)\r\n if (!verTrident && !verIE && x64) return true\r\n else if (verFF) {\r\n verFF = verFF[0].match(/\\d+/)\r\n if (verFF[0] >= 41 || x64) return true\r\n } else if (verOPR) {\r\n verOPR = verOPR[0].match(/\\d+/)\r\n if (verOPR[0] >= 32) return true\r\n } else if (!verTrident && !verIE) {\r\n var verChrome = ua.match(/Chrome\\D?\\d+/i)\r\n if (verChrome) {\r\n verChrome = verChrome[0].match(/\\d+/)\r\n if (verChrome[0] >= 41) return true\r\n }\r\n }\r\n return false\r\n } catch (err) {\r\n return true\r\n }\r\n}\r\n\r\n//==引用CLodop的主JS,用双端口8000和18000(以防其中一个被占):==\r\nif (needCLodop()) {\r\n var head = document.head || document.getElementsByTagName('head')[0] || document.documentElement\r\n\r\n var JS1 = document.createElement('script')\r\n JS1.src = 'http://localhost:8000/CLodopfuncs.js?priority=1'\r\n JS1.async = true\r\n JS1.defer = true\r\n head.insertBefore(JS1, head.firstChild)\r\n\r\n var JS2 = document.createElement('script')\r\n JS2.async = true\r\n JS2.defer = true\r\n JS2.src = 'http://localhost:18000/CLodopfuncs.js?priority=0'\r\n head.insertBefore(JS2, head.firstChild)\r\n\r\n CLodopIsLocal = !!(JS1.src + JS2.src).match(/\\/\\/localho|\\/\\/127.0.0./i)\r\n\r\n if (JS1.attachEvent) {\r\n CLodopJsState = 'loading'\r\n var onChange = function () {\r\n if (window.event.srcElement.readyState == 'loaded') CLodopJsState = 'complete'\r\n }\r\n JS1.attachEvent('onreadystatechange', onChange)\r\n JS2.attachEvent('onreadystatechange', onChange)\r\n }\r\n}\r\n\r\n//==获取LODOP对象主过程,判断是否安装、需否升级:==\r\nexport function getLodop(oOBJECT, oEMBED) {\r\n // dareway\r\n var strHtmInstall = \"<br><font color='#FF00FF'>打印控件未安装!安装后请刷新页面或重新进入。</font>\"\r\n var strHtmUpdate = \"<br><font color='#FF00FF'>打印控件需要升级!升级后请重新进入。</font>\"\r\n var strHtm64_Install = \"<br><font color='#FF00FF'>打印控件未安装!安装后请刷新页面或重新进入。</font>\"\r\n var strHtm64_Update = \"<br><font color='#FF00FF'>打印控件需要升级!升级后请重新进入。</font>\"\r\n var strHtmFireFox = \"<br><br><font color='#FF00FF'>(注意:如曾安装过Lodop旧版附件npActiveXPLugin,请在【工具】->【附加组件】->【扩展】中先卸它)</font>\"\r\n var strHtmChrome = \"<br><br><font color='#FF00FF'>(如果此前正常,仅因浏览器升级或重安装而出问题,需重新执行以上安装)</font>\"\r\n var strCLodopInstall_1 = \"<br><font color='#FF00FF'>Web打印服务CLodop未安装启动\"\r\n var strCLodopInstall_2 = '<br>(若此前已安装过,请确认是否打开)'\r\n var strCLodopInstall_3 = ',成功后请刷新本页面。</font>'\r\n var strCLodopUpdate = \"<br><font color='#FF00FF'>Web打印服务CLodop需升级!升级后请刷新页面。</font>\"\r\n // dareway\r\n\r\n var LODOP\r\n try {\r\n var ua = navigator.userAgent\r\n var isIE = !!ua.match(/MSIE/i) || !!ua.match(/Trident/i)\r\n if (needCLodop()) {\r\n try {\r\n LODOP = getCLodop()\r\n } catch (err) {}\r\n if (!LODOP /* && (document.readyState !== \"complete\" || (isIE && CLodopJsState == \"loading\"))*/) {\r\n console.log('lodop控件加载失败,请检查lodop控件是否已经安装并启动,如未启动可以在系统托盘中【右键->启动智慧医院打印服务】手动启动。')\r\n return\r\n }\r\n if (!LODOP) {\r\n document.body.innerHTML = strCLodopInstall_1 + (CLodopIsLocal ? strCLodopInstall_2 : '') + strCLodopInstall_3 + document.body.innerHTML\r\n return\r\n } else {\r\n if (CLODOP.CVERSION < '4.0.8.8') {\r\n document.body.innerHTML = strCLodopUpdate + document.body.innerHTML\r\n }\r\n if (oEMBED && oEMBED.parentNode) oEMBED.parentNode.removeChild(oEMBED)\r\n if (oOBJECT && oOBJECT.parentNode) oOBJECT.parentNode.removeChild(oOBJECT)\r\n }\r\n } else {\r\n var is64IE = isIE && !!ua.match(/x64/i)\r\n //==如果页面有Lodop就直接使用,否则新建:==\r\n if (oOBJECT || oEMBED) {\r\n if (isIE) LODOP = oOBJECT\r\n else LODOP = oEMBED\r\n } else if (!CreatedOKLodopObject) {\r\n LODOP = document.createElement('object')\r\n LODOP.setAttribute('width', 0)\r\n LODOP.setAttribute('height', 0)\r\n LODOP.setAttribute('style', 'position:absolute;left:0px;top:-100px;width:0px;height:0px;')\r\n if (isIE) LODOP.setAttribute('classid', 'clsid:2105C259-1E0C-4534-8141-A753534CB4CA')\r\n else LODOP.setAttribute('type', 'application/x-print-lodop')\r\n document.documentElement.appendChild(LODOP)\r\n CreatedOKLodopObject = LODOP\r\n } else LODOP = CreatedOKLodopObject\r\n //==Lodop插件未安装时提示下载地址:==\r\n if (!LODOP || !LODOP.VERSION) {\r\n if (ua.indexOf('Chrome') >= 0) document.body.innerHTML = strHtmChrome + document.body.innerHTML\r\n if (ua.indexOf('Firefox') >= 0) document.body.innerHTML = strHtmFireFox + document.body.innerHTML\r\n document.body.innerHTML = (is64IE ? strHtm64_Install : strHtmInstall) + document.body.innerHTML\r\n return LODOP\r\n }\r\n }\r\n if (LODOP.VERSION < '6.2.2.6') {\r\n if (!needCLodop()) document.body.innerHTML = (is64IE ? strHtm64_Update : strHtmUpdate) + document.body.innerHTML\r\n }\r\n //===如下空白位置适合调用统一功能(如注册语句、语言选择等):==\r\n\r\n LODOP.SET_LICENSES('山大地纬软件股份有限公司', 'CC9365E1BB34FA000175B357CD91F188454', '山大地緯軟件股份有限公司', '82F5D8E72ECF427F20ADD7E937E13D817E1')\r\n LODOP.SET_LICENSES('THIRD LICENSE', '', 'Shanda DareWay Software Co., Ltd', '1485033B74404D944BEA7FFAFB213175AF4')\r\n\r\n //=======================================================\r\n return LODOP\r\n } catch (err) {\r\n alert('getLodop出错:' + err)\r\n }\r\n}\r\n"],"names":[
|
1
|
+
{"version":3,"file":"LodopFuncs.js","sources":["../../src/print/LodopFuncs.ts"],"sourcesContent":["//@ts-nocheck\r\n//==本JS是加载Lodop插件及CLodop服务的综合示例,可直接使用,建议看懂后融进自己页面程序==\r\nvar CreatedOKLodopObject, CLodopIsLocal, CLodopJsState\r\n\r\n//==判断是否需要CLodop(那些不支持插件的浏览器):==\r\nfunction needCLodop() {\r\n try {\r\n var ua = navigator.userAgent\r\n if (ua.match(/Windows\\sPhone/i)) return true\r\n if (ua.match(/iPhone|iPod|iPad/i)) return true\r\n if (ua.match(/Android/i)) return true\r\n if (ua.match(/Edge\\D?\\d+/i)) return true\r\n\r\n var verTrident = ua.match(/Trident\\D?\\d+/i)\r\n var verIE = ua.match(/MSIE\\D?\\d+/i)\r\n var verOPR = ua.match(/OPR\\D?\\d+/i)\r\n var verFF = ua.match(/Firefox\\D?\\d+/i)\r\n var x64 = ua.match(/x64/i)\r\n if (!verTrident && !verIE && x64) return true\r\n else if (verFF) {\r\n verFF = verFF[0].match(/\\d+/)\r\n if (verFF[0] >= 41 || x64) return true\r\n } else if (verOPR) {\r\n verOPR = verOPR[0].match(/\\d+/)\r\n if (verOPR[0] >= 32) return true\r\n } else if (!verTrident && !verIE) {\r\n var verChrome = ua.match(/Chrome\\D?\\d+/i)\r\n if (verChrome) {\r\n verChrome = verChrome[0].match(/\\d+/)\r\n if (verChrome[0] >= 41) return true\r\n }\r\n }\r\n return false\r\n } catch (err) {\r\n return true\r\n }\r\n}\r\n\r\n//==引用CLodop的主JS,用双端口8000和18000(以防其中一个被占):==\r\nif (needCLodop()) {\r\n var head = document.head || document.getElementsByTagName('head')[0] || document.documentElement\r\n\r\n var JS1 = document.createElement('script')\r\n JS1.src = 'http://localhost:8000/CLodopfuncs.js?priority=1'\r\n JS1.async = true\r\n JS1.defer = true\r\n head.insertBefore(JS1, head.firstChild)\r\n\r\n var JS2 = document.createElement('script')\r\n JS2.async = true\r\n JS2.defer = true\r\n JS2.src = 'http://localhost:18000/CLodopfuncs.js?priority=0'\r\n head.insertBefore(JS2, head.firstChild)\r\n\r\n CLodopIsLocal = !!(JS1.src + JS2.src).match(/\\/\\/localho|\\/\\/127.0.0./i)\r\n\r\n if (JS1.attachEvent) {\r\n CLodopJsState = 'loading'\r\n var onChange = function () {\r\n if (window.event.srcElement.readyState == 'loaded') CLodopJsState = 'complete'\r\n }\r\n JS1.attachEvent('onreadystatechange', onChange)\r\n JS2.attachEvent('onreadystatechange', onChange)\r\n }\r\n}\r\n\r\n//==获取LODOP对象主过程,判断是否安装、需否升级:==\r\nexport function getLodop(oOBJECT, oEMBED) {\r\n // dareway\r\n var strHtmInstall = \"<br><font color='#FF00FF'>打印控件未安装!安装后请刷新页面或重新进入。</font>\"\r\n var strHtmUpdate = \"<br><font color='#FF00FF'>打印控件需要升级!升级后请重新进入。</font>\"\r\n var strHtm64_Install = \"<br><font color='#FF00FF'>打印控件未安装!安装后请刷新页面或重新进入。</font>\"\r\n var strHtm64_Update = \"<br><font color='#FF00FF'>打印控件需要升级!升级后请重新进入。</font>\"\r\n var strHtmFireFox = \"<br><br><font color='#FF00FF'>(注意:如曾安装过Lodop旧版附件npActiveXPLugin,请在【工具】->【附加组件】->【扩展】中先卸它)</font>\"\r\n var strHtmChrome = \"<br><br><font color='#FF00FF'>(如果此前正常,仅因浏览器升级或重安装而出问题,需重新执行以上安装)</font>\"\r\n var strCLodopInstall_1 = \"<br><font color='#FF00FF'>Web打印服务CLodop未安装启动\"\r\n var strCLodopInstall_2 = '<br>(若此前已安装过,请确认是否打开)'\r\n var strCLodopInstall_3 = ',成功后请刷新本页面。</font>'\r\n var strCLodopUpdate = \"<br><font color='#FF00FF'>Web打印服务CLodop需升级!升级后请刷新页面。</font>\"\r\n // dareway\r\n\r\n var LODOP\r\n try {\r\n var ua = navigator.userAgent\r\n var isIE = !!ua.match(/MSIE/i) || !!ua.match(/Trident/i)\r\n if (needCLodop()) {\r\n try {\r\n LODOP = getCLodop()\r\n } catch (err) {}\r\n if (!LODOP /* && (document.readyState !== \"complete\" || (isIE && CLodopJsState == \"loading\"))*/) {\r\n console.log('lodop控件加载失败,请检查lodop控件是否已经安装并启动,如未启动可以在系统托盘中【右键->启动智慧医院打印服务】手动启动。')\r\n return\r\n }\r\n if (!LODOP) {\r\n document.body.innerHTML = strCLodopInstall_1 + (CLodopIsLocal ? strCLodopInstall_2 : '') + strCLodopInstall_3 + document.body.innerHTML\r\n return\r\n } else {\r\n if (CLODOP.CVERSION < '4.0.8.8') {\r\n document.body.innerHTML = strCLodopUpdate + document.body.innerHTML\r\n }\r\n if (oEMBED && oEMBED.parentNode) oEMBED.parentNode.removeChild(oEMBED)\r\n if (oOBJECT && oOBJECT.parentNode) oOBJECT.parentNode.removeChild(oOBJECT)\r\n }\r\n } else {\r\n var is64IE = isIE && !!ua.match(/x64/i)\r\n //==如果页面有Lodop就直接使用,否则新建:==\r\n if (oOBJECT || oEMBED) {\r\n if (isIE) LODOP = oOBJECT\r\n else LODOP = oEMBED\r\n } else if (!CreatedOKLodopObject) {\r\n LODOP = document.createElement('object')\r\n LODOP.setAttribute('width', 0)\r\n LODOP.setAttribute('height', 0)\r\n LODOP.setAttribute('style', 'position:absolute;left:0px;top:-100px;width:0px;height:0px;')\r\n if (isIE) LODOP.setAttribute('classid', 'clsid:2105C259-1E0C-4534-8141-A753534CB4CA')\r\n else LODOP.setAttribute('type', 'application/x-print-lodop')\r\n document.documentElement.appendChild(LODOP)\r\n CreatedOKLodopObject = LODOP\r\n } else LODOP = CreatedOKLodopObject\r\n //==Lodop插件未安装时提示下载地址:==\r\n if (!LODOP || !LODOP.VERSION) {\r\n if (ua.indexOf('Chrome') >= 0) document.body.innerHTML = strHtmChrome + document.body.innerHTML\r\n if (ua.indexOf('Firefox') >= 0) document.body.innerHTML = strHtmFireFox + document.body.innerHTML\r\n document.body.innerHTML = (is64IE ? strHtm64_Install : strHtmInstall) + document.body.innerHTML\r\n return LODOP\r\n }\r\n }\r\n if (LODOP.VERSION < '6.2.2.6') {\r\n if (!needCLodop()) document.body.innerHTML = (is64IE ? strHtm64_Update : strHtmUpdate) + document.body.innerHTML\r\n }\r\n //===如下空白位置适合调用统一功能(如注册语句、语言选择等):==\r\n\r\n LODOP.SET_LICENSES('山大地纬软件股份有限公司', 'CC9365E1BB34FA000175B357CD91F188454', '山大地緯軟件股份有限公司', '82F5D8E72ECF427F20ADD7E937E13D817E1')\r\n LODOP.SET_LICENSES('THIRD LICENSE', '', 'Shanda DareWay Software Co., Ltd', '1485033B74404D944BEA7FFAFB213175AF4')\r\n\r\n //=======================================================\r\n return LODOP\r\n } catch (err) {\r\n alert('getLodop出错:' + err)\r\n }\r\n}\r\n"],"names":[],"mappings":"AAEA,IAAI,sBAAsB;AAG1B,SAAS,aAAa;AAChB,MAAA;AACF,QAAI,KAAK,UAAU;AACnB,QAAI,GAAG,MAAM,iBAAiB,EAAU,QAAA;AACxC,QAAI,GAAG,MAAM,mBAAmB,EAAU,QAAA;AAC1C,QAAI,GAAG,MAAM,UAAU,EAAU,QAAA;AACjC,QAAI,GAAG,MAAM,aAAa,EAAU,QAAA;AAEhC,QAAA,aAAa,GAAG,MAAM,gBAAgB;AACtC,QAAA,QAAQ,GAAG,MAAM,aAAa;AAC9B,QAAA,SAAS,GAAG,MAAM,YAAY;AAC9B,QAAA,QAAQ,G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