super-page-runtime 2.0.19 → 2.0.25
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/components/runtime/utils/api/api-util.js +18 -16
- package/dist/es/components/runtime/utils/api/page-expose-util.d.ts +1 -0
- package/dist/es/components/runtime/utils/api/page-expose-util.js +206 -0
- package/dist/es/components/runtime/utils/assemblys-config.js +16 -7
- package/dist/es/components/runtime/utils/common-util.d.ts +2 -2
- package/dist/es/components/runtime/utils/common-util.js +8 -12
- package/dist/es/components/runtime/utils/events/event-util.d.ts +14 -0
- package/dist/es/components/runtime/utils/events/event-util.js +101 -32
- package/dist/es/components/runtime/utils/events/standard-event.d.ts +2 -0
- package/dist/es/components/runtime/utils/events/standard-event.js +189 -133
- package/dist/es/components/runtime/utils/events/validator-util.js +4 -3
- package/dist/es/components/runtime/utils/form/scan-util.js +191 -0
- package/dist/es/components/runtime/utils/global-refs.js +12 -0
- package/dist/es/components/runtime/utils/interfaces/page-design-types.d.ts +2 -0
- package/dist/es/components/runtime/utils/page-helper-util.js +20 -4
- package/dist/es/components/runtime/utils/page-init-util.js +9 -15
- package/dist/es/components/runtime/utils/table-utils.js +4 -5
- package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +17 -17
- package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +17 -17
- package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue.d.ts +1 -1
- package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue.d.ts +1 -1
- package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +5 -5
- package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue.js +4 -0
- package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +207 -0
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +99 -68
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +3 -2
- package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +11 -11
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +28 -28
- package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +12 -12
- package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue2.js +7 -5
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +14 -14
- package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +15 -15
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +24 -1
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +40 -37
- package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +10 -10
- package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +13 -13
- package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +96 -26
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +8 -8
- package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +13 -13
- package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +10 -10
- package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +14 -14
- package/dist/es/components/runtime/views/assemblys/object-render.vue.js +5 -2
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +5 -7
- package/dist/es/components/runtime/views/super-page.vue.js +18 -7
- package/package.json +3 -2
- package/dist/lib/_virtual/AttributeMap.js +0 -4
- package/dist/lib/_virtual/Delta.js +0 -4
- package/dist/lib/_virtual/Op.js +0 -4
- package/dist/lib/_virtual/OpIterator.js +0 -4
- package/dist/lib/_virtual/__vite-browser-external.js +0 -3
- package/dist/lib/_virtual/_commonjsHelpers.js +0 -8
- package/dist/lib/_virtual/_plugin-vue_export-helper.js +0 -9
- package/dist/lib/_virtual/dayjs.min.js +0 -4
- package/dist/lib/_virtual/index.js +0 -4
- package/dist/lib/_virtual/index2.js +0 -4
- package/dist/lib/_virtual/index3.js +0 -4
- package/dist/lib/assets/chart-themes/theme1.d.ts +0 -4
- package/dist/lib/assets/chart-themes/theme1.js +0 -7
- package/dist/lib/assets/chart-themes/theme2.d.ts +0 -4
- package/dist/lib/assets/chart-themes/theme2.js +0 -7
- package/dist/lib/assets/chart-themes/theme3.d.ts +0 -4
- package/dist/lib/assets/chart-themes/theme3.js +0 -7
- package/dist/lib/components/runtime/index.d.ts +0 -4
- package/dist/lib/components/runtime/utils/api/api-util.d.ts +0 -11
- package/dist/lib/components/runtime/utils/api/api-util.js +0 -128
- package/dist/lib/components/runtime/utils/assemblys-config.js +0 -258
- package/dist/lib/components/runtime/utils/charts/chart-util.d.ts +0 -11
- package/dist/lib/components/runtime/utils/charts/chart-util.js +0 -28
- package/dist/lib/components/runtime/utils/common-util.d.ts +0 -16
- package/dist/lib/components/runtime/utils/common-util.js +0 -94
- package/dist/lib/components/runtime/utils/eventBus.d.ts +0 -7
- package/dist/lib/components/runtime/utils/eventBus.js +0 -10
- package/dist/lib/components/runtime/utils/events/event-util.d.ts +0 -48
- package/dist/lib/components/runtime/utils/events/event-util.js +0 -526
- package/dist/lib/components/runtime/utils/events/standard-event.d.ts +0 -61
- package/dist/lib/components/runtime/utils/events/standard-event.js +0 -1625
- package/dist/lib/components/runtime/utils/events/validator-util.d.ts +0 -4
- package/dist/lib/components/runtime/utils/events/validator-util.js +0 -389
- package/dist/lib/components/runtime/utils/global-refs.d.ts +0 -59
- package/dist/lib/components/runtime/utils/global-refs.js +0 -65
- package/dist/lib/components/runtime/utils/interfaces/page-design-types.d.ts +0 -223
- package/dist/lib/components/runtime/utils/interfaces/page-design-types.js +0 -9
- package/dist/lib/components/runtime/utils/page-helper-util.d.ts +0 -106
- package/dist/lib/components/runtime/utils/page-helper-util.js +0 -622
- package/dist/lib/components/runtime/utils/page-init-util.d.ts +0 -38
- package/dist/lib/components/runtime/utils/page-init-util.js +0 -200
- package/dist/lib/components/runtime/utils/page-permission-util.d.ts +0 -26
- package/dist/lib/components/runtime/utils/page-permission-util.js +0 -525
- package/dist/lib/components/runtime/utils/store-util.d.ts +0 -15
- package/dist/lib/components/runtime/utils/store-util.js +0 -17
- package/dist/lib/components/runtime/utils/store.d.ts +0 -2
- package/dist/lib/components/runtime/utils/store.js +0 -3
- package/dist/lib/components/runtime/utils/table-utils.js +0 -24
- package/dist/lib/components/runtime/views/assemblys/button/button/button-runtime.vue.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +0 -54
- package/dist/lib/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue2.js +0 -35
- package/dist/lib/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +0 -110
- package/dist/lib/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +0 -432
- package/dist/lib/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue.js +0 -43
- package/dist/lib/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue2.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +0 -61
- package/dist/lib/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue2.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +0 -126
- package/dist/lib/components/runtime/views/assemblys/chart/common/common-chart-header.vue2.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +0 -52
- package/dist/lib/components/runtime/views/assemblys/chart/pie/pie-runtime.vue.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +0 -54
- package/dist/lib/components/runtime/views/assemblys/chart/radar/radar-runtime.vue.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +0 -54
- package/dist/lib/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +0 -56
- package/dist/lib/components/runtime/views/assemblys/common/export-form-report-dialog.vue.d.ts +0 -24
- package/dist/lib/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +0 -147
- package/dist/lib/components/runtime/views/assemblys/common/export-form-report-dialog.vue2.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/common/remove-signer-dialog.vue.d.ts +0 -35
- package/dist/lib/components/runtime/views/assemblys/common/remove-signer-dialog.vue.js +0 -127
- package/dist/lib/components/runtime/views/assemblys/common/remove-signer-dialog.vue2.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/common/task-informition-dialog.vue.d.ts +0 -26
- package/dist/lib/components/runtime/views/assemblys/common/task-informition-dialog.vue.js +0 -104
- package/dist/lib/components/runtime/views/assemblys/common/task-informition-dialog.vue2.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/container/card/card-runtime.vue.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/container/card/card-runtime.vue2.js +0 -72
- package/dist/lib/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue2.js +0 -74
- package/dist/lib/components/runtime/views/assemblys/container/container/container-runtime.vue.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/container/container/container-runtime.vue2.js +0 -79
- package/dist/lib/components/runtime/views/assemblys/container/flex/flex-runtime.vue.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +0 -43
- package/dist/lib/components/runtime/views/assemblys/container/form/form-runtime.vue.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/container/form/form-runtime.vue2.js +0 -44
- package/dist/lib/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue2.js +0 -30
- package/dist/lib/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +0 -69
- package/dist/lib/components/runtime/views/assemblys/container/tools/tools-runtime.vue.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/container/tools/tools-runtime.vue2.js +0 -75
- package/dist/lib/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +0 -642
- package/dist/lib/components/runtime/views/assemblys/data/table/main-table-runtime.vue2.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +0 -453
- package/dist/lib/components/runtime/views/assemblys/data/table/sub-table-runtime.vue2.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/data/table/table-runtime.vue.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +0 -88
- package/dist/lib/components/runtime/views/assemblys/error-render.vue.d.ts +0 -22
- package/dist/lib/components/runtime/views/assemblys/error-render.vue.js +0 -22
- package/dist/lib/components/runtime/views/assemblys/error-render.vue2.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +0 -156
- package/dist/lib/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +0 -82
- package/dist/lib/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +0 -64
- package/dist/lib/components/runtime/views/assemblys/form/divider/divider-runtime.vue.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/form/divider/divider-runtime.vue2.js +0 -40
- package/dist/lib/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +0 -74
- package/dist/lib/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +0 -63
- package/dist/lib/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +0 -127
- package/dist/lib/components/runtime/views/assemblys/form/label/label-runtime.vue.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +0 -127
- package/dist/lib/components/runtime/views/assemblys/form/link/link-runtime.vue.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +0 -77
- package/dist/lib/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue2.js +0 -29
- package/dist/lib/components/runtime/views/assemblys/form/radio/radio-runtime.vue.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +0 -157
- package/dist/lib/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +0 -164
- package/dist/lib/components/runtime/views/assemblys/form/select/select-runtime.vue.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +0 -201
- package/dist/lib/components/runtime/views/assemblys/form/switch/switch-runtime.vue.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +0 -63
- package/dist/lib/components/runtime/views/assemblys/form/tag/tag-runtime.vue.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +0 -63
- package/dist/lib/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +0 -65
- package/dist/lib/components/runtime/views/assemblys/object-render.vue.d.ts +0 -17
- package/dist/lib/components/runtime/views/assemblys/object-render.vue.js +0 -142
- package/dist/lib/components/runtime/views/assemblys/object-render.vue2.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue.js +0 -3
- package/dist/lib/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +0 -61
- package/dist/lib/components/runtime/views/super-page-dialog.vue.d.ts +0 -36
- package/dist/lib/components/runtime/views/super-page-dialog.vue.js +0 -73
- package/dist/lib/components/runtime/views/super-page-dialog.vue2.js +0 -3
- package/dist/lib/components/runtime/views/super-page.vue.d.ts +0 -91
- package/dist/lib/components/runtime/views/super-page.vue.js +0 -496
- package/dist/lib/components/runtime/views/super-page.vue2.js +0 -3
- package/dist/lib/favicon.ico +0 -0
- package/dist/lib/index.d.ts +0 -8
- package/dist/lib/index.js +0 -15
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
import { defineComponent, computed, ref, onMounted, watch, resolveComponent, openBlock, createBlock, normalizeClass, unref, normalizeStyle, withCtx, createElementBlock, toDisplayString, createCommentVNode } from "vue";
|
|
2
|
+
import qrcode from "qrcode";
|
|
3
|
+
import JsBarcode from "jsbarcode";
|
|
4
|
+
import { getFormModelFields } from "../../../../utils/page-init-util.js";
|
|
5
|
+
import { getVariableValue, setVariableValue } from "../../../../utils/page-helper-util.js";
|
|
6
|
+
import { handleEvent } from "../../../../utils/events/event-util.js";
|
|
7
|
+
import "agilebuilder-ui/src/utils/request";
|
|
8
|
+
const _hoisted_1 = ["src"];
|
|
9
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
10
|
+
__name: "barcode-runtime",
|
|
11
|
+
props: {
|
|
12
|
+
pageContext: {},
|
|
13
|
+
configure: {}
|
|
14
|
+
},
|
|
15
|
+
setup(__props, { expose: __expose }) {
|
|
16
|
+
const props = __props;
|
|
17
|
+
const entity = props.pageContext.entity ? props.pageContext.entity : {};
|
|
18
|
+
let dynamicFields = getFormModelFields(props.pageContext, props.configure);
|
|
19
|
+
const dynamicModelMethod = computed({
|
|
20
|
+
get() {
|
|
21
|
+
return getVariableValue(entity, dynamicFields);
|
|
22
|
+
},
|
|
23
|
+
set(value) {
|
|
24
|
+
setVariableValue(entity, dynamicFields, value);
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
|
|
28
|
+
const designProperty = ref(runtimeInfo.props ? runtimeInfo.props : {});
|
|
29
|
+
const runtimeStyle = runtimeInfo.style;
|
|
30
|
+
const runtimeClass = runtimeInfo.class;
|
|
31
|
+
const headerStyle = runtimeInfo.headerStyle;
|
|
32
|
+
const qrUrl = ref("");
|
|
33
|
+
const barcode = ref(null);
|
|
34
|
+
const barcodeFormat = ref(designProperty.value.brCodeFormat ?? "CODE128");
|
|
35
|
+
const watchVariableNames = ref([]);
|
|
36
|
+
onMounted(() => {
|
|
37
|
+
if (designProperty.value.generateRule) {
|
|
38
|
+
if (designProperty.value.generateRuleType === "fixed") {
|
|
39
|
+
handleFixedFormat();
|
|
40
|
+
} else {
|
|
41
|
+
handleSelectedRule();
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
if (dynamicModelMethod.value) {
|
|
45
|
+
createCode(dynamicModelMethod.value);
|
|
46
|
+
}
|
|
47
|
+
});
|
|
48
|
+
function getValue() {
|
|
49
|
+
return getVariableValue(entity, dynamicFields);
|
|
50
|
+
}
|
|
51
|
+
function setValue(value) {
|
|
52
|
+
return setVariableValue(entity, dynamicFields, value);
|
|
53
|
+
}
|
|
54
|
+
function handleFixedFormat() {
|
|
55
|
+
watchVariableNames.value = Array.from(
|
|
56
|
+
designProperty.value.generateRule.matchAll(/\$\{(\w+)\}/g),
|
|
57
|
+
(m) => m[1]
|
|
58
|
+
);
|
|
59
|
+
watchVariableNames.value.forEach((name) => {
|
|
60
|
+
watch(
|
|
61
|
+
() => props.pageContext.entity.data[name],
|
|
62
|
+
(newValue, oldValue) => {
|
|
63
|
+
if (newValue !== void 0 && newValue !== null) {
|
|
64
|
+
generateFixedFormatCode();
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
);
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
function handleSelectedRule() {
|
|
71
|
+
const rule = JSON.parse(
|
|
72
|
+
'[{"fieldName":"-1","fixedValue":"|"},{"fixedValue":"","fieldLength":"10","suppliement":"x","fieldName":"passenger"},{"fixedValue":"","fieldLength":"","suppliement":"","fieldName":"passengerNumber"},{"fixedValue":"AAA","fieldLength":"","suppliement":"","fieldName":"-1"}]'
|
|
73
|
+
);
|
|
74
|
+
rule.forEach((item) => {
|
|
75
|
+
if (item.fieldName !== "-1" && item.fieldName !== -1) {
|
|
76
|
+
watchVariableNames.value.push(item.fieldName);
|
|
77
|
+
watch(
|
|
78
|
+
() => props.pageContext.entity.data[item.fieldName],
|
|
79
|
+
(newValue, oldValue) => {
|
|
80
|
+
if (newValue !== void 0 && newValue !== null) {
|
|
81
|
+
generateCodeByRule(rule);
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
);
|
|
85
|
+
}
|
|
86
|
+
});
|
|
87
|
+
}
|
|
88
|
+
function generateFixedFormatCode() {
|
|
89
|
+
let allVariablesPresent = true;
|
|
90
|
+
watchVariableNames.value.forEach((name) => {
|
|
91
|
+
if (!props.pageContext.entity.data[name]) {
|
|
92
|
+
allVariablesPresent = false;
|
|
93
|
+
return;
|
|
94
|
+
}
|
|
95
|
+
});
|
|
96
|
+
if (allVariablesPresent) {
|
|
97
|
+
let barCodeValue = replaceVariables(
|
|
98
|
+
designProperty.value.generateRule,
|
|
99
|
+
props.pageContext.entity.data
|
|
100
|
+
);
|
|
101
|
+
generateCode(barCodeValue);
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
function generateCodeByRule(rule) {
|
|
105
|
+
let allVariablesPresent = true;
|
|
106
|
+
let value = "";
|
|
107
|
+
rule.forEach((item) => {
|
|
108
|
+
if (item.fieldName !== "-1" && item.fieldName !== -1) {
|
|
109
|
+
const filedValue = props.pageContext.entity.data[item.fieldName];
|
|
110
|
+
if (item.suppliement && item.fieldLength) {
|
|
111
|
+
if (!filedValue) {
|
|
112
|
+
value += "".padEnd(item.fieldLength, item.suppliement);
|
|
113
|
+
} else {
|
|
114
|
+
if (filedValue.length > item.fieldLength) {
|
|
115
|
+
value += filedValue.substring(0, item.fieldLength);
|
|
116
|
+
} else {
|
|
117
|
+
value += filedValue.padEnd(item.fieldLength, item.suppliement);
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
} else {
|
|
121
|
+
if (!filedValue) {
|
|
122
|
+
allVariablesPresent = false;
|
|
123
|
+
} else {
|
|
124
|
+
value += filedValue;
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
} else {
|
|
128
|
+
value += item.fixedValue;
|
|
129
|
+
}
|
|
130
|
+
});
|
|
131
|
+
console.log(value);
|
|
132
|
+
if (allVariablesPresent) {
|
|
133
|
+
generateCode(value);
|
|
134
|
+
}
|
|
135
|
+
}
|
|
136
|
+
function generateCode(value) {
|
|
137
|
+
createCode(value);
|
|
138
|
+
setValue(value);
|
|
139
|
+
handleEvent(value, props.pageContext, props.configure, "change", {
|
|
140
|
+
entity
|
|
141
|
+
});
|
|
142
|
+
}
|
|
143
|
+
function createCode(value) {
|
|
144
|
+
if (designProperty.value.type === "QR-code") {
|
|
145
|
+
createQrCode(value);
|
|
146
|
+
} else {
|
|
147
|
+
createBarCode(value);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
function createBarCode(codeValue) {
|
|
151
|
+
try {
|
|
152
|
+
JsBarcode(barcode.value, codeValue, { format: barcodeFormat.value });
|
|
153
|
+
} catch (error) {
|
|
154
|
+
console.error("生成条形码时发生错误:", error);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
157
|
+
function createQrCode(codeValue) {
|
|
158
|
+
qrcode.toDataURL(codeValue, (err, url) => {
|
|
159
|
+
if (err) {
|
|
160
|
+
console.error(err);
|
|
161
|
+
} else {
|
|
162
|
+
qrUrl.value = url;
|
|
163
|
+
}
|
|
164
|
+
});
|
|
165
|
+
}
|
|
166
|
+
function replaceVariables(template, variables) {
|
|
167
|
+
const regex = /\$\{(\w+)\}/g;
|
|
168
|
+
return template.replace(regex, (match, keyword) => {
|
|
169
|
+
return variables.hasOwnProperty(keyword) ? variables[keyword] : match;
|
|
170
|
+
});
|
|
171
|
+
}
|
|
172
|
+
__expose({
|
|
173
|
+
getValue,
|
|
174
|
+
setValue
|
|
175
|
+
});
|
|
176
|
+
return (_ctx, _cache) => {
|
|
177
|
+
const _component_el_form_item = resolveComponent("el-form-item");
|
|
178
|
+
return openBlock(), createBlock(_component_el_form_item, {
|
|
179
|
+
required: designProperty.value.required ? true : false,
|
|
180
|
+
class: normalizeClass(unref(runtimeClass)),
|
|
181
|
+
"label-width": designProperty.value.labelWidth,
|
|
182
|
+
style: normalizeStyle(unref(runtimeStyle))
|
|
183
|
+
}, {
|
|
184
|
+
label: withCtx(() => [
|
|
185
|
+
designProperty.value.tittleShow ? (openBlock(), createElementBlock("div", {
|
|
186
|
+
key: 0,
|
|
187
|
+
style: normalizeStyle({ ...unref(headerStyle) })
|
|
188
|
+
}, toDisplayString(designProperty.value.title), 5)) : createCommentVNode("", true)
|
|
189
|
+
]),
|
|
190
|
+
default: withCtx(() => [
|
|
191
|
+
designProperty.value.type === "QR-code" ? (openBlock(), createElementBlock("img", {
|
|
192
|
+
key: 0,
|
|
193
|
+
src: qrUrl.value
|
|
194
|
+
}, null, 8, _hoisted_1)) : (openBlock(), createElementBlock("canvas", {
|
|
195
|
+
key: 1,
|
|
196
|
+
ref_key: "barcode",
|
|
197
|
+
ref: barcode
|
|
198
|
+
}, null, 512))
|
|
199
|
+
]),
|
|
200
|
+
_: 1
|
|
201
|
+
}, 8, ["required", "class", "label-width", "style"]);
|
|
202
|
+
};
|
|
203
|
+
}
|
|
204
|
+
});
|
|
205
|
+
export {
|
|
206
|
+
_sfc_main as default
|
|
207
|
+
};
|
|
@@ -1,11 +1,12 @@
|
|
|
1
1
|
import { defineComponent, ref, onMounted, watch, onUnmounted, resolveComponent, openBlock, createElementBlock, createVNode, unref } from "vue";
|
|
2
2
|
import "agilebuilder-ui";
|
|
3
|
-
import { setTableEvents, getEventFuncByType, canExecuteButton, doAfterClickEvent, doBeforeClickEvent, getHandleEvent, gridSelectRecord, gridSelectAllRecords, gridSelectionChange, cellClick, cellDblClick, rowClick, rowDblClick, headerClick } from "../../../../utils/events/event-util.js";
|
|
3
|
+
import { setTableEvents, getEventFuncByType, canExecuteButton, doAfterClickEvent, getEventNameByType, doBeforeClickEvent, getHandleEvent, gridSelectRecord, gridSelectAllRecords, gridSelectionChange, cellClick, cellDblClick, rowClick, rowDblClick, headerClick } from "../../../../utils/events/event-util.js";
|
|
4
4
|
import { getListCode, getRealRestApiPath } from "../../../../utils/common-util.js";
|
|
5
|
-
import {
|
|
5
|
+
import { getAdditionalParamMap, getSaveFormRequestWithRow, standardEvents } from "../../../../utils/events/standard-event.js";
|
|
6
6
|
import { isPromise } from "agilebuilder-ui/src/utils/common-util";
|
|
7
7
|
import { getDataTypeMap, popupToPage } from "../../../../utils/table-utils.js";
|
|
8
8
|
import eventBus from "../../../../utils/eventBus.js";
|
|
9
|
+
import { getPermissionCodes } from "../../../../utils/page-init-util.js";
|
|
9
10
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
10
11
|
__name: "main-table-runtime",
|
|
11
12
|
props: {
|
|
@@ -19,15 +20,18 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
19
20
|
const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
|
|
20
21
|
const runtimeStyle = runtimeInfo.style;
|
|
21
22
|
const runtimeClass = runtimeInfo.class;
|
|
22
|
-
const
|
|
23
|
+
const systemCode = pageContext.systemCode;
|
|
24
|
+
const backendUrl = pageContext.backendUrl;
|
|
23
25
|
const tableName = pageContext.tableName;
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
26
|
+
let baseURL = pageContext.backendUrl;
|
|
27
|
+
if (!baseURL) {
|
|
28
|
+
baseURL = window["$vueApp"].config.globalProperties.baseURL;
|
|
29
|
+
}
|
|
30
|
+
const operationButtonObj = ref({});
|
|
27
31
|
const listOptions = ref({});
|
|
28
32
|
listOptions.value = getOptions();
|
|
29
33
|
const gridRef = ref(null);
|
|
30
|
-
const urlToListData = getUrlToListData(
|
|
34
|
+
const urlToListData = getUrlToListData();
|
|
31
35
|
const listCode = getListCode(pageContext.code, pageContext.version, configure.uuid);
|
|
32
36
|
const myPageCode = pageContext.code;
|
|
33
37
|
const eventPageInfo = myPageCode + "_" + listCode;
|
|
@@ -75,20 +79,17 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
75
79
|
eventBus.$off(eventPageInfo + "-close-component-page-dialog");
|
|
76
80
|
eventBus.$off(eventPageInfo + "_close-dialog-get-entity");
|
|
77
81
|
});
|
|
78
|
-
function getUrlToListData(
|
|
79
|
-
let urlToListData2;
|
|
80
|
-
if (
|
|
81
|
-
urlToListData2 =
|
|
82
|
-
if (urlToListData2) {
|
|
83
|
-
urlToListData2 = getRealRestApiPath(urlToListData2, system2);
|
|
84
|
-
}
|
|
82
|
+
function getUrlToListData() {
|
|
83
|
+
let urlToListData2 = baseURL + "/dsc/commons/list";
|
|
84
|
+
if (urlToListData2) {
|
|
85
|
+
urlToListData2 = getRealRestApiPath(urlToListData2, systemCode, backendUrl);
|
|
85
86
|
}
|
|
86
87
|
return urlToListData2;
|
|
87
88
|
}
|
|
88
89
|
function getOptions() {
|
|
89
|
-
const
|
|
90
|
-
const permissionPrefix =
|
|
91
|
-
let initSearchForm = configure.props && configure.props.dataOrigin ? configure.props.dataOrigin.sqlFilterCondition : null;
|
|
90
|
+
const systemCode2 = pageContext.systemCode;
|
|
91
|
+
const permissionPrefix = pageContext.code;
|
|
92
|
+
let initSearchForm = configure.props && configure.props.dataOrigin && configure.props.dataOrigin.sqlFilterCondition !== "[]" ? configure.props.dataOrigin.sqlFilterCondition : null;
|
|
92
93
|
if (typeof initSearchForm === "undefined" || initSearchForm === null) {
|
|
93
94
|
initSearchForm = [];
|
|
94
95
|
}
|
|
@@ -98,8 +99,10 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
98
99
|
beanName: pageContext.beanName,
|
|
99
100
|
functionCode: permissionPrefix + ".list",
|
|
100
101
|
tableName,
|
|
101
|
-
systemCode:
|
|
102
|
+
systemCode: systemCode2,
|
|
102
103
|
// 系统编码传给列表数据后台请求
|
|
104
|
+
pageCode: pageContext.code,
|
|
105
|
+
pageVersion: pageContext.version
|
|
103
106
|
},
|
|
104
107
|
initSearchForm,
|
|
105
108
|
lineEditOptions: {
|
|
@@ -115,14 +118,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
115
118
|
pageCode: pageContext.code,
|
|
116
119
|
pageVersion: pageContext.version,
|
|
117
120
|
// pageHeight: pageHeight, // 页面的高度 //TODO: pageHeight如何获得,页面高度,计算列表高度应该会用
|
|
118
|
-
additionalParamMap: pageContext
|
|
121
|
+
additionalParamMap: getAdditionalParamMap(pageContext),
|
|
119
122
|
// 将路由参数传给列表组件
|
|
120
123
|
showOverflowTooltip: !!(configure.props && configure.props.otherSettings && (configure.props.otherSettings.isBreakLine === void 0 || configure.props.otherSettings.isBreakLine === false)),
|
|
121
124
|
// 单元格内容是否换行显示
|
|
122
125
|
isEnableEnterEvent: configure.props && configure.props.otherSettings && configure.props.otherSettings.isEnableEnterEvent,
|
|
123
126
|
// 是否启用回车事件
|
|
124
|
-
// 当前系统,表示是当前的自定义系统信息
|
|
125
|
-
system: system2,
|
|
126
127
|
isWithDataPermission: configure.props && configure.props.otherSettings && configure.props.otherSettings.isWithDataPermission ? configure.props.otherSettings.isWithDataPermission : false,
|
|
127
128
|
pageDevMode: false,
|
|
128
129
|
isWorkflowEntity: pageContext.workflowCode ? true : false,
|
|
@@ -131,8 +132,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
131
132
|
pageContext,
|
|
132
133
|
configureObj: configure
|
|
133
134
|
};
|
|
135
|
+
setOperationButtons(options);
|
|
134
136
|
setSortInfo(options);
|
|
135
|
-
myGetDataTypeMap(
|
|
137
|
+
myGetDataTypeMap();
|
|
136
138
|
setTreeSetting(options);
|
|
137
139
|
setGridEvents(options);
|
|
138
140
|
return options;
|
|
@@ -150,36 +152,41 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
150
152
|
}
|
|
151
153
|
}
|
|
152
154
|
function myGetDataTypeMap(options) {
|
|
153
|
-
if (!
|
|
155
|
+
if (!backendUrl && !tableName) {
|
|
154
156
|
return;
|
|
155
157
|
}
|
|
156
|
-
getDataTypeMap(
|
|
158
|
+
getDataTypeMap(backendUrl, tableName).then((result) => {
|
|
159
|
+
if (!pageContext["dataTypeMaps"]) {
|
|
160
|
+
pageContext["dataTypeMaps"] = {};
|
|
161
|
+
}
|
|
157
162
|
pageContext["dataTypeMaps"][tableName] = result["dataTypeMap"];
|
|
158
|
-
setOperationButtons(options);
|
|
159
163
|
});
|
|
160
164
|
}
|
|
161
165
|
function setOperationButtons(options) {
|
|
162
166
|
const showOperation = configure.props && configure.props.base ? configure.props.base.showOperation : false;
|
|
163
|
-
const
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
+
const operationButtonSettings = configure.btnList;
|
|
168
|
+
console.log("configure.btnList===", configure.btnList, "configure====", configure);
|
|
169
|
+
if (showOperation && operationButtonSettings) {
|
|
170
|
+
const operationButtons = [];
|
|
171
|
+
operationButtonSettings.forEach((buttonConfigure) => {
|
|
167
172
|
const myButtonSet = {};
|
|
168
173
|
const myButtonProps = Object.assign({}, buttonConfigure.props.base);
|
|
169
174
|
myButtonProps.elementType = "el-button";
|
|
170
175
|
if (buttonConfigure.isPermission === void 0 || buttonConfigure.isPermission + "" === "true") {
|
|
171
|
-
|
|
172
|
-
|
|
176
|
+
const functionCodes = getPermissionCodes(buttonConfigure, props.pageContext);
|
|
177
|
+
if (functionCodes) {
|
|
178
|
+
myButtonProps.permission = functionCodes;
|
|
173
179
|
}
|
|
174
180
|
}
|
|
181
|
+
myButtonProps.label = myButtonProps.title;
|
|
175
182
|
myButtonSet["props"] = myButtonProps;
|
|
176
183
|
myButtonSet["onClick"] = getOperationButtonClickEvent(buttonConfigure);
|
|
177
|
-
|
|
184
|
+
operationButtons.push(myButtonSet);
|
|
178
185
|
});
|
|
179
186
|
if (!options.operations) {
|
|
180
187
|
options.operations = {};
|
|
181
188
|
}
|
|
182
|
-
options.operations.operation =
|
|
189
|
+
options.operations.operation = operationButtons;
|
|
183
190
|
}
|
|
184
191
|
}
|
|
185
192
|
function setTreeSetting(options) {
|
|
@@ -228,11 +235,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
228
235
|
}
|
|
229
236
|
}
|
|
230
237
|
}
|
|
231
|
-
function enterSave(rowIndex, column, row, orgRow) {
|
|
238
|
+
function enterSave({ rowIndex, column, row, orgRow }) {
|
|
232
239
|
saveRow(null, null, row, column, rowIndex);
|
|
233
240
|
}
|
|
234
241
|
function saveRow(originalValue, formatValue, row, column, rowIndex) {
|
|
235
|
-
const buttonConfigure = operationButtonObj.value[
|
|
242
|
+
const buttonConfigure = operationButtonObj.value["lineEditSave"];
|
|
243
|
+
const tableConfigure = configure;
|
|
244
|
+
buttonConfigure.props.base.tableUuid = tableConfigure.uuid;
|
|
236
245
|
listOptions.value["lineEditOptions"]["beforeSave"] = beforeSaveRow;
|
|
237
246
|
pageContext.editData = row;
|
|
238
247
|
canExecuteButton({ pageContext, configureObj: buttonConfigure }).then((result) => {
|
|
@@ -255,46 +264,61 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
255
264
|
}
|
|
256
265
|
function getOperationButtonClickEvent(buttonConfigure) {
|
|
257
266
|
let onClick;
|
|
258
|
-
eventName
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
267
|
+
const eventName = getEventNameByType(buttonConfigure.events, "click");
|
|
268
|
+
if (eventName) {
|
|
269
|
+
operationButtonObj.value[eventName] = buttonConfigure;
|
|
270
|
+
if (eventName === "lineEditSave") {
|
|
271
|
+
onClick = saveRow;
|
|
272
|
+
} else if (eventName === "restoreEdit") {
|
|
273
|
+
onClick = restoreRow;
|
|
274
|
+
} else if (eventName === "lineEditUpdate") {
|
|
275
|
+
onClick = editRow;
|
|
276
|
+
} else if (eventName === "lineEditDelete") {
|
|
277
|
+
onClick = deleteRow;
|
|
278
|
+
} else {
|
|
279
|
+
onClick = customButtonClick;
|
|
280
|
+
}
|
|
281
|
+
if (!onClick) {
|
|
282
|
+
onClick = function() {
|
|
283
|
+
};
|
|
284
|
+
}
|
|
274
285
|
}
|
|
275
286
|
return onClick;
|
|
276
287
|
}
|
|
277
|
-
function beforeSaveRow(
|
|
278
|
-
|
|
288
|
+
function beforeSaveRow({
|
|
289
|
+
row,
|
|
290
|
+
columns,
|
|
291
|
+
additionalParamMap
|
|
292
|
+
}) {
|
|
293
|
+
const buttonConfigure = operationButtonObj.value["lineEditSave"];
|
|
294
|
+
const tableConfigure = configure;
|
|
295
|
+
buttonConfigure.props.base.tableUuid = tableConfigure.uuid;
|
|
279
296
|
const otherParams = {
|
|
280
|
-
dynamicColumnInfo,
|
|
281
|
-
mainDefaultValueColumns,
|
|
282
|
-
dataTypeMap,
|
|
283
297
|
row,
|
|
284
298
|
columns
|
|
285
299
|
};
|
|
286
300
|
return doBeforeClickEvent(pageContext, buttonConfigure, otherParams);
|
|
287
301
|
}
|
|
288
|
-
function saveLineEditRow(
|
|
289
|
-
|
|
302
|
+
function saveLineEditRow({
|
|
303
|
+
row,
|
|
304
|
+
columns,
|
|
305
|
+
dataTypeMap,
|
|
306
|
+
dynamicColumnInfo,
|
|
307
|
+
additionalParamMap,
|
|
308
|
+
mainDefaultValueColumns
|
|
309
|
+
}) {
|
|
310
|
+
const buttonConfigure = operationButtonObj.value["lineEditSave"];
|
|
311
|
+
const tableConfigure = configure;
|
|
312
|
+
buttonConfigure.props.base.tableUuid = tableConfigure.uuid;
|
|
290
313
|
return new Promise((resolve, reject) => {
|
|
291
|
-
|
|
314
|
+
getSaveFormRequestWithRow(
|
|
292
315
|
pageContext,
|
|
293
316
|
buttonConfigure,
|
|
294
317
|
"/dsc/commons",
|
|
295
318
|
false,
|
|
296
319
|
mainDefaultValueColumns,
|
|
297
|
-
dynamicColumnInfo
|
|
320
|
+
dynamicColumnInfo,
|
|
321
|
+
row
|
|
298
322
|
).then((commonEntity) => {
|
|
299
323
|
if (commonEntity) {
|
|
300
324
|
resolve(commonEntity.entity);
|
|
@@ -306,11 +330,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
306
330
|
});
|
|
307
331
|
});
|
|
308
332
|
}
|
|
309
|
-
function escRestorRow(rowIndex, column, row, orgRow) {
|
|
333
|
+
function escRestorRow({ rowIndex, column, row, orgRow }) {
|
|
310
334
|
restoreRow(null, null, row, column, rowIndex);
|
|
311
335
|
}
|
|
312
336
|
function restoreRow(originalValue, formatValue, row, column, rowIndex) {
|
|
313
|
-
const buttonConfigure = operationButtonObj.value[
|
|
337
|
+
const buttonConfigure = operationButtonObj.value["restoreEdit"];
|
|
338
|
+
const tableConfigure = configure;
|
|
339
|
+
buttonConfigure.props.base.tableUuid = tableConfigure.uuid;
|
|
314
340
|
const otherParams = {
|
|
315
341
|
originalValue,
|
|
316
342
|
formatValue,
|
|
@@ -341,7 +367,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
341
367
|
doAfterClickEvent(pageContext, configure, afterOtherParams);
|
|
342
368
|
}
|
|
343
369
|
function editRow(originalValue, formatValue, row, column, rowIndex) {
|
|
344
|
-
const buttonConfigure = operationButtonObj.value[
|
|
370
|
+
const buttonConfigure = operationButtonObj.value["lineEditUpdate"];
|
|
371
|
+
const tableConfigure = configure;
|
|
372
|
+
buttonConfigure.props.base.tableUuid = tableConfigure.uuid;
|
|
345
373
|
const otherParams = {
|
|
346
374
|
originalValue,
|
|
347
375
|
formatValue,
|
|
@@ -382,7 +410,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
382
410
|
});
|
|
383
411
|
}
|
|
384
412
|
function deleteRow(originalValue, formatValue, row, column, rowIndex) {
|
|
385
|
-
const buttonConfigure = operationButtonObj.value[
|
|
413
|
+
const buttonConfigure = operationButtonObj.value["lineEditDelete"];
|
|
414
|
+
const tableConfigure = configure;
|
|
415
|
+
buttonConfigure.props.base.tableUuid = tableConfigure.uuid;
|
|
386
416
|
const otherParams = {
|
|
387
417
|
originalValue,
|
|
388
418
|
formatValue,
|
|
@@ -418,8 +448,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
418
448
|
standardEvents.delete({
|
|
419
449
|
pageContext,
|
|
420
450
|
configureObj: buttonConfigure,
|
|
421
|
-
ids
|
|
422
|
-
tableUuid: listCode
|
|
451
|
+
ids
|
|
423
452
|
});
|
|
424
453
|
}
|
|
425
454
|
}).finally(() => {
|
|
@@ -501,7 +530,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
501
530
|
rowIndex,
|
|
502
531
|
button
|
|
503
532
|
};
|
|
504
|
-
const buttonConfigure = operationButtonObj.value[
|
|
533
|
+
const buttonConfigure = operationButtonObj.value["xxx"];
|
|
534
|
+
const tableConfigure = configure;
|
|
535
|
+
buttonConfigure.props.base.tableUuid = tableConfigure.uuid;
|
|
505
536
|
getHandleEvent(null, pageContext, buttonConfigure, "click", otherParams);
|
|
506
537
|
}
|
|
507
538
|
function recieveMessage(event) {
|
|
@@ -619,7 +650,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
619
650
|
ref: gridRef,
|
|
620
651
|
url: unref(urlToListData),
|
|
621
652
|
options: listOptions.value,
|
|
622
|
-
code: unref(
|
|
653
|
+
code: unref(listCode),
|
|
623
654
|
settings: unref(superGridSetting),
|
|
624
655
|
"search-form-info": searchFormInfo.value,
|
|
625
656
|
"list-toolbar-form-data": unref(listToolbarFormData),
|
|
@@ -5,6 +5,7 @@ import { getFormModelFields } from "../../../../utils/page-init-util.js";
|
|
|
5
5
|
import eventBus from "../../../../utils/eventBus.js";
|
|
6
6
|
import { popupToPage } from "../../../../utils/table-utils.js";
|
|
7
7
|
import { getListCode } from "../../../../utils/common-util.js";
|
|
8
|
+
import { getAdditionalParamMap } from "../../../../utils/events/standard-event.js";
|
|
8
9
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
9
10
|
__name: "sub-table-runtime",
|
|
10
11
|
props: {
|
|
@@ -17,7 +18,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
17
18
|
const configure = props.configure;
|
|
18
19
|
const dataModel = pageContext.entity.data;
|
|
19
20
|
const prop = configure.props && configure.props.base ? configure.props.base.prop : null;
|
|
20
|
-
const additionalParamMap = pageContext
|
|
21
|
+
const additionalParamMap = getAdditionalParamMap(pageContext);
|
|
21
22
|
const tableEvents = configure.runtime && configure.runtime.events ? configure.runtime.events : [];
|
|
22
23
|
const selections = ref([]);
|
|
23
24
|
const superGridItems = pageContext.superGridItems;
|
|
@@ -424,7 +425,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
424
425
|
ref: gridRef,
|
|
425
426
|
url: unref(baseURL) + "/common/super-forms/sub-table",
|
|
426
427
|
options: listViewOptions.value,
|
|
427
|
-
code: unref(
|
|
428
|
+
code: unref(listCode),
|
|
428
429
|
settings: unref(superGridSetting),
|
|
429
430
|
onSelect: select,
|
|
430
431
|
onSelectAll: selectAll,
|
|
@@ -24,8 +24,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
24
24
|
const runtimeStyle = runtimeInfo.style;
|
|
25
25
|
const runtimeClass = runtimeInfo.class;
|
|
26
26
|
const headerStyle = runtimeInfo.headerStyle;
|
|
27
|
-
const designProperty = runtimeInfo.props ? runtimeInfo.props : {};
|
|
28
|
-
const listOptions = ref(designProperty.options ? designProperty.options : []);
|
|
27
|
+
const designProperty = ref(runtimeInfo.props ? runtimeInfo.props : {});
|
|
28
|
+
const listOptions = ref(designProperty.value.options ? designProperty.value.options : []);
|
|
29
29
|
const cacheOptions = getOptionDatasFromPage(props.pageContext, props.configure);
|
|
30
30
|
if (cacheOptions.length > 0) {
|
|
31
31
|
listOptions.value = cacheOptions;
|
|
@@ -48,14 +48,14 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
48
48
|
target: props.configure.props.base.optionProp
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
|
-
designProperty.changeMethod = optionChange;
|
|
52
|
-
const optionconfigInfo = designProperty.optionconfigInfo ? designProperty.optionconfigInfo : {};
|
|
51
|
+
designProperty.value.changeMethod = optionChange;
|
|
52
|
+
const optionconfigInfo = designProperty.value.optionconfigInfo ? designProperty.value.optionconfigInfo : {};
|
|
53
53
|
function refreshOptions() {
|
|
54
54
|
queryOptionDatasources(props.pageContext, optionconfigInfo, void 0).then((result) => {
|
|
55
55
|
console.log("动态查询结果", result);
|
|
56
56
|
});
|
|
57
57
|
}
|
|
58
|
-
const monitorFields = designProperty.monitorFields;
|
|
58
|
+
const monitorFields = designProperty.value.monitorFields;
|
|
59
59
|
monitorFieldChange(props.pageContext, monitorFields, refreshOptions);
|
|
60
60
|
function optionChange(value) {
|
|
61
61
|
if (autoSets.length > -1) {
|
|
@@ -81,20 +81,20 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
81
81
|
const _component_el_form_item = resolveComponent("el-form-item");
|
|
82
82
|
return openBlock(), createBlock(_component_el_form_item, {
|
|
83
83
|
class: normalizeClass(unref(runtimeClass)),
|
|
84
|
-
"label-width":
|
|
84
|
+
"label-width": designProperty.value.labelWidth,
|
|
85
85
|
style: normalizeStyle(unref(runtimeStyle))
|
|
86
86
|
}, {
|
|
87
87
|
label: withCtx(() => [
|
|
88
|
-
|
|
88
|
+
designProperty.value.tittleShow ? (openBlock(), createElementBlock("div", {
|
|
89
89
|
key: 0,
|
|
90
90
|
style: normalizeStyle({ ...unref(headerStyle) })
|
|
91
|
-
}, toDisplayString(
|
|
91
|
+
}, toDisplayString(designProperty.value.title), 5)) : createCommentVNode("", true)
|
|
92
92
|
]),
|
|
93
93
|
default: withCtx(() => [
|
|
94
94
|
createVNode(_component_el_checkbox_group, {
|
|
95
|
-
disabled:
|
|
96
|
-
size:
|
|
97
|
-
onChange:
|
|
95
|
+
disabled: designProperty.value.state === "disabled",
|
|
96
|
+
size: designProperty.value.size,
|
|
97
|
+
onChange: designProperty.value.changeMethod,
|
|
98
98
|
modelValue: dynamicModelMethod.value,
|
|
99
99
|
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => dynamicModelMethod.value = $event)
|
|
100
100
|
}, {
|