super-page-runtime 2.2.59 → 2.2.65
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.
- package/dist/es/assets/file.png.js +4 -0
- package/dist/es/assets/folder.png.js +4 -0
- package/dist/es/components/runtime/utils/events/event-util.js +23 -23
- package/dist/es/components/runtime/utils/events/standard-event.d.ts +5 -1
- package/dist/es/components/runtime/utils/events/standard-event.js +105 -65
- package/dist/es/components/runtime/utils/page-helper-util.d.ts +2 -0
- package/dist/es/components/runtime/utils/page-helper-util.js +14 -0
- package/dist/es/components/runtime/utils/page-init-util.js +21 -10
- package/dist/es/components/runtime/utils/tree-utils.js +49 -15
- package/dist/es/components/runtime/views/assemblys/common/save-chart-condition-dialog.vue.d.ts +31 -0
- package/dist/es/components/runtime/views/assemblys/common/save-chart-condition-dialog.vue.js +35 -0
- package/dist/es/components/runtime/views/assemblys/common/save-chart-condition-dialog.vue2.js +4 -0
- package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/container/fixed/FixedBox.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/container/fixed/YxAffix.vue.d.ts +94 -0
- package/dist/es/components/runtime/views/assemblys/container/fixed/YxAffix.vue.js +5 -71
- package/dist/es/components/runtime/views/assemblys/container/fixed/YxAffix.vue2.js +72 -2
- package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue.js +4 -1
- package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue2.js +22 -19
- package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue.js +4 -1
- package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +113 -45
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +59 -54
- package/dist/es/components/runtime/views/super-page.vue.js +1 -1
- package/dist/es/components/runtime/views/super-page.vue2.js +144 -130
- package/dist/es/i18n/langs/cn.js +1 -1
- package/dist/es/i18n/langs/en.js +1 -1
- package/dist/es/index.d.ts +2 -1
- package/dist/es/index.js +2 -0
- package/dist/es/style.css +372 -26
- package/package.json +2 -2
|
@@ -1,62 +1,130 @@
|
|
|
1
|
-
import { defineComponent as e,
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
import { defineComponent as e, ref as a, computed as t, onMounted as n, nextTick as l, watch as o, resolveComponent as u, createElementBlock as d, openBlock as i, normalizeClass as s, unref as c, createBlock as r, createCommentVNode as p, withDirectives as v, normalizeStyle as f, withCtx as g, createVNode as m, createElementVNode as h, createTextVNode as y, Fragment as C, toDisplayString as x, renderList as k, vShow as N } from "vue";
|
|
2
|
+
import T from "../../../../../../assets/folder.png.js";
|
|
3
|
+
import I from "../../../../../../assets/file.png.js";
|
|
4
|
+
import { getFormModelFields as V } from "../../../../utils/page-init-util.js";
|
|
5
|
+
import { setVariableValue as b, getVariableValue as E } from "../../../../utils/page-helper-util.js";
|
|
6
|
+
import { getMenuTreeData as L, createTreeNode as M, updateTreeNode as K, deleteNode as _ } from "../../../../utils/tree-utils.js";
|
|
7
|
+
import { handleAfterInitEvent as w, handleFormEvent as j } from "../../../../utils/events/event-util.js";
|
|
8
|
+
import { ElMessageBox as S, ElMessage as z } from "element-plus";
|
|
9
|
+
import { checkPermission as B } from "agilebuilder-ui/src/utils/permission";
|
|
10
|
+
const P = { key: 0, class: "custom-tree-node" }, R = ["title"], D = { key: 0, class: "item-row" }, O = { class: "item-side" }, U = { key: 1, class: "item-side", style: { display: "flex", "align-items": "center" } }, W = ["onClick"], A = e({ __name: "tree-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: A2 }) {
|
|
11
|
+
var _a, _b, _c;
|
|
12
|
+
const q = a(), F = a(false), G = e2, H = G.pageContext.entity ? G.pageContext.entity : {}, J = a([]);
|
|
13
|
+
((_a = G.configure.props) == null ? void 0 : _a.contextMenus) && (G.pageContext && G.configure && !G.pageContext.isTest ? G.configure.props.contextMenus.forEach((e3) => {
|
|
14
|
+
if (e3.functionCodes && e3.functionCodes.length > 0) for (let a2 = 0; a2 < e3.functionCodes.length; a2++) {
|
|
15
|
+
const t2 = e3.functionCodes[a2];
|
|
16
|
+
if (B(t2)) return void J.value.push(e3);
|
|
17
|
+
}
|
|
18
|
+
else J.value.push(e3);
|
|
19
|
+
}) : J.value = G.configure.props.contextMenus);
|
|
20
|
+
let Q = V(G.pageContext, G.configure);
|
|
21
|
+
const X = t({ get: () => E(H, Q), set(e3) {
|
|
22
|
+
b(H, Q, e3);
|
|
23
|
+
} }), Y = a(!!((_c = (_b = G.configure.props) == null ? void 0 : _b.base) == null ? void 0 : _c.lazy)), Z = G.configure.runtime ? G.configure.runtime : {}, $ = Z.style, ee = Z.class, ae = a(), te = a(Z.props ? Z.props : {}), ne = a({ id: "nodeId", label: "name", children: "children", isLeaf: "leaf", disabled: "disabled", nodeType: "nodeType", iconType: "iconType", iconValue: "iconValue" }), le = a(false), oe = a([]), ue = a(null), de = a(""), ie = a(false), se = a(""), ce = a(""), re = a("");
|
|
24
|
+
n(() => {
|
|
25
|
+
l(() => {
|
|
26
|
+
const e3 = X.value;
|
|
27
|
+
w(e3, G.pageContext, G.configure, { componentRef: ae.value, value: e3, entity: G.pageContext.entity.data, pageData: G.pageContext.entity.page });
|
|
19
28
|
});
|
|
20
|
-
}),
|
|
21
|
-
|
|
22
|
-
}), o(
|
|
23
|
-
|
|
29
|
+
}), Y.value ? le.value = true : L(G.pageContext, G.configure).then((e3) => {
|
|
30
|
+
oe.value = e3, le.value = true;
|
|
31
|
+
}), o(de, (e3) => {
|
|
32
|
+
ie.value = true, ae.value.filter(e3);
|
|
24
33
|
});
|
|
25
|
-
const
|
|
26
|
-
function
|
|
27
|
-
|
|
34
|
+
const pe = (e3, a2) => !e3 || a2.name.includes(e3);
|
|
35
|
+
function ve(e3, a2, t2) {
|
|
36
|
+
ue.value = a2, j(null, G.pageContext, G.configure, "node-click", { data: e3, node: a2, nodeTree: t2 });
|
|
28
37
|
}
|
|
29
|
-
function
|
|
30
|
-
let
|
|
31
|
-
|
|
32
|
-
const
|
|
33
|
-
|
|
34
|
-
if (
|
|
38
|
+
function fe(e3, a2) {
|
|
39
|
+
let t2 = "0";
|
|
40
|
+
t2 = 0 === e3.level ? "0" : e3.data.nodeId, function(e4, a3, t3) {
|
|
41
|
+
const n2 = { parentNodeId: e4, data: a3.data, searchValue: de, isSearch: ie.value };
|
|
42
|
+
L(G.pageContext, G.configure, e4, a3, n2).then((n3) => {
|
|
43
|
+
if (ie.value = false, t3(n3), "0" === e4) {
|
|
35
44
|
!function(e5, a4) {
|
|
36
|
-
const
|
|
37
|
-
|
|
38
|
-
|
|
45
|
+
const t4 = { parentNodeId: e5, data: a4.data, searchValue: de, isSearch: ie.value };
|
|
46
|
+
L(G.pageContext, G.configure, e5, a4, t4).then((a5) => {
|
|
47
|
+
ie.value = false, ae.value.updateKeyChildren(e5, a5), ae.value.store.nodesMap[e5] && (ae.value.store.nodesMap[e5].expanded = true);
|
|
39
48
|
});
|
|
40
|
-
}(
|
|
49
|
+
}(n3[0].nodeId, a3);
|
|
41
50
|
}
|
|
42
51
|
});
|
|
43
|
-
}(
|
|
52
|
+
}(t2, e3, a2);
|
|
44
53
|
}
|
|
45
|
-
|
|
46
|
-
return
|
|
54
|
+
const ge = a({}), me = (e3, a2, t2, n2) => {
|
|
55
|
+
if (se.value) return void z.warning("请先保存当前编辑节点!");
|
|
56
|
+
document.removeEventListener("click", he), ge.value = t2, F.value = true;
|
|
57
|
+
const l2 = document.documentElement.scrollTop || document.body.scrollTop;
|
|
58
|
+
q.value.style.display = "block", q.value.style.left = e3.x + "px", q.value.style.top = e3.y + l2 - 10 + "px", document.addEventListener("click", he);
|
|
59
|
+
}, he = () => {
|
|
60
|
+
F.value = false, document.removeEventListener("click", he);
|
|
61
|
+
}, ye = (e3, a2) => {
|
|
62
|
+
if (e3.parent && e3.parent.level > 0) {
|
|
63
|
+
const t2 = e3.parent.data.children.findIndex((a3) => a3.nodeId === e3.data.nodeId);
|
|
64
|
+
e3.parent.data.children[t2] = a2, e3.data = a2;
|
|
65
|
+
} else {
|
|
66
|
+
const t2 = e3.parent.data.findIndex((a3) => a3.nodeId === e3.data.nodeId);
|
|
67
|
+
e3.parent.data[t2] = a2, e3.data = a2;
|
|
68
|
+
}
|
|
69
|
+
}, Ce = () => {
|
|
70
|
+
se.value = "", re.value = "", ce.value = "";
|
|
71
|
+
}, xe = () => ({ nodeId: "primary" + (/* @__PURE__ */ new Date()).getTime(), name: "新增节点", disabled: false, iconType: "custom", isLeaf: true });
|
|
72
|
+
function ke(e3) {
|
|
73
|
+
e3.tipMessage ? S.confirm(e3.tipMessage, { confirmButtonText: "确定", cancelButtonText: "取消", type: "error" }).then(() => {
|
|
74
|
+
_(ge.value, G.configure, G.pageContext).then(() => {
|
|
75
|
+
z.success("删除成功!"), Ne(), ge.value = null;
|
|
76
|
+
});
|
|
77
|
+
}).catch(() => {
|
|
78
|
+
ge.value = null;
|
|
79
|
+
}) : _(ge.value, G.configure, G.pageContext).then(() => {
|
|
80
|
+
z.success("删除成功!"), Ne(), ge.value = null;
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
const Ne = () => {
|
|
84
|
+
const e3 = ge.value.parent;
|
|
85
|
+
ae.value.remove(ge.value), e3.childNodes && 0 === e3.childNodes.length && (e3.data.isLeaf = true), e3.data.children && e3.data.children.length > 0 && (e3.data.children = e3.data.children.filter((e4) => e4.nodeId !== ge.value.data.nodeId));
|
|
86
|
+
};
|
|
87
|
+
return A2({ getSelectNode: function() {
|
|
88
|
+
return ue.value;
|
|
47
89
|
}, expandNode: function(e3) {
|
|
48
90
|
e3.loaded = false, e3.expand();
|
|
49
91
|
}, loadTreeNodes: function() {
|
|
50
|
-
|
|
51
|
-
|
|
92
|
+
L(G.pageContext, G.configure).then((e3) => {
|
|
93
|
+
ie.value = false, oe.value = e3;
|
|
52
94
|
});
|
|
53
95
|
}, getNode: function(e3) {
|
|
54
|
-
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
|
|
96
|
+
ae.value.getNode(e3);
|
|
97
|
+
}, getCheckedNodes: (e3, a2) => ae.value.getCheckedNodes(e3, a2), setCheckedNodes: (e3) => {
|
|
98
|
+
ae.value.setCheckedNodes(e3);
|
|
99
|
+
}, getCheckedKeys: (e3) => ae.value.getCheckedKeysleafOnly(), setCheckedKeys: (e3, a2) => {
|
|
100
|
+
ae.value.setCheckedKeys(e3, a2);
|
|
101
|
+
}, setChecked: (e3, a2, t2) => {
|
|
102
|
+
ae.value.setChecked(e3, a2, t2);
|
|
103
|
+
}, getCurrentKey: () => ae.value.getCurrentKey(), getCurrentNode: () => ae.value.getCurrentNode(), setCurrentKey: (e3, a2 = true) => ae.value.setCurrentKey(e3, a2), setCurrentNode: (e3, a2 = true) => ae.value.setCurrentNode(e3, a2) }), (e3, a2) => {
|
|
104
|
+
var _a2;
|
|
105
|
+
const t2 = u("el-input"), n2 = u("el-button"), l2 = u("SuperIcon"), o2 = u("el-tree");
|
|
106
|
+
return i(), d("div", { class: s(c(ee)) }, [te.value.filter ? (i(), r(t2, { key: 0, modelValue: de.value, "onUpdate:modelValue": a2[0] || (a2[0] = (e4) => de.value = e4), style: { width: "240px" }, placeholder: "请输入查询条件" }, null, 8, ["modelValue"])) : p("", true), le.value ? (i(), r(o2, { key: 1, ref_key: "menuTreeRef", ref: ae, style: f(c($)), load: fe, data: oe.value, "node-key": "nodeId", props: ne.value, "default-expand-all": te.value.defaultExpandAll, "expand-on-click-node": te.value.expandOnClickNode, indent: te.value.retractWidth ? te.value.retractWidth : 18, accordion: te.value.accordion, "show-checkbox": !!te.value.showCheckbox, "highlight-current": "", lazy: Y.value, "filter-node-method": pe, onNodeClick: ve, onNodeContextmenu: me }, { default: g(({ node: o3, data: u2 }) => [u2.nodeId === se.value ? (i(), d("div", P, [m(t2, { modelValue: re.value, "onUpdate:modelValue": a2[1] || (a2[1] = (e4) => re.value = e4), size: "small" }, null, 8, ["modelValue"]), h("div", null, [m(n2, { type: "primary", link: "", onClick: (e4) => ((e5) => {
|
|
107
|
+
"" !== re.value ? (e5.data.name = re.value, ce.value && e5.data.nodeId === ce.value ? M(e5, G.configure, G.pageContext).then((a3) => {
|
|
108
|
+
ye(e5, a3.currentNode), Ce(), z.success("保存成功!");
|
|
109
|
+
}) : K(e5, G.configure, G.pageContext).then((a3) => {
|
|
110
|
+
ye(e5, a3.currentNode), Ce(), z.success("保存成功!");
|
|
111
|
+
})) : z.warning("请输入节点名称");
|
|
112
|
+
})(o3) }, { default: g(() => a2[2] || (a2[2] = [y(" 保存 ")])), _: 2 }, 1032, ["onClick"]), m(n2, { style: { "margin-left": "4px" }, type: "primary", link: "", onClick: (a3) => ((e4) => {
|
|
113
|
+
ce.value && e4.data.nodeId === ce.value && ae.value.remove(e4), Ce();
|
|
114
|
+
})(o3, e3.configure, e3.pageContext) }, { default: g(() => a2[3] || (a2[3] = [y(" 撤销 ")])), _: 2 }, 1032, ["onClick"])])])) : (i(), d("span", { key: 1, title: o3.label, class: "ellipsis" }, [u2.iconValue ? (i(), r(l2, { key: 0, iconType: u2.iconType, iconValue: u2.iconValue }, null, 8, ["iconType", "iconValue"])) : te.value.iconValue ? (i(), r(l2, { key: 1, iconType: te.value.iconType, iconValue: te.value.iconValue }, null, 8, ["iconType", "iconValue"])) : (i(), d(C, { key: 2 }, [u2.isLeaf ? (i(), d("div", U, [a2[5] || (a2[5] = h("img", { src: I, class: "file" }, null, -1)), h("span", null, x(u2.name), 1)])) : (i(), d("div", D, [h("div", O, [a2[4] || (a2[4] = h("img", { src: T, class: "file" }, null, -1)), h("span", null, x(u2.name), 1)])]))], 64))], 8, R))]), _: 1 }, 8, ["style", "data", "props", "default-expand-all", "expand-on-click-node", "indent", "accordion", "show-checkbox", "lazy"])) : p("", true), v(h("div", null, [h("ul", { ref_key: "contxtMenuRef", ref: q, class: "context-menu" }, [(i(true), d(C, null, k(J.value, (e4, a3) => (i(), d("li", { key: a3, tabindex: "-1", class: "menu__item", onClick: (a4) => ((e5) => {
|
|
115
|
+
if (ge.value && "standard" === e5.type && e5.standardEvent) if ("edit" === e5.standardEvent) se.value = ge.value.data.nodeId, re.value = ge.value.data.name;
|
|
116
|
+
else if ("delete" === e5.standardEvent) ge.value.childNodes && ge.value.childNodes.length > 0 && e5.deleteParentNodeTip ? (e5.deleteParentNodeTipMessage || (e5.deleteParentNodeTipMessage = "当前节点下有子节点,确认删除?"), S.confirm(e5.deleteParentNodeTipMessage, { confirmButtonText: "确定", cancelButtonText: "取消", type: "error" }).then(() => {
|
|
117
|
+
ke(e5);
|
|
118
|
+
}).catch(() => {
|
|
119
|
+
ge.value = null;
|
|
120
|
+
})) : ke(e5);
|
|
121
|
+
else {
|
|
122
|
+
const a5 = xe();
|
|
123
|
+
se.value = a5.nodeId, ce.value = a5.nodeId, re.value = a5.name, "addSiblingNode" === e5.standardEvent ? (a5.isLeaf = ge.value.data.isLeaf, ge.value.parent && ge.value.parent.level > 0 ? ae.value.append(a5, ge.value.parent) : oe.value.push(a5)) : "addChildNode" === e5.standardEvent && (a5.isLeaf = true, ge.value.data.isLeaf = false, ae.value.append(a5, ge.value), ae.value.setCurrentKey(a5.nodeId, true));
|
|
124
|
+
}
|
|
125
|
+
})(e4) }, [h("span", null, x(e4.name), 1)], 8, W))), 128))], 512)], 512), [[N, F.value && ((_a2 = J.value) == null ? void 0 : _a2.length) > 0]])], 2);
|
|
58
126
|
};
|
|
59
127
|
} });
|
|
60
128
|
export {
|
|
61
|
-
|
|
129
|
+
A as default
|
|
62
130
|
};
|
package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js
CHANGED
|
@@ -1,70 +1,75 @@
|
|
|
1
|
-
import { defineComponent as e, ref as
|
|
1
|
+
import { defineComponent as e, ref as t, computed as l, onMounted as o, nextTick as n, onUnmounted as a, watch as u, resolveComponent as i, createBlock as r, openBlock as p, normalizeStyle as c, normalizeClass as s, unref as v, withCtx as f, createVNode as g, createCommentVNode as y, createSlots as m, createTextVNode as d, toDisplayString as x, createElementBlock as C, Fragment as I } from "vue";
|
|
2
2
|
import { SuperIcon as T } from "agilebuilder-ui";
|
|
3
3
|
import { getFormModelFields as k } from "../../../../utils/page-init-util.js";
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
import { formatScanRuleSets as
|
|
7
|
-
import
|
|
8
|
-
import { isMobileBrowser as
|
|
9
|
-
import
|
|
10
|
-
import { $t as
|
|
11
|
-
const
|
|
4
|
+
import { getModelFieldFromPageContext as V, isNumberDataType as h, setVariableValue as w, getVariableValue as b } from "../../../../utils/page-helper-util.js";
|
|
5
|
+
import { handleFormEvent as _, handleAfterInitEvent as S, doSuffixOrPrefixClickEvent as j } from "../../../../utils/events/event-util.js";
|
|
6
|
+
import { formatScanRuleSets as R, analysisScanValue as D, setScanAnalysisValue as P } from "../../../../utils/form/scan-util.js";
|
|
7
|
+
import q from "../common/title-suffix-element.vue.js";
|
|
8
|
+
import { isMobileBrowser as z } from "agilebuilder-ui/src/utils/common-util";
|
|
9
|
+
import L from "../../../../utils/eventBus.js";
|
|
10
|
+
import { $t as M } from "../../../../utils/i18n-util.js";
|
|
11
|
+
const N = e({ __name: "inputtext-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: N2 }) {
|
|
12
12
|
var _a, _b, _c;
|
|
13
|
-
const
|
|
14
|
-
let
|
|
15
|
-
|
|
16
|
-
e3 =
|
|
17
|
-
|
|
13
|
+
const O = e2, B = O.pageContext.entity ? O.pageContext.entity : {}, F = t("text");
|
|
14
|
+
let J = k(O.pageContext, O.configure);
|
|
15
|
+
if (O.pageContext.modelFieldsMap) {
|
|
16
|
+
const e3 = V(J, O.pageContext);
|
|
17
|
+
e3 && (F.value = h(e3.dataType) ? "number" : "text");
|
|
18
|
+
}
|
|
19
|
+
const $ = t(z()), A = O.pageContext.code, E = t(J && J.length > 0 ? A + "__" + J.join("__") : null), U = l({ get: () => b(B, J), set(e3) {
|
|
20
|
+
e3 = e3.trim(), w(B, J, e3);
|
|
21
|
+
} }), W = t(null), G = t(null), H = t(null);
|
|
18
22
|
o(() => {
|
|
19
|
-
|
|
20
|
-
|
|
23
|
+
L.$on(E.value + "-scanDone", (e3) => {
|
|
24
|
+
re(e3.result), _(e3.result, O.pageContext, O.configure, "afterScanDone");
|
|
21
25
|
}), n(() => {
|
|
22
|
-
const e3 =
|
|
23
|
-
|
|
26
|
+
const e3 = U.value;
|
|
27
|
+
S(e3, O.pageContext, O.configure, { formItemRef: W.value, componentRef: G.value, titleRef: H.value, value: e3, entity: O.pageContext.entity.data, pageData: O.pageContext.entity.page });
|
|
24
28
|
});
|
|
25
29
|
}), a(() => {
|
|
26
|
-
|
|
30
|
+
L.$off(E.value + "-scanDone");
|
|
27
31
|
});
|
|
28
|
-
const
|
|
29
|
-
let
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
let
|
|
33
|
-
|
|
34
|
-
const
|
|
35
|
-
let
|
|
36
|
-
((_b =
|
|
37
|
-
|
|
38
|
-
}), u(() =>
|
|
32
|
+
const K = O.configure.runtime ? O.configure.runtime : {}, Q = t(K.props ? K.props : {}), X = t(!!((_a = Q.value.scan) == null ? void 0 : _a.enable));
|
|
33
|
+
let Y = false;
|
|
34
|
+
const Z = window.localStorage.getItem("auth_source");
|
|
35
|
+
Z && "dingtalk" === Z && (Y = true);
|
|
36
|
+
let ee = "";
|
|
37
|
+
ee = navigator.userAgent.indexOf(" uni-app ") > 0 ? "app" : "browser";
|
|
38
|
+
const te = !(!$.value || !ee || "app" !== ee), le = t(!!((te || Y) && X.value || $.value && X.value && "https:" === window.location.protocol));
|
|
39
|
+
let oe = {};
|
|
40
|
+
((_b = Q.value.scan) == null ? void 0 : _b.enable) && ((_c = Q.value.scan.ruleList) == null ? void 0 : _c.length) > 0 && (R(Q.value.scan.ruleList).then((e3) => {
|
|
41
|
+
oe = e3;
|
|
42
|
+
}), u(() => U.value, (e3) => {
|
|
39
43
|
e3 = e3.trim();
|
|
40
|
-
const
|
|
41
|
-
|
|
44
|
+
const t2 = D(e3, oe);
|
|
45
|
+
t2 && P(O.pageContext, t2.scanSet, t2.params);
|
|
42
46
|
}));
|
|
43
|
-
const
|
|
44
|
-
function
|
|
45
|
-
return
|
|
47
|
+
const ne = K.style, ae = K.class, ue = K.headerStyle, ie = K.titleExceedStyle;
|
|
48
|
+
function re(e3) {
|
|
49
|
+
return w(B, J, e3);
|
|
50
|
+
}
|
|
51
|
+
const pe = t(false);
|
|
52
|
+
function ce() {
|
|
53
|
+
if (te || Y) {
|
|
54
|
+
const e3 = { type: "scan", componentId: E.value, systemCode: O.pageContext.systemCode };
|
|
55
|
+
Y && (e3.type = "dingTalkScan"), window.parent.postMessage(JSON.stringify(e3), "*");
|
|
56
|
+
} else if ($.value) if ("https:" === window.location.protocol) pe.value = true;
|
|
57
|
+
else {
|
|
58
|
+
const e3 = { type: "scan", componentId: E.value, systemCode: O.pageContext.systemCode };
|
|
59
|
+
window.parent.postMessage(JSON.stringify(e3), "*");
|
|
60
|
+
}
|
|
61
|
+
else pe.value = true;
|
|
46
62
|
}
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
ue.value = false, ae(e3);
|
|
63
|
+
function se(e3) {
|
|
64
|
+
pe.value = false, re(e3);
|
|
50
65
|
}
|
|
51
|
-
return
|
|
52
|
-
return
|
|
53
|
-
}, setValue:
|
|
54
|
-
const
|
|
55
|
-
return
|
|
56
|
-
if (Y || K) {
|
|
57
|
-
const e5 = { type: "scan", componentId: $.value, systemCode: N.pageContext.systemCode };
|
|
58
|
-
K && (e5.type = "dingTalkScan"), window.parent.postMessage(JSON.stringify(e5), "*");
|
|
59
|
-
} else if (J.value) if ("https:" === window.location.protocol) ue.value = true;
|
|
60
|
-
else {
|
|
61
|
-
const e5 = { type: "scan", componentId: $.value, systemCode: N.pageContext.systemCode };
|
|
62
|
-
window.parent.postMessage(JSON.stringify(e5), "*");
|
|
63
|
-
}
|
|
64
|
-
else ue.value = true;
|
|
65
|
-
}()) })) : y("", true), G.value.sufIconType && G.value.sufIconValue ? (c(), r(v(T), { key: 1, iconType: G.value.sufIconType, iconValue: G.value.sufIconValue, onClick: l2[4] || (l2[4] = (l3) => v(_)(A.value, e3.pageContext, e3.configure, "suffixClick")) }, null, 8, ["iconType", "iconValue"])) : y("", true), d(" " + x(v(D)(G.value.sufText)), 1)]), key: "3" } : void 0]), 1032, ["disabled", "readonly", "size", "clearable", "placeholder", "maxlength", "show-word-limit", "modelValue"]), ue.value ? (c(), r(o2, { key: 0, onClose: ie })) : y("", true)]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
|
|
66
|
+
return N2({ getValue: function() {
|
|
67
|
+
return b(B, J);
|
|
68
|
+
}, setValue: re, scanClick: ce }), (e3, t2) => {
|
|
69
|
+
const l2 = i("el-input"), o2 = i("scan-code-input-browser"), n2 = i("el-form-item");
|
|
70
|
+
return p(), r(n2, { ref_key: "formItemRef", ref: W, required: !!Q.value.required, class: s(v(ae)), "label-width": Q.value.labelWidth, style: c(v(ne)) }, { label: f(() => [Q.value.tittleShow ? (p(), C("div", { key: 0, ref_key: "titleRef", ref: H, style: c({ ...v(ue), ...v(ie) }) }, [Q.value.prefixType ? (p(), r(q, { key: 0, pageContext: e3.pageContext, property: Q.value }, null, 8, ["pageContext", "property"])) : (p(), C(I, { key: 1 }, [d(x(v(M)(Q.value.title)), 1)], 64))], 4)) : y("", true)]), default: f(() => [g(l2, { ref_key: "componentRef", ref: G, disabled: "disabled" === Q.value.state, readonly: "readonly" === Q.value.state, size: Q.value.size, clearable: Q.value.clearable, placeholder: Q.value.placeholder, maxlength: Q.value.maxLength, "show-word-limit": Q.value.showInputNum, type: F.value, modelValue: U.value, "onUpdate:modelValue": t2[5] || (t2[5] = (e4) => U.value = e4), onInput: t2[6] || (t2[6] = (t3) => v(_)(t3, e3.pageContext, e3.configure, "input")), onChange: t2[7] || (t2[7] = (t3) => v(_)(t3, e3.pageContext, e3.configure, "change")), onBlur: t2[8] || (t2[8] = (t3) => v(_)(t3, e3.pageContext, e3.configure, "blur")), onFocus: t2[9] || (t2[9] = (t3) => v(_)(t3, e3.pageContext, e3.configure, "focus")), onClick: t2[10] || (t2[10] = (t3) => v(_)(t3, e3.pageContext, e3.configure, "click")) }, m({ _: 2 }, ["outer" != Q.value.iconPosition && (Q.value.preIconType && Q.value.preIconValue || Q.value.preText) ? { name: "prefix", fn: f(() => [Q.value.preIconType && Q.value.preIconValue ? (p(), r(v(T), { key: 0, iconType: Q.value.preIconType, iconValue: Q.value.preIconValue, onClick: t2[0] || (t2[0] = (t3) => v(j)(U.value, e3.pageContext, e3.configure, "prefixClick")) }, null, 8, ["iconType", "iconValue"])) : y("", true), d(" " + x(v(M)(Q.value.preText)), 1)]), key: "0" } : void 0, "outer" == Q.value.iconPosition && (Q.value.preIconType && Q.value.preIconValue || Q.value.preText) ? { name: "prepend", fn: f(() => [Q.value.preIconType && Q.value.preIconValue ? (p(), r(v(T), { key: 0, iconType: Q.value.preIconType, iconValue: Q.value.preIconValue, onClick: t2[1] || (t2[1] = (t3) => v(j)(U.value, e3.pageContext, e3.configure, "prefixClick")) }, null, 8, ["iconType", "iconValue"])) : y("", true), d(" " + x(v(M)(Q.value.preText)), 1)]), key: "1" } : void 0, "outer" != Q.value.iconPosition && (Q.value.sufIconType && Q.value.sufIconValue || Q.value.sufText) ? { name: "suffix", fn: f(() => [Q.value.sufIconType && Q.value.sufIconValue ? (p(), r(v(T), { key: 0, iconType: Q.value.sufIconType, iconValue: Q.value.sufIconValue, onClick: t2[2] || (t2[2] = (t3) => v(j)(U.value, e3.pageContext, e3.configure, "suffixClick")) }, null, 8, ["iconType", "iconValue"])) : y("", true), d(" " + x(v(M)(Q.value.sufText)), 1)]), key: "2" } : void 0, le.value || "outer" == Q.value.iconPosition && (Q.value.sufIconType && Q.value.sufIconValue || Q.value.sufText) ? { name: "append", fn: f(() => [le.value ? (p(), r(v(T), { key: 0, iconValue: "fa-barcode", onClick: t2[3] || (t2[3] = (e4) => ce()) })) : y("", true), Q.value.sufIconType && Q.value.sufIconValue ? (p(), r(v(T), { key: 1, iconType: Q.value.sufIconType, iconValue: Q.value.sufIconValue, onClick: t2[4] || (t2[4] = (t3) => v(j)(U.value, e3.pageContext, e3.configure, "suffixClick")) }, null, 8, ["iconType", "iconValue"])) : y("", true), d(" " + x(v(M)(Q.value.sufText)), 1)]), key: "3" } : void 0]), 1032, ["disabled", "readonly", "size", "clearable", "placeholder", "maxlength", "show-word-limit", "type", "modelValue"]), pe.value ? (p(), r(o2, { key: 0, onClose: se })) : y("", true)]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
|
|
66
71
|
};
|
|
67
72
|
} });
|
|
68
73
|
export {
|
|
69
|
-
|
|
74
|
+
N as default
|
|
70
75
|
};
|