resolver-egretimp-plus 0.1.92 → 0.1.94

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.92",
3
+ "version": "0.1.94",
4
4
  "description": "交付体验渲染",
5
5
  "main": "./dist/web/index.js",
6
6
  "module": "./dist/web/index.js",
@@ -303,26 +303,28 @@ function normalTableRowValue(row) {
303
303
  }
304
304
  </script>
305
305
  <template>
306
- <cmi-table ref="tableRef" :key="tableKey" v-bind="tableProps" @rowclick="tableEvents.onRowclick" @togglelandscape="tableEvents.onTogglelandscape">
307
- <cmi-table-column
308
- v-for="column in pmPageMetaList" :key="column.metaCode"
309
- v-bind="{
310
- ...attrs,
311
- ...getTableColumnProps(column)
312
- }"
313
- >
314
- </cmi-table-column>
315
- </cmi-table>
316
- <div v-if="pageable && normalPageTotal > 3" :style="{'display': 'flex', 'justify-content': pageAlignEnmu[pageAlign || PAGE_CENTER]}" style="margin-bottom: 12px;">
317
- <cmi-pagination
318
- :key="normalPageTotal"
319
- style="border-radius: 8px;border: 1px solid rgba(219,219,219,1);"
320
- v-bind="{...paginationProps, ...pagenationEvents}"
321
- @sizeChange="pagenationEvents.onSizeChange"
322
- @currentChange="pagenationEvents.onCurrentChange"
323
- :total="normalPageTotal"
324
- :pagesize="page.pageSize"
325
- :current="page.pageNum"
326
- />
306
+ <div>
307
+ <cmi-table ref="tableRef" :key="tableKey" v-bind="tableProps" @rowclick="tableEvents.onRowclick" @togglelandscape="tableEvents.onTogglelandscape">
308
+ <cmi-table-column
309
+ v-for="column in pmPageMetaList" :key="column.metaCode"
310
+ v-bind="{
311
+ ...attrs,
312
+ ...getTableColumnProps(column)
313
+ }"
314
+ >
315
+ </cmi-table-column>
316
+ </cmi-table>
317
+ <div v-if="pageable && normalPageTotal > 3" :style="{'display': 'flex', 'justify-content': pageAlignEnmu[pageAlign || PAGE_CENTER]}" style="margin-bottom: 12px;">
318
+ <cmi-pagination
319
+ :key="normalPageTotal"
320
+ style="border-radius: 8px;border: 1px solid rgba(219,219,219,1);"
321
+ v-bind="{...paginationProps, ...pagenationEvents}"
322
+ @sizeChange="pagenationEvents.onSizeChange"
323
+ @currentChange="pagenationEvents.onCurrentChange"
324
+ :total="normalPageTotal"
325
+ :pagesize="page.pageSize"
326
+ :current="page.pageNum"
327
+ />
328
+ </div>
327
329
  </div>
328
330
  </template>
