super-page-runtime 2.2.29-tmp2 → 2.2.32
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 +5 -7
- package/dist/es/assets/chart-themes/theme1.js +2 -6
- package/dist/es/assets/chart-themes/theme2.js +2 -6
- package/dist/es/assets/chart-themes/theme3.js +2 -6
- package/dist/es/components/runtime/utils/api/api-util.js +4 -7
- package/dist/es/components/runtime/utils/api/page-expose-util.js +135 -443
- package/dist/es/components/runtime/utils/assemblys-config.js +13 -369
- package/dist/es/components/runtime/utils/barcode-util.js +9 -33
- package/dist/es/components/runtime/utils/charts/chart-columnline-util.js +122 -306
- package/dist/es/components/runtime/utils/charts/chart-gauge-util.js +29 -68
- package/dist/es/components/runtime/utils/charts/chart-pie-util.js +68 -152
- package/dist/es/components/runtime/utils/charts/chart-radar-util.js +46 -124
- package/dist/es/components/runtime/utils/charts/chart-scatter-util.js +36 -99
- package/dist/es/components/runtime/utils/charts/chart-util.js +224 -522
- package/dist/es/components/runtime/utils/common-util.js +76 -156
- package/dist/es/components/runtime/utils/eventBus.js +3 -8
- package/dist/es/components/runtime/utils/events/event-util.js +362 -775
- package/dist/es/components/runtime/utils/events/print-label.js +72 -140
- package/dist/es/components/runtime/utils/events/standard-event.js +808 -2320
- package/dist/es/components/runtime/utils/events/validator-util.js +224 -560
- package/dist/es/components/runtime/utils/form/date-shortcuts.js +28 -88
- package/dist/es/components/runtime/utils/form/scan-util.js +61 -162
- package/dist/es/components/runtime/utils/global-refs.js +53 -84
- package/dist/es/components/runtime/utils/i18n-util.js +11 -20
- package/dist/es/components/runtime/utils/interfaces/page-design-types.d.ts +6 -0
- package/dist/es/components/runtime/utils/interfaces/page-design-types.js +2 -7
- package/dist/es/components/runtime/utils/page-helper-util.js +280 -660
- package/dist/es/components/runtime/utils/page-init-util.js +141 -406
- package/dist/es/components/runtime/utils/page-permission-util.js +22 -531
- package/dist/es/components/runtime/utils/page-store.js +23 -68
- package/dist/es/components/runtime/utils/store-util.js +9 -13
- package/dist/es/components/runtime/utils/store.js +2 -2
- package/dist/es/components/runtime/utils/table-utils.d.ts +4 -0
- package/dist/es/components/runtime/utils/table-utils.js +40 -81
- package/dist/es/components/runtime/utils/tree-utils.js +17 -37
- 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 +21 -83
- package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue2.js +14 -46
- package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +36 -132
- package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue2.js +4 -18
- package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue2.js +17 -107
- package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +50 -198
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue.js +12 -42
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +7 -60
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +52 -203
- 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 +46 -162
- package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +32 -109
- package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +43 -166
- package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +32 -117
- package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +32 -118
- package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +246 -597
- package/dist/es/components/runtime/views/assemblys/chart/table/group-column-item.vue.js +4 -42
- package/dist/es/components/runtime/views/assemblys/chart/table/group-column-item.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/group-column.vue.js +8 -62
- package/dist/es/components/runtime/views/assemblys/chart/table/group-column.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue.js +29 -160
- package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/table-pageination.vue.js +13 -62
- package/dist/es/components/runtime/views/assemblys/chart/table/table-pageination.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +212 -594
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +29 -139
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue.js +21 -125
- package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue.js +16 -102
- package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue2.js +18 -81
- package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue2.js +17 -82
- package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue2.js +14 -86
- package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +21 -79
- package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue2.js +16 -61
- package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue2.js +10 -37
- package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +38 -127
- package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue2.js +28 -76
- package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +61 -178
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +317 -810
- 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 +262 -635
- 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 +40 -115
- package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +56 -215
- package/dist/es/components/runtime/views/assemblys/error-render.vue.js +3 -21
- package/dist/es/components/runtime/views/assemblys/error-render.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +42 -154
- package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue.js +34 -98
- package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +52 -200
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +68 -239
- package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +31 -109
- 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 +21 -59
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +56 -188
- package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +22 -103
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +57 -245
- 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 +32 -174
- package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +28 -107
- package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue.js +4 -4
- package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue2.js +13 -50
- package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +64 -194
- 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 +88 -249
- 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 +80 -263
- package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue2.js +13 -57
- package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +30 -155
- package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +40 -129
- package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +22 -107
- package/dist/es/components/runtime/views/assemblys/home-chart-render.vue.js +89 -188
- 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 +133 -272
- 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 +18 -46
- package/dist/es/components/runtime/views/assemblys/workflow/text-history/textflow-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/workflow/text-history/textflow-runtime.vue2.js +21 -49
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +20 -58
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-node/workflownode-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-node/workflownode-runtime.vue2.js +16 -53
- package/dist/es/components/runtime/views/home-chart.vue.js +41 -160
- package/dist/es/components/runtime/views/home-chart.vue2.js +2 -2
- package/dist/es/components/runtime/views/super-page-dialog.vue.js +20 -139
- package/dist/es/components/runtime/views/super-page-dialog.vue2.js +2 -2
- package/dist/es/components/runtime/views/super-page.vue.js +226 -754
- package/dist/es/components/runtime/views/super-page.vue2.js +2 -2
- package/dist/es/i18n/langs/cn.js +2 -55
- package/dist/es/i18n/langs/en.js +2 -55
- package/package.json +2 -2
|
@@ -1,644 +1,271 @@
|
|
|
1
|
-
import { defineComponent, ref, onMounted, onUnmounted, resolveComponent, createElementBlock, openBlock, createBlock, createCommentVNode, unref } from "vue";
|
|
2
|
-
import { setTableEvents, gridSelectRecord, gridSelectAllRecords, gridSelectionChange, cellClick, cellDblClick, rowClick, rowDblClick, headerClick, getHandleEvent } from "../../../../utils/events/event-util.js";
|
|
3
|
-
import { caculateShowCondition, setVariableValue, getVariableValue, getSizeConfig } from "../../../../utils/page-helper-util.js";
|
|
4
|
-
import { getModelFields, getDefaultValue } from "../../../../utils/page-init-util.js";
|
|
5
|
-
import
|
|
6
|
-
import { popupToPage, getOperationButtons } from "../../../../utils/table-utils.js";
|
|
7
|
-
import { getListCode, getBaseUrl } from "../../../../utils/common-util.js";
|
|
8
|
-
import { getAdditionalParamMap } from "../../../../utils/events/standard-event.js";
|
|
9
|
-
import { getRowStyleUtil, getCellStyleUtil, getHeaderCellStyleUtil } from "../../chart/table/chart-table-util.js";
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
}
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
const rowKeyProp = configure.props.dataOrigin.principalLinkage;
|
|
50
|
-
const listViewOptions = ref({
|
|
51
|
-
isSql: true,
|
|
52
|
-
subTableData: null,
|
|
53
|
-
rowKeyProp,
|
|
54
|
-
extraParam: {},
|
|
55
|
-
operations: {},
|
|
56
|
-
hiddenColumns: [],
|
|
57
|
-
pageCode: pageContext.code,
|
|
58
|
-
pageVersion: pageContext.version,
|
|
59
|
-
pageContext,
|
|
60
|
-
configureObj: configure,
|
|
61
|
-
showPageArea: false,
|
|
62
|
-
showRowForm: false,
|
|
63
|
-
showOverflowTooltip: !!(configure.props && configure.props.otherSettings && (configure.props.otherSettings.isBreakLine === void 0 || configure.props.otherSettings.isBreakLine === false)),
|
|
64
|
-
// 单元格内容是否换行显示
|
|
65
|
-
backendUrl: baseURL,
|
|
66
|
-
cellStyleRender: getCellStyle,
|
|
67
|
-
rowStyleRender: getRowStyle,
|
|
68
|
-
titleStyleRender: getTitleStyle
|
|
69
|
-
});
|
|
70
|
-
const $emit = __emit;
|
|
71
|
-
if (runtimeStyle) {
|
|
72
|
-
listViewOptions.value["tableStyle"] = runtimeStyle;
|
|
73
|
-
}
|
|
74
|
-
if (runtimeClass) {
|
|
75
|
-
listViewOptions.value["tableClass"] = runtimeClass;
|
|
76
|
-
}
|
|
77
|
-
if (configure.props && configure.props.base && configure.props.base.subPaging === true) {
|
|
78
|
-
listViewOptions.value.showPageArea = true;
|
|
79
|
-
} else {
|
|
80
|
-
listViewOptions.value.showPageArea = false;
|
|
81
|
-
}
|
|
82
|
-
if (configure.props.base.showRowForm) {
|
|
83
|
-
listViewOptions.value.showRowForm = configure.props.base.showRowForm;
|
|
84
|
-
}
|
|
85
|
-
const gridRef = ref(null);
|
|
86
|
-
onMounted(() => {
|
|
87
|
-
const tableUuid = configure.uuid;
|
|
88
|
-
const subTableWatchProps = pageContext.subTableWatchProps;
|
|
89
|
-
bus.$on("_refreshSubTable_" + tableUuid, (params) => {
|
|
90
|
-
console.log("-_refreshSubTable--tableUuid=", tableUuid, "params=", params);
|
|
91
|
-
const propName = params.propName;
|
|
92
|
-
if (subTableWatchProps && subTableWatchProps[tableUuid] && subTableWatchProps[tableUuid].length > 0) {
|
|
93
|
-
const mainFormProps = subTableWatchProps[tableUuid];
|
|
94
|
-
if (mainFormProps.indexOf(propName) >= 0) {
|
|
95
|
-
reloadSubTableData();
|
|
96
|
-
}
|
|
97
|
-
}
|
|
98
|
-
});
|
|
99
|
-
bus.$on("_refreshSubTableHandle_" + tableUuid, (params) => {
|
|
100
|
-
console.log("-_refreshSubTableHandle_--tableUuid=", tableUuid, "params=", params);
|
|
101
|
-
reloadSubTableData();
|
|
102
|
-
});
|
|
103
|
-
bus.$on(
|
|
104
|
-
"_refreshChildData_" + tableUuid,
|
|
105
|
-
(gridData) => {
|
|
106
|
-
console.log("-_refreshChildData_--tableUuid=", tableUuid);
|
|
107
|
-
refreshChildTableData(gridData);
|
|
108
|
-
}
|
|
109
|
-
);
|
|
110
|
-
bus.$on(listCode + "-pickFileDone", (data) => {
|
|
111
|
-
console.log("superPage5555---listCode---pickFileDone--listCode=", listCode, "data=", data);
|
|
112
|
-
gridRef.value.pickFileDone(data);
|
|
113
|
-
});
|
|
114
|
-
bus.$on(listCode + "-scanDone", (data) => {
|
|
115
|
-
console.log("superPage5555---listCode---scanDone--listCode=", listCode, "data=", data);
|
|
116
|
-
gridRef.value.scanDone(data);
|
|
117
|
-
});
|
|
118
|
-
if (listViewOptions.value && listViewOptions.value.configureObj.props.base && listViewOptions.value.configureObj.props.base.isSafeDelete) {
|
|
119
|
-
$emit("setSafeDeleteTableCode", listViewOptions.value.extraParam.tableName);
|
|
120
|
-
}
|
|
121
|
-
});
|
|
122
|
-
function reloadSubTableData() {
|
|
123
|
-
if (gridRef.value) {
|
|
124
|
-
listViewOptions.value["subTableData"] = null;
|
|
125
|
-
gridRef.value.reloadSubTableData(listCode);
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
onUnmounted(() => {
|
|
129
|
-
if (timer) {
|
|
130
|
-
clearTimeout(timer);
|
|
131
|
-
}
|
|
132
|
-
if (timer2) {
|
|
133
|
-
clearTimeout(timer2);
|
|
134
|
-
}
|
|
135
|
-
const tableUuid = configure.uuid;
|
|
136
|
-
bus.$off("_refreshSubTable_" + tableUuid);
|
|
137
|
-
bus.$off("_refreshSubTableHandle_" + tableUuid);
|
|
138
|
-
bus.$off("_refreshChildData_" + tableUuid);
|
|
139
|
-
bus.$off(listCode + "-pickFileDone");
|
|
140
|
-
bus.$off(listCode + "-scanDone");
|
|
141
|
-
});
|
|
142
|
-
function currencyListViewSetting(canRrefreshSubtableData) {
|
|
143
|
-
if (canRrefreshSubtableData === void 0) {
|
|
144
|
-
canRrefreshSubtableData = judgeInitializationSubTable();
|
|
145
|
-
}
|
|
146
|
-
listViewOptions.value["isPageInfo"] = false;
|
|
147
|
-
listViewOptions.value["isFormSubTable"] = true;
|
|
148
|
-
listViewOptions.value["canRrefreshSubtableData"] = canRrefreshSubtableData;
|
|
149
|
-
listViewOptions.value["getFormData"] = getParentFormData;
|
|
150
|
-
listViewOptions.value["getGridData"] = getGridData;
|
|
151
|
-
listViewOptions.value.extraParam["subTableListViewCode"] = listCode;
|
|
152
|
-
listViewOptions.value.extraParam["beanName"] = pageContext.beanName;
|
|
153
|
-
listViewOptions.value.extraParam["subtableSetting"] = configure.props && configure.props.otherSettings ? JSON.stringify(configure.props.otherSettings) : null;
|
|
154
|
-
listViewOptions.value.extraParam["additionalParamMap"] = additionalParamMap;
|
|
155
|
-
listViewOptions.value.extraParam["entityMap"] = pageContext.entity.data;
|
|
156
|
-
listViewOptions.value.extraParam["contextMap"] = pageContext.entity.context;
|
|
157
|
-
listViewOptions.value.extraParam["taskMap"] = pageContext.entity.task;
|
|
158
|
-
if (!(configure.props && configure.props.base && configure.props.base.showOperation)) {
|
|
159
|
-
let hiddenColumns = listViewOptions.value.hiddenColumns;
|
|
160
|
-
if (!hiddenColumns) {
|
|
161
|
-
hiddenColumns = ["operation"];
|
|
162
|
-
} else {
|
|
163
|
-
hiddenColumns.push("operation");
|
|
164
|
-
}
|
|
165
|
-
listViewOptions.value["hiddenColumns"] = hiddenColumns;
|
|
166
|
-
}
|
|
167
|
-
listViewOptions.value["showOperationButton"] = configure.props && configure.props.base ? configure.props.base.showOperation : false;
|
|
168
|
-
listViewOptions.value["isPdfEditor"] = false;
|
|
169
|
-
listViewOptions.value["tableRecordMaxNum"] = configure.props && configure.props.otherSettings ? configure.props.otherSettings.tableRecordMaxNum : null;
|
|
170
|
-
let sizeConfig = getSizeConfig(pageContext, configure);
|
|
171
|
-
if (sizeConfig && sizeConfig.fixHeight) {
|
|
172
|
-
listViewOptions.value["formSetHeight"] = sizeConfig.fixHeight;
|
|
173
|
-
}
|
|
174
|
-
if (sizeConfig && sizeConfig.maxHeight) {
|
|
175
|
-
listViewOptions.value["formSetMaxHeight"] = sizeConfig.maxHeight;
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
function judgeInitializationSubTable() {
|
|
179
|
-
if (!configure.props || !configure.props.otherSettings) {
|
|
180
|
-
return;
|
|
181
|
-
}
|
|
182
|
-
if (configure.props.otherSettings.sourceQueryTableData && configure.props.otherSettings.timeToInitializeSubTable && configure.props.otherSettings.timeToInitializeSubTable.length > 0) {
|
|
183
|
-
let flag = false;
|
|
184
|
-
if (configure.props.otherSettings.timeToInitializeSubTable.indexOf("create") !== -1) {
|
|
185
|
-
if (dataModel.id || dataModel.ID) {
|
|
186
|
-
flag = false;
|
|
187
|
-
} else {
|
|
188
|
-
flag = true;
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
if (configure.props.otherSettings.timeToInitializeSubTable.indexOf("noData") !== -1) {
|
|
192
|
-
const tableData = dataModel[prop];
|
|
193
|
-
if (!tableData || tableData.length <= 0) {
|
|
194
|
-
flag = true;
|
|
195
|
-
}
|
|
196
|
-
}
|
|
197
|
-
return flag;
|
|
198
|
-
} else {
|
|
199
|
-
return false;
|
|
200
|
-
}
|
|
201
|
-
}
|
|
202
|
-
function getParentFormData() {
|
|
203
|
-
return pageContext.entity.data;
|
|
204
|
-
}
|
|
205
|
-
function getGridData() {
|
|
206
|
-
return getVariableValue(entity, dynamicFields);
|
|
207
|
-
}
|
|
208
|
-
function initializationSubTable() {
|
|
209
|
-
const canRrefreshSubtableData = judgeInitializationSubTable();
|
|
210
|
-
if (canRrefreshSubtableData) {
|
|
211
|
-
changeInitializationSubTable(canRrefreshSubtableData);
|
|
212
|
-
} else {
|
|
213
|
-
currencyListViewSetting(canRrefreshSubtableData);
|
|
214
|
-
listViewOptions.value["isPageInfo"] = false;
|
|
215
|
-
listViewOptions.value["subTableData"] = getValue();
|
|
216
|
-
setGridDataEventOptions();
|
|
217
|
-
}
|
|
218
|
-
}
|
|
219
|
-
let timer;
|
|
220
|
-
let timer2;
|
|
221
|
-
function changeInitializationSubTable(canRrefreshSubtableData) {
|
|
222
|
-
currencyListViewSetting(canRrefreshSubtableData);
|
|
223
|
-
listViewOptions.value["subTableData"] = null;
|
|
224
|
-
setGridDataEventOptions();
|
|
225
|
-
listViewShowFlag.value = false;
|
|
226
|
-
timer = setTimeout(() => {
|
|
227
|
-
listViewShowFlag.value = true;
|
|
228
|
-
componentKey.value = componentKey.value + 1;
|
|
229
|
-
setGridToStore();
|
|
230
|
-
}, 10);
|
|
231
|
-
}
|
|
232
|
-
function setGridDataEventOptions() {
|
|
233
|
-
setSubTableValidateInfo();
|
|
234
|
-
setTableEvents(listViewOptions.value, tableEvents, pageContext, configure);
|
|
235
|
-
const customEvents = pageContext.customEvents;
|
|
236
|
-
if (customEvents) {
|
|
237
|
-
listViewOptions.value["eventCallBack"] = customEvents;
|
|
238
|
-
}
|
|
239
|
-
listViewShowFlag.value = true;
|
|
240
|
-
setGridToStore();
|
|
241
|
-
}
|
|
242
|
-
function setSubTableValidateInfo() {
|
|
243
|
-
const fieldPermissionMap = pageContext.fieldPermissionMap;
|
|
244
|
-
const actionPermissionMap = pageContext.actionPermissionMap;
|
|
245
|
-
if (fieldPermissionMap && fieldPermissionMap != null) {
|
|
246
|
-
let validateRules = fieldPermissionMap.get(prop);
|
|
247
|
-
if (!validateRules) {
|
|
248
|
-
const allValidateRules = fieldPermissionMap.get("all_fields");
|
|
249
|
-
if (allValidateRules) {
|
|
250
|
-
validateRules = [allValidateRules];
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
if (validateRules) {
|
|
254
|
-
listViewOptions.value["validateRules"] = validateRules;
|
|
255
|
-
} else {
|
|
256
|
-
listViewOptions.value["validateRules"] = null;
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
if (actionPermissionMap && actionPermissionMap != null) {
|
|
260
|
-
let actionPermission = actionPermissionMap.get(prop);
|
|
261
|
-
if (!actionPermission) {
|
|
262
|
-
actionPermission = actionPermissionMap.get("all_sub_tables");
|
|
263
|
-
}
|
|
264
|
-
listViewOptions.value["actionPermission"] = actionPermission;
|
|
265
|
-
}
|
|
266
|
-
if (!listViewOptions.value["operations"]) {
|
|
267
|
-
listViewOptions.value["operations"] = {};
|
|
268
|
-
}
|
|
269
|
-
const subTableOperations = getOperations();
|
|
270
|
-
listViewOptions.value["operations"]["operation"] = subTableOperations;
|
|
271
|
-
listViewOptions.value["subTableCanAdd"] = isShowAddWf();
|
|
272
|
-
}
|
|
273
|
-
function setGridToStore() {
|
|
274
|
-
if (!pageContext.tableUuids) {
|
|
275
|
-
pageContext.tableUuids = [];
|
|
276
|
-
}
|
|
277
|
-
if (pageContext.tableUuids.indexOf(configure.uuid) < 0) {
|
|
278
|
-
pageContext.tableUuids.push(configure.uuid);
|
|
279
|
-
}
|
|
280
|
-
}
|
|
281
|
-
function getOperations() {
|
|
282
|
-
let operations = [];
|
|
283
|
-
let isShowOperation = caculateShowCondition(props.pageContext, configure.props.base.showOperationCondition);
|
|
284
|
-
if (isShowOperation && isShowAddWf()) {
|
|
285
|
-
const addButton = {
|
|
286
|
-
props: {
|
|
287
|
-
elementType: "el-button",
|
|
288
|
-
icon: "Plus",
|
|
289
|
-
type: "primary",
|
|
290
|
-
circle: true,
|
|
291
|
-
size: "mini",
|
|
292
|
-
permission: "true"
|
|
293
|
-
},
|
|
294
|
-
onClick: addSubTableData,
|
|
295
|
-
isShow: isShowAdd
|
|
296
|
-
};
|
|
297
|
-
operations.push(addButton);
|
|
298
|
-
}
|
|
299
|
-
if (isShowOperation && isShowDeleteWf(null, null, null, null, null, true)) {
|
|
300
|
-
const removeButton = {
|
|
301
|
-
props: {
|
|
302
|
-
elementType: "el-button",
|
|
303
|
-
icon: "Minus",
|
|
304
|
-
type: "danger",
|
|
305
|
-
circle: true,
|
|
306
|
-
size: "mini",
|
|
307
|
-
permission: "true"
|
|
308
|
-
},
|
|
309
|
-
onClick: removeSubTableData,
|
|
310
|
-
isShow: isShowDelete
|
|
311
|
-
};
|
|
312
|
-
operations.push(removeButton);
|
|
313
|
-
}
|
|
314
|
-
getOperationButtons(pageContext, configure, operations, getOperationButtonClickEvent);
|
|
315
|
-
return operations;
|
|
316
|
-
}
|
|
317
|
-
const operationButtonObj = ref({});
|
|
318
|
-
function getOperationButtonClickEvent(buttonConfigure) {
|
|
319
|
-
if (!buttonConfigure) {
|
|
320
|
-
return;
|
|
321
|
-
}
|
|
322
|
-
operationButtonObj.value[buttonConfigure.uuid] = buttonConfigure;
|
|
323
|
-
let onClick = customButtonClick;
|
|
324
|
-
return onClick;
|
|
325
|
-
}
|
|
326
|
-
function customButtonClick(originalValue, formatValue, row, column, rowIndex, button) {
|
|
327
|
-
const otherParams = {
|
|
328
|
-
originalValue,
|
|
329
|
-
formatValue,
|
|
330
|
-
row,
|
|
331
|
-
column,
|
|
332
|
-
rowIndex,
|
|
333
|
-
button,
|
|
334
|
-
id: row.ID ? row.ID : row.id
|
|
335
|
-
};
|
|
336
|
-
const buttonConfigure = operationButtonObj.value[button.sourceButton.uuid];
|
|
337
|
-
const tableConfigure = configure;
|
|
338
|
-
buttonConfigure.props.base.tableUuid = tableConfigure.uuid;
|
|
339
|
-
getHandleEvent(null, pageContext, buttonConfigure, "click", otherParams);
|
|
340
|
-
}
|
|
341
|
-
initializationSubTable();
|
|
342
|
-
function getEntityId(row) {
|
|
343
|
-
if (row && row.id) {
|
|
344
|
-
return row.id;
|
|
345
|
-
} else if (row && row.ID) {
|
|
346
|
-
return row.ID;
|
|
347
|
-
}
|
|
348
|
-
}
|
|
349
|
-
function isShowAddWf(originalValue, formatValue, row, column, rowIndex, isFormJudge) {
|
|
350
|
-
const isShowOperation = caculateShowCondition(props.pageContext, configure.props.base.showOperationCondition);
|
|
351
|
-
if (!isShowOperation) {
|
|
352
|
-
return false;
|
|
353
|
-
}
|
|
354
|
-
const fieldPermissionMap = pageContext.fieldPermissionMap;
|
|
355
|
-
const actionPermissionMap = pageContext.actionPermissionMap;
|
|
356
|
-
let canAdd = true;
|
|
357
|
-
if (fieldPermissionMap && fieldPermissionMap !== null) {
|
|
358
|
-
const allFieldPermission = fieldPermissionMap.get("all_fields");
|
|
359
|
-
if (typeof allFieldPermission !== "undefined" && allFieldPermission.canEdit === false && (allFieldPermission.rowIndexes === void 0 || allFieldPermission.rowIndexes === null || allFieldPermission.rowIndexes.length === 0)) {
|
|
360
|
-
canAdd = false;
|
|
361
|
-
}
|
|
362
|
-
}
|
|
363
|
-
if (canAdd === true && prop && actionPermissionMap && actionPermissionMap !== null) {
|
|
364
|
-
let oneTableActionPermission = actionPermissionMap.get(prop);
|
|
365
|
-
if (!oneTableActionPermission) {
|
|
366
|
-
oneTableActionPermission = actionPermissionMap.get("all_sub_tables");
|
|
367
|
-
}
|
|
368
|
-
if (oneTableActionPermission && oneTableActionPermission.canAdd !== void 0 && oneTableActionPermission.canAdd === false) {
|
|
369
|
-
canAdd = false;
|
|
1
|
+
import { defineComponent as e, ref as t, onMounted as n, onUnmounted as o, resolveComponent as i, createElementBlock as a, openBlock as l, createBlock as u, createCommentVNode as r, unref as s } from "vue";
|
|
2
|
+
import { setTableEvents as c, gridSelectRecord as p, gridSelectAllRecords as f, gridSelectionChange as d, cellClick as b, cellDblClick as v, rowClick as g, rowDblClick as m, headerClick as h, getHandleEvent as S } from "../../../../utils/events/event-util.js";
|
|
3
|
+
import { caculateShowCondition as w, setVariableValue as T, getVariableValue as x, getSizeConfig as D } from "../../../../utils/page-helper-util.js";
|
|
4
|
+
import { getModelFields as C, getDefaultValue as y } from "../../../../utils/page-init-util.js";
|
|
5
|
+
import P from "../../../../utils/eventBus.js";
|
|
6
|
+
import { popupToPage as I, getOperationButtons as R } from "../../../../utils/table-utils.js";
|
|
7
|
+
import { getListCode as O, getBaseUrl as _ } from "../../../../utils/common-util.js";
|
|
8
|
+
import { getAdditionalParamMap as k } from "../../../../utils/events/standard-event.js";
|
|
9
|
+
import { getRowStyleUtil as M, getCellStyleUtil as F, getHeaderCellStyleUtil as $ } from "../../chart/table/chart-table-util.js";
|
|
10
|
+
const j = e({ __name: "sub-table-runtime", props: { pageContext: {}, configure: {} }, emits: ["setSafeDeleteTableCode"], setup(e2, { expose: j2, emit: N }) {
|
|
11
|
+
const A = e2, H = A.pageContext;
|
|
12
|
+
let L = A.configure;
|
|
13
|
+
const B = A.configure.runtime ? A.configure.runtime : {};
|
|
14
|
+
H.isTest ? B.value = A.configure.runtime ? A.configure.runtime : {} : H.tableRuntimes && H.tableRuntimes[L.uuid] && (L = JSON.parse(H.tableRuntimes[L.uuid].configure), B.value = L.runtime ? L.runtime : {});
|
|
15
|
+
const E = O(H.code, H.version, L.uuid), U = H.entity.data, z = L.code ? L.code : E, V = k(H), G = B && B.events ? B.events : [], J = t([]), q = H.superGridItems, K = q ? q[L.uuid] : null, Q = B.style, W = B.class, X = A.pageContext.entity ? A.pageContext.entity : {};
|
|
16
|
+
let Y = C(A.configure, z), Z = _(H.backendUrl, H.isTest);
|
|
17
|
+
Z || (Z = window.$vueApp.config.globalProperties.baseURL);
|
|
18
|
+
const ee = t(false);
|
|
19
|
+
let te = t(0);
|
|
20
|
+
const ne = L.props.dataOrigin.principalLinkage, oe = t({ isSql: true, subTableData: null, rowKeyProp: ne, extraParam: {}, operations: {}, hiddenColumns: [], pageCode: H.code, pageVersion: H.version, pageContext: H, configureObj: L, showPageArea: false, showRowForm: false, showOverflowTooltip: !(!L.props || !L.props.otherSettings || void 0 !== L.props.otherSettings.isBreakLine && false !== L.props.otherSettings.isBreakLine), backendUrl: Z, cellStyleRender: function(e3) {
|
|
21
|
+
return F(e3, e3.cellStyle, A);
|
|
22
|
+
}, rowStyleRender: function(e3) {
|
|
23
|
+
return M(e3, null, A);
|
|
24
|
+
}, titleStyleRender: function(e3) {
|
|
25
|
+
const t2 = e3.titleStyle, n2 = A.configure.style.titleStyle;
|
|
26
|
+
return $(e3, { cellTitleStyle: t2, titleStyle: n2 }, A);
|
|
27
|
+
} }), ie = N;
|
|
28
|
+
Q && (oe.value.tableStyle = Q), W && (oe.value.tableClass = W), L.props && L.props.base && true === L.props.base.subPaging ? oe.value.showPageArea = true : oe.value.showPageArea = false, L.props.base.showRowForm && (oe.value.showRowForm = L.props.base.showRowForm);
|
|
29
|
+
const ae = t(null);
|
|
30
|
+
function le() {
|
|
31
|
+
ae.value && (oe.value.subTableData = null, ae.value.reloadSubTableData(E));
|
|
32
|
+
}
|
|
33
|
+
function ue(e3) {
|
|
34
|
+
if (void 0 === e3 && (e3 = re()), oe.value.isPageInfo = false, oe.value.isFormSubTable = true, oe.value.canRrefreshSubtableData = e3, oe.value.getFormData = se, oe.value.getGridData = ce, oe.value.extraParam.subTableListViewCode = E, oe.value.extraParam.beanName = H.beanName, oe.value.extraParam.subtableSetting = L.props && L.props.otherSettings ? JSON.stringify(L.props.otherSettings) : null, oe.value.extraParam.additionalParamMap = V, oe.value.extraParam.entityMap = H.entity.data, oe.value.extraParam.contextMap = H.entity.context, oe.value.extraParam.taskMap = H.entity.task, !(L.props && L.props.base && L.props.base.showOperation)) {
|
|
35
|
+
let e4 = oe.value.hiddenColumns;
|
|
36
|
+
e4 ? e4.push("operation") : e4 = ["operation"], oe.value.hiddenColumns = e4;
|
|
37
|
+
}
|
|
38
|
+
oe.value.showOperationButton = !(!L.props || !L.props.base) && L.props.base.showOperation, oe.value.isPdfEditor = false, oe.value.tableRecordMaxNum = L.props && L.props.otherSettings ? L.props.otherSettings.tableRecordMaxNum : null;
|
|
39
|
+
let t2 = D(H, L);
|
|
40
|
+
t2 && t2.fixHeight && (oe.value.formSetHeight = t2.fixHeight), t2 && t2.maxHeight && (oe.value.formSetMaxHeight = t2.maxHeight);
|
|
41
|
+
}
|
|
42
|
+
function re() {
|
|
43
|
+
if (L.props && L.props.otherSettings) {
|
|
44
|
+
if (L.props.otherSettings.sourceQueryTableData && L.props.otherSettings.timeToInitializeSubTable && L.props.otherSettings.timeToInitializeSubTable.length > 0) {
|
|
45
|
+
let e3 = false;
|
|
46
|
+
if (-1 !== L.props.otherSettings.timeToInitializeSubTable.indexOf("create") && (e3 = !U.id && !U.ID), -1 !== L.props.otherSettings.timeToInitializeSubTable.indexOf("noData")) {
|
|
47
|
+
const t2 = U[z];
|
|
48
|
+
(!t2 || t2.length <= 0) && (e3 = true);
|
|
370
49
|
}
|
|
50
|
+
return e3;
|
|
371
51
|
}
|
|
372
|
-
return
|
|
373
|
-
}
|
|
374
|
-
function isShowAdd(originalValue, formatValue, row, column, rowIndex, isFormJudge) {
|
|
375
|
-
let canAdd = isShowAddWf();
|
|
376
|
-
if (canAdd === true) {
|
|
377
|
-
canAdd = caculateShowCondition(props.pageContext, configure.props.base.showAddBtnCondition, row);
|
|
378
|
-
}
|
|
379
|
-
return canAdd;
|
|
52
|
+
return false;
|
|
380
53
|
}
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
if (
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
if (isFormJudge) {
|
|
403
|
-
canDelete = true;
|
|
404
|
-
} else {
|
|
405
|
-
const rowId = getEntityId(row);
|
|
406
|
-
if (rowId !== void 0 && oneTableActionPermission.deleteRowIndexes.indexOf(rowId) >= 0) {
|
|
407
|
-
canDelete = true;
|
|
408
|
-
} else {
|
|
409
|
-
canDelete = false;
|
|
410
|
-
}
|
|
411
|
-
}
|
|
412
|
-
} else {
|
|
413
|
-
canDelete = false;
|
|
414
|
-
}
|
|
415
|
-
}
|
|
54
|
+
}
|
|
55
|
+
function se() {
|
|
56
|
+
return H.entity.data;
|
|
57
|
+
}
|
|
58
|
+
function ce() {
|
|
59
|
+
return x(X, Y);
|
|
60
|
+
}
|
|
61
|
+
let pe, fe;
|
|
62
|
+
function de(e3) {
|
|
63
|
+
ue(e3), oe.value.subTableData = null, be(), ee.value = false, pe = setTimeout(() => {
|
|
64
|
+
ee.value = true, te.value = te.value + 1, ve();
|
|
65
|
+
}, 10);
|
|
66
|
+
}
|
|
67
|
+
function be() {
|
|
68
|
+
!function() {
|
|
69
|
+
const e4 = H.fieldPermissionMap, t2 = H.actionPermissionMap;
|
|
70
|
+
if (e4 && null != e4) {
|
|
71
|
+
let t3 = e4.get(z);
|
|
72
|
+
if (!t3) {
|
|
73
|
+
const n3 = e4.get("all_fields");
|
|
74
|
+
n3 && (t3 = [n3]);
|
|
416
75
|
}
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
}
|
|
430
|
-
function removeSubTableData(originalValue, formatValue, row, column, rowIndex) {
|
|
431
|
-
gridRef.value.deleteRow(rowIndex, listCode, false);
|
|
432
|
-
}
|
|
433
|
-
function changeGridData(gridData) {
|
|
434
|
-
setVariableValue(entity, dynamicFields, gridData);
|
|
435
|
-
}
|
|
436
|
-
function changeRowsPerpage(pageSize) {
|
|
437
|
-
console.log("表单组件--Item--changeRowsPerpage==pageSize=", pageSize);
|
|
438
|
-
if (!pageContext.subTablePageInfo) {
|
|
439
|
-
pageContext.subTablePageInfo = {};
|
|
440
|
-
}
|
|
441
|
-
pageContext.subTablePageInfo[prop] = { pageSize };
|
|
442
|
-
}
|
|
443
|
-
function setSelectOptions(valueSetOptions) {
|
|
444
|
-
const propName = valueSetOptions.key;
|
|
445
|
-
const options = valueSetOptions.value;
|
|
446
|
-
if (!pageContext.selectOptions) {
|
|
447
|
-
pageContext.selectOptions = {};
|
|
448
|
-
}
|
|
449
|
-
pageContext.selectOptions[propName] = options;
|
|
450
|
-
}
|
|
451
|
-
function fnProhibitToEdit(data) {
|
|
452
|
-
const myPageCode = pageContext.code;
|
|
453
|
-
const eventPageInfo = myPageCode + "_";
|
|
454
|
-
bus.$emit(eventPageInfo + "prohibit-edit", data);
|
|
455
|
-
}
|
|
456
|
-
function refresMainTableFields(entity2) {
|
|
457
|
-
const dataModel2 = pageContext.entity.data;
|
|
458
|
-
if (entity2) {
|
|
459
|
-
for (const key in entity2) {
|
|
460
|
-
dataModel2[key] = entity2[key];
|
|
76
|
+
oe.value.validateRules = t3 || null;
|
|
77
|
+
}
|
|
78
|
+
if (t2 && null != t2) {
|
|
79
|
+
let e5 = t2.get(z);
|
|
80
|
+
e5 || (e5 = t2.get("all_sub_tables")), oe.value.actionPermission = e5;
|
|
81
|
+
}
|
|
82
|
+
oe.value.operations || (oe.value.operations = {});
|
|
83
|
+
const n2 = function() {
|
|
84
|
+
let e5 = [], t3 = w(A.pageContext, L.props.base.showOperationCondition);
|
|
85
|
+
if (t3 && Se()) {
|
|
86
|
+
const t4 = { props: { elementType: "el-button", icon: "Plus", type: "primary", circle: true, size: "mini", permission: "true" }, onClick: De, isShow: we };
|
|
87
|
+
e5.push(t4);
|
|
461
88
|
}
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
if (row !== void 0) {
|
|
466
|
-
selections.value = selection;
|
|
467
|
-
const params = {
|
|
468
|
-
selection,
|
|
469
|
-
row
|
|
470
|
-
};
|
|
471
|
-
gridSelectRecord(pageContext, configure, params);
|
|
472
|
-
}
|
|
473
|
-
}
|
|
474
|
-
function selectAll(selection) {
|
|
475
|
-
selections.value = selection;
|
|
476
|
-
const params = {
|
|
477
|
-
selection
|
|
478
|
-
};
|
|
479
|
-
gridSelectAllRecords(pageContext, configure, params);
|
|
480
|
-
}
|
|
481
|
-
function selectionChange(newSelection) {
|
|
482
|
-
const params = {
|
|
483
|
-
newSelection
|
|
484
|
-
};
|
|
485
|
-
gridSelectionChange(pageContext, configure, params);
|
|
486
|
-
}
|
|
487
|
-
function cellClickEvent(row, column, cell, event) {
|
|
488
|
-
const params = {
|
|
489
|
-
row,
|
|
490
|
-
column,
|
|
491
|
-
cell,
|
|
492
|
-
event
|
|
493
|
-
};
|
|
494
|
-
cellClick(pageContext, configure, params);
|
|
495
|
-
}
|
|
496
|
-
function cellDblClickEvent(row, column, cell, event) {
|
|
497
|
-
const params = {
|
|
498
|
-
row,
|
|
499
|
-
column,
|
|
500
|
-
cell,
|
|
501
|
-
event
|
|
502
|
-
};
|
|
503
|
-
cellDblClick(pageContext, configure, params);
|
|
504
|
-
}
|
|
505
|
-
function rowClickEvent(row, column, event) {
|
|
506
|
-
const params = {
|
|
507
|
-
row,
|
|
508
|
-
column,
|
|
509
|
-
event
|
|
510
|
-
};
|
|
511
|
-
rowClick(pageContext, configure, params);
|
|
512
|
-
}
|
|
513
|
-
function rowDblClickEvent(row, column, event) {
|
|
514
|
-
const params = {
|
|
515
|
-
row,
|
|
516
|
-
column,
|
|
517
|
-
event
|
|
518
|
-
};
|
|
519
|
-
rowDblClick(pageContext, configure, params);
|
|
520
|
-
}
|
|
521
|
-
function headerClickEvent(column, event) {
|
|
522
|
-
const params = {
|
|
523
|
-
column,
|
|
524
|
-
event
|
|
525
|
-
};
|
|
526
|
-
headerClick(pageContext, configure, params);
|
|
527
|
-
}
|
|
528
|
-
function changeFormData(formData) {
|
|
529
|
-
pageContext.entity.data = formData;
|
|
530
|
-
}
|
|
531
|
-
function validatorSunTableListData() {
|
|
532
|
-
return gridRef.value.validatorSunTableListData();
|
|
533
|
-
}
|
|
534
|
-
function createRow() {
|
|
535
|
-
return gridRef.value.createRow(listCode);
|
|
536
|
-
}
|
|
537
|
-
function getSelections() {
|
|
538
|
-
return selections.value;
|
|
539
|
-
}
|
|
540
|
-
function getSelectionIds() {
|
|
541
|
-
const dataIds = [];
|
|
542
|
-
if (selections.value) {
|
|
543
|
-
selections.value.forEach((item) => {
|
|
544
|
-
dataIds.push(item.id ? item.id : item.ID ? item.ID : null);
|
|
545
|
-
});
|
|
546
|
-
}
|
|
547
|
-
return dataIds;
|
|
548
|
-
}
|
|
549
|
-
function clearSelections() {
|
|
550
|
-
selections.value = [];
|
|
551
|
-
}
|
|
552
|
-
function getTableConfigure() {
|
|
553
|
-
return configure;
|
|
554
|
-
}
|
|
555
|
-
function getValue() {
|
|
556
|
-
return getVariableValue(entity, dynamicFields);
|
|
557
|
-
}
|
|
558
|
-
function setValue(value) {
|
|
559
|
-
return setVariableValue(entity, dynamicFields, value);
|
|
560
|
-
}
|
|
561
|
-
function refreshChildTableData(gridData) {
|
|
562
|
-
setValue(gridData);
|
|
563
|
-
timer2 = setTimeout(() => {
|
|
564
|
-
if (gridRef.value) {
|
|
565
|
-
gridRef.value.refreshChildData(listCode, gridData, configure.props && configure.props.base && configure.props.base.subPaging === true);
|
|
566
|
-
listViewOptions.value.extraParam["entityMap"] = pageContext.entity.data;
|
|
89
|
+
if (t3 && Te(null, null, null, null, null, true)) {
|
|
90
|
+
const t4 = { props: { elementType: "el-button", icon: "Minus", type: "danger", circle: true, size: "mini", permission: "true" }, onClick: Ce, isShow: xe };
|
|
91
|
+
e5.push(t4);
|
|
567
92
|
}
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
|
|
578
|
-
|
|
579
|
-
|
|
580
|
-
|
|
581
|
-
|
|
582
|
-
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
|
|
586
|
-
|
|
587
|
-
|
|
588
|
-
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
93
|
+
return R(H, L, e5, me), e5;
|
|
94
|
+
}();
|
|
95
|
+
oe.value.operations.operation = n2, oe.value.subTableCanAdd = Se();
|
|
96
|
+
}(), c(oe.value, G, H, L);
|
|
97
|
+
const e3 = H.customEvents;
|
|
98
|
+
e3 && (oe.value.eventCallBack = e3), ee.value = true, ve();
|
|
99
|
+
}
|
|
100
|
+
function ve() {
|
|
101
|
+
H.tableUuids || (H.tableUuids = []), H.tableUuids.indexOf(L.uuid) < 0 && H.tableUuids.push(L.uuid);
|
|
102
|
+
}
|
|
103
|
+
n(() => {
|
|
104
|
+
const e3 = L.uuid, t2 = H.subTableWatchProps;
|
|
105
|
+
P.$on("_refreshSubTable_" + e3, (n2) => {
|
|
106
|
+
const o2 = n2.propName;
|
|
107
|
+
if (t2 && t2[e3] && t2[e3].length > 0) {
|
|
108
|
+
t2[e3].indexOf(o2) >= 0 && le();
|
|
109
|
+
}
|
|
110
|
+
}), P.$on("_refreshSubTableHandle_" + e3, (e4) => {
|
|
111
|
+
le();
|
|
112
|
+
}), P.$on("_refreshChildData_" + e3, (e4) => {
|
|
113
|
+
!function(e5) {
|
|
114
|
+
Be(e5), fe = setTimeout(() => {
|
|
115
|
+
ae.value && (ae.value.refreshChildData(E, e5, L.props && L.props.base && true === L.props.base.subPaging), oe.value.extraParam.entityMap = H.entity.data);
|
|
116
|
+
}, 10);
|
|
117
|
+
}(e4);
|
|
118
|
+
}), P.$on(E + "-pickFileDone", (e4) => {
|
|
119
|
+
ae.value.pickFileDone(e4);
|
|
120
|
+
}), P.$on(E + "-scanDone", (e4) => {
|
|
121
|
+
ae.value.scanDone(e4);
|
|
122
|
+
}), oe.value && oe.value.configureObj.props.base && oe.value.configureObj.props.base.isSafeDelete && ie("setSafeDeleteTableCode", oe.value.extraParam.tableName);
|
|
123
|
+
}), o(() => {
|
|
124
|
+
pe && clearTimeout(pe), fe && clearTimeout(fe);
|
|
125
|
+
const e3 = L.uuid;
|
|
126
|
+
P.$off("_refreshSubTable_" + e3), P.$off("_refreshSubTableHandle_" + e3), P.$off("_refreshChildData_" + e3), P.$off(E + "-pickFileDone"), P.$off(E + "-scanDone");
|
|
127
|
+
});
|
|
128
|
+
const ge = t({});
|
|
129
|
+
function me(e3) {
|
|
130
|
+
if (!e3) return;
|
|
131
|
+
return ge.value[e3.uuid] = e3, he;
|
|
132
|
+
}
|
|
133
|
+
function he(e3, t2, n2, o2, i2, a2) {
|
|
134
|
+
const l2 = { originalValue: e3, formatValue: t2, row: n2, column: o2, rowIndex: i2, button: a2, id: n2.ID ? n2.ID : n2.id }, u2 = ge.value[a2.sourceButton.uuid], r2 = L;
|
|
135
|
+
u2.props.base.tableUuid = r2.uuid, S(null, H, u2, "click", l2);
|
|
136
|
+
}
|
|
137
|
+
function Se(e3, t2, n2, o2, i2, a2) {
|
|
138
|
+
if (!w(A.pageContext, L.props.base.showOperationCondition)) return false;
|
|
139
|
+
const l2 = H.fieldPermissionMap, u2 = H.actionPermissionMap;
|
|
140
|
+
let r2 = true;
|
|
141
|
+
if (l2 && null !== l2) {
|
|
142
|
+
const e4 = l2.get("all_fields");
|
|
143
|
+
void 0 === e4 || false !== e4.canEdit || void 0 !== e4.rowIndexes && null !== e4.rowIndexes && 0 !== e4.rowIndexes.length || (r2 = false);
|
|
144
|
+
}
|
|
145
|
+
if (true === r2 && z && u2 && null !== u2) {
|
|
146
|
+
let e4 = u2.get(z);
|
|
147
|
+
e4 || (e4 = u2.get("all_sub_tables")), e4 && void 0 !== e4.canAdd && false === e4.canAdd && (r2 = false);
|
|
148
|
+
}
|
|
149
|
+
return r2;
|
|
150
|
+
}
|
|
151
|
+
function we(e3, t2, n2, o2, i2, a2) {
|
|
152
|
+
let l2 = Se();
|
|
153
|
+
return true === l2 && (l2 = w(A.pageContext, L.props.base.showAddBtnCondition, n2)), l2;
|
|
154
|
+
}
|
|
155
|
+
function Te(e3, t2, n2, o2, i2, a2) {
|
|
156
|
+
const l2 = H.fieldPermissionMap, u2 = H.actionPermissionMap;
|
|
157
|
+
let r2 = true;
|
|
158
|
+
if (l2 && null !== l2) {
|
|
159
|
+
const e4 = l2.get("all_fields");
|
|
160
|
+
void 0 === e4 || false !== e4.canEdit || void 0 !== e4.rowIndexes && null !== e4.rowIndexes && 0 !== e4.rowIndexes.length || (r2 = false);
|
|
161
|
+
}
|
|
162
|
+
if (true === r2 && z && u2 && null !== u2) {
|
|
163
|
+
let e4 = u2.get(z);
|
|
164
|
+
if (e4 || (e4 = u2.get("all_sub_tables")), e4 && void 0 !== e4.canDelete && false === e4.canDelete && (r2 = false), e4 && void 0 !== e4.canDelete && true === e4.canDelete && e4.deleteRowIndexes) if (e4.deleteRowIndexes.length > 0) if (a2) r2 = true;
|
|
165
|
+
else {
|
|
166
|
+
const t3 = function(e5) {
|
|
167
|
+
return e5 && e5.id ? e5.id : e5 && e5.ID ? e5.ID : void 0;
|
|
168
|
+
}(n2);
|
|
169
|
+
r2 = void 0 !== t3 && e4.deleteRowIndexes.indexOf(t3) >= 0;
|
|
170
|
+
}
|
|
171
|
+
else r2 = false;
|
|
172
|
+
}
|
|
173
|
+
return r2;
|
|
174
|
+
}
|
|
175
|
+
function xe(e3, t2, n2, o2, i2, a2) {
|
|
176
|
+
let l2 = Te(0, 0, n2, 0, 0, a2);
|
|
177
|
+
return true === l2 && (l2 = w(A.pageContext, L.props.base.showDeleteBtnCondition, n2)), l2;
|
|
178
|
+
}
|
|
179
|
+
function De(e3, t2, n2, o2, i2) {
|
|
180
|
+
ae.value.createRow(E, {}, { getDefaultValueFunc: y });
|
|
181
|
+
}
|
|
182
|
+
function Ce(e3, t2, n2, o2, i2) {
|
|
183
|
+
ae.value.deleteRow(i2, E, false);
|
|
184
|
+
}
|
|
185
|
+
function ye(e3) {
|
|
186
|
+
T(X, Y, e3);
|
|
187
|
+
}
|
|
188
|
+
function Pe(e3) {
|
|
189
|
+
H.subTablePageInfo || (H.subTablePageInfo = {}), H.subTablePageInfo[z] = { pageSize: e3 };
|
|
190
|
+
}
|
|
191
|
+
function Ie(e3) {
|
|
192
|
+
const t2 = e3.key, n2 = e3.value;
|
|
193
|
+
H.selectOptions || (H.selectOptions = {}), H.selectOptions[t2] = n2;
|
|
194
|
+
}
|
|
195
|
+
function Re(e3) {
|
|
196
|
+
const t2 = H.code + "_";
|
|
197
|
+
P.$emit(t2 + "prohibit-edit", e3);
|
|
198
|
+
}
|
|
199
|
+
function Oe(e3) {
|
|
200
|
+
const t2 = H.entity.data;
|
|
201
|
+
if (e3) for (const n2 in e3) t2[n2] = e3[n2];
|
|
202
|
+
}
|
|
203
|
+
function _e(e3, t2) {
|
|
204
|
+
if (void 0 !== t2) {
|
|
205
|
+
J.value = e3;
|
|
206
|
+
p(H, L, { selection: e3, row: t2 });
|
|
596
207
|
}
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
});
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
|
|
624
|
-
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
|
|
632
|
-
|
|
633
|
-
|
|
634
|
-
|
|
635
|
-
|
|
636
|
-
|
|
637
|
-
|
|
638
|
-
|
|
639
|
-
|
|
640
|
-
|
|
641
|
-
})
|
|
208
|
+
}
|
|
209
|
+
function ke(e3) {
|
|
210
|
+
J.value = e3;
|
|
211
|
+
f(H, L, { selection: e3 });
|
|
212
|
+
}
|
|
213
|
+
function Me(e3) {
|
|
214
|
+
d(H, L, { newSelection: e3 });
|
|
215
|
+
}
|
|
216
|
+
function Fe(e3, t2, n2, o2) {
|
|
217
|
+
b(H, L, { row: e3, column: t2, cell: n2, event: o2 });
|
|
218
|
+
}
|
|
219
|
+
function $e(e3, t2, n2, o2) {
|
|
220
|
+
v(H, L, { row: e3, column: t2, cell: n2, event: o2 });
|
|
221
|
+
}
|
|
222
|
+
function je(e3, t2, n2) {
|
|
223
|
+
g(H, L, { row: e3, column: t2, event: n2 });
|
|
224
|
+
}
|
|
225
|
+
function Ne(e3, t2, n2) {
|
|
226
|
+
m(H, L, { row: e3, column: t2, event: n2 });
|
|
227
|
+
}
|
|
228
|
+
function Ae(e3, t2) {
|
|
229
|
+
h(H, L, { column: e3, event: t2 });
|
|
230
|
+
}
|
|
231
|
+
function He(e3) {
|
|
232
|
+
H.entity.data = e3;
|
|
233
|
+
}
|
|
234
|
+
function Le() {
|
|
235
|
+
return x(X, Y);
|
|
236
|
+
}
|
|
237
|
+
function Be(e3) {
|
|
238
|
+
return T(X, Y, e3);
|
|
239
|
+
}
|
|
240
|
+
return function() {
|
|
241
|
+
const e3 = re();
|
|
242
|
+
e3 ? de(e3) : (ue(e3), oe.value.isPageInfo = false, oe.value.subTableData = Le(), be());
|
|
243
|
+
}(), j2({ createRow: function() {
|
|
244
|
+
return ae.value.createRow(E);
|
|
245
|
+
}, getSelections: function() {
|
|
246
|
+
return J.value;
|
|
247
|
+
}, getSelectionIds: function() {
|
|
248
|
+
const e3 = [];
|
|
249
|
+
return J.value && J.value.forEach((t2) => {
|
|
250
|
+
e3.push(t2.id ? t2.id : t2.ID ? t2.ID : null);
|
|
251
|
+
}), e3;
|
|
252
|
+
}, clearSelections: function() {
|
|
253
|
+
J.value = [];
|
|
254
|
+
}, getTableConfigure: function() {
|
|
255
|
+
return L;
|
|
256
|
+
}, validatorSunTableListData: function() {
|
|
257
|
+
return ae.value.validatorSunTableListData();
|
|
258
|
+
}, getValue: Le, setValue: Be, getTableSelectOptions: function() {
|
|
259
|
+
if (ae.value) return ae.value.getTableSelectOptions(E);
|
|
260
|
+
}, dynamicControlTableEdit: function(e3, t2, n2) {
|
|
261
|
+
ae.value && ae.value.dynamicControlTableEdit(e3, t2, n2);
|
|
262
|
+
}, doLayout: function(e3) {
|
|
263
|
+
ae.value && ae.value.doLayout(e3);
|
|
264
|
+
} }), (e3, t2) => {
|
|
265
|
+
const n2 = i("super-grid");
|
|
266
|
+
return l(), a("div", null, [ee.value ? (l(), u(n2, { key: 0, ref_key: "gridRef", ref: ae, url: s(Z) + "/dsc/commons/sub-table", options: oe.value, code: s(E), settings: s(K), onSelect: _e, onSelectAll: ke, onSelectionChange: Me, onCellClick: Fe, onCellDblclick: $e, onRowClick: je, onRowDblclick: Ne, onHeaderClick: Ae, onFnProhibitToEdit: Re, onChangeGridData: ye, onReloadGrid: de, onRefresMainTableFields: Oe, onSetSelectOptions: Ie, onChangeRowsPerPage: Pe, onNewOpenGridDialog: s(I), onChangeFormData: He }, null, 8, ["url", "options", "code", "settings", "onNewOpenGridDialog"])) : r("", true)]);
|
|
267
|
+
};
|
|
268
|
+
} });
|
|
642
269
|
export {
|
|
643
|
-
|
|
270
|
+
j as default
|
|
644
271
|
};
|