resolver-egretimp-plus 0.0.69 → 0.0.70
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/const/index.js +1 -1
- package/dist/h5/index.js +2 -2
- package/dist/theme/element/index.css +1 -1
- package/dist/theme/element/src/components/common.scss +1 -1
- package/dist/web/index.js +2 -2
- package/package.json +1 -1
- package/src/analysisComponent.jsx +2 -2
- package/src/components/helper/eventOrchestration.js +9 -11
- package/src/components/helper/resolver.js +2 -3
- package/src/hooks/pageConfig.js +2 -2
- package/src/index.jsx +4 -4
- package/src/resolver-H5.vue +2 -2
- package/src/resolver-common.vue +3 -3
- package/src/resolver-web.vue +2 -2
- package/src/theme/element/components/common.scss +1 -1
- package/src/utils/common.js +1 -1
- package/src/utils/render.jsx +1 -2
package/package.json
CHANGED
|
@@ -48,7 +48,7 @@ export default {
|
|
|
48
48
|
delete ret.onClick
|
|
49
49
|
return ret
|
|
50
50
|
})
|
|
51
|
-
const
|
|
51
|
+
const requestTraceId = inject('requestTraceId')
|
|
52
52
|
const polyfillConfigs = inject('_polyfillConfigs', {})
|
|
53
53
|
const buttonActions = inject('buttonActions', {})
|
|
54
54
|
const route = useRoute()
|
|
@@ -185,7 +185,7 @@ export default {
|
|
|
185
185
|
attrs?.onClick?.call(context, e) // 如果配置中有点击事件
|
|
186
186
|
executeEventOrchestration({
|
|
187
187
|
props,
|
|
188
|
-
|
|
188
|
+
requestTraceId: requestTraceId?.value,
|
|
189
189
|
axiosInstance: _axiosInstance?.value,
|
|
190
190
|
polyfillConfigs,
|
|
191
191
|
rootValue: rootValue?.value,
|
|
@@ -4,16 +4,16 @@ import { getRelateConfigKeys } from "../../rules/ruleUtils"
|
|
|
4
4
|
import { RESULT_CODE, resultToast } from "../../utils/respone"
|
|
5
5
|
import { unionWith } from "../../utils/index"
|
|
6
6
|
|
|
7
|
-
export async function dispatchClickEvents ({serviceList = [],
|
|
7
|
+
export async function dispatchClickEvents ({serviceList = [], requestTraceId, axiosInstance, dynamicMapComp, rootValue, dynamicHireRelat, messageCb, compConfig, messageInstance}) {
|
|
8
8
|
const dynamicMapCompKeys = Object.keys(dynamicMapComp)
|
|
9
9
|
const mixinServiceConfig = serviceList.find(service => service.serviceType === '1')
|
|
10
10
|
for (let i = 0; i < serviceList.length; i++) {
|
|
11
11
|
const service = serviceList[i]
|
|
12
|
-
dispatchClickEvent(service, {dynamicMapComp,
|
|
12
|
+
dispatchClickEvent(service, {dynamicMapComp, requestTraceId, mixinServiceConfig, rootValue, dynamicMapCompKeys, dynamicHireRelat, axiosInstance, messageCb, compConfig, messageInstance})
|
|
13
13
|
}
|
|
14
14
|
}
|
|
15
15
|
|
|
16
|
-
export async function dispatchClickEvent(service, { dynamicMapComp,
|
|
16
|
+
export async function dispatchClickEvent(service, { dynamicMapComp, requestTraceId, mixinServiceConfig, rootValue, dynamicMapCompKeys, dynamicHireRelat, axiosInstance, messageCb, compConfig, messageInstance }) {
|
|
17
17
|
let reqData = rootValue || {}
|
|
18
18
|
let tableConfig = null
|
|
19
19
|
if (service.transactionType == '1') {
|
|
@@ -29,9 +29,8 @@ export async function dispatchClickEvent(service, { dynamicMapComp, request_trac
|
|
|
29
29
|
url,
|
|
30
30
|
method: "post",
|
|
31
31
|
data: {
|
|
32
|
-
|
|
32
|
+
requestTraceId,
|
|
33
33
|
pmHandleBusinessIdentity: {
|
|
34
|
-
request_traceId,
|
|
35
34
|
busiIdentityId: service.busiIdentityId,
|
|
36
35
|
pageMetaId: service.pageMetaId,
|
|
37
36
|
tenantId: service.tenantId,
|
|
@@ -234,16 +233,15 @@ export function openDailg({
|
|
|
234
233
|
}
|
|
235
234
|
|
|
236
235
|
// 数据校验服务
|
|
237
|
-
export async function executeDataValid(validConfig, { dynamicMapComp,
|
|
236
|
+
export async function executeDataValid(validConfig, { dynamicMapComp, requestTraceId, mixinServiceConfig, rootValue, axiosInstance, lang}) {
|
|
238
237
|
let reqData = rootValue || {}
|
|
239
238
|
const url = DATA_VALID_RULE_EXECUTE
|
|
240
239
|
const ret = await (axiosInstance && axiosInstance({
|
|
241
240
|
url,
|
|
242
241
|
method: "post",
|
|
243
242
|
data: {
|
|
244
|
-
|
|
243
|
+
requestTraceId,
|
|
245
244
|
pmHandleBusinessIdentity: {
|
|
246
|
-
request_traceId,
|
|
247
245
|
busiIdentityId: validConfig.busiIdentityId,
|
|
248
246
|
pageMetaId: validConfig.pageMetaId,
|
|
249
247
|
tenantId: validConfig.tenantId,
|
|
@@ -307,7 +305,7 @@ function closePage(lcpPageClosedMapVO) {
|
|
|
307
305
|
}
|
|
308
306
|
}
|
|
309
307
|
|
|
310
|
-
export async function executeEventOrchestration({props,
|
|
308
|
+
export async function executeEventOrchestration({props, requestTraceId, axiosInstance, polyfillConfigs, buttonActions, rootValue, confirmInstance, dynamicMapComp, messageInstance, openChildDialog, messageCb, lang, appContext } = {}) {
|
|
311
309
|
const lcpPageRuleVOLis = props.config?.lcpPageRuleVOList || []
|
|
312
310
|
const PageServiceMapVOList = props.config.lcpPageServiceMapVOList || []
|
|
313
311
|
const mixinServiceConfig = PageServiceMapVOList.find(service => service.serviceType === '1')
|
|
@@ -316,7 +314,7 @@ export async function executeEventOrchestration({props, request_traceId, axiosIn
|
|
|
316
314
|
const validConfig = lcpPageRuleVOLis[0]
|
|
317
315
|
const valid = await executeDataValid(validConfig, {
|
|
318
316
|
dynamicMapComp,
|
|
319
|
-
|
|
317
|
+
requestTraceId,
|
|
320
318
|
rootValue,
|
|
321
319
|
axiosInstance,
|
|
322
320
|
mixinServiceConfig,
|
|
@@ -332,7 +330,7 @@ export async function executeEventOrchestration({props, request_traceId, axiosIn
|
|
|
332
330
|
dispatchClickEvents({
|
|
333
331
|
serviceList: PageServiceMapVOList,
|
|
334
332
|
axiosInstance,
|
|
335
|
-
|
|
333
|
+
requestTraceId,
|
|
336
334
|
rootValue,
|
|
337
335
|
dynamicMapComp,
|
|
338
336
|
dynamicHireRelat,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { resultToast } from "../../utils/respone"
|
|
2
2
|
|
|
3
|
-
export async function executeLoadServices(services = [], {
|
|
3
|
+
export async function executeLoadServices(services = [], { requestTraceId, axiosInstance, messageInstance, reqData, respCb }) {
|
|
4
4
|
if (reqData?.notLoad) {
|
|
5
5
|
return
|
|
6
6
|
}
|
|
@@ -17,9 +17,8 @@ export async function executeLoadServices(services = [], { request_traceId, axio
|
|
|
17
17
|
url,
|
|
18
18
|
method: "post",
|
|
19
19
|
data: {
|
|
20
|
-
|
|
20
|
+
requestTraceId,
|
|
21
21
|
pmHandleBusinessIdentity: {
|
|
22
|
-
request_traceId,
|
|
23
22
|
busiIdentityId: service.busiIdentityId,
|
|
24
23
|
pageMetaId: service.pageMetaId,
|
|
25
24
|
tenantId: service.tenantId,
|
package/src/hooks/pageConfig.js
CHANGED
|
@@ -42,7 +42,7 @@ export function usePageConfig() {
|
|
|
42
42
|
}
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
-
export function useBuildInData({ messageInstance, loadingInstance,
|
|
45
|
+
export function useBuildInData({ messageInstance, loadingInstance, requestTraceId }) {
|
|
46
46
|
const pageConfig = ref(null)
|
|
47
47
|
function getPageConfig(reqData, cb) {
|
|
48
48
|
if (loadingInstance.start && typeof loadingInstance.start === 'function') {
|
|
@@ -50,7 +50,7 @@ export function useBuildInData({ messageInstance, loadingInstance, request_trace
|
|
|
50
50
|
} else if (loadingInstance.show && typeof loadingInstance.show === 'function') {
|
|
51
51
|
loadingInstance.show()
|
|
52
52
|
}
|
|
53
|
-
buildInRequest(QUERY_PAGE_CONFIG_DATA, {...reqData,
|
|
53
|
+
buildInRequest(QUERY_PAGE_CONFIG_DATA, {...reqData, requestTraceId}).then(ret => {
|
|
54
54
|
if (resultToast(ret.data, messageInstance, { noSuccessIip: true })) {
|
|
55
55
|
// pageConfig.value = normalPageConfigs(mock)
|
|
56
56
|
pageConfig.value = normalPageConfigs(ret.data.result)
|
package/src/index.jsx
CHANGED
|
@@ -112,7 +112,7 @@ export default {
|
|
|
112
112
|
},
|
|
113
113
|
// 提示语的回调
|
|
114
114
|
messageCb: Function,
|
|
115
|
-
|
|
115
|
+
requestTraceId: {
|
|
116
116
|
type: String,
|
|
117
117
|
}
|
|
118
118
|
},
|
|
@@ -157,7 +157,7 @@ export default {
|
|
|
157
157
|
executeLoadServices(
|
|
158
158
|
props.config?.pmPageServiceMapVOList || props.config?.lcpPageServiceMapVOList || [],
|
|
159
159
|
{
|
|
160
|
-
|
|
160
|
+
requestTraceId: props.requestTraceId,
|
|
161
161
|
messageInstance: toRef(props, 'messageInstance'),
|
|
162
162
|
axiosInstance,
|
|
163
163
|
reqData: props.loadEvnetsReq,
|
|
@@ -185,7 +185,7 @@ export default {
|
|
|
185
185
|
executeLoadServices(
|
|
186
186
|
props.config?.pmPageServiceMapVOList || [],
|
|
187
187
|
{
|
|
188
|
-
|
|
188
|
+
requestTraceId: props.requestTraceId,
|
|
189
189
|
messageInstance: toRef(props, 'messageInstance'),
|
|
190
190
|
axiosInstance,
|
|
191
191
|
reqData: props.loadEvnetsReq,
|
|
@@ -223,7 +223,7 @@ export default {
|
|
|
223
223
|
provide('_parentRootValue', props.parentRootValue)
|
|
224
224
|
provide('_selectionsObj', props.selectionsObj)
|
|
225
225
|
provide('_polyfillConfigs', props.polyfillConfigs)
|
|
226
|
-
provide('
|
|
226
|
+
provide('requestTraceId', toRef(props, 'requestTraceId')) // 所有渲染器调用的接口,都需要加次参数(生哥提)
|
|
227
227
|
|
|
228
228
|
const rootForm = ref(null)
|
|
229
229
|
provide('rootForm', rootForm)
|
package/src/resolver-H5.vue
CHANGED
|
@@ -30,7 +30,7 @@ const props = defineProps({
|
|
|
30
30
|
return () => {}
|
|
31
31
|
}
|
|
32
32
|
},
|
|
33
|
-
|
|
33
|
+
requestTraceId: {
|
|
34
34
|
type: String,
|
|
35
35
|
default: generateUniqueId()
|
|
36
36
|
}
|
|
@@ -72,6 +72,6 @@ defineExpose({
|
|
|
72
72
|
:confirmInstance="props.confirmInstance"
|
|
73
73
|
:openChildDialogInstance="props.openChildDialogInstance"
|
|
74
74
|
:loadingInstance="props.loadingInstance"
|
|
75
|
-
:
|
|
75
|
+
:requestTraceId="props.requestTraceId"
|
|
76
76
|
></Resolver>
|
|
77
77
|
</template>
|
package/src/resolver-common.vue
CHANGED
|
@@ -22,7 +22,7 @@ const props = defineProps({
|
|
|
22
22
|
type: [Object, Function],
|
|
23
23
|
default: () => null
|
|
24
24
|
},
|
|
25
|
-
|
|
25
|
+
requestTraceId: {
|
|
26
26
|
type: String,
|
|
27
27
|
}
|
|
28
28
|
})
|
|
@@ -31,7 +31,7 @@ defineOptions({
|
|
|
31
31
|
})
|
|
32
32
|
const attrs = useAttrs()
|
|
33
33
|
initInterceptors(props.messageInstance)
|
|
34
|
-
const { getPageConfig, pageConfig, selects } = useBuildInData({messageInstance: props.messageInstance, loadingInstance: props.loadingInstance,
|
|
34
|
+
const { getPageConfig, pageConfig, selects } = useBuildInData({messageInstance: props.messageInstance, loadingInstance: props.loadingInstance, requestTraceId: props.requestTraceId})
|
|
35
35
|
getPageConfig({
|
|
36
36
|
busiIdentityId: props.busiIdentityId,
|
|
37
37
|
queryPageMeta: '1',
|
|
@@ -78,6 +78,6 @@ defineExpose({
|
|
|
78
78
|
:getNativeComps="props.getNativeComps"
|
|
79
79
|
:config="pageConfig || null"
|
|
80
80
|
:selects="allSelects"
|
|
81
|
-
:
|
|
81
|
+
:requestTraceId="props.requestTraceId"
|
|
82
82
|
></Resolver>
|
|
83
83
|
</template>
|
package/src/resolver-web.vue
CHANGED
|
@@ -29,7 +29,7 @@ const props = defineProps({
|
|
|
29
29
|
return openChildDialog
|
|
30
30
|
}
|
|
31
31
|
},
|
|
32
|
-
|
|
32
|
+
requestTraceId: {
|
|
33
33
|
type: String,
|
|
34
34
|
default: generateUniqueId()
|
|
35
35
|
}
|
|
@@ -71,6 +71,6 @@ defineExpose({
|
|
|
71
71
|
:confirmInstance="props.confirmInstance"
|
|
72
72
|
:openChildDialogInstance="props.openChildDialogInstance"
|
|
73
73
|
:loadingInstance="props.loadingInstance"
|
|
74
|
-
:
|
|
74
|
+
:requestTraceId="props.requestTraceId"
|
|
75
75
|
></Resolver>
|
|
76
76
|
</template>
|
package/src/utils/common.js
CHANGED
|
@@ -227,7 +227,7 @@ export function getDate(...arg) {
|
|
|
227
227
|
}
|
|
228
228
|
// 生成唯一值
|
|
229
229
|
export function generateUniqueId() {
|
|
230
|
-
return `${
|
|
230
|
+
return `${formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss')}-${getUuid()}`;
|
|
231
231
|
}
|
|
232
232
|
|
|
233
233
|
export function getUuid () {
|
package/src/utils/render.jsx
CHANGED
|
@@ -268,10 +268,9 @@ function getTableServices(lcpPageServiceMapVOList = [], { dynamicMapComp, dynami
|
|
|
268
268
|
}
|
|
269
269
|
return []
|
|
270
270
|
}
|
|
271
|
-
|
|
272
271
|
function parsePolyfillConfigs({ polyfillConfigs, instance, parentRootValue }, config) {
|
|
273
272
|
const hireRelat = config.hireRelat
|
|
274
|
-
const findKeys = Object.keys(polyfillConfigs).filter(key => hireRelat.endsWith(key))
|
|
273
|
+
const findKeys = Object.keys(polyfillConfigs || {}).filter(key => hireRelat.endsWith(key))
|
|
275
274
|
if (!findKeys.length) {
|
|
276
275
|
return
|
|
277
276
|
}
|