resolver-egretimp-plus 0.0.71 → 0.0.72

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "resolver-egretimp-plus",
3
- "version": "0.0.71",
3
+ "version": "0.0.72",
4
4
  "description": "交付体验渲染",
5
5
  "main": "./dist/web/index.js",
6
6
  "module": "./dist/web/index.js",
@@ -1,6 +1,6 @@
1
1
  import { resultToast } from "../../utils/respone"
2
2
 
3
- export async function executeLoadServices(services = [], { requestTraceId, axiosInstance, messageInstance, reqData, respCb }) {
3
+ export async function executeLoadServices(services = [], { requestTraceId, businessIdentityReqData = {}, axiosInstance, messageInstance, reqData, respCb }) {
4
4
  if (reqData?.notLoad) {
5
5
  return
6
6
  }
@@ -23,6 +23,7 @@ export async function executeLoadServices(services = [], { requestTraceId, axios
23
23
  pageMetaId: service.pageMetaId,
24
24
  tenantId: service.tenantId,
25
25
  mainServiceCode: mixinServiceConfig?.mainServiceCode, // 提交按钮绑定上绑定的融合服务编码
26
+ ...businessIdentityReqData,
26
27
  },
27
28
  ...(reqData || {})
28
29
  }
@@ -109,7 +109,7 @@ export default {
109
109
  const ret = sortList.reduce((ret, item) => {
110
110
  ret = ret.sort((a, b) => (a[item.prop] > b[item.prop] ? (item.order === 'descending' ? 1 : -1) : a[item.prop] === b[item.prop] ? 0 : (item.order === 'descending' ? -1 : 1)))
111
111
  return ret
112
- }, [...(props.refValue.value || [])])
112
+ }, [...(normalTableData.value || [])])
113
113
  return ret
114
114
  })
115
115
 
@@ -44,7 +44,7 @@ export function usePageConfig() {
44
44
 
45
45
  export function useBuildInData({ messageInstance, loadingInstance, requestTraceId }) {
46
46
  const pageConfig = ref(null)
47
- function getPageConfig(reqData, cb) {
47
+ function getPageConfig(reqData, { configCb, selectsCb}) {
48
48
  if (loadingInstance.start && typeof loadingInstance.start === 'function') {
49
49
  loadingInstance.start()
50
50
  } else if (loadingInstance.show && typeof loadingInstance.show === 'function') {
@@ -54,8 +54,8 @@ export function useBuildInData({ messageInstance, loadingInstance, requestTraceI
54
54
  if (resultToast(ret.data, messageInstance, { noSuccessIip: true })) {
55
55
  // pageConfig.value = normalPageConfigs(mock)
56
56
  pageConfig.value = normalPageConfigs(ret.data.result)
57
- cb(pageConfig.value)
58
- getSelects(ret.data.result?.pmBusinessIdentityVO?.tenantId)
57
+ configCb && configCb(pageConfig.value)
58
+ getSelects(ret.data.result?.pmBusinessIdentityVO?.tenantId, selectsCb)
59
59
  return
60
60
  } else {
61
61
  if (loadingInstance.finish && typeof loadingInstance.finish === 'function') {
@@ -73,12 +73,13 @@ export function useBuildInData({ messageInstance, loadingInstance, requestTraceI
73
73
  })
74
74
  }
75
75
  const selects = ref({})
76
- function getSelects(tenantId) {
76
+ function getSelects(tenantId, selectsCb) {
77
77
  buildInRequest(GET_SYS_PARAM_CACHE, {
78
78
  tenantId
79
79
  }).then(ret => {
80
80
  if (resultToast(ret.data, messageInstance, { noSuccessIip: true })) {
81
81
  selects.value = JSON.parse(ret.data.result || '{}')
82
+ selectsCb && selectsCb(selects.value)
82
83
  return
83
84
  } else {
84
85
  if (loadingInstance.finish && typeof loadingInstance.finish === 'function') {
package/src/index.jsx CHANGED
@@ -98,6 +98,11 @@ export default {
98
98
  type: Object,
99
99
  default: () => ({})
100
100
  },
101
+ // 加载服务中businessIdentity的额外参数
102
+ businessIdentityReqData: {
103
+ type: Object,
104
+ default: () => ({})
105
+ },
101
106
  // 如果当前页面是弹框,这个是父页面传入的根数据
102
107
  parentRootValue: {
103
108
  type: Object,
@@ -187,6 +192,7 @@ export default {
187
192
  {
188
193
  requestTraceId: props.requestTraceId,
189
194
  messageInstance: toRef(props, 'messageInstance'),
195
+ businessIdentityReqData: props.businessIdentityReqData,
190
196
  axiosInstance,
191
197
  reqData: props.loadEvnetsReq,
192
198
  respCb: (result) => {
@@ -36,9 +36,15 @@ getPageConfig({
36
36
  busiIdentityId: props.busiIdentityId,
37
37
  queryPageMeta: '1',
38
38
  queryPageService: '1',
39
- }, (pageConfig) => {
40
- // 配置数据加载完成事件 'loadedConfigCompeted'
41
- attrs?.onLoadedConfigCompeted?.(pageConfig)
39
+ }, {
40
+ configCb: (pageConfig) => {
41
+ // 配置数据加载完成事件 'loadedConfigCompeted'
42
+ attrs?.onLoadedConfigCompeted?.(pageConfig)
43
+ },
44
+ selectsCb: (selects) => {
45
+ // 配置数据加载完成事件 'loadedConfigCompeted'
46
+ attrs?.onLoadedSelectsCompeted?.(selects)
47
+ },
42
48
  })
43
49
  const allSelects = computed(() => {
44
50
  return {