super-page-runtime 2.3.43 → 2.3.44-sit1
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/api/page-expose-util.js +136 -136
- package/dist/es/components/runtime/utils/events/event-util.js +122 -122
- package/dist/es/components/runtime/utils/events/print-label.js +33 -34
- package/dist/es/components/runtime/utils/events/standard-event.js +201 -200
- package/dist/es/components/runtime/utils/events/validator-util.js +81 -84
- package/dist/es/components/runtime/utils/page-init-util.js +41 -43
- package/dist/es/components/runtime/utils/table-utils.js +1 -1
- 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 +1 -1
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +6 -10
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +6 -8
- package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/chart/common/home-chart-condition-render.vue.js +8 -8
- package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.d.ts +1 -1
- package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +98 -94
- package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +75 -74
- package/dist/es/components/runtime/views/assemblys/common/event-call-component.vue.js +13 -13
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +9 -11
- 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 +0 -2
- 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/iframe/iframe-runtime.vue2.js +5 -5
- package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +9 -11
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +167 -165
- 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 +16 -16
- package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +3 -3
- 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 +6 -6
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +22 -22
- 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 +65 -51
- package/dist/es/components/runtime/views/assemblys/form/image-upload/imageupload-runtime.vue2.js +15 -16
- 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 +47 -48
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +4 -6
- package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +7 -9
- package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +3 -3
- package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +8 -9
- 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 +9 -11
- package/dist/es/components/runtime/views/assemblys/page-bottom.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/workflow/component/workflow-opinion-box.vue2.js +3 -3
- 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 +7 -7
- package/dist/es/components/runtime/views/super-page-dialog.vue.js +0 -1
- package/dist/es/components/runtime/views/super-page.vue.js +1 -1
- package/dist/es/components/runtime/views/super-page.vue2.js +132 -141
- package/dist/es/style.css +76 -76
- package/package.json +2 -2
|
@@ -104,29 +104,29 @@ const P = { key: 0, class: "custom-tree-node" }, W = ["title"], R = { key: 0, cl
|
|
|
104
104
|
te.value.setCheckedKeys(e3, t2);
|
|
105
105
|
}, setChecked: (e3, t2, a2) => {
|
|
106
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) }), (
|
|
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) }), (e3, t2) => {
|
|
108
108
|
var _a2;
|
|
109
|
-
const
|
|
110
|
-
return i(), u("div", { class: s(["amb-tree-runtime-main", r(ee)]) }, [ae.value.filter ? (i(), c(
|
|
111
|
-
"" !== ce.value ? (
|
|
112
|
-
ye(
|
|
113
|
-
}) : E(
|
|
114
|
-
ye(
|
|
109
|
+
const a2 = d("el-input"), n2 = d("el-button"), l2 = d("SuperIcon"), o2 = d("el-tree");
|
|
110
|
+
return i(), u("div", { class: s(["amb-tree-runtime-main", r(ee)]) }, [ae.value.filter ? (i(), c(a2, { key: 0, modelValue: ue.value, "onUpdate:modelValue": t2[0] || (t2[0] = (e4) => ue.value = e4), style: { width: "100%" }, placeholder: "请输入查询条件" }, null, 8, ["modelValue"])) : p("", true), le.value ? (i(), c(o2, { 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: o3, data: d2 }) => [d2.nodeId === se.value ? (i(), u("div", P, [m(a2, { modelValue: ce.value, "onUpdate:modelValue": t2[1] || (t2[1] = (e4) => ce.value = e4), size: "small" }, null, 8, ["modelValue"]), h("div", null, [m(n2, { type: "primary", link: "", onClick: (e4) => ((e5) => {
|
|
111
|
+
"" !== ce.value ? (e5.data.name = ce.value, re.value && e5.data.nodeId === re.value ? w(e5, X.configure, X.pageContext).then((t3) => {
|
|
112
|
+
ye(e5, t3.currentNode), Ce(), z.success("保存成功!");
|
|
113
|
+
}) : E(e5, X.configure, X.pageContext).then((t3) => {
|
|
114
|
+
ye(e5, t3.currentNode), Ce(), z.success("保存成功!");
|
|
115
115
|
})) : z.warning("请输入节点名称");
|
|
116
|
-
})(
|
|
117
|
-
re.value &&
|
|
118
|
-
})(
|
|
119
|
-
if (ge.value && "standard" ===
|
|
120
|
-
else if ("delete" ===
|
|
121
|
-
ke(
|
|
116
|
+
})(o3) }, { default: g(() => t2[2] || (t2[2] = [y(" 保存 ")])), _: 2 }, 1032, ["onClick"]), m(n2, { style: { "margin-left": "4px" }, type: "primary", link: "", onClick: (t3) => ((e4) => {
|
|
117
|
+
re.value && e4.data.nodeId === re.value && te.value.remove(e4), Ce();
|
|
118
|
+
})(o3, e3.configure, e3.pageContext) }, { default: g(() => t2[3] || (t2[3] = [y(" 撤销 ")])), _: 2 }, 1032, ["onClick"])])])) : (i(), u("span", { key: 1, title: o3.label, class: "ellipsis" }, [d2.iconValue ? (i(), c(l2, { key: 0, iconType: d2.iconType, iconValue: d2.iconValue }, null, 8, ["iconType", "iconValue"])) : ae.value.iconValue ? (i(), c(l2, { 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, [t2[5] || (t2[5] = h("img", { src: I, class: "file" }, null, -1)), h("span", null, x(d2.name), 1)])) : (i(), u("div", R, [h("div", D, [t2[4] || (t2[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, (e4, t3) => (i(), u("li", { key: t3, tabindex: "-1", class: "menu__item", onClick: (t4) => ((e5) => {
|
|
119
|
+
if (ge.value && "standard" === e5.type && e5.standardEvent) if ("edit" === e5.standardEvent) se.value = ge.value.data.nodeId, ce.value = ge.value.data.name;
|
|
120
|
+
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(() => {
|
|
121
|
+
ke(e5);
|
|
122
122
|
}).catch(() => {
|
|
123
123
|
ge.value = null;
|
|
124
|
-
})) : ke(
|
|
124
|
+
})) : ke(e5);
|
|
125
125
|
else {
|
|
126
126
|
const t5 = xe();
|
|
127
|
-
se.value = t5.nodeId, re.value = t5.nodeId, ce.value = t5.name, "addSiblingNode" ===
|
|
127
|
+
se.value = t5.nodeId, re.value = t5.nodeId, ce.value = t5.name, "addSiblingNode" === e5.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" === e5.standardEvent && (t5.isLeaf = true, ge.value.data.isLeaf = false, te.value.append(t5, ge.value), te.value.setCurrentKey(t5.nodeId, true));
|
|
128
128
|
}
|
|
129
|
-
})(
|
|
129
|
+
})(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);
|
|
130
130
|
};
|
|
131
131
|
} });
|
|
132
132
|
export {
|
|
@@ -56,9 +56,9 @@ const z = e({ __name: "checkbox-runtime", props: { pageContext: {}, configure: {
|
|
|
56
56
|
});
|
|
57
57
|
}), t2 = t2.slice(0, t2.length - 1)) : t2 = e3.join(","), t2;
|
|
58
58
|
}
|
|
59
|
-
} }), (
|
|
60
|
-
const
|
|
61
|
-
return i(), u(
|
|
59
|
+
} }), (e3, t2) => {
|
|
60
|
+
const l2 = a("el-checkbox"), o2 = a("el-checkbox-group"), n2 = a("el-form-item");
|
|
61
|
+
return i(), u(n2, { ref_key: "formItemRef", ref: X, class: s(c(F) + (E.value ? " " + E.value : "")), required: !!B.value.required, "label-width": B.value.labelWidth, style: r(c(T)) }, p({ default: f(() => [g(o2, { ref_key: "componentRef", ref: Y, disabled: "disabled" === B.value.state, size: B.value.size, onChange: B.value.changeMethod, modelValue: M.value, "onUpdate:modelValue": t2[0] || (t2[0] = (e4) => M.value = e4) }, { default: f(() => [(i(true), v(d, null, m(G.value, (t3) => (i(), u(l2, { key: t3.value, value: t3.value, label: t3.label, onClick: (l3) => c(I)(t3.value, e3.pageContext, e3.configure, "click", { values: M.value }) }, null, 8, ["value", "label", "onClick"]))), 128))]), _: 1 }, 8, ["disabled", "size", "onChange", "modelValue"])]), _: 2 }, [B.value.tittleShow ? { name: "label", fn: f(() => [h("div", { ref_key: "titleRef", ref: Z, style: r({ ...c(U), ...c(W) }), class: "amb-form-item-label" }, y(c(V)(B.value.title)), 5)]), key: "0" } : void 0]), 1032, ["class", "required", "label-width", "style"]);
|
|
62
62
|
};
|
|
63
63
|
} });
|
|
64
64
|
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
|
+
} })), (e3, l2) => {
|
|
32
|
+
const s2 = r("el-radio"), y2 = r("el-checkbox");
|
|
33
|
+
return p(), t(o, null, ["radio" === e3.property.prefixType ? (p(), u(s2, { key: 0, value: e3.property.prefixValue, label: e3.property.title, modelValue: i(b), "onUpdate:modelValue": l2[0] || (l2[0] = (e4) => n(b) ? b.value = e4 : b = e4) }, null, 8, ["value", "label", "modelValue"])) : a("", true), "checkbox" === e3.property.prefixType ? (p(), u(y2, { key: 1, label: e3.property.title, value: e3.property.prefixValue, modelValue: i(b), "onUpdate:modelValue": l2[1] || (l2[1] = (e4) => n(b) ? b.value = e4 : b = e4) }, null, 8, ["label", "value", "modelValue"])) : a("", true)], 64);
|
|
34
34
|
};
|
|
35
35
|
} });
|
|
36
36
|
export {
|
|
@@ -1,4 +1,4 @@
|
|
|
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
|
|
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 f, unref as m, 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
4
|
import { handleAfterInitEvent as V, handleEvent as _ } from "../../../../utils/events/event-util.js";
|
|
@@ -24,7 +24,7 @@ const $ = { key: 0, style: { width: "100%", height: "100%" } }, O = { key: 1, st
|
|
|
24
24
|
k(H, e3, t2);
|
|
25
25
|
}
|
|
26
26
|
function T(e3) {
|
|
27
|
-
q.isHasFieldAuthPermission(G.configure)
|
|
27
|
+
q.isHasFieldAuthPermission(G.configure) && D(G.pageContext, e3);
|
|
28
28
|
}
|
|
29
29
|
function X() {
|
|
30
30
|
const e3 = G.pageContext.tableUuids;
|
|
@@ -43,7 +43,7 @@ const $ = { key: 0, style: { width: "100%", height: "100%" } }, O = { key: 1, st
|
|
|
43
43
|
const t2 = e3.result;
|
|
44
44
|
b(H, P, t2);
|
|
45
45
|
}), U.$on(Z.value + "-pickFileDone", (e3) => {
|
|
46
|
-
|
|
46
|
+
ee.value.pickFileDone(e3);
|
|
47
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 });
|
|
@@ -59,9 +59,9 @@ const $ = { key: 0, style: { width: "100%", height: "100%" } }, O = { 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 K.value.tittleShow ? (p(), l(
|
|
62
|
+
} }), (e3, t2) => {
|
|
63
|
+
const o2 = u("el-form-item");
|
|
64
|
+
return K.value.tittleShow ? (p(), l(o2, { key: 0, ref_key: "formItemRef", ref: te, required: K.value.required, class: f(m(W)), "label-width": K.value.labelWidth, style: c(m(B)) }, d({ default: g(() => [N.value ? (p(), r("div", $, [(p(), l(v(N.value), { ref_key: "customRef", ref: ee, size: K.value.size, entity: e3.pageContext.entity.data, pageData: e3.pageContext.entity.page, pageContext: e3.pageContext, configureObj: e3.configure, prop: m(R)(e3.configure.props && e3.configure.props.base ? e3.configure.props.base.prop : null), "custom-params": m(L), modelValue: I.value, "onUpdate:modelValue": t2[0] || (t2[0] = (e4) => I.value = e4), disabled: "disabled" === K.value.state, "additional-param-map": m(M), "component-id": Z.value, onSetEntityValue: Q, onSetCustomRules: T, onRestoreGridEdit: X, onHandleEvent: ae, onChange: t2[1] || (t2[1] = (t3) => m(_)(I.value, e3.pageContext, e3.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({ ...m(J) }), class: "amb-form-item-label" }, x(m(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: e3.pageContext.entity.data, pageData: e3.pageContext.entity.page, pageContext: e3.pageContext, configureObj: e3.configure, prop: m(R)(e3.configure.props && e3.configure.props.base ? e3.configure.props.base.prop : null), "custom-params": m(L), modelValue: I.value, "onUpdate:modelValue": t2[2] || (t2[2] = (e4) => I.value = e4), disabled: "disabled" === K.value.state, "additional-param-map": m(M), "component-id": Z.value, onSetEntityValue: Q, onSetCustomRules: T, onRestoreGridEdit: X, onHandleEvent: ae, onChange: t2[3] || (t2[3] = (t3) => m(_)(I.value, e3.pageContext, e3.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 {
|
package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent as e, ref as a, onMounted as l, nextTick as t, computed as o, resolveComponent as
|
|
1
|
+
import { defineComponent as e, ref as a, onMounted as l, nextTick as t, computed as o, resolveComponent as u, createBlock as r, openBlock as n, normalizeStyle as i, normalizeClass as d, unref as c, createSlots as p, withCtx as s, createElementVNode as v, createElementBlock as f, Fragment as g, createTextVNode as m, toDisplayString as h } from "vue";
|
|
2
2
|
import { getFormModelFields as y } from "../../../../utils/page-init-util.js";
|
|
3
3
|
import { getDateShortCuts as C } from "../../../../utils/form/date-shortcuts.js";
|
|
4
4
|
import { getModelFieldFromPageContext as x, getValueFromVariable as b, setVariableValue as F, getVariableValue as V, isDateDataType as k } from "../../../../utils/page-helper-util.js";
|
|
@@ -10,26 +10,26 @@ import { addRequiredClassUtil as _ } from "../../../../utils/common-util.js";
|
|
|
10
10
|
import { DatePickerRange as D, DateQuarterPicker as S } from "agilebuilder-ui";
|
|
11
11
|
const q = e({ __name: "datepicker-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: q2 }) {
|
|
12
12
|
var _a;
|
|
13
|
-
const w = e2, A = a(null), B = w.pageContext.entity ? w.pageContext.entity : {}, M = w.configure.runtime ? w.configure.runtime : {}, U = M.style,
|
|
14
|
-
let E = y(w.pageContext, w.configure,
|
|
13
|
+
const w = e2, A = a(null), B = w.pageContext.entity ? w.pageContext.entity : {}, M = w.configure.runtime ? w.configure.runtime : {}, U = M.style, I = M.class, N = M.headerStyle, W = M.titleExceedStyle, $ = a(M.props ? M.props : {});
|
|
14
|
+
let E = y(w.pageContext, w.configure, $.value.prop);
|
|
15
15
|
if (w.pageContext.modelFieldsMap && E && E.length > 0 && "data" === E[0]) {
|
|
16
16
|
const e3 = x(E, w.pageContext);
|
|
17
17
|
e3 && function(e4) {
|
|
18
18
|
const a2 = e4.dataType;
|
|
19
|
-
k(a2) && ("year" ===
|
|
19
|
+
k(a2) && ("year" === $.value.dateType && "YYYY" === $.value.valueFormat || "month" === $.value.dateType && "YYYY-MM" === $.value.valueFormat) && ($.value.valueFormat = "x");
|
|
20
20
|
}(e3);
|
|
21
21
|
}
|
|
22
22
|
let O = null, G = false;
|
|
23
|
-
if (
|
|
23
|
+
if ($.value.dateType && $.value.dateType.includes("range")) {
|
|
24
24
|
G = true;
|
|
25
|
-
let e3 =
|
|
25
|
+
let e3 = $.value.prop2;
|
|
26
26
|
e3 && e3.startsWith("${") || (e3 = "${page." + w.configure.uuid + "-2}");
|
|
27
27
|
const a2 = b(B, e3, null);
|
|
28
|
-
if (e3 = e3.substring(2, e3.length - 1), O = e3.split("."), !(a2 || B.data && (B.data.id || B.data.ID)) &&
|
|
29
|
-
const e4 = b(B,
|
|
28
|
+
if (e3 = e3.substring(2, e3.length - 1), O = e3.split("."), !(a2 || B.data && (B.data.id || B.data.ID)) && $.value.defaultValue2) {
|
|
29
|
+
const e4 = b(B, $.value.defaultValue2);
|
|
30
30
|
if (null != e4 && "" !== e4) F(B, O, e4);
|
|
31
|
-
else if (((_a =
|
|
32
|
-
const e5 =
|
|
31
|
+
else if (((_a = $.value.moreDefaultValue2) == null ? void 0 : _a.length) > 0) {
|
|
32
|
+
const e5 = $.value.moreDefaultValue2;
|
|
33
33
|
for (let a3 = 0; a3 < e5.length; a3++) {
|
|
34
34
|
const l2 = b(B, e5[a3]);
|
|
35
35
|
if (null != l2 && "" !== l2) {
|
|
@@ -50,7 +50,7 @@ const q = e({ __name: "datepicker-runtime", props: { pageContext: {}, configure:
|
|
|
50
50
|
let t2 = null;
|
|
51
51
|
return t2 = "x" === a2 ? l2.toDate().getTime() : R(e3).format(a2), t2;
|
|
52
52
|
} catch (a3) {
|
|
53
|
-
return
|
|
53
|
+
return e3;
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
56
|
return e3;
|
|
@@ -61,27 +61,27 @@ const q = e({ __name: "datepicker-runtime", props: { pageContext: {}, configure:
|
|
|
61
61
|
T(e3, w.pageContext, w.configure, { formItemRef: H.value, componentRef: J.value, titleRef: K.value, value: e3, entity: w.pageContext.entity.data, pageData: w.pageContext.entity.page });
|
|
62
62
|
});
|
|
63
63
|
}), E) {
|
|
64
|
-
const e3 = V(B, E), a2 = L(e3,
|
|
64
|
+
const e3 = V(B, E), a2 = L(e3, $.value.valueFormat);
|
|
65
65
|
e3 !== a2 && F(B, E, a2);
|
|
66
66
|
}
|
|
67
67
|
if (O) {
|
|
68
|
-
const e3 = V(B, O), a2 = L(e3,
|
|
68
|
+
const e3 = V(B, O), a2 = L(e3, $.value.valueFormat);
|
|
69
69
|
e3 !== a2 && F(B, O, a2);
|
|
70
70
|
}
|
|
71
71
|
const Q = o({ get() {
|
|
72
72
|
if (G) {
|
|
73
73
|
const e3 = [];
|
|
74
74
|
let a2 = V(B, E);
|
|
75
|
-
e3.push(L(a2,
|
|
75
|
+
e3.push(L(a2, $.value.valueFormat));
|
|
76
76
|
let l2 = V(B, O);
|
|
77
|
-
return e3.push(L(l2,
|
|
77
|
+
return e3.push(L(l2, $.value.valueFormat)), e3;
|
|
78
78
|
}
|
|
79
|
-
return L(V(B, E),
|
|
79
|
+
return L(V(B, E), $.value.valueFormat);
|
|
80
80
|
}, set(e3) {
|
|
81
81
|
G ? Array.isArray(e3) ? (F(B, E, e3[0]), F(B, O, e3[1]), A.value = "") : null === e3 && (F(B, E, null), F(B, O, null)) : (F(B, E, e3), null != e3 && (A.value = ""));
|
|
82
|
-
} }), X = a(C(
|
|
83
|
-
if (
|
|
84
|
-
const e3 = z(w.pageContext,
|
|
82
|
+
} }), X = a(C($.value.dateScopeDetails, $.value.sourceType, $.value.dateType));
|
|
83
|
+
if ($.value.shortcutsFunc) {
|
|
84
|
+
const e3 = z(w.pageContext, $.value.shortcutsFunc);
|
|
85
85
|
if (e3) {
|
|
86
86
|
let a2 = e3.apply(e3, [{ pageContext: w.pageContext, configureObj: w.configure }]);
|
|
87
87
|
if (a2) {
|
|
@@ -92,9 +92,9 @@ const q = e({ __name: "datepicker-runtime", props: { pageContext: {}, configure:
|
|
|
92
92
|
}
|
|
93
93
|
return q2({ addRequiredClass: function() {
|
|
94
94
|
A.value = _();
|
|
95
|
-
} }), (
|
|
96
|
-
const
|
|
97
|
-
return n(),
|
|
95
|
+
} }), (e3, a2) => {
|
|
96
|
+
const l2 = u("el-time-picker"), t2 = u("el-date-picker"), o2 = u("el-form-item");
|
|
97
|
+
return n(), r(o2, { ref_key: "formItemRef", ref: H, required: $.value.required, class: d(c(I) + (A.value ? " " + A.value : "")), "label-width": $.value.labelWidth, style: i(c(U)) }, p({ default: s(() => ["time" == $.value.dateType || "timerange" == $.value.dateType ? (n(), r(l2, { key: 0, ref_key: "componentRef", ref: J, "is-range": "timerange" == $.value.dateType, style: { width: "100%" }, "range-separator": "-", clearable: $.value.clearable, disabled: "disabled" === $.value.state, readonly: "readonly" === $.value.state, size: $.value.size, placeholder: $.value.placeholder, "start-placeholder": $.value.placeholder, "end-placeholder": $.value.endPlaceholder ? $.value.endPlaceholder : $.value.placeholder, "unlink-panels": true, format: $.value.format, "value-format": $.value.valueFormat, modelValue: Q.value, "onUpdate:modelValue": a2[0] || (a2[0] = (e4) => Q.value = e4), shortcuts: X.value, type: $.value.dateType, onChange: a2[1] || (a2[1] = (a3) => c(P)(a3, e3.pageContext, e3.configure, "change")), onBlur: a2[2] || (a2[2] = (a3) => c(P)(a3, e3.pageContext, e3.configure, "blur")), onFocus: a2[3] || (a2[3] = (a3) => c(P)(a3, e3.pageContext, e3.configure, "focus")), onVisibleChange: a2[4] || (a2[4] = (a3) => c(P)(a3, e3.pageContext, e3.configure, "visible-change")), onPanelChange: a2[5] || (a2[5] = (a3) => c(P)(a3, e3.pageContext, e3.configure, "panel-change")), onClear: a2[6] || (a2[6] = (a3) => c(P)(a3, e3.pageContext, e3.configure, "clear")) }, null, 8, ["is-range", "clearable", "disabled", "readonly", "size", "placeholder", "start-placeholder", "end-placeholder", "format", "value-format", "modelValue", "shortcuts", "type"])) : "combined" !== $.value.dateRangePickerMode && ["daterange", "datetimerange", "monthrange", "yearrange"].includes($.value.dateType) ? (n(), r(c(D), { key: 1, modelValue: Q.value, "onUpdate:modelValue": a2[7] || (a2[7] = (e4) => Q.value = e4), type: $.value.dateType, disabled: "disabled" === $.value.state, readonly: "readonly" === $.value.state, clearable: $.value.clearable, format: $.value.format, "value-format": $.value.valueFormat, placeholder: $.value.placeholder, "start-placeholder": $.value.placeholder, "end-placeholder": $.value.endPlaceholder ? $.value.endPlaceholder : $.value.placeholder, size: $.value.size, shortcuts: X.value, onChange: a2[8] || (a2[8] = (a3) => c(P)(a3, e3.pageContext, e3.configure, "change")), onBlur: a2[9] || (a2[9] = (a3) => c(P)(a3, e3.pageContext, e3.configure, "blur")), onFocus: a2[10] || (a2[10] = (a3) => c(P)(a3, e3.pageContext, e3.configure, "focus")), onVisibleChange: a2[11] || (a2[11] = (a3) => c(P)(a3, e3.pageContext, e3.configure, "visible-change")), onPanelChange: a2[12] || (a2[12] = (a3) => c(P)(a3, e3.pageContext, e3.configure, "panel-change")), onClear: a2[13] || (a2[13] = (a3) => c(P)(a3, e3.pageContext, e3.configure, "clear")) }, null, 8, ["modelValue", "type", "disabled", "readonly", "clearable", "format", "value-format", "placeholder", "start-placeholder", "end-placeholder", "size", "shortcuts"])) : "quarter" === $.value.dateType ? (n(), r(c(S), { key: 2, modelValue: Q.value, "onUpdate:modelValue": a2[14] || (a2[14] = (e4) => Q.value = e4), type: $.value.dateType, disabled: "disabled" === $.value.state, readonly: "readonly" === $.value.state, clearable: $.value.clearable, format: $.value.format, "value-format": $.value.valueFormat, placeholder: $.value.placeholder, size: $.value.size, onChange: a2[15] || (a2[15] = (a3) => c(P)(a3, e3.pageContext, e3.configure, "change")), onBlur: a2[16] || (a2[16] = (a3) => c(P)(a3, e3.pageContext, e3.configure, "blur")), onFocus: a2[17] || (a2[17] = (a3) => c(P)(a3, e3.pageContext, e3.configure, "focus")), onClear: a2[18] || (a2[18] = (a3) => c(P)(a3, e3.pageContext, e3.configure, "clear")) }, null, 8, ["modelValue", "type", "disabled", "readonly", "clearable", "format", "value-format", "placeholder", "size"])) : (n(), r(t2, { key: 3, ref_key: "componentRef", ref: J, clearable: $.value.clearable, style: { width: "100%" }, "unlink-panels": true, disabled: "disabled" === $.value.state, readonly: "readonly" === $.value.state, size: $.value.size, placeholder: $.value.placeholder, "start-placeholder": $.value.placeholder, "end-placeholder": $.value.endPlaceholder ? $.value.endPlaceholder : $.value.placeholder, format: $.value.format, "value-format": $.value.valueFormat, modelValue: Q.value, "onUpdate:modelValue": a2[19] || (a2[19] = (e4) => Q.value = e4), shortcuts: X.value, type: $.value.dateType, onChange: a2[20] || (a2[20] = (a3) => c(P)(a3, e3.pageContext, e3.configure, "change")), onBlur: a2[21] || (a2[21] = (a3) => c(P)(a3, e3.pageContext, e3.configure, "blur")), onFocus: a2[22] || (a2[22] = (a3) => c(P)(a3, e3.pageContext, e3.configure, "focus")), onVisibleChange: a2[23] || (a2[23] = (a3) => c(P)(a3, e3.pageContext, e3.configure, "visible-change")), onPanelChange: a2[24] || (a2[24] = (a3) => c(P)(a3, e3.pageContext, e3.configure, "panel-change")), onClear: a2[25] || (a2[25] = (a3) => c(P)(a3, e3.pageContext, e3.configure, "clear")) }, null, 8, ["clearable", "disabled", "readonly", "size", "placeholder", "start-placeholder", "end-placeholder", "format", "value-format", "modelValue", "shortcuts", "type"]))]), _: 2 }, [$.value.tittleShow ? { name: "label", fn: s(() => [v("div", { ref_key: "titleRef", ref: K, style: i({ ...c(N), ...c(W) }) }, [$.value.prefixType ? (n(), r(j, { key: 0, pageContext: e3.pageContext, property: $.value }, null, 8, ["pageContext", "property"])) : (n(), f(g, { key: 1 }, [m(h(c(Y)($.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
|
+
} }), (e3, t2) => {
|
|
49
|
+
const l2 = i("OrganizationInput"), o2 = i("el-form-item");
|
|
50
|
+
return u(), p(o2, { 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(l2, { 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: e3.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
|
+
}), (e3, t2) => {
|
|
18
|
+
const n2 = i("el-divider");
|
|
19
|
+
return l(), u(n2, { ref_key: "componentRef", ref: k, direction: C.value.direction, "border-style": C.value.borderType, "content-position": C.value.titlePosition, onClick: t2[0] || (t2[0] = (t3) => a(g)(t3, e3.pageContext, e3.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,92 +1,106 @@
|
|
|
1
|
-
import { defineComponent as e, ref as
|
|
1
|
+
import { defineComponent as e, ref as t, watch as l, onMounted as o, nextTick as a, onUnmounted as i, resolveComponent as n, createBlock as u, createCommentVNode as r, openBlock as p, normalizeStyle as s, normalizeClass as f, unref as d, createSlots as m, withCtx as c, createElementVNode as v, toDisplayString as g } from "vue";
|
|
2
2
|
import { getVariableValue as h, setVariableValue as y } from "../../../../utils/page-helper-util.js";
|
|
3
3
|
import { handleAfterInitEvent as C, fileUploadBeforeUpload as w, fileUploadBeforeDelete as b, fileUploadUploaded as x, fileUploadDeleted as k } from "../../../../utils/events/event-util.js";
|
|
4
4
|
import I from "agilebuilder-ui/src/utils/request";
|
|
5
5
|
import { FsUploadNew as P } from "agilebuilder-ui";
|
|
6
|
-
import
|
|
7
|
-
import { $t as
|
|
8
|
-
import { addRequiredClassUtil as
|
|
9
|
-
import { getRelativeBaseUrl as
|
|
6
|
+
import N from "../../../../utils/eventBus.js";
|
|
7
|
+
import { $t as S } from "../../../../utils/i18n-util.js";
|
|
8
|
+
import { addRequiredClassUtil as j } from "../../../../utils/common-util.js";
|
|
9
|
+
import { getRelativeBaseUrl as D } from "agilebuilder-ui/src/utils/common-util";
|
|
10
|
+
import { getDefaultValue as T } from "../../../../utils/page-init-util.js";
|
|
10
11
|
const _ = e({ __name: "fileupload-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: _2 }) {
|
|
11
12
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
12
|
-
const z = e2, R =
|
|
13
|
-
let G =
|
|
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 &&
|
|
15
|
-
|
|
13
|
+
const z = e2, R = t(null), F = z.configure.runtime ? z.configure.runtime : {}, O = t(F.props ? F.props : {}), q = F.style, W = F.class, V = F.headerStyle, $ = F.titleExceedStyle, A = z.pageContext.entity ? z.pageContext.entity : {}, E = z.configure.props.base ? z.configure.props.base : {}, U = Z(E.prop), B = Z(E.propName);
|
|
14
|
+
let G = t({});
|
|
15
|
+
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 && l(() => z.pageContext.entity[U[0]][U[1]], (e3) => {
|
|
16
|
+
Y(h(A, U));
|
|
16
17
|
});
|
|
17
|
-
const H = z.pageContext.code, J =
|
|
18
|
-
function
|
|
18
|
+
const H = z.pageContext.code, J = t(U ? H + "__" + U.join("__") : null), K = h(A, U), L = t(null), M = t(false), Q = t([]), X = t({});
|
|
19
|
+
function Y(e3) {
|
|
19
20
|
if (e3) {
|
|
20
|
-
const
|
|
21
|
-
if (
|
|
22
|
-
const e4 =
|
|
23
|
-
I.post(e4,
|
|
21
|
+
const t2 = e3.split(",");
|
|
22
|
+
if (t2.length > 0) {
|
|
23
|
+
const e4 = D(window.$vueApp.config.globalProperties.baseAPI) + "/component/fs-upload/search-file-metadata";
|
|
24
|
+
I.post(e4, t2).then((e5) => {
|
|
24
25
|
Q.value = [];
|
|
25
|
-
const
|
|
26
|
+
const l2 = [], o2 = {};
|
|
26
27
|
e5.forEach((e6) => {
|
|
27
28
|
o2[e6.uuid] = e6;
|
|
28
29
|
});
|
|
29
|
-
for (let e6 = 0; e6 <
|
|
30
|
-
const
|
|
31
|
-
|
|
30
|
+
for (let e6 = 0; e6 < t2.length; e6++) {
|
|
31
|
+
const a2 = t2[e6];
|
|
32
|
+
l2.push(o2[a2].fileName), Q.value.push({ showName: o2[a2].fileName, serverPath: a2, fileSize: o2[a2].fileSize });
|
|
32
33
|
}
|
|
33
|
-
"input" === O.value.displayType && (
|
|
34
|
+
"input" === O.value.displayType && (X.value.showName = l2.join(","), X.value.serverPath = t2.join(","));
|
|
34
35
|
}).finally(() => {
|
|
35
36
|
M.value = true;
|
|
36
37
|
});
|
|
37
38
|
} else M.value = true;
|
|
38
|
-
} else Q.value = [],
|
|
39
|
+
} else Q.value = [], X.value = {}, M.value = true;
|
|
39
40
|
}
|
|
40
|
-
function
|
|
41
|
+
function Z(e3) {
|
|
41
42
|
return e3 ? (e3.startsWith("${") && (e3 = e3.substring(2, e3.length - 1)), e3.split(".")) : [];
|
|
42
43
|
}
|
|
43
|
-
function
|
|
44
|
+
function ee(e3) {
|
|
44
45
|
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:
|
|
46
|
+
return -1 === z.pageContext.fileuploadInfo.findIndex((e4) => e4.uuid === z.configure.uuid) && z.pageContext.fileuploadInfo.push({ uuid: z.configure.uuid, label: S(O.value.title) }), e3.pageContext || (e3.pageContext = z.pageContext), e3.configure || (e3.configureObj = z.configure), w(e3);
|
|
46
47
|
}
|
|
47
|
-
function
|
|
48
|
-
if (z.pageContext.fileuploadInfo
|
|
48
|
+
function te() {
|
|
49
|
+
if (z.pageContext.fileuploadInfo && z.configure.uuid) {
|
|
49
50
|
const e3 = z.pageContext.fileuploadInfo.findIndex((e4) => e4.uuid === z.configure.uuid);
|
|
50
51
|
-1 !== e3 && z.pageContext.fileuploadInfo.splice(e3, 1);
|
|
51
52
|
}
|
|
52
|
-
z.pageContext.fileuploadInfo;
|
|
53
53
|
}
|
|
54
54
|
function le(e3) {
|
|
55
|
-
|
|
55
|
+
te();
|
|
56
56
|
}
|
|
57
|
-
function
|
|
57
|
+
function oe(e3) {
|
|
58
58
|
return b(z.pageContext, z.configure, e3);
|
|
59
59
|
}
|
|
60
|
-
|
|
61
|
-
const
|
|
60
|
+
Y(K);
|
|
61
|
+
const ae = (e3, t2, l2) => {
|
|
62
62
|
var o2;
|
|
63
|
-
|
|
63
|
+
te(), ne(), o2 = { response: e3, uploadFile: t2, uploadFiles: l2 }, x(z.pageContext, z.configure, o2);
|
|
64
64
|
}, ie = (e3) => {
|
|
65
|
-
var
|
|
66
|
-
|
|
67
|
-
},
|
|
68
|
-
const e3 = [],
|
|
65
|
+
var t2;
|
|
66
|
+
ne(), t2 = { file: e3 }, k(z.pageContext, z.configure, t2);
|
|
67
|
+
}, ne = () => {
|
|
68
|
+
const e3 = [], t2 = [];
|
|
69
69
|
if (O.value.limit && Q.value.length > O.value.limit) {
|
|
70
70
|
const e4 = Q.value.length - O.value.limit;
|
|
71
|
-
for (let
|
|
71
|
+
for (let t3 = 0; t3 < e4; t3++) Q.value.shift();
|
|
72
72
|
}
|
|
73
|
-
for (let
|
|
74
|
-
y(z.pageContext.entity, U,
|
|
75
|
-
},
|
|
73
|
+
for (let l2 = 0; l2 < Q.value.length; l2++) e3.push(Q.value[l2].showName), t2.push(Q.value[l2].serverPath);
|
|
74
|
+
y(z.pageContext.entity, U, t2.join(",")), y(z.pageContext.entity, B, e3.join(",")), t2.length > 0 && (R.value = "");
|
|
75
|
+
}, ue = t(null), re = t(null);
|
|
76
76
|
return o(() => {
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
}),
|
|
80
|
-
const e3 =
|
|
81
|
-
|
|
77
|
+
N.$on(J.value + "-pickFileDone", (e3) => {
|
|
78
|
+
L.value.pickFileDone(e3);
|
|
79
|
+
}), a(() => {
|
|
80
|
+
const e3 = (e4, t3, l3) => {
|
|
81
|
+
if (!t3) return;
|
|
82
|
+
const o2 = [t3, ...l3 || []];
|
|
83
|
+
for (const t4 of o2) try {
|
|
84
|
+
const l4 = T(z.pageContext, t4, "", false);
|
|
85
|
+
if (null != l4 && "" !== l4) {
|
|
86
|
+
y(z.pageContext.entity, e4, l4);
|
|
87
|
+
break;
|
|
88
|
+
}
|
|
89
|
+
} catch (e5) {
|
|
90
|
+
break;
|
|
91
|
+
}
|
|
92
|
+
};
|
|
93
|
+
null == A.data.ID && null == A.data.id && (e3(U, E.propDefaultValue, E.morePropDefaultValue), e3(B, E.propNameDefaultValue, E.morePropNameDefaultValue));
|
|
94
|
+
const t2 = h(A, U), l2 = { showName: h(A, B), serverPath: t2 };
|
|
95
|
+
C(l2, z.pageContext, z.configure, { formItemRef: ue.value, componentRef: L.value, titleRef: re.value, value: l2, entity: z.pageContext.entity.data, pageData: z.pageContext.entity.page });
|
|
82
96
|
});
|
|
83
|
-
}),
|
|
84
|
-
|
|
97
|
+
}), i(() => {
|
|
98
|
+
N.$off(J.value + "-pickFileDone");
|
|
85
99
|
}), _2({ addRequiredClass: function() {
|
|
86
|
-
R.value =
|
|
87
|
-
} }), (
|
|
88
|
-
const
|
|
89
|
-
return O.value.tittleShow ? (p(), u(
|
|
100
|
+
R.value = j();
|
|
101
|
+
} }), (e3, t2) => {
|
|
102
|
+
const l2 = n("el-form-item");
|
|
103
|
+
return O.value.tittleShow ? (p(), u(l2, { key: 0, ref_key: "formItemRef", ref: ue, required: O.value.required, class: f(d(W) + (R.value ? " " + R.value : "")), "label-width": O.value.labelWidth, style: s(d(q)) }, m({ default: c(() => [M.value ? (p(), u(d(P), { key: 0, ref_key: "fileUploadRef", ref: L, style: { width: "100%" }, disabled: "disabled" === O.value.state, displayType: O.value.displayType, accept: O.value.accept, multiple: O.value.multiple, placeholder: O.value.placeholder, limit: O.value.limit, "limit-file-size": O.value.limitFileSize, "disabled-no-preview": O.value.disabledNoPreview, "disabled-no-download": O.value.disabledNoDownload, openCameraOrChoosePhoto: O.value.openCameraOrChoosePhoto, "sort-type": O.value.sortType, "file-info": X.value, "file-list": Q.value, "system-code": e3.pageContext.systemCode, componentId: J.value, watermark: d(G), "on-success": ae, "on-remove": ie, "before-upload": ee, "on-error": le, "before-remove": oe, pageContext: e3.pageContext, "file-show-type": O.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 }, [O.value.tittleShow ? { name: "label", fn: c(() => [v("div", { ref_key: "titleRef", ref: re, style: s({ ...d(V), ...d($) }), class: "amb-form-item-label" }, g(d(S)(O.value.title)), 5)]), key: "0" } : void 0]), 1032, ["required", "class", "label-width", "style"])) : M.value ? (p(), u(d(P), { key: 1, ref_key: "fileUploadRef", ref: L, style: { width: "100%" }, disabled: "disabled" === O.value.state, displayType: O.value.displayType, accept: O.value.accept, multiple: O.value.multiple, placeholder: O.value.placeholder, limit: O.value.limit, "limit-file-size": O.value.limitFileSize, "disabled-no-preview": O.value.disabledNoPreview, "disabled-no-download": O.value.disabledNoDownload, openCameraOrChoosePhoto: O.value.openCameraOrChoosePhoto, "sort-type": O.value.sortType, "file-info": X.value, "file-list": Q.value, "system-code": e3.pageContext.systemCode, componentId: J.value, watermark: d(G), "on-success": ae, "on-remove": ie, "before-upload": ee, "on-error": le, "before-remove": oe, pageContext: e3.pageContext, "file-show-type": O.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
104
|
};
|
|
91
105
|
} });
|
|
92
106
|
export {
|
package/dist/es/components/runtime/views/assemblys/form/image-upload/imageupload-runtime.vue2.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { defineComponent as e, ref as t, onMounted as l, nextTick as o, onUnmounted as a, resolveComponent as i, createBlock as n, createCommentVNode as u, openBlock as r, normalizeStyle as p, normalizeClass as s, unref as f, createSlots as d, withCtx as
|
|
2
|
-
import { getVariableValue as g, setVariableValue as
|
|
3
|
-
import { handleAfterInitEvent as
|
|
1
|
+
import { defineComponent as e, ref as t, onMounted as l, nextTick as o, onUnmounted as a, resolveComponent as i, createBlock as n, createCommentVNode as u, openBlock as r, normalizeStyle as p, normalizeClass as s, unref as f, createSlots as d, withCtx as m, createElementVNode as c, toDisplayString as v } from "vue";
|
|
2
|
+
import { getVariableValue as g, setVariableValue as y } from "../../../../utils/page-helper-util.js";
|
|
3
|
+
import { handleAfterInitEvent as h, fileUploadBeforeUpload as C, fileUploadBeforeDelete as x, fileUploadUploaded as w, fileUploadDeleted as b } from "../../../../utils/events/event-util.js";
|
|
4
4
|
import k from "agilebuilder-ui/src/utils/request";
|
|
5
5
|
import { FsImageUpload as I } from "agilebuilder-ui";
|
|
6
6
|
import j from "../../../../utils/eventBus.js";
|
|
@@ -9,7 +9,7 @@ import { addRequiredClassUtil as P } from "../../../../utils/common-util.js";
|
|
|
9
9
|
import { getRelativeBaseUrl as T } from "agilebuilder-ui/src/utils/common-util";
|
|
10
10
|
const _ = e({ __name: "imageupload-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: _2 }) {
|
|
11
11
|
var _a, _b, _c, _d, _e, _f, _g;
|
|
12
|
-
const N = e2, O = t(null), z = N.configure.runtime ? N.configure.runtime : {},
|
|
12
|
+
const N = e2, O = t(null), z = N.configure.runtime ? N.configure.runtime : {}, D = t(z.props ? z.props : {}), R = z.style, F = z.class, q = z.headerStyle, W = z.titleExceedStyle, $ = N.pageContext.entity ? N.pageContext.entity : {}, A = N.configure.props.base ? N.configure.props.base : {}, E = V(A.prop), U = V(A.propName);
|
|
13
13
|
let B = t({});
|
|
14
14
|
B.value.isShowWatermark = void 0 === ((_b = (_a = N.configure.props) == null ? void 0 : _a.watermark) == null ? void 0 : _b.isShowWatermark) ? "true" : ((_c = N.configure.props) == null ? void 0 : _c.watermark.isShowWatermark) + "", B.value.content = ((_e = (_d = N.configure.props) == null ? void 0 : _d.watermark) == null ? void 0 : _e.content) ? (_g = (_f = N.configure.props) == null ? void 0 : _f.watermark) == null ? void 0 : _g.content : "";
|
|
15
15
|
const G = N.pageContext.code, H = t(E ? G + "__" + E.join("__") : null), J = g($, E), K = t(null), L = t(false), M = t([]), Q = t({});
|
|
@@ -18,14 +18,13 @@ const _ = e({ __name: "imageupload-runtime", props: { pageContext: {}, configure
|
|
|
18
18
|
}
|
|
19
19
|
function X(e3) {
|
|
20
20
|
N.pageContext.fileuploadInfo || (N.pageContext.fileuploadInfo = []);
|
|
21
|
-
return -1 === N.pageContext.fileuploadInfo.findIndex((e4) => e4.uuid === N.configure.uuid) && N.pageContext.fileuploadInfo.push({ uuid: N.configure.uuid, label: S(
|
|
21
|
+
return -1 === N.pageContext.fileuploadInfo.findIndex((e4) => e4.uuid === N.configure.uuid) && N.pageContext.fileuploadInfo.push({ uuid: N.configure.uuid, label: S(D.value.title) }), e3.pageContext || (e3.pageContext = N.pageContext), e3.configure || (e3.configureObj = N.configure), C(e3);
|
|
22
22
|
}
|
|
23
23
|
function Y() {
|
|
24
|
-
if (N.pageContext.fileuploadInfo
|
|
24
|
+
if (N.pageContext.fileuploadInfo && N.configure.uuid) {
|
|
25
25
|
const e3 = N.pageContext.fileuploadInfo.findIndex((e4) => e4.uuid === N.configure.uuid);
|
|
26
26
|
-1 !== e3 && N.pageContext.fileuploadInfo.splice(e3, 1);
|
|
27
27
|
}
|
|
28
|
-
N.pageContext.fileuploadInfo;
|
|
29
28
|
}
|
|
30
29
|
function Z(e3) {
|
|
31
30
|
Y();
|
|
@@ -48,7 +47,7 @@ const _ = e({ __name: "imageupload-runtime", props: { pageContext: {}, configure
|
|
|
48
47
|
const a2 = t2[e6];
|
|
49
48
|
l2.push(o2[a2].fileName), M.value.push({ showName: o2[a2].fileName, serverPath: a2, fileSize: o2[a2].fileSize });
|
|
50
49
|
}
|
|
51
|
-
"input" ===
|
|
50
|
+
"input" === D.value.displayType && (Q.value.showName = l2.join(","), Q.value.serverPath = t2.join(","));
|
|
52
51
|
}).finally(() => {
|
|
53
52
|
L.value = true;
|
|
54
53
|
});
|
|
@@ -63,27 +62,27 @@ const _ = e({ __name: "imageupload-runtime", props: { pageContext: {}, configure
|
|
|
63
62
|
oe(), t2 = { file: e3 }, b(N.pageContext, N.configure, t2);
|
|
64
63
|
}, oe = () => {
|
|
65
64
|
const e3 = [], t2 = [];
|
|
66
|
-
if (
|
|
67
|
-
const e4 = M.value.length -
|
|
65
|
+
if (D.value.limit && M.value.length > D.value.limit) {
|
|
66
|
+
const e4 = M.value.length - D.value.limit;
|
|
68
67
|
for (let t3 = 0; t3 < e4; t3++) M.value.shift();
|
|
69
68
|
}
|
|
70
69
|
for (let l2 = 0; l2 < M.value.length; l2++) e3.push(M.value[l2].showName), t2.push(M.value[l2].serverPath);
|
|
71
|
-
|
|
70
|
+
y(N.pageContext.entity, E, t2.join(",")), y(N.pageContext.entity, U, e3.join(",")), t2.length > 0 && (O.value = "");
|
|
72
71
|
}, ae = t(null), ie = t(null);
|
|
73
72
|
return l(() => {
|
|
74
73
|
j.$on(H.value + "-pickFileDone", (e3) => {
|
|
75
|
-
|
|
74
|
+
K.value.pickFileDone(e3);
|
|
76
75
|
}), o(() => {
|
|
77
76
|
const e3 = g($, E), t2 = { showName: g($, U), serverPath: e3 };
|
|
78
|
-
|
|
77
|
+
h(t2, N.pageContext, N.configure, { formItemRef: ae.value, componentRef: K.value, titleRef: ie.value, value: t2, entity: N.pageContext.entity.data, pageData: N.pageContext.entity.page });
|
|
79
78
|
});
|
|
80
79
|
}), a(() => {
|
|
81
80
|
j.$off(H.value + "-pickFileDone");
|
|
82
81
|
}), _2({ addRequiredClass: function() {
|
|
83
82
|
O.value = P();
|
|
84
|
-
} }), (
|
|
85
|
-
const
|
|
86
|
-
return
|
|
83
|
+
} }), (e3, t2) => {
|
|
84
|
+
const l2 = i("el-form-item");
|
|
85
|
+
return D.value.tittleShow ? (r(), n(l2, { key: 0, ref_key: "formItemRef", ref: ae, required: D.value.required, class: s(f(F) + (O.value ? " " + O.value : "")), "label-width": D.value.labelWidth, style: p(f(R)) }, d({ default: m(() => [L.value ? (r(), n(f(I), { key: 0, ref_key: "fileUploadRef", ref: K, style: { width: "100%" }, accept: D.value.accept && Object.keys(D.value.accept).length > 0 ? D.value.accept : "image/*", disabled: "disabled" === D.value.state, displayType: D.value.displayType, multiple: D.value.multiple, placeholder: D.value.placeholder, limit: D.value.limit, "limit-file-size": D.value.limitFileSize, "max-display-count": D.value.maxDisplayCount, "disabled-no-download": D.value.disabledNoDownload, openCameraOrChoosePhoto: D.value.openCameraOrChoosePhoto, "sort-type": D.value.sortType, "file-info": Q.value, "file-list": M.value, "system-code": e3.pageContext.systemCode, componentId: H.value, watermark: f(B), "on-success": te, "on-remove": le, "before-upload": X, "before-remove": ee, "on-error": Z, pageContext: e3.pageContext, "file-show-type": D.value.fileShowType }, null, 8, ["accept", "disabled", "displayType", "multiple", "placeholder", "limit", "limit-file-size", "max-display-count", "disabled-no-download", "openCameraOrChoosePhoto", "sort-type", "file-info", "file-list", "system-code", "componentId", "watermark", "pageContext", "file-show-type"])) : u("", true)]), _: 2 }, [D.value.tittleShow ? { name: "label", fn: m(() => [c("div", { ref_key: "titleRef", ref: ie, style: p({ ...f(q), ...f(W) }), class: "amb-form-item-label" }, v(f(S)(D.value.title)), 5)]), key: "0" } : void 0]), 1032, ["required", "class", "label-width", "style"])) : L.value ? (r(), n(f(I), { key: 1, ref_key: "fileUploadRef", ref: K, style: { width: "100%" }, accept: D.value.accept, disabled: "disabled" === D.value.state, displayType: D.value.displayType, multiple: D.value.multiple, placeholder: D.value.placeholder, limit: D.value.limit, "limit-file-size": D.value.limitFileSize, "max-display-count": D.value.maxDisplayCount, "disabled-no-download": D.value.disabledNoDownload, openCameraOrChoosePhoto: D.value.openCameraOrChoosePhoto, "sort-type": D.value.sortType, "file-info": Q.value, "file-list": M.value, "system-code": e3.pageContext.systemCode, componentId: H.value, watermark: f(B), "on-success": te, "on-remove": le, "before-upload": X, "before-remove": ee, "on-error": Z, pageContext: e3.pageContext, "file-show-type": D.value.fileShowType }, null, 8, ["accept", "disabled", "displayType", "multiple", "placeholder", "limit", "limit-file-size", "max-display-count", "disabled-no-download", "openCameraOrChoosePhoto", "sort-type", "file-info", "file-list", "system-code", "componentId", "watermark", "pageContext", "file-show-type"])) : u("", true);
|
|
87
86
|
};
|
|
88
87
|
} });
|
|
89
88
|
export {
|