super-page-runtime 2.0.10 → 2.0.13
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.d.ts +6 -1
- package/dist/es/components/runtime/utils/api/api-util.js +140 -2
- package/dist/es/components/runtime/utils/charts/chart-columnline-util.js +279 -0
- package/dist/es/components/runtime/utils/charts/chart-gauge-util.js +74 -0
- package/dist/es/components/runtime/utils/charts/chart-pie-util.js +118 -0
- package/dist/es/components/runtime/utils/charts/chart-radar-util.js +100 -0
- package/dist/es/components/runtime/utils/charts/chart-scatter-util.js +74 -0
- package/dist/es/components/runtime/utils/charts/chart-util.d.ts +40 -0
- package/dist/es/components/runtime/utils/charts/chart-util.js +288 -14
- package/dist/es/components/runtime/utils/events/event-util.d.ts +5 -0
- package/dist/es/components/runtime/utils/events/event-util.js +42 -10
- package/dist/es/components/runtime/utils/events/standard-event.d.ts +1 -0
- package/dist/es/components/runtime/utils/events/standard-event.js +54 -5
- package/dist/es/components/runtime/utils/events/validator-util.d.ts +8 -0
- package/dist/es/components/runtime/utils/events/validator-util.js +83 -57
- package/dist/es/components/runtime/utils/interfaces/page-design-types.d.ts +0 -1
- package/dist/es/components/runtime/utils/page-helper-util.d.ts +22 -0
- package/dist/es/components/runtime/utils/page-helper-util.js +59 -50
- package/dist/es/components/runtime/utils/page-init-util.d.ts +1 -0
- package/dist/es/components/runtime/utils/page-init-util.js +29 -4
- package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +8 -3
- package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +34 -322
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +2 -1
- package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +66 -12
- package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +91 -4
- package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +65 -4
- package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +65 -4
- package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +36 -1
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +1 -1
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +2 -4
- package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +22 -58
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +16 -3
- package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +10 -1
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +25 -2
- package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +5 -1
- package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +3 -2
- package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +14 -11
- package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +2 -0
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +14 -11
- package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +3 -1
- package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +4 -1
- package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +7 -1
- package/dist/es/components/runtime/views/assemblys/object-render.vue.js +2 -1
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +1 -1
- package/dist/es/components/runtime/views/super-page-dialog.vue.js +3 -0
- package/dist/es/components/runtime/views/super-page.vue.js +84 -130
- package/dist/es/index.d.ts +2 -2
- package/dist/es/index.js +2 -1
- package/package.json +2 -2
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { defineComponent, computed, ref, watch, resolveComponent, openBlock, createBlock, unref, normalizeClass, normalizeStyle, withCtx, createElementBlock, toDisplayString, createCommentVNode, createVNode, Fragment, renderList, createElementVNode } from "vue";
|
|
2
2
|
import { getVariableValue, setVariableValue, getOptionDatasFromPage, queryOptionDatasources, autoSetAfterSelect } from "../../../../utils/page-helper-util.js";
|
|
3
3
|
import { getFormModelFields } from "../../../../utils/page-init-util.js";
|
|
4
|
+
import { handleEvent } from "../../../../utils/events/event-util.js";
|
|
4
5
|
const _hoisted_1 = { style: { "float": "left" } };
|
|
5
6
|
const _hoisted_2 = { style: { "float": "right", "color": "var(--el-text-color-secondary)", "font-size": "13px" } };
|
|
6
7
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
@@ -71,9 +72,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
71
72
|
target: props.configure.props.base.optionProp
|
|
72
73
|
});
|
|
73
74
|
}
|
|
74
|
-
|
|
75
|
-
designProperty.changeMethod = optionChange;
|
|
76
|
-
}
|
|
75
|
+
designProperty.changeMethod = optionChange;
|
|
77
76
|
const monitorFields = designProperty.monitorFields;
|
|
78
77
|
const monitorFieldInfos = [];
|
|
79
78
|
if (monitorFields) {
|
|
@@ -122,13 +121,16 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
122
121
|
}, 200);
|
|
123
122
|
}
|
|
124
123
|
function optionChange(value) {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
124
|
+
if (autoSets.length > 0) {
|
|
125
|
+
let selItems = null;
|
|
126
|
+
if (listOptions.value && value != void 0 && value != null) {
|
|
127
|
+
selItems = listOptions.value.filter((item) => {
|
|
128
|
+
return Array.isArray(value) ? value.includes(item.value) : value === item.value;
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
autoSetAfterSelect(props.configure, props.pageContext, autoSets, selItems);
|
|
130
132
|
}
|
|
131
|
-
|
|
133
|
+
handleEvent(value, props.pageContext, props.configure, "change");
|
|
132
134
|
}
|
|
133
135
|
function updateOptions(newOptions) {
|
|
134
136
|
listOptions.value = newOptions ? newOptions : [];
|
|
@@ -177,7 +179,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
177
179
|
return openBlock(), createBlock(_component_el_option, {
|
|
178
180
|
key: item.value,
|
|
179
181
|
label: item.label,
|
|
180
|
-
value: item.value
|
|
182
|
+
value: item.value,
|
|
183
|
+
onClick: ($event) => unref(handleEvent)(item.value, _ctx.pageContext, _ctx.configure, "click", { values: dynamicModelMethod.value })
|
|
181
184
|
}, {
|
|
182
185
|
default: withCtx(() => [
|
|
183
186
|
item._description_ ? (openBlock(), createElementBlock(Fragment, { key: 0 }, [
|
|
@@ -186,7 +189,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
186
189
|
], 64)) : createCommentVNode("", true)
|
|
187
190
|
]),
|
|
188
191
|
_: 2
|
|
189
|
-
}, 1032, ["label", "value"]);
|
|
192
|
+
}, 1032, ["label", "value", "onClick"]);
|
|
190
193
|
}), 128))
|
|
191
194
|
]),
|
|
192
195
|
_: 1
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { defineComponent, computed, resolveComponent, openBlock, createBlock, unref, normalizeClass, normalizeStyle, withCtx, createElementBlock, toDisplayString, createCommentVNode, createVNode } from "vue";
|
|
2
2
|
import { getFormModelFields } from "../../../../utils/page-init-util.js";
|
|
3
3
|
import { getVariableValue, setVariableValue } from "../../../../utils/page-helper-util.js";
|
|
4
|
+
import { handleEvent } from "../../../../utils/events/event-util.js";
|
|
4
5
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
6
|
__name: "switch-runtime",
|
|
6
7
|
props: {
|
|
@@ -51,7 +52,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
51
52
|
size: unref(designProperty).size,
|
|
52
53
|
style: normalizeStyle(unref(switchStyle)),
|
|
53
54
|
modelValue: dynamicModelMethod.value,
|
|
54
|
-
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => dynamicModelMethod.value = $event)
|
|
55
|
+
"onUpdate:modelValue": _cache[0] || (_cache[0] = ($event) => dynamicModelMethod.value = $event),
|
|
56
|
+
onChange: _cache[1] || (_cache[1] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "change"))
|
|
55
57
|
}, null, 8, ["disabled", "active-value:", "active-text", "inactive-value", "inactive-text", "width", "size", "style", "modelValue"])
|
|
56
58
|
]),
|
|
57
59
|
_: 1
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { defineComponent, computed, resolveComponent, openBlock, createBlock, unref, normalizeClass, normalizeStyle, withCtx, createElementBlock, toDisplayString, createCommentVNode, createVNode, createTextVNode } from "vue";
|
|
2
2
|
import { getFormModelFields } from "../../../../utils/page-init-util.js";
|
|
3
3
|
import { formatVariableValue } from "../../../../utils/page-helper-util.js";
|
|
4
|
+
import { handleEvent } from "../../../../utils/events/event-util.js";
|
|
4
5
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
6
|
__name: "tag-runtime",
|
|
6
7
|
props: {
|
|
@@ -46,7 +47,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
46
47
|
createVNode(_component_el_tag, {
|
|
47
48
|
size: unref(designProperty).size,
|
|
48
49
|
closable: unref(designProperty).closable,
|
|
49
|
-
type: unref(designProperty).type
|
|
50
|
+
type: unref(designProperty).type,
|
|
51
|
+
onClose: _cache[0] || (_cache[0] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "remove")),
|
|
52
|
+
onClick: _cache[1] || (_cache[1] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "click"))
|
|
50
53
|
}, {
|
|
51
54
|
default: withCtx(() => [
|
|
52
55
|
createTextVNode(toDisplayString(dynamicValue.value), 1)
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { defineComponent, computed, resolveComponent, openBlock, createElementBlock, createVNode, unref, normalizeClass, normalizeStyle, withCtx, toDisplayString, createCommentVNode } from "vue";
|
|
2
2
|
import { getFormModelFields } from "../../../../utils/page-init-util.js";
|
|
3
3
|
import { getVariableValue, setVariableValue } from "../../../../utils/page-helper-util.js";
|
|
4
|
+
import { handleEvent } from "../../../../utils/events/event-util.js";
|
|
4
5
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
5
6
|
__name: "textarea-runtime",
|
|
6
7
|
props: {
|
|
@@ -52,7 +53,12 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
52
53
|
rows: unref(designProperty).rows ? unref(designProperty).rows : 2,
|
|
53
54
|
maxlength: unref(designProperty).maxLength,
|
|
54
55
|
"show-word-limit": unref(designProperty).showInputNum,
|
|
55
|
-
type: "textarea"
|
|
56
|
+
type: "textarea",
|
|
57
|
+
onInput: _cache[1] || (_cache[1] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "input")),
|
|
58
|
+
onChange: _cache[2] || (_cache[2] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "change")),
|
|
59
|
+
onBlur: _cache[3] || (_cache[3] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "blur")),
|
|
60
|
+
onFocus: _cache[4] || (_cache[4] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "focus")),
|
|
61
|
+
onClick: _cache[5] || (_cache[5] = ($event) => unref(handleEvent)($event, _ctx.pageContext, _ctx.configure, "click"))
|
|
56
62
|
}, null, 8, ["disabled", "readonly", "size", "clearable", "placeholder", "modelValue", "rows", "maxlength", "show-word-limit"])
|
|
57
63
|
]),
|
|
58
64
|
_: 1
|
|
@@ -3,7 +3,7 @@ import _sfc_main$1 from "./error-render.vue.js";
|
|
|
3
3
|
import { getRuntimeComponentByName } from "../../utils/assemblys-config.js";
|
|
4
4
|
import { PageDimensions } from "../../utils/interfaces/page-design-types.js";
|
|
5
5
|
import { addComponentRef, addComponentRefByCode } from "../../utils/global-refs.js";
|
|
6
|
-
import { getPermissionCodes } from "../../utils/page-init-util.js";
|
|
6
|
+
import { getPermissionCodes, packageFormRules } from "../../utils/page-init-util.js";
|
|
7
7
|
import { caculateShowCondition } from "../../utils/page-helper-util.js";
|
|
8
8
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
9
9
|
__name: "object-render",
|
|
@@ -17,6 +17,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
17
17
|
props.configure.style = {};
|
|
18
18
|
}
|
|
19
19
|
const permissionCodes = getPermissionCodes(props.configure, props.pageContext);
|
|
20
|
+
packageFormRules(props.pageContext, props.configure);
|
|
20
21
|
let handleShowFlag = ref(true);
|
|
21
22
|
let showFlag = ref(true);
|
|
22
23
|
if (props.configure && props.configure.props && props.configure.props.showConditions) {
|
|
@@ -33,7 +33,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
function isVisibleBtn(btnConfigure, pageCode, pageVersion) {
|
|
36
|
-
const events = btnConfigure.events;
|
|
36
|
+
const events = btnConfigure.runtime && btnConfigure.runtime.events ? btnConfigure.runtime.events : [];
|
|
37
37
|
const workflowStandardEventName = getStandardClickEvent(events, pageCode, pageVersion);
|
|
38
38
|
const isVisible = isVisibleWorkflowButton(
|
|
39
39
|
workflowStandardEventName,
|
|
@@ -41,6 +41,9 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
41
41
|
console.error(error);
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
|
+
pageRequest.value["parentPageCode"] = myJumpPageSetting && myJumpPageSetting["parentPageCode"] ? myJumpPageSetting["parentPageCode"] : null;
|
|
45
|
+
pageRequest.value["parentPageVersion"] = myJumpPageSetting && myJumpPageSetting["parentPageVersion"] ? myJumpPageSetting["parentPageVersion"] : null;
|
|
46
|
+
pageRequest.value["jumpMode"] = myJumpPageSetting ? myJumpPageSetting["jumpMode"] : null;
|
|
44
47
|
pageRequest.value["id"] = dataId.value;
|
|
45
48
|
pageRequest.value["taskId"] = taskId.value;
|
|
46
49
|
}
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import { defineComponent, ref, onMounted, onUpdated, nextTick, onUnmounted, openBlock, createElementBlock, normalizeClass, normalizeStyle, Fragment, renderList, createBlock, unref, createCommentVNode, createElementVNode,
|
|
1
|
+
import { defineComponent, ref, onMounted, onUpdated, nextTick, onUnmounted, openBlock, createElementBlock, normalizeClass, normalizeStyle, Fragment, renderList, createBlock, unref, createCommentVNode, createElementVNode, watch } from "vue";
|
|
2
2
|
import _sfc_main$1 from "./assemblys/object-render.vue.js";
|
|
3
3
|
import { updateOptionDatasources, updateChartDatasources } from "../utils/page-helper-util.js";
|
|
4
4
|
import { queryPageSuperGrids, queryPageDesignByCode, convertToPageContext } from "../utils/page-init-util.js";
|
|
5
|
-
import { removePageAllRef, initComponentRefState
|
|
5
|
+
import { addComponentRef, removePageAllRef, initComponentRefState } from "../utils/global-refs.js";
|
|
6
6
|
import { removeCustomFuncFromWindow, initPageEvents, handleEvent } from "../utils/events/event-util.js";
|
|
7
7
|
import _sfc_main$2 from "./assemblys/common/export-form-report-dialog.vue.js";
|
|
8
8
|
import _sfc_main$3 from "./assemblys/common/task-informition-dialog.vue.js";
|
|
9
9
|
import _sfc_main$4 from "./assemblys/common/remove-signer-dialog.vue.js";
|
|
10
10
|
import eventBus from "../utils/eventBus.js";
|
|
11
|
-
import {
|
|
12
|
-
import { getTaskInformitions, getRemoveSigner, exportFormReport, doImportFinally, doAddSigner, doCreateCopyTask, doAssign, doReturnTaskTo, doRemoveSigners } from "../utils/events/standard-event.js";
|
|
11
|
+
import { getFormData } from "../utils/api/api-util.js";
|
|
12
|
+
import { getTaskInformitions, getRemoveSigner, exportFormReport, doImportFinally, doAddSigner, doCreateCopyTask, doAssign, doReturnTaskTo, doRemoveSigners, updateValuesWhenCloseDialog } from "../utils/events/standard-event.js";
|
|
13
13
|
import { ElMessage } from "element-plus";
|
|
14
14
|
import { useI18n } from "vue-i18n";
|
|
15
15
|
import { DepartmentUserTree } from "agilebuilder-ui";
|
|
16
16
|
import { i18nValidateRulesMessage } from "../utils/events/validator-util.js";
|
|
17
17
|
import _sfc_main$5 from "./super-page-dialog.vue.js";
|
|
18
18
|
import { useRouter } from "vue-router";
|
|
19
|
-
import "agilebuilder-ui/src/utils/jump-page-utils";
|
|
19
|
+
import { jumpToPage } from "agilebuilder-ui/src/utils/jump-page-utils";
|
|
20
20
|
const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
21
21
|
__name: "super-page",
|
|
22
22
|
props: {
|
|
@@ -93,33 +93,33 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
93
93
|
const parentPageContext = ref(null);
|
|
94
94
|
const parentConfigureObj = ref(null);
|
|
95
95
|
const parentEventParams = ref(null);
|
|
96
|
-
let pageContext;
|
|
96
|
+
let pageContext = ref(null);
|
|
97
97
|
const buttonConfigure = ref(null);
|
|
98
98
|
const buttonPageContext = ref(null);
|
|
99
99
|
function initPageDesign(pageDesign) {
|
|
100
100
|
console.log("pageDesign==", pageDesign);
|
|
101
|
-
pageContext =
|
|
102
|
-
if (pageContext == null) {
|
|
101
|
+
pageContext.value = convertToPageContext(pageDesign, props.pageRequest);
|
|
102
|
+
if (pageContext.value == null) {
|
|
103
103
|
return;
|
|
104
104
|
}
|
|
105
|
-
pageContext.isTest = props.isTest;
|
|
105
|
+
pageContext.value.isTest = props.isTest;
|
|
106
106
|
setTimeout(() => {
|
|
107
|
-
initOptionDatas(pageContext, pageDesign.initOptionConfigs);
|
|
107
|
+
initOptionDatas(pageContext.value, pageDesign.initOptionConfigs);
|
|
108
108
|
}, 0);
|
|
109
109
|
setTimeout(() => {
|
|
110
110
|
console.log("pageDesign.initChartServiceConfigs", pageDesign.initChartServiceConfigs);
|
|
111
|
-
initChartDatas(pageContext, pageDesign.initChartServiceConfigs);
|
|
111
|
+
initChartDatas(pageContext.value, pageDesign.initChartServiceConfigs);
|
|
112
112
|
}, 0);
|
|
113
|
-
pageContext.initDataSources = [];
|
|
114
|
-
initComponentRefState(pageContext);
|
|
115
|
-
pageItems.value = pageContext.items ? pageContext.items : [];
|
|
116
|
-
const runtime = pageContext.runtime ? pageContext.runtime : {};
|
|
113
|
+
pageContext.value.initDataSources = [];
|
|
114
|
+
initComponentRefState(pageContext.value);
|
|
115
|
+
pageItems.value = pageContext.value.items ? pageContext.value.items : [];
|
|
116
|
+
const runtime = pageContext.value.runtime ? pageContext.value.runtime : {};
|
|
117
117
|
pageClass.value = runtime.class;
|
|
118
118
|
pageStyle.value = runtime.style;
|
|
119
|
-
initPageEvents(pageDesign, pageContext);
|
|
120
|
-
i18nValidateRulesMessage(pageContext.rules);
|
|
121
|
-
handleEvent(null, pageContext, pageDesign, "beforeload");
|
|
122
|
-
const myPageCode = pageContext.code;
|
|
119
|
+
initPageEvents(pageDesign, pageContext.value);
|
|
120
|
+
i18nValidateRulesMessage(pageContext.value.rules);
|
|
121
|
+
handleEvent(null, pageContext.value, pageDesign, "beforeload");
|
|
122
|
+
const myPageCode = pageContext.value.code;
|
|
123
123
|
eventPageInfo.value = myPageCode + "_";
|
|
124
124
|
eventBus.$on(eventPageInfo.value + "export-form-report", (params) => {
|
|
125
125
|
buttonParams.value = params;
|
|
@@ -173,21 +173,24 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
173
173
|
parentPageContext.value = params.pageContext;
|
|
174
174
|
parentConfigureObj.value = params.configureObj;
|
|
175
175
|
parentEventParams.value = params.eventParams;
|
|
176
|
-
openDialog(
|
|
176
|
+
openDialog(parentConfigureObj.value);
|
|
177
177
|
});
|
|
178
|
-
eventBus.$on(eventPageInfo.value + "close-dialog", (
|
|
179
|
-
|
|
180
|
-
parentConfigureObj.value = null;
|
|
181
|
-
parentEventParams.value = null;
|
|
182
|
-
closeDialog();
|
|
178
|
+
eventBus.$on(eventPageInfo.value + "close-dialog", ({ isNeedValueMapping, dataModel, sourceTableName }) => {
|
|
179
|
+
closeDialog({ isNeedValueMapping, dataModel, sourceTableName });
|
|
183
180
|
});
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
181
|
+
getFormData(pageContext.value);
|
|
182
|
+
watch(
|
|
183
|
+
() => pageContext.value.isRefresh,
|
|
184
|
+
(newValue) => {
|
|
185
|
+
if (newValue) {
|
|
186
|
+
isShowPage.value = false;
|
|
187
|
+
setTimeout(() => {
|
|
188
|
+
isShowPage.value = true;
|
|
189
|
+
}, 1);
|
|
190
|
+
pageContext.value.isRefresh = false;
|
|
191
|
+
}
|
|
189
192
|
}
|
|
190
|
-
|
|
193
|
+
);
|
|
191
194
|
}
|
|
192
195
|
function initOptionDatas(pageContext2, optionConfigs) {
|
|
193
196
|
if (!optionConfigs || optionConfigs.length == 0) {
|
|
@@ -218,8 +221,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
218
221
|
setTimeout(() => {
|
|
219
222
|
initPageDesign(props.pageDesign);
|
|
220
223
|
if (props.pageDesign.tableRuntimes && Object.keys(props.pageDesign.tableRuntimes).length > 0) {
|
|
221
|
-
queryPageSuperGrids(props.pageDesign, pageContext, props.publishVersion).then((superGridItems) => {
|
|
222
|
-
pageContext.superGridItems = superGridItems;
|
|
224
|
+
queryPageSuperGrids(props.pageDesign, pageContext.value, props.publishVersion).then((superGridItems) => {
|
|
225
|
+
pageContext.value.superGridItems = superGridItems;
|
|
223
226
|
isShowPage.value = true;
|
|
224
227
|
}).catch(() => {
|
|
225
228
|
isShowPage.value = true;
|
|
@@ -247,13 +250,13 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
247
250
|
});
|
|
248
251
|
onUpdated(() => {
|
|
249
252
|
nextTick(() => {
|
|
250
|
-
if (pageContext && thisRef.value) {
|
|
251
|
-
addComponentRef(pageContext, "-1", thisRef);
|
|
253
|
+
if (pageContext.value && thisRef.value) {
|
|
254
|
+
addComponentRef(pageContext.value, "-1", thisRef);
|
|
252
255
|
}
|
|
253
256
|
});
|
|
254
257
|
});
|
|
255
258
|
onUnmounted(() => {
|
|
256
|
-
removePageAllRef(pageContext);
|
|
259
|
+
removePageAllRef(pageContext.value);
|
|
257
260
|
if (pageDesignResult.value) {
|
|
258
261
|
removeCustomFuncFromWindow(pageDesignResult.value);
|
|
259
262
|
}
|
|
@@ -327,106 +330,57 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
|
|
|
327
330
|
showRemoveSigner.value = false;
|
|
328
331
|
doRemoveSigners(buttonParams.value, selectRemoveTasks);
|
|
329
332
|
}
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
fieldPermissionMap.set(subModelName, [
|
|
367
|
-
{
|
|
368
|
-
name: "all_fields",
|
|
369
|
-
canEdit: true,
|
|
370
|
-
rowIndexes: fieldPermission.rowIndexes
|
|
371
|
-
}
|
|
372
|
-
]);
|
|
373
|
-
} else {
|
|
374
|
-
fieldPermissionMap.set(subModelName, [{ name: "all_fields", canEdit: true }]);
|
|
375
|
-
}
|
|
376
|
-
}
|
|
377
|
-
} else {
|
|
378
|
-
let subTableFieldPermission = fieldPermissionMap.get(subModelName);
|
|
379
|
-
if (subTableFieldPermission) {
|
|
380
|
-
subTableFieldPermission.push(fieldPermission);
|
|
381
|
-
} else {
|
|
382
|
-
subTableFieldPermission = [];
|
|
383
|
-
subTableFieldPermission.push(fieldPermission);
|
|
384
|
-
}
|
|
385
|
-
fieldPermissionMap.set(subModelName, subTableFieldPermission);
|
|
333
|
+
const router = useRouter();
|
|
334
|
+
function openDialog(configureObj) {
|
|
335
|
+
const myJumpPageSetting = configureObj && configureObj["props"] && configureObj["props"].linkPage ? configureObj["props"].linkPage : null;
|
|
336
|
+
if (myJumpPageSetting && myJumpPageSetting.jumpPageUrl) {
|
|
337
|
+
const additionalParamMap = pageContext.value.entity.request;
|
|
338
|
+
let dataId;
|
|
339
|
+
let ids;
|
|
340
|
+
if (additionalParamMap) {
|
|
341
|
+
dataId = additionalParamMap.id;
|
|
342
|
+
ids = additionalParamMap.ids;
|
|
343
|
+
}
|
|
344
|
+
const dataModel = pageContext.value.entity.data;
|
|
345
|
+
const pageModel = pageContext.value.entity.page;
|
|
346
|
+
let entity = {};
|
|
347
|
+
if (pageModel) {
|
|
348
|
+
Object.assign(entity, pageModel);
|
|
349
|
+
}
|
|
350
|
+
if (dataModel) {
|
|
351
|
+
Object.assign(entity, dataModel);
|
|
352
|
+
}
|
|
353
|
+
jumpToPage(myJumpPageSetting, null, dataId, entity, additionalParamMap, ids).then(
|
|
354
|
+
(openPageParams) => {
|
|
355
|
+
if (openPageParams) {
|
|
356
|
+
const jumpMode = openPageParams.jumpMode;
|
|
357
|
+
const popPageSetting = openPageParams;
|
|
358
|
+
popPageSetting.parentPageCode = parentPageContext.value.code;
|
|
359
|
+
popPageSetting.parentPageVersion = parentPageContext.value.version;
|
|
360
|
+
popPageSetting.isNewPage = true;
|
|
361
|
+
if (jumpMode === "popup") {
|
|
362
|
+
jumpPageSetting.value = popPageSetting;
|
|
363
|
+
isShowDialog.value = true;
|
|
364
|
+
} else if (jumpMode === "refresh") {
|
|
365
|
+
router.push({
|
|
366
|
+
path: "/dsc/page",
|
|
367
|
+
query: popPageSetting
|
|
368
|
+
});
|
|
386
369
|
}
|
|
387
|
-
} else {
|
|
388
|
-
fieldPermissionMap.set(prop, fieldPermissions[i]);
|
|
389
370
|
}
|
|
390
371
|
}
|
|
391
|
-
|
|
372
|
+
);
|
|
373
|
+
} else {
|
|
374
|
+
console.error("页面配置信息不存在");
|
|
392
375
|
}
|
|
393
|
-
pageContext.fieldPermissionMap = fieldPermissionMap;
|
|
394
376
|
}
|
|
395
|
-
function
|
|
396
|
-
|
|
397
|
-
|
|
398
|
-
const actionPermissions = pageContext.actionPermissions;
|
|
399
|
-
if (typeof actionPermissions !== "undefined" && actionPermissions !== null) {
|
|
400
|
-
const subModelNames = Object.keys(actionPermissions);
|
|
401
|
-
subModelNames.forEach((subModelName) => {
|
|
402
|
-
const oneTableActionPermission = actionPermissions[subModelName];
|
|
403
|
-
const subTableFieldPermission = fieldPermissionMap.get(subModelName);
|
|
404
|
-
if (subTableFieldPermission && subTableFieldPermission.length > 0 && subTableFieldPermission[0].name === "all_fields" && subTableFieldPermission[0].canEdit === false) {
|
|
405
|
-
oneTableActionPermission.canUpdate = false;
|
|
406
|
-
oneTableActionPermission.canAdd = false;
|
|
407
|
-
} else {
|
|
408
|
-
const canUpdate = oneTableActionPermission.canUpdate;
|
|
409
|
-
const updateRowIndexes = oneTableActionPermission.updateRowIndexes;
|
|
410
|
-
if (canUpdate !== void 0 && canUpdate === false && updateRowIndexes !== void 0 && updateRowIndexes !== null && updateRowIndexes.length > 0) {
|
|
411
|
-
fieldPermissionMap.set(subModelName, [
|
|
412
|
-
{
|
|
413
|
-
name: "all_fields",
|
|
414
|
-
canEdit: false,
|
|
415
|
-
rowIndexes: updateRowIndexes
|
|
416
|
-
}
|
|
417
|
-
]);
|
|
418
|
-
}
|
|
419
|
-
}
|
|
420
|
-
actionPermissionMap.set(subModelName, oneTableActionPermission);
|
|
421
|
-
});
|
|
377
|
+
function closeDialog({ isNeedValueMapping, dataModel, sourceTableName }) {
|
|
378
|
+
if (isNeedValueMapping) {
|
|
379
|
+
updateValuesWhenCloseDialog(parentPageContext.value, parentConfigureObj.value, dataModel, sourceTableName);
|
|
422
380
|
}
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
function openDialog(configureObj) {
|
|
427
|
-
isShowDialog.value = true;
|
|
428
|
-
}
|
|
429
|
-
function closeDialog() {
|
|
381
|
+
parentPageContext.value = null;
|
|
382
|
+
parentConfigureObj.value = null;
|
|
383
|
+
parentEventParams.value = null;
|
|
430
384
|
isShowDialog.value = false;
|
|
431
385
|
}
|
|
432
386
|
return (_ctx, _cache) => {
|
package/dist/es/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { SuperPageNew, SuperPageDialogNew } from './components/runtime';
|
|
2
2
|
import { getComponentOptionConfigs } from './components/runtime/utils/page-helper-util';
|
|
3
3
|
import { getStandPermissionInfo, getFunctionInfo, FuncType } from './components/runtime/utils/page-permission-util';
|
|
4
|
-
import { getCustomTheme, getCustomThemeOptions } from './components/runtime/utils/charts/chart-util';
|
|
4
|
+
import { getCustomTheme, getCustomThemeOptions, getNumFormatter } from './components/runtime/utils/charts/chart-util';
|
|
5
5
|
|
|
6
6
|
export { SuperPageNew, SuperPageDialogNew, getComponentOptionConfigs };
|
|
7
7
|
export { getStandPermissionInfo, getFunctionInfo, FuncType };
|
|
8
|
-
export { getCustomTheme, getCustomThemeOptions };
|
|
8
|
+
export { getCustomTheme, getCustomThemeOptions, getNumFormatter as getNumFormatterForChart };
|
package/dist/es/index.js
CHANGED
|
@@ -2,7 +2,7 @@ import { default as default2 } from "./components/runtime/views/super-page.vue.j
|
|
|
2
2
|
import { default as default3 } from "./components/runtime/views/super-page-dialog.vue.js";
|
|
3
3
|
import { getComponentOptionConfigs } from "./components/runtime/utils/page-helper-util.js";
|
|
4
4
|
import { FuncType, getFunctionInfo, getStandPermissionInfo } from "./components/runtime/utils/page-permission-util.js";
|
|
5
|
-
import { getCustomTheme, getCustomThemeOptions } from "./components/runtime/utils/charts/chart-util.js";
|
|
5
|
+
import { getCustomTheme, getCustomThemeOptions, getNumFormatter } from "./components/runtime/utils/charts/chart-util.js";
|
|
6
6
|
export {
|
|
7
7
|
FuncType,
|
|
8
8
|
default3 as SuperPageDialogNew,
|
|
@@ -11,5 +11,6 @@ export {
|
|
|
11
11
|
getCustomTheme,
|
|
12
12
|
getCustomThemeOptions,
|
|
13
13
|
getFunctionInfo,
|
|
14
|
+
getNumFormatter as getNumFormatterForChart,
|
|
14
15
|
getStandPermissionInfo
|
|
15
16
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "super-page-runtime",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.13",
|
|
4
4
|
"description": "AgileBuilder super page runtime",
|
|
5
5
|
"license": "ISC",
|
|
6
6
|
"main": "dist/es/index.js",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"@vitejs/plugin-vue-jsx": "^3.1.0",
|
|
47
47
|
"@vue/eslint-config-prettier": "^8.0.0",
|
|
48
48
|
"@vue/test-utils": "^2.4.4",
|
|
49
|
-
"agilebuilder-ui": "1.0.
|
|
49
|
+
"agilebuilder-ui": "1.0.14",
|
|
50
50
|
"axios": "^1.6.8",
|
|
51
51
|
"cypress": "^13.6.6",
|
|
52
52
|
"element-plus": "^2.6.1",
|