super-page-runtime 2.2.26 → 2.2.29-tmp2
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 +7 -5
- package/dist/es/assets/chart-themes/theme1.js +6 -2
- package/dist/es/assets/chart-themes/theme2.js +6 -2
- package/dist/es/assets/chart-themes/theme3.js +6 -2
- package/dist/es/components/runtime/utils/api/api-util.js +7 -4
- package/dist/es/components/runtime/utils/api/page-expose-util.js +443 -135
- package/dist/es/components/runtime/utils/assemblys-config.js +369 -13
- package/dist/es/components/runtime/utils/barcode-util.js +33 -9
- package/dist/es/components/runtime/utils/charts/chart-columnline-util.js +306 -122
- package/dist/es/components/runtime/utils/charts/chart-gauge-util.js +68 -29
- package/dist/es/components/runtime/utils/charts/chart-pie-util.js +152 -68
- package/dist/es/components/runtime/utils/charts/chart-radar-util.js +124 -46
- package/dist/es/components/runtime/utils/charts/chart-scatter-util.js +99 -36
- package/dist/es/components/runtime/utils/charts/chart-util.js +522 -224
- package/dist/es/components/runtime/utils/common-util.js +156 -76
- package/dist/es/components/runtime/utils/eventBus.js +8 -3
- package/dist/es/components/runtime/utils/events/event-util.js +775 -362
- package/dist/es/components/runtime/utils/events/print-label.js +140 -72
- package/dist/es/components/runtime/utils/events/standard-event.js +2320 -808
- package/dist/es/components/runtime/utils/events/validator-util.js +560 -224
- package/dist/es/components/runtime/utils/form/date-shortcuts.js +88 -28
- package/dist/es/components/runtime/utils/form/scan-util.js +162 -61
- package/dist/es/components/runtime/utils/global-refs.js +84 -53
- package/dist/es/components/runtime/utils/i18n-util.js +20 -11
- package/dist/es/components/runtime/utils/interfaces/page-design-types.js +7 -2
- package/dist/es/components/runtime/utils/page-helper-util.js +660 -279
- package/dist/es/components/runtime/utils/page-init-util.js +406 -141
- package/dist/es/components/runtime/utils/page-permission-util.js +531 -22
- package/dist/es/components/runtime/utils/page-store.js +68 -23
- package/dist/es/components/runtime/utils/store-util.js +13 -9
- package/dist/es/components/runtime/utils/store.js +2 -2
- package/dist/es/components/runtime/utils/table-utils.js +81 -40
- package/dist/es/components/runtime/utils/tree-utils.js +37 -17
- 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 +83 -21
- 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 +46 -14
- 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 +132 -36
- 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 +18 -4
- 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 +107 -17
- 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 +198 -50
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue.js +42 -12
- 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 +60 -7
- 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 +203 -52
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue.js +4 -4
- package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue2.js +162 -46
- 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 +109 -32
- 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 +166 -43
- 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 +117 -32
- 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 +118 -32
- package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +597 -246
- package/dist/es/components/runtime/views/assemblys/chart/table/group-column-item.vue.js +42 -4
- 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 +62 -8
- 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 +160 -29
- 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 +62 -13
- 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 +594 -212
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +139 -29
- 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 +125 -21
- 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 +102 -16
- 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 +81 -18
- 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 +82 -17
- 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 +86 -14
- 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 +79 -21
- 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 +61 -16
- 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 +37 -10
- 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 +127 -38
- 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 +76 -28
- 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 +178 -61
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +810 -302
- 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 +635 -262
- 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 +115 -40
- 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 +215 -56
- package/dist/es/components/runtime/views/assemblys/error-render.vue.js +21 -3
- 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 +154 -42
- package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue.js +98 -34
- 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 +200 -52
- 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 +239 -68
- 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 +109 -31
- 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 +59 -21
- 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 +188 -56
- 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 +103 -22
- 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 +245 -57
- 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 +174 -32
- 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 +107 -28
- 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 +50 -13
- 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 +194 -64
- 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 +249 -88
- 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 +263 -80
- 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 +57 -13
- 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 +155 -30
- 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 +129 -40
- 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 +107 -22
- package/dist/es/components/runtime/views/assemblys/home-chart-render.vue.js +188 -89
- package/dist/es/components/runtime/views/assemblys/home-chart-render.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/object-render.vue.js +272 -133
- 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 +46 -18
- 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 +49 -21
- 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 +58 -20
- 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 +53 -16
- package/dist/es/components/runtime/views/home-chart.vue.js +160 -40
- package/dist/es/components/runtime/views/home-chart.vue2.js +2 -2
- package/dist/es/components/runtime/views/super-page-dialog.vue.js +139 -20
- package/dist/es/components/runtime/views/super-page-dialog.vue2.js +2 -2
- package/dist/es/components/runtime/views/super-page.vue.js +754 -226
- package/dist/es/components/runtime/views/super-page.vue2.js +2 -2
- package/dist/es/i18n/langs/cn.js +55 -2
- package/dist/es/i18n/langs/en.js +55 -2
- package/package.json +2 -2
|
@@ -1,36 +1,96 @@
|
|
|
1
|
-
function
|
|
2
|
-
if (!
|
|
3
|
-
|
|
4
|
-
if (e2.includes("today") && !["week", "month", "year"].includes(t)) {
|
|
5
|
-
const e3 = { text: "今天", value: () => /* @__PURE__ */ new Date() };
|
|
6
|
-
n.endsWith("range") && (e3.value = () => [/* @__PURE__ */ new Date(), /* @__PURE__ */ new Date()]), a.push(e3);
|
|
1
|
+
function getDateShortCuts(dateScopeDetails, dateType, rangeType) {
|
|
2
|
+
if (!dateScopeDetails) {
|
|
3
|
+
return void 0;
|
|
7
4
|
}
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
5
|
+
const shortcuts = [];
|
|
6
|
+
if (dateScopeDetails.includes("today") && !["week", "month", "year"].includes(dateType)) {
|
|
7
|
+
const dateParams = {
|
|
8
|
+
text: "今天",
|
|
9
|
+
value: () => {
|
|
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);
|
|
13
19
|
}
|
|
14
|
-
if (
|
|
15
|
-
const
|
|
16
|
-
|
|
17
|
-
const
|
|
18
|
-
|
|
20
|
+
if (dateScopeDetails.includes("yesterday") && !["week", "month", "year"].includes(dateType)) {
|
|
21
|
+
const date = /* @__PURE__ */ new Date();
|
|
22
|
+
date.setTime(date.getTime() - 3600 * 1e3 * 24);
|
|
23
|
+
const dateParams = {
|
|
24
|
+
text: "昨天",
|
|
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);
|
|
19
35
|
}
|
|
20
|
-
if (
|
|
21
|
-
const
|
|
22
|
-
|
|
23
|
-
const
|
|
24
|
-
|
|
36
|
+
if (dateScopeDetails.includes("oneWeek") && !["month", "year"].includes(dateType)) {
|
|
37
|
+
const date = /* @__PURE__ */ new Date();
|
|
38
|
+
date.setTime(date.getTime() - 3600 * 1e3 * 24 * 7);
|
|
39
|
+
const dateParams = {
|
|
40
|
+
text: "一周前",
|
|
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);
|
|
25
52
|
}
|
|
26
|
-
if (
|
|
27
|
-
const
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
53
|
+
if (dateScopeDetails.includes("oneMonth") && !["year"].includes(dateType)) {
|
|
54
|
+
const date = /* @__PURE__ */ new Date();
|
|
55
|
+
if (date.getMonth() > 0) {
|
|
56
|
+
date.setMonth(date.getMonth() - 1);
|
|
57
|
+
} else {
|
|
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);
|
|
31
74
|
}
|
|
32
|
-
|
|
75
|
+
if (dateScopeDetails.includes("oneYear")) {
|
|
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
93
|
}
|
|
34
94
|
export {
|
|
35
|
-
|
|
95
|
+
getDateShortCuts
|
|
36
96
|
};
|
|
@@ -1,89 +1,190 @@
|
|
|
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
|
-
|
|
3
|
+
function formatScanRuleSets(ruleList) {
|
|
4
|
+
const scanRuleSets2 = {};
|
|
5
|
+
ruleList.forEach((ruleSet) => {
|
|
6
|
+
if (ruleSet.type === "group") {
|
|
7
|
+
ruleSet.outs.forEach((valueSet) => {
|
|
8
|
+
if (!scanRuleSets2[valueSet.ruleCode]) {
|
|
9
|
+
scanRuleSets2[valueSet.ruleCode] = { outs: [], adaptations: [] };
|
|
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);
|
|
10
18
|
}
|
|
11
|
-
function packageScanRuleSets(
|
|
12
|
-
return new Promise((
|
|
13
|
-
Object.keys(
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
19
|
+
function packageScanRuleSets(scanRuleSets2) {
|
|
20
|
+
return new Promise((resolve, reject) => {
|
|
21
|
+
if (Object.keys(scanRuleSets2).length > 0) {
|
|
22
|
+
http.post(
|
|
23
|
+
window["$vueApp"].config.globalProperties.baseAPI + "/dc/setting-barcode-analysis/by-codes",
|
|
24
|
+
Object.keys(scanRuleSets2)
|
|
25
|
+
).then((res2) => {
|
|
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);
|
|
18
44
|
});
|
|
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);
|
|
23
45
|
});
|
|
24
|
-
}
|
|
46
|
+
} else {
|
|
47
|
+
resolve(null);
|
|
48
|
+
}
|
|
25
49
|
});
|
|
26
50
|
}
|
|
27
51
|
function analysisScanValue(scanValue, scanRuleSets) {
|
|
28
|
-
if (!scanValue)
|
|
52
|
+
if (!scanValue) {
|
|
53
|
+
return null;
|
|
54
|
+
}
|
|
29
55
|
const scanSets = Object.values(scanRuleSets);
|
|
30
56
|
for (let i = 0; i < scanSets.length; i++) {
|
|
31
|
-
const scanSet = scanSets[i]
|
|
57
|
+
const scanSet = scanSets[i];
|
|
58
|
+
const adaptations = scanSet.adaptations;
|
|
32
59
|
let validStr = "";
|
|
33
|
-
for (let
|
|
34
|
-
const
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
60
|
+
for (let k = 0; k < adaptations.length; k++) {
|
|
61
|
+
const adap = adaptations[k];
|
|
62
|
+
const indexs = _getScanIndexs(scanValue, adap.startIndex, adap.endIndex);
|
|
63
|
+
const startIndex = indexs[0];
|
|
64
|
+
const endIndex = indexs[1];
|
|
65
|
+
let paramValue = scanValue.substring(startIndex, endIndex);
|
|
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 = "==";
|
|
39
85
|
}
|
|
40
|
-
if (
|
|
41
|
-
|
|
42
|
-
|
|
86
|
+
if (operate == "include" || operate == "notinclude") {
|
|
87
|
+
validStr += paramValue + ".indexOf(" + compareValue + ")";
|
|
88
|
+
if (operate == "include") {
|
|
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;
|
|
43
102
|
}
|
|
44
103
|
}
|
|
45
104
|
let res = false;
|
|
46
|
-
if (validStr)
|
|
47
|
-
|
|
48
|
-
|
|
105
|
+
if (validStr) {
|
|
106
|
+
try {
|
|
107
|
+
console.log("validStr", validStr);
|
|
108
|
+
res = eval("(" + validStr + ")");
|
|
109
|
+
console.log("res", res);
|
|
110
|
+
} catch (e) {
|
|
111
|
+
console.log(e);
|
|
112
|
+
}
|
|
113
|
+
} else {
|
|
114
|
+
res = true;
|
|
115
|
+
}
|
|
116
|
+
if (res) {
|
|
117
|
+
return executeAnalysisForScan(scanValue, scanSet);
|
|
49
118
|
}
|
|
50
|
-
else res = true;
|
|
51
|
-
if (res) return executeAnalysisForScan(scanValue, scanSet);
|
|
52
119
|
}
|
|
53
120
|
return null;
|
|
54
121
|
}
|
|
55
|
-
function executeAnalysisForScan(
|
|
56
|
-
if (!
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
122
|
+
function executeAnalysisForScan(scanValue2, scanSet2) {
|
|
123
|
+
if (!scanSet2 || !scanValue2) {
|
|
124
|
+
return;
|
|
125
|
+
}
|
|
126
|
+
const outs = scanSet2.outs;
|
|
127
|
+
const params = {};
|
|
128
|
+
outs.forEach((outJson) => {
|
|
129
|
+
const fieldName = outJson.fieldName;
|
|
130
|
+
if (outJson.fixedValue != void 0) {
|
|
131
|
+
params[fieldName] = outJson.fixedValue;
|
|
132
|
+
} else {
|
|
133
|
+
let pValue = scanValue2;
|
|
134
|
+
if (outJson.splitChar && outJson.splitNum) {
|
|
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
|
+
}
|
|
66
144
|
}
|
|
67
|
-
if (
|
|
68
|
-
const
|
|
69
|
-
|
|
145
|
+
if (outJson.splitChar2 && outJson.splitNum2) {
|
|
146
|
+
const splitChar2 = outJson.splitChar2 == "|" ? outJson.splitChar2 : outJson.splitChar2;
|
|
147
|
+
const strs = pValue.split(splitChar2);
|
|
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
|
+
}
|
|
70
155
|
}
|
|
71
|
-
if (
|
|
72
|
-
const
|
|
73
|
-
|
|
156
|
+
if (pValue.length > 0) {
|
|
157
|
+
const indexs = _getScanIndexs(pValue, outJson.startIndex, outJson.endIndex);
|
|
158
|
+
const startIndex = indexs[0];
|
|
159
|
+
const endIndex = indexs[1];
|
|
160
|
+
pValue = pValue.substring(startIndex, endIndex);
|
|
74
161
|
}
|
|
75
|
-
|
|
162
|
+
params[fieldName] = pValue;
|
|
76
163
|
}
|
|
77
|
-
})
|
|
164
|
+
});
|
|
165
|
+
return { value: scanValue2, params, scanSet: scanSet2 };
|
|
78
166
|
}
|
|
79
|
-
function _getScanIndexs(
|
|
80
|
-
|
|
167
|
+
function _getScanIndexs(value, startIndex, endIndex) {
|
|
168
|
+
startIndex = startIndex == void 0 ? 0 : startIndex - 1;
|
|
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];
|
|
81
178
|
}
|
|
82
|
-
function setScanAnalysisValue(
|
|
83
|
-
if (!
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
179
|
+
function setScanAnalysisValue(pageContext, scanSet2, params) {
|
|
180
|
+
if (!scanSet2) {
|
|
181
|
+
return;
|
|
182
|
+
}
|
|
183
|
+
const outs = scanSet2.outs;
|
|
184
|
+
outs.forEach((outField) => {
|
|
185
|
+
const fieldName = outField.fieldName;
|
|
186
|
+
const value = params[fieldName];
|
|
187
|
+
setValueForVariableName(pageContext.entity, outField.pageVariable, value);
|
|
87
188
|
});
|
|
88
189
|
}
|
|
89
190
|
export {
|
|
@@ -1,57 +1,88 @@
|
|
|
1
1
|
import "vue";
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
if (!
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
return
|
|
27
|
-
}
|
|
28
|
-
function
|
|
29
|
-
if (!
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
2
|
+
if (!window["globalRefs"]) {
|
|
3
|
+
window["globalRefs"] = {};
|
|
4
|
+
}
|
|
5
|
+
const globalRefs = window["globalRefs"];
|
|
6
|
+
function addComponentRef(pageContext, componentUuid, refObj) {
|
|
7
|
+
if (!pageContext) {
|
|
8
|
+
return;
|
|
9
|
+
}
|
|
10
|
+
const cacheKey = getPageRefKey(pageContext.code, pageContext.version);
|
|
11
|
+
if (!globalRefs[cacheKey]) {
|
|
12
|
+
globalRefs[cacheKey] = {};
|
|
13
|
+
}
|
|
14
|
+
globalRefs[cacheKey][componentUuid] = refObj;
|
|
15
|
+
return globalRefs[cacheKey];
|
|
16
|
+
}
|
|
17
|
+
function addComponentRefByCode(pageContext, componentCode, refObj) {
|
|
18
|
+
if (!pageContext) {
|
|
19
|
+
return;
|
|
20
|
+
}
|
|
21
|
+
const cacheKey = getPageRefKeyByCode(pageContext.code, pageContext.version);
|
|
22
|
+
if (!globalRefs[cacheKey]) {
|
|
23
|
+
globalRefs[cacheKey] = {};
|
|
24
|
+
}
|
|
25
|
+
globalRefs[cacheKey][componentCode] = refObj;
|
|
26
|
+
return globalRefs[cacheKey];
|
|
27
|
+
}
|
|
28
|
+
function getComponentRef(pageContext, componentUuid) {
|
|
29
|
+
if (!pageContext || !componentUuid) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
const cacheKey = getPageRefKey(pageContext.code, pageContext.version);
|
|
33
|
+
if (!globalRefs[cacheKey]) {
|
|
34
|
+
globalRefs[cacheKey] = {};
|
|
35
|
+
}
|
|
36
|
+
const objRef = globalRefs[cacheKey][componentUuid];
|
|
37
|
+
return objRef ? objRef.value : objRef;
|
|
38
|
+
}
|
|
39
|
+
function getComponentRefByCode(pageContext, componentCode) {
|
|
40
|
+
if (!pageContext) {
|
|
41
|
+
return;
|
|
42
|
+
}
|
|
43
|
+
const cacheKey = getPageRefKeyByCode(pageContext.code, pageContext.version);
|
|
44
|
+
if (!globalRefs[cacheKey]) {
|
|
45
|
+
globalRefs[cacheKey] = {};
|
|
46
|
+
}
|
|
47
|
+
const objRef = globalRefs[cacheKey][componentCode];
|
|
48
|
+
return objRef ? objRef.value : objRef;
|
|
49
|
+
}
|
|
50
|
+
function removePageAllRef(pageContext) {
|
|
51
|
+
if (!pageContext) {
|
|
52
|
+
return;
|
|
53
|
+
}
|
|
54
|
+
const cacheKey = getPageRefKey(pageContext.code, pageContext.version);
|
|
55
|
+
globalRefs[cacheKey] = {};
|
|
56
|
+
}
|
|
57
|
+
function initComponentRefState(pageContext) {
|
|
58
|
+
if (!pageContext) {
|
|
59
|
+
return;
|
|
60
|
+
}
|
|
61
|
+
const cacheKey = getPageRefKey(pageContext.code, pageContext.version);
|
|
62
|
+
globalRefs[cacheKey] = {};
|
|
63
|
+
}
|
|
64
|
+
function getPageRefKey(pageCode, pageVersion) {
|
|
65
|
+
return "pageRuntimeRef-" + pageCode + "-" + (pageVersion ? pageVersion : 1);
|
|
66
|
+
}
|
|
67
|
+
function getPageRefKeyByCode(pageCode, pageVersion) {
|
|
68
|
+
return getPageRefKey(pageCode, pageVersion) + "-code";
|
|
69
|
+
}
|
|
70
|
+
function getAllComponentRefs(pageContext) {
|
|
71
|
+
if (!pageContext) {
|
|
72
|
+
return;
|
|
73
|
+
}
|
|
74
|
+
const cacheKey = getPageRefKeyByCode(pageContext.code, pageContext.version);
|
|
75
|
+
if (!globalRefs[cacheKey]) {
|
|
76
|
+
globalRefs[cacheKey] = {};
|
|
77
|
+
}
|
|
78
|
+
return globalRefs[cacheKey];
|
|
48
79
|
}
|
|
49
80
|
export {
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
81
|
+
addComponentRef,
|
|
82
|
+
addComponentRefByCode,
|
|
83
|
+
getAllComponentRefs,
|
|
84
|
+
getComponentRef,
|
|
85
|
+
getComponentRefByCode,
|
|
86
|
+
initComponentRefState,
|
|
87
|
+
removePageAllRef
|
|
57
88
|
};
|
|
@@ -1,14 +1,23 @@
|
|
|
1
|
-
import { usePageContextStore
|
|
2
|
-
import { getEnableI18nState
|
|
3
|
-
import { useI18n
|
|
4
|
-
let
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
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 enableI18n = null;
|
|
5
|
+
let i18n = null;
|
|
6
|
+
const $t = (key, ...args) => {
|
|
7
|
+
if (!i18n) {
|
|
8
|
+
i18n = useI18n();
|
|
9
|
+
}
|
|
10
|
+
const pageContext = usePageContextStore().pageContext;
|
|
11
|
+
if (enableI18n === null) {
|
|
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;
|
|
11
20
|
};
|
|
12
21
|
export {
|
|
13
|
-
|
|
22
|
+
$t
|
|
14
23
|
};
|
|
@@ -1,4 +1,9 @@
|
|
|
1
|
-
var
|
|
1
|
+
var PageDimensions = /* @__PURE__ */ ((PageDimensions2) => {
|
|
2
|
+
PageDimensions2["PC"] = "pc";
|
|
3
|
+
PageDimensions2["IPAD"] = "ipad";
|
|
4
|
+
PageDimensions2["PHONE"] = "phone";
|
|
5
|
+
return PageDimensions2;
|
|
6
|
+
})(PageDimensions || {});
|
|
2
7
|
export {
|
|
3
|
-
|
|
8
|
+
PageDimensions
|
|
4
9
|
};
|