resolver-egretimp-plus 0.0.170 → 0.0.172

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.170",
3
+ "version": "0.0.172",
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: () => {
@@ -221,21 +221,31 @@ export function openDailg({
221
221
  appContext,
222
222
  compConfig
223
223
  }) {
224
+ const dialogProps = parseExtendAttr({extendAttr: pagePopupMap.extendAttr})
225
+
224
226
  const busiIdentityId = pagePopupMap.popupBusiIdentityId
225
227
  const dynamicMapCompKeys = Object.keys(dynamicMapComp)
226
228
  const reqData = getReqData(pagePopupMap.inParamMappingList || [], {dynamicMapComp, dynamicMapCompKeys, dynamicHireRelat})
227
-
229
+ // 是表格还是list
230
+ const isList = pagePopupMap?.objOrList == '1'
231
+
228
232
  let outParamMappingList = pagePopupMap?.outParamMappingList?.map(item => {
229
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
+ : ''
230
241
  return {
231
242
  ...item,
232
- orignParam: item.orignParam ? orignParamArr[orignParamArr.length - 1] : ''
243
+ orignParam,
233
244
  }
234
245
  }) || []
235
246
  let mapList = {}
236
247
  let selectionsObj = {}
237
- // 是表格还是list
238
- const isList = pagePopupMap?.objOrList == '1'
248
+
239
249
  if (isList ) {
240
250
  const primaryKeys = []
241
251
  mapList = outParamMappingList?.reduce((ret, item) => {
@@ -264,6 +274,7 @@ export function openDailg({
264
274
 
265
275
 
266
276
  let rootStore = {}
277
+ let rootFormData = {}
267
278
  let dialogClose = null
268
279
  const initPolyfillConfigs = {}
269
280
  if (pagePopupMap.outDisplayTrigger) {
@@ -284,6 +295,9 @@ export function openDailg({
284
295
  return retItem
285
296
  })
286
297
  }
298
+ if (dialogProps?.bindFormData == '1' && !isList) {
299
+ outResult = rootFormData
300
+ }
287
301
  // 定义打开弹框-中间钩子
288
302
  const configMiddleOpenDialog = compConfig?.middleOpenDialog
289
303
  const parmasMiddleOpenDialog = middleOpenDialog
@@ -343,7 +357,6 @@ export function openDailg({
343
357
  }
344
358
  }
345
359
  }
346
- const dialogProps = parseExtendAttr({extendAttr: pagePopupMap.extendAttr})
347
360
 
348
361
  // 定义的弹框打开前钩子
349
362
  const configBeforeOpenDialog = compConfig?.beforeOpenDialog
@@ -438,7 +451,10 @@ export function openDailg({
438
451
  },
439
452
  rootStoreChange: (val) => {
440
453
  rootStore = val
441
- }
454
+ },
455
+ rootDataChange: (val) => {
456
+ rootFormData = val
457
+ },
442
458
  }, appContext)
443
459
  }
444
460
  }
@@ -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);
@@ -11,6 +11,8 @@ export default function defaultVal(config) {
11
11
  } else {
12
12
  if (configDefaultVal === ARG_FLAGS.CURRENT_DATE || configDefaultVal === 'currentDate') {
13
13
  defaultVal = formatDate(new Date(), 'yyyy-MM-dd')
14
+ } else if (['true', 'false'].includes(configDefaultVal)) {
15
+ defaultVal = configDefaultVal == 'true' ? true : false
14
16
  } else {
15
17
  defaultVal = configDefaultVal
16
18
  }
@@ -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
  }