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,4 +1,4 @@
|
|
|
1
|
-
import { defineComponent
|
|
1
|
+
import { defineComponent, ref, createElementBlock, openBlock, createBlock, unref } from "vue";
|
|
2
2
|
import "agilebuilder-ui";
|
|
3
3
|
import "agilebuilder-ui/src/utils/request";
|
|
4
4
|
import "dayjs";
|
|
@@ -6,45 +6,120 @@ import "agilebuilder-ui/src/utils/calculator/calculator-util";
|
|
|
6
6
|
import "../../../../utils/global-refs.js";
|
|
7
7
|
import "agilebuilder-ui/src/utils/common-util";
|
|
8
8
|
import "agilebuilder-ui/src/utils/util";
|
|
9
|
-
import
|
|
10
|
-
import
|
|
11
|
-
const
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
9
|
+
import _sfc_main$1 from "./sub-table-runtime.vue.js";
|
|
10
|
+
import _sfc_main$2 from "./main-table-runtime.vue.js";
|
|
11
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
12
|
+
__name: "table-runtime",
|
|
13
|
+
props: {
|
|
14
|
+
pageContext: {},
|
|
15
|
+
configure: {}
|
|
16
|
+
},
|
|
17
|
+
setup(__props, { expose: __expose }) {
|
|
18
|
+
const props = __props;
|
|
19
|
+
const pageType = props.pageContext.pageType;
|
|
20
|
+
const tableConfigure = ref(null);
|
|
21
|
+
const tableUuid = props.configure.uuid;
|
|
22
|
+
const superGridItems = props.pageContext.superGridItems;
|
|
23
|
+
const superGridSetting = superGridItems ? superGridItems[tableUuid] : null;
|
|
24
|
+
tableConfigure.value = superGridSetting ? superGridSetting.configure ? JSON.parse(superGridSetting.configure) : null : props.configure;
|
|
25
|
+
const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
|
|
26
|
+
runtimeInfo.style;
|
|
27
|
+
runtimeInfo.class;
|
|
28
|
+
const gridRef = ref(null);
|
|
29
|
+
function validatorSunTableListData() {
|
|
30
|
+
if (pageType && pageType === "form") {
|
|
31
|
+
return gridRef.value.validatorSunTableListData();
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
function setSafeDeleteTableCode(code) {
|
|
35
|
+
if (props.pageContext.entity.data._SAFE_DELETE_TABLE_NAMES) {
|
|
36
|
+
props.pageContext.entity.data._SAFE_DELETE_TABLE_NAMES.push(code);
|
|
37
|
+
} else {
|
|
38
|
+
props.pageContext.entity.data._SAFE_DELETE_TABLE_NAMES = [code];
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
function clearSelections() {
|
|
42
|
+
return gridRef.value.clearSelections();
|
|
43
|
+
}
|
|
44
|
+
function refresh(parentRowIds, isLineEdit, toolbarFieldParam, isDeleteSubTableData) {
|
|
45
|
+
if (pageType && pageType === "list") {
|
|
46
|
+
return gridRef.value.refresh(parentRowIds, isLineEdit, toolbarFieldParam, isDeleteSubTableData);
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
function createRow() {
|
|
50
|
+
return gridRef.value.createRow();
|
|
51
|
+
}
|
|
52
|
+
function getSelections() {
|
|
53
|
+
return gridRef.value.getSelections();
|
|
54
|
+
}
|
|
55
|
+
function getSelectionIds() {
|
|
56
|
+
return gridRef.value.getSelectionIds();
|
|
57
|
+
}
|
|
58
|
+
function getTableConfigure() {
|
|
59
|
+
return gridRef.value.getTableConfigure();
|
|
60
|
+
}
|
|
61
|
+
function isDeleteChange(value) {
|
|
62
|
+
if (pageType && pageType === "list") {
|
|
63
|
+
gridRef.value.isDeleteChange(value);
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
function showMobileSearch() {
|
|
67
|
+
gridRef.value.showMobileSearch();
|
|
68
|
+
}
|
|
69
|
+
function getTableSelectOptions() {
|
|
70
|
+
if (gridRef.value) {
|
|
71
|
+
return gridRef.value.getTableSelectOptions();
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
function dynamicControlTableEdit(pageContext, customRules, listCode) {
|
|
75
|
+
if (gridRef.value) {
|
|
76
|
+
gridRef.value.dynamicControlTableEdit(pageContext, customRules, listCode);
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
function getTableUuid() {
|
|
80
|
+
return props.configure.uuid;
|
|
81
|
+
}
|
|
82
|
+
function doLayout(hiddenColumns) {
|
|
83
|
+
if (gridRef.value) {
|
|
84
|
+
gridRef.value.doLayout(hiddenColumns);
|
|
85
|
+
}
|
|
86
|
+
}
|
|
87
|
+
__expose({
|
|
88
|
+
refresh,
|
|
89
|
+
createRow,
|
|
90
|
+
clearSelections,
|
|
91
|
+
getSelections,
|
|
92
|
+
getSelectionIds,
|
|
93
|
+
getTableConfigure,
|
|
94
|
+
isDeleteChange,
|
|
95
|
+
validatorSunTableListData,
|
|
96
|
+
showMobileSearch,
|
|
97
|
+
getTableSelectOptions,
|
|
98
|
+
dynamicControlTableEdit,
|
|
99
|
+
getTableUuid,
|
|
100
|
+
doLayout
|
|
101
|
+
});
|
|
102
|
+
return (_ctx, _cache) => {
|
|
103
|
+
return openBlock(), createElementBlock("div", null, [
|
|
104
|
+
unref(pageType) && unref(pageType) === "form" ? (openBlock(), createBlock(_sfc_main$1, {
|
|
105
|
+
key: 0,
|
|
106
|
+
ref_key: "gridRef",
|
|
107
|
+
ref: gridRef,
|
|
108
|
+
pageContext: _ctx.pageContext,
|
|
109
|
+
configure: tableConfigure.value,
|
|
110
|
+
onSetSafeDeleteTableCode: setSafeDeleteTableCode
|
|
111
|
+
}, null, 8, ["pageContext", "configure"])) : (openBlock(), createBlock(_sfc_main$2, {
|
|
112
|
+
key: 1,
|
|
113
|
+
ref_key: "gridRef",
|
|
114
|
+
ref: gridRef,
|
|
115
|
+
pageContext: _ctx.pageContext,
|
|
116
|
+
configure: tableConfigure.value,
|
|
117
|
+
onSetSafeDeleteTableCode: setSafeDeleteTableCode
|
|
118
|
+
}, null, 8, ["pageContext", "configure"]))
|
|
119
|
+
]);
|
|
120
|
+
};
|
|
19
121
|
}
|
|
20
|
-
|
|
21
|
-
if (s && "list" === s) return v.value.refresh(e3, t2, u2, n2);
|
|
22
|
-
}, createRow: function() {
|
|
23
|
-
return v.value.createRow();
|
|
24
|
-
}, clearSelections: function() {
|
|
25
|
-
return v.value.clearSelections();
|
|
26
|
-
}, getSelections: function() {
|
|
27
|
-
return v.value.getSelections();
|
|
28
|
-
}, getSelectionIds: function() {
|
|
29
|
-
return v.value.getSelectionIds();
|
|
30
|
-
}, getTableConfigure: function() {
|
|
31
|
-
return v.value.getTableConfigure();
|
|
32
|
-
}, isDeleteChange: function(e3) {
|
|
33
|
-
s && "list" === s && v.value.isDeleteChange(e3);
|
|
34
|
-
}, validatorSunTableListData: function() {
|
|
35
|
-
if (s && "form" === s) return v.value.validatorSunTableListData();
|
|
36
|
-
}, showMobileSearch: function() {
|
|
37
|
-
v.value.showMobileSearch();
|
|
38
|
-
}, getTableSelectOptions: function() {
|
|
39
|
-
if (v.value) return v.value.getTableSelectOptions();
|
|
40
|
-
}, dynamicControlTableEdit: function(e3, t2, u2) {
|
|
41
|
-
v.value && v.value.dynamicControlTableEdit(e3, t2, u2);
|
|
42
|
-
}, getTableUuid: function() {
|
|
43
|
-
return c.configure.uuid;
|
|
44
|
-
}, doLayout: function(e3) {
|
|
45
|
-
v.value && v.value.doLayout(e3);
|
|
46
|
-
} }), (e3, t2) => (n(), u("div", null, [l(s) && "form" === l(s) ? (n(), i(o, { key: 0, ref_key: "gridRef", ref: v, pageContext: e3.pageContext, configure: f.value, onSetSafeDeleteTableCode: b }, null, 8, ["pageContext", "configure"])) : (n(), i(r, { key: 1, ref_key: "gridRef", ref: v, pageContext: e3.pageContext, configure: f.value, onSetSafeDeleteTableCode: b }, null, 8, ["pageContext", "configure"]))]));
|
|
47
|
-
} });
|
|
122
|
+
});
|
|
48
123
|
export {
|
|
49
|
-
|
|
124
|
+
_sfc_main as default
|
|
50
125
|
};
|
|
@@ -1,62 +1,221 @@
|
|
|
1
|
-
import { defineComponent
|
|
2
|
-
import { getFormModelFields
|
|
3
|
-
import { setVariableValue
|
|
4
|
-
import { getMenuTreeData
|
|
5
|
-
import { handleAfterInitEvent
|
|
6
|
-
const
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
}
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
1
|
+
import { defineComponent, computed, ref, onMounted, nextTick, watch, resolveComponent, createElementBlock, openBlock, normalizeClass, unref, createBlock, createCommentVNode, normalizeStyle, withCtx, createElementVNode, createVNode, toDisplayString } from "vue";
|
|
2
|
+
import { getFormModelFields } from "../../../../utils/page-init-util.js";
|
|
3
|
+
import { setVariableValue, getVariableValue } from "../../../../utils/page-helper-util.js";
|
|
4
|
+
import { getMenuTreeData } from "../../../../utils/tree-utils.js";
|
|
5
|
+
import { handleAfterInitEvent, handleFormEvent } from "../../../../utils/events/event-util.js";
|
|
6
|
+
const _hoisted_1 = ["title"];
|
|
7
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
8
|
+
__name: "tree-runtime",
|
|
9
|
+
props: {
|
|
10
|
+
pageContext: {},
|
|
11
|
+
configure: {}
|
|
12
|
+
},
|
|
13
|
+
setup(__props, { expose: __expose }) {
|
|
14
|
+
var _a, _b;
|
|
15
|
+
const props = __props;
|
|
16
|
+
const entity = props.pageContext.entity ? props.pageContext.entity : {};
|
|
17
|
+
let dynamicFields = getFormModelFields(props.pageContext, props.configure);
|
|
18
|
+
const dynamicModelMethod = computed({
|
|
19
|
+
get() {
|
|
20
|
+
return getVariableValue(entity, dynamicFields);
|
|
21
|
+
},
|
|
22
|
+
set(value) {
|
|
23
|
+
setVariableValue(entity, dynamicFields, value);
|
|
24
|
+
}
|
|
19
25
|
});
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
26
|
+
const isLazy = ref(((_b = (_a = props.configure.props) == null ? void 0 : _a.base) == null ? void 0 : _b.lazy) ? true : false);
|
|
27
|
+
const runtimeInfo = props.configure.runtime ? props.configure.runtime : {};
|
|
28
|
+
const runtimeStyle = runtimeInfo.style;
|
|
29
|
+
const runtimeClass = runtimeInfo.class;
|
|
30
|
+
runtimeInfo.headerStyle;
|
|
31
|
+
const menuTree = ref(null);
|
|
32
|
+
const designProperty = ref(runtimeInfo.props ? runtimeInfo.props : {});
|
|
33
|
+
const defaultProps = ref(
|
|
34
|
+
{
|
|
35
|
+
id: "nodeId",
|
|
36
|
+
label: "name",
|
|
37
|
+
children: "children",
|
|
38
|
+
isLeaf: "leaf",
|
|
39
|
+
disabled: "disabled",
|
|
40
|
+
nodeType: "nodeType",
|
|
41
|
+
iconType: "iconType",
|
|
42
|
+
iconValue: "iconValue"
|
|
43
|
+
}
|
|
44
|
+
);
|
|
45
|
+
const isShowTree = ref(false);
|
|
46
|
+
const menuData = ref(null);
|
|
47
|
+
const selectNode = ref(null);
|
|
48
|
+
const filterText = ref("");
|
|
49
|
+
const isSearch = ref(false);
|
|
50
|
+
onMounted(() => {
|
|
51
|
+
nextTick(() => {
|
|
52
|
+
const value = dynamicModelMethod.value;
|
|
53
|
+
handleAfterInitEvent(value, props.pageContext, props.configure, {
|
|
54
|
+
componentRef: menuTree.value,
|
|
55
|
+
value,
|
|
56
|
+
entity: props.pageContext.entity.data,
|
|
57
|
+
pageData: props.pageContext.entity.page
|
|
58
|
+
});
|
|
59
|
+
});
|
|
60
|
+
});
|
|
61
|
+
if (!isLazy.value) {
|
|
62
|
+
getMenuTreeData(props.pageContext, props.configure).then((treeNodes) => {
|
|
63
|
+
menuData.value = treeNodes;
|
|
64
|
+
isShowTree.value = true;
|
|
65
|
+
});
|
|
66
|
+
} else {
|
|
67
|
+
isShowTree.value = true;
|
|
68
|
+
}
|
|
69
|
+
watch(filterText, (val) => {
|
|
70
|
+
isSearch.value = true;
|
|
71
|
+
menuTree.value.filter(val);
|
|
72
|
+
});
|
|
73
|
+
const filterNode = (value, data) => {
|
|
74
|
+
if (!value) return true;
|
|
75
|
+
return data.name.includes(value);
|
|
76
|
+
};
|
|
77
|
+
function handleNodeClick(data, node, nodeTree) {
|
|
78
|
+
selectNode.value = node;
|
|
79
|
+
handleFormEvent(null, props.pageContext, props.configure, "node-click", {
|
|
80
|
+
data,
|
|
81
|
+
node,
|
|
82
|
+
nodeTree
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
function loadNode(node, resolve) {
|
|
86
|
+
const parentId = 0;
|
|
87
|
+
let parentNodeId = "0";
|
|
88
|
+
if (node.level === 0) {
|
|
89
|
+
parentNodeId = parentId + "";
|
|
90
|
+
} else {
|
|
91
|
+
parentNodeId = node.data.nodeId;
|
|
92
|
+
}
|
|
93
|
+
initLoadNode(parentNodeId, node, resolve);
|
|
94
|
+
}
|
|
95
|
+
function initLoadNode(parentNodeId, node, resolve) {
|
|
96
|
+
const param = {
|
|
97
|
+
parentNodeId,
|
|
98
|
+
data: node.data,
|
|
99
|
+
// 节点详细信息,json字符串
|
|
100
|
+
searchValue: filterText,
|
|
101
|
+
// 查询条件
|
|
102
|
+
isSearch: isSearch.value
|
|
103
|
+
// 是否是查询
|
|
104
|
+
};
|
|
105
|
+
getMenuTreeData(props.pageContext, props.configure, parentNodeId, node, param).then(
|
|
106
|
+
(treeNodes) => {
|
|
107
|
+
isSearch.value = false;
|
|
108
|
+
resolve(treeNodes);
|
|
109
|
+
if (parentNodeId === "0") {
|
|
110
|
+
const rootNodeId = treeNodes[0].nodeId;
|
|
111
|
+
loadRootNode(rootNodeId, node);
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
function loadRootNode(rootNodeId, node) {
|
|
117
|
+
const param = {
|
|
118
|
+
parentNodeId: rootNodeId,
|
|
119
|
+
data: node.data,
|
|
120
|
+
// 节点详细信息,json字符串
|
|
121
|
+
searchValue: filterText,
|
|
122
|
+
// 查询条件
|
|
123
|
+
isSearch: isSearch.value
|
|
124
|
+
// 是否是查询
|
|
125
|
+
};
|
|
126
|
+
getMenuTreeData(props.pageContext, props.configure, rootNodeId, node, param).then((children) => {
|
|
127
|
+
isSearch.value = false;
|
|
128
|
+
menuTree.value.updateKeyChildren(rootNodeId, children);
|
|
129
|
+
if (menuTree.value.store.nodesMap[rootNodeId]) {
|
|
130
|
+
menuTree.value.store.nodesMap[rootNodeId].expanded = true;
|
|
41
131
|
}
|
|
42
132
|
});
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
133
|
+
}
|
|
134
|
+
function getSelectNode() {
|
|
135
|
+
return selectNode.value;
|
|
136
|
+
}
|
|
137
|
+
function expandNode(node) {
|
|
138
|
+
node.loaded = false;
|
|
139
|
+
node.expand();
|
|
140
|
+
}
|
|
141
|
+
function loadTreeNodes() {
|
|
142
|
+
getMenuTreeData(props.pageContext, props.configure).then((treeNodes) => {
|
|
143
|
+
isSearch.value = false;
|
|
144
|
+
menuData.value = treeNodes;
|
|
145
|
+
});
|
|
146
|
+
}
|
|
147
|
+
function getNode(node) {
|
|
148
|
+
menuTree.value.getNode(node);
|
|
149
|
+
}
|
|
150
|
+
__expose({
|
|
151
|
+
getSelectNode,
|
|
152
|
+
expandNode,
|
|
153
|
+
loadTreeNodes,
|
|
154
|
+
getNode
|
|
52
155
|
});
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
156
|
+
return (_ctx, _cache) => {
|
|
157
|
+
const _component_el_input = resolveComponent("el-input");
|
|
158
|
+
const _component_SuperIcon = resolveComponent("SuperIcon");
|
|
159
|
+
const _component_Folder = resolveComponent("Folder");
|
|
160
|
+
const _component_el_icon = resolveComponent("el-icon");
|
|
161
|
+
const _component_el_tree = resolveComponent("el-tree");
|
|
162
|
+
return openBlock(), createElementBlock("div", {
|
|
163
|
+
class: normalizeClass(unref(runtimeClass))
|
|
164
|
+
}, [
|
|
165
|
+
designProperty.value.filter ? (openBlock(), createBlock(_component_el_input, {
|
|
166
|
+
key: 0,
|
|
167
|
+
modelValue: filterText.value,
|
|
168
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => filterText.value = $event),
|
|
169
|
+
style: { "width": "240px" },
|
|
170
|
+
placeholder: "请输入查询条件"
|
|
171
|
+
}, null, 8, ["modelValue"])) : createCommentVNode("", true),
|
|
172
|
+
isShowTree.value ? (openBlock(), createBlock(_component_el_tree, {
|
|
173
|
+
key: 1,
|
|
174
|
+
ref_key: "menuTree",
|
|
175
|
+
ref: menuTree,
|
|
176
|
+
style: normalizeStyle(unref(runtimeStyle)),
|
|
177
|
+
load: loadNode,
|
|
178
|
+
data: menuData.value,
|
|
179
|
+
props: defaultProps.value,
|
|
180
|
+
"default-expand-all": designProperty.value.defaultExpandAll,
|
|
181
|
+
"expand-on-click-node": designProperty.value.expandOnClickNode,
|
|
182
|
+
indent: designProperty.value.retractWidth ? designProperty.value.retractWidth : 18,
|
|
183
|
+
accordion: designProperty.value.accordion,
|
|
184
|
+
"show-checkbox": designProperty.value.showCheckbox ? true : false,
|
|
185
|
+
"highlight-current": "",
|
|
186
|
+
lazy: isLazy.value,
|
|
187
|
+
"node-key": "nodeId",
|
|
188
|
+
"filter-node-method": filterNode,
|
|
189
|
+
onNodeClick: handleNodeClick
|
|
190
|
+
}, {
|
|
191
|
+
default: withCtx(({ node, data }) => [
|
|
192
|
+
createElementVNode("span", {
|
|
193
|
+
title: node.label,
|
|
194
|
+
class: "ellipsis"
|
|
195
|
+
}, [
|
|
196
|
+
data.iconValue ? (openBlock(), createBlock(_component_SuperIcon, {
|
|
197
|
+
key: 0,
|
|
198
|
+
iconType: data.iconType,
|
|
199
|
+
iconValue: data.iconValue
|
|
200
|
+
}, null, 8, ["iconType", "iconValue"])) : designProperty.value.iconValue ? (openBlock(), createBlock(_component_SuperIcon, {
|
|
201
|
+
key: 1,
|
|
202
|
+
iconType: designProperty.value.iconType,
|
|
203
|
+
iconValue: designProperty.value.iconValue
|
|
204
|
+
}, null, 8, ["iconType", "iconValue"])) : (openBlock(), createBlock(_component_el_icon, { key: 2 }, {
|
|
205
|
+
default: withCtx(() => [
|
|
206
|
+
createVNode(_component_Folder)
|
|
207
|
+
]),
|
|
208
|
+
_: 1
|
|
209
|
+
})),
|
|
210
|
+
createElementVNode("span", null, toDisplayString(node.label), 1)
|
|
211
|
+
], 8, _hoisted_1)
|
|
212
|
+
]),
|
|
213
|
+
_: 1
|
|
214
|
+
}, 8, ["style", "data", "props", "default-expand-all", "expand-on-click-node", "indent", "accordion", "show-checkbox", "lazy"])) : createCommentVNode("", true)
|
|
215
|
+
], 2);
|
|
216
|
+
};
|
|
217
|
+
}
|
|
218
|
+
});
|
|
60
219
|
export {
|
|
61
|
-
|
|
220
|
+
_sfc_main as default
|
|
62
221
|
};
|
|
@@ -1,5 +1,23 @@
|
|
|
1
|
-
import { defineComponent
|
|
2
|
-
const
|
|
1
|
+
import { defineComponent, createElementBlock, openBlock, toDisplayString } from "vue";
|
|
2
|
+
const _hoisted_1 = { style: { "text-align": "center", "color": "red" } };
|
|
3
|
+
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
4
|
+
__name: "error-render",
|
|
5
|
+
props: {
|
|
6
|
+
configure: {
|
|
7
|
+
type: Object,
|
|
8
|
+
default: {
|
|
9
|
+
name: "未知"
|
|
10
|
+
}
|
|
11
|
+
},
|
|
12
|
+
selectWidget: Object,
|
|
13
|
+
indexObj: Object
|
|
14
|
+
},
|
|
15
|
+
setup(__props) {
|
|
16
|
+
return (_ctx, _cache) => {
|
|
17
|
+
return openBlock(), createElementBlock("div", _hoisted_1, " 不能识别的组件类型【" + toDisplayString(__props.configure.name) + "】 ", 1);
|
|
18
|
+
};
|
|
19
|
+
}
|
|
20
|
+
});
|
|
3
21
|
export {
|
|
4
|
-
|
|
22
|
+
_sfc_main as default
|
|
5
23
|
};
|