resolver-egretimp-plus 0.1.121 → 0.1.122

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.1.121",
3
+ "version": "0.1.122",
4
4
  "description": "交付体验渲染",
5
5
  "main": "./dist/web/index.js",
6
6
  "module": "./dist/web/index.js",
@@ -10,6 +10,7 @@ import { useRouter } from 'vue-router'
10
10
  import { onErrorCaptured } from 'vue'
11
11
  import LoadingComponent from './components/loadingComponent/LoadingComponent.vue'
12
12
  import { useConfigLoad } from './hooks/configLoad.js'
13
+ import { OPEN_DATA_RULES } from './config.js'
13
14
 
14
15
  export default {
15
16
  name: 'AnalysisComponent',
@@ -239,20 +240,21 @@ export default {
239
240
  configLinks.reduce((parent, config) => {
240
241
  definePrivatelyProp(config, 'parent', parent)
241
242
  definePrivatelyProp(config, 'dynamicMapComp', dynamicMapComp)
242
-
243
- // 如果已经有dynamicHireRelat值的时候,就不需要再进行以下赋值了
244
- if (
245
- config?.dynamicHireRelat_bak && !configsSet?.has(config)
246
- // && props.mode !== 'operate'
247
- ) {
248
- definePrivatelyProp(config, 'dynamicHireRelat', `${config.dynamicHireRelat_bak}__@__${props.mode}__`)
249
- } else {
250
- const dynamicHireRelat = parent?.dynamicHireRelat ? `${parent?.dynamicHireRelat}${hasOwn(config, 'rowIndex') ? `[${config.rowIndex}]` : ''}->${(config.metaCode || '')}` : config.metaCode
251
- definePrivatelyProp(config, 'dynamicHireRelat', dynamicHireRelat)
252
- config.dynamicHireRelat_bak = dynamicHireRelat
243
+ if (!OPEN_DATA_RULES) {
244
+ // 如果已经有dynamicHireRelat值的时候,就不需要再进行以下赋值了
245
+ if (
246
+ config?.dynamicHireRelat_bak && !configsSet?.has(config)
247
+ // && props.mode !== 'operate'
248
+ ) {
249
+ definePrivatelyProp(config, 'dynamicHireRelat', `${config.dynamicHireRelat_bak}__@__${props.mode}__`)
250
+ } else {
251
+ const dynamicHireRelat = parent?.dynamicHireRelat ? `${parent?.dynamicHireRelat}${hasOwn(config, 'rowIndex') ? `[${config.rowIndex}]` : ''}->${(config.metaCode || '')}` : config.metaCode
252
+ definePrivatelyProp(config, 'dynamicHireRelat', dynamicHireRelat)
253
+ config.dynamicHireRelat_bak = dynamicHireRelat
254
+ }
255
+ configsSet?.add(config) // 搜集所有的config
256
+ config.dynamicHireRelat && (dynamicMapComp[config.dynamicHireRelat] = config)
253
257
  }
254
- configsSet?.add(config) // 搜集所有的config
255
- config.dynamicHireRelat && (dynamicMapComp[config.dynamicHireRelat] = config)
256
258
  return config
257
259
  })
258
260
 
@@ -47,7 +47,8 @@ export const dynamicLoadScript = (src = { type: 'js', url: '', id: '' }) => {
47
47
  resolve(src.url)
48
48
  }
49
49
  link.onerror = function () {
50
- reject(new Error('Failed to load ' + src.url), link)
50
+ resolve(src.url)
51
+ // reject(new Error('Failed to load ' + src.url), link)
51
52
  }
52
53
  document.head.appendChild(link)
53
54
  }
@@ -595,6 +595,7 @@ export async function executeDataValid(validConfig, {
595
595
  const ret = await buildInRequest(url, {
596
596
  aid_language: lang,
597
597
  requestTraceId,
598
+ busiIdentityId: validConfig.busiIdentityId,
598
599
  ...reqData,
599
600
  ...(builtPolyfillReq || {}),
600
601
  pmHandleBusinessIdentity: {
@@ -87,6 +87,8 @@ export function useBuildInData({ messageInstance, loadingInstance, requestTraceI
87
87
  }
88
88
  getSelects({
89
89
  tenantId: ret.data.result?.pmBusinessIdentityVO?.tenantId,
90
+ busiIdentityId: reqData.busiIdentityId,
91
+ requestTraceId: requestTraceId,
90
92
  ...(selectPolyReq || {})
91
93
  }, selectsCb)
92
94
  return
@@ -0,0 +1,160 @@
1
+ import { computed, inject, nextTick, reactive, unref } from "vue"
2
+ import rulesDriver from '../rules/rulesDriver'
3
+ import defaultVal from '../utils/defaultVal.js'
4
+ import {assignmentPathVal, definePrivatelyProp, getPathVal, isNonRefType, modelValueDeepMerge } from "../utils"
5
+
6
+ export function useVModel(config, props, emit, modelKey = 'update:modelValue') {
7
+ const { hireRelatMapRules, messageInstance, rootValue, ruleExecuter, dataLoad, dynamicMapComp, lang, _mapComp } = this
8
+ const currentRules = hireRelatMapRules.value[config.hireRelat]
9
+ let metaCodeKey = config.metaCode
10
+ if (modelKey !== 'update:modelValue') {
11
+ const matchs = modelKey.match(/^update:(\w+)$/)
12
+ if (!matchs) {
13
+ return
14
+ }
15
+ metaCodeKey = matchs[1]
16
+ const dynamicMapKey = config.dynamicHireRelat.replace(/->\w+$/, `->${metaCodeKey}`)
17
+ config = dynamicMapComp[dynamicMapKey]
18
+ }
19
+ const retModelVale = computed({
20
+ get() {
21
+ if (!config) {
22
+ // 如果使用v-model:[]方式绑定非modelValue,可能会出现没有对应的config
23
+ return
24
+ }
25
+ const val = (metaCodeKey ? props.modelValue?.[metaCodeKey] : props.modelValue) ?? null
26
+ if (modelKey === 'update:modelValue' && (val === undefined || val === null)) {
27
+ defaultVal(config)
28
+ // setTimeout(() => {
29
+ // defaultVal(config)
30
+ // }, 0)
31
+ }
32
+ config && (config.bindValue = val)
33
+ if (config) {
34
+ // 事件初始化执行,在dataLoaded请求完成之后,执行一次事件
35
+ if (dataLoad.value && !config.eventInit && !config.notInit) {
36
+ setTimeout(() => {
37
+ ruleExecuter?.run({
38
+ rootValue,
39
+ rules: currentRules,
40
+ config,
41
+ dynamicMapComp,
42
+ lang,
43
+ messageInstance,
44
+ _mapComp,
45
+ isInit: true,
46
+ })
47
+ rulesDriver.call({
48
+ config,
49
+ dynamicMapComp,
50
+ lang,
51
+ _mapComp,
52
+ messageInstance
53
+ }, currentRules, true)
54
+ definePrivatelyProp(config, 'eventInit', true)
55
+ }, 0)
56
+ }
57
+ }
58
+ return val
59
+ },
60
+ set(val) {
61
+ if (!config) {
62
+ return
63
+ }
64
+ const modelValue = props.modelValue
65
+ const metaCode = metaCodeKey
66
+ // if (!metaCode) return
67
+ if (!modelValue) {
68
+ // frameSet 表示的是一帧之内重复设置对应metaCode的值
69
+ // 一帧之内重复设置metaCode的值需要进行merge,也就是下面modelValueDeepMerge走的逻辑
70
+ //(
71
+ // 原因是因为一帧之后重复设置,如果不走merge,会出现val值直接覆盖原本对应的metaCode的值,
72
+ // 这个在正常情况下没什么问题,但是如果刚开始根数据对应的层级对应出现断层为空,在进行emit(update:modelValue)进行赋值之后
73
+ // 并不能立即更新到对应的props.modelValue下面去,所以会出现 同时通过config.refValue设置同层级,并且是根数据断层的情况下;会出现覆盖
74
+ // )
75
+ config.parent && (config.parent.frameSet = true)
76
+ nextTick(() => {
77
+ config.parent && (config.parent.frameSet = false)
78
+ })
79
+ let updateValue = {
80
+ [metaCode]: val
81
+ }
82
+ if (!metaCode) {
83
+ updateValue = val
84
+ }
85
+ emit('update:modelValue', updateValue)
86
+ } else {
87
+ let updateValue = modelValue?.[metaCode]
88
+ if (config?.frameSet) {
89
+ if (!metaCode) {
90
+ updateValue = modelValue
91
+ }
92
+ if (updateValue) {
93
+ if (typeof updateValue === 'object' || typeof val === 'object') {
94
+ val = modelValueDeepMerge(updateValue, val)
95
+ }
96
+ }
97
+ }
98
+ if (isNonRefType(updateValue) && isNonRefType(val) && updateValue === val) {
99
+ // 这边的值没有变,就不用出触发下面的其他动作了
100
+ return
101
+ }
102
+ try {
103
+ if (!metaCode) {
104
+ props.modelValue = val
105
+ } else {
106
+ props.modelValue[metaCode] = val
107
+ }
108
+ } catch (error) {
109
+ console.log('config', config, metaCode)
110
+ }
111
+ }
112
+ if (config) {
113
+ setTimeout(() => {
114
+ ruleExecuter?.run({
115
+ rootValue,
116
+ rules: currentRules,
117
+ config,
118
+ dynamicMapComp,
119
+ lang,
120
+ messageInstance,
121
+ _mapComp,
122
+ })
123
+ rulesDriver.call({
124
+ config,
125
+ dynamicMapComp,
126
+ lang,
127
+ _mapComp,
128
+ messageInstance
129
+ }, currentRules)
130
+ }, 0)
131
+ }
132
+ }
133
+ })
134
+ return retModelVale
135
+ }
136
+
137
+ export function useVmodels(config) {
138
+ const modelValue = computed({
139
+ get() {
140
+ const {
141
+ _rootValue,
142
+ dynamicHireRelat
143
+ } = config
144
+ return getPathVal(unref(_rootValue), dynamicHireRelat, '->')
145
+ },
146
+ set(val) {
147
+ const {
148
+ _rootValue,
149
+ dynamicHireRelat
150
+ } = config
151
+ return assignmentPathVal(_rootValue, dynamicHireRelat, val, '->')
152
+ }
153
+ })
154
+ return {
155
+ modelValue,
156
+ // vModelObjs,
157
+ // initVmodels
158
+ }
159
+
160
+ }
@@ -13,21 +13,21 @@ export function toWatchRules({
13
13
  }) {
14
14
  const ruleKeys = Object.keys(rules)
15
15
  ruleKeys.forEach(originKey => {
16
+ const keys = originKey.split('->')
16
17
  let comps = []
17
- let key = originKey
18
- while (key) {
19
- const comp = mapComp[key]
18
+ for (let index = 0; index < keys.length; index++) {
19
+ const key = keys[index];
20
+ let comp = null
21
+ if (index === 0) {
22
+ comp = mapComp[key]
23
+ } else {
24
+ comp = comps[comps.length - 1]?.pmPageMetaList?.find(item => item.metaCode === key)
25
+ }
20
26
  if (comp) {
21
- comps.unshift(comp)
22
- const convertkey = key.replace(/->\w*$/, '')
23
- if (convertkey === key) {
24
- key = ''
25
- } else {
26
- key = convertkey
27
- }
27
+ comps.push(comp)
28
28
  } else {
29
- comps = []
30
- key = ''
29
+ comp = null
30
+ break
31
31
  }
32
32
  }
33
33
  if (comps && comps.length) {
@@ -42,23 +42,18 @@ export function toWatchRules({
42
42
  currentPath,
43
43
  })
44
44
  }
45
- watchRuleTrace({comps, rootValue, watchCb})
45
+ watchRuleTrace({comps, originKey, rootValue, watchCb})
46
46
  }
47
47
  })
48
48
  }
49
49
 
50
- function watchRuleTrace({comps, rootValue, watchCb}, prefix = '', idx = 0, unWatchsList = []) {
50
+ function watchRuleTrace({comps, originKey, rootValue, watchCb}, prefix = '', idx = 0, unWatchsList = []) {
51
51
  if (comps && comps.length) {
52
52
  const comp = comps[idx]
53
- try {
54
- prefix += prefix ? `->${comp.metaCode}` : comp.metaCode
55
- } catch (error) {
56
- debugger
57
- }
53
+ prefix += prefix ? `->${comp.metaCode}` : comp.metaCode
58
54
  if (comps.length === (idx + 1)) {
59
55
  const unWatch = watch(() => getPathVal(unref(rootValue), prefix, '->'), (val) => {
60
56
  // 开始执行规则
61
- console.log('watch====:', prefix)
62
57
  watchCb?.(prefix)
63
58
  }, {
64
59
  immediate: true
@@ -70,36 +65,39 @@ function watchRuleTrace({comps, rootValue, watchCb}, prefix = '', idx = 0, unWat
70
65
  return
71
66
  }
72
67
  if (isCycleConfig(comp)) {
73
- const _mapUnWatchs = comp._mapUnWatchs || (comp._mapUnWatchs = Object.create(null))
74
- const _rowMapWatchs = _mapUnWatchs[prefix] || (_mapUnWatchs[prefix] = new Map())
75
- watch(() => getPathVal(unref(rootValue), prefix, '->')?.length, () => {
76
- const list = getPathVal(unref(rootValue), prefix, '->') || []
77
- list.forEach((row, index) => {
78
- if (!_rowMapWatchs.get(row)) {
79
- const childUnWatchs = []
80
- unWatchsList.push(childUnWatchs)
81
- const currentPrefix = `${prefix}[${index}]`
82
- const currentIdx = idx + 1
83
- watchRuleTrace({comps, rootValue, watchCb}, currentPrefix, currentIdx, [...unWatchsList])
84
- _rowMapWatchs.set(row, {key: currentPrefix, childUnWatchs})
85
- }
86
- })
87
- try {
88
- const mapKeys = _rowMapWatchs.keys()
89
- Array.from(mapKeys).forEach(row => {
90
- if (!list.some(row2 => row2 === row)) {
91
- _rowMapWatchs.get(row)?.childUnWatchs?.forEach(un => un?.())
92
- }
93
- })
94
- } catch (error) {
95
- debugger
68
+ const _mapChildUnWatchs = comp._mapChildUnWatchs || (comp._mapChildUnWatchs = Object.create(null))
69
+ const _rowMapWatchs = _mapChildUnWatchs[prefix] || (_mapChildUnWatchs[prefix] = new Map())
70
+
71
+ const _mapUnWatch = comp._mapUnWatch || (comp._mapUnWatch = Object.create(null))
72
+ !_mapUnWatch[prefix] && (_mapUnWatch[prefix] = {cbs: [], unwatch: null})
73
+ _mapUnWatch[prefix].cbs.push(({index}) => {
74
+ if (!_rowMapWatchs.get(`${originKey}__${index}`)) {
75
+ const currentUnWatchsList = [...unWatchsList]
76
+ const childUnWatchs = []
77
+ currentUnWatchsList.push(childUnWatchs)
78
+ const currentPrefix = `${prefix}[${index}]`
79
+ const currentIdx = idx + 1
80
+ watchRuleTrace({comps, originKey, rootValue, watchCb}, currentPrefix, currentIdx, currentUnWatchsList)
81
+ _rowMapWatchs.set(`${originKey}__${index}`, {key: currentPrefix, childUnWatchs})
96
82
  }
97
- }, {
98
- immediate: true
99
83
  })
84
+ if (!_mapUnWatch[prefix].unwatch) {
85
+ _mapUnWatch[prefix].unwatch = watch(() => getPathVal(unref(rootValue), prefix, '->')?.length, (length) => {
86
+
87
+ // 这边只需要根据index进行判断是否生成watch就行了,因为监听数据都是根据index索引来的,
88
+ // 在数组减少的时候,也不需要进行unwatch操作,直接留着,如果数组新增,可以直接用
89
+ for (let index = 0; index < length; index++) {
90
+ _mapUnWatch[prefix].cbs.forEach(cb => {
91
+ cb({index})
92
+ })
93
+ }
94
+ }, {
95
+ immediate: true
96
+ })
97
+ }
100
98
  } else {
101
99
  idx++
102
- watchRuleTrace({comps, rootValue, watchCb}, prefix, idx)
100
+ watchRuleTrace({comps, originKey, rootValue, watchCb}, prefix, idx, unWatchsList)
103
101
  }
104
102
  }
105
103
  }
package/src/index.jsx CHANGED
@@ -309,7 +309,7 @@ export default {
309
309
  instance,
310
310
  dynamicMapComp,
311
311
  isH5: props.isH5,
312
- rootValue: props.modelValue,
312
+ rootValue: toRef(props, 'modelValue'),
313
313
  parentRootValue: props.parentRootValue,
314
314
  parentDynamicMapComp: props.parentDynamicMapComp,
315
315
  axiosInstance: axiosInstance.value,
@@ -331,7 +331,7 @@ export default {
331
331
  instance,
332
332
  dynamicMapComp,
333
333
  isH5: props.isH5,
334
- rootValue: props.modelValue,
334
+ rootValue: toRef(props, 'modelValue'),
335
335
  parentRootValue: props.parentRootValue,
336
336
  parentDynamicMapComp: props.parentDynamicMapComp,
337
337
  axiosInstance: axiosInstance.value,
@@ -422,6 +422,9 @@ export default {
422
422
  messageInstance: props.messageInstance,
423
423
  lang: props.lang,
424
424
  })
425
+ setInterval(() => {
426
+ console.log("dynamicMapComp===:", dynamicMapComp)
427
+ }, 3000);
425
428
  }
426
429
  onMounted(() => {
427
430
  if (props.openBpm) {
@@ -404,14 +404,17 @@ const allInitEvents = {
404
404
  }
405
405
  },
406
406
  limitDataRange({event, rootValue, mapComp, dynamicMapComp, currentPath, messageInstance, isInit}) {
407
- const { targetObj: target, targetObjVal = '' } = event
407
+ let { targetObj: target, targetObjVal = '' } = event
408
408
  if (!target) return
409
409
  const targetObj = `${target}`
410
+ targetObjVal = targetObjVal || ''
410
411
  let range = []
411
- if (targetObjVal?.indexOf('~') > -1) {
412
- range = targetObjVal.split('~')
413
- } else {
414
- range = targetObjVal.split(',')
412
+ if (targetObjVal) {
413
+ if (targetObjVal?.indexOf('~') > -1) {
414
+ range = targetObjVal.split('~')
415
+ } else {
416
+ range = targetObjVal.split(',')
417
+ }
415
418
  }
416
419
  if (range && range.length) {
417
420
  const configs = getCurrentComp({codesStr: targetObj, dynamicMapComp, currentPath})
@@ -39,6 +39,7 @@ import loadModule from './loadModule.js'
39
39
  import { h } from 'vue'
40
40
  import dayjs from 'dayjs'
41
41
  import { OPEN_DATA_RULES } from '../config.js'
42
+ import { useVmodels } from '../hooks/reactive.js'
42
43
 
43
44
  export const COFNGI_KEY_EVENT_FLAG = /^on[A-Z]/
44
45
 
@@ -138,6 +139,7 @@ export function parsePageConfig({
138
139
  const hireRelatMapRules = getCodeMapRules(config._originConfig)
139
140
  // formConfig.pmPageMetaList = config.pmPageMetaList
140
141
  const cbs = []
142
+ window?.performance?.mark('noraml_config_start')
141
143
  let { pageConfig, mapComp } = normalConfig({
142
144
  requestTraceId,
143
145
  dialogReq,
@@ -159,12 +161,50 @@ export function parsePageConfig({
159
161
  cbs.forEach((cb) => {
160
162
  cb()
161
163
  })
164
+ window?.performance?.mark('noraml_config_end')
165
+ console.log('noraml_config', window?.performance?.measure('noraml_config', 'noraml_config_start', 'noraml_config_end'))
162
166
  return {
163
167
  pageConfig,
164
168
  mapComp,
165
169
  hireRelatMapRules
166
170
  }
167
171
  }
172
+
173
+ // 数组中行数据位置变了,需要控制multipagemtalist中的配置对应正确的dynamicMapComp映射
174
+ function correctConfigDynamicMap(dynamicMapComp, dynamicHireRelat) {
175
+ if (dynamicMapComp[dynamicHireRelat]) {
176
+ // 替换倒数第二个的[idx]中的idx值
177
+ const existConfig = dynamicMapComp[dynamicHireRelat]
178
+ const changedDynamicHireRelat = dynamicHireRelat.replace(/([^->\[\]]*)(\[\d*\])(->[^->]*)$/, (_, b, c, d) => {
179
+ return `${b}[${existConfig.rowIndex}]${d}`
180
+ })
181
+ if (changedDynamicHireRelat !== dynamicHireRelat) {
182
+ correctConfigDynamicMapHandler({config: existConfig, dynamicMapComp, changedDynamicHireRelat})
183
+ }
184
+ }
185
+ }
186
+
187
+ function correctConfigDynamicMapHandler({config, dynamicMapComp, changedDynamicHireRelat}) {
188
+ if (changedDynamicHireRelat === config.dynamicHireRelat) {
189
+ return
190
+ }
191
+ config.dynamicHireRelat = changedDynamicHireRelat
192
+ correctConfigDynamicMap(dynamicMapComp, changedDynamicHireRelat)
193
+ dynamicMapComp[changedDynamicHireRelat] = config
194
+ if (config.pmPageMetaList && config.pmPageMetaList.length) {
195
+ if (isCycleConfig(config)) {
196
+ config.multiPmPageMetaList?.forEach((pmPageMetaList, idx) => {
197
+ pmPageMetaList.forEach(cg => {
198
+ correctConfigDynamicMapHandler({config: cg, dynamicMapComp, changedDynamicHireRelat: `${changedDynamicHireRelat}[${idx}]->${cg.metaCode}`})
199
+ })
200
+ })
201
+ } else {
202
+ config.pmPageMetaList.forEach(cg => {
203
+ correctConfigDynamicMapHandler({config: cg, dynamicMapComp, changedDynamicHireRelat: `${changedDynamicHireRelat}->${cg.metaCode}`})
204
+ })
205
+ }
206
+ }
207
+ }
168
208
  /**
169
209
  * {
170
210
  * children: [], // 子元素
@@ -188,6 +228,7 @@ export function normalConfig({
188
228
  parentRootValue,
189
229
  parentDynamicMapComp,
190
230
  noParsePageMetaList,
231
+ changeConfig,
191
232
  }, config, hireRelat = '', mapComp = {}, needformItem = false, dynamicHireRelat = '', unWatchsList = []) {
192
233
  const metaCode = config.metaCode || ''
193
234
  hireRelat += hireRelat ? `->${metaCode}` : metaCode
@@ -211,9 +252,13 @@ export function normalConfig({
211
252
 
212
253
  if (OPEN_DATA_RULES) {
213
254
  extendNativeObj.dynamicHireRelat = dynamicHireRelat
255
+ if (changeConfig) {
256
+ // 设置multiPmPageMetaList的时候,如果数组变了,如果数组中的值变换了位置,需要对dynamicMapComp设置正确的映射
257
+ correctConfigDynamicMap(dynamicMapComp, dynamicHireRelat)
258
+ }
214
259
  dynamicMapComp[dynamicHireRelat] = config
215
- // extendNativeObj._rootValue = rootValue
216
260
  definePrivatelyProp(config, '_rootValue', rootValue)
261
+ definePrivatelyProp(config, 'refValue', useVmodels(config).modelValue)
217
262
  }
218
263
 
219
264
  let extendAttrObj = parseExtendAttr(config)
@@ -325,10 +370,11 @@ export function normalConfig({
325
370
  definePrivatelyProp(config, '_unWatchs', markRaw([]))
326
371
  currentUnWatchsList?.push(config._unWatchs)
327
372
 
328
- config._unPageMetaListWatch = watch(() => getPathVal(unref(config._rootValue), config.dynamicHireRelat, '->'), (val) => {
329
- // config._unPageMetaListWatch = watch(() => config._rootValue?.cycle, (val) => {
330
- const list = getPathVal(unref(config._rootValue), config.dynamicHireRelat, '->')
373
+
374
+ config._unPageMetaListWatch = watch(() => getPathVal(unref(rootValue), config.dynamicHireRelat, '->'), (val) => {
375
+ const list = getPathVal(unref(rootValue), config.dynamicHireRelat, '->')
331
376
  if (list && list.length) {
377
+ const cbFns = []
332
378
  config.multiPmPageMetaList = list.map((row, idx) => {
333
379
  const columnsCgs = config._rowColumnConfgsMap.get(row)
334
380
  if (columnsCgs) {
@@ -355,11 +401,14 @@ export function normalConfig({
355
401
  definePrivatelyProp(ret, 'parent', config) // 这边手动设置一下,防止组件复用的时候不会刷新,造成parent的丢失
356
402
  return ret
357
403
  })
358
- simpleNormalPmPageMetaList(retColumnConfigs, `${dynamicHireRelat}[${idx}]`, currentUnWatchsList)
404
+ cbFns.push(() => {
405
+ simpleNormalPmPageMetaList(retColumnConfigs, `${config.dynamicHireRelat}[${idx}]`, currentUnWatchsList, false, true)
406
+ })
359
407
  config._rowColumnConfgsMap.set(row, retColumnConfigs)
360
408
  return retColumnConfigs
361
409
  }
362
410
  })
411
+ cbFns.forEach(cb => cb())
363
412
 
364
413
  const mapKeys = config._rowColumnConfgsMap.keys()
365
414
  Array.from(mapKeys).forEach(row => {
@@ -382,7 +431,7 @@ export function normalConfig({
382
431
  })
383
432
  }
384
433
 
385
- function simpleNormalPmPageMetaList(pmPageMetaList, dynamicHireRelat, unWatchsList, noParsePageMetaList) {
434
+ function simpleNormalPmPageMetaList(pmPageMetaList, dynamicHireRelat, unWatchsList, noParsePageMetaList, changeConfig) {
386
435
  return pmPageMetaList.map(metaItem => {
387
436
  const { pageConfig } = normalConfig({
388
437
  requestTraceId,
@@ -400,6 +449,7 @@ export function normalConfig({
400
449
  parentRootValue,
401
450
  parentDynamicMapComp,
402
451
  noParsePageMetaList,
452
+ changeConfig,
403
453
  }, metaItem, hireRelat, mapComp, needformItem || [FORM_META_TYPE, FORM_META_TYPE_H5].includes(metaType), dynamicHireRelat, unWatchsList)
404
454
  return pageConfig
405
455
  })?.sort((a, b) => a.seqNo - b.seqNo)
@@ -506,7 +556,7 @@ export function canHiddenConfig(config) {
506
556
  while(travseConfigs.length) {
507
557
  currentConfig = travseConfigs.shift()
508
558
  // 如果子级别中有onVnodeMounted、onMounted中一个有值,就表示需要进行渲染
509
- if (config.onVnodeMounted || config.onMounted) {
559
+ if (currentConfig.onVnodeMounted || currentConfig.onMounted) {
510
560
  return false
511
561
  }
512
562
  if (isCycleConfig(currentConfig)) {
@@ -2,7 +2,7 @@ import axios from 'axios'
2
2
  import qs from 'qs'
3
3
  import { AUTH_CODE, NOT_AUTH_APIS, PASSWORD, USER_NAME, USER_TYPE } from '../enums'
4
4
  import { LCP_LOGIN, REFRESH_TOKEN } from '../api/builtIn'
5
- import { HashingFactory } from './cipher'
5
+ import { EncryptionFactory, HashingFactory } from './cipher'
6
6
  import dayjs from 'dayjs'
7
7
  import { resultToast } from './respone'
8
8
 
@@ -85,8 +85,13 @@ export function initInterceptors(messageInstance) {
85
85
  )
86
86
  }
87
87
 
88
+ const encryptKey = '%cmi_lcp@10086#'
88
89
  export function buildInRequest(url, data, config = {}) {
90
+ const randomUuidStr = `${data.busiIdentityId}_${data.requestTraceId}`
89
91
  const reqConfig = {
92
+ headers: {
93
+ 'randomUuid': EncryptionFactory.createAesEncryption({ key: encryptKey, iv: encryptKey }).encrypt(randomUuidStr)
94
+ },
90
95
  url,
91
96
  ...config
92
97
  }