super-page-runtime 2.0.8 → 2.0.9
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/index.d.ts +3 -3
- package/dist/es/components/runtime/utils/page-helper-util.d.ts +1 -1
- package/dist/es/components/runtime/utils/page-helper-util.js +4 -1
- package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +196 -18
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue.js +44 -0
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue2.js +4 -0
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +76 -6
- package/dist/es/index.d.ts +2 -2
- package/dist/es/index.js +2 -2
- package/dist/lib/_virtual/AttributeMap.js +4 -0
- package/dist/lib/_virtual/Delta.js +4 -0
- package/dist/lib/_virtual/Op.js +4 -0
- package/dist/lib/_virtual/OpIterator.js +4 -0
- package/dist/lib/_virtual/__vite-browser-external.js +3 -0
- package/dist/lib/_virtual/_commonjsHelpers.js +8 -0
- package/dist/lib/_virtual/_plugin-vue_export-helper.js +9 -0
- package/dist/lib/_virtual/dayjs.min.js +4 -0
- package/dist/lib/_virtual/index.js +4 -0
- package/dist/lib/_virtual/index2.js +4 -0
- package/dist/lib/_virtual/index3.js +4 -0
- package/dist/lib/assets/chart-themes/theme1.d.ts +4 -0
- package/dist/lib/assets/chart-themes/theme1.js +7 -0
- package/dist/lib/assets/chart-themes/theme2.d.ts +4 -0
- package/dist/lib/assets/chart-themes/theme2.js +7 -0
- package/dist/lib/assets/chart-themes/theme3.d.ts +4 -0
- package/dist/lib/assets/chart-themes/theme3.js +7 -0
- package/dist/lib/components/runtime/index.d.ts +4 -0
- package/dist/lib/components/runtime/utils/api/api-util.d.ts +11 -0
- package/dist/lib/components/runtime/utils/api/api-util.js +128 -0
- package/dist/lib/components/runtime/utils/assemblys-config.js +258 -0
- package/dist/lib/components/runtime/utils/charts/chart-util.d.ts +11 -0
- package/dist/lib/components/runtime/utils/charts/chart-util.js +28 -0
- package/dist/lib/components/runtime/utils/common-util.d.ts +16 -0
- package/dist/lib/components/runtime/utils/common-util.js +94 -0
- package/dist/lib/components/runtime/utils/eventBus.d.ts +7 -0
- package/dist/lib/components/runtime/utils/eventBus.js +10 -0
- package/dist/lib/components/runtime/utils/events/event-util.d.ts +48 -0
- package/dist/lib/components/runtime/utils/events/event-util.js +526 -0
- package/dist/lib/components/runtime/utils/events/standard-event.d.ts +61 -0
- package/dist/lib/components/runtime/utils/events/standard-event.js +1625 -0
- package/dist/lib/components/runtime/utils/events/validator-util.d.ts +4 -0
- package/dist/lib/components/runtime/utils/events/validator-util.js +389 -0
- package/dist/lib/components/runtime/utils/global-refs.d.ts +59 -0
- package/dist/lib/components/runtime/utils/global-refs.js +65 -0
- package/dist/lib/components/runtime/utils/interfaces/page-design-types.d.ts +223 -0
- package/dist/lib/components/runtime/utils/interfaces/page-design-types.js +9 -0
- package/dist/lib/components/runtime/utils/page-helper-util.d.ts +106 -0
- package/dist/lib/components/runtime/utils/page-helper-util.js +622 -0
- package/dist/lib/components/runtime/utils/page-init-util.d.ts +38 -0
- package/dist/lib/components/runtime/utils/page-init-util.js +200 -0
- package/dist/lib/components/runtime/utils/page-permission-util.d.ts +26 -0
- package/dist/lib/components/runtime/utils/page-permission-util.js +525 -0
- package/dist/lib/components/runtime/utils/store-util.d.ts +15 -0
- package/dist/lib/components/runtime/utils/store-util.js +17 -0
- package/dist/lib/components/runtime/utils/store.d.ts +2 -0
- package/dist/lib/components/runtime/utils/store.js +3 -0
- package/dist/lib/components/runtime/utils/table-utils.js +24 -0
- package/dist/lib/components/runtime/views/assemblys/button/button/button-runtime.vue.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +54 -0
- package/dist/lib/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue2.js +35 -0
- package/dist/lib/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +110 -0
- package/dist/lib/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +432 -0
- package/dist/lib/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue.js +43 -0
- package/dist/lib/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue2.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +61 -0
- package/dist/lib/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue2.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +126 -0
- package/dist/lib/components/runtime/views/assemblys/chart/common/common-chart-header.vue2.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +52 -0
- package/dist/lib/components/runtime/views/assemblys/chart/pie/pie-runtime.vue.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +54 -0
- package/dist/lib/components/runtime/views/assemblys/chart/radar/radar-runtime.vue.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +54 -0
- package/dist/lib/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +56 -0
- package/dist/lib/components/runtime/views/assemblys/common/export-form-report-dialog.vue.d.ts +24 -0
- package/dist/lib/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +147 -0
- package/dist/lib/components/runtime/views/assemblys/common/export-form-report-dialog.vue2.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/common/remove-signer-dialog.vue.d.ts +35 -0
- package/dist/lib/components/runtime/views/assemblys/common/remove-signer-dialog.vue.js +127 -0
- package/dist/lib/components/runtime/views/assemblys/common/remove-signer-dialog.vue2.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/common/task-informition-dialog.vue.d.ts +26 -0
- package/dist/lib/components/runtime/views/assemblys/common/task-informition-dialog.vue.js +104 -0
- package/dist/lib/components/runtime/views/assemblys/common/task-informition-dialog.vue2.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/container/card/card-runtime.vue.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/container/card/card-runtime.vue2.js +72 -0
- package/dist/lib/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue2.js +74 -0
- package/dist/lib/components/runtime/views/assemblys/container/container/container-runtime.vue.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/container/container/container-runtime.vue2.js +79 -0
- package/dist/lib/components/runtime/views/assemblys/container/flex/flex-runtime.vue.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +43 -0
- package/dist/lib/components/runtime/views/assemblys/container/form/form-runtime.vue.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/container/form/form-runtime.vue2.js +44 -0
- package/dist/lib/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue2.js +30 -0
- package/dist/lib/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +69 -0
- package/dist/lib/components/runtime/views/assemblys/container/tools/tools-runtime.vue.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/container/tools/tools-runtime.vue2.js +75 -0
- package/dist/lib/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +642 -0
- package/dist/lib/components/runtime/views/assemblys/data/table/main-table-runtime.vue2.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +453 -0
- package/dist/lib/components/runtime/views/assemblys/data/table/sub-table-runtime.vue2.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/data/table/table-runtime.vue.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +88 -0
- package/dist/lib/components/runtime/views/assemblys/error-render.vue.d.ts +22 -0
- package/dist/lib/components/runtime/views/assemblys/error-render.vue.js +22 -0
- package/dist/lib/components/runtime/views/assemblys/error-render.vue2.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +156 -0
- package/dist/lib/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +82 -0
- package/dist/lib/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +64 -0
- package/dist/lib/components/runtime/views/assemblys/form/divider/divider-runtime.vue.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/form/divider/divider-runtime.vue2.js +40 -0
- package/dist/lib/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +74 -0
- package/dist/lib/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +63 -0
- package/dist/lib/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +127 -0
- package/dist/lib/components/runtime/views/assemblys/form/label/label-runtime.vue.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +127 -0
- package/dist/lib/components/runtime/views/assemblys/form/link/link-runtime.vue.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +77 -0
- package/dist/lib/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue2.js +29 -0
- package/dist/lib/components/runtime/views/assemblys/form/radio/radio-runtime.vue.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +157 -0
- package/dist/lib/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +164 -0
- package/dist/lib/components/runtime/views/assemblys/form/select/select-runtime.vue.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +201 -0
- package/dist/lib/components/runtime/views/assemblys/form/switch/switch-runtime.vue.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +63 -0
- package/dist/lib/components/runtime/views/assemblys/form/tag/tag-runtime.vue.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +63 -0
- package/dist/lib/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +65 -0
- package/dist/lib/components/runtime/views/assemblys/object-render.vue.d.ts +17 -0
- package/dist/lib/components/runtime/views/assemblys/object-render.vue.js +142 -0
- package/dist/lib/components/runtime/views/assemblys/object-render.vue2.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue.js +3 -0
- package/dist/lib/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +61 -0
- package/dist/lib/components/runtime/views/super-page-dialog.vue.d.ts +36 -0
- package/dist/lib/components/runtime/views/super-page-dialog.vue.js +73 -0
- package/dist/lib/components/runtime/views/super-page-dialog.vue2.js +3 -0
- package/dist/lib/components/runtime/views/super-page.vue.d.ts +91 -0
- package/dist/lib/components/runtime/views/super-page.vue.js +496 -0
- package/dist/lib/components/runtime/views/super-page.vue2.js +3 -0
- package/dist/lib/favicon.ico +0 -0
- package/dist/lib/index.d.ts +8 -0
- package/dist/lib/index.js +15 -0
- package/package.json +1 -1
|
@@ -0,0 +1,200 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
|
|
3
|
+
const request = require("../../../node_modules/.pnpm/agilebuilder-ui@1.0.13_vue@3.4.21/node_modules/agilebuilder-ui/src/utils/request.js");
|
|
4
|
+
const vueRouter = require("../../../node_modules/.pnpm/vue-router@4.3.0_vue@3.4.21/node_modules/vue-router/dist/vue-router.js");
|
|
5
|
+
const pageDesignTypes = require("./interfaces/page-design-types.js");
|
|
6
|
+
const pageHelperUtil = require("./page-helper-util.js");
|
|
7
|
+
function queryPageDesignByCode(pageCode) {
|
|
8
|
+
return request.get("/component/super-page-design/runtime/" + pageCode);
|
|
9
|
+
}
|
|
10
|
+
function convertToPageContext(pageDesign, pageRequest) {
|
|
11
|
+
if (pageDesign == null) {
|
|
12
|
+
return null;
|
|
13
|
+
}
|
|
14
|
+
const pageContext = {
|
|
15
|
+
uuid: pageDesign.uuid,
|
|
16
|
+
name: pageDesign.name,
|
|
17
|
+
label: pageDesign.label,
|
|
18
|
+
code: pageDesign.code,
|
|
19
|
+
version: pageDesign.version,
|
|
20
|
+
dimensions: pageDesign.dimensions,
|
|
21
|
+
rules: pageDesign.rules,
|
|
22
|
+
// 表单验证规则
|
|
23
|
+
tableUuids: pageDesign.tableUuids,
|
|
24
|
+
// 表格uuid集合
|
|
25
|
+
tableNames: pageDesign.tableNames,
|
|
26
|
+
// 当前页面中表格对应的数据表名集合,后台保存子表记录时需要
|
|
27
|
+
formNoRuleCode: pageDesign.formNoRuleCode,
|
|
28
|
+
// 表单编号规则
|
|
29
|
+
judgeHeavyList: pageDesign.judgeHeavyList,
|
|
30
|
+
// 判重组合字段集合配置
|
|
31
|
+
conversionCodes: pageDesign.conversionCodes,
|
|
32
|
+
// 数据转换规则
|
|
33
|
+
pageType: pageDesign.pageType,
|
|
34
|
+
// 页面类型:form、list、chart
|
|
35
|
+
beanName: pageDesign.beanName,
|
|
36
|
+
// 业务处理类,继承CommonBaseService接口的类
|
|
37
|
+
importBeanName: pageDesign.importBeanName,
|
|
38
|
+
// 导入处理类,继承ImportDefinitionService接口的类
|
|
39
|
+
notIdInitializationList: pageDesign.notIdInitializationList,
|
|
40
|
+
// 无ID或taskId时初始条件配置
|
|
41
|
+
subTablePageInfo: pageDesign.subTablePageInfo,
|
|
42
|
+
// 列表分页信息,格式是:{列表编码: 每页显示多少条记录},表单页面中校验有分页的子表时提示使用,提示信息格式:第 {pageNum} 页第 {row} 行记录
|
|
43
|
+
customValidatorUuids: pageDesign.customEvents,
|
|
44
|
+
// 自定义组件启用了“自定义校验”开关的uuid集合
|
|
45
|
+
entity: {
|
|
46
|
+
data: {},
|
|
47
|
+
task: {},
|
|
48
|
+
request: getRequestObject(pageRequest),
|
|
49
|
+
//初始化request对象
|
|
50
|
+
page: {},
|
|
51
|
+
context: {},
|
|
52
|
+
system: {}
|
|
53
|
+
}
|
|
54
|
+
};
|
|
55
|
+
if (pageDesign.props.activeWorkflow && pageDesign.props.workflowSource && pageDesign.props.workflowSource === "link") {
|
|
56
|
+
pageContext.workflowCode = pageDesign.props.linkWorkflowCode;
|
|
57
|
+
} else if (pageDesign.props.activeWorkflow && pageDesign.props.workflowSource && pageDesign.props.workflowSource === "create") {
|
|
58
|
+
pageContext.workflowCode = pageDesign.props.createWorkflowCode;
|
|
59
|
+
}
|
|
60
|
+
if (pageDesign.variables) {
|
|
61
|
+
const pageObj = pageContext.entity.page;
|
|
62
|
+
for (const variable of pageDesign.variables) {
|
|
63
|
+
if (variable.name) {
|
|
64
|
+
if (variable.isArrayElement) {
|
|
65
|
+
pageObj[variable.name] = [];
|
|
66
|
+
} else {
|
|
67
|
+
pageObj[variable.name] = void 0;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
Object.assign(pageContext, pageDesign);
|
|
73
|
+
pageContext.dimensions = getPageDimensions();
|
|
74
|
+
return pageContext;
|
|
75
|
+
}
|
|
76
|
+
function getPageDimensions() {
|
|
77
|
+
const winWidth = window.outerWidth;
|
|
78
|
+
if (!winWidth) {
|
|
79
|
+
return pageDesignTypes.PageDimensions.PC;
|
|
80
|
+
}
|
|
81
|
+
if (winWidth > 768) {
|
|
82
|
+
return pageDesignTypes.PageDimensions.PC;
|
|
83
|
+
} else if (winWidth > 414) {
|
|
84
|
+
return pageDesignTypes.PageDimensions.IPAD;
|
|
85
|
+
} else {
|
|
86
|
+
return pageDesignTypes.PageDimensions.PHONE;
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
function getRequestObject(pageRequest) {
|
|
90
|
+
const requestObj = {};
|
|
91
|
+
if (pageRequest) {
|
|
92
|
+
Object.assign(requestObj, pageRequest);
|
|
93
|
+
}
|
|
94
|
+
let url = decodeURI(window.location.href);
|
|
95
|
+
if (url && url.includes("?")) {
|
|
96
|
+
url = url.substring(url.lastIndexOf("?") + 1);
|
|
97
|
+
const strs = url.split("&");
|
|
98
|
+
for (const str of strs) {
|
|
99
|
+
const paramStrs = str.split("=");
|
|
100
|
+
requestObj[paramStrs[0]] = paramStrs.length > 1 ? paramStrs[1] : "";
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
const route = vueRouter.useRoute();
|
|
104
|
+
if (route) {
|
|
105
|
+
if (route.params) {
|
|
106
|
+
Object.assign(requestObj, route.params);
|
|
107
|
+
}
|
|
108
|
+
if (route.query) {
|
|
109
|
+
Object.assign(requestObj, route.query);
|
|
110
|
+
}
|
|
111
|
+
}
|
|
112
|
+
if (requestObj["_t_"])
|
|
113
|
+
;
|
|
114
|
+
return requestObj;
|
|
115
|
+
}
|
|
116
|
+
function getFormModelFields(pageContext, formItemConfigure) {
|
|
117
|
+
if (!formItemConfigure) {
|
|
118
|
+
return ["temp"];
|
|
119
|
+
}
|
|
120
|
+
const entity = pageContext.entity;
|
|
121
|
+
const propsBase = formItemConfigure.props.base ? formItemConfigure.props.base : {};
|
|
122
|
+
let propName = propsBase.prop;
|
|
123
|
+
let fields = null;
|
|
124
|
+
if (!propName || !propName.startsWith("${")) {
|
|
125
|
+
fields = ["page", formItemConfigure.uuid];
|
|
126
|
+
} else {
|
|
127
|
+
propName = propName.substring(2, propName.length - 1);
|
|
128
|
+
fields = propName.split(".");
|
|
129
|
+
if (fields.length < 2) {
|
|
130
|
+
fields = [formItemConfigure.uuid];
|
|
131
|
+
}
|
|
132
|
+
}
|
|
133
|
+
if (entity.data.ID == void 0 && entity.data.ID == void 0) {
|
|
134
|
+
if (propsBase.defaultValue) {
|
|
135
|
+
let defaultValue = pageHelperUtil.formatVariableValue(pageContext, propsBase.defaultValue);
|
|
136
|
+
if (defaultValue != null && defaultValue != void 0) {
|
|
137
|
+
let isMultiple = false;
|
|
138
|
+
if (formItemConfigure.name == "checkbox") {
|
|
139
|
+
isMultiple = true;
|
|
140
|
+
} else if (formItemConfigure.name == "select") {
|
|
141
|
+
isMultiple = propsBase.multiple;
|
|
142
|
+
}
|
|
143
|
+
if (isMultiple) {
|
|
144
|
+
defaultValue = (defaultValue + "").split(",");
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
pageHelperUtil.setVariableValue(entity, fields, defaultValue);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
150
|
+
return fields;
|
|
151
|
+
}
|
|
152
|
+
function getPermissionCodes(configure, pageContext) {
|
|
153
|
+
if (!pageContext || pageContext.isTest || !configure) {
|
|
154
|
+
return "";
|
|
155
|
+
}
|
|
156
|
+
const codes = [];
|
|
157
|
+
if (configure.autoPermissions) {
|
|
158
|
+
for (const p of configure.autoPermissions) {
|
|
159
|
+
codes.push(pageContext.code + "." + p.simpleCode);
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
if (configure.functionCodes) {
|
|
163
|
+
const sourceTypes = configure.sourceTypes ? configure.sourceTypes : [];
|
|
164
|
+
const functionCodes = configure.functionCodes;
|
|
165
|
+
for (let i = 0; i < functionCodes.length; i++) {
|
|
166
|
+
const functionCode = functionCodes[i];
|
|
167
|
+
const sourceType = i < sourceTypes.length ? sourceTypes[i] : "";
|
|
168
|
+
let newCode = "";
|
|
169
|
+
if (sourceType == "service") {
|
|
170
|
+
newCode = functionCode;
|
|
171
|
+
} else {
|
|
172
|
+
newCode = pageContext.code + "." + functionCode;
|
|
173
|
+
}
|
|
174
|
+
if (!codes.includes(newCode)) {
|
|
175
|
+
codes.push(newCode);
|
|
176
|
+
}
|
|
177
|
+
}
|
|
178
|
+
}
|
|
179
|
+
return codes.join(",");
|
|
180
|
+
}
|
|
181
|
+
function queryPageSuperGrids(pageDesign, pageContext, publishVersion) {
|
|
182
|
+
const tableRuntimes = pageDesign.tableRuntimes;
|
|
183
|
+
const additionalParamMap = pageContext.entity && pageContext.entity.request && Object.keys(pageContext.entity.request).length > 0 ? pageContext.entity.request : null;
|
|
184
|
+
let additionalParamMapJson;
|
|
185
|
+
const pageCode = pageContext.code;
|
|
186
|
+
if (additionalParamMap) {
|
|
187
|
+
additionalParamMapJson = JSON.stringify(additionalParamMap);
|
|
188
|
+
}
|
|
189
|
+
return request.post("/component/super-page-design/super-grids", {
|
|
190
|
+
tableRuntimes,
|
|
191
|
+
additionalParamMapJson,
|
|
192
|
+
pageCode,
|
|
193
|
+
publishVersion
|
|
194
|
+
});
|
|
195
|
+
}
|
|
196
|
+
exports.convertToPageContext = convertToPageContext;
|
|
197
|
+
exports.getFormModelFields = getFormModelFields;
|
|
198
|
+
exports.getPermissionCodes = getPermissionCodes;
|
|
199
|
+
exports.queryPageDesignByCode = queryPageDesignByCode;
|
|
200
|
+
exports.queryPageSuperGrids = queryPageSuperGrids;
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
export declare enum FuncType {
|
|
2
|
+
/**
|
|
3
|
+
* 公用
|
|
4
|
+
*/
|
|
5
|
+
AUTHENTICATED = "AUTHENTICATED",
|
|
6
|
+
/**
|
|
7
|
+
* 匿名
|
|
8
|
+
*/
|
|
9
|
+
ANONYMOUS = "ANONYMOUS",
|
|
10
|
+
/**
|
|
11
|
+
* 专用
|
|
12
|
+
*/
|
|
13
|
+
AUTHORIZED = "AUTHORIZED"
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* 根据简码获取对应的资源信息
|
|
17
|
+
* @param eventName 方法名
|
|
18
|
+
* @returns
|
|
19
|
+
*/
|
|
20
|
+
export declare function getStandPermissionInfo(eventName: string): any;
|
|
21
|
+
/**
|
|
22
|
+
* 获取资源信息
|
|
23
|
+
* @param simpleCode
|
|
24
|
+
* @returns
|
|
25
|
+
*/
|
|
26
|
+
export declare function getFunctionInfo(simpleCode: string): any;
|