cloud-web-corejs 1.0.94 → 1.0.96

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.
Files changed (64) hide show
  1. package/package.json +39 -30
  2. package/src/components/wf/content.vue +2 -0
  3. package/src/components/wf/setCandidateDialog.vue +1 -0
  4. package/src/components/xform/form-designer/designer.js +1 -1
  5. package/src/components/xform/form-designer/form-widget/container-widget/data-table-mixin.js +2 -1
  6. package/src/components/xform/form-designer/form-widget/dialog/searchFormDialog.vue +3 -0
  7. package/src/components/xform/form-designer/form-widget/field-widget/checkbox-widget.vue +1 -1
  8. package/src/components/xform/form-designer/form-widget/field-widget/dropdown-item-widget.vue +77 -0
  9. package/src/components/xform/form-designer/form-widget/field-widget/dropdown-menu-widget.vue +106 -0
  10. package/src/components/xform/form-designer/form-widget/field-widget/fieldMixin.js +7 -2
  11. package/src/components/xform/form-designer/form-widget/field-widget/mixins/vabsearch-mixin.js +176 -0
  12. package/src/components/xform/form-designer/form-widget/field-widget/multiSearch-widget.vue +53 -0
  13. package/src/components/xform/form-designer/form-widget/field-widget/number-widget.vue +1 -1
  14. package/src/components/xform/form-designer/form-widget/field-widget/project-tag-widget.vue +5 -2
  15. package/src/components/xform/form-designer/form-widget/field-widget/radio-widget.vue +1 -1
  16. package/src/components/xform/form-designer/form-widget/field-widget/search_button-widget.vue +1 -1
  17. package/src/components/xform/form-designer/form-widget/field-widget/select-widget.vue +2 -1
  18. package/src/components/xform/form-designer/form-widget/field-widget/singerSearch-widget.vue +53 -0
  19. package/src/components/xform/form-designer/form-widget/field-widget/status-widget.vue +3 -2
  20. package/src/components/xform/form-designer/form-widget/field-widget/vabSearch-widget.vue +2 -170
  21. package/src/components/xform/form-designer/indexMixin.js +1 -1
  22. package/src/components/xform/form-designer/setting-panel/form-setting.vue +260 -38
  23. package/src/components/xform/form-designer/setting-panel/index.vue +4 -0
  24. package/src/components/xform/form-designer/setting-panel/indexMixin.js +1 -1
  25. package/src/components/xform/form-designer/setting-panel/option-items-setting.vue +8 -3
  26. package/src/components/xform/form-designer/setting-panel/property-editor/a-link-editor.vue +1 -1
  27. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/columnRenderDialog.vue +3 -2
  28. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/data-table-editor.vue +0 -8
  29. package/src/components/xform/form-designer/setting-panel/property-editor/container-data-table/table-column-dialog.vue +183 -45
  30. package/src/components/xform/form-designer/setting-panel/property-editor/container-list-h5/list-h5-editor.vue +0 -8
  31. package/src/components/xform/form-designer/setting-panel/property-editor/field-button/search-dialog-event-editor.vue +26 -8
  32. package/src/components/xform/form-designer/setting-panel/property-editor/field-dropdown-menu/dropdown-item-editor.vue +21 -0
  33. package/src/components/xform/form-designer/setting-panel/property-editor/field-dropdown-menu/dropdown-menu-editor.vue +59 -0
  34. package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import-button-editor.vue +7 -2
  35. package/src/components/xform/form-designer/setting-panel/property-editor/field-import-button/import2-button-editor.vue +8 -2
  36. package/src/components/xform/form-designer/setting-panel/property-editor/field-status/field-status-editor.vue +47 -28
  37. package/src/components/xform/form-designer/setting-panel/property-editor/field-vabSearch/vabSearchName-editor.vue +13 -1
  38. package/src/components/xform/form-designer/setting-panel/property-editor/formula-editor.vue +722 -467
  39. package/src/components/xform/form-designer/setting-panel/property-editor/formulaEnabled-editor.vue +1 -1
  40. package/src/components/xform/form-designer/setting-panel/property-editor/multiple-editor.vue +19 -14
  41. package/src/components/xform/form-designer/setting-panel/property-editor/project-tag-editor.vue +159 -18
  42. package/src/components/xform/form-designer/setting-panel/property-editor/textFlag-editor.vue +51 -2
  43. package/src/components/xform/form-designer/setting-panel/property-editor/wfFlag-editor.vue +2 -30
  44. package/src/components/xform/form-designer/setting-panel/property-editor/widgetShowRuleFlag-editor.vue +220 -0
  45. package/src/components/xform/form-designer/setting-panel/propertyRegister.js +5 -0
  46. package/src/components/xform/form-designer/toolbar-panel/index.vue +8 -4
  47. package/src/components/xform/form-designer/widget-panel/index.vue +21 -1
  48. package/src/components/xform/form-designer/widget-panel/indexMixin.js +3 -2
  49. package/src/components/xform/form-designer/widget-panel/widgetsConfig.js +489 -132
  50. package/src/components/xform/form-render/container-item/data-table-item.vue +7 -4
  51. package/src/components/xform/form-render/container-item/data-table-mixin.js +4 -1
  52. package/src/components/xform/form-render/container-item/data-table-mixin2.js +2169 -0
  53. package/src/components/xform/form-render/container-item/list-h5-item.vue +1 -9
  54. package/src/components/xform/form-render/container-item/list-h5-item2.vue +1 -8
  55. package/src/components/xform/form-render/indexMixin.js +7 -3
  56. package/src/components/xform/lang/zh-CN.js +13 -3
  57. package/src/components/xform/mixins/defaultHandle.js +1 -1
  58. package/src/components/xform/mixins/scriptHttp.js +1 -1
  59. package/src/components/xform/utils/format.js +21 -30
  60. package/src/components/xform/utils/formula-util.js +669 -0
  61. package/src/components/xform/utils/util.js +1 -1
  62. package/src/mixins/selectDialog/index.js +1 -1
  63. package/src/store/modules/permission.js +1 -1
  64. package/src/store/modules/settings.js +1 -1
