super-page-runtime 2.1.92 → 2.1.95
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/_virtual/_plugin-vue_export-helper.js +6 -7
- package/dist/es/assets/chart-themes/theme1.js +2 -6
- package/dist/es/assets/chart-themes/theme2.js +2 -6
- package/dist/es/assets/chart-themes/theme3.js +2 -6
- package/dist/es/components/runtime/utils/api/api-util.js +4 -7
- package/dist/es/components/runtime/utils/api/page-expose-util.js +137 -433
- package/dist/es/components/runtime/utils/assemblys-config.js +12 -366
- package/dist/es/components/runtime/utils/barcode-util.js +10 -33
- package/dist/es/components/runtime/utils/charts/chart-columnline-util.js +138 -303
- package/dist/es/components/runtime/utils/charts/chart-gauge-util.js +29 -66
- package/dist/es/components/runtime/utils/charts/chart-pie-util.js +71 -147
- package/dist/es/components/runtime/utils/charts/chart-radar-util.js +52 -122
- package/dist/es/components/runtime/utils/charts/chart-scatter-util.js +40 -98
- package/dist/es/components/runtime/utils/charts/chart-util.js +237 -478
- package/dist/es/components/runtime/utils/common-util.js +82 -152
- package/dist/es/components/runtime/utils/eventBus.js +3 -9
- package/dist/es/components/runtime/utils/events/event-util.js +361 -727
- package/dist/es/components/runtime/utils/events/print-label.js +73 -140
- package/dist/es/components/runtime/utils/events/standard-event.js +835 -2283
- package/dist/es/components/runtime/utils/events/validator-util.js +236 -555
- package/dist/es/components/runtime/utils/form/date-shortcuts.js +29 -88
- package/dist/es/components/runtime/utils/form/scan-util.js +60 -154
- package/dist/es/components/runtime/utils/global-refs.js +45 -69
- package/dist/es/components/runtime/utils/i18n-util.js +12 -20
- package/dist/es/components/runtime/utils/interfaces/page-design-types.js +2 -7
- package/dist/es/components/runtime/utils/page-helper-util.js +295 -603
- package/dist/es/components/runtime/utils/page-init-util.js +134 -369
- package/dist/es/components/runtime/utils/page-permission-util.js +24 -531
- package/dist/es/components/runtime/utils/page-store.js +8 -12
- package/dist/es/components/runtime/utils/store-util.js +9 -13
- package/dist/es/components/runtime/utils/store.js +2 -2
- package/dist/es/components/runtime/utils/table-utils.js +49 -84
- package/dist/es/components/runtime/utils/tree-utils.js +18 -36
- package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +19 -75
- package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue2.js +14 -46
- package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +37 -132
- package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue2.js +4 -18
- package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue2.js +17 -107
- package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +54 -198
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue.js +12 -42
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +7 -60
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +48 -169
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +32 -107
- package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +43 -164
- package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +32 -115
- package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +32 -116
- package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +208 -439
- package/dist/es/components/runtime/views/assemblys/chart/table/group-column-item.vue.js +4 -42
- package/dist/es/components/runtime/views/assemblys/chart/table/group-column-item.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/group-column.vue.js +8 -62
- package/dist/es/components/runtime/views/assemblys/chart/table/group-column.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue.js +63 -226
- package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/table-pageination.vue.js +13 -62
- package/dist/es/components/runtime/views/assemblys/chart/table/table-pageination.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +168 -513
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +29 -139
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue.js +23 -125
- package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue.js +16 -102
- package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue2.js +18 -81
- package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue2.js +17 -82
- package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue2.js +14 -86
- package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +21 -79
- package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue2.js +16 -61
- package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue2.js +10 -37
- package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +38 -127
- package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue2.js +28 -76
- package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +61 -178
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +311 -800
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +251 -592
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +43 -115
- package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +56 -216
- package/dist/es/components/runtime/views/assemblys/error-render.vue.js +3 -21
- package/dist/es/components/runtime/views/assemblys/error-render.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +44 -154
- package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue.js +36 -98
- package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +54 -200
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +69 -239
- package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +28 -98
- package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue2.js +22 -59
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +52 -173
- package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +22 -103
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +58 -249
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +34 -174
- package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +28 -107
- package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue.js +4 -4
- package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue2.js +13 -50
- package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +66 -189
- package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +91 -243
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +82 -261
- package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue2.js +13 -57
- package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +30 -155
- package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +41 -129
- package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +22 -107
- package/dist/es/components/runtime/views/assemblys/object-render.vue.js +133 -252
- package/dist/es/components/runtime/views/assemblys/object-render.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/workflow/picture-flow/pictureflow-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/workflow/picture-flow/pictureflow-runtime.vue2.js +19 -46
- package/dist/es/components/runtime/views/assemblys/workflow/text-history/textflow-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/workflow/text-history/textflow-runtime.vue2.js +22 -49
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +21 -58
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-node/workflownode-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-node/workflownode-runtime.vue2.js +16 -53
- package/dist/es/components/runtime/views/super-page-dialog.vue.js +18 -134
- package/dist/es/components/runtime/views/super-page-dialog.vue2.js +2 -2
- package/dist/es/components/runtime/views/super-page.vue.js +232 -708
- package/dist/es/components/runtime/views/super-page.vue2.js +2 -2
- package/dist/es/i18n/langs/cn.js +2 -55
- package/dist/es/i18n/langs/en.js +2 -55
- package/package.json +74 -73
|
@@ -1,130 +1,41 @@
|
|
|
1
|
-
import { defineComponent, ref, onMounted, nextTick, openBlock, createBlock, unref, normalizeStyle, normalizeClass, withCtx, createElementBlock, Fragment, renderList, createElementVNode, createCommentVNode, toDisplayString } from "vue";
|
|
2
|
-
import { ElTabs, ElTabPane } from "element-plus";
|
|
3
|
-
import
|
|
4
|
-
import { SuperIcon } from "agilebuilder-ui";
|
|
5
|
-
import { handleAfterInitEvent, handleEvent } from "../../../../utils/events/event-util.js";
|
|
6
|
-
import { $t } from "../../../../utils/i18n-util.js";
|
|
7
|
-
const
|
|
8
|
-
|
|
9
|
-
props:
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
const
|
|
21
|
-
|
|
22
|
-
function tabClick(pane, ev) {
|
|
23
|
-
const params = {
|
|
24
|
-
pane,
|
|
25
|
-
ev
|
|
26
|
-
};
|
|
27
|
-
const activeTab = pane.paneName;
|
|
28
|
-
props.pageContext.activeTab = activeTab;
|
|
29
|
-
props.pageContext.activeLabel = params.label;
|
|
30
|
-
return handleEvent(activeTab, props.pageContext, props.configure, "tab-click", params);
|
|
31
|
-
}
|
|
32
|
-
function tabChange(paneName) {
|
|
33
|
-
const params = {
|
|
34
|
-
paneName
|
|
35
|
-
};
|
|
36
|
-
props.pageContext.activeTab = paneName;
|
|
37
|
-
return handleEvent(paneName, props.pageContext, props.configure, "tab-change", params);
|
|
38
|
-
}
|
|
39
|
-
function tabRemove(paneName) {
|
|
40
|
-
const params = {
|
|
41
|
-
paneName
|
|
42
|
-
};
|
|
43
|
-
return handleEvent(paneName, props.pageContext, props.configure, "tab-remove", params);
|
|
44
|
-
}
|
|
45
|
-
function tabAdd() {
|
|
46
|
-
return handleEvent(null, props.pageContext, props.configure, "tab-add");
|
|
47
|
-
}
|
|
48
|
-
function tabEdit(paneName, action) {
|
|
49
|
-
const params = {
|
|
50
|
-
paneName,
|
|
51
|
-
action
|
|
52
|
-
};
|
|
53
|
-
return handleEvent(paneName, props.pageContext, props.configure, "edit", params);
|
|
54
|
-
}
|
|
55
|
-
onMounted(() => {
|
|
56
|
-
nextTick(() => {
|
|
57
|
-
let tabsDom = [];
|
|
58
|
-
props.configure.items.forEach((item) => {
|
|
59
|
-
if (item.code) {
|
|
60
|
-
tabsDom.push(document.querySelector("." + item.code));
|
|
61
|
-
}
|
|
62
|
-
});
|
|
63
|
-
handleAfterInitEvent(null, props.pageContext, props.configure, {
|
|
64
|
-
componentRef: thisRef.value,
|
|
65
|
-
tabsDom,
|
|
66
|
-
entity: props.pageContext.entity.data,
|
|
67
|
-
pageData: props.pageContext.entity.page
|
|
68
|
-
});
|
|
69
|
-
});
|
|
70
|
-
});
|
|
71
|
-
return (_ctx, _cache) => {
|
|
72
|
-
return openBlock(), createBlock(unref(ElTabs), {
|
|
73
|
-
ref_key: "thisRef",
|
|
74
|
-
ref: thisRef,
|
|
75
|
-
modelValue: activeName.value,
|
|
76
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => activeName.value = $event),
|
|
77
|
-
type: _ctx.configure.props.cardType,
|
|
78
|
-
"tab-position": _ctx.configure.props.tabPosition,
|
|
79
|
-
style: normalizeStyle(unref(runtimeStyle)),
|
|
80
|
-
class: normalizeClass(unref(runtimeClass)),
|
|
81
|
-
onTabClick: tabClick,
|
|
82
|
-
onTabChange: tabChange,
|
|
83
|
-
onTabRemove: tabRemove,
|
|
84
|
-
onTabAdd: tabAdd,
|
|
85
|
-
onEdit: tabEdit
|
|
86
|
-
}, {
|
|
87
|
-
default: withCtx(() => [
|
|
88
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.configure.items, (item, index) => {
|
|
89
|
-
return openBlock(), createBlock(unref(ElTabPane), {
|
|
90
|
-
label: item.label,
|
|
91
|
-
name: item.index
|
|
92
|
-
}, {
|
|
93
|
-
label: withCtx(() => [
|
|
94
|
-
createElementVNode("span", {
|
|
95
|
-
class: normalizeClass(item.code)
|
|
96
|
-
}, [
|
|
97
|
-
item.iconType && item.iconValue ? (openBlock(), createBlock(unref(SuperIcon), {
|
|
98
|
-
key: 0,
|
|
99
|
-
iconType: item.iconType,
|
|
100
|
-
iconValue: item.iconValue,
|
|
101
|
-
style: { "margin-right": "2px" }
|
|
102
|
-
}, null, 8, ["iconType", "iconValue"])) : createCommentVNode("", true),
|
|
103
|
-
createElementVNode("span", {
|
|
104
|
-
style: normalizeStyle(unref(headerStyle))
|
|
105
|
-
}, toDisplayString(unref($t)(item.label)), 5)
|
|
106
|
-
], 2)
|
|
107
|
-
]),
|
|
108
|
-
default: withCtx(() => [
|
|
109
|
-
createElementVNode("div", null, [
|
|
110
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(item.items, (element, itemIndex) => {
|
|
111
|
-
return openBlock(), createBlock(_sfc_main$1, {
|
|
112
|
-
key: element.uuid,
|
|
113
|
-
pageContext: _ctx.pageContext,
|
|
114
|
-
configure: element
|
|
115
|
-
}, null, 8, ["pageContext", "configure"]);
|
|
116
|
-
}), 128))
|
|
117
|
-
])
|
|
118
|
-
]),
|
|
119
|
-
_: 2
|
|
120
|
-
}, 1032, ["label", "name"]);
|
|
121
|
-
}), 256))
|
|
122
|
-
]),
|
|
123
|
-
_: 1
|
|
124
|
-
}, 8, ["modelValue", "type", "tab-position", "style", "class"]);
|
|
125
|
-
};
|
|
1
|
+
import { defineComponent as e, ref as t, onMounted as n, nextTick as o, openBlock as a, createBlock as i, unref as l, normalizeStyle as u, normalizeClass as r, withCtx as c, createElementBlock as p, Fragment as s, renderList as g, createElementVNode as f, createCommentVNode as m, toDisplayString as d } from "vue";
|
|
2
|
+
import { ElTabs as b, ElTabPane as y } from "element-plus";
|
|
3
|
+
import x from "../../object-render.vue.js";
|
|
4
|
+
import { SuperIcon as C } from "agilebuilder-ui";
|
|
5
|
+
import { handleAfterInitEvent as v, handleEvent as T } from "../../../../utils/events/event-util.js";
|
|
6
|
+
import { $t as h } from "../../../../utils/i18n-util.js";
|
|
7
|
+
const V = e({ __name: "tabs-runtime", props: { pageContext: {}, configure: {} }, setup(e2) {
|
|
8
|
+
const V2 = e2, k = t(null);
|
|
9
|
+
k.value = V2.configure.props.defaultOpen ? V2.configure.props.defaultOpen : 1;
|
|
10
|
+
const _ = t(null), j = V2.configure.runtime ? V2.configure.runtime : {}, N = j.style, R = j.class, D = j.headerStyle;
|
|
11
|
+
function E(e3, t2) {
|
|
12
|
+
const n2 = { pane: e3, ev: t2 }, o2 = e3.paneName;
|
|
13
|
+
return V2.pageContext.activeTab = o2, V2.pageContext.activeLabel = n2.label, T(o2, V2.pageContext, V2.configure, "tab-click", n2);
|
|
14
|
+
}
|
|
15
|
+
function O(e3) {
|
|
16
|
+
const t2 = { paneName: e3 };
|
|
17
|
+
return V2.pageContext.activeTab = e3, T(e3, V2.pageContext, V2.configure, "tab-change", t2);
|
|
18
|
+
}
|
|
19
|
+
function S(e3) {
|
|
20
|
+
const t2 = { paneName: e3 };
|
|
21
|
+
return T(e3, V2.pageContext, V2.configure, "tab-remove", t2);
|
|
126
22
|
}
|
|
127
|
-
|
|
23
|
+
function q() {
|
|
24
|
+
return T(null, V2.pageContext, V2.configure, "tab-add");
|
|
25
|
+
}
|
|
26
|
+
function A(e3, t2) {
|
|
27
|
+
const n2 = { paneName: e3, action: t2 };
|
|
28
|
+
return T(e3, V2.pageContext, V2.configure, "edit", n2);
|
|
29
|
+
}
|
|
30
|
+
return n(() => {
|
|
31
|
+
o(() => {
|
|
32
|
+
let e3 = [];
|
|
33
|
+
V2.configure.items.forEach((t2) => {
|
|
34
|
+
t2.code && e3.push(document.querySelector("." + t2.code));
|
|
35
|
+
}), v(null, V2.pageContext, V2.configure, { componentRef: _.value, tabsDom: e3, entity: V2.pageContext.entity.data, pageData: V2.pageContext.entity.page });
|
|
36
|
+
});
|
|
37
|
+
}), (e3, t2) => (a(), i(l(b), { ref_key: "thisRef", ref: _, modelValue: k.value, "onUpdate:modelValue": t2[0] || (t2[0] = (e4) => k.value = e4), type: e3.configure.props.cardType, "tab-position": e3.configure.props.tabPosition, style: u(l(N)), class: r(l(R)), onTabClick: E, onTabChange: O, onTabRemove: S, onTabAdd: q, onEdit: A }, { default: c(() => [(a(true), p(s, null, g(e3.configure.items, (t3, n2) => (a(), i(l(y), { label: t3.label, name: t3.index }, { label: c(() => [f("span", { class: r(t3.code) }, [t3.iconType && t3.iconValue ? (a(), i(l(C), { key: 0, iconType: t3.iconType, iconValue: t3.iconValue, style: { "margin-right": "2px" } }, null, 8, ["iconType", "iconValue"])) : m("", true), f("span", { style: u(l(D)) }, d(l(h)(t3.label)), 5)], 2)]), default: c(() => [f("div", null, [(a(true), p(s, null, g(t3.items, (t4, n3) => (a(), i(x, { key: t4.uuid, pageContext: e3.pageContext, configure: t4 }, null, 8, ["pageContext", "configure"]))), 128))])]), _: 2 }, 1032, ["label", "name"]))), 256))]), _: 1 }, 8, ["modelValue", "type", "tab-position", "style", "class"]));
|
|
38
|
+
} });
|
|
128
39
|
export {
|
|
129
|
-
|
|
40
|
+
V as default
|
|
130
41
|
};
|
|
@@ -1,82 +1,34 @@
|
|
|
1
|
-
import { defineComponent, ref, onMounted, nextTick, onUnmounted, openBlock, createElementBlock, createElementVNode, normalizeClass, unref, normalizeStyle, Fragment, renderList, createBlock } from "vue";
|
|
2
|
-
import
|
|
1
|
+
import { defineComponent as e, ref as t, onMounted as o, nextTick as n, onUnmounted as i, openBlock as a, createElementBlock as r, createElementVNode as s, normalizeClass as u, unref as l, normalizeStyle as p, Fragment as g, renderList as c, createBlock as f } from "vue";
|
|
2
|
+
import d from "../../object-render.vue.js";
|
|
3
3
|
import "../../../../utils/global-refs.js";
|
|
4
|
-
import { handleAfterInitEvent } from "../../../../utils/events/event-util.js";
|
|
5
|
-
const
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
caculatePositionStyle();
|
|
22
|
-
});
|
|
23
|
-
resizeObserver2.observe(thisRef.value.parentNode);
|
|
24
|
-
}
|
|
25
|
-
nextTick(() => {
|
|
26
|
-
handleAfterInitEvent(null, props.pageContext, props.configure, {
|
|
27
|
-
componentRef: thisRef.value,
|
|
28
|
-
entity: props.pageContext.entity.data,
|
|
29
|
-
pageData: props.pageContext.entity.page
|
|
30
|
-
});
|
|
31
|
-
});
|
|
32
|
-
});
|
|
33
|
-
onUnmounted(() => {
|
|
34
|
-
});
|
|
35
|
-
function caculatePositionStyle() {
|
|
36
|
-
if (thisRef.value && thisRef.value.parentNode) {
|
|
37
|
-
const thisProps = props.configure.props;
|
|
38
|
-
const position = thisProps.position;
|
|
39
|
-
if (position == "top1" || position == "bottom1") {
|
|
40
|
-
const tempStyle = {};
|
|
41
|
-
tempStyle["position"] = "fixed !important";
|
|
42
|
-
tempStyle["z-index"] = "1";
|
|
43
|
-
const contentObj = [thisRef.value.parentNode];
|
|
44
|
-
if (contentObj && contentObj.length > 0) {
|
|
45
|
-
const contentRec = contentObj[0].getBoundingClientRect();
|
|
46
|
-
if (position == "top") {
|
|
47
|
-
tempStyle["top"] = contentRec.top + "px";
|
|
48
|
-
}
|
|
49
|
-
if (position == "bottom") {
|
|
50
|
-
tempStyle["bottom"] = "10px";
|
|
4
|
+
import { handleAfterInitEvent as m } from "../../../../utils/events/event-util.js";
|
|
5
|
+
const v = { class: "amb-widget-tools-parent" }, x = e({ __name: "tools-runtime", props: { pageContext: {}, configure: {} }, setup(e2) {
|
|
6
|
+
const x2 = e2, b = t(null), C = x2.configure.runtime ? x2.configure.runtime : {}, y = t(C.style ? C.style : {}), w = C.class;
|
|
7
|
+
return o(() => {
|
|
8
|
+
if (b.value && b.value.parentNode) {
|
|
9
|
+
new ResizeObserver((e3) => {
|
|
10
|
+
!function() {
|
|
11
|
+
if (b.value && b.value.parentNode) {
|
|
12
|
+
const e4 = x2.configure.props.position;
|
|
13
|
+
if ("top1" == e4 || "bottom1" == e4) {
|
|
14
|
+
const t2 = { position: "fixed !important", "z-index": "1" }, o2 = [b.value.parentNode];
|
|
15
|
+
if (o2 && o2.length > 0) {
|
|
16
|
+
const n3 = o2[0].getBoundingClientRect();
|
|
17
|
+
"top" == e4 && (t2.top = n3.top + "px"), "bottom" == e4 && (t2.bottom = "10px");
|
|
18
|
+
}
|
|
19
|
+
const n2 = b.value.parentNode.getBoundingClientRect();
|
|
20
|
+
t2.width = n2.width - 25 + "px", Object.assign(y.value, t2);
|
|
51
21
|
}
|
|
52
22
|
}
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
tempStyle["width"] = parentRec.width - 25 + "px";
|
|
56
|
-
Object.assign(runtimeStyle.value, tempStyle);
|
|
57
|
-
}
|
|
58
|
-
}
|
|
23
|
+
}();
|
|
24
|
+
}).observe(b.value.parentNode);
|
|
59
25
|
}
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
ref: thisRef
|
|
67
|
-
}, [
|
|
68
|
-
(openBlock(true), createElementBlock(Fragment, null, renderList(_ctx.configure.items, (element, itemIndex) => {
|
|
69
|
-
return openBlock(), createBlock(_sfc_main$1, {
|
|
70
|
-
key: element.uuid,
|
|
71
|
-
pageContext: _ctx.pageContext,
|
|
72
|
-
configure: element
|
|
73
|
-
}, null, 8, ["pageContext", "configure"]);
|
|
74
|
-
}), 128))
|
|
75
|
-
], 6)
|
|
76
|
-
]);
|
|
77
|
-
};
|
|
78
|
-
}
|
|
79
|
-
});
|
|
26
|
+
n(() => {
|
|
27
|
+
m(null, x2.pageContext, x2.configure, { componentRef: b.value, entity: x2.pageContext.entity.data, pageData: x2.pageContext.entity.page });
|
|
28
|
+
});
|
|
29
|
+
}), i(() => {
|
|
30
|
+
}), (e3, t2) => (a(), r("div", v, [s("div", { class: u(["amb-widget-container-tool amb-widget-tools", l(w)]), style: p(y.value), ref_key: "thisRef", ref: b }, [(a(true), r(g, null, c(e3.configure.items, (t3, o2) => (a(), f(d, { key: t3.uuid, pageContext: e3.pageContext, configure: t3 }, null, 8, ["pageContext", "configure"]))), 128))], 6)]));
|
|
31
|
+
} });
|
|
80
32
|
export {
|
|
81
|
-
|
|
33
|
+
x as default
|
|
82
34
|
};
|
|
@@ -1,184 +1,67 @@
|
|
|
1
|
-
import { defineComponent, computed, ref, onMounted, watch, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createElementBlock, toDisplayString, createCommentVNode } from "vue";
|
|
2
|
-
import
|
|
3
|
-
import
|
|
4
|
-
import { getFormModelFields } from "../../../../utils/page-init-util.js";
|
|
5
|
-
import { generateCodeByRule } from "../../../../utils/barcode-util.js";
|
|
6
|
-
import { getVariableValue, setVariableValue } from "../../../../utils/page-helper-util.js";
|
|
7
|
-
import { handleEvent } from "../../../../utils/events/event-util.js";
|
|
8
|
-
import
|
|
9
|
-
import { $t } from "../../../../utils/i18n-util.js";
|
|
10
|
-
const
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
}
|
|
28
|
-
});
|
|
29
|
-
const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
|
|
30
|
-
const designProperty = ref(runtimeInfo.props ? runtimeInfo.props : {});
|
|
31
|
-
const runtimeStyle = runtimeInfo.style;
|
|
32
|
-
const runtimeClass = runtimeInfo.class;
|
|
33
|
-
const headerStyle = runtimeInfo.headerStyle;
|
|
34
|
-
const qrUrl = ref("");
|
|
35
|
-
const barcode = ref(null);
|
|
36
|
-
const barcodeFormat = ref(designProperty.value.brCodeFormat ?? "CODE128");
|
|
37
|
-
const watchVariableNames = ref([]);
|
|
38
|
-
onMounted(() => {
|
|
39
|
-
if (designProperty.value.generateRule) {
|
|
40
|
-
if (designProperty.value.generateRuleType === "fixed") {
|
|
41
|
-
handleFixedFormat();
|
|
42
|
-
} else {
|
|
43
|
-
handleSelectedRule();
|
|
44
|
-
}
|
|
45
|
-
}
|
|
46
|
-
if (dynamicModelMethod.value) {
|
|
47
|
-
createCode(dynamicModelMethod.value);
|
|
48
|
-
}
|
|
49
|
-
});
|
|
50
|
-
function getValue() {
|
|
51
|
-
return getVariableValue(entity, dynamicFields);
|
|
52
|
-
}
|
|
53
|
-
function setValue(value) {
|
|
54
|
-
return setVariableValue(entity, dynamicFields, value);
|
|
55
|
-
}
|
|
56
|
-
function handleFixedFormat() {
|
|
57
|
-
watchVariableNames.value = Array.from(
|
|
58
|
-
designProperty.value.generateRule.matchAll(/\$\{(\w+)\}/g),
|
|
59
|
-
(m) => m[1]
|
|
60
|
-
);
|
|
61
|
-
watchVariableNames.value.forEach((name) => {
|
|
62
|
-
watch(
|
|
63
|
-
() => props.pageContext.entity.data[name],
|
|
64
|
-
(newValue, oldValue) => {
|
|
65
|
-
if (newValue !== void 0 && newValue !== null) {
|
|
66
|
-
generateFixedFormatCode();
|
|
67
|
-
}
|
|
68
|
-
}
|
|
69
|
-
);
|
|
70
|
-
});
|
|
71
|
-
}
|
|
72
|
-
function handleSelectedRule() {
|
|
73
|
-
http.get(
|
|
74
|
-
window["$vueApp"].config.globalProperties.baseAPI + "/dc/setting-barcode-models/by-code/" + designProperty.value.generateRule
|
|
75
|
-
).then((res) => {
|
|
76
|
-
const rule = JSON.parse(res.barcodeModelItems);
|
|
77
|
-
rule.forEach((item) => {
|
|
78
|
-
if (item.propDbName !== "-1" && item.propDbName !== -1) {
|
|
79
|
-
watchVariableNames.value.push(item.propDbName);
|
|
80
|
-
watch(
|
|
81
|
-
() => props.pageContext.entity.data[item.propDbName],
|
|
82
|
-
(newValue, oldValue) => {
|
|
83
|
-
if (newValue !== void 0 && newValue !== null) {
|
|
84
|
-
const codeValue = generateCodeByRule(rule, props.pageContext.entity.data);
|
|
85
|
-
if (codeValue) {
|
|
86
|
-
generateCode(codeValue);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
);
|
|
91
|
-
}
|
|
92
|
-
});
|
|
93
|
-
}).catch((error) => {
|
|
94
|
-
console.error("获取条码规则失败:", error);
|
|
95
|
-
});
|
|
96
|
-
}
|
|
97
|
-
function generateFixedFormatCode() {
|
|
98
|
-
let allVariablesPresent = true;
|
|
99
|
-
watchVariableNames.value.forEach((name) => {
|
|
100
|
-
if (!props.pageContext.entity.data[name]) {
|
|
101
|
-
allVariablesPresent = false;
|
|
102
|
-
return;
|
|
103
|
-
}
|
|
104
|
-
});
|
|
105
|
-
if (allVariablesPresent) {
|
|
106
|
-
let barCodeValue = replaceVariables(
|
|
107
|
-
designProperty.value.generateRule,
|
|
108
|
-
props.pageContext.entity.data
|
|
109
|
-
);
|
|
110
|
-
generateCode(barCodeValue);
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
function generateCode(value) {
|
|
114
|
-
createCode(value);
|
|
115
|
-
setValue(value);
|
|
116
|
-
handleEvent(value, props.pageContext, props.configure, "change", {
|
|
117
|
-
entity
|
|
118
|
-
});
|
|
119
|
-
}
|
|
120
|
-
function createCode(value) {
|
|
121
|
-
if (designProperty.value.type === "QR-code") {
|
|
122
|
-
createQrCode(value);
|
|
123
|
-
} else {
|
|
124
|
-
createBarCode(value);
|
|
125
|
-
}
|
|
126
|
-
}
|
|
127
|
-
function createBarCode(codeValue) {
|
|
1
|
+
import { defineComponent as e, computed as t, ref as a, onMounted as r, watch as l, resolveComponent as o, openBlock as u, createBlock as n, normalizeClass as i, unref as s, normalizeStyle as p, withCtx as c, createElementBlock as m, toDisplayString as f, createCommentVNode as g } from "vue";
|
|
2
|
+
import d from "qrcode";
|
|
3
|
+
import v from "jsbarcode";
|
|
4
|
+
import { getFormModelFields as y } from "../../../../utils/page-init-util.js";
|
|
5
|
+
import { generateCodeByRule as b } from "../../../../utils/barcode-util.js";
|
|
6
|
+
import { getVariableValue as h, setVariableValue as x } from "../../../../utils/page-helper-util.js";
|
|
7
|
+
import { handleEvent as C } from "../../../../utils/events/event-util.js";
|
|
8
|
+
import w from "agilebuilder-ui/src/utils/request";
|
|
9
|
+
import { $t as R } from "../../../../utils/i18n-util.js";
|
|
10
|
+
const j = ["src"], D = e({ __name: "barcode-runtime", props: { pageContext: {}, configure: {} }, setup(e2, { expose: D2 }) {
|
|
11
|
+
const q = e2, N = q.pageContext.entity ? q.pageContext.entity : {};
|
|
12
|
+
let k = y(q.pageContext, q.configure);
|
|
13
|
+
const A = t({ get: () => h(N, k), set(e3) {
|
|
14
|
+
x(N, k, e3);
|
|
15
|
+
} }), E = q.configure.runtime ? q.configure.runtime : {}, _ = a(E.props ? E.props : {}), O = E.style, P = E.class, S = E.headerStyle, $ = a(""), I = a(null), Q = a(_.value.brCodeFormat ?? "CODE128"), V = a([]);
|
|
16
|
+
function F(e3) {
|
|
17
|
+
return x(N, k, e3);
|
|
18
|
+
}
|
|
19
|
+
function J(e3) {
|
|
20
|
+
L(e3), F(e3), C(e3, q.pageContext, q.configure, "change", { entity: N });
|
|
21
|
+
}
|
|
22
|
+
function L(e3) {
|
|
23
|
+
var t2;
|
|
24
|
+
"QR-code" === _.value.type ? (t2 = e3, d.toDataURL(t2, (e4, t3) => {
|
|
25
|
+
e4 || ($.value = t3);
|
|
26
|
+
})) : function(e4) {
|
|
128
27
|
try {
|
|
129
|
-
|
|
130
|
-
} catch (
|
|
131
|
-
console.error("生成条形码时发生错误:", error);
|
|
28
|
+
v(I.value, e4, { format: Q.value });
|
|
29
|
+
} catch (e5) {
|
|
132
30
|
}
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
31
|
+
}(e3);
|
|
32
|
+
}
|
|
33
|
+
return r(() => {
|
|
34
|
+
_.value.generateRule && ("fixed" === _.value.generateRuleType ? (V.value = Array.from(_.value.generateRule.matchAll(/\$\{(\w+)\}/g), (e3) => e3[1]), V.value.forEach((e3) => {
|
|
35
|
+
l(() => q.pageContext.entity.data[e3], (e4, t2) => {
|
|
36
|
+
null != e4 && function() {
|
|
37
|
+
let e5 = true;
|
|
38
|
+
V.value.forEach((t3) => {
|
|
39
|
+
q.pageContext.entity.data[t3] || (e5 = false);
|
|
40
|
+
}), e5 && J(function(e6, t3) {
|
|
41
|
+
const a2 = /\$\{(\w+)\}/g;
|
|
42
|
+
return e6.replace(a2, (e7, a3) => t3.hasOwnProperty(a3) ? t3[a3] : e7);
|
|
43
|
+
}(_.value.generateRule, q.pageContext.entity.data));
|
|
44
|
+
}();
|
|
141
45
|
});
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
46
|
+
})) : w.get(window.$vueApp.config.globalProperties.baseAPI + "/dc/setting-barcode-models/by-code/" + _.value.generateRule).then((e3) => {
|
|
47
|
+
const t2 = JSON.parse(e3.barcodeModelItems);
|
|
48
|
+
t2.forEach((e4) => {
|
|
49
|
+
"-1" !== e4.propDbName && -1 !== e4.propDbName && (V.value.push(e4.propDbName), l(() => q.pageContext.entity.data[e4.propDbName], (e5, a2) => {
|
|
50
|
+
if (null != e5) {
|
|
51
|
+
const e6 = b(t2, q.pageContext.entity.data);
|
|
52
|
+
e6 && J(e6);
|
|
53
|
+
}
|
|
54
|
+
}));
|
|
147
55
|
});
|
|
148
|
-
}
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
class: normalizeClass(unref(runtimeClass)),
|
|
158
|
-
"label-width": designProperty.value.labelWidth,
|
|
159
|
-
style: normalizeStyle(unref(runtimeStyle))
|
|
160
|
-
}, {
|
|
161
|
-
label: withCtx(() => [
|
|
162
|
-
designProperty.value.tittleShow ? (openBlock(), createElementBlock("div", {
|
|
163
|
-
key: 0,
|
|
164
|
-
style: normalizeStyle({ ...unref(headerStyle) })
|
|
165
|
-
}, toDisplayString(unref($t)(designProperty.value.title)), 5)) : createCommentVNode("", true)
|
|
166
|
-
]),
|
|
167
|
-
default: withCtx(() => [
|
|
168
|
-
designProperty.value.type === "QR-code" ? (openBlock(), createElementBlock("img", {
|
|
169
|
-
key: 0,
|
|
170
|
-
src: qrUrl.value
|
|
171
|
-
}, null, 8, _hoisted_1)) : (openBlock(), createElementBlock("canvas", {
|
|
172
|
-
key: 1,
|
|
173
|
-
ref_key: "barcode",
|
|
174
|
-
ref: barcode
|
|
175
|
-
}, null, 512))
|
|
176
|
-
]),
|
|
177
|
-
_: 1
|
|
178
|
-
}, 8, ["required", "class", "label-width", "style"]);
|
|
179
|
-
};
|
|
180
|
-
}
|
|
181
|
-
});
|
|
56
|
+
}).catch((e3) => {
|
|
57
|
+
})), A.value && L(A.value);
|
|
58
|
+
}), D2({ getValue: function() {
|
|
59
|
+
return h(N, k);
|
|
60
|
+
}, setValue: F }), (e3, t2) => {
|
|
61
|
+
const a2 = o("el-form-item");
|
|
62
|
+
return u(), n(a2, { required: !!_.value.required, class: i(s(P)), "label-width": _.value.labelWidth, style: p(s(O)) }, { label: c(() => [_.value.tittleShow ? (u(), m("div", { key: 0, style: p({ ...s(S) }) }, f(s(R)(_.value.title)), 5)) : g("", true)]), default: c(() => ["QR-code" === _.value.type ? (u(), m("img", { key: 0, src: $.value }, null, 8, j)) : (u(), m("canvas", { key: 1, ref_key: "barcode", ref: I }, null, 512))]), _: 1 }, 8, ["required", "class", "label-width", "style"]);
|
|
63
|
+
};
|
|
64
|
+
} });
|
|
182
65
|
export {
|
|
183
|
-
|
|
66
|
+
D as default
|
|
184
67
|
};
|