resolver-egretimp-plus 0.0.69 → 0.0.71
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 +6 -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 +11 -12
- 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 +6 -1
- package/src/utils/common.js +1 -1
- package/src/utils/const.js +7 -0
- 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') {
|
|
@@ -25,13 +25,13 @@ export async function dispatchClickEvent(service, { dynamicMapComp, request_trac
|
|
|
25
25
|
}
|
|
26
26
|
}
|
|
27
27
|
const url = service.serviceCode
|
|
28
|
+
const httpMethod = service.httpMethod
|
|
28
29
|
const ret = await (axiosInstance && axiosInstance({
|
|
29
30
|
url,
|
|
30
|
-
method: "post",
|
|
31
|
+
method: httpMethod || "post",
|
|
31
32
|
data: {
|
|
32
|
-
|
|
33
|
+
requestTraceId,
|
|
33
34
|
pmHandleBusinessIdentity: {
|
|
34
|
-
request_traceId,
|
|
35
35
|
busiIdentityId: service.busiIdentityId,
|
|
36
36
|
pageMetaId: service.pageMetaId,
|
|
37
37
|
tenantId: service.tenantId,
|
|
@@ -234,16 +234,15 @@ export function openDailg({
|
|
|
234
234
|
}
|
|
235
235
|
|
|
236
236
|
// 数据校验服务
|
|
237
|
-
export async function executeDataValid(validConfig, { dynamicMapComp,
|
|
237
|
+
export async function executeDataValid(validConfig, { dynamicMapComp, requestTraceId, mixinServiceConfig, rootValue, axiosInstance, lang}) {
|
|
238
238
|
let reqData = rootValue || {}
|
|
239
239
|
const url = DATA_VALID_RULE_EXECUTE
|
|
240
240
|
const ret = await (axiosInstance && axiosInstance({
|
|
241
241
|
url,
|
|
242
242
|
method: "post",
|
|
243
243
|
data: {
|
|
244
|
-
|
|
244
|
+
requestTraceId,
|
|
245
245
|
pmHandleBusinessIdentity: {
|
|
246
|
-
request_traceId,
|
|
247
246
|
busiIdentityId: validConfig.busiIdentityId,
|
|
248
247
|
pageMetaId: validConfig.pageMetaId,
|
|
249
248
|
tenantId: validConfig.tenantId,
|
|
@@ -307,7 +306,7 @@ function closePage(lcpPageClosedMapVO) {
|
|
|
307
306
|
}
|
|
308
307
|
}
|
|
309
308
|
|
|
310
|
-
export async function executeEventOrchestration({props,
|
|
309
|
+
export async function executeEventOrchestration({props, requestTraceId, axiosInstance, polyfillConfigs, buttonActions, rootValue, confirmInstance, dynamicMapComp, messageInstance, openChildDialog, messageCb, lang, appContext } = {}) {
|
|
311
310
|
const lcpPageRuleVOLis = props.config?.lcpPageRuleVOList || []
|
|
312
311
|
const PageServiceMapVOList = props.config.lcpPageServiceMapVOList || []
|
|
313
312
|
const mixinServiceConfig = PageServiceMapVOList.find(service => service.serviceType === '1')
|
|
@@ -316,7 +315,7 @@ export async function executeEventOrchestration({props, request_traceId, axiosIn
|
|
|
316
315
|
const validConfig = lcpPageRuleVOLis[0]
|
|
317
316
|
const valid = await executeDataValid(validConfig, {
|
|
318
317
|
dynamicMapComp,
|
|
319
|
-
|
|
318
|
+
requestTraceId,
|
|
320
319
|
rootValue,
|
|
321
320
|
axiosInstance,
|
|
322
321
|
mixinServiceConfig,
|
|
@@ -332,7 +331,7 @@ export async function executeEventOrchestration({props, request_traceId, axiosIn
|
|
|
332
331
|
dispatchClickEvents({
|
|
333
332
|
serviceList: PageServiceMapVOList,
|
|
334
333
|
axiosInstance,
|
|
335
|
-
|
|
334
|
+
requestTraceId,
|
|
336
335
|
rootValue,
|
|
337
336
|
dynamicMapComp,
|
|
338
337
|
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/const.js
CHANGED
|
@@ -153,6 +153,7 @@ export const commonPropsType = {
|
|
|
153
153
|
columnValue: item.value,
|
|
154
154
|
columnDesc_zh: item.label,
|
|
155
155
|
columnDesc: item.label_en || item.label,
|
|
156
|
+
columnStatus: item.columnStatus
|
|
156
157
|
}
|
|
157
158
|
})
|
|
158
159
|
} catch (error) {
|
|
@@ -160,6 +161,12 @@ export const commonPropsType = {
|
|
|
160
161
|
}
|
|
161
162
|
const options = (selects?.value && selects?.value?.[selectKey]) || (selects?.value && selects?.value?.[`${config.metaCode}ListValue`]) || (selects?.value && selects?.value?.[referenceOptions]) || optionItemsList || []
|
|
162
163
|
return options
|
|
164
|
+
// const disabled = calcDisable(config, props.mode)
|
|
165
|
+
// if (disabled) {
|
|
166
|
+
// return options
|
|
167
|
+
// } else {
|
|
168
|
+
// return options.filter(item => !(item.columnStatus == '0' || item.columnStatus == '2'))
|
|
169
|
+
// }
|
|
163
170
|
}
|
|
164
171
|
},
|
|
165
172
|
placeholder: {
|
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
|
}
|