resolver-egretimp-plus 0.0.80 → 0.0.81
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 +23 -23
- package/dist/web/index.js +2 -2
- package/package.json +1 -1
- package/src/components/helper/eventOrchestration.js +60 -26
- package/src/utils/common.js +1 -1
- package/src/utils/render.jsx +10 -3
package/package.json
CHANGED
|
@@ -3,6 +3,25 @@ import { DATA_VALID_RULE_EXECUTE } from "../../api/builtIn"
|
|
|
3
3
|
import { getRelateConfigKeys } from "../../rules/ruleUtils"
|
|
4
4
|
import { RESULT_CODE, resultToast } from "../../utils/respone"
|
|
5
5
|
import { isPromise, parseExtendAttr, unionWith } from "../../utils/index"
|
|
6
|
+
import { buildInRequest } from "../../utils/request"
|
|
7
|
+
|
|
8
|
+
function assignmentPatchVal(obj = {}, path, val) {
|
|
9
|
+
let paths = path
|
|
10
|
+
if (typeof path === 'string') {
|
|
11
|
+
paths = path.split('.')
|
|
12
|
+
}
|
|
13
|
+
let currentObj = obj
|
|
14
|
+
paths.forEach((item, idx) => {
|
|
15
|
+
if (idx + 1 === paths.length) {
|
|
16
|
+
currentObj[item] = val
|
|
17
|
+
} else {
|
|
18
|
+
if (!currentObj[item]) {
|
|
19
|
+
currentObj[item] = {}
|
|
20
|
+
}
|
|
21
|
+
currentObj = currentObj[item]
|
|
22
|
+
}
|
|
23
|
+
})
|
|
24
|
+
}
|
|
6
25
|
|
|
7
26
|
export async function dispatchClickEvents ({serviceList = [], requestTraceId, axiosInstance, dialogReq, dynamicMapComp, rootValue, dynamicHireRelat, messageCb, compConfig, messageInstance, beforeRequestService, afterRequestService}) {
|
|
8
27
|
const dynamicMapCompKeys = Object.keys(dynamicMapComp)
|
|
@@ -20,8 +39,8 @@ export async function dispatchClickEvent(service, { dynamicMapComp, requestTrace
|
|
|
20
39
|
reqData = getReqData(service.inParamMappingList || [], {dynamicMapComp, dynamicMapCompKeys, dynamicHireRelat})
|
|
21
40
|
tableConfig = getTableConfig(service.outParamMappingList, { dynamicMapComp, dynamicMapCompKeys, dynamicHireRelat })
|
|
22
41
|
if (tableConfig?.vm) {
|
|
23
|
-
reqData
|
|
24
|
-
reqData
|
|
42
|
+
assignmentPatchVal(reqData, service.pageNum || 'pageNum', tableConfig.vm.page?.pageNum)
|
|
43
|
+
assignmentPatchVal(reqData, service.pageSize || 'pageSize', tableConfig.vm.page?.pageSize)
|
|
25
44
|
}
|
|
26
45
|
reqData = {
|
|
27
46
|
...reqData,
|
|
@@ -94,17 +113,19 @@ function getReqData(inParamMappingList = [], {dynamicMapComp, dynamicMapCompKeys
|
|
|
94
113
|
const configCode = configCodes[0]
|
|
95
114
|
if (configCode) {
|
|
96
115
|
const destParamArr = destParam?.split('.') || []
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
116
|
+
assignmentPatchVal(ret, destParamArr, dynamicMapComp[configCode]?.refValue)
|
|
117
|
+
|
|
118
|
+
// let currentObj = ret
|
|
119
|
+
// destParamArr.forEach((item, idx) => {
|
|
120
|
+
// if (idx + 1 === destParamArr.length) {
|
|
121
|
+
// currentObj[item] = dynamicMapComp[configCode]?.refValue
|
|
122
|
+
// } else {
|
|
123
|
+
// if (!currentObj[item]) {
|
|
124
|
+
// currentObj[item] = {}
|
|
125
|
+
// }
|
|
126
|
+
// currentObj = currentObj[item]
|
|
127
|
+
// }
|
|
128
|
+
// })
|
|
108
129
|
}
|
|
109
130
|
return ret
|
|
110
131
|
}, {})
|
|
@@ -348,20 +369,33 @@ export function openDailg({
|
|
|
348
369
|
export async function executeDataValid(validConfig, { dynamicMapComp, requestTraceId, mixinServiceConfig, rootValue, axiosInstance, lang}) {
|
|
349
370
|
let reqData = rootValue || {}
|
|
350
371
|
const url = DATA_VALID_RULE_EXECUTE
|
|
351
|
-
|
|
352
|
-
|
|
372
|
+
|
|
373
|
+
const ret = await buildInRequest(url, {
|
|
374
|
+
requestTraceId,
|
|
375
|
+
pmHandleBusinessIdentity: {
|
|
376
|
+
busiIdentityId: validConfig.busiIdentityId,
|
|
377
|
+
pageMetaId: validConfig.pageMetaId,
|
|
378
|
+
tenantId: validConfig.tenantId,
|
|
379
|
+
mainServiceCode: mixinServiceConfig?.mainServiceCode, // 提交按钮绑定上绑定的融合服务编码
|
|
380
|
+
},
|
|
381
|
+
...reqData
|
|
382
|
+
}, {
|
|
353
383
|
method: "post",
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
384
|
+
})
|
|
385
|
+
// const ret = await (axiosInstance && axiosInstance({
|
|
386
|
+
// url,
|
|
387
|
+
// method: "post",
|
|
388
|
+
// data: {
|
|
389
|
+
// requestTraceId,
|
|
390
|
+
// pmHandleBusinessIdentity: {
|
|
391
|
+
// busiIdentityId: validConfig.busiIdentityId,
|
|
392
|
+
// pageMetaId: validConfig.pageMetaId,
|
|
393
|
+
// tenantId: validConfig.tenantId,
|
|
394
|
+
// mainServiceCode: mixinServiceConfig?.mainServiceCode, // 提交按钮绑定上绑定的融合服务编码
|
|
395
|
+
// },
|
|
396
|
+
// ...reqData
|
|
397
|
+
// }
|
|
398
|
+
// }))
|
|
365
399
|
const result = ret.data || {}
|
|
366
400
|
const resultCode = result.resultCode
|
|
367
401
|
const resultMessage = result?.resultMessage || ''
|
package/src/utils/common.js
CHANGED
package/src/utils/render.jsx
CHANGED
|
@@ -394,6 +394,9 @@ export function getRenderComponentProps({ props, component, modelValue, selects,
|
|
|
394
394
|
...getRenderCompMargins(config),
|
|
395
395
|
width: commonProps.width || getBuildCompDefaultWidth(config)
|
|
396
396
|
}
|
|
397
|
+
if (config.hidden === '1') {
|
|
398
|
+
defprops.style.display = 'none'
|
|
399
|
+
}
|
|
397
400
|
|
|
398
401
|
const retObj = {
|
|
399
402
|
...defprops,
|
|
@@ -643,6 +646,12 @@ function getFormItemExtendProps(config, lang, params) {
|
|
|
643
646
|
const prop = config.dynamicHireRelat || ''
|
|
644
647
|
// const propAttr = config.dynamicHireRelat ? config.dynamicHireRelat?.split('->') : []
|
|
645
648
|
// const prop = propAttr.join('->')
|
|
649
|
+
const style = {
|
|
650
|
+
...getFormItemMargins(config)
|
|
651
|
+
}
|
|
652
|
+
if (config.hidden === '1') {
|
|
653
|
+
style.display = 'none'
|
|
654
|
+
}
|
|
646
655
|
return {
|
|
647
656
|
prop,
|
|
648
657
|
rules: getFormItemRule(config, lang, params),
|
|
@@ -651,9 +660,7 @@ function getFormItemExtendProps(config, lang, params) {
|
|
|
651
660
|
'hidden-label': config.labelWidth == 0 || config.labelWidth === '0px' || config.labelHidden == '1',
|
|
652
661
|
[`label-position-${config['label-position'] || 'right'}`]: true // label-position 支持三个值,right、left、top
|
|
653
662
|
},
|
|
654
|
-
style
|
|
655
|
-
...getFormItemMargins(config)
|
|
656
|
-
}
|
|
663
|
+
style,
|
|
657
664
|
}
|
|
658
665
|
}
|
|
659
666
|
|