super-page-runtime 2.3.37-sit4 → 2.3.37
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/barcode-util.js +5 -5
- package/dist/es/components/runtime/utils/charts/chart-pie-util.js +46 -47
- package/dist/es/components/runtime/utils/charts/chart-scatter-util.js +1 -3
- package/dist/es/components/runtime/utils/charts/chart-util.js +44 -46
- package/dist/es/components/runtime/utils/events/event-util.js +9 -9
- package/dist/es/components/runtime/utils/events/print-label.js +0 -1
- package/dist/es/components/runtime/utils/events/standard-event.js +572 -584
- package/dist/es/components/runtime/utils/events/validator-util.js +53 -54
- package/dist/es/components/runtime/utils/form/scan-util.js +3 -4
- package/dist/es/components/runtime/utils/page-helper-util.js +219 -219
- package/dist/es/components/runtime/utils/page-init-util.js +117 -120
- package/dist/es/components/runtime/utils/page-store.js +21 -21
- package/dist/es/components/runtime/utils/table-utils.js +4 -4
- package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +10 -14
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +3 -3
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +6 -6
- package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +12 -13
- package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +15 -16
- package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +14 -15
- package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +15 -16
- package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +69 -68
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +22 -24
- package/dist/es/components/runtime/views/assemblys/common/save-chart-condition-dialog.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/container/fixed/YxAffix.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +63 -63
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +20 -22
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +120 -123
- package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +45 -46
- package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +4 -5
- package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue.js +3 -3
- package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +28 -28
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +36 -36
- package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +43 -43
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +11 -11
- package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +8 -8
- package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +3 -4
- package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +40 -40
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +28 -28
- package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +11 -11
- package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/home-chart-render.vue.js +3 -3
- package/dist/es/components/runtime/views/assemblys/object-render.vue.js +19 -19
- package/dist/es/components/runtime/views/assemblys/page-bottom.vue.js +6 -3
- package/dist/es/components/runtime/views/assemblys/workflow/component/workflow-opinion-box.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/workflow/component/workflow-opinion-box.vue2.js +35 -26
- package/dist/es/components/runtime/views/assemblys/workflow/extract-workflow/extract-workflow-runtime-dialog.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/workflow/extract-workflow/extract-workflow-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/home-chart.vue.js +4 -4
- package/dist/es/components/runtime/views/super-page-dialog.vue.js +4 -4
- package/dist/es/components/runtime/views/super-page.vue2.js +187 -187
- package/dist/es/i18n/langs/cn.js +1 -1
- package/dist/es/i18n/langs/en.js +1 -1
- package/dist/es/style.css +9 -9
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as e, ref as t, computed as
|
|
1
|
+
import { defineComponent as e, ref as t, computed as a, onMounted as n, nextTick as l, watch as o, resolveComponent as d, createElementBlock as u, openBlock as i, normalizeClass as s, unref as r, createBlock as c, 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
2
|
import T from "../../../../../../assets/folder.png.js";
|
|
3
3
|
import I from "../../../../../../assets/file.png.js";
|
|
4
4
|
import { getFormModelFields as V } from "../../../../utils/page-init-util.js";
|
|
@@ -12,16 +12,16 @@ const P = { key: 0, class: "custom-tree-node" }, W = ["title"], R = { key: 0, cl
|
|
|
12
12
|
const $ = t(), A = t(false), X = e2, Y = X.pageContext.entity ? X.pageContext.entity : {}, q = t([]);
|
|
13
13
|
((_a = X.configure.props) == null ? void 0 : _a.contextMenus) && (X.pageContext && X.configure && !X.pageContext.isTest ? X.configure.props.contextMenus.forEach((e3) => {
|
|
14
14
|
if (e3.functionCodes && e3.functionCodes.length > 0) for (let t2 = 0; t2 < e3.functionCodes.length; t2++) {
|
|
15
|
-
const
|
|
16
|
-
if (B(
|
|
15
|
+
const a2 = e3.functionCodes[t2];
|
|
16
|
+
if (B(a2, X.pageContext.systemCode)) return void q.value.push(e3);
|
|
17
17
|
}
|
|
18
18
|
else q.value.push(e3);
|
|
19
19
|
}) : q.value = X.configure.props.contextMenus);
|
|
20
20
|
let F = V(X.pageContext, X.configure);
|
|
21
|
-
const G =
|
|
21
|
+
const G = a({ get: () => L(Y, F), set(e3) {
|
|
22
22
|
b(Y, F, e3);
|
|
23
|
-
} }), J = t(!!((_c = (_b = X.configure.props) == null ? void 0 : _b.base) == null ? void 0 : _c.lazy)), Q = X.configure.runtime ? X.configure.runtime : {}, Z = Q.style, ee = Q.class, te = t(),
|
|
24
|
-
|
|
23
|
+
} }), J = t(!!((_c = (_b = X.configure.props) == null ? void 0 : _b.base) == null ? void 0 : _c.lazy)), Q = X.configure.runtime ? X.configure.runtime : {}, Z = Q.style, ee = Q.class, te = t(), ae = t(Q.props ? Q.props : {}), ne = t({ id: "nodeId", label: "name", children: "children", isLeaf: "leaf", disabled: "disabled", nodeType: "nodeType", iconType: "iconType", iconValue: "iconValue" }), le = t(false), oe = t([]), de = t(null), ue = t(""), ie = t(false), se = t(""), re = t(""), ce = t("");
|
|
24
|
+
n(() => {
|
|
25
25
|
l(() => {
|
|
26
26
|
const e3 = G.value;
|
|
27
27
|
_(e3, X.pageContext, X.configure, { componentRef: te.value, value: e3, entity: X.pageContext.entity.data, pageData: X.pageContext.entity.page });
|
|
@@ -32,31 +32,31 @@ const P = { key: 0, class: "custom-tree-node" }, W = ["title"], R = { key: 0, cl
|
|
|
32
32
|
ie.value = true, te.value.filter(e3);
|
|
33
33
|
});
|
|
34
34
|
const pe = (e3, t2) => !e3 || t2.name.includes(e3);
|
|
35
|
-
function ve(e3, t2,
|
|
36
|
-
de.value = t2, j(null, X.pageContext, X.configure, "node-click", { data: e3, node: t2, nodeTree:
|
|
35
|
+
function ve(e3, t2, a2) {
|
|
36
|
+
de.value = t2, j(null, X.pageContext, X.configure, "node-click", { data: e3, node: t2, nodeTree: a2 });
|
|
37
37
|
}
|
|
38
38
|
function fe(e3, t2) {
|
|
39
|
-
let
|
|
40
|
-
|
|
41
|
-
const
|
|
42
|
-
M(X.pageContext, X.configure, e4, t3,
|
|
43
|
-
if (ie.value = false, n3
|
|
39
|
+
let a2 = "0";
|
|
40
|
+
a2 = 0 === e3.level ? "0" : e3.data.nodeId, function(e4, t3, a3) {
|
|
41
|
+
const n2 = { parentNodeId: e4, data: t3.data, searchValue: ue, isSearch: ie.value };
|
|
42
|
+
M(X.pageContext, X.configure, e4, t3, n2).then((n3) => {
|
|
43
|
+
if (ie.value = false, a3(n3), "0" === e4) {
|
|
44
44
|
!function(e5, t4) {
|
|
45
|
-
const
|
|
46
|
-
M(X.pageContext, X.configure, e5, t4,
|
|
45
|
+
const a4 = { parentNodeId: e5, data: t4.data, searchValue: ue, isSearch: ie.value };
|
|
46
|
+
M(X.pageContext, X.configure, e5, t4, a4).then((t5) => {
|
|
47
47
|
ie.value = false, te.value.updateKeyChildren(e5, t5), te.value.store.nodesMap[e5] && (te.value.store.nodesMap[e5].expanded = true);
|
|
48
48
|
});
|
|
49
|
-
}(
|
|
49
|
+
}(n3[0].nodeId, t3);
|
|
50
50
|
}
|
|
51
51
|
});
|
|
52
|
-
}(
|
|
52
|
+
}(a2, e3, t2);
|
|
53
53
|
}
|
|
54
|
-
const ge = t({}), me = (e3, t2,
|
|
54
|
+
const ge = t({}), me = (e3, t2, a2, n2) => {
|
|
55
55
|
if (se.value) return void z.warning("请先保存当前编辑节点!");
|
|
56
|
-
document.removeEventListener("click", he), ge.value =
|
|
56
|
+
document.removeEventListener("click", he), ge.value = a2, A.value = true;
|
|
57
57
|
const { clientX: l2, clientY: o2 } = e3, d2 = $.value;
|
|
58
58
|
if (d2) {
|
|
59
|
-
const { innerWidth: e4, innerHeight: t3 } = window, { offsetWidth:
|
|
59
|
+
const { innerWidth: e4, innerHeight: t3 } = window, { offsetWidth: a3, offsetHeight: n3 } = d2, u2 = l2 + a3 > e4 ? l2 - a3 : l2, i2 = o2 + n3 > t3 ? o2 - n3 : o2;
|
|
60
60
|
d2.style.left = `${u2}px`, d2.style.top = `${i2}px`, d2.style.display = "block";
|
|
61
61
|
}
|
|
62
62
|
document.addEventListener("click", he);
|
|
@@ -64,14 +64,14 @@ const P = { key: 0, class: "custom-tree-node" }, W = ["title"], R = { key: 0, cl
|
|
|
64
64
|
A.value = false, document.removeEventListener("click", he);
|
|
65
65
|
}, ye = (e3, t2) => {
|
|
66
66
|
if (e3.parent && e3.parent.level > 0) {
|
|
67
|
-
const
|
|
68
|
-
e3.parent.data.children[
|
|
67
|
+
const a2 = e3.parent.data.children.findIndex((t3) => t3.nodeId === e3.data.nodeId);
|
|
68
|
+
e3.parent.data.children[a2] = t2, e3.data = t2;
|
|
69
69
|
} else {
|
|
70
|
-
const
|
|
71
|
-
e3.parent.data[
|
|
70
|
+
const a2 = e3.parent.data.findIndex((t3) => t3.nodeId === e3.data.nodeId);
|
|
71
|
+
e3.parent.data[a2] = t2, e3.data = t2;
|
|
72
72
|
}
|
|
73
73
|
}, Ce = () => {
|
|
74
|
-
se.value = "",
|
|
74
|
+
se.value = "", ce.value = "", re.value = "";
|
|
75
75
|
}, xe = () => ({ nodeId: "primary" + (/* @__PURE__ */ new Date()).getTime(), name: "新增节点", disabled: false, iconType: "custom", isLeaf: true });
|
|
76
76
|
function ke(e3) {
|
|
77
77
|
e3.tipMessage ? S.confirm(e3.tipMessage, { confirmButtonText: "确定", cancelButtonText: "取消", type: "error" }).then(() => {
|
|
@@ -79,7 +79,7 @@ const P = { key: 0, class: "custom-tree-node" }, W = ["title"], R = { key: 0, cl
|
|
|
79
79
|
z.success("删除成功!"), Ne(), ge.value = null;
|
|
80
80
|
});
|
|
81
81
|
}).catch(() => {
|
|
82
|
-
ge.value = null
|
|
82
|
+
ge.value = null;
|
|
83
83
|
}) : K(ge.value, X.configure, X.pageContext).then(() => {
|
|
84
84
|
z.success("删除成功!"), Ne(), ge.value = null;
|
|
85
85
|
});
|
|
@@ -102,32 +102,31 @@ const P = { key: 0, class: "custom-tree-node" }, W = ["title"], R = { key: 0, cl
|
|
|
102
102
|
te.value.setCheckedNodes(e3);
|
|
103
103
|
}, getCheckedKeys: (e3) => te.value.getCheckedKeysleafOnly(), setCheckedKeys: (e3, t2) => {
|
|
104
104
|
te.value.setCheckedKeys(e3, t2);
|
|
105
|
-
}, setChecked: (e3, t2,
|
|
106
|
-
te.value.setChecked(e3, t2,
|
|
107
|
-
}, getCurrentKey: () => te.value.getCurrentKey(), getCurrentNode: () => te.value.getCurrentNode(), setCurrentKey: (e3, t2 = true) => te.value.setCurrentKey(e3, t2), setCurrentNode: (e3, t2 = true) => te.value.setCurrentNode(e3, t2) }), (
|
|
105
|
+
}, setChecked: (e3, t2, a2) => {
|
|
106
|
+
te.value.setChecked(e3, t2, a2);
|
|
107
|
+
}, getCurrentKey: () => te.value.getCurrentKey(), getCurrentNode: () => te.value.getCurrentNode(), setCurrentKey: (e3, t2 = true) => te.value.setCurrentKey(e3, t2), setCurrentNode: (e3, t2 = true) => te.value.setCurrentNode(e3, t2) }), (t2, a2) => {
|
|
108
108
|
var _a2;
|
|
109
|
-
const n2 = d("el-input"),
|
|
110
|
-
return i(), u("div", { class: s(["amb-tree-runtime-main",
|
|
111
|
-
"" !==
|
|
112
|
-
ye(
|
|
113
|
-
}) : E(
|
|
114
|
-
|
|
109
|
+
const n2 = d("el-input"), l2 = d("el-button"), o2 = d("SuperIcon"), V2 = d("el-tree");
|
|
110
|
+
return i(), u("div", { class: s(["amb-tree-runtime-main", r(ee)]) }, [ae.value.filter ? (i(), c(n2, { key: 0, modelValue: ue.value, "onUpdate:modelValue": a2[0] || (a2[0] = (e3) => ue.value = e3), style: { width: "100%" }, placeholder: "请输入查询条件" }, null, 8, ["modelValue"])) : p("", true), le.value ? (i(), c(V2, { key: 1, ref_key: "menuTreeRef", ref: te, style: f(r(Z)), load: fe, data: oe.value, "node-key": "nodeId", props: ne.value, "default-expand-all": ae.value.defaultExpandAll, "expand-on-click-node": ae.value.expandOnClickNode, indent: ae.value.retractWidth ? ae.value.retractWidth : 18, accordion: ae.value.accordion, "show-checkbox": !!ae.value.showCheckbox, "highlight-current": "", lazy: J.value, "filter-node-method": pe, onNodeClick: ve, onNodeContextmenu: me }, { default: g(({ node: t3, data: d2 }) => [d2.nodeId === se.value ? (i(), u("div", P, [m(n2, { modelValue: ce.value, "onUpdate:modelValue": a2[1] || (a2[1] = (e3) => ce.value = e3), size: "small" }, null, 8, ["modelValue"]), h("div", null, [m(l2, { type: "primary", link: "", onClick: (e3) => ((e4) => {
|
|
111
|
+
"" !== ce.value ? (e4.data.name = ce.value, re.value && e4.data.nodeId === re.value ? w(e4, X.configure, X.pageContext).then((t4) => {
|
|
112
|
+
ye(e4, t4.currentNode), Ce(), z.success("保存成功!");
|
|
113
|
+
}) : E(e4, X.configure, X.pageContext).then((t4) => {
|
|
114
|
+
ye(e4, t4.currentNode), Ce(), z.success("保存成功!");
|
|
115
115
|
})) : z.warning("请输入节点名称");
|
|
116
|
-
})(
|
|
117
|
-
|
|
118
|
-
})(
|
|
119
|
-
if (ge.value
|
|
120
|
-
else if ("delete" ===
|
|
121
|
-
ke(
|
|
116
|
+
})(t3) }, { default: g(() => [...a2[2] || (a2[2] = [y(" 保存 ", -1)])]), _: 1 }, 8, ["onClick"]), m(l2, { style: { "margin-left": "4px" }, type: "primary", link: "", onClick: (a3) => ((e3) => {
|
|
117
|
+
re.value && e3.data.nodeId === re.value && te.value.remove(e3), Ce();
|
|
118
|
+
})(t3, e2.configure, e2.pageContext) }, { default: g(() => [...a2[3] || (a2[3] = [y(" 撤销 ", -1)])]), _: 1 }, 8, ["onClick"])])])) : (i(), u("span", { key: 1, title: t3.label, class: "ellipsis" }, [d2.iconValue ? (i(), c(o2, { key: 0, iconType: d2.iconType, iconValue: d2.iconValue }, null, 8, ["iconType", "iconValue"])) : ae.value.iconValue ? (i(), c(o2, { key: 1, iconType: ae.value.iconType, iconValue: ae.value.iconValue }, null, 8, ["iconType", "iconValue"])) : (i(), u(C, { key: 2 }, [d2.isLeaf ? (i(), u("div", H, [a2[5] || (a2[5] = h("img", { src: I, class: "file" }, null, -1)), h("span", null, x(d2.name), 1)])) : (i(), u("div", R, [h("div", D, [a2[4] || (a2[4] = h("img", { src: T, class: "file" }, null, -1)), h("span", null, x(d2.name), 1)])]))], 64))], 8, W))]), _: 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: $, class: "context-menu" }, [(i(true), u(C, null, k(q.value, (e3, t3) => (i(), u("li", { key: t3, tabindex: "-1", class: "menu__item", onClick: (t4) => ((e4) => {
|
|
119
|
+
if (ge.value && "standard" === e4.type && e4.standardEvent) if ("edit" === e4.standardEvent) se.value = ge.value.data.nodeId, ce.value = ge.value.data.name;
|
|
120
|
+
else if ("delete" === e4.standardEvent) ge.value.childNodes && ge.value.childNodes.length > 0 && e4.deleteParentNodeTip ? (e4.deleteParentNodeTipMessage || (e4.deleteParentNodeTipMessage = "当前节点下有子节点,确认删除?"), S.confirm(e4.deleteParentNodeTipMessage, { confirmButtonText: "确定", cancelButtonText: "取消", type: "error" }).then(() => {
|
|
121
|
+
ke(e4);
|
|
122
122
|
}).catch(() => {
|
|
123
|
-
ge.value = null
|
|
124
|
-
})) : ke(
|
|
123
|
+
ge.value = null;
|
|
124
|
+
})) : ke(e4);
|
|
125
125
|
else {
|
|
126
126
|
const t5 = xe();
|
|
127
|
-
se.value = t5.nodeId,
|
|
127
|
+
se.value = t5.nodeId, re.value = t5.nodeId, ce.value = t5.name, "addSiblingNode" === e4.standardEvent ? (t5.isLeaf = ge.value.data.isLeaf, ge.value.parent && ge.value.parent.level > 0 ? te.value.append(t5, ge.value.parent) : oe.value.push(t5)) : "addChildNode" === e4.standardEvent && (t5.isLeaf = true, ge.value.data.isLeaf = false, te.value.append(t5, ge.value), te.value.setCurrentKey(t5.nodeId, true));
|
|
128
128
|
}
|
|
129
|
-
|
|
130
|
-
})(e4) }, [h("span", null, x(e4.name), 1)], 8, O))), 128))], 512)], 512), [[N, A.value && ((_a2 = q.value) == null ? void 0 : _a2.length) > 0]])], 2);
|
|
129
|
+
})(e3) }, [h("span", null, x(e3.name), 1)], 8, O))), 128))], 512)], 512), [[N, A.value && ((_a2 = q.value) == null ? void 0 : _a2.length) > 0]])], 2);
|
|
131
130
|
};
|
|
132
131
|
} });
|
|
133
132
|
export {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as e, ref as t, computed as l, onMounted as o, nextTick as n, resolveComponent as a, createBlock as u, openBlock as i, normalizeStyle as r, normalizeClass as s, unref as
|
|
1
|
+
import { defineComponent as e, ref as t, computed as l, onMounted as o, nextTick as n, resolveComponent as a, createBlock as u, openBlock as i, normalizeStyle as r, normalizeClass as s, unref as p, createSlots as c, withCtx as f, createVNode as g, createElementBlock as v, Fragment as d, renderList as m, createElementVNode as h, toDisplayString as y } from "vue";
|
|
2
2
|
import { setVariableValue as b, getVariableValue as x, getOptionDatasFromPage as C, monitorFieldChange as k, autoSetAfterSelect as S, queryOptionDatasources as j } from "../../../../utils/page-helper-util.js";
|
|
3
3
|
import { getFormModelFields as R } from "../../../../utils/page-init-util.js";
|
|
4
4
|
import { handleFormEvent as _, handleAfterInitEvent as I } from "../../../../utils/events/event-util.js";
|
|
@@ -28,7 +28,6 @@ const w = e({ __name: "checkbox-runtime", props: { pageContext: {}, configure: {
|
|
|
28
28
|
const N = W.value.monitorFields;
|
|
29
29
|
k(z.pageContext, N, function() {
|
|
30
30
|
j(z.pageContext, L, void 0).then((e3) => {
|
|
31
|
-
console.log("动态查询结果", e3);
|
|
32
31
|
});
|
|
33
32
|
});
|
|
34
33
|
const Q = t(null), X = t(null), Y = t(null);
|
|
@@ -55,9 +54,9 @@ const w = e({ __name: "checkbox-runtime", props: { pageContext: {}, configure: {
|
|
|
55
54
|
});
|
|
56
55
|
}), t2 = t2.slice(0, t2.length - 1)) : t2 = e3.join(","), t2;
|
|
57
56
|
}
|
|
58
|
-
} }), (
|
|
59
|
-
const
|
|
60
|
-
return i(), u(
|
|
57
|
+
} }), (t2, l2) => {
|
|
58
|
+
const o2 = a("el-checkbox"), n2 = a("el-checkbox-group"), b2 = a("el-form-item");
|
|
59
|
+
return i(), u(b2, { ref_key: "formItemRef", ref: Q, class: s(p(T) + (D.value ? " " + D.value : "")), required: !!W.value.required, "label-width": W.value.labelWidth, style: r(p(P)) }, c({ default: f(() => [g(n2, { ref_key: "componentRef", ref: X, disabled: "disabled" === W.value.state, size: W.value.size, onChange: W.value.changeMethod, modelValue: A.value, "onUpdate:modelValue": l2[0] || (l2[0] = (e3) => A.value = e3) }, { default: f(() => [(i(true), v(d, null, m(B.value, (t3) => (i(), u(o2, { key: t3.value, value: t3.value, label: t3.label, onClick: (l3) => p(_)(t3.value, e2.pageContext, e2.configure, "click", { values: A.value }) }, null, 8, ["value", "label", "onClick"]))), 128))]), _: 1 }, 8, ["disabled", "size", "onChange", "modelValue"])]), _: 2 }, [W.value.tittleShow ? { name: "label", fn: f(() => [h("div", { ref_key: "titleRef", ref: Y, style: r({ ...p(F), ...p(U) }), class: "amb-form-item-label" }, y(p(q)(W.value.title)), 5)]), key: "0" } : void 0]), 1032, ["class", "required", "label-width", "style"]);
|
|
61
60
|
};
|
|
62
61
|
} });
|
|
63
62
|
export {
|
|
@@ -28,9 +28,9 @@ const x = e({ __name: "title-suffix-element", props: { pageContext: {}, property
|
|
|
28
28
|
const r2 = l2.indexOf(h);
|
|
29
29
|
e3 ? -1 == r2 && l2.push(h) : r2 > -1 && l2.splice(r2, 1), y(c, d, l2);
|
|
30
30
|
} else y(c, d, e3);
|
|
31
|
-
} })), (
|
|
32
|
-
const
|
|
33
|
-
return p(), t(o, null, ["radio" ===
|
|
31
|
+
} })), (l2, s2) => {
|
|
32
|
+
const y2 = r("el-radio"), f2 = r("el-checkbox");
|
|
33
|
+
return p(), t(o, null, ["radio" === e2.property.prefixType ? (p(), u(y2, { key: 0, value: e2.property.prefixValue, label: e2.property.title, modelValue: i(b), "onUpdate:modelValue": s2[0] || (s2[0] = (e3) => n(b) ? b.value = e3 : b = e3) }, null, 8, ["value", "label", "modelValue"])) : a("", true), "checkbox" === e2.property.prefixType ? (p(), u(f2, { key: 1, label: e2.property.title, value: e2.property.prefixValue, modelValue: i(b), "onUpdate:modelValue": s2[1] || (s2[1] = (e3) => n(b) ? b.value = e3 : b = e3) }, null, 8, ["label", "value", "modelValue"])) : a("", true)], 64);
|
|
34
34
|
};
|
|
35
35
|
} });
|
|
36
36
|
export {
|
|
@@ -1,56 +1,56 @@
|
|
|
1
|
-
import { defineComponent as e, computed as t, ref as o, onMounted as
|
|
1
|
+
import { defineComponent as e, computed as t, ref as o, onMounted as a, nextTick as n, onUnmounted as i, resolveComponent as u, createBlock as l, createElementBlock as r, createCommentVNode as s, openBlock as p, normalizeStyle as c, normalizeClass as m, unref as f, createSlots as d, withCtx as g, resolveDynamicComponent as v, createElementVNode as C, toDisplayString as x } from "vue";
|
|
2
2
|
import { getFormModelFields as y } from "../../../../utils/page-init-util.js";
|
|
3
3
|
import { setVariableValue as b, getVariableValue as h, formatVariableValue as j, getFormPropName as R, setVariableValueWithProp as k } from "../../../../utils/page-helper-util.js";
|
|
4
|
-
import { handleAfterInitEvent as
|
|
5
|
-
import { updateFormItemEditState as
|
|
4
|
+
import { handleAfterInitEvent as V, handleEvent as _ } from "../../../../utils/events/event-util.js";
|
|
5
|
+
import { updateFormItemEditState as D } from "../../../../utils/events/validator-util.js";
|
|
6
6
|
import { getListCode as w } from "../../../../utils/common-util.js";
|
|
7
7
|
import { getComponentRef as E } from "../../../../utils/global-refs.js";
|
|
8
8
|
import { getAdditionalParamMap as F } from "../../../../utils/events/standard-event.js";
|
|
9
9
|
import { $t as S } from "../../../../utils/i18n-util.js";
|
|
10
10
|
import U from "../../../../utils/eventBus.js";
|
|
11
11
|
import { functions as q } from "../../../../utils/api/page-expose-util.js";
|
|
12
|
-
const
|
|
13
|
-
const
|
|
14
|
-
b(
|
|
15
|
-
} }), A =
|
|
12
|
+
const $ = { key: 0, style: { width: "100%", height: "100%" } }, O = { key: 1, style: { width: "100%", height: "100%" }, class: "amb-widget-richtext-single" }, z = e({ __name: "custom-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: z2 }) {
|
|
13
|
+
const G = e2, H = G.pageContext.entity ? G.pageContext.entity : {}, P = y(G.pageContext, G.configure), I = t({ get: () => h(H, P), set(e3) {
|
|
14
|
+
b(H, P, e3);
|
|
15
|
+
} }), A = G.configure.runtime ? G.configure.runtime : {}, B = A.style, W = A.class, J = A.headerStyle, K = o(A.props ? A.props : {}), L = function(e3) {
|
|
16
16
|
let t2 = {};
|
|
17
17
|
if (e3) for (let o2 in e3) {
|
|
18
|
-
const
|
|
19
|
-
t2[o2] = j(
|
|
18
|
+
const a2 = e3[o2];
|
|
19
|
+
t2[o2] = j(G.pageContext, a2);
|
|
20
20
|
}
|
|
21
21
|
return t2;
|
|
22
|
-
}(A.customParams ? A.customParams : {}),
|
|
22
|
+
}(A.customParams ? A.customParams : {}), M = F(G.pageContext), N = o(G.configure.props && G.configure.props.base ? G.configure.props.base.name : null);
|
|
23
23
|
function Q(e3, t2) {
|
|
24
|
-
k(
|
|
24
|
+
k(H, e3, t2);
|
|
25
25
|
}
|
|
26
26
|
function T(e3) {
|
|
27
|
-
q.isHasFieldAuthPermission(
|
|
27
|
+
q.isHasFieldAuthPermission(G.configure) ? D(G.pageContext, e3) : console.error("没有该字段的权限,dynamicFields=", P ? P.join(".") : "");
|
|
28
28
|
}
|
|
29
29
|
function X() {
|
|
30
|
-
const e3 =
|
|
30
|
+
const e3 = G.pageContext.tableUuids;
|
|
31
31
|
e3 && e3.forEach((e4) => {
|
|
32
|
-
const t2 = w(
|
|
32
|
+
const t2 = w(G.pageContext.code, G.pageContext.version, G.configure.uuid), o2 = E(G.pageContext, e4);
|
|
33
33
|
o2 && o2.restoreGridEdit(t2);
|
|
34
34
|
});
|
|
35
35
|
}
|
|
36
|
-
|
|
37
|
-
const Y =
|
|
38
|
-
function
|
|
39
|
-
|
|
36
|
+
G.configure.props.verification.custom && G.configure.props.verification.custom.enabled && (G.pageContext.customValidatorUuids || (G.pageContext.customValidatorUuids = []), G.pageContext.customValidatorUuids.push(G.configure.uuid));
|
|
37
|
+
const Y = G.pageContext.code, Z = o(P && P.length > 0 ? Y + "__" + P.join("__") : null), ee = o(null), te = o(null), oe = o(null);
|
|
38
|
+
function ae(e3) {
|
|
39
|
+
_(I.value, G.pageContext, G.configure, e3);
|
|
40
40
|
}
|
|
41
|
-
return
|
|
41
|
+
return a(() => {
|
|
42
42
|
U.$on(Z.value + "-scanDone", (e3) => {
|
|
43
43
|
const t2 = e3.result;
|
|
44
|
-
b(
|
|
44
|
+
b(H, P, t2);
|
|
45
45
|
}), U.$on(Z.value + "-pickFileDone", (e3) => {
|
|
46
|
-
|
|
47
|
-
}),
|
|
46
|
+
Z.value, ee.value.pickFileDone(e3);
|
|
47
|
+
}), n(() => {
|
|
48
48
|
const e3 = I.value;
|
|
49
|
-
|
|
49
|
+
V(e3, G.pageContext, G.configure, { formItemRef: te.value, componentRef: ee.value, titleRef: oe.value, value: e3, entity: G.pageContext.entity.data, pageData: G.pageContext.entity.page });
|
|
50
50
|
});
|
|
51
51
|
}), i(() => {
|
|
52
52
|
U.$off(Z.value + "-scanDone"), U.$off(Z.value + "-pickFileDone");
|
|
53
|
-
}),
|
|
53
|
+
}), z2({ getCustomRef: function() {
|
|
54
54
|
return ee.value;
|
|
55
55
|
}, invokeCustomFunction: function(e3, ...t2) {
|
|
56
56
|
if (ee.value && "function" == typeof ee.value[e3]) return ee.value[e3](...t2);
|
|
@@ -59,11 +59,11 @@ const P = { key: 0, style: { width: "100%", height: "100%" } }, $ = { key: 1, st
|
|
|
59
59
|
return ee.value && "function" == typeof ee.value[e3];
|
|
60
60
|
}, addRequiredClass: function() {
|
|
61
61
|
requiredClass.value = addRequiredClassUtil();
|
|
62
|
-
} }), (
|
|
63
|
-
const
|
|
64
|
-
return
|
|
62
|
+
} }), (t2, o2) => {
|
|
63
|
+
const a2 = u("el-form-item");
|
|
64
|
+
return K.value.tittleShow ? (p(), l(a2, { key: 0, ref_key: "formItemRef", ref: te, required: K.value.required, class: m(f(W)), "label-width": K.value.labelWidth, style: c(f(B)) }, d({ default: g(() => [N.value ? (p(), r("div", $, [(p(), l(v(N.value), { ref_key: "customRef", ref: ee, size: K.value.size, entity: e2.pageContext.entity.data, pageData: e2.pageContext.entity.page, pageContext: e2.pageContext, configureObj: e2.configure, prop: f(R)(e2.configure.props && e2.configure.props.base ? e2.configure.props.base.prop : null), "custom-params": f(L), modelValue: I.value, "onUpdate:modelValue": o2[0] || (o2[0] = (e3) => I.value = e3), disabled: "disabled" === K.value.state, "additional-param-map": f(M), "component-id": Z.value, onSetEntityValue: Q, onSetCustomRules: T, onRestoreGridEdit: X, onHandleEvent: ae, onChange: o2[1] || (o2[1] = (t3) => f(_)(I.value, e2.pageContext, e2.configure, "change")) }, null, 40, ["size", "entity", "pageData", "pageContext", "configureObj", "prop", "custom-params", "modelValue", "disabled", "additional-param-map", "component-id"]))])) : s("", true)]), _: 2 }, [K.value.tittleShow ? { name: "label", fn: g(() => [C("div", { ref_key: "titleRef", ref: oe, style: c({ ...f(J) }), class: "amb-form-item-label" }, x(f(S)(K.value.title)), 5)]), key: "0" } : void 0]), 1032, ["required", "class", "label-width", "style"])) : N.value ? (p(), r("div", O, [(p(), l(v(N.value), { ref_key: "customRef", ref: ee, entity: e2.pageContext.entity.data, pageData: e2.pageContext.entity.page, pageContext: e2.pageContext, configureObj: e2.configure, prop: f(R)(e2.configure.props && e2.configure.props.base ? e2.configure.props.base.prop : null), "custom-params": f(L), modelValue: I.value, "onUpdate:modelValue": o2[2] || (o2[2] = (e3) => I.value = e3), disabled: "disabled" === K.value.state, "additional-param-map": f(M), "component-id": Z.value, onSetEntityValue: Q, onSetCustomRules: T, onRestoreGridEdit: X, onHandleEvent: ae, onChange: o2[3] || (o2[3] = (t3) => f(_)(I.value, e2.pageContext, e2.configure, "change")) }, null, 40, ["entity", "pageData", "pageContext", "configureObj", "prop", "custom-params", "modelValue", "disabled", "additional-param-map", "component-id"]))])) : s("", true);
|
|
65
65
|
};
|
|
66
66
|
} });
|
|
67
67
|
export {
|
|
68
|
-
|
|
68
|
+
z as default
|
|
69
69
|
};
|
package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js
CHANGED
|
@@ -92,9 +92,9 @@ const S = e({ __name: "datepicker-runtime", props: { pageContext: {}, configure:
|
|
|
92
92
|
}
|
|
93
93
|
return S2({ addRequiredClass: function() {
|
|
94
94
|
q.value = _();
|
|
95
|
-
} }), (
|
|
96
|
-
const
|
|
97
|
-
return n(), u(
|
|
95
|
+
} }), (a2, l2) => {
|
|
96
|
+
const t2 = r("el-time-picker"), o2 = r("el-date-picker"), y2 = r("el-form-item");
|
|
97
|
+
return n(), u(y2, { ref_key: "formItemRef", ref: G, required: N.value.required, class: c(p(B) + (q.value ? " " + q.value : "")), "label-width": N.value.labelWidth, style: i(p($)) }, d({ default: s(() => ["time" == N.value.dateType || "timerange" == N.value.dateType ? (n(), u(t2, { key: 0, ref_key: "componentRef", ref: H, "is-range": "timerange" == N.value.dateType, style: { width: "100%" }, "range-separator": "-", clearable: N.value.clearable, disabled: "disabled" === N.value.state, readonly: "readonly" === N.value.state, size: N.value.size, placeholder: N.value.placeholder, "start-placeholder": N.value.placeholder, "end-placeholder": N.value.endPlaceholder ? N.value.endPlaceholder : N.value.placeholder, "unlink-panels": true, format: N.value.format, "value-format": N.value.valueFormat, modelValue: L.value, "onUpdate:modelValue": l2[0] || (l2[0] = (e3) => L.value = e3), shortcuts: Q.value, type: N.value.dateType, onChange: l2[1] || (l2[1] = (a3) => p(j)(a3, e2.pageContext, e2.configure, "change")), onBlur: l2[2] || (l2[2] = (a3) => p(j)(a3, e2.pageContext, e2.configure, "blur")), onFocus: l2[3] || (l2[3] = (a3) => p(j)(a3, e2.pageContext, e2.configure, "focus")), onVisibleChange: l2[4] || (l2[4] = (a3) => p(j)(a3, e2.pageContext, e2.configure, "visible-change")), onPanelChange: l2[5] || (l2[5] = (a3) => p(j)(a3, e2.pageContext, e2.configure, "panel-change")), onClear: l2[6] || (l2[6] = (a3) => p(j)(a3, e2.pageContext, e2.configure, "clear")) }, null, 8, ["is-range", "clearable", "disabled", "readonly", "size", "placeholder", "start-placeholder", "end-placeholder", "format", "value-format", "modelValue", "shortcuts", "type"])) : "combined" !== N.value.dateRangePickerMode && ["daterange", "datetimerange", "monthrange", "yearrange"].includes(N.value.dateType) ? (n(), u(p(D), { key: 1, modelValue: L.value, "onUpdate:modelValue": l2[7] || (l2[7] = (e3) => L.value = e3), type: N.value.dateType, disabled: "disabled" === N.value.state, readonly: "readonly" === N.value.state, clearable: N.value.clearable, format: N.value.format, "value-format": N.value.valueFormat, placeholder: N.value.placeholder, "start-placeholder": N.value.placeholder, "end-placeholder": N.value.endPlaceholder ? N.value.endPlaceholder : N.value.placeholder, size: N.value.size, shortcuts: Q.value, onChange: l2[8] || (l2[8] = (a3) => p(j)(a3, e2.pageContext, e2.configure, "change")), onBlur: l2[9] || (l2[9] = (a3) => p(j)(a3, e2.pageContext, e2.configure, "blur")), onFocus: l2[10] || (l2[10] = (a3) => p(j)(a3, e2.pageContext, e2.configure, "focus")), onVisibleChange: l2[11] || (l2[11] = (a3) => p(j)(a3, e2.pageContext, e2.configure, "visible-change")), onPanelChange: l2[12] || (l2[12] = (a3) => p(j)(a3, e2.pageContext, e2.configure, "panel-change")), onClear: l2[13] || (l2[13] = (a3) => p(j)(a3, e2.pageContext, e2.configure, "clear")) }, null, 8, ["modelValue", "type", "disabled", "readonly", "clearable", "format", "value-format", "placeholder", "start-placeholder", "end-placeholder", "size", "shortcuts"])) : (n(), u(o2, { key: 2, ref_key: "componentRef", ref: H, clearable: N.value.clearable, style: { width: "100%" }, "unlink-panels": true, disabled: "disabled" === N.value.state, readonly: "readonly" === N.value.state, size: N.value.size, placeholder: N.value.placeholder, "start-placeholder": N.value.placeholder, "end-placeholder": N.value.endPlaceholder ? N.value.endPlaceholder : N.value.placeholder, format: N.value.format, "value-format": N.value.valueFormat, modelValue: L.value, "onUpdate:modelValue": l2[14] || (l2[14] = (e3) => L.value = e3), shortcuts: Q.value, type: N.value.dateType, onChange: l2[15] || (l2[15] = (a3) => p(j)(a3, e2.pageContext, e2.configure, "change")), onBlur: l2[16] || (l2[16] = (a3) => p(j)(a3, e2.pageContext, e2.configure, "blur")), onFocus: l2[17] || (l2[17] = (a3) => p(j)(a3, e2.pageContext, e2.configure, "focus")), onVisibleChange: l2[18] || (l2[18] = (a3) => p(j)(a3, e2.pageContext, e2.configure, "visible-change")), onPanelChange: l2[19] || (l2[19] = (a3) => p(j)(a3, e2.pageContext, e2.configure, "panel-change")), onClear: l2[20] || (l2[20] = (a3) => p(j)(a3, e2.pageContext, e2.configure, "clear")) }, null, 8, ["clearable", "disabled", "readonly", "size", "placeholder", "start-placeholder", "end-placeholder", "format", "value-format", "modelValue", "shortcuts", "type"]))]), _: 2 }, [N.value.tittleShow ? { name: "label", fn: s(() => [v("div", { ref_key: "titleRef", ref: J, style: i({ ...p(I), ...p(U) }) }, [N.value.prefixType ? (n(), u(z, { key: 0, pageContext: e2.pageContext, property: N.value }, null, 8, ["pageContext", "property"])) : (n(), f(g, { key: 1 }, [m(h(p(Y)(N.value.title)), 1)], 64))], 4)]), key: "0" } : void 0]), 1032, ["required", "class", "label-width", "style"]);
|
|
98
98
|
};
|
|
99
99
|
} });
|
|
100
100
|
export {
|
|
@@ -45,9 +45,9 @@ const _ = e({ __name: "depttree-runtime", props: { pageContext: {}, configure: {
|
|
|
45
45
|
}
|
|
46
46
|
return Q.length - 1 > 0 && Q[Q.length - 1] && Q[Q.length - 1].model && (U = z(Q[Q.length - 1].model)), _2({ addRequiredClass: function() {
|
|
47
47
|
q.value = j();
|
|
48
|
-
} }), (
|
|
49
|
-
const
|
|
50
|
-
return u(), p(
|
|
48
|
+
} }), (t2, l2) => {
|
|
49
|
+
const o2 = i("OrganizationInput"), a2 = i("el-form-item");
|
|
50
|
+
return u(), p(a2, { ref_key: "formItemRef", ref: K, required: A.value.required, class: s(d(G) + (q.value ? " " + q.value : "")), "label-width": A.value.labelWidth, style: r(d(B)) }, m({ default: f(() => [c(o2, { ref_key: "componentRef", ref: L, disabled: "disabled" == A.value.state, multiple: A.value.multiple, treeType: A.value.treeType, value: P.value, models: d(O), departmentInfo: W.value, limitFilterColumn: A.value.limitFilterColumn, pageModels: d($), fields: d(Q), inputShowWay: A.value.inputShowWay, autosize: A.value.autosize, size: A.value.size, displayItem: A.value.displayItem, separator: A.value.separator, onSetValue: X, onShowTree: Y }, null, 8, ["disabled", "multiple", "treeType", "value", "models", "departmentInfo", "limitFilterColumn", "pageModels", "fields", "inputShowWay", "autosize", "size", "displayItem", "separator"])]), _: 2 }, [A.value.tittleShow ? { name: "label", fn: f(() => [g("div", { ref_key: "titleRef", ref: N, style: r({ ...d(H), ...d(J) }), class: "amb-form-item-label" }, [A.value.prefixType ? (u(), p(F, { key: 0, pageContext: e2.pageContext, property: A.value }, null, 8, ["pageContext", "property"])) : (u(), v(y, { key: 1 }, [x(h(d(I)(A.value.title)), 1)], 64))], 4)]), key: "0" } : void 0]), 1032, ["required", "class", "label-width", "style"]);
|
|
51
51
|
};
|
|
52
52
|
} });
|
|
53
53
|
export {
|
|
@@ -14,9 +14,9 @@ const m = e({ __name: "divider-runtime", props: { pageContext: {}, configure: {}
|
|
|
14
14
|
const e3 = b.value;
|
|
15
15
|
v(e3, m2.pageContext, m2.configure, { componentRef: k.value, value: e3, entity: m2.pageContext.entity.data, pageData: m2.pageContext.entity.page });
|
|
16
16
|
});
|
|
17
|
-
}), (
|
|
18
|
-
const
|
|
19
|
-
return l(), u(
|
|
17
|
+
}), (t2, n2) => {
|
|
18
|
+
const o2 = i("el-divider");
|
|
19
|
+
return l(), u(o2, { ref_key: "componentRef", ref: k, direction: C.value.direction, "border-style": C.value.borderType, "content-position": C.value.titlePosition, onClick: n2[0] || (n2[0] = (t3) => a(g)(t3, e2.pageContext, e2.configure, "click")) }, { default: p(() => [s("div", { style: c(a(x)) }, d(b.value), 5)]), _: 1 }, 8, ["direction", "border-style", "content-position"]);
|
|
20
20
|
};
|
|
21
21
|
} });
|
|
22
22
|
export {
|
package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { defineComponent as e, ref as l, watch as
|
|
1
|
+
import { defineComponent as e, ref as l, watch as t, onMounted as o, nextTick as i, onUnmounted as a, resolveComponent as n, createBlock as u, createCommentVNode as r, openBlock as p, normalizeStyle as s, normalizeClass as d, unref as f, createSlots as m, withCtx as v, createElementVNode as c, toDisplayString as g } from "vue";
|
|
2
2
|
import { getVariableValue as h, setVariableValue as y } from "../../../../utils/page-helper-util.js";
|
|
3
|
-
import { handleAfterInitEvent as C, fileUploadBeforeUpload as w, fileUploadUploaded as x, fileUploadBeforeDelete as b, fileUploadDeleted as
|
|
4
|
-
import
|
|
3
|
+
import { handleAfterInitEvent as C, fileUploadBeforeUpload as w, fileUploadUploaded as x, fileUploadBeforeDelete as b, fileUploadDeleted as k } from "../../../../utils/events/event-util.js";
|
|
4
|
+
import I from "agilebuilder-ui/src/utils/request";
|
|
5
5
|
import { FsUploadNew as P } from "agilebuilder-ui";
|
|
6
6
|
import S from "../../../../utils/eventBus.js";
|
|
7
7
|
import { $t as N } from "../../../../utils/i18n-util.js";
|
|
@@ -9,28 +9,28 @@ import { addRequiredClassUtil as T } from "../../../../utils/common-util.js";
|
|
|
9
9
|
import { getRelativeBaseUrl as _ } from "agilebuilder-ui/src/utils/common-util";
|
|
10
10
|
const j = e({ __name: "fileupload-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: j2 }) {
|
|
11
11
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
12
|
-
const z = e2,
|
|
12
|
+
const z = e2, R = l(null), F = z.configure.runtime ? z.configure.runtime : {}, D = l(F.props ? F.props : {}), O = F.style, q = F.class, W = F.headerStyle, $ = F.titleExceedStyle, A = z.pageContext.entity ? z.pageContext.entity : {}, E = z.configure.props.base ? z.configure.props.base : {}, U = Y(E.prop), B = Y(E.propName);
|
|
13
13
|
let G = l({});
|
|
14
|
-
G.value.isShowWatermark = void 0 === ((_b = (_a = z.configure.props) == null ? void 0 : _a.watermark) == null ? void 0 : _b.isShowWatermark) ? "true" : ((_c = z.configure.props) == null ? void 0 : _c.watermark.isShowWatermark) + "", G.value.content = ((_e = (_d = z.configure.props) == null ? void 0 : _d.watermark) == null ? void 0 : _e.content) ? (_g = (_f = z.configure.props) == null ? void 0 : _f.watermark) == null ? void 0 : _g.content : "",
|
|
15
|
-
X(h(
|
|
14
|
+
G.value.isShowWatermark = void 0 === ((_b = (_a = z.configure.props) == null ? void 0 : _a.watermark) == null ? void 0 : _b.isShowWatermark) ? "true" : ((_c = z.configure.props) == null ? void 0 : _c.watermark.isShowWatermark) + "", G.value.content = ((_e = (_d = z.configure.props) == null ? void 0 : _d.watermark) == null ? void 0 : _e.content) ? (_g = (_f = z.configure.props) == null ? void 0 : _f.watermark) == null ? void 0 : _g.content : "", U && U.length > 1 && t(() => z.pageContext.entity[U[0]][U[1]], (e3) => {
|
|
15
|
+
X(h(A, U));
|
|
16
16
|
});
|
|
17
|
-
const H = z.pageContext.code, J = l(
|
|
17
|
+
const H = z.pageContext.code, J = l(U ? H + "__" + U.join("__") : null), K = h(A, U), L = l(null), M = l(false), Q = l([]), V = l({});
|
|
18
18
|
function X(e3) {
|
|
19
19
|
if (e3) {
|
|
20
20
|
const l2 = e3.split(",");
|
|
21
21
|
if (l2.length > 0) {
|
|
22
22
|
const e4 = _(window.$vueApp.config.globalProperties.baseAPI) + "/component/fs-upload/search-file-metadata";
|
|
23
|
-
|
|
23
|
+
I.post(e4, l2).then((e5) => {
|
|
24
24
|
Q.value = [];
|
|
25
|
-
const
|
|
25
|
+
const t2 = [], o2 = {};
|
|
26
26
|
e5.forEach((e6) => {
|
|
27
|
-
|
|
27
|
+
o2[e6.uuid] = e6;
|
|
28
28
|
});
|
|
29
29
|
for (let e6 = 0; e6 < l2.length; e6++) {
|
|
30
|
-
const
|
|
31
|
-
|
|
30
|
+
const i2 = l2[e6];
|
|
31
|
+
t2.push(o2[i2].fileName), Q.value.push({ showName: o2[i2].fileName, serverPath: i2, fileSize: o2[i2].fileSize });
|
|
32
32
|
}
|
|
33
|
-
"input" === D.value.displayType && (V.value.showName =
|
|
33
|
+
"input" === D.value.displayType && (V.value.showName = t2.join(","), V.value.serverPath = l2.join(","));
|
|
34
34
|
}).finally(() => {
|
|
35
35
|
M.value = true;
|
|
36
36
|
});
|
|
@@ -42,51 +42,51 @@ const j = e({ __name: "fileupload-runtime", props: { pageContext: {}, configure:
|
|
|
42
42
|
}
|
|
43
43
|
function Z(e3) {
|
|
44
44
|
z.pageContext.fileuploadInfo || (z.pageContext.fileuploadInfo = []);
|
|
45
|
-
return -1 === z.pageContext.fileuploadInfo.findIndex((e4) => e4.uuid === z.configure.uuid) && z.pageContext.fileuploadInfo.push({ uuid: z.configure.uuid, label: N(D.value.title) }),
|
|
45
|
+
return -1 === z.pageContext.fileuploadInfo.findIndex((e4) => e4.uuid === z.configure.uuid) && z.pageContext.fileuploadInfo.push({ uuid: z.configure.uuid, label: N(D.value.title) }), z.pageContext.fileuploadInfo, w(e3);
|
|
46
46
|
}
|
|
47
47
|
function ee() {
|
|
48
|
-
if (
|
|
48
|
+
if (z.pageContext.fileuploadInfo, z.configure.uuid, z.pageContext.fileuploadInfo && z.configure.uuid) {
|
|
49
49
|
const e3 = z.pageContext.fileuploadInfo.findIndex((e4) => e4.uuid === z.configure.uuid);
|
|
50
50
|
-1 !== e3 && z.pageContext.fileuploadInfo.splice(e3, 1);
|
|
51
51
|
}
|
|
52
|
-
|
|
52
|
+
z.pageContext.fileuploadInfo;
|
|
53
53
|
}
|
|
54
54
|
function le(e3) {
|
|
55
55
|
ee();
|
|
56
56
|
}
|
|
57
57
|
X(K);
|
|
58
|
-
const
|
|
59
|
-
var t2;
|
|
60
|
-
ee(), ae(), t2 = { response: e3, uploadFile: l2, uploadFiles: o2 }, x(z.pageContext, z.configure, t2);
|
|
61
|
-
}, te = (e3) => {
|
|
62
|
-
const l2 = (o2 = { file: e3 }, b(z.pageContext, z.configure, o2));
|
|
58
|
+
const te = (e3, l2, t2) => {
|
|
63
59
|
var o2;
|
|
64
|
-
(
|
|
65
|
-
|
|
60
|
+
ee(), ie(), o2 = { response: e3, uploadFile: l2, uploadFiles: t2 }, x(z.pageContext, z.configure, o2);
|
|
61
|
+
}, oe = (e3) => {
|
|
62
|
+
const l2 = (t2 = { file: e3 }, b(z.pageContext, z.configure, t2));
|
|
63
|
+
var t2;
|
|
64
|
+
(l2 || void 0 === l2) && (ie(), function(e4) {
|
|
65
|
+
k(z.pageContext, z.configure, e4);
|
|
66
66
|
}({ file: e3 }));
|
|
67
|
-
},
|
|
67
|
+
}, ie = () => {
|
|
68
68
|
const e3 = [], l2 = [];
|
|
69
69
|
if (D.value.limit && Q.value.length > D.value.limit) {
|
|
70
70
|
const e4 = Q.value.length - D.value.limit;
|
|
71
71
|
for (let l3 = 0; l3 < e4; l3++) Q.value.shift();
|
|
72
72
|
}
|
|
73
|
-
for (let
|
|
74
|
-
y(z.pageContext.entity,
|
|
75
|
-
},
|
|
76
|
-
return
|
|
73
|
+
for (let t2 = 0; t2 < Q.value.length; t2++) e3.push(Q.value[t2].showName), l2.push(Q.value[t2].serverPath);
|
|
74
|
+
y(z.pageContext.entity, U, l2.join(",")), y(z.pageContext.entity, B, e3.join(",")), l2.length > 0 && (R.value = "");
|
|
75
|
+
}, ae = l(null), ne = l(null);
|
|
76
|
+
return o(() => {
|
|
77
77
|
S.$on(J.value + "-pickFileDone", (e3) => {
|
|
78
|
-
|
|
79
|
-
}),
|
|
80
|
-
const e3 = h(
|
|
81
|
-
C(l2, z.pageContext, z.configure, { formItemRef:
|
|
78
|
+
J.value, L.value.pickFileDone(e3);
|
|
79
|
+
}), i(() => {
|
|
80
|
+
const e3 = h(A, U), l2 = { showName: h(A, B), serverPath: e3 };
|
|
81
|
+
C(l2, z.pageContext, z.configure, { formItemRef: ae.value, componentRef: L.value, titleRef: ne.value, value: l2, entity: z.pageContext.entity.data, pageData: z.pageContext.entity.page });
|
|
82
82
|
});
|
|
83
|
-
}),
|
|
83
|
+
}), a(() => {
|
|
84
84
|
S.$off(J.value + "-pickFileDone");
|
|
85
85
|
}), j2({ addRequiredClass: function() {
|
|
86
|
-
|
|
87
|
-
} }), (
|
|
86
|
+
R.value = T();
|
|
87
|
+
} }), (l2, t2) => {
|
|
88
88
|
const o2 = n("el-form-item");
|
|
89
|
-
return D.value.tittleShow ? (
|
|
89
|
+
return D.value.tittleShow ? (p(), u(o2, { key: 0, ref_key: "formItemRef", ref: ae, required: D.value.required, class: d(f(q) + (R.value ? " " + R.value : "")), "label-width": D.value.labelWidth, style: s(f(O)) }, m({ default: v(() => [M.value ? (p(), u(f(P), { key: 0, ref_key: "fileUploadRef", ref: L, style: { width: "100%" }, disabled: "disabled" === D.value.state, displayType: D.value.displayType, accept: D.value.accept, multiple: D.value.multiple, placeholder: D.value.placeholder, limit: D.value.limit, "limit-file-size": D.value.limitFileSize, "disabled-no-preview": D.value.disabledNoPreview, "disabled-no-download": D.value.disabledNoDownload, openCameraOrChoosePhoto: D.value.openCameraOrChoosePhoto, "sort-type": D.value.sortType, "file-info": V.value, "file-list": Q.value, "system-code": e2.pageContext.systemCode, componentId: J.value, watermark: f(G), "on-success": te, "on-remove": oe, "before-upload": Z, "on-error": le, pageContext: e2.pageContext, "file-show-type": D.value.fileShowType }, null, 8, ["disabled", "displayType", "accept", "multiple", "placeholder", "limit", "limit-file-size", "disabled-no-preview", "disabled-no-download", "openCameraOrChoosePhoto", "sort-type", "file-info", "file-list", "system-code", "componentId", "watermark", "pageContext", "file-show-type"])) : r("", true)]), _: 2 }, [D.value.tittleShow ? { name: "label", fn: v(() => [c("div", { ref_key: "titleRef", ref: ne, style: s({ ...f(W), ...f($) }), class: "amb-form-item-label" }, g(f(N)(D.value.title)), 5)]), key: "0" } : void 0]), 1032, ["required", "class", "label-width", "style"])) : M.value ? (p(), u(f(P), { key: 1, ref_key: "fileUploadRef", ref: L, style: { width: "100%" }, disabled: "disabled" === D.value.state, displayType: D.value.displayType, accept: D.value.accept, multiple: D.value.multiple, placeholder: D.value.placeholder, limit: D.value.limit, "limit-file-size": D.value.limitFileSize, "disabled-no-preview": D.value.disabledNoPreview, "disabled-no-download": D.value.disabledNoDownload, openCameraOrChoosePhoto: D.value.openCameraOrChoosePhoto, "sort-type": D.value.sortType, "file-info": V.value, "file-list": Q.value, "system-code": e2.pageContext.systemCode, componentId: J.value, watermark: f(G), "on-success": te, "on-remove": oe, "before-upload": Z, "on-error": le, pageContext: e2.pageContext, "file-show-type": D.value.fileShowType }, null, 8, ["disabled", "displayType", "accept", "multiple", "placeholder", "limit", "limit-file-size", "disabled-no-preview", "disabled-no-download", "openCameraOrChoosePhoto", "sort-type", "file-info", "file-list", "system-code", "componentId", "watermark", "pageContext", "file-show-type"])) : r("", true);
|
|
90
90
|
};
|
|
91
91
|
} });
|
|
92
92
|
export {
|
package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js
CHANGED
|
@@ -18,9 +18,9 @@ const w = e({ __name: "input-number-runtime", props: { pageContext: {}, configur
|
|
|
18
18
|
});
|
|
19
19
|
}), w2({ addRequiredClass: function() {
|
|
20
20
|
S.value = q();
|
|
21
|
-
} }), (
|
|
22
|
-
const
|
|
23
|
-
return i(), u(
|
|
21
|
+
} }), (t2, l2) => {
|
|
22
|
+
const o2 = n("el-input-number"), a2 = n("el-form-item");
|
|
23
|
+
return i(), u(a2, { ref_key: "formItemRef", ref: A, required: W.value.required, class: s(p(F) + (S.value ? " " + S.value : "")), "label-width": W.value.labelWidth, style: r(p(E)) }, m({ default: f(() => [c(o2, { ref_key: "componentRef", ref: G, disabled: "disabled" === W.value.state, readonly: "readonly" === W.value.state, controls: W.value.showButton, size: W.value.size, placeholder: W.value.placeholder, modelValue: I.value, "onUpdate:modelValue": l2[0] || (l2[0] = (e3) => I.value = e3), precision: W.value.precision, step: W.value.step, min: W.value.min, max: W.value.max, onChange: l2[1] || (l2[1] = (t3) => p(j)(t3, e2.pageContext, e2.configure, "change")), onBlur: l2[2] || (l2[2] = (t3) => p(j)(t3, e2.pageContext, e2.configure, "blur")), onFocus: l2[3] || (l2[3] = (t3) => p(j)(t3, e2.pageContext, e2.configure, "focus")) }, null, 8, ["disabled", "readonly", "controls", "size", "placeholder", "modelValue", "precision", "step", "min", "max"])]), _: 2 }, [W.value.tittleShow ? { name: "label", fn: f(() => [d("div", { ref_key: "titleRef", ref: H, style: r({ ...p(T), ...p(U) }), class: "amb-form-item-label" }, [W.value.prefixType ? (i(), u(k, { key: 0, pageContext: e2.pageContext, property: W.value }, null, 8, ["pageContext", "property"])) : (i(), v(g, { key: 1 }, [y(x(p(_)(W.value.title)), 1)], 64))], 4)]), key: "0" } : void 0]), 1032, ["required", "class", "label-width", "style"]);
|
|
24
24
|
};
|
|
25
25
|
} });
|
|
26
26
|
export {
|