resolver-egretimp-plus 0.1.119 → 0.1.121
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/h5/index.js +18 -18
- package/dist/web/index.js +11 -11
- package/package.json +1 -1
- package/src/components/options/OptionsDefault.vue +0 -1
- package/src/components/packages-web/CustomComponentCycle.vue +38 -33
- package/src/components/packages-web/CustomComponentCycleTabPane.vue +40 -33
- package/src/components/packages-web/CustomComponentPlain.vue +6 -5
- package/src/components/packages-web/CustomComponentTable.jsx +48 -40
- package/src/components/packages-web/ElInput copy.jsx +0 -1
- package/src/components/packages-web/ElInput.jsx +0 -1
- package/src/config.js +2 -0
- package/src/hooks/pageConfig.js +10 -4
- package/src/index.jsx +15 -10
- package/src/renderer.jsx +4 -1
- package/src/resolver-common.vue +22 -2
- package/src/rules/rulesDriver.js +4 -0
- package/src/utils/common.js +13 -0
- package/src/utils/render.jsx +196 -96
- package/src-bak/analysisComponent.jsx +0 -343
- package/src-bak/api/builtIn.js +0 -10
- package/src-bak/bpm/bpmInstance.js +0 -388
- package/src-bak/bpm/udc-sdk-esm/cjs/impl/application.js +0 -8
- package/src-bak/bpm/udc-sdk-esm/cjs/impl/component.js +0 -97
- package/src-bak/bpm/udc-sdk-esm/cjs/impl/datasource.js +0 -88
- package/src-bak/bpm/udc-sdk-esm/cjs/impl/iframe/index.js +0 -3
- package/src-bak/bpm/udc-sdk-esm/cjs/impl/iframe/udcSdkForIframe/UdcComponent.js +0 -76
- package/src-bak/bpm/udc-sdk-esm/cjs/impl/iframe/udcSdkForIframe/index.js +0 -201
- package/src-bak/bpm/udc-sdk-esm/cjs/impl/index.js +0 -69
- package/src-bak/bpm/udc-sdk-esm/cjs/impl/page.js +0 -56
- package/src-bak/bpm/udc-sdk-esm/cjs/impl/utils.js +0 -76
- package/src-bak/bpm/udc-sdk-esm/cjs/index.js +0 -46
- package/src-bak/bpm/udc-sdk-esm/cjs/utils.js +0 -21
- package/src-bak/components/childDialog/index.js +0 -39
- package/src-bak/components/childDialog/src/index.vue +0 -185
- package/src-bak/components/cmiFormItem/index.js +0 -1
- package/src-bak/components/cmiFormItem/src/index.vue +0 -112
- package/src-bak/components/confirmInstance-H5/index.js +0 -53
- package/src-bak/components/confirmInstance-H5/src/index.vue +0 -54
- package/src-bak/components/helper/FormPolyfill.jsx +0 -25
- package/src-bak/components/helper/calcTooltip.jsx +0 -134
- package/src-bak/components/helper/dock.js +0 -141
- package/src-bak/components/helper/eventOrchestration.js +0 -763
- package/src-bak/components/helper/resolver.js +0 -163
- package/src-bak/components/helper/table.jsx +0 -103
- package/src-bak/components/icons/date.vue +0 -33
- package/src-bak/components/icons/info.vue +0 -62
- package/src-bak/components/icons/loading.vue +0 -19
- package/src-bak/components/icons/question-filled.vue +0 -8
- package/src-bak/components/loading/index.js +0 -6
- package/src-bak/components/loading/loading.js +0 -98
- package/src-bak/components/loading/loading.scss +0 -74
- package/src-bak/components/loading/loading.vue +0 -89
- package/src-bak/components/loadingComponent/LoadingComponent.vue +0 -33
- package/src-bak/components/modal/index.js +0 -9
- package/src-bak/components/modal/modal.scss +0 -195
- package/src-bak/components/modal/modal.vue +0 -201
- package/src-bak/components/options/OptionsDefault.vue +0 -47
- package/src-bak/components/packages-H5/CmiButton.vue +0 -120
- package/src-bak/components/packages-H5/CmiCalendar.vue +0 -152
- package/src-bak/components/packages-H5/CmiCell.vue +0 -87
- package/src-bak/components/packages-H5/CmiCheckbox.vue +0 -82
- package/src-bak/components/packages-H5/CmiDatetimePicker.vue +0 -98
- package/src-bak/components/packages-H5/CmiDivider.vue +0 -30
- package/src-bak/components/packages-H5/CmiDropdownMenu.vue +0 -58
- package/src-bak/components/packages-H5/CmiInput.vue +0 -69
- package/src-bak/components/packages-H5/CmiLink.vue +0 -28
- package/src-bak/components/packages-H5/CmiPicker.vue +0 -229
- package/src-bak/components/packages-H5/CmiRadio.vue +0 -29
- package/src-bak/components/packages-H5/CmiSearch.vue +0 -39
- package/src-bak/components/packages-H5/CmiSelect.vue +0 -84
- package/src-bak/components/packages-H5/CustomComponentCardH5.vue +0 -129
- package/src-bak/components/packages-H5/CustomComponentColH5.vue +0 -8
- package/src-bak/components/packages-H5/CustomComponentCollapseH5.vue +0 -141
- package/src-bak/components/packages-H5/CustomComponentFormLayoutH5.vue +0 -54
- package/src-bak/components/packages-H5/CustomComponentTabPaneH5.vue +0 -38
- package/src-bak/components/packages-H5/CustomComponentTableH5.vue +0 -352
- package/src-bak/components/packages-H5/CustomComponentTabsH5.vue +0 -170
- package/src-bak/components/packages-web/CustomComponentCard.vue +0 -40
- package/src-bak/components/packages-web/CustomComponentCol.vue +0 -66
- package/src-bak/components/packages-web/CustomComponentCollapse.vue +0 -164
- package/src-bak/components/packages-web/CustomComponentCycle.vue +0 -95
- package/src-bak/components/packages-web/CustomComponentCycleTabPane.vue +0 -155
- package/src-bak/components/packages-web/CustomComponentDialog.vue +0 -192
- package/src-bak/components/packages-web/CustomComponentEditor.vue +0 -50
- package/src-bak/components/packages-web/CustomComponentFileExport.vue +0 -60
- package/src-bak/components/packages-web/CustomComponentFileImport.vue +0 -60
- package/src-bak/components/packages-web/CustomComponentFormLayout.vue +0 -65
- package/src-bak/components/packages-web/CustomComponentGrid.vue +0 -29
- package/src-bak/components/packages-web/CustomComponentGridCol.vue +0 -29
- package/src-bak/components/packages-web/CustomComponentInputDialog.vue +0 -144
- package/src-bak/components/packages-web/CustomComponentNativeTabPane.vue +0 -84
- package/src-bak/components/packages-web/CustomComponentPlain.vue +0 -247
- package/src-bak/components/packages-web/CustomComponentRow.vue +0 -83
- package/src-bak/components/packages-web/CustomComponentSelectEmployees.vue +0 -203
- package/src-bak/components/packages-web/CustomComponentSendMail.vue +0 -62
- package/src-bak/components/packages-web/CustomComponentSteps.vue +0 -41
- package/src-bak/components/packages-web/CustomComponentTabPane.vue +0 -20
- package/src-bak/components/packages-web/CustomComponentTable.jsx +0 -814
- package/src-bak/components/packages-web/CustomComponentTabs.vue +0 -126
- package/src-bak/components/packages-web/CustomComponentTree.vue +0 -28
- package/src-bak/components/packages-web/ElButton.vue +0 -146
- package/src-bak/components/packages-web/ElCheckbox.vue +0 -97
- package/src-bak/components/packages-web/ElDatePicker.vue +0 -93
- package/src-bak/components/packages-web/ElInput copy.jsx +0 -393
- package/src-bak/components/packages-web/ElInput.jsx +0 -312
- package/src-bak/components/packages-web/ElInputNumber.vue +0 -81
- package/src-bak/components/packages-web/ElPagination.vue +0 -61
- package/src-bak/components/packages-web/ElRadio.vue +0 -47
- package/src-bak/components/packages-web/ElSelect.jsx +0 -249
- package/src-bak/components/packages-web/ElSelect_bak.vue +0 -155
- package/src-bak/components/packages-web/ElText.jsx +0 -187
- package/src-bak/components/packages-web/ElTextaa.vue +0 -169
- package/src-bak/components/packages-web/ElTimePicker.vue +0 -39
- package/src-bak/components/patchComponents-H5.js +0 -46
- package/src-bak/components/patchComponents-web.js +0 -46
- package/src-bak/components/simpleFormItemPc/index.js +0 -1
- package/src-bak/components/simpleFormItemPc/src/index.vue +0 -94
- package/src-bak/components/table/index.ts +0 -29
- package/src-bak/components/table/src/composables/use-scrollbar.ts +0 -30
- package/src-bak/components/table/src/config.ts +0 -256
- package/src-bak/components/table/src/filter-panel.vue +0 -260
- package/src-bak/components/table/src/h-helper.ts +0 -34
- package/src-bak/components/table/src/layout-observer.ts +0 -78
- package/src-bak/components/table/src/store/current.ts +0 -85
- package/src-bak/components/table/src/store/expand.ts +0 -76
- package/src-bak/components/table/src/store/helper.ts +0 -74
- package/src-bak/components/table/src/store/index.ts +0 -246
- package/src-bak/components/table/src/store/tree.ts +0 -230
- package/src-bak/components/table/src/store/watcher.ts +0 -543
- package/src-bak/components/table/src/table/defaults.ts +0 -402
- package/src-bak/components/table/src/table/key-render-helper.ts +0 -27
- package/src-bak/components/table/src/table/style-helper.ts +0 -378
- package/src-bak/components/table/src/table/utils-helper.ts +0 -47
- package/src-bak/components/table/src/table-body/defaults.ts +0 -52
- package/src-bak/components/table/src/table-body/events-helper.ts +0 -203
- package/src-bak/components/table/src/table-body/index.ts +0 -119
- package/src-bak/components/table/src/table-body/render-helper.ts +0 -283
- package/src-bak/components/table/src/table-body/styles-helper.ts +0 -164
- package/src-bak/components/table/src/table-column/defaults.ts +0 -237
- package/src-bak/components/table/src/table-column/index.ts +0 -202
- package/src-bak/components/table/src/table-column/render-helper.ts +0 -214
- package/src-bak/components/table/src/table-column/watcher-helper.ts +0 -88
- package/src-bak/components/table/src/table-footer/index.ts +0 -128
- package/src-bak/components/table/src/table-footer/mapState-helper.ts +0 -33
- package/src-bak/components/table/src/table-footer/style-helper.ts +0 -51
- package/src-bak/components/table/src/table-header/event-helper.ts +0 -213
- package/src-bak/components/table/src/table-header/index.ts +0 -244
- package/src-bak/components/table/src/table-header/style.helper.ts +0 -119
- package/src-bak/components/table/src/table-header/utils-helper.ts +0 -94
- package/src-bak/components/table/src/table-layout.ts +0 -259
- package/src-bak/components/table/src/table.vue +0 -389
- package/src-bak/components/table/src/tableColumn.ts +0 -3
- package/src-bak/components/table/src/tokens.ts +0 -5
- package/src-bak/components/table/src/util.ts +0 -521
- package/src-bak/components/table/style/css.ts +0 -5
- package/src-bak/components/table/style/index.ts +0 -5
- package/src-bak/components/tabs/index.js +0 -8
- package/src-bak/components/tabs/src/constants.js +0 -23
- package/src-bak/components/tabs/src/tab-bar.js +0 -8
- package/src-bak/components/tabs/src/tab-bar.vue +0 -92
- package/src-bak/components/tabs/src/tab-nav.jsx +0 -424
- package/src-bak/components/tabs/src/tab-pane.js +0 -16
- package/src-bak/components/tabs/src/tab-pane.vue +0 -80
- package/src-bak/components/tabs/src/tabs.jsx +0 -223
- package/src-bak/components/tabs/style/css.js +0 -2
- package/src-bak/components/tabs/style/index.js +0 -2
- package/src-bak/components/thirdPartyFrame/index.js +0 -32
- package/src-bak/components/thirdPartyFrame/src/ThirdPartyFrame.vue +0 -125
- package/src-bak/enums/index.js +0 -16
- package/src-bak/hooks/configLoad.js +0 -45
- package/src-bak/hooks/index.js +0 -189
- package/src-bak/hooks/mock.js +0 -6960
- package/src-bak/hooks/pageConfig.js +0 -127
- package/src-bak/index.jsx +0 -443
- package/src-bak/renderer.jsx +0 -77
- package/src-bak/resolver-H5.vue +0 -88
- package/src-bak/resolver-common.vue +0 -129
- package/src-bak/resolver-web.vue +0 -91
- package/src-bak/rules/eventsSupplement.js +0 -573
- package/src-bak/rules/parseCondition.js +0 -378
- package/src-bak/rules/ruleUtils.js +0 -273
- package/src-bak/rules/rulesDriver.js +0 -139
- package/src-bak/rulesImp/events.js +0 -588
- package/src-bak/rulesImp/index.js +0 -33
- package/src-bak/rulesImp/ruleInstance.js +0 -231
- package/src-bak/rulesImp/ruleUtils.js +0 -124
- package/src-bak/theme/element/components/button.scss +0 -122
- package/src-bak/theme/element/components/card.scss +0 -8
- package/src-bak/theme/element/components/checkbox.scss +0 -19
- package/src-bak/theme/element/components/collapse.scss +0 -174
- package/src-bak/theme/element/components/common.scss +0 -30
- package/src-bak/theme/element/components/cycle.scss +0 -0
- package/src-bak/theme/element/components/date.scss +0 -13
- package/src-bak/theme/element/components/dialog.scss +0 -44
- package/src-bak/theme/element/components/form.scss +0 -104
- package/src-bak/theme/element/components/index.scss +0 -55
- package/src-bak/theme/element/components/input.scss +0 -36
- package/src-bak/theme/element/components/message.scss +0 -48
- package/src-bak/theme/element/components/pagination.scss +0 -47
- package/src-bak/theme/element/components/popper.scss +0 -3
- package/src-bak/theme/element/components/radio.scss +0 -40
- package/src-bak/theme/element/components/scrollbar.scss +0 -14
- package/src-bak/theme/element/components/select.scss +0 -82
- package/src-bak/theme/element/components/steps.scss +0 -6
- package/src-bak/theme/element/components/table.scss +0 -218
- package/src-bak/theme/element/components/tabs.scss +0 -128
- package/src-bak/theme/element/components/tag.scss +0 -6
- package/src-bak/theme/element/components/text.scss +0 -20
- package/src-bak/theme/element/components/textarea.scss +0 -3
- package/src-bak/theme/element/components/tree.scss +0 -0
- package/src-bak/theme/element/index.scss +0 -55
- package/src-bak/utils/cipher.js +0 -141
- package/src-bak/utils/common.js +0 -664
- package/src-bak/utils/const.js +0 -259
- package/src-bak/utils/defaultVal.js +0 -92
- package/src-bak/utils/dom.js +0 -36
- package/src-bak/utils/format.js +0 -19
- package/src-bak/utils/index.js +0 -4
- package/src-bak/utils/is.js +0 -74
- package/src-bak/utils/loadModule.js +0 -75
- package/src-bak/utils/preserveFunc.js +0 -33
- package/src-bak/utils/render.jsx +0 -1138
- package/src-bak/utils/request.js +0 -136
- package/src-bak/utils/respone.js +0 -70
- package/src-bak/utils/valid.js +0 -89
|
@@ -1,763 +0,0 @@
|
|
|
1
|
-
import { isArray, isHasVal, isNull, isUndefined } from "../../utils/is"
|
|
2
|
-
import { DATA_VALID_RULE_EXECUTE } from "../../api/builtIn"
|
|
3
|
-
import { getRelateConfigKeys } from "../../rules/ruleUtils"
|
|
4
|
-
import { RESULT_CODE, resultToast } from "../../utils/respone"
|
|
5
|
-
import { assignmentPathVal, definePrivatelyProp, getPathVal, isPromise, modelValueDeepMerge, parseExtendAttr, unionWith } from "../../utils/index"
|
|
6
|
-
import { buildInRequest } from "../../utils/request"
|
|
7
|
-
import { bpmInstance } from "../../bpm/bpmInstance"
|
|
8
|
-
|
|
9
|
-
export async function dispatchClickEvents ({serviceList = [], requestTraceId, axiosInstance, dialogReq, dynamicMapComp, rootValue, dynamicHireRelat, messageCb, compConfig, messageInstance, lang, beforeRequestService, afterRequestService}) {
|
|
10
|
-
const dynamicMapCompKeys = Object.keys(dynamicMapComp)
|
|
11
|
-
const mixinServiceConfig = serviceList.find(service => service.serviceType == '1')
|
|
12
|
-
for (let i = 0; i < serviceList.length; i++) {
|
|
13
|
-
const service = serviceList[i]
|
|
14
|
-
dispatchClickEvent(service, {dynamicMapComp, requestTraceId, dialogReq, mixinServiceConfig, rootValue, dynamicMapCompKeys, dynamicHireRelat, axiosInstance, messageCb, compConfig, messageInstance, lang, beforeRequestService, afterRequestService})
|
|
15
|
-
}
|
|
16
|
-
}
|
|
17
|
-
|
|
18
|
-
export async function dispatchClickEvent(service, {
|
|
19
|
-
dynamicMapComp, requestTraceId, dialogReq,
|
|
20
|
-
mixinServiceConfig, rootValue, dynamicMapCompKeys,
|
|
21
|
-
dynamicHireRelat, axiosInstance, messageCb, compConfig,
|
|
22
|
-
messageInstance, lang, beforeRequestService, afterRequestService
|
|
23
|
-
}) {
|
|
24
|
-
if (service.transactionType == '1') {
|
|
25
|
-
const tableConfig = getTableConfig(service.outParamMappingList, { dynamicMapComp, dynamicMapCompKeys, dynamicHireRelat })
|
|
26
|
-
if (tableConfig) {
|
|
27
|
-
definePrivatelyProp(tableConfig, 'serviceSizeChange', (val, props, page) => {
|
|
28
|
-
toExecute()
|
|
29
|
-
})
|
|
30
|
-
definePrivatelyProp(tableConfig, 'serviceCurrentChange', (val, props, page) => {
|
|
31
|
-
toExecute(false)
|
|
32
|
-
})
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
// 把执行逻辑封装成一个方法
|
|
36
|
-
async function toExecute(resetPageNum = true) {
|
|
37
|
-
let reqData = rootValue || {}
|
|
38
|
-
let tableConfig = null
|
|
39
|
-
const serviceCustomProps = parseExtendAttr({extendAttr: service.extendAttr})
|
|
40
|
-
|
|
41
|
-
let normalBeforeRequestService = null
|
|
42
|
-
let normalAfterRequestService = null
|
|
43
|
-
// 定义的请求前钩子
|
|
44
|
-
const configBeforeRequestService = compConfig?.beforeRequestService
|
|
45
|
-
if (configBeforeRequestService || beforeRequestService) {
|
|
46
|
-
normalBeforeRequestService = async (...arg) => {
|
|
47
|
-
let beforeRequestServiceRet = true
|
|
48
|
-
if (beforeRequestService) {
|
|
49
|
-
beforeRequestServiceRet = beforeRequestService?.(...arg)
|
|
50
|
-
}
|
|
51
|
-
const beforeRequestServiceRetValid = await beforeRequestServiceRet
|
|
52
|
-
if (beforeRequestServiceRetValid === false) {
|
|
53
|
-
return false
|
|
54
|
-
}
|
|
55
|
-
if (configBeforeRequestService) {
|
|
56
|
-
return configBeforeRequestService?.(...arg)
|
|
57
|
-
} else {
|
|
58
|
-
return true
|
|
59
|
-
}
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
// 定义的请求后钩子
|
|
63
|
-
const configAfterRequestService = compConfig?.afterRequestService
|
|
64
|
-
if (configAfterRequestService || afterRequestService) {
|
|
65
|
-
normalAfterRequestService = async (...arg) => {
|
|
66
|
-
await afterRequestService?.(...arg)
|
|
67
|
-
await configAfterRequestService?.(...arg)
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
if (service.transactionType == '1') {
|
|
71
|
-
reqData = getReqData(service.inParamMappingList || [], {emptyUpdate: true, dynamicMapComp, dynamicMapCompKeys, dynamicHireRelat})
|
|
72
|
-
tableConfig = getTableConfig(service.outParamMappingList, { dynamicMapComp, dynamicMapCompKeys, dynamicHireRelat })
|
|
73
|
-
if (tableConfig?.vm) {
|
|
74
|
-
if (resetPageNum) {
|
|
75
|
-
// 控制表格组件中分页变化不会出发监听
|
|
76
|
-
definePrivatelyProp(tableConfig, 'serviceCurrentChangeLoad', true)
|
|
77
|
-
tableConfig.vm.page.pageNum = 1
|
|
78
|
-
setTimeout(() => {
|
|
79
|
-
definePrivatelyProp(tableConfig, 'serviceCurrentChangeLoad', false)
|
|
80
|
-
}, 200);
|
|
81
|
-
}
|
|
82
|
-
if (!isUndefined(tableConfig.vm.page?.pageNum) && !isNull(tableConfig.vm.page?.pageNum) ) {
|
|
83
|
-
assignmentPathVal(reqData, service.pageNum || 'pageNum', tableConfig.vm.page?.pageNum)
|
|
84
|
-
}
|
|
85
|
-
if (!isUndefined(tableConfig.vm.page?.pageSize) && !isNull(tableConfig.vm.page?.pageSize) ) {
|
|
86
|
-
assignmentPathVal(reqData, service.pageSize || 'pageSize', tableConfig.vm.page?.pageSize)
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
reqData = {
|
|
90
|
-
...reqData,
|
|
91
|
-
// ...dialogReq
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
const url = service.serviceCode
|
|
96
|
-
const httpMethod = service.httpMethod || "post"
|
|
97
|
-
|
|
98
|
-
let reqResult = {
|
|
99
|
-
aid_language: lang,
|
|
100
|
-
requestTraceId,
|
|
101
|
-
pmHandleBusinessIdentity: {
|
|
102
|
-
busiIdentityId: service.busiIdentityId,
|
|
103
|
-
pageMetaId: service.pageMetaId,
|
|
104
|
-
tenantId: service.tenantId,
|
|
105
|
-
mainServiceCode: mixinServiceConfig?.mainServiceCode, // 提交按钮绑定上绑定的融合服务编码
|
|
106
|
-
},
|
|
107
|
-
|
|
108
|
-
}
|
|
109
|
-
// 控制是否需要传入默认参数 ===== start=====
|
|
110
|
-
const notDefaultParmas = serviceCustomProps?.notDefaultParmas
|
|
111
|
-
if (notDefaultParmas) {
|
|
112
|
-
reqResult = {
|
|
113
|
-
}
|
|
114
|
-
}
|
|
115
|
-
const mergeObj = modelValueDeepMerge(reqResult, reqData)
|
|
116
|
-
reqResult = mergeObj
|
|
117
|
-
// 控制是否需要传入默认参数 ===== end=====
|
|
118
|
-
|
|
119
|
-
let beforeRequestServiceRet = true
|
|
120
|
-
if (normalBeforeRequestService) {
|
|
121
|
-
beforeRequestServiceRet = normalBeforeRequestService({
|
|
122
|
-
dynamicMapComp,
|
|
123
|
-
requestTraceId,
|
|
124
|
-
mixinServiceConfig,
|
|
125
|
-
rootValue,
|
|
126
|
-
dynamicHireRelat,
|
|
127
|
-
compConfig,
|
|
128
|
-
service,
|
|
129
|
-
reqData: reqResult
|
|
130
|
-
})
|
|
131
|
-
}
|
|
132
|
-
const beforeRequestServiceRetValid = await beforeRequestServiceRet
|
|
133
|
-
if (beforeRequestServiceRetValid === false) {
|
|
134
|
-
return
|
|
135
|
-
}
|
|
136
|
-
|
|
137
|
-
const reqConfig = {
|
|
138
|
-
url,
|
|
139
|
-
method: httpMethod,
|
|
140
|
-
data: reqResult
|
|
141
|
-
}
|
|
142
|
-
if (httpMethod.toLocaleLowerCase() === 'get') {
|
|
143
|
-
reqConfig.params = reqResult
|
|
144
|
-
delete reqConfig.data
|
|
145
|
-
}
|
|
146
|
-
const ret = await (axiosInstance && axiosInstance(reqConfig))
|
|
147
|
-
if (normalAfterRequestService) {
|
|
148
|
-
await normalAfterRequestService(ret, {
|
|
149
|
-
dynamicMapComp,
|
|
150
|
-
requestTraceId,
|
|
151
|
-
mixinServiceConfig,
|
|
152
|
-
rootValue,
|
|
153
|
-
dynamicHireRelat,
|
|
154
|
-
compConfig,
|
|
155
|
-
service,
|
|
156
|
-
reqData: reqResult
|
|
157
|
-
})
|
|
158
|
-
}
|
|
159
|
-
|
|
160
|
-
const noSuccessIip = httpMethod.toLocaleLowerCase() === 'get' || service.transactionType == '1' || serviceCustomProps?.noSuccessIip
|
|
161
|
-
const toastParmas = {
|
|
162
|
-
messageCb,
|
|
163
|
-
service,
|
|
164
|
-
compConfig,
|
|
165
|
-
noSuccessIip
|
|
166
|
-
}
|
|
167
|
-
if (serviceCustomProps.resultCodeKey) {
|
|
168
|
-
toastParmas.resultCodeKey = serviceCustomProps.resultCodeKey
|
|
169
|
-
}
|
|
170
|
-
if (!resultToast(ret?.data, messageInstance, toastParmas)) {
|
|
171
|
-
await Promise.reject()
|
|
172
|
-
return
|
|
173
|
-
}
|
|
174
|
-
// ret.data = {result: {pageTotalCount: 100, result: [{},{},{},{},{}]}}
|
|
175
|
-
initOutParamData(service.outParamMappingList, {dynamicMapComp, dynamicMapCompKeys, dynamicHireRelat, outResult: ret.data})
|
|
176
|
-
if (tableConfig?.vm) {
|
|
177
|
-
let totalObj = ret.data?.result
|
|
178
|
-
let pageTotalCountKey = service.pageTotalCount
|
|
179
|
-
const deepMatch = /^_deep:(.+)$/
|
|
180
|
-
const matchs = service.pageTotalCount?.match(deepMatch)
|
|
181
|
-
if (matchs) {
|
|
182
|
-
totalObj = ret.data
|
|
183
|
-
pageTotalCountKey = matchs[1]
|
|
184
|
-
}
|
|
185
|
-
const total = parseInt(getPathVal(totalObj || {}, pageTotalCountKey || 'pageCount'))
|
|
186
|
-
tableConfig.vm.page.total = total
|
|
187
|
-
// tableConfig.vm?.changePage(total, 'total')
|
|
188
|
-
}
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
toExecute()
|
|
192
|
-
}
|
|
193
|
-
|
|
194
|
-
function getReqData(inParamMappingList = [], {emptyUpdate, dynamicMapComp, dynamicMapCompKeys, dynamicHireRelat}) {
|
|
195
|
-
return inParamMappingList.reduce((ret, params) => {
|
|
196
|
-
const { orignParam = '', destParam = '' } = params
|
|
197
|
-
const configCodes = getRelateConfigKeys(dynamicMapCompKeys, orignParam, dynamicHireRelat)
|
|
198
|
-
if (configCodes.length > 1) {
|
|
199
|
-
console.error('search arg muti', params, configCodes)
|
|
200
|
-
}
|
|
201
|
-
const configCode = configCodes[0]
|
|
202
|
-
const val = dynamicMapComp?.[configCode]?.refValue
|
|
203
|
-
if (
|
|
204
|
-
(
|
|
205
|
-
(
|
|
206
|
-
isUndefined(val) ||
|
|
207
|
-
isNull(val)
|
|
208
|
-
) && emptyUpdate
|
|
209
|
-
) ||
|
|
210
|
-
(
|
|
211
|
-
!isUndefined(val) &&
|
|
212
|
-
!isNull(val)
|
|
213
|
-
)
|
|
214
|
-
) {
|
|
215
|
-
let destParamArr
|
|
216
|
-
if (destParam?.indexOf('->') !== -1) {
|
|
217
|
-
destParamArr = destParam?.split('->') || []
|
|
218
|
-
} else {
|
|
219
|
-
destParamArr = destParam?.split('.') || []
|
|
220
|
-
}
|
|
221
|
-
assignmentPathVal(ret, destParamArr, (isUndefined(val) || isNull(val)) ? '' : val)
|
|
222
|
-
}
|
|
223
|
-
return ret
|
|
224
|
-
}, {})
|
|
225
|
-
}
|
|
226
|
-
|
|
227
|
-
function initOutParamData(outParamMappingList = [], { dynamicMapComp, dynamicMapCompKeys, dynamicHireRelat, outResult = {} }) {
|
|
228
|
-
outParamMappingList.forEach(params => {
|
|
229
|
-
const { orignParam = '', destParam = '', isList = false, primaryKeys = [] } = params
|
|
230
|
-
const configCodes = getRelateConfigKeys(dynamicMapCompKeys, destParam, dynamicHireRelat)
|
|
231
|
-
if (configCodes.length > 1) {
|
|
232
|
-
console.error('search arg muti', params, configCodes)
|
|
233
|
-
}
|
|
234
|
-
const configCode = configCodes[0]
|
|
235
|
-
const compConfig = dynamicMapComp[configCode]
|
|
236
|
-
|
|
237
|
-
if (compConfig) {
|
|
238
|
-
const orignParamArr = orignParam ? orignParam?.split('.') : []
|
|
239
|
-
let val = orignParamArr.reduce((ret, item) => {
|
|
240
|
-
if (!ret) return
|
|
241
|
-
return ret[item]
|
|
242
|
-
}, outResult)
|
|
243
|
-
if (isList) {
|
|
244
|
-
if (!isArray(val)) {
|
|
245
|
-
val = isArray(compConfig.refValue) ? compConfig.refValue : []
|
|
246
|
-
} else if (isArray(compConfig.refValue) && isArray(val)) {
|
|
247
|
-
val = unionWith(compConfig.refValue, val, (arrVal, othVal) => {
|
|
248
|
-
const ret = (primaryKeys && primaryKeys.length) ? primaryKeys.map(key => ((isHasVal(arrVal[key]) || isHasVal(othVal[key])) && arrVal[key] == othVal[key]))?.every(item => item) : false
|
|
249
|
-
return ret
|
|
250
|
-
})
|
|
251
|
-
}
|
|
252
|
-
}
|
|
253
|
-
compConfig.refValue = val
|
|
254
|
-
}
|
|
255
|
-
})
|
|
256
|
-
}
|
|
257
|
-
|
|
258
|
-
export function getTableConfig(outParamMappingList = [], { dynamicMapComp, dynamicMapCompKeys, dynamicHireRelat }) {
|
|
259
|
-
for(let i = 0; i < outParamMappingList.length; i ++) {
|
|
260
|
-
const params = outParamMappingList[i]
|
|
261
|
-
const { destParam = '' } = params
|
|
262
|
-
const configCodes = getRelateConfigKeys(dynamicMapCompKeys, destParam, dynamicHireRelat)
|
|
263
|
-
if (configCodes.length > 1) {
|
|
264
|
-
console.error('search arg muti', params, configCodes)
|
|
265
|
-
}
|
|
266
|
-
const configCode = configCodes[0]
|
|
267
|
-
if (configCode) {
|
|
268
|
-
const compConfig = dynamicMapComp[configCode]
|
|
269
|
-
if (compConfig.metaType === 'CustomComponentTable' || compConfig.metaType === 'CustomComponentTableH5') {
|
|
270
|
-
return compConfig
|
|
271
|
-
}
|
|
272
|
-
}
|
|
273
|
-
}
|
|
274
|
-
}
|
|
275
|
-
|
|
276
|
-
export function openDailg({
|
|
277
|
-
beforeOpenDialog,
|
|
278
|
-
afterOpenDialog,
|
|
279
|
-
middleOpenDialog,
|
|
280
|
-
components,
|
|
281
|
-
rootValue,
|
|
282
|
-
polyfillConfigs,
|
|
283
|
-
pagePopupMap,
|
|
284
|
-
axiosInstance,
|
|
285
|
-
dynamicMapComp,
|
|
286
|
-
dynamicHireRelat,
|
|
287
|
-
lang,
|
|
288
|
-
buttonActions,
|
|
289
|
-
openChildDialog,
|
|
290
|
-
appContext,
|
|
291
|
-
compConfig
|
|
292
|
-
}) {
|
|
293
|
-
const dialogProps = parseExtendAttr({extendAttr: pagePopupMap.extendAttr})
|
|
294
|
-
|
|
295
|
-
const busiIdentityId = pagePopupMap.popupBusiIdentityId
|
|
296
|
-
const dynamicMapCompKeys = Object.keys(dynamicMapComp)
|
|
297
|
-
const reqData = getReqData(pagePopupMap.inParamMappingList || [], {dynamicMapComp, dynamicMapCompKeys, dynamicHireRelat})
|
|
298
|
-
// 是表格还是list
|
|
299
|
-
const isList = pagePopupMap?.objOrList == '1'
|
|
300
|
-
|
|
301
|
-
let outParamMappingList = pagePopupMap?.outParamMappingList?.map(item => {
|
|
302
|
-
const orignParamArr = item.orignParam ? item.orignParam.split('->') : []
|
|
303
|
-
const orignParam = item.orignParam ?
|
|
304
|
-
(
|
|
305
|
-
dialogProps?.bindFormData == '1' && !isList ?
|
|
306
|
-
orignParamArr.join('.') :
|
|
307
|
-
orignParamArr[orignParamArr.length - 1]
|
|
308
|
-
)
|
|
309
|
-
: ''
|
|
310
|
-
return {
|
|
311
|
-
...item,
|
|
312
|
-
orignParam,
|
|
313
|
-
}
|
|
314
|
-
}) || []
|
|
315
|
-
let mapList = {} // 在返回的是list的数据的时候,我们支持返回数据的key跟父页面的编码不一致,所以这里需要做一个映射
|
|
316
|
-
let selectionsObj = {} // 打开弹框的时候,如果是多选表格数据,这个的作用就是回显已经选择的数据(list数据需要选择主键,也就是primaryKeyFlag)
|
|
317
|
-
|
|
318
|
-
if (isList ) {
|
|
319
|
-
const primaryKeys = []
|
|
320
|
-
mapList = outParamMappingList?.reduce((ret, item) => {
|
|
321
|
-
const { orignParam, destParam, primaryKeyFlag = '' } = item
|
|
322
|
-
const destParamArr = destParam ? destParam.split('->') : []
|
|
323
|
-
const transDestParam = destParam ? destParamArr[destParamArr.length - 1] : ''
|
|
324
|
-
ret[transDestParam] = orignParam
|
|
325
|
-
if (primaryKeyFlag == '1') {
|
|
326
|
-
primaryKeys.push(orignParam)
|
|
327
|
-
}
|
|
328
|
-
return ret
|
|
329
|
-
}, {})
|
|
330
|
-
|
|
331
|
-
outParamMappingList = [
|
|
332
|
-
{
|
|
333
|
-
orignParam: '',
|
|
334
|
-
destParam: pagePopupMap.parentTable || '',
|
|
335
|
-
primaryKeys,
|
|
336
|
-
isList: true
|
|
337
|
-
}
|
|
338
|
-
]
|
|
339
|
-
const orginTableConfig = getTableConfig(outParamMappingList, { dynamicMapComp, dynamicMapCompKeys, dynamicHireRelat })
|
|
340
|
-
selectionsObj.selections = (orginTableConfig?.refValue || [])
|
|
341
|
-
selectionsObj.primaryKeys = primaryKeys
|
|
342
|
-
}
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
let rootStore = {}
|
|
346
|
-
let rootFormData = {}
|
|
347
|
-
let dialogClose = null
|
|
348
|
-
const initPolyfillConfigs = {}
|
|
349
|
-
if (pagePopupMap.outDisplayTrigger) {
|
|
350
|
-
initPolyfillConfigs[pagePopupMap.outDisplayTrigger] = (config) => {
|
|
351
|
-
return {
|
|
352
|
-
onClick() {
|
|
353
|
-
let outResult = rootStore.tableSelectedInfo
|
|
354
|
-
if (isList) {
|
|
355
|
-
outResult = rootStore.tableSelectedInfo?.map(item => {
|
|
356
|
-
const retItem = {
|
|
357
|
-
...item
|
|
358
|
-
}
|
|
359
|
-
Object.keys(mapList).forEach(key => {
|
|
360
|
-
if (mapList[key]) {
|
|
361
|
-
retItem[key] = item[mapList[key]]
|
|
362
|
-
}
|
|
363
|
-
})
|
|
364
|
-
return retItem
|
|
365
|
-
})
|
|
366
|
-
}
|
|
367
|
-
if (dialogProps?.bindFormData == '1' && !isList) {
|
|
368
|
-
outResult = rootFormData
|
|
369
|
-
}
|
|
370
|
-
// 定义打开弹框-中间钩子
|
|
371
|
-
const configMiddleOpenDialog = compConfig?.middleOpenDialog
|
|
372
|
-
const parmasMiddleOpenDialog = middleOpenDialog
|
|
373
|
-
if (configMiddleOpenDialog || parmasMiddleOpenDialog) {
|
|
374
|
-
middleOpenDialog = async (params) => {
|
|
375
|
-
let ret = null
|
|
376
|
-
if (parmasMiddleOpenDialog) {
|
|
377
|
-
ret = parmasMiddleOpenDialog?.(params)
|
|
378
|
-
}
|
|
379
|
-
if (ret) {
|
|
380
|
-
const outputParams = await ret
|
|
381
|
-
return configMiddleOpenDialog?.({
|
|
382
|
-
...params,
|
|
383
|
-
outputParams
|
|
384
|
-
})
|
|
385
|
-
}
|
|
386
|
-
return configMiddleOpenDialog?.(params)
|
|
387
|
-
}
|
|
388
|
-
}
|
|
389
|
-
let middleOpenDialogRet = outResult
|
|
390
|
-
if (middleOpenDialog) {
|
|
391
|
-
middleOpenDialogRet = middleOpenDialog({
|
|
392
|
-
dynamicMapComp,
|
|
393
|
-
rootValue,
|
|
394
|
-
dynamicHireRelat,
|
|
395
|
-
compConfig,
|
|
396
|
-
pagePopupMap,
|
|
397
|
-
inputParams: reqData,
|
|
398
|
-
outputParams: outResult
|
|
399
|
-
}) || middleOpenDialogRet
|
|
400
|
-
}
|
|
401
|
-
if (isPromise(middleOpenDialogRet)) {
|
|
402
|
-
middleOpenDialogRet.then(res => {
|
|
403
|
-
toInitOutParams(res)
|
|
404
|
-
})
|
|
405
|
-
} else {
|
|
406
|
-
toInitOutParams(middleOpenDialogRet)
|
|
407
|
-
}
|
|
408
|
-
|
|
409
|
-
function toInitOutParams(outData) {
|
|
410
|
-
initOutParamData(outParamMappingList, {dynamicMapComp, dynamicMapCompKeys, dynamicHireRelat, outResult: outData})
|
|
411
|
-
dialogClose?.()
|
|
412
|
-
|
|
413
|
-
toAfterOpenDialog(outData)
|
|
414
|
-
}
|
|
415
|
-
}
|
|
416
|
-
}
|
|
417
|
-
}
|
|
418
|
-
}
|
|
419
|
-
if (pagePopupMap.closedTrigger) {
|
|
420
|
-
initPolyfillConfigs[pagePopupMap.closedTrigger] = (config) => {
|
|
421
|
-
return {
|
|
422
|
-
onClick() {
|
|
423
|
-
dialogClose?.()
|
|
424
|
-
toAfterOpenDialog()
|
|
425
|
-
}
|
|
426
|
-
}
|
|
427
|
-
}
|
|
428
|
-
}
|
|
429
|
-
|
|
430
|
-
// 定义的弹框打开前钩子
|
|
431
|
-
const configBeforeOpenDialog = compConfig?.beforeOpenDialog
|
|
432
|
-
const paramsBeforeOpenDialog = beforeOpenDialog
|
|
433
|
-
// if (configBeforeOpenDialog || paramsBeforeOpenDialog) {
|
|
434
|
-
// }
|
|
435
|
-
beforeOpenDialog = async (...arg) => {
|
|
436
|
-
bpmInstance?.changeSlide?.(false)
|
|
437
|
-
let beforeOpenDialogRet = true
|
|
438
|
-
if (paramsBeforeOpenDialog) {
|
|
439
|
-
beforeOpenDialogRet = paramsBeforeOpenDialog?.(...arg)
|
|
440
|
-
}
|
|
441
|
-
const beforeOpenDialogRetValid = await beforeOpenDialogRet
|
|
442
|
-
if (beforeOpenDialogRetValid === false) {
|
|
443
|
-
return false
|
|
444
|
-
}
|
|
445
|
-
if (configBeforeOpenDialog) {
|
|
446
|
-
return configBeforeOpenDialog?.(...arg)
|
|
447
|
-
} else {
|
|
448
|
-
return true
|
|
449
|
-
}
|
|
450
|
-
}
|
|
451
|
-
let beforeOpenDialogRet = true
|
|
452
|
-
if (beforeOpenDialog) {
|
|
453
|
-
beforeOpenDialogRet = beforeOpenDialog({
|
|
454
|
-
dynamicMapComp,
|
|
455
|
-
rootValue,
|
|
456
|
-
dynamicHireRelat,
|
|
457
|
-
compConfig,
|
|
458
|
-
pagePopupMap,
|
|
459
|
-
inputParams: reqData
|
|
460
|
-
})
|
|
461
|
-
}
|
|
462
|
-
|
|
463
|
-
if (beforeOpenDialogRet !== null && beforeOpenDialogRet !== undefined) {
|
|
464
|
-
if (isPromise(beforeOpenDialogRet)) {
|
|
465
|
-
beforeOpenDialogRet.then(res => {
|
|
466
|
-
if (res !== false) {
|
|
467
|
-
toOpenDialog()
|
|
468
|
-
}
|
|
469
|
-
})
|
|
470
|
-
} else {
|
|
471
|
-
if (beforeOpenDialogRet) {
|
|
472
|
-
toOpenDialog()
|
|
473
|
-
}
|
|
474
|
-
}
|
|
475
|
-
} else {
|
|
476
|
-
toOpenDialog()
|
|
477
|
-
}
|
|
478
|
-
|
|
479
|
-
function toAfterOpenDialog(outputParams) {
|
|
480
|
-
// 打开弹框-确认后的钩子
|
|
481
|
-
const configAfterOpenDialog = compConfig?.afterOpenDialog
|
|
482
|
-
const paramsAfterOpenDialog = afterOpenDialog
|
|
483
|
-
// if (configAfterOpenDialog || paramsAfterOpenDialog) {
|
|
484
|
-
// }
|
|
485
|
-
afterOpenDialog = async (...arg) => {
|
|
486
|
-
bpmInstance?.changeSlide?.(true)
|
|
487
|
-
paramsAfterOpenDialog?.(...arg)
|
|
488
|
-
configAfterOpenDialog?.(...arg)
|
|
489
|
-
}
|
|
490
|
-
afterOpenDialog && afterOpenDialog({
|
|
491
|
-
dynamicMapComp,
|
|
492
|
-
rootValue,
|
|
493
|
-
dynamicHireRelat,
|
|
494
|
-
compConfig,
|
|
495
|
-
pagePopupMap,
|
|
496
|
-
inputParams: reqData,
|
|
497
|
-
outputParams,
|
|
498
|
-
})
|
|
499
|
-
}
|
|
500
|
-
|
|
501
|
-
function toOpenDialog() {
|
|
502
|
-
dialogClose = openChildDialog({
|
|
503
|
-
|
|
504
|
-
buttonActions,
|
|
505
|
-
dialogProps: {
|
|
506
|
-
...(dialogProps || {}),
|
|
507
|
-
beforeClose: () => {
|
|
508
|
-
toAfterOpenDialog()
|
|
509
|
-
},
|
|
510
|
-
},
|
|
511
|
-
parentRootValue: rootValue,
|
|
512
|
-
parentDynamicMapComp: dynamicMapComp,
|
|
513
|
-
selectionsObj,
|
|
514
|
-
busiIdentityId,
|
|
515
|
-
axiosInstance: axiosInstance,
|
|
516
|
-
lang,
|
|
517
|
-
loadEvnetsReq: reqData,
|
|
518
|
-
initData: reqData,
|
|
519
|
-
components,
|
|
520
|
-
parentSelects: compConfig?._selects,
|
|
521
|
-
polyfillConfigs: {
|
|
522
|
-
...initPolyfillConfigs,
|
|
523
|
-
...(polyfillConfigs || {})
|
|
524
|
-
},
|
|
525
|
-
rootStoreChange: (val) => {
|
|
526
|
-
rootStore = val
|
|
527
|
-
},
|
|
528
|
-
rootDataChange: (val) => {
|
|
529
|
-
rootFormData = val
|
|
530
|
-
},
|
|
531
|
-
}, appContext)
|
|
532
|
-
}
|
|
533
|
-
}
|
|
534
|
-
|
|
535
|
-
// 数据校验服务
|
|
536
|
-
export async function executeDataValid(validConfig, {
|
|
537
|
-
beforeDataValidRequestService,
|
|
538
|
-
afterDataValidRequestService,
|
|
539
|
-
confirmInstance,
|
|
540
|
-
dynamicMapComp,
|
|
541
|
-
requestTraceId,
|
|
542
|
-
compConfig,
|
|
543
|
-
mixinServiceConfig,
|
|
544
|
-
rootValue,
|
|
545
|
-
builtPolyfillReq,
|
|
546
|
-
axiosInstance,
|
|
547
|
-
lang
|
|
548
|
-
}) {
|
|
549
|
-
let reqData = rootValue || {}
|
|
550
|
-
const url = DATA_VALID_RULE_EXECUTE
|
|
551
|
-
let beforeRequestService
|
|
552
|
-
let afterRequestService
|
|
553
|
-
const configBeforeDataValidRequestService = compConfig?.beforeDataValidRequestService
|
|
554
|
-
if (configBeforeDataValidRequestService || beforeDataValidRequestService) {
|
|
555
|
-
beforeRequestService = async (...arg) => {
|
|
556
|
-
let beforeRequestServiceRet = true
|
|
557
|
-
if (beforeDataValidRequestService) {
|
|
558
|
-
beforeRequestServiceRet = beforeDataValidRequestService?.(...arg)
|
|
559
|
-
}
|
|
560
|
-
const beforeRequestServiceRetValid = await beforeRequestServiceRet
|
|
561
|
-
if (beforeRequestServiceRetValid === false) {
|
|
562
|
-
return false
|
|
563
|
-
}
|
|
564
|
-
if (configBeforeDataValidRequestService) {
|
|
565
|
-
return configBeforeDataValidRequestService?.(...arg)
|
|
566
|
-
} else {
|
|
567
|
-
return true
|
|
568
|
-
}
|
|
569
|
-
}
|
|
570
|
-
}
|
|
571
|
-
const configAfterDataValidRequestService = compConfig?.afterDataValidRequestService
|
|
572
|
-
if (configAfterDataValidRequestService || afterDataValidRequestService) {
|
|
573
|
-
afterRequestService = (...arg) => {
|
|
574
|
-
afterDataValidRequestService?.(...arg)
|
|
575
|
-
configAfterDataValidRequestService?.(...arg)
|
|
576
|
-
}
|
|
577
|
-
}
|
|
578
|
-
|
|
579
|
-
let beforeRequestServiceRet = true
|
|
580
|
-
if (beforeRequestService) {
|
|
581
|
-
beforeRequestServiceRet = beforeRequestService({
|
|
582
|
-
dynamicMapComp,
|
|
583
|
-
requestTraceId,
|
|
584
|
-
mixinServiceConfig,
|
|
585
|
-
rootValue,
|
|
586
|
-
compConfig,
|
|
587
|
-
service: validConfig,
|
|
588
|
-
reqData: reqData
|
|
589
|
-
})
|
|
590
|
-
}
|
|
591
|
-
const beforeRequestServiceRetValid = await beforeRequestServiceRet
|
|
592
|
-
if (beforeRequestServiceRetValid === false) {
|
|
593
|
-
return
|
|
594
|
-
}
|
|
595
|
-
const ret = await buildInRequest(url, {
|
|
596
|
-
aid_language: lang,
|
|
597
|
-
requestTraceId,
|
|
598
|
-
...reqData,
|
|
599
|
-
...(builtPolyfillReq || {}),
|
|
600
|
-
pmHandleBusinessIdentity: {
|
|
601
|
-
busiIdentityId: validConfig.busiIdentityId,
|
|
602
|
-
pageMetaId: validConfig.pageMetaId,
|
|
603
|
-
tenantId: validConfig.tenantId,
|
|
604
|
-
mainServiceCode: mixinServiceConfig?.mainServiceCode, // 提交按钮绑定上绑定的融合服务编码
|
|
605
|
-
},
|
|
606
|
-
}, {
|
|
607
|
-
method: "post",
|
|
608
|
-
})
|
|
609
|
-
let result = ret.data || {}
|
|
610
|
-
if (ret.data?.baseResponse) {
|
|
611
|
-
result = ret.data?.baseResponse
|
|
612
|
-
}
|
|
613
|
-
const resultCode = result.resultCode
|
|
614
|
-
const resultMessage = result?.resultMessage || ''
|
|
615
|
-
let type = ''
|
|
616
|
-
let weakFlag = false
|
|
617
|
-
|
|
618
|
-
if (RESULT_CODE.SUCCESS !== resultCode) {
|
|
619
|
-
switch (resultCode) {
|
|
620
|
-
case RESULT_CODE.WARNING:
|
|
621
|
-
type = 'warning'
|
|
622
|
-
weakFlag = true
|
|
623
|
-
break;
|
|
624
|
-
case RESULT_CODE.ERROR:
|
|
625
|
-
type = 'error'
|
|
626
|
-
weakFlag = false
|
|
627
|
-
break;
|
|
628
|
-
case RESULT_CODE.INFO:
|
|
629
|
-
type = 'info'
|
|
630
|
-
break;
|
|
631
|
-
case RESULT_CODE.OTHER:
|
|
632
|
-
type = 'error'
|
|
633
|
-
break;
|
|
634
|
-
default:
|
|
635
|
-
type = 'error'
|
|
636
|
-
break;
|
|
637
|
-
}
|
|
638
|
-
return new Promise((resolver, inject) => {
|
|
639
|
-
confirmInstance(resultMessage, lang?.indexOf('zh') > -1 ? '提示' : 'Hint', {
|
|
640
|
-
type,
|
|
641
|
-
showCancelButton: weakFlag
|
|
642
|
-
}).then(() => {
|
|
643
|
-
if (!weakFlag) {
|
|
644
|
-
afterRequestService && afterRequestService(ret, {valid: false})
|
|
645
|
-
resolver(false)
|
|
646
|
-
} else {
|
|
647
|
-
afterRequestService && afterRequestService(ret, {valid: true})
|
|
648
|
-
resolver(true)
|
|
649
|
-
}
|
|
650
|
-
}).catch(() => {
|
|
651
|
-
afterRequestService && afterRequestService(ret, {valid: false})
|
|
652
|
-
inject(false)
|
|
653
|
-
})
|
|
654
|
-
})
|
|
655
|
-
}
|
|
656
|
-
afterRequestService && afterRequestService(ret, {valid: true})
|
|
657
|
-
return true
|
|
658
|
-
}
|
|
659
|
-
|
|
660
|
-
function closePage(lcpPageClosedMapVO) {
|
|
661
|
-
if (lcpPageClosedMapVO?.closedType == '1') {
|
|
662
|
-
const top = window.top
|
|
663
|
-
top?.close()
|
|
664
|
-
} else {
|
|
665
|
-
window?.history?.back()
|
|
666
|
-
}
|
|
667
|
-
}
|
|
668
|
-
|
|
669
|
-
export async function executeEventOrchestration({
|
|
670
|
-
beforeDataValidRequestService,
|
|
671
|
-
afterDataValidRequestService,
|
|
672
|
-
beforeRequestService,
|
|
673
|
-
afterRequestService,
|
|
674
|
-
beforeOpenDialog,
|
|
675
|
-
afterOpenDialog,
|
|
676
|
-
middleOpenDialog,
|
|
677
|
-
components,
|
|
678
|
-
props,
|
|
679
|
-
requestTraceId,
|
|
680
|
-
axiosInstance,
|
|
681
|
-
polyfillConfigs,
|
|
682
|
-
buttonActions,
|
|
683
|
-
rootValue,
|
|
684
|
-
confirmInstance,
|
|
685
|
-
dialogReq,
|
|
686
|
-
dynamicMapComp,
|
|
687
|
-
messageInstance,
|
|
688
|
-
openChildDialog,
|
|
689
|
-
messageCb,
|
|
690
|
-
lang,
|
|
691
|
-
builtPolyfillReq,
|
|
692
|
-
appContext
|
|
693
|
-
} = {}) {
|
|
694
|
-
const PageServiceMapVOList = props.config.lcpPageServiceMapVOList || []
|
|
695
|
-
const mixinServiceConfig = PageServiceMapVOList.find(service => service.serviceType == '1')
|
|
696
|
-
const lcpPageRuleVOLis = props.config?.lcpPageRuleVOList || []
|
|
697
|
-
if (lcpPageRuleVOLis?.length) {
|
|
698
|
-
// 数据校验服务
|
|
699
|
-
const validConfig = lcpPageRuleVOLis[0]
|
|
700
|
-
const valid = await executeDataValid(validConfig, {
|
|
701
|
-
dynamicMapComp,
|
|
702
|
-
requestTraceId,
|
|
703
|
-
rootValue,
|
|
704
|
-
axiosInstance,
|
|
705
|
-
mixinServiceConfig,
|
|
706
|
-
compConfig: props.config,
|
|
707
|
-
confirmInstance,
|
|
708
|
-
builtPolyfillReq,
|
|
709
|
-
beforeDataValidRequestService,
|
|
710
|
-
afterDataValidRequestService,
|
|
711
|
-
lang
|
|
712
|
-
})
|
|
713
|
-
if (!valid) {
|
|
714
|
-
return
|
|
715
|
-
}
|
|
716
|
-
}
|
|
717
|
-
|
|
718
|
-
if (PageServiceMapVOList?.length) {
|
|
719
|
-
const dynamicHireRelat = props.config?.dynamicHireRelat
|
|
720
|
-
dispatchClickEvents({
|
|
721
|
-
serviceList: PageServiceMapVOList,
|
|
722
|
-
axiosInstance,
|
|
723
|
-
requestTraceId,
|
|
724
|
-
rootValue,
|
|
725
|
-
dynamicMapComp,
|
|
726
|
-
dynamicHireRelat,
|
|
727
|
-
messageInstance,
|
|
728
|
-
messageCb,
|
|
729
|
-
compConfig: props.config,
|
|
730
|
-
dialogReq,
|
|
731
|
-
lang,
|
|
732
|
-
beforeRequestService,
|
|
733
|
-
afterRequestService
|
|
734
|
-
})
|
|
735
|
-
}
|
|
736
|
-
const lcpPagePopupMapVO = props.config.lcpPagePopupMapVO
|
|
737
|
-
if (lcpPagePopupMapVO) {
|
|
738
|
-
|
|
739
|
-
const dynamicHireRelat = props.config?.dynamicHireRelat
|
|
740
|
-
openDailg({
|
|
741
|
-
beforeOpenDialog,
|
|
742
|
-
afterOpenDialog,
|
|
743
|
-
middleOpenDialog,
|
|
744
|
-
components,
|
|
745
|
-
rootValue,
|
|
746
|
-
polyfillConfigs,
|
|
747
|
-
pagePopupMap: lcpPagePopupMapVO,
|
|
748
|
-
axiosInstance,
|
|
749
|
-
dynamicMapComp,
|
|
750
|
-
dynamicHireRelat,
|
|
751
|
-
appContext,
|
|
752
|
-
lang,
|
|
753
|
-
messageCb,
|
|
754
|
-
buttonActions,
|
|
755
|
-
openChildDialog,
|
|
756
|
-
compConfig: props.config,
|
|
757
|
-
})
|
|
758
|
-
}
|
|
759
|
-
const lcpPageClosedMapVO = props.config.lcpPageClosedMapVO
|
|
760
|
-
if (lcpPageClosedMapVO) {
|
|
761
|
-
closePage(lcpPageClosedMapVO)
|
|
762
|
-
}
|
|
763
|
-
}
|