resolver-egretimp-plus 0.0.169 → 0.0.171

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.169",
3
+ "version": "0.0.171",
4
4
  "description": "交付体验渲染",
5
5
  "main": "./dist/web/index.js",
6
6
  "module": "./dist/web/index.js",
@@ -4,6 +4,7 @@ import { ElDialog } from 'element-plus';
4
4
  import zhCn from 'element-plus/es/locale/lang/zh-cn'
5
5
  import en from 'element-plus/es/locale/lang/en'
6
6
  import { hasOwn } from '../../../utils';
7
+ import { watch } from 'vue';
7
8
  const Resolver = defineAsyncComponent(() => import('../../../resolver-web.vue'))
8
9
 
9
10
  const props = defineProps({
@@ -57,7 +58,9 @@ const props = defineProps({
57
58
  type: Object,
58
59
  default: () => ({})
59
60
  },
60
- rootStoreChange: Function
61
+ rootStoreChange: Function,
62
+ // 获取formData数据
63
+ rootDataChange: Function,
61
64
  })
62
65
  const formData = ref({})
63
66
  const dialogVisible = ref(true)
@@ -93,6 +96,9 @@ function rootStoreChange(rootStore) {
93
96
  }
94
97
 
95
98
 
99
+ watch(formData, (val) => {
100
+ props.rootDataChange && props.rootDataChange(val)
101
+ })
96
102
  defineExpose({
97
103
  dialogVisible,
98
104
  clearData: () => {
@@ -116,7 +116,15 @@ export async function dispatchClickEvent(service, { dynamicMapComp, requestTrace
116
116
  // ret.data = {result: {pageTotalCount: 100, result: [{},{},{},{},{}]}}
117
117
  initOutParamData(service.outParamMappingList, {dynamicMapComp, dynamicMapCompKeys, dynamicHireRelat, outResult: ret.data})
118
118
  if (tableConfig?.vm) {
119
- const total = parseInt(getPathVal(ret.data?.result || {}, service.pageTotalCount || 'pageCount'))
119
+ let totalObj = ret.data?.result
120
+ let pageTotalCountKey = service.pageTotalCount
121
+ const deepMatch = /^_deep:(.+)$/
122
+ const matchs = service.pageTotalCount?.match(deepMatch)
123
+ if (matchs) {
124
+ totalObj = ret.data
125
+ pageTotalCountKey = matchs[1]
126
+ }
127
+ const total = parseInt(getPathVal(totalObj || {}, pageTotalCountKey || 'pageCount'))
120
128
  tableConfig.vm.page.total = total
121
129
  // tableConfig.vm?.changePage(total, 'total')
122
130
  }
@@ -213,21 +221,31 @@ export function openDailg({
213
221
  appContext,
214
222
  compConfig
215
223
  }) {
224
+ const dialogProps = parseExtendAttr({extendAttr: pagePopupMap.extendAttr})
225
+
216
226
  const busiIdentityId = pagePopupMap.popupBusiIdentityId
217
227
  const dynamicMapCompKeys = Object.keys(dynamicMapComp)
218
228
  const reqData = getReqData(pagePopupMap.inParamMappingList || [], {dynamicMapComp, dynamicMapCompKeys, dynamicHireRelat})
219
-
229
+ // 是表格还是list
230
+ const isList = pagePopupMap?.objOrList == '1'
231
+
220
232
  let outParamMappingList = pagePopupMap?.outParamMappingList?.map(item => {
221
233
  const orignParamArr = item.orignParam ? item.orignParam.split('->') : []
234
+ const orignParam = item.orignParam ?
235
+ (
236
+ dialogProps?.bindFormData == '1' && !isList ?
237
+ orignParamArr.join('.') :
238
+ orignParamArr[orignParamArr.length - 1]
239
+ )
240
+ : ''
222
241
  return {
223
242
  ...item,
224
- orignParam: item.orignParam ? orignParamArr[orignParamArr.length - 1] : ''
243
+ orignParam,
225
244
  }
226
245
  }) || []
227
246
  let mapList = {}
228
247
  let selectionsObj = {}
229
- // 是表格还是list
230
- const isList = pagePopupMap?.objOrList == '1'
248
+
231
249
  if (isList ) {
232
250
  const primaryKeys = []
233
251
  mapList = outParamMappingList?.reduce((ret, item) => {
@@ -256,6 +274,7 @@ export function openDailg({
256
274
 
257
275
 
258
276
  let rootStore = {}
277
+ let rootFormData = {}
259
278
  let dialogClose = null
260
279
  const initPolyfillConfigs = {}
261
280
  if (pagePopupMap.outDisplayTrigger) {
@@ -276,6 +295,9 @@ export function openDailg({
276
295
  return retItem
277
296
  })
278
297
  }
298
+ if (dialogProps?.bindFormData == '1' && !isList) {
299
+ outResult = rootFormData
300
+ }
279
301
  // 定义打开弹框-中间钩子
280
302
  const configMiddleOpenDialog = compConfig?.middleOpenDialog
281
303
  const parmasMiddleOpenDialog = middleOpenDialog
@@ -335,7 +357,6 @@ export function openDailg({
335
357
  }
336
358
  }
337
359
  }
338
- const dialogProps = parseExtendAttr({extendAttr: pagePopupMap.extendAttr})
339
360
 
340
361
  // 定义的弹框打开前钩子
341
362
  const configBeforeOpenDialog = compConfig?.beforeOpenDialog
@@ -430,7 +451,10 @@ export function openDailg({
430
451
  },
431
452
  rootStoreChange: (val) => {
432
453
  rootStore = val
433
- }
454
+ },
455
+ rootDataChange: (val) => {
456
+ rootFormData = val
457
+ },
434
458
  }, appContext)
435
459
  }
436
460
  }
@@ -71,17 +71,15 @@
71
71
  }
72
72
  }
73
73
 
74
- .CustomComponentCollapse:first-child {
75
- margin-bottom: 12px;
76
- }
77
- .CustomComponentCollapse + .CustomComponentCollapse {
74
+ .CustomComponentCollapse:has(+ .CustomComponentCollapse) {
78
75
  margin-bottom: 12px;
79
76
  }
80
77
 
81
- .CustomComponentCollapse.is-card:first-child {
82
- margin-bottom: 16px;
83
- }
84
- .CustomComponentCollapse.is-card + .CustomComponentCollapse.is-card {
78
+ // 选择第一个
79
+ // :not(.CustomComponentCollapse.is-card) + .CustomComponentCollapse.is-card {
80
+ // background: red;
81
+ // }
82
+ .CustomComponentCollapse.is-card:has(+ .CustomComponentCollapse.is-card) {
85
83
  margin-bottom: 16px;
86
84
  }
87
85
 
@@ -66,6 +66,15 @@
66
66
  width: 100% !important;
67
67
  }
68
68
  }
69
+ .vertical-start {
70
+ align-items: start;
71
+ }
72
+ .vertical-center {
73
+ align-items: center;
74
+ }
75
+ .vertical-end {
76
+ align-items: end;
77
+ }
69
78
  .el-form-item {
70
79
  margin-bottom: var(--prmary-marign);
71
80
  margin-right: var(--prmary-marign);
@@ -30,6 +30,7 @@ import QuestionFilled from '../components/icons/question-filled.vue'
30
30
  import { dispatchClickEvent, dispatchClickEvents, getTableConfig } from '../components/helper/eventOrchestration.js'
31
31
  import CmiFormItem from '../components/cmiFormItem'
32
32
  import loadModule from './loadModule.js'
33
+ import { h } from 'vue'
33
34
 
34
35
  // 解析配置中的defStyle属性
35
36
  export function parseDefStyle(defStyle) {
@@ -605,6 +606,14 @@ function generateFormItemPc (config, lang, compProps, params,) {
605
606
  }
606
607
  }
607
608
  return node => {
609
+ if (config.polyfillNode && typeof config.polyfillNode === 'function') {
610
+ node = (
611
+ <div style="width: 100%">
612
+ {node}
613
+ {config.polyfillNode(h, { config })}
614
+ </div>
615
+ )
616
+ }
608
617
  // 表格中中的列,是否需要转换为普通形式
609
618
  if (isPlainColumn(config, compProps.disabled)) {
610
619
  return node
@@ -674,9 +683,10 @@ function getFormItemExtendProps(config, lang, params) {
674
683
  prop,
675
684
  rules: getFormItemRule(config, lang, params),
676
685
  class: {
686
+ [`vertical-${config['label-vertical'] || config['labelVertical'] || 'center'}`]: true,
677
687
  'content-right': config.contentRight,
678
688
  'hidden-label': config.labelWidth == 0 || config.labelWidth === '0px' || config.labelHidden == '1',
679
- [`label-position-${config['label-position'] || 'right'}`]: true // label-position 支持三个值,right、left、top
689
+ [`label-position-${config['label-position'] || config['labelPosition'] || 'right'}`]: true // label-position 支持三个值,right、left、top
680
690
  },
681
691
  style,
682
692
  }