@@ -1,57 +1,48 @@
1
+ import dayjs from 'dayjs'
2
+
3
+ function validateDate(dateStr) {
4
+ let date = new Date( Date.parse(dateStr) )
5
+ return (date instanceof Date) && !isNaN(date.getTime())
6
+ }
1
7
 
2
8
  export function formatDate1(date) {
3
- if (new Date(Date.parse(date.replace(/-/g, "/"))) === "Invalid Date") {
9
+ if (!validateDate(date)) {
4
10
  return date;
5
11
  }
6
- date = new Date(Date.parse(date.replace(/-/g, "/"))); //转换成Date
7
- let y = date.getFullYear();
8
- let m = date.getMonth() + 1;
9
- m = m < 10 ? '0' + m : m;
10
- let d = date.getDate();
11
- d = d < 10 ? ('0' + d) : d;
12
- return y + '-' + m + '-' + d;
12
+
13
+ return dayjs(date).format('YYYY-MM-DD')
13
14
  }
14
15
 
15
16
  export function formatDate2(date) {
16
- if (new Date(Date.parse(date.replace(/-/g, "/"))) === "Invalid Date") {
17
+ if (!validateDate(date)) {
17
18
  return date;
18
19
  }
19
- date = new Date(Date.parse(date.replace(/-/g, "/"))); //转换成Date
20
- let y = date.getFullYear();
21
- let m = date.getMonth() + 1;
22
- m = m < 10 ? '0' + m : m;
23
- let d = date.getDate();
24
- d = d < 10 ? ('0' + d) : d;
25
- return y + '/' + m + '/' + d;
20
+
21
+ return dayjs(date).format('YYYY/MM/DD')
26
22
  }
27
23
 
28
24
  export function formatDate3(date) {
29
- if (new Date(Date.parse(date.replace(/-/g, "/"))) === "Invalid Date") {
25
+ if (!validateDate(date)) {
30
26
  return date;
31
27
  }
32
- date = new Date(Date.parse(date.replace(/-/g, "/"))); //转换成Date
33
- let y = date.getFullYear();
34
- let m = date.getMonth() + 1;
35
- m = m < 10 ? '0' + m : m;
36
- let d = date.getDate();
37
- d = d < 10 ? ('0' + d) : d;
38
- return y + '年' + m + '月' + d +'日';
28
+
29
+ return dayjs(date).format('YYYY年MM月DD日')
39
30
  }
40
31
 
41
32
  export function formatDate4(date) {
42
- if (new Date(Date.parse(date.replace(/-/g, "/"))) === "Invalid Date"){
33
+ if (!validateDate(date)) {
43
34
  return date;
44
35
  }
45
- date = new Date(Date.parse(date.replace(/-/g, "/"))); //转换成Date
46
- return date.toLocaleString()
36
+
37
+ return dayjs(date).format('YYYY-MM-DD HH:mm:ss')
47
38
  }
48
39
 
49
40
  export function formatDate5(date) {
50
- if (new Date(Date.parse(date.replace(/-/g, "/"))) === "Invalid Date") {
41
+ if (!validateDate(date)) {
51
42
  return date;
52
43
  }
53
- date = new Date(Date.parse(date.replace(/-/g, "/"))); //转换成Data();
54
- return date.toLocaleString('chinese', { hour12: false })
44
+
45
+ return dayjs(date).format('YYYY-MM-DD hh:mm:ss')
55
46
  }
56
47
 
57
48
  // ###,###,###,##0.######