super-page-runtime 2.2.29-tmp1 → 2.2.29-tmp2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/es/_virtual/_plugin-vue_export-helper.js +7 -5
- package/dist/es/assets/chart-themes/theme1.js +6 -2
- package/dist/es/assets/chart-themes/theme2.js +6 -2
- package/dist/es/assets/chart-themes/theme3.js +6 -2
- package/dist/es/components/runtime/utils/api/api-util.js +7 -4
- package/dist/es/components/runtime/utils/api/page-expose-util.js +443 -135
- package/dist/es/components/runtime/utils/assemblys-config.js +369 -13
- package/dist/es/components/runtime/utils/barcode-util.js +33 -9
- package/dist/es/components/runtime/utils/charts/chart-columnline-util.js +306 -122
- package/dist/es/components/runtime/utils/charts/chart-gauge-util.js +68 -29
- package/dist/es/components/runtime/utils/charts/chart-pie-util.js +152 -69
- package/dist/es/components/runtime/utils/charts/chart-radar-util.js +124 -46
- package/dist/es/components/runtime/utils/charts/chart-scatter-util.js +99 -38
- package/dist/es/components/runtime/utils/charts/chart-util.js +522 -226
- package/dist/es/components/runtime/utils/common-util.js +156 -76
- package/dist/es/components/runtime/utils/eventBus.js +8 -3
- package/dist/es/components/runtime/utils/events/event-util.js +775 -362
- package/dist/es/components/runtime/utils/events/print-label.js +140 -73
- package/dist/es/components/runtime/utils/events/standard-event.js +2320 -820
- package/dist/es/components/runtime/utils/events/validator-util.js +560 -224
- package/dist/es/components/runtime/utils/form/date-shortcuts.js +88 -28
- package/dist/es/components/runtime/utils/form/scan-util.js +162 -62
- package/dist/es/components/runtime/utils/global-refs.js +84 -53
- package/dist/es/components/runtime/utils/i18n-util.js +20 -11
- package/dist/es/components/runtime/utils/interfaces/page-design-types.js +7 -2
- package/dist/es/components/runtime/utils/page-helper-util.js +660 -280
- package/dist/es/components/runtime/utils/page-init-util.js +405 -144
- package/dist/es/components/runtime/utils/page-permission-util.js +531 -22
- package/dist/es/components/runtime/utils/page-store.js +68 -23
- package/dist/es/components/runtime/utils/store-util.js +13 -9
- package/dist/es/components/runtime/utils/store.js +2 -2
- package/dist/es/components/runtime/utils/table-utils.js +81 -40
- package/dist/es/components/runtime/utils/tree-utils.js +37 -17
- package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/button/button/button-runtime.vue2.js +83 -21
- package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/button/button-group/buttongroup-runtime.vue2.js +46 -14
- package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/button/dropdown/dropdown-runtime.vue2.js +132 -36
- package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/button/export-pdf/exportpdf-runtime.vue2.js +18 -4
- package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/button/print-label/printlabel-runtime.vue2.js +107 -17
- package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/column-line/column-line-runtime.vue2.js +198 -54
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue.js +42 -12
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-breadcrumb.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue.js +60 -11
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header-group.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue.js +203 -54
- package/dist/es/components/runtime/views/assemblys/chart/common/common-chart-header.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue.js +4 -4
- package/dist/es/components/runtime/views/assemblys/chart/common/common-homepage-search.vue2.js +162 -46
- package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/gauge/gauge-runtime.vue2.js +109 -33
- package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/pie/pie-runtime.vue2.js +166 -44
- package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/radar/radar-runtime.vue2.js +117 -33
- package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/scatter/scatter-runtime.vue2.js +118 -33
- package/dist/es/components/runtime/views/assemblys/chart/table/chart-table-util.js +599 -253
- package/dist/es/components/runtime/views/assemblys/chart/table/group-column-item.vue.js +42 -4
- package/dist/es/components/runtime/views/assemblys/chart/table/group-column-item.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/group-column.vue.js +62 -8
- package/dist/es/components/runtime/views/assemblys/chart/table/group-column.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue.js +160 -29
- package/dist/es/components/runtime/views/assemblys/chart/table/normal-column.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/table-pageination.vue.js +62 -13
- package/dist/es/components/runtime/views/assemblys/chart/table/table-pageination.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/chart/table/table-runtime.vue2.js +594 -213
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue.js +139 -33
- package/dist/es/components/runtime/views/assemblys/common/export-form-report-dialog.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue.js +125 -21
- package/dist/es/components/runtime/views/assemblys/common/remove-signer-dialog.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue.js +102 -16
- package/dist/es/components/runtime/views/assemblys/common/task-informition-dialog.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/card/card-runtime.vue2.js +81 -18
- package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/collapse/collapse-runtime.vue2.js +82 -17
- package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/container/container-runtime.vue2.js +86 -14
- package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/flex/flex-runtime.vue2.js +79 -21
- package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/form/form-runtime.vue2.js +61 -16
- package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/iframe/iframe-runtime.vue2.js +37 -10
- package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/tabs/tabs-runtime.vue2.js +127 -38
- package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/container/tools/tools-runtime.vue2.js +76 -28
- package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/data/bar-code/barcode-runtime.vue2.js +178 -63
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue.js +810 -305
- package/dist/es/components/runtime/views/assemblys/data/table/main-table-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue.js +635 -265
- package/dist/es/components/runtime/views/assemblys/data/table/sub-table-runtime.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/data/table/table-runtime.vue2.js +115 -40
- package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/data/tree/tree-runtime.vue2.js +215 -56
- package/dist/es/components/runtime/views/assemblys/error-render.vue.js +21 -3
- package/dist/es/components/runtime/views/assemblys/error-render.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/checkbox/checkbox-runtime.vue2.js +154 -43
- package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue.js +98 -34
- package/dist/es/components/runtime/views/assemblys/form/common/title-suffix-element.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/custom/custom-runtime.vue2.js +200 -52
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/date-picker/datepicker-runtime.vue2.js +239 -70
- package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/dept-tree/depttree-runtime.vue2.js +109 -31
- package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/divider/divider-runtime.vue2.js +59 -21
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/file-upload/fileupload-runtime.vue2.js +188 -56
- package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/input-number/input-number-runtime.vue2.js +103 -22
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/input-text/inputtext-runtime.vue2.js +246 -59
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/label/label-runtime.vue2.js +174 -34
- package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/link/link-runtime.vue2.js +107 -29
- package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue.js +4 -4
- package/dist/es/components/runtime/views/assemblys/form/placeholder/placeholder-runtime.vue2.js +50 -13
- package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/radio/radio-runtime.vue2.js +194 -65
- package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/rich-text/richtext-runtime.vue2.js +249 -89
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/select/select-runtime.vue2.js +263 -80
- package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/separatelabel/separatelabel-runtime.vue2.js +57 -13
- package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/switch/switch-runtime.vue2.js +155 -30
- package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/tag/tag-runtime.vue2.js +129 -40
- package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/form/textarea/textarea-runtime.vue2.js +107 -22
- package/dist/es/components/runtime/views/assemblys/home-chart-render.vue.js +188 -89
- package/dist/es/components/runtime/views/assemblys/home-chart-render.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/object-render.vue.js +272 -133
- package/dist/es/components/runtime/views/assemblys/object-render.vue2.js +2 -2
- package/dist/es/components/runtime/views/assemblys/workflow/picture-flow/pictureflow-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/workflow/picture-flow/pictureflow-runtime.vue2.js +46 -18
- package/dist/es/components/runtime/views/assemblys/workflow/text-history/textflow-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/workflow/text-history/textflow-runtime.vue2.js +49 -21
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-button/workflowbutton-runtime.vue2.js +58 -20
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-node/workflownode-runtime.vue.js +2 -2
- package/dist/es/components/runtime/views/assemblys/workflow/workflow-node/workflownode-runtime.vue2.js +53 -16
- package/dist/es/components/runtime/views/home-chart.vue.js +160 -41
- package/dist/es/components/runtime/views/home-chart.vue2.js +2 -2
- package/dist/es/components/runtime/views/super-page-dialog.vue.js +139 -21
- package/dist/es/components/runtime/views/super-page-dialog.vue2.js +2 -2
- package/dist/es/components/runtime/views/super-page.vue.js +756 -230
- package/dist/es/components/runtime/views/super-page.vue2.js +2 -2
- package/dist/es/i18n/langs/cn.js +55 -2
- package/dist/es/i18n/langs/en.js +55 -2
- package/package.json +2 -2
|
@@ -1,176 +1,437 @@
|
|
|
1
|
-
import
|
|
2
|
-
import { getAdditionalParamMap
|
|
3
|
-
import { PageDimensions
|
|
4
|
-
import { getFormPropName
|
|
5
|
-
import { getSessionCache
|
|
6
|
-
import { functions
|
|
7
|
-
import { isWorkflowPage
|
|
8
|
-
import { packageCustomValidator
|
|
9
|
-
import { isMobileBrowser
|
|
10
|
-
function
|
|
11
|
-
return
|
|
12
|
-
|
|
13
|
-
|
|
1
|
+
import http from "agilebuilder-ui/src/utils/request";
|
|
2
|
+
import { getAdditionalParamMap } from "./events/standard-event.js";
|
|
3
|
+
import { PageDimensions } from "./interfaces/page-design-types.js";
|
|
4
|
+
import { getFormPropName, getValueFromVariable, setVariableValue, formatVariableValue } from "./page-helper-util.js";
|
|
5
|
+
import { getSessionCache } from "agilebuilder-ui/src/utils/auth";
|
|
6
|
+
import { functions } from "./api/page-expose-util.js";
|
|
7
|
+
import { isWorkflowPage, deepCopy } from "./common-util.js";
|
|
8
|
+
import { packageCustomValidator } from "./events/validator-util.js";
|
|
9
|
+
import { isMobileBrowser } from "agilebuilder-ui/src/utils/common-util";
|
|
10
|
+
function queryPageDesignByCode(pageCode) {
|
|
11
|
+
return http.get(
|
|
12
|
+
window["$vueApp"].config.globalProperties.baseAPI + "/component/super-page-design/runtime/" + pageCode
|
|
13
|
+
);
|
|
14
|
+
}
|
|
15
|
+
function convertToPageContext(pageDesign) {
|
|
14
16
|
var _a;
|
|
15
|
-
if (
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
17
|
+
if (pageDesign == null) {
|
|
18
|
+
return null;
|
|
19
|
+
}
|
|
20
|
+
const pageContext = {
|
|
21
|
+
uuid: pageDesign.uuid,
|
|
22
|
+
name: pageDesign.name,
|
|
23
|
+
label: pageDesign.label,
|
|
24
|
+
code: pageDesign.code,
|
|
25
|
+
version: pageDesign.version,
|
|
26
|
+
dimensions: pageDesign.dimensions,
|
|
27
|
+
systemCode: pageDesign.systemCode,
|
|
28
|
+
systemVersion: pageDesign.systemVersion,
|
|
29
|
+
backendUrl: pageDesign.backendUrl,
|
|
30
|
+
rules: {},
|
|
31
|
+
// rules: pageDesign.rules, // 表单验证规则。在runtime object-render中实时获得
|
|
32
|
+
tableUuids: pageDesign.tableUuids,
|
|
33
|
+
// 表格uuid集合
|
|
34
|
+
listCodesMap: pageDesign.listCodesMap,
|
|
35
|
+
// 列表编码和列表绑定编码对应关系,key是列表编码,value是绑定编码
|
|
36
|
+
formNoRuleCode: pageDesign.props ? pageDesign.props.formNoRuleCode : null,
|
|
37
|
+
// 表单编号规则
|
|
38
|
+
judgeHeavyList: getJudgeHeavyList(pageDesign),
|
|
39
|
+
// 判重组合字段集合配置
|
|
40
|
+
// conversionCodes: pageDesign.conversionCodes, // 数据转换规则。按钮上配置的,此处不需要
|
|
41
|
+
pageType: pageDesign.pageType,
|
|
42
|
+
// 页面类型:form、list、chart
|
|
43
|
+
beanName: pageDesign.props ? pageDesign.props.beanName : null,
|
|
44
|
+
// 业务处理类,继承CommonBaseService接口的类
|
|
45
|
+
importBeanName: pageDesign.props ? pageDesign.props.importBeanName : null,
|
|
46
|
+
// 导入处理类,继承ImportDefinitionService接口的类
|
|
47
|
+
subTablePageInfo: pageDesign.subTablePageInfo,
|
|
48
|
+
// 列表分页信息,格式是:{列表编码: 每页显示多少条记录},表单页面中校验有分页的子表时提示使用,提示信息格式:第 {pageNum} 页第 {row} 行记录
|
|
49
|
+
workflowCode: pageDesign.workflowCode,
|
|
50
|
+
workflowVersion: pageDesign.workflowVersion,
|
|
51
|
+
refercePropMap: (_a = pageDesign.runtime) == null ? void 0 : _a.refercePropMap,
|
|
52
|
+
//当前表单页面中引用字段信息集合,get请求时需要使用,格式为{tableName:[字段名,.. ... ], tableName:[字段名,.. ... ]}
|
|
53
|
+
subTableWatchProps: pageDesign.subTableWatchProps,
|
|
54
|
+
dataTypeMaps: pageDesign.dataTypeMaps,
|
|
55
|
+
// 列表页面时后台会传该属性到前端
|
|
56
|
+
isWorkflowEntity: pageDesign.isWorkflowEntity,
|
|
57
|
+
// 列表页面时后台会传该属性到前端。列表删除时会用到该属性。
|
|
58
|
+
allChartUuids: pageDesign.allChartUuids,
|
|
59
|
+
entity: {
|
|
60
|
+
data: {},
|
|
61
|
+
task: {},
|
|
62
|
+
request: {},
|
|
63
|
+
//初始化request对象
|
|
64
|
+
page: {},
|
|
65
|
+
context: pageDesign.contextParam,
|
|
66
|
+
system: pageDesign.systemParam
|
|
67
|
+
}
|
|
68
|
+
};
|
|
69
|
+
if (pageDesign.props && pageDesign.props.notIdInitializationList) {
|
|
70
|
+
let notIdInitializationList = pageDesign.props.notIdInitializationList;
|
|
71
|
+
if (typeof notIdInitializationList === "string") {
|
|
72
|
+
notIdInitializationList = JSON.parse(notIdInitializationList);
|
|
73
|
+
}
|
|
74
|
+
if (notIdInitializationList.length > 0) {
|
|
75
|
+
pageContext["notIdInitializationList"] = notIdInitializationList;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
if (pageDesign.variables) {
|
|
79
|
+
const pageObj = pageContext.entity.page;
|
|
80
|
+
for (const variable of pageDesign.variables) {
|
|
81
|
+
if (variable.name) {
|
|
82
|
+
if (variable.isArrayElement) {
|
|
83
|
+
pageObj[variable.name] = [];
|
|
84
|
+
} else if (variable.defaultValue) {
|
|
85
|
+
pageObj[variable.name] = variable.defaultValue;
|
|
86
|
+
} else {
|
|
87
|
+
pageObj[variable.name] = void 0;
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
}
|
|
92
|
+
setMobilePageVarValue(pageContext);
|
|
93
|
+
Object.assign(pageContext, pageDesign);
|
|
94
|
+
pageContext.dimensions = getPageDimensions();
|
|
95
|
+
pageContext.events = pageDesign.runtime && pageDesign.runtime.events ? pageDesign.runtime.events : [];
|
|
96
|
+
return pageContext;
|
|
97
|
+
}
|
|
98
|
+
function setMobilePageVarValue(pageContext) {
|
|
99
|
+
const isMobile = isMobileBrowser();
|
|
100
|
+
if (isMobile) {
|
|
101
|
+
pageContext.entity.page["_isMobile"] = "true";
|
|
102
|
+
const userAgentOrg = navigator ? navigator.userAgent : null;
|
|
103
|
+
if (userAgentOrg) {
|
|
104
|
+
if (userAgentOrg.indexOf(" uni-app ") > 0) {
|
|
105
|
+
pageContext.entity.page["_isMobileApp"] = "true";
|
|
106
|
+
pageContext.entity.page["_isMobileBrowser"] = "false";
|
|
107
|
+
} else {
|
|
108
|
+
pageContext.entity.page["_isMobileApp"] = "false";
|
|
109
|
+
pageContext.entity.page["_isMobileBrowser"] = "true";
|
|
110
|
+
}
|
|
111
|
+
} else {
|
|
112
|
+
pageContext.entity.page["_isMobileApp"] = "false";
|
|
113
|
+
pageContext.entity.page["_isMobileBrowser"] = "false";
|
|
114
|
+
}
|
|
115
|
+
} else {
|
|
116
|
+
pageContext.entity.page["_isMobile"] = "false";
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
function getJudgeHeavyList(pageDesign) {
|
|
38
120
|
try {
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
121
|
+
if (pageDesign.props && pageDesign.props.judgeHeavyList.length > 0) {
|
|
122
|
+
pageDesign.props.judgeHeavyList.forEach((item) => {
|
|
123
|
+
if (item.duplicateFieldList && item.duplicateFieldList.length > 0) {
|
|
124
|
+
item.duplicateFieldList = item.duplicateFieldList.map((field) => {
|
|
125
|
+
if (typeof field === "string") {
|
|
126
|
+
return { propDbName: field };
|
|
127
|
+
}
|
|
128
|
+
return field;
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
});
|
|
132
|
+
return pageDesign.props.judgeHeavyList;
|
|
133
|
+
} else {
|
|
134
|
+
return null;
|
|
135
|
+
}
|
|
136
|
+
} catch (e) {
|
|
137
|
+
console.error("getJudgeHeavyList error:", e);
|
|
44
138
|
}
|
|
45
139
|
}
|
|
46
|
-
function
|
|
47
|
-
|
|
48
|
-
if (
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
140
|
+
function getPageDimensions() {
|
|
141
|
+
const winWidth = window.outerWidth;
|
|
142
|
+
if (!winWidth) {
|
|
143
|
+
return PageDimensions.PC;
|
|
144
|
+
}
|
|
145
|
+
if (winWidth > 768) {
|
|
146
|
+
return PageDimensions.PC;
|
|
147
|
+
} else if (winWidth > 414) {
|
|
148
|
+
return PageDimensions.IPAD;
|
|
149
|
+
} else {
|
|
150
|
+
return PageDimensions.PHONE;
|
|
151
|
+
}
|
|
152
|
+
}
|
|
153
|
+
function packageAdditionalMapWithLocationSearch(requestObj) {
|
|
154
|
+
let url = decodeURI(window.location.href);
|
|
155
|
+
if (url && url.includes("?")) {
|
|
156
|
+
url = url.substring(url.lastIndexOf("?") + 1);
|
|
157
|
+
const strs = url.split("&");
|
|
158
|
+
for (const str of strs) {
|
|
159
|
+
const paramStrs = str.split("=");
|
|
160
|
+
requestObj[paramStrs[0]] = paramStrs.length > 1 ? paramStrs[1] : "";
|
|
54
161
|
}
|
|
55
162
|
}
|
|
56
|
-
|
|
163
|
+
if (requestObj["_t_"]) ;
|
|
57
164
|
}
|
|
58
|
-
function
|
|
59
|
-
if (
|
|
60
|
-
console.log("packageAdditionalMapWithPageRequest----pageRequest=",
|
|
61
|
-
|
|
165
|
+
function packageAdditionalMapWithPageRequest(pageRequest, requestObj) {
|
|
166
|
+
if (pageRequest) {
|
|
167
|
+
console.log("packageAdditionalMapWithPageRequest----pageRequest=", pageRequest);
|
|
168
|
+
Object.assign(requestObj, pageRequest);
|
|
169
|
+
const paramStoreId = pageRequest.paramStoreId;
|
|
170
|
+
packageAdditionalMap(paramStoreId, requestObj);
|
|
171
|
+
delete pageRequest.paramStoreId;
|
|
172
|
+
console.log("packageAdditionalMapWithPageRequest----requestObj=", requestObj);
|
|
173
|
+
if (pageRequest.jumpMode) {
|
|
174
|
+
requestObj.jumpMode = pageRequest.jumpMode;
|
|
175
|
+
}
|
|
62
176
|
}
|
|
63
177
|
}
|
|
64
|
-
function
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
178
|
+
function packageAdditionalMapWithRoute(route, requestObj) {
|
|
179
|
+
console.log("packageAdditionalMapWithRoute----route=", route);
|
|
180
|
+
if (route) {
|
|
181
|
+
if (route.params) {
|
|
182
|
+
Object.assign(requestObj, route.params);
|
|
183
|
+
}
|
|
184
|
+
console.log("packageAdditionalMapWithRoute----route.query=", route.query);
|
|
185
|
+
if (route.query) {
|
|
186
|
+
Object.assign(requestObj, route.query);
|
|
187
|
+
const paramStoreId = route.query.paramStoreId;
|
|
188
|
+
packageAdditionalMap(paramStoreId, requestObj);
|
|
69
189
|
}
|
|
70
|
-
console.log("packageAdditionalMapWithRoute----requestObj=",
|
|
190
|
+
console.log("packageAdditionalMapWithRoute----requestObj=", requestObj);
|
|
71
191
|
}
|
|
72
192
|
}
|
|
73
|
-
function
|
|
74
|
-
if (
|
|
75
|
-
const
|
|
76
|
-
if (
|
|
77
|
-
const
|
|
78
|
-
Object.assign(
|
|
193
|
+
function packageAdditionalMap(paramStoreId, requestObj) {
|
|
194
|
+
if (paramStoreId) {
|
|
195
|
+
const additionalParamMapJson = getSessionCache(paramStoreId);
|
|
196
|
+
if (additionalParamMapJson) {
|
|
197
|
+
const additionalParamMap = JSON.parse(additionalParamMapJson);
|
|
198
|
+
Object.assign(requestObj, additionalParamMap);
|
|
199
|
+
console.log("已获取到附加参数", additionalParamMap);
|
|
79
200
|
}
|
|
80
201
|
}
|
|
81
202
|
}
|
|
82
|
-
function
|
|
83
|
-
let
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
203
|
+
function getModelFields(formItemConfigure, prop) {
|
|
204
|
+
let propsBase;
|
|
205
|
+
let propName = prop;
|
|
206
|
+
if (!prop) {
|
|
207
|
+
propsBase = formItemConfigure.props.base ? formItemConfigure.props.base : {};
|
|
208
|
+
propName = propsBase.prop;
|
|
209
|
+
}
|
|
210
|
+
let fields = null;
|
|
211
|
+
if (prop && !prop.startsWith("${")) {
|
|
212
|
+
fields = ["data", prop];
|
|
213
|
+
} else if (formItemConfigure && (!propName || !propName.startsWith("${"))) {
|
|
214
|
+
fields = ["page", formItemConfigure.uuid];
|
|
215
|
+
} else if (propName.startsWith("${")) {
|
|
216
|
+
propName = propName.substring(2, propName.length - 1);
|
|
217
|
+
fields = propName.split(".");
|
|
218
|
+
if (formItemConfigure && fields.length < 2) {
|
|
219
|
+
fields = [formItemConfigure.uuid];
|
|
220
|
+
}
|
|
221
|
+
} else if (formItemConfigure) {
|
|
222
|
+
fields = ["page", formItemConfigure.uuid];
|
|
223
|
+
}
|
|
224
|
+
if (!fields && !formItemConfigure) {
|
|
225
|
+
return ["temp"];
|
|
226
|
+
}
|
|
227
|
+
return fields;
|
|
87
228
|
}
|
|
88
|
-
function
|
|
89
|
-
const
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
229
|
+
function getFormModelFields(pageContext, formItemConfigure, prop) {
|
|
230
|
+
const fields = getModelFields(formItemConfigure, prop);
|
|
231
|
+
const entity = pageContext.entity;
|
|
232
|
+
if (entity.data.ID == void 0 && entity.data.id == void 0) {
|
|
233
|
+
let propsBase;
|
|
234
|
+
let componentType;
|
|
235
|
+
let multiple = false;
|
|
236
|
+
if (formItemConfigure) {
|
|
237
|
+
propsBase = formItemConfigure.props.base ? formItemConfigure.props.base : {};
|
|
238
|
+
componentType = formItemConfigure.name;
|
|
239
|
+
multiple = propsBase.multiple;
|
|
240
|
+
}
|
|
241
|
+
const value = getValueFromVariable(entity, prop, null);
|
|
242
|
+
if (value === void 0 || value === null) {
|
|
243
|
+
const defaultValueSet = propsBase ? propsBase.defaultValue : null;
|
|
244
|
+
const defaultValue = getDefaultValue(
|
|
245
|
+
pageContext,
|
|
246
|
+
defaultValueSet,
|
|
247
|
+
componentType,
|
|
248
|
+
multiple
|
|
249
|
+
);
|
|
250
|
+
if (defaultValue !== void 0 && defaultValue !== null) {
|
|
251
|
+
setVariableValue(entity, fields, defaultValue);
|
|
252
|
+
}
|
|
97
253
|
}
|
|
98
254
|
}
|
|
99
|
-
return
|
|
255
|
+
return fields;
|
|
100
256
|
}
|
|
101
|
-
function
|
|
102
|
-
let
|
|
103
|
-
if (
|
|
104
|
-
|
|
105
|
-
|
|
257
|
+
function getDefaultValue(pageContext, defaultValueSet, componentType, multiple) {
|
|
258
|
+
let defaultValue;
|
|
259
|
+
if (defaultValueSet) {
|
|
260
|
+
defaultValue = formatVariableValue(pageContext, defaultValueSet);
|
|
261
|
+
if (defaultValue != null && defaultValue != void 0 && componentType) {
|
|
262
|
+
let isMultiple = false;
|
|
263
|
+
if (componentType == "checkbox") {
|
|
264
|
+
isMultiple = true;
|
|
265
|
+
} else if (componentType == "select") {
|
|
266
|
+
isMultiple = multiple;
|
|
267
|
+
}
|
|
268
|
+
if (isMultiple) {
|
|
269
|
+
defaultValue = (defaultValue + "").split(",");
|
|
270
|
+
}
|
|
271
|
+
}
|
|
106
272
|
}
|
|
107
|
-
return
|
|
273
|
+
return defaultValue;
|
|
108
274
|
}
|
|
109
|
-
function
|
|
110
|
-
if (!
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
for (
|
|
116
|
-
|
|
117
|
-
let r2 = "";
|
|
118
|
-
r2 = "service" == (e3 < i2.length ? i2[e3] : "") ? n2 : t2.code + "." + n2, s2.includes(r2) || s2.push(r2);
|
|
275
|
+
function getPermissionCodes(configure, pageContext) {
|
|
276
|
+
if (!pageContext || !configure || pageContext.isTest) {
|
|
277
|
+
return "true";
|
|
278
|
+
}
|
|
279
|
+
const codes = [];
|
|
280
|
+
if (configure.autoPermissions) {
|
|
281
|
+
for (const p of configure.autoPermissions) {
|
|
282
|
+
codes.push(pageContext.code + "." + p.simpleCode);
|
|
119
283
|
}
|
|
120
284
|
}
|
|
121
|
-
|
|
285
|
+
if (configure.functionCodes) {
|
|
286
|
+
const sourceTypes = configure.sourceTypes ? configure.sourceTypes : [];
|
|
287
|
+
const functionCodes = configure.functionCodes;
|
|
288
|
+
for (let i = 0; i < functionCodes.length; i++) {
|
|
289
|
+
const functionCode = functionCodes[i];
|
|
290
|
+
const sourceType = i < sourceTypes.length ? sourceTypes[i] : "";
|
|
291
|
+
let newCode = "";
|
|
292
|
+
if (sourceType == "service") {
|
|
293
|
+
newCode = functionCode;
|
|
294
|
+
} else {
|
|
295
|
+
newCode = pageContext.code + "." + functionCode;
|
|
296
|
+
}
|
|
297
|
+
if (!codes.includes(newCode)) {
|
|
298
|
+
codes.push(newCode);
|
|
299
|
+
}
|
|
300
|
+
}
|
|
301
|
+
}
|
|
302
|
+
return codes.join(",");
|
|
122
303
|
}
|
|
123
|
-
function
|
|
124
|
-
const
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
304
|
+
function queryPageSuperGrids(pageDesign, pageContext, publishVersion) {
|
|
305
|
+
const tableRuntimes = pageDesign.tableRuntimes;
|
|
306
|
+
const additionalParamMap = getAdditionalParamMap(pageContext);
|
|
307
|
+
let additionalParamMapJson;
|
|
308
|
+
const pageCode = pageContext.code;
|
|
309
|
+
if (additionalParamMap && Object.keys(additionalParamMap) > 0) {
|
|
310
|
+
additionalParamMapJson = JSON.stringify(additionalParamMap);
|
|
311
|
+
}
|
|
312
|
+
return http.post(
|
|
313
|
+
window["$vueApp"].config.globalProperties.baseAPI + "/component/super-page-design/super-grids",
|
|
314
|
+
{
|
|
315
|
+
tableRuntimes,
|
|
316
|
+
additionalParamMapJson,
|
|
317
|
+
pageCode,
|
|
318
|
+
publishVersion,
|
|
319
|
+
pageType: pageDesign.pageType
|
|
320
|
+
}
|
|
321
|
+
);
|
|
128
322
|
}
|
|
129
|
-
function
|
|
323
|
+
function packageFormRules(pageContext, configure) {
|
|
130
324
|
var _a, _b;
|
|
131
|
-
const
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
325
|
+
const prop = configure.props && configure.props.base ? configure.props.base.prop : null;
|
|
326
|
+
const isWorkflow = isWorkflowPage(pageContext);
|
|
327
|
+
let allFieldsDisabled = false;
|
|
328
|
+
if (isWorkflow) {
|
|
329
|
+
if (configure.name !== "button-detail" && pageContext.fieldPermissionMap) {
|
|
330
|
+
const allFields = pageContext.fieldPermissionMap.get("all_fields");
|
|
331
|
+
if ((allFields == null ? void 0 : allFields["canEdit"]) === false && ((_a = configure.runtime) == null ? void 0 : _a.props)) {
|
|
332
|
+
configure.runtime.props.state = "disabled";
|
|
333
|
+
allFieldsDisabled = true;
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
}
|
|
337
|
+
if (prop) {
|
|
338
|
+
const propName = getFormPropName(prop);
|
|
339
|
+
if (!pageContext.rules) {
|
|
340
|
+
pageContext.rules = {};
|
|
341
|
+
}
|
|
342
|
+
if (configure.props.rules && configure.props.rules.length > 0) {
|
|
343
|
+
if (!pageContext.rules[propName]) {
|
|
344
|
+
pageContext.rules[propName] = [];
|
|
345
|
+
}
|
|
346
|
+
configure.props.rules.forEach((fieldRule) => {
|
|
347
|
+
packageCustomValidator(fieldRule);
|
|
348
|
+
});
|
|
349
|
+
pageContext.rules[propName] = configure.props.rules;
|
|
350
|
+
}
|
|
351
|
+
if (!allFieldsDisabled && configure.name !== "button-detail" && pageContext.fieldPermissionMap) {
|
|
352
|
+
const propEditPermission = pageContext.fieldPermissionMap.get(propName);
|
|
353
|
+
if (!configure.runtime.props) {
|
|
354
|
+
configure.runtime.props = {};
|
|
355
|
+
}
|
|
356
|
+
if (propEditPermission) {
|
|
357
|
+
if (propEditPermission["canEdit"] === false) {
|
|
358
|
+
configure.runtime.props.state = "disabled";
|
|
359
|
+
} else if (propEditPermission["canEdit"]) {
|
|
360
|
+
configure.runtime.props.state = "";
|
|
361
|
+
configure.runtime.props.required = true;
|
|
362
|
+
}
|
|
363
|
+
} else {
|
|
364
|
+
configure.runtime.props.state = "";
|
|
365
|
+
}
|
|
366
|
+
}
|
|
367
|
+
if ((_b = configure.props) == null ? void 0 : _b.customRuleEvents) {
|
|
368
|
+
if (!pageContext.customRuleEvents) {
|
|
369
|
+
pageContext.customRuleEvents = [];
|
|
370
|
+
}
|
|
371
|
+
pageContext.customRuleEvents.push({
|
|
372
|
+
prop: propName,
|
|
373
|
+
events: configure.props.customRuleEvents
|
|
374
|
+
});
|
|
375
|
+
}
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
function controlObjectRenderState(pageContext, propName) {
|
|
379
|
+
if (pageContext.initInfo) {
|
|
380
|
+
const types = [
|
|
381
|
+
"dynamicControlFormEdit",
|
|
382
|
+
"disableElement",
|
|
383
|
+
"enableElement",
|
|
384
|
+
"hideElement",
|
|
385
|
+
"showElement"
|
|
386
|
+
];
|
|
387
|
+
types.forEach((type) => {
|
|
388
|
+
const infos = pageContext.initInfo[type];
|
|
389
|
+
if (infos) {
|
|
390
|
+
if (type === "dynamicControlFormEdit") {
|
|
391
|
+
let settings = infos.filter(
|
|
392
|
+
(item) => item.name === "_all_fields" || item.name === propName
|
|
393
|
+
);
|
|
394
|
+
if (settings && settings.length > 0) {
|
|
395
|
+
settings = settings.filter((item) => item.name === "_all_fields");
|
|
396
|
+
if (settings && settings.length > 0) {
|
|
397
|
+
const copySetting = deepCopy(settings[0]);
|
|
398
|
+
copySetting.name = propName;
|
|
399
|
+
settings = [copySetting];
|
|
400
|
+
}
|
|
401
|
+
}
|
|
402
|
+
functions.dynamicControlFormEdit(pageContext, settings, false);
|
|
403
|
+
} else if (type === "disableElement") {
|
|
404
|
+
if (infos.indexOf(propName) >= 0) {
|
|
405
|
+
functions.disableElement(pageContext, [propName], false);
|
|
406
|
+
}
|
|
407
|
+
} else if (type === "enableElement") {
|
|
408
|
+
if (infos.indexOf(propName) >= 0) {
|
|
409
|
+
functions.enableElement(pageContext, [propName], false);
|
|
410
|
+
}
|
|
411
|
+
} else if (type === "hideElement") {
|
|
412
|
+
if (infos.indexOf(propName) >= 0) {
|
|
413
|
+
functions.hideElement(pageContext, [propName], false);
|
|
414
|
+
}
|
|
415
|
+
} else if (type === "showElement") {
|
|
416
|
+
if (infos.indexOf(propName) >= 0) {
|
|
417
|
+
functions.showElement(pageContext, [propName], false);
|
|
418
|
+
}
|
|
157
419
|
}
|
|
158
|
-
|
|
159
|
-
} else "disableElement" === s2 ? i2.indexOf(t2) >= 0 && a.disableElement(e2, [t2], false) : "enableElement" === s2 ? i2.indexOf(t2) >= 0 && a.enableElement(e2, [t2], false) : "hideElement" === s2 ? i2.indexOf(t2) >= 0 && a.hideElement(e2, [t2], false) : "showElement" === s2 && i2.indexOf(t2) >= 0 && a.showElement(e2, [t2], false);
|
|
420
|
+
}
|
|
160
421
|
});
|
|
161
422
|
}
|
|
162
423
|
}
|
|
163
424
|
export {
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
425
|
+
controlObjectRenderState,
|
|
426
|
+
convertToPageContext,
|
|
427
|
+
getDefaultValue,
|
|
428
|
+
getFormModelFields,
|
|
429
|
+
getModelFields,
|
|
430
|
+
getPermissionCodes,
|
|
431
|
+
packageAdditionalMapWithLocationSearch,
|
|
432
|
+
packageAdditionalMapWithPageRequest,
|
|
433
|
+
packageAdditionalMapWithRoute,
|
|
434
|
+
packageFormRules,
|
|
435
|
+
queryPageDesignByCode,
|
|
436
|
+
queryPageSuperGrids
|
|
176
437
|
};
|