super-page-runtime 2.1.933 → 2.2.0
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 -300
- 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 +838 -2285
- package/dist/es/components/runtime/utils/events/validator-util.js +237 -536
- 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 +298 -628
- package/dist/es/components/runtime/utils/page-init-util.js +134 -368
- 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 -512
- 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 -215
- 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 +5 -5
- package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue2.js +13 -50
- package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue3.js +1 -0
- 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 +233 -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,96 +1,37 @@
|
|
|
1
|
-
function
|
|
2
|
-
if (!
|
|
3
|
-
return
|
|
1
|
+
function e(e2, t, n) {
|
|
2
|
+
if (!e2)
|
|
3
|
+
return;
|
|
4
|
+
const a = [];
|
|
5
|
+
if (e2.includes("today") && !["week", "month", "year"].includes(t)) {
|
|
6
|
+
const e3 = { text: "今天", value: () => /* @__PURE__ */ new Date() };
|
|
7
|
+
n.endsWith("range") && (e3.value = () => [/* @__PURE__ */ new Date(), /* @__PURE__ */ new Date()]), a.push(e3);
|
|
4
8
|
}
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
return /* @__PURE__ */ new Date();
|
|
11
|
-
}
|
|
12
|
-
};
|
|
13
|
-
if (rangeType.endsWith("range")) {
|
|
14
|
-
dateParams.value = () => {
|
|
15
|
-
return [/* @__PURE__ */ new Date(), /* @__PURE__ */ new Date()];
|
|
16
|
-
};
|
|
17
|
-
}
|
|
18
|
-
shortcuts.push(dateParams);
|
|
9
|
+
if (e2.includes("yesterday") && !["week", "month", "year"].includes(t)) {
|
|
10
|
+
const e3 = /* @__PURE__ */ new Date();
|
|
11
|
+
e3.setTime(e3.getTime() - 864e5);
|
|
12
|
+
const t2 = { text: "昨天", value: () => e3 };
|
|
13
|
+
n.endsWith("range") && (t2.value = () => [e3, /* @__PURE__ */ new Date()]), a.push(t2);
|
|
19
14
|
}
|
|
20
|
-
if (
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
const
|
|
24
|
-
|
|
25
|
-
value: () => {
|
|
26
|
-
return date;
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
if (rangeType.endsWith("range")) {
|
|
30
|
-
dateParams.value = () => {
|
|
31
|
-
return [date, /* @__PURE__ */ new Date()];
|
|
32
|
-
};
|
|
33
|
-
}
|
|
34
|
-
shortcuts.push(dateParams);
|
|
15
|
+
if (e2.includes("oneWeek") && !["month", "year"].includes(t)) {
|
|
16
|
+
const e3 = /* @__PURE__ */ new Date();
|
|
17
|
+
e3.setTime(e3.getTime() - 6048e5);
|
|
18
|
+
const t2 = { text: "一周前", value: () => e3 };
|
|
19
|
+
n.endsWith("range") && (t2.text = "一周", t2.value = () => [e3, /* @__PURE__ */ new Date()]), a.push(t2);
|
|
35
20
|
}
|
|
36
|
-
if (
|
|
37
|
-
const
|
|
38
|
-
|
|
39
|
-
const
|
|
40
|
-
|
|
41
|
-
value: () => {
|
|
42
|
-
return date;
|
|
43
|
-
}
|
|
44
|
-
};
|
|
45
|
-
if (rangeType.endsWith("range")) {
|
|
46
|
-
dateParams.text = "一周";
|
|
47
|
-
dateParams.value = () => {
|
|
48
|
-
return [date, /* @__PURE__ */ new Date()];
|
|
49
|
-
};
|
|
50
|
-
}
|
|
51
|
-
shortcuts.push(dateParams);
|
|
21
|
+
if (e2.includes("oneMonth") && !["year"].includes(t)) {
|
|
22
|
+
const e3 = /* @__PURE__ */ new Date();
|
|
23
|
+
e3.getMonth() > 0 ? e3.setMonth(e3.getMonth() - 1) : (e3.setMonth(12), e3.setFullYear(e3.getFullYear() - 1));
|
|
24
|
+
const t2 = { text: "一月前", value: () => e3 };
|
|
25
|
+
n.endsWith("range") && (t2.text = "一月", t2.value = () => [e3, /* @__PURE__ */ new Date()]), a.push(t2);
|
|
52
26
|
}
|
|
53
|
-
if (
|
|
54
|
-
const
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
date.setMonth(12);
|
|
59
|
-
date.setFullYear(date.getFullYear() - 1);
|
|
60
|
-
}
|
|
61
|
-
const dateParams = {
|
|
62
|
-
text: "一月前",
|
|
63
|
-
value: () => {
|
|
64
|
-
return date;
|
|
65
|
-
}
|
|
66
|
-
};
|
|
67
|
-
if (rangeType.endsWith("range")) {
|
|
68
|
-
dateParams.text = "一月";
|
|
69
|
-
dateParams.value = () => {
|
|
70
|
-
return [date, /* @__PURE__ */ new Date()];
|
|
71
|
-
};
|
|
72
|
-
}
|
|
73
|
-
shortcuts.push(dateParams);
|
|
27
|
+
if (e2.includes("oneYear")) {
|
|
28
|
+
const e3 = /* @__PURE__ */ new Date();
|
|
29
|
+
e3.setFullYear(e3.getFullYear() - 1);
|
|
30
|
+
const t2 = { text: "一年前", value: () => e3 };
|
|
31
|
+
n.endsWith("range") && (t2.text = "一年", t2.value = () => [e3, /* @__PURE__ */ new Date()]), a.push(t2);
|
|
74
32
|
}
|
|
75
|
-
|
|
76
|
-
const date = /* @__PURE__ */ new Date();
|
|
77
|
-
date.setFullYear(date.getFullYear() - 1);
|
|
78
|
-
const dateParams = {
|
|
79
|
-
text: "一年前",
|
|
80
|
-
value: () => {
|
|
81
|
-
return date;
|
|
82
|
-
}
|
|
83
|
-
};
|
|
84
|
-
if (rangeType.endsWith("range")) {
|
|
85
|
-
dateParams.text = "一年";
|
|
86
|
-
dateParams.value = () => {
|
|
87
|
-
return [date, /* @__PURE__ */ new Date()];
|
|
88
|
-
};
|
|
89
|
-
}
|
|
90
|
-
shortcuts.push(dateParams);
|
|
91
|
-
}
|
|
92
|
-
return shortcuts;
|
|
33
|
+
return a;
|
|
93
34
|
}
|
|
94
35
|
export {
|
|
95
|
-
getDateShortCuts
|
|
36
|
+
e as getDateShortCuts
|
|
96
37
|
};
|
|
@@ -1,190 +1,96 @@
|
|
|
1
1
|
import http from "agilebuilder-ui/src/utils/request";
|
|
2
2
|
import { setValueForVariableName } from "../page-helper-util.js";
|
|
3
|
-
function formatScanRuleSets(
|
|
4
|
-
const
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
}
|
|
11
|
-
scanRuleSets2[valueSet.ruleCode].outs.push(valueSet);
|
|
12
|
-
});
|
|
13
|
-
} else {
|
|
14
|
-
scanRuleSets2[ruleSet.code] = { outs: ruleSet.outs, adaptations: [] };
|
|
15
|
-
}
|
|
16
|
-
});
|
|
17
|
-
return packageScanRuleSets(scanRuleSets2);
|
|
3
|
+
function formatScanRuleSets(e) {
|
|
4
|
+
const t = {};
|
|
5
|
+
return e.forEach((e2) => {
|
|
6
|
+
"group" === e2.type ? e2.outs.forEach((e3) => {
|
|
7
|
+
t[e3.ruleCode] || (t[e3.ruleCode] = { outs: [], adaptations: [] }), t[e3.ruleCode].outs.push(e3);
|
|
8
|
+
}) : t[e2.code] = { outs: e2.outs, adaptations: [] };
|
|
9
|
+
}), packageScanRuleSets(t);
|
|
18
10
|
}
|
|
19
|
-
function packageScanRuleSets(
|
|
20
|
-
return new Promise((
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
res2.forEach((rule) => {
|
|
27
|
-
const ruleOuts = JSON.parse(rule.barcodeAnalysisOuts);
|
|
28
|
-
const needOutsFields = /* @__PURE__ */ new Set();
|
|
29
|
-
const outsFiledsSet = {};
|
|
30
|
-
scanRuleSets2[rule.code].outs.forEach((valueSet) => {
|
|
31
|
-
needOutsFields.add(valueSet.returnedValue);
|
|
32
|
-
outsFiledsSet[valueSet.returnedValue] = valueSet.pageVariable;
|
|
33
|
-
});
|
|
34
|
-
const filteredOutsField = [];
|
|
35
|
-
ruleOuts.forEach((outFiled) => {
|
|
36
|
-
if (needOutsFields.has(outFiled.code)) {
|
|
37
|
-
outFiled.pageVariable = outsFiledsSet[outFiled.code];
|
|
38
|
-
filteredOutsField.push(outFiled);
|
|
39
|
-
}
|
|
40
|
-
});
|
|
41
|
-
scanRuleSets2[rule.code].outs = filteredOutsField;
|
|
42
|
-
scanRuleSets2[rule.code].adaptations = JSON.parse(rule.barcodeAnalysisAdaptations);
|
|
43
|
-
resolve(scanRuleSets2);
|
|
11
|
+
function packageScanRuleSets(e) {
|
|
12
|
+
return new Promise((t, a) => {
|
|
13
|
+
Object.keys(e).length > 0 ? http.post(window.$vueApp.config.globalProperties.baseAPI + "/dc/setting-barcode-analysis/by-codes", Object.keys(e)).then((a2) => {
|
|
14
|
+
a2.forEach((a3) => {
|
|
15
|
+
const s = JSON.parse(a3.barcodeAnalysisOuts), n = /* @__PURE__ */ new Set(), l = {};
|
|
16
|
+
e[a3.code].outs.forEach((e2) => {
|
|
17
|
+
n.add(e2.returnedValue), l[e2.returnedValue] = e2.pageVariable;
|
|
44
18
|
});
|
|
19
|
+
const i2 = [];
|
|
20
|
+
s.forEach((e2) => {
|
|
21
|
+
n.has(e2.code) && (e2.pageVariable = l[e2.code], i2.push(e2));
|
|
22
|
+
}), e[a3.code].outs = i2, e[a3.code].adaptations = JSON.parse(a3.barcodeAnalysisAdaptations), t(e);
|
|
45
23
|
});
|
|
46
|
-
}
|
|
47
|
-
resolve(null);
|
|
48
|
-
}
|
|
24
|
+
}) : t(null);
|
|
49
25
|
});
|
|
50
26
|
}
|
|
51
27
|
function analysisScanValue(scanValue, scanRuleSets) {
|
|
52
|
-
if (!scanValue)
|
|
28
|
+
if (!scanValue)
|
|
53
29
|
return null;
|
|
54
|
-
}
|
|
55
30
|
const scanSets = Object.values(scanRuleSets);
|
|
56
31
|
for (let i = 0; i < scanSets.length; i++) {
|
|
57
|
-
const scanSet = scanSets[i];
|
|
58
|
-
const adaptations = scanSet.adaptations;
|
|
32
|
+
const scanSet = scanSets[i], adaptations = scanSet.adaptations;
|
|
59
33
|
let validStr = "";
|
|
60
|
-
for (let
|
|
61
|
-
const
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
let compareValue = adap.value;
|
|
67
|
-
let operate = adap.operate;
|
|
68
|
-
if (operate == "times") {
|
|
69
|
-
const realValue = paramValue.split(compareValue == void 0 ? "" : compareValue).length - 1;
|
|
70
|
-
compareValue = realValue;
|
|
71
|
-
paramValue = adap.times;
|
|
72
|
-
operate = "=";
|
|
73
|
-
}
|
|
74
|
-
if (isNaN(paramValue) || isNaN(compareValue)) {
|
|
75
|
-
paramValue = "'" + paramValue + "'";
|
|
76
|
-
compareValue = "'" + compareValue + "'";
|
|
77
|
-
}
|
|
78
|
-
if (adap.leftBracket) {
|
|
79
|
-
validStr += adap.leftBracket;
|
|
80
|
-
}
|
|
81
|
-
if (operate == "<>") {
|
|
82
|
-
operate = "!=";
|
|
83
|
-
} else if (operate == "=") {
|
|
84
|
-
operate = "==";
|
|
34
|
+
for (let e = 0; e < adaptations.length; e++) {
|
|
35
|
+
const t = adaptations[e], a = _getScanIndexs(scanValue, t.startIndex, t.endIndex), s = a[0], n = a[1];
|
|
36
|
+
let l = scanValue.substring(s, n), i2 = t.value, r = t.operate;
|
|
37
|
+
if ("times" == r) {
|
|
38
|
+
const e2 = l.split(null == i2 ? "" : i2).length - 1;
|
|
39
|
+
i2 = e2, l = t.times, r = "=";
|
|
85
40
|
}
|
|
86
|
-
if (
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
validStr += ">-1";
|
|
90
|
-
} else {
|
|
91
|
-
validStr += "<0";
|
|
92
|
-
}
|
|
93
|
-
} else {
|
|
94
|
-
validStr += paramValue + operate + compareValue;
|
|
95
|
-
}
|
|
96
|
-
if (adap.rightBracket) {
|
|
97
|
-
validStr += adap.rightBracket;
|
|
98
|
-
}
|
|
99
|
-
if (adap.joinStr && k + 1 < adaptations.length) {
|
|
100
|
-
const joinStr = adap.joinStr == "and" ? "&&" : "||";
|
|
101
|
-
validStr += joinStr;
|
|
41
|
+
if ((isNaN(l) || isNaN(i2)) && (l = "'" + l + "'", i2 = "'" + i2 + "'"), t.leftBracket && (validStr += t.leftBracket), "<>" == r ? r = "!=" : "=" == r && (r = "=="), "include" == r || "notinclude" == r ? (validStr += l + ".indexOf(" + i2 + ")", validStr += "include" == r ? ">-1" : "<0") : validStr += l + r + i2, t.rightBracket && (validStr += t.rightBracket), t.joinStr && e + 1 < adaptations.length) {
|
|
42
|
+
const e2 = "and" == t.joinStr ? "&&" : "||";
|
|
43
|
+
validStr += e2;
|
|
102
44
|
}
|
|
103
45
|
}
|
|
104
46
|
let res = false;
|
|
105
|
-
if (validStr)
|
|
47
|
+
if (validStr)
|
|
106
48
|
try {
|
|
107
|
-
console.log("validStr", validStr);
|
|
108
49
|
res = eval("(" + validStr + ")");
|
|
109
|
-
console.log("res", res);
|
|
110
50
|
} catch (e) {
|
|
111
|
-
console.log(e);
|
|
112
51
|
}
|
|
113
|
-
|
|
52
|
+
else
|
|
114
53
|
res = true;
|
|
115
|
-
|
|
116
|
-
if (res) {
|
|
54
|
+
if (res)
|
|
117
55
|
return executeAnalysisForScan(scanValue, scanSet);
|
|
118
|
-
}
|
|
119
56
|
}
|
|
120
57
|
return null;
|
|
121
58
|
}
|
|
122
|
-
function executeAnalysisForScan(
|
|
123
|
-
if (!
|
|
59
|
+
function executeAnalysisForScan(e, t) {
|
|
60
|
+
if (!t || !e)
|
|
124
61
|
return;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
const splitChar = outJson.splitChar == "|" ? outJson.splitChar : outJson.splitChar;
|
|
136
|
-
const strs = scanValue2.split(splitChar);
|
|
137
|
-
const splitNum = outJson.splitNum < 1 ? 1 : outJson.splitNum;
|
|
138
|
-
console.log(pValue, splitChar, strs, splitNum);
|
|
139
|
-
if (splitNum <= strs.length) {
|
|
140
|
-
pValue = strs[splitNum - 1];
|
|
141
|
-
} else {
|
|
142
|
-
pValue = "";
|
|
143
|
-
}
|
|
62
|
+
const a = t.outs, s = {};
|
|
63
|
+
return a.forEach((t2) => {
|
|
64
|
+
const a2 = t2.fieldName;
|
|
65
|
+
if (null != t2.fixedValue)
|
|
66
|
+
s[a2] = t2.fixedValue;
|
|
67
|
+
else {
|
|
68
|
+
let n = e;
|
|
69
|
+
if (t2.splitChar && t2.splitNum) {
|
|
70
|
+
const a3 = (t2.splitChar, t2.splitChar), s2 = e.split(a3), l = t2.splitNum < 1 ? 1 : t2.splitNum;
|
|
71
|
+
n = l <= s2.length ? s2[l - 1] : "";
|
|
144
72
|
}
|
|
145
|
-
if (
|
|
146
|
-
const
|
|
147
|
-
|
|
148
|
-
const splitNum2 = outJson.splitNum2 < 1 ? 1 : outJson.splitNum2;
|
|
149
|
-
console.log(pValue, splitChar2, strs, splitNum2);
|
|
150
|
-
if (splitNum2 <= strs.length) {
|
|
151
|
-
pValue = strs[splitNum2 - 1];
|
|
152
|
-
} else {
|
|
153
|
-
pValue = "";
|
|
154
|
-
}
|
|
73
|
+
if (t2.splitChar2 && t2.splitNum2) {
|
|
74
|
+
const e2 = (t2.splitChar2, t2.splitChar2), a3 = n.split(e2), s2 = t2.splitNum2 < 1 ? 1 : t2.splitNum2;
|
|
75
|
+
n = s2 <= a3.length ? a3[s2 - 1] : "";
|
|
155
76
|
}
|
|
156
|
-
if (
|
|
157
|
-
const
|
|
158
|
-
|
|
159
|
-
const endIndex = indexs[1];
|
|
160
|
-
pValue = pValue.substring(startIndex, endIndex);
|
|
77
|
+
if (n.length > 0) {
|
|
78
|
+
const e2 = _getScanIndexs(n, t2.startIndex, t2.endIndex), a3 = e2[0], s2 = e2[1];
|
|
79
|
+
n = n.substring(a3, s2);
|
|
161
80
|
}
|
|
162
|
-
|
|
81
|
+
s[a2] = n;
|
|
163
82
|
}
|
|
164
|
-
});
|
|
165
|
-
return { value: scanValue2, params, scanSet: scanSet2 };
|
|
83
|
+
}), { value: e, params: s, scanSet: t };
|
|
166
84
|
}
|
|
167
|
-
function _getScanIndexs(
|
|
168
|
-
|
|
169
|
-
startIndex = startIndex < 0 ? 0 : startIndex;
|
|
170
|
-
startIndex = startIndex > value.length - 1 ? value.length - 1 : startIndex;
|
|
171
|
-
endIndex = endIndex == void 0 ? value.length : endIndex;
|
|
172
|
-
endIndex = endIndex > value.length ? value.length : endIndex;
|
|
173
|
-
endIndex = endIndex < 1 ? 1 : endIndex;
|
|
174
|
-
if (endIndex < startIndex) {
|
|
175
|
-
endIndex = startIndex;
|
|
176
|
-
}
|
|
177
|
-
return [startIndex, endIndex];
|
|
85
|
+
function _getScanIndexs(e, t, a) {
|
|
86
|
+
return t = (t = (t = null == t ? 0 : t - 1) < 0 ? 0 : t) > e.length - 1 ? e.length - 1 : t, (a = (a = (a = null == a ? e.length : a) > e.length ? e.length : a) < 1 ? 1 : a) < t && (a = t), [t, a];
|
|
178
87
|
}
|
|
179
|
-
function setScanAnalysisValue(
|
|
180
|
-
if (!
|
|
88
|
+
function setScanAnalysisValue(e, t, a) {
|
|
89
|
+
if (!t)
|
|
181
90
|
return;
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
const fieldName = outField.fieldName;
|
|
186
|
-
const value = params[fieldName];
|
|
187
|
-
setValueForVariableName(pageContext.entity, outField.pageVariable, value);
|
|
91
|
+
t.outs.forEach((t2) => {
|
|
92
|
+
const s = t2.fieldName, n = a[s];
|
|
93
|
+
setValueForVariableName(e.entity, t2.pageVariable, n);
|
|
188
94
|
});
|
|
189
95
|
}
|
|
190
96
|
export {
|
|
@@ -1,88 +1,64 @@
|
|
|
1
1
|
import "vue";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
function addComponentRef(pageContext, componentUuid, refObj) {
|
|
7
|
-
if (!pageContext) {
|
|
2
|
+
window.globalRefs || (window.globalRefs = {});
|
|
3
|
+
const n = window.globalRefs;
|
|
4
|
+
function o(o2, e2, r2) {
|
|
5
|
+
if (!o2)
|
|
8
6
|
return;
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
if (!globalRefs[cacheKey]) {
|
|
12
|
-
globalRefs[cacheKey] = {};
|
|
13
|
-
}
|
|
14
|
-
globalRefs[cacheKey][componentUuid] = refObj;
|
|
15
|
-
return globalRefs[cacheKey];
|
|
7
|
+
const t2 = u(o2.code, o2.version);
|
|
8
|
+
return n[t2] || (n[t2] = {}), n[t2][e2] = r2, n[t2];
|
|
16
9
|
}
|
|
17
|
-
function
|
|
18
|
-
if (!
|
|
10
|
+
function e(o2, e2, r2) {
|
|
11
|
+
if (!o2)
|
|
19
12
|
return;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
if (!globalRefs[cacheKey]) {
|
|
23
|
-
globalRefs[cacheKey] = {};
|
|
24
|
-
}
|
|
25
|
-
globalRefs[cacheKey][componentCode] = refObj;
|
|
26
|
-
return globalRefs[cacheKey];
|
|
13
|
+
const t2 = f(o2.code, o2.version);
|
|
14
|
+
return n[t2] || (n[t2] = {}), n[t2][e2] = r2, n[t2];
|
|
27
15
|
}
|
|
28
|
-
function
|
|
29
|
-
if (!
|
|
16
|
+
function r(o2, e2) {
|
|
17
|
+
if (!o2 || !e2)
|
|
30
18
|
return;
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
}
|
|
36
|
-
const objRef = globalRefs[cacheKey][componentUuid];
|
|
37
|
-
return objRef ? objRef.value : objRef;
|
|
19
|
+
const r2 = u(o2.code, o2.version);
|
|
20
|
+
n[r2] || (n[r2] = {});
|
|
21
|
+
const t2 = n[r2][e2];
|
|
22
|
+
return t2 ? t2.value : t2;
|
|
38
23
|
}
|
|
39
|
-
function
|
|
40
|
-
if (!
|
|
24
|
+
function t(o2, e2) {
|
|
25
|
+
if (!o2)
|
|
41
26
|
return;
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
}
|
|
47
|
-
const objRef = globalRefs[cacheKey][componentCode];
|
|
48
|
-
return objRef ? objRef.value : objRef;
|
|
27
|
+
const r2 = f(o2.code, o2.version);
|
|
28
|
+
n[r2] || (n[r2] = {});
|
|
29
|
+
const t2 = n[r2][e2];
|
|
30
|
+
return t2 ? t2.value : t2;
|
|
49
31
|
}
|
|
50
|
-
function
|
|
51
|
-
if (!
|
|
32
|
+
function i(o2) {
|
|
33
|
+
if (!o2)
|
|
52
34
|
return;
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
globalRefs[cacheKey] = {};
|
|
35
|
+
const e2 = u(o2.code, o2.version);
|
|
36
|
+
n[e2] = {};
|
|
56
37
|
}
|
|
57
|
-
function
|
|
58
|
-
if (!
|
|
38
|
+
function c(o2) {
|
|
39
|
+
if (!o2)
|
|
59
40
|
return;
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
globalRefs[cacheKey] = {};
|
|
41
|
+
const e2 = u(o2.code, o2.version);
|
|
42
|
+
n[e2] = {};
|
|
63
43
|
}
|
|
64
|
-
function
|
|
65
|
-
return "pageRuntimeRef-" +
|
|
44
|
+
function u(n2, o2) {
|
|
45
|
+
return "pageRuntimeRef-" + n2 + "-" + (o2 || 1);
|
|
66
46
|
}
|
|
67
|
-
function
|
|
68
|
-
return
|
|
47
|
+
function f(n2, o2) {
|
|
48
|
+
return u(n2, o2) + "-code";
|
|
69
49
|
}
|
|
70
|
-
function
|
|
71
|
-
if (!
|
|
50
|
+
function s(o2) {
|
|
51
|
+
if (!o2)
|
|
72
52
|
return;
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
if (!globalRefs[cacheKey]) {
|
|
76
|
-
globalRefs[cacheKey] = {};
|
|
77
|
-
}
|
|
78
|
-
return globalRefs[cacheKey];
|
|
53
|
+
const e2 = f(o2.code, o2.version);
|
|
54
|
+
return n[e2] || (n[e2] = {}), n[e2];
|
|
79
55
|
}
|
|
80
56
|
export {
|
|
81
|
-
addComponentRef,
|
|
82
|
-
addComponentRefByCode,
|
|
83
|
-
getAllComponentRefs,
|
|
84
|
-
getComponentRef,
|
|
85
|
-
getComponentRefByCode,
|
|
86
|
-
initComponentRefState,
|
|
87
|
-
removePageAllRef
|
|
57
|
+
o as addComponentRef,
|
|
58
|
+
e as addComponentRefByCode,
|
|
59
|
+
s as getAllComponentRefs,
|
|
60
|
+
r as getComponentRef,
|
|
61
|
+
t as getComponentRefByCode,
|
|
62
|
+
c as initComponentRefState,
|
|
63
|
+
i as removePageAllRef
|
|
88
64
|
};
|
|
@@ -1,23 +1,15 @@
|
|
|
1
|
-
import { usePageContextStore } from "./page-store.js";
|
|
2
|
-
import { getEnableI18nState } from "agilebuilder-ui/src/utils/i18n-util";
|
|
3
|
-
import { useI18n } from "vue-i18n";
|
|
4
|
-
let
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
enableI18n = getEnableI18nState(pageContext.systemCode) ? true : false;
|
|
13
|
-
}
|
|
14
|
-
if (!enableI18n) {
|
|
15
|
-
return key;
|
|
16
|
-
}
|
|
17
|
-
const i18nKey = `${pageContext.systemCode}.${key}`;
|
|
18
|
-
const i18nValue = i18n.t(i18nKey, args || []);
|
|
19
|
-
return i18nValue !== i18nKey ? i18nValue : key;
|
|
1
|
+
import { usePageContextStore as t } from "./page-store.js";
|
|
2
|
+
import { getEnableI18nState as e } from "agilebuilder-ui/src/utils/i18n-util";
|
|
3
|
+
import { useI18n as o } from "vue-i18n";
|
|
4
|
+
let r = null, i = null;
|
|
5
|
+
const l = (l2, ...n) => {
|
|
6
|
+
i || (i = o());
|
|
7
|
+
const s = t().pageContext;
|
|
8
|
+
if (null === r && (r = !!e(s.systemCode)), !r)
|
|
9
|
+
return l2;
|
|
10
|
+
const u = `${s.systemCode}.${l2}`, m = i.t(u, n || []);
|
|
11
|
+
return m !== u ? m : l2;
|
|
20
12
|
};
|
|
21
13
|
export {
|
|
22
|
-
$t
|
|
14
|
+
l as $t
|
|
23
15
|
};
|
|
@@ -1,9 +1,4 @@
|
|
|
1
|
-
var
|
|
2
|
-
PageDimensions2["PC"] = "pc";
|
|
3
|
-
PageDimensions2["IPAD"] = "ipad";
|
|
4
|
-
PageDimensions2["PHONE"] = "phone";
|
|
5
|
-
return PageDimensions2;
|
|
6
|
-
})(PageDimensions || {});
|
|
1
|
+
var p = ((p2) => (p2.PC = "pc", p2.IPAD = "ipad", p2.PHONE = "phone", p2))(p || {});
|
|
7
2
|
export {
|
|
8
|
-
PageDimensions
|
|
3
|
+
p as PageDimensions
|
|
9
4
|
};
|