@@ -24,6 +24,16 @@ const props = defineProps({
24
24
  isPointer: {
25
25
  type: [String, Number]
26
26
  },
27
+ // 多选的分割符号
28
+ separator: {
29
+ type: [String],
30
+ default: ','
31
+ },
32
+ // 多选显示时候 分隔的符号
33
+ separatorDesc: {
34
+ type: [String],
35
+ default: null
36
+ },
27
37
  showMoney: {
28
38
  type: [String, Number],
29
39
  default: ''
@@ -161,14 +171,14 @@ function selectFormat(value) {
161
171
  // 在满足多选,并且不是str格式的时候,就表示value为数组类型,取反就表示不满足的时候,需要转换成数组格式进行计算
162
172
  if (!(multiple && !isStrVal)) {
163
173
  try {
164
- valList = valList ? (valList?.split(',') || []) : []
174
+ valList = valList ? (valList?.split(props.separator) || []) : []
165
175
  } catch (error) {
166
176
  debugger
167
177
  }
168
178
  }
169
179
  return valList?.reduce((ret, val) => {
170
180
  const str = props?.options?.find(item => item.columnValue == val)?.[lang?.value?.indexOf('zh') > -1 ? 'columnDesc_zh' : 'columnDesc'] || ''
171
- return `${ret}${ret ? ',' : ''}${str}`
181
+ return `${ret}${ret ? (props.separatorDesc || props.separator) : ''}${str}`
172
182
  }, '')
173
183
  }
174
184
 
@@ -28,6 +28,8 @@ import {
28
28
  import { ARG_FLAGS, MULTI_PAGE_META_LIST_TYPES } from '../utils/const'
29
29
 
30
30
  import { findComponent, formatDate, hasOwn, isPlainObject, parseExtendAttr } from '../utils/index';
31
+ import dayjs from 'dayjs';
32
+
31
33
  const valArrTypes = [...MULTI_PAGE_META_LIST_TYPES]
32
34
  const valBooleanTypes = []
33
35
 
@@ -538,6 +540,9 @@ const allInitEvents = {
538
540
  if (matchVal.trimEnd().trimStart() === ARG_FLAGS.CURRENT_DATE) {
539
541
  return formatDate(new Date(), 'yyyy-MM-dd')
540
542
  }
543
+ if (matchVal.trimEnd().trimStart() === ARG_FLAGS.CURRENT_DATE_EXCLUDE) {
544
+ return dayjs(new Date()).add(1, 'day').format('YYYY-MM-DD')
545
+ }
541
546
  return originVal
542
547
  })
543
548
  } else {
@@ -7,6 +7,7 @@ export const MODE = {
7
7
  }
8
8
  export const ARG_FLAGS = {
9
9
  CURRENT_DATE: '_currentDate',
10
+ CURRENT_DATE_EXCLUDE: '_currentDateExclude',
10
11
  CURRENT_DATE_TIME: '_currentDateTime',
11
12
  REF_VAL: '_refVal'
12
13
  }
@@ -2,6 +2,7 @@ import { toRaw } from 'vue'
2
2
  import { formatDate, isPlainObject } from './common'
3
3
  import { ARG_FLAGS, isHidden, VALUE_TYPES } from './const'
4
4
  import { isArray, isNumber, isString } from './is'
5
+ import dayjs from 'dayjs'
5
6
 
6
7
  export default function defaultVal(config) {
7
8
  if (
@@ -27,9 +28,17 @@ export default function defaultVal(config) {
27
28
  } else if (/^{[\w\W]*}$/.test(trimValue) || /^\[[\w\W]*\]$/.test(trimValue)) {
28
29
  defaultVal = JSON.parse(trimValue)
29
30
  } else {
30
- if (trimValue === ARG_FLAGS.CURRENT_DATE || trimValue === 'currentDate' || trimValue === ARG_FLAGS.CURRENT_DATE_TIME) {
31
+ const dateFlagIncluds = [
32
+ ARG_FLAGS.CURRENT_DATE,
33
+ 'currentDate',
34
+ ARG_FLAGS.CURRENT_DATE_TIME,
35
+ ARG_FLAGS.CURRENT_DATE_EXCLUDE
36
+ ]
37
+ if (dateFlagIncluds.includes((trimValue || '').trim())) {
31
38
  if (trimValue === ARG_FLAGS.CURRENT_DATE_TIME) {
32
39
  defaultVal = formatDate(new Date(), 'yyyy-MM-dd hh:mm:ss')
40
+ } else if (trimValue === ARG_FLAGS.CURRENT_DATE_EXCLUDE) {
41
+ defaultVal = dayjs(new Date()).add(1, 'day').format('YYYY-MM-DD')
33
42
  } else {
34
43
  defaultVal = formatDate(new Date(), 'yyyy-MM-dd')
35
44
  }
@@ -35,6 +35,7 @@ import { dispatchClickEvent, dispatchClickEvents, getTableConfig } from '../comp
35
35
  import CmiFormItem from '../components/cmiFormItem'
36
36
  import loadModule from './loadModule.js'
37
37
  import { h } from 'vue'
38
+ import dayjs from 'dayjs'
38
39
 
39
40
  // 解析配置中的defStyle属性
40
41
  export function parseDefStyle(defStyle) {
@@ -59,6 +60,8 @@ function deepParseFnStr(obj, refVal) {
59
60
  obj[key] = refVal || ''
60
61
  } else if (obj[key] === ARG_FLAGS.CURRENT_DATE) {
61
62
  obj[key] = formatDate(new Date(), 'yyyy-MM-dd')
63
+ } else if (obj[key] === ARG_FLAGS.CURRENT_DATE_EXCLUDE) {
64
+ obj[key] = dayjs(new Date()).add(1, 'day').format('YYYY-MM-DD')
62
65
  } else {
63
66
  const { checked, val } = preserveCheck(key, obj[key])
64
67
  if (checked) {