super-page-runtime 2.2.56 → 2.2.59
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/components/runtime/utils/events/event-util.js +23 -23
- package/dist/es/components/runtime/utils/events/standard-event.d.ts +1 -5
- package/dist/es/components/runtime/utils/events/standard-event.js +132 -156
- package/dist/es/components/runtime/utils/page-helper-util.d.ts +0 -2
- package/dist/es/components/runtime/utils/page-helper-util.js +0 -14
- package/dist/es/components/runtime/utils/page-init-util.js +10 -21
- package/dist/es/components/runtime/utils/tree-utils.js +15 -49
- 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.js +71 -5
- package/dist/es/components/runtime/views/assemblys/container/fixed/YxAffix.vue2.js +2 -72
- package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue.js +1 -4
- 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 +19 -22
- package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue.js +1 -4
- package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +45 -113
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +54 -59
- package/dist/es/components/runtime/views/super-page.vue.js +1 -1
- package/dist/es/components/runtime/views/super-page.vue2.js +130 -144
- package/dist/es/i18n/langs/cn.js +1 -1
- package/dist/es/i18n/langs/en.js +1 -1
- package/dist/es/index.d.ts +1 -2
- package/dist/es/index.js +0 -2
- package/dist/es/style.css +26 -372
- package/package.json +2 -2
- package/dist/es/assets/file.png.js +0 -4
- package/dist/es/assets/folder.png.js +0 -4
- package/dist/es/components/runtime/views/assemblys/common/save-chart-condition-dialog.vue.d.ts +0 -31
- package/dist/es/components/runtime/views/assemblys/common/save-chart-condition-dialog.vue.js +0 -35
- package/dist/es/components/runtime/views/assemblys/common/save-chart-condition-dialog.vue2.js +0 -4
- package/dist/es/components/runtime/views/assemblys/container/fixed/YxAffix.vue.d.ts +0 -94
|
@@ -1,130 +1,62 @@
|
|
|
1
|
-
import { defineComponent as e,
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
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 });
|
|
1
|
+
import { defineComponent as e, computed as a, ref as n, onMounted as l, nextTick as t, watch as o, resolveComponent as u, createElementBlock as i, openBlock as d, normalizeClass as c, unref as r, createBlock as p, createCommentVNode as s, normalizeStyle as v, withCtx as f, createElementVNode as g, createVNode as y, toDisplayString as h } from "vue";
|
|
2
|
+
import { getFormModelFields as x } from "../../../../utils/page-init-util.js";
|
|
3
|
+
import { setVariableValue as m, getVariableValue as C } from "../../../../utils/page-helper-util.js";
|
|
4
|
+
import { getMenuTreeData as k } from "../../../../utils/tree-utils.js";
|
|
5
|
+
import { handleAfterInitEvent as V, handleFormEvent as T } from "../../../../utils/events/event-util.js";
|
|
6
|
+
const b = ["title"], N = e({ __name: "tree-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: N2 }) {
|
|
7
|
+
var _a, _b;
|
|
8
|
+
const I = e2, S = I.pageContext.entity ? I.pageContext.entity : {};
|
|
9
|
+
let _ = x(I.pageContext, I.configure);
|
|
10
|
+
const j = a({ get: () => C(S, _), set(e3) {
|
|
11
|
+
m(S, _, e3);
|
|
12
|
+
} }), w = n(!!((_b = (_a = I.configure.props) == null ? void 0 : _a.base) == null ? void 0 : _b.lazy)), z = I.configure.runtime ? I.configure.runtime : {}, M = z.style, W = z.class;
|
|
13
|
+
z.headerStyle;
|
|
14
|
+
const A = n(null), D = n(z.props ? z.props : {}), E = n({ id: "nodeId", label: "name", children: "children", isLeaf: "leaf", disabled: "disabled", nodeType: "nodeType", iconType: "iconType", iconValue: "iconValue" }), F = n(false), K = n(null), L = n(null), O = n(""), R = n(false);
|
|
15
|
+
l(() => {
|
|
16
|
+
t(() => {
|
|
17
|
+
const e3 = j.value;
|
|
18
|
+
V(e3, I.pageContext, I.configure, { componentRef: A.value, value: e3, entity: I.pageContext.entity.data, pageData: I.pageContext.entity.page });
|
|
28
19
|
});
|
|
29
|
-
}),
|
|
30
|
-
|
|
31
|
-
}), o(
|
|
32
|
-
|
|
20
|
+
}), w.value ? F.value = true : k(I.pageContext, I.configure).then((e3) => {
|
|
21
|
+
K.value = e3, F.value = true;
|
|
22
|
+
}), o(O, (e3) => {
|
|
23
|
+
R.value = true, A.value.filter(e3);
|
|
33
24
|
});
|
|
34
|
-
const
|
|
35
|
-
function
|
|
36
|
-
|
|
25
|
+
const U = (e3, a2) => !e3 || a2.name.includes(e3);
|
|
26
|
+
function q(e3, a2, n2) {
|
|
27
|
+
L.value = a2, T(null, I.pageContext, I.configure, "node-click", { data: e3, node: a2, nodeTree: n2 });
|
|
37
28
|
}
|
|
38
|
-
function
|
|
39
|
-
let
|
|
40
|
-
|
|
41
|
-
const
|
|
42
|
-
|
|
43
|
-
if (
|
|
29
|
+
function B(e3, a2) {
|
|
30
|
+
let n2 = "0";
|
|
31
|
+
n2 = 0 === e3.level ? "0" : e3.data.nodeId, function(e4, a3, n3) {
|
|
32
|
+
const l2 = { parentNodeId: e4, data: a3.data, searchValue: O, isSearch: R.value };
|
|
33
|
+
k(I.pageContext, I.configure, e4, a3, l2).then((l3) => {
|
|
34
|
+
if (R.value = false, n3(l3), "0" === e4) {
|
|
44
35
|
!function(e5, a4) {
|
|
45
|
-
const
|
|
46
|
-
|
|
47
|
-
|
|
36
|
+
const n4 = { parentNodeId: e5, data: a4.data, searchValue: O, isSearch: R.value };
|
|
37
|
+
k(I.pageContext, I.configure, e5, a4, n4).then((a5) => {
|
|
38
|
+
R.value = false, A.value.updateKeyChildren(e5, a5), A.value.store.nodesMap[e5] && (A.value.store.nodesMap[e5].expanded = true);
|
|
48
39
|
});
|
|
49
|
-
}(
|
|
40
|
+
}(l3[0].nodeId, a3);
|
|
50
41
|
}
|
|
51
42
|
});
|
|
52
|
-
}(
|
|
43
|
+
}(n2, e3, a2);
|
|
53
44
|
}
|
|
54
|
-
|
|
55
|
-
|
|
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;
|
|
45
|
+
return N2({ getSelectNode: function() {
|
|
46
|
+
return L.value;
|
|
89
47
|
}, expandNode: function(e3) {
|
|
90
48
|
e3.loaded = false, e3.expand();
|
|
91
49
|
}, loadTreeNodes: function() {
|
|
92
|
-
|
|
93
|
-
|
|
50
|
+
k(I.pageContext, I.configure).then((e3) => {
|
|
51
|
+
R.value = false, K.value = e3;
|
|
94
52
|
});
|
|
95
53
|
}, getNode: function(e3) {
|
|
96
|
-
|
|
97
|
-
}
|
|
98
|
-
|
|
99
|
-
|
|
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);
|
|
54
|
+
A.value.getNode(e3);
|
|
55
|
+
} }), (e3, a2) => {
|
|
56
|
+
const n2 = u("el-input"), l2 = u("SuperIcon"), t2 = u("Folder"), o2 = u("el-icon"), x2 = u("el-tree");
|
|
57
|
+
return d(), i("div", { class: c(r(W)) }, [D.value.filter ? (d(), p(n2, { key: 0, modelValue: O.value, "onUpdate:modelValue": a2[0] || (a2[0] = (e4) => O.value = e4), style: { width: "240px" }, placeholder: "请输入查询条件" }, null, 8, ["modelValue"])) : s("", true), F.value ? (d(), p(x2, { key: 1, ref_key: "menuTree", ref: A, style: v(r(M)), load: B, data: K.value, props: E.value, "default-expand-all": D.value.defaultExpandAll, "expand-on-click-node": D.value.expandOnClickNode, indent: D.value.retractWidth ? D.value.retractWidth : 18, accordion: D.value.accordion, "show-checkbox": !!D.value.showCheckbox, "highlight-current": "", lazy: w.value, "node-key": "nodeId", "filter-node-method": U, onNodeClick: q }, { default: f(({ node: e4, data: a3 }) => [g("span", { title: e4.label, class: "ellipsis" }, [a3.iconValue ? (d(), p(l2, { key: 0, iconType: a3.iconType, iconValue: a3.iconValue }, null, 8, ["iconType", "iconValue"])) : D.value.iconValue ? (d(), p(l2, { key: 1, iconType: D.value.iconType, iconValue: D.value.iconValue }, null, 8, ["iconType", "iconValue"])) : (d(), p(o2, { key: 2 }, { default: f(() => [y(t2)]), _: 1 })), g("span", null, h(e4.label), 1)], 8, b)]), _: 1 }, 8, ["style", "data", "props", "default-expand-all", "expand-on-click-node", "indent", "accordion", "show-checkbox", "lazy"])) : s("", true)], 2);
|
|
126
58
|
};
|
|
127
59
|
} });
|
|
128
60
|
export {
|
|
129
|
-
|
|
61
|
+
N as default
|
|
130
62
|
};
|
package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js
CHANGED
|
@@ -1,75 +1,70 @@
|
|
|
1
|
-
import { defineComponent as e, ref as
|
|
1
|
+
import { defineComponent as e, ref as l, computed as t, onMounted as o, nextTick as n, onUnmounted as a, watch as u, resolveComponent as i, createBlock as r, openBlock as c, normalizeStyle as p, 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 { setVariableValue as V, getVariableValue as h } from "../../../../utils/page-helper-util.js";
|
|
5
|
+
import { handleAfterInitEvent as w, handleFormEvent as b, doSuffixOrPrefixClickEvent as _ } from "../../../../utils/events/event-util.js";
|
|
6
|
+
import { formatScanRuleSets as j, analysisScanValue as S, setScanAnalysisValue as R } from "../../../../utils/form/scan-util.js";
|
|
7
|
+
import P from "../common/title-suffix-element.vue.js";
|
|
8
|
+
import { isMobileBrowser as q } from "agilebuilder-ui/src/utils/common-util";
|
|
9
|
+
import z from "../../../../utils/eventBus.js";
|
|
10
|
+
import { $t as D } from "../../../../utils/i18n-util.js";
|
|
11
|
+
const L = e({ __name: "inputtext-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: L2 }) {
|
|
12
12
|
var _a, _b, _c;
|
|
13
|
-
const
|
|
14
|
-
let
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
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);
|
|
13
|
+
const N = e2, O = N.pageContext.entity ? N.pageContext.entity : {};
|
|
14
|
+
let B = k(N.pageContext, N.configure);
|
|
15
|
+
const J = l(q()), M = N.pageContext.code, $ = l(B && B.length > 0 ? M + "__" + B.join("__") : null), A = t({ get: () => h(O, B), set(e3) {
|
|
16
|
+
e3 = e3.trim(), V(O, B, e3);
|
|
17
|
+
} }), E = l(null), F = l(null), U = l(null);
|
|
22
18
|
o(() => {
|
|
23
|
-
|
|
24
|
-
|
|
19
|
+
z.$on($.value + "-scanDone", (e3) => {
|
|
20
|
+
ae(e3.result);
|
|
25
21
|
}), n(() => {
|
|
26
|
-
const e3 =
|
|
27
|
-
|
|
22
|
+
const e3 = A.value;
|
|
23
|
+
w(e3, N.pageContext, N.configure, { formItemRef: E.value, componentRef: F.value, titleRef: U.value, value: e3, entity: N.pageContext.entity.data, pageData: N.pageContext.entity.page });
|
|
28
24
|
});
|
|
29
25
|
}), a(() => {
|
|
30
|
-
|
|
26
|
+
z.$off($.value + "-scanDone");
|
|
31
27
|
});
|
|
32
|
-
const
|
|
33
|
-
let
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
let
|
|
37
|
-
|
|
38
|
-
const
|
|
39
|
-
let
|
|
40
|
-
((_b =
|
|
41
|
-
|
|
42
|
-
}), u(() =>
|
|
28
|
+
const W = N.configure.runtime ? N.configure.runtime : {}, G = l(W.props ? W.props : {}), H = l(!!((_a = G.value.scan) == null ? void 0 : _a.enable));
|
|
29
|
+
let K = false;
|
|
30
|
+
const Q = window.localStorage.getItem("auth_source");
|
|
31
|
+
Q && "dingtalk" === Q && (K = true);
|
|
32
|
+
let X = "";
|
|
33
|
+
X = navigator.userAgent.indexOf(" uni-app ") > 0 ? "app" : "browser";
|
|
34
|
+
const Y = !(!J.value || !X || "app" !== X), Z = l(!!((Y || K) && H.value || J.value && H.value && "https:" === window.location.protocol));
|
|
35
|
+
let ee = {};
|
|
36
|
+
((_b = G.value.scan) == null ? void 0 : _b.enable) && ((_c = G.value.scan.ruleList) == null ? void 0 : _c.length) > 0 && (j(G.value.scan.ruleList).then((e3) => {
|
|
37
|
+
ee = e3;
|
|
38
|
+
}), u(() => A.value, (e3) => {
|
|
43
39
|
e3 = e3.trim();
|
|
44
|
-
const
|
|
45
|
-
|
|
40
|
+
const l2 = S(e3, ee);
|
|
41
|
+
l2 && R(N.pageContext, l2.scanSet, l2.params);
|
|
46
42
|
}));
|
|
47
|
-
const
|
|
48
|
-
function
|
|
49
|
-
return
|
|
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;
|
|
43
|
+
const le = W.style, te = W.class, oe = W.headerStyle, ne = W.titleExceedStyle;
|
|
44
|
+
function ae(e3) {
|
|
45
|
+
return V(O, B, e3);
|
|
62
46
|
}
|
|
63
|
-
|
|
64
|
-
|
|
47
|
+
const ue = l(false);
|
|
48
|
+
function ie(e3) {
|
|
49
|
+
ue.value = false, ae(e3);
|
|
65
50
|
}
|
|
66
|
-
return
|
|
67
|
-
return
|
|
68
|
-
}, setValue:
|
|
69
|
-
const
|
|
70
|
-
return
|
|
51
|
+
return L2({ getValue: function() {
|
|
52
|
+
return h(O, B);
|
|
53
|
+
}, setValue: ae }), (e3, l2) => {
|
|
54
|
+
const t2 = i("el-input"), o2 = i("scan-code-input-browser"), n2 = i("el-form-item");
|
|
55
|
+
return c(), r(n2, { ref_key: "formItemRef", ref: E, required: !!G.value.required, class: s(v(te)), "label-width": G.value.labelWidth, style: p(v(le)) }, { label: f(() => [G.value.tittleShow ? (c(), C("div", { key: 0, ref_key: "titleRef", ref: U, style: p({ ...v(oe), ...v(ne) }) }, [G.value.prefixType ? (c(), r(P, { key: 0, pageContext: e3.pageContext, property: G.value }, null, 8, ["pageContext", "property"])) : (c(), C(I, { key: 1 }, [d(x(v(D)(G.value.title)), 1)], 64))], 4)) : y("", true)]), default: f(() => [g(t2, { ref_key: "componentRef", ref: F, disabled: "disabled" === G.value.state, readonly: "readonly" === G.value.state, size: G.value.size, clearable: G.value.clearable, placeholder: G.value.placeholder, maxlength: G.value.maxLength, "show-word-limit": G.value.showInputNum, modelValue: A.value, "onUpdate:modelValue": l2[5] || (l2[5] = (e4) => A.value = e4), onInput: l2[6] || (l2[6] = (l3) => v(b)(l3, e3.pageContext, e3.configure, "input")), onChange: l2[7] || (l2[7] = (l3) => v(b)(l3, e3.pageContext, e3.configure, "change")), onBlur: l2[8] || (l2[8] = (l3) => v(b)(l3, e3.pageContext, e3.configure, "blur")), onFocus: l2[9] || (l2[9] = (l3) => v(b)(l3, e3.pageContext, e3.configure, "focus")), onClick: l2[10] || (l2[10] = (l3) => v(b)(l3, e3.pageContext, e3.configure, "click")) }, m({ _: 2 }, ["outer" != G.value.iconPosition && (G.value.preIconType && G.value.preIconValue || G.value.preText) ? { name: "prefix", fn: f(() => [G.value.preIconType && G.value.preIconValue ? (c(), r(v(T), { key: 0, iconType: G.value.preIconType, iconValue: G.value.preIconValue, onClick: l2[0] || (l2[0] = (l3) => v(_)(A.value, e3.pageContext, e3.configure, "prefixClick")) }, null, 8, ["iconType", "iconValue"])) : y("", true), d(" " + x(v(D)(G.value.preText)), 1)]), key: "0" } : void 0, "outer" == G.value.iconPosition && (G.value.preIconType && G.value.preIconValue || G.value.preText) ? { name: "prepend", fn: f(() => [G.value.preIconType && G.value.preIconValue ? (c(), r(v(T), { key: 0, iconType: G.value.preIconType, iconValue: G.value.preIconValue, onClick: l2[1] || (l2[1] = (l3) => v(_)(A.value, e3.pageContext, e3.configure, "prefixClick")) }, null, 8, ["iconType", "iconValue"])) : y("", true), d(" " + x(v(D)(G.value.preText)), 1)]), key: "1" } : void 0, "outer" != G.value.iconPosition && (G.value.sufIconType && G.value.sufIconValue || G.value.sufText) ? { name: "suffix", fn: f(() => [G.value.sufIconType && G.value.sufIconValue ? (c(), r(v(T), { key: 0, iconType: G.value.sufIconType, iconValue: G.value.sufIconValue, onClick: l2[2] || (l2[2] = (l3) => v(_)(A.value, e3.pageContext, e3.configure, "suffixClick")) }, null, 8, ["iconType", "iconValue"])) : y("", true), d(" " + x(v(D)(G.value.sufText)), 1)]), key: "2" } : void 0, Z.value || "outer" == G.value.iconPosition && (G.value.sufIconType && G.value.sufIconValue || G.value.sufText) ? { name: "append", fn: f(() => [Z.value ? (c(), r(v(T), { key: 0, iconValue: "fa-barcode", onClick: l2[3] || (l2[3] = (e4) => function() {
|
|
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"]);
|
|
71
66
|
};
|
|
72
67
|
} });
|
|
73
68
|
export {
|
|
74
|
-
|
|
69
|
+
L as default
|
|
75
70
|
};
|