cnhis-design-vue 3.1.12-beta.6 → 3.1.13-beta.0

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 (60) hide show
  1. package/es/packages/big-table/index.d.ts +4 -1
  2. package/es/packages/big-table/src/BigTable.vue.d.ts +22 -3
  3. package/es/packages/big-table/src/BigTable.vue_vue_type_script_setup_true_lang.js +88 -63
  4. package/es/packages/big-table/src/bigTableState.d.ts +2 -0
  5. package/es/packages/big-table/src/bigTableState.js +1 -1
  6. package/es/packages/big-table/src/hooks/useFormat.js +1 -1
  7. package/es/packages/big-table/src/hooks/useNestTable.js +1 -1
  8. package/es/packages/big-table/src/utils.d.ts +5 -1
  9. package/es/packages/big-table/src/utils.js +100 -78
  10. package/es/packages/fabric-chart/index.d.ts +195 -1
  11. package/es/packages/fabric-chart/src/FabricChart.vue.d.ts +196 -1
  12. package/es/packages/fabric-chart/src/FabricChart.vue_vue_type_script_setup_true_lang.js +269 -6
  13. package/es/packages/fabric-chart/src/components/PopupMenu.d.ts +46 -0
  14. package/es/packages/fabric-chart/src/components/PopupMenu.js +105 -0
  15. package/es/packages/fabric-chart/src/components/PopupTip.js +4 -0
  16. package/es/packages/fabric-chart/src/components/PopupTip.vue.d.ts +63 -0
  17. package/es/packages/fabric-chart/src/components/PopupTip.vue_vue_type_script_setup_true_lang.js +32 -0
  18. package/es/packages/fabric-chart/src/components/useStyle.d.ts +7 -0
  19. package/es/packages/fabric-chart/src/components/useStyle.js +36 -0
  20. package/es/packages/fabric-chart/src/hooks/constant.d.ts +14 -0
  21. package/es/packages/fabric-chart/src/hooks/constant.js +36 -0
  22. package/es/packages/fabric-chart/src/hooks/index.d.ts +9 -0
  23. package/es/packages/fabric-chart/src/hooks/index.js +9 -0
  24. package/es/packages/fabric-chart/src/hooks/useBottom.d.ts +4 -0
  25. package/es/packages/fabric-chart/src/hooks/useBottom.js +86 -0
  26. package/es/packages/fabric-chart/src/hooks/useCenter.d.ts +29 -0
  27. package/es/packages/fabric-chart/src/hooks/useCenter.js +469 -0
  28. package/es/packages/fabric-chart/src/hooks/useCumputedPoint.d.ts +7 -0
  29. package/es/packages/fabric-chart/src/hooks/useCumputedPoint.js +44 -0
  30. package/es/packages/fabric-chart/src/hooks/useDraw.d.ts +42 -0
  31. package/es/packages/fabric-chart/src/hooks/useDraw.js +86 -0
  32. package/es/packages/fabric-chart/src/hooks/useEvent.d.ts +1 -0
  33. package/es/packages/fabric-chart/src/hooks/useEvent.js +10 -0
  34. package/es/packages/fabric-chart/src/hooks/useGrid.d.ts +4 -0
  35. package/es/packages/fabric-chart/src/hooks/useGrid.js +44 -0
  36. package/es/packages/fabric-chart/src/hooks/useLeft.d.ts +4 -0
  37. package/es/packages/fabric-chart/src/hooks/useLeft.js +180 -0
  38. package/es/packages/fabric-chart/src/hooks/useOther.d.ts +4 -0
  39. package/es/packages/fabric-chart/src/hooks/useOther.js +34 -0
  40. package/es/packages/fabric-chart/src/hooks/useRight.d.ts +4 -0
  41. package/es/packages/fabric-chart/src/hooks/useRight.js +89 -0
  42. package/es/packages/fabric-chart/src/hooks/useShadow.d.ts +6 -0
  43. package/es/packages/fabric-chart/src/hooks/useShadow.js +127 -0
  44. package/es/packages/fabric-chart/src/hooks/useTop.d.ts +4 -0
  45. package/es/packages/fabric-chart/src/hooks/useTop.js +148 -0
  46. package/es/packages/fabric-chart/src/interface.d.ts +115 -0
  47. package/es/packages/fabric-chart/src/interface.js +3 -0
  48. package/es/packages/fabric-chart/src/utils/index.d.ts +2 -0
  49. package/es/packages/fabric-chart/src/utils/index.js +15081 -0
  50. package/es/packages/fabric-chart/style/index.css +43 -0
  51. package/es/packages/form-render/src/components/renderer/cascader.js +14 -0
  52. package/es/packages/form-render/src/components/renderer/checkbox.d.ts +2 -0
  53. package/es/packages/form-render/src/components/renderer/checkbox.js +4 -5
  54. package/es/packages/form-render/src/components/renderer/date.js +42 -10
  55. package/es/packages/form-render/src/components/renderer/select.js +11 -0
  56. package/es/packages/form-render/src/components/renderer/simpleComponent.js +0 -1
  57. package/es/packages/index.css +43 -0
  58. package/es/packages/scale-view/src/hooks/scaleview-computed.js +7 -12
  59. package/es/packages/scale-view/src/hooks/scaleview-init.js +1 -6
  60. package/package.json +1 -1
@@ -0,0 +1,43 @@
1
+ .c-fabric-chart-popup-tip,
2
+ .c-fabric-chart-popup-menu {
3
+ position: absolute;
4
+ z-index: 1001;
5
+ display: flex;
6
+ flex-flow: column nowrap;
7
+ margin: 0;
8
+ padding: 8px 12px;
9
+ font-size: 12px;
10
+ }
11
+ .c-fabric-chart-popup-tip > li,
12
+ .c-fabric-chart-popup-menu > li {
13
+ list-style: none;
14
+ }
15
+ .c-fabric-chart-popup-tip {
16
+ border-radius: 4px;
17
+ background: rgba(0, 0, 0, 0.7);
18
+ }
19
+ .c-fabric-chart-popup-tip > li {
20
+ color: #fff;
21
+ }
22
+ .c-fabric-chart-popup-menu {
23
+ padding: 8px 5px !important;
24
+ z-index: 1001;
25
+ background: #fff;
26
+ box-shadow: 0 2px 12px 0 rgba(56, 56, 56, 0.2);
27
+ border: 1px solid #e2e6ed;
28
+ border-radius: 2px;
29
+ }
30
+ .c-fabric-chart-popup-menu > li {
31
+ padding: 5px;
32
+ background: #fff;
33
+ cursor: pointer;
34
+ }
35
+ .c-fabric-chart-popup-menu > li:hover {
36
+ background: #f0f7ff;
37
+ }
38
+ .c-fabric-chart-popup-menu > li.no-click {
39
+ cursor: default;
40
+ }
41
+ .c-fabric-chart-popup-menu > li.no-click:hover {
42
+ background: #fff;
43
+ }
@@ -1,4 +1,5 @@
1
1
  import { defineComponent, ref, inject, computed, watch, createVNode } from 'vue';
2
+ import { isField } from '@formily/core';
2
3
  import { isObject, isString } from 'lodash-es';
3
4
  import { InjectAsyncQueue } from '../../constants/index.js';
4
5
  import { assignUpdateValue, formRenderLog, arrayed } from '../../utils/index.js';
@@ -33,6 +34,9 @@ const script = defineComponent({
33
34
  title
34
35
  } = useFormField();
35
36
  const asyncQueue = inject(InjectAsyncQueue);
37
+ const {
38
+ field
39
+ } = useFormField();
36
40
  async function fetchData(option) {
37
41
  var _a;
38
42
  if (!option && _options.value)
@@ -99,9 +103,13 @@ const script = defineComponent({
99
103
  return _options.value || props.options || [];
100
104
  });
101
105
  watch(() => props.value, (n, o) => {
106
+ var _a, _b;
102
107
  if (n != null && o == null) {
103
108
  fetchData();
104
109
  }
110
+ if (isField(field.value) && field.value.visited) {
111
+ (_b = (_a = field.value).validate) == null ? void 0 : _b.call(_a);
112
+ }
105
113
  }, {
106
114
  immediate: true
107
115
  });
@@ -139,6 +147,11 @@ const script = defineComponent({
139
147
  show.value = !!v;
140
148
  v && fetchData();
141
149
  }
150
+ function onFocus() {
151
+ if (isField(field.value)) {
152
+ field.value.visited = true;
153
+ }
154
+ }
142
155
  return () => {
143
156
  return createVNode(NCascader, {
144
157
  "value": _value.value,
@@ -150,6 +163,7 @@ const script = defineComponent({
150
163
  "options": renderOptions.value,
151
164
  "checkStrategy": "child",
152
165
  "onLoad": fetchData,
166
+ "onFocus": onFocus,
153
167
  "onUpdate:show": updateShow
154
168
  }, slots);
155
169
  };
@@ -9,6 +9,7 @@ export declare const CHECKBOX: import("vue").DefineComponent<{
9
9
  type: BooleanConstructor;
10
10
  default: boolean;
11
11
  };
12
+ onChange: {};
12
13
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, Record<string, any>, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
13
14
  options: {
14
15
  type: PropType<AnyObject[]>;
@@ -18,6 +19,7 @@ export declare const CHECKBOX: import("vue").DefineComponent<{
18
19
  type: BooleanConstructor;
19
20
  default: boolean;
20
21
  };
22
+ onChange: {};
21
23
  }>>, {
22
24
  options: AnyObject[];
23
25
  vertical: boolean;
@@ -13,12 +13,11 @@ const script = defineComponent({
13
13
  vertical: {
14
14
  type: Boolean,
15
15
  default: false
16
- }
16
+ },
17
+ onChange: {}
17
18
  },
18
- setup(props, {
19
- attrs
20
- }) {
21
- return () => createVNode(NCheckboxGroup, attrs, {
19
+ setup(props) {
20
+ return () => createVNode(NCheckboxGroup, null, {
22
21
  default: () => [createVNode(NSpace, {
23
22
  "vertical": props.vertical
24
23
  }, {
@@ -32,20 +32,52 @@ const DATE = connect(script, mapProps((props, field) => {
32
32
  max_date
33
33
  } = props.validate;
34
34
  if (min_date || max_date) {
35
- _props.isDateDisabled = (time) => {
36
- let disabled = false;
37
- if (min_date === "currTime") {
38
- disabled = time < Date.now();
39
- }
40
- if (max_date === "currTime") {
41
- disabled = time > Date.now();
42
- }
43
- return disabled;
44
- };
35
+ _props.isDateDisabled = isDateDisabled;
36
+ _props.isTimeDisabled = isTimeDisabled;
45
37
  }
46
38
  }
47
39
  }
48
40
  return _props;
41
+ function minCurrentDate() {
42
+ var _a;
43
+ return ((_a = props.validate) == null ? void 0 : _a.min_date) === "currTime";
44
+ }
45
+ function maxCurrentDate() {
46
+ var _a;
47
+ return ((_a = props.validate) == null ? void 0 : _a.max_date) === "currTime";
48
+ }
49
+ function isDateDisabled(time) {
50
+ return minCurrentDate() && time < yesterday() || maxCurrentDate() && time > Date.now();
51
+ function yesterday() {
52
+ return Date.now() - 24 * 60 * 60 * 1e3;
53
+ }
54
+ }
55
+ function isTimeDisabled(time) {
56
+ const checkDate = new Date(time);
57
+ const currentDate = new Date();
58
+ return {
59
+ isHourDisabled,
60
+ isMinuteDisabled
61
+ };
62
+ function checkHour() {
63
+ return checkDate.getHours();
64
+ }
65
+ function currentHour() {
66
+ return currentDate.getHours();
67
+ }
68
+ function currentMinute() {
69
+ return currentDate.getMinutes();
70
+ }
71
+ function isHourDisabled(hour) {
72
+ return minCurrentDate() && hour < currentHour() || maxCurrentDate() && hour > currentHour();
73
+ }
74
+ function isMinuteDisabled(minute) {
75
+ if (checkHour() === currentHour()) {
76
+ return minCurrentDate() && minute < currentMinute() || maxCurrentDate() && minute > currentMinute();
77
+ }
78
+ return minCurrentDate() && checkHour() < currentHour() || maxCurrentDate() && checkHour() > currentHour();
79
+ }
80
+ }
49
81
  }));
50
82
 
51
83
  export { DATE };
@@ -1,4 +1,5 @@
1
1
  import { defineComponent, ref, inject, computed, watch, createVNode } from 'vue';
2
+ import { isField } from '@formily/core';
2
3
  import { cloneDeep } from 'lodash-es';
3
4
  import { InjectAsyncQueue, InjectionFormItemDepsCollector, InjectionChangeContextCollector } from '../../constants/index.js';
4
5
  import { assignUpdateValue, formRenderLog, generateUrlParams } from '../../utils/index.js';
@@ -97,9 +98,13 @@ const script = defineComponent({
97
98
  immediate: true
98
99
  });
99
100
  watch(() => props.value, (n, o) => {
101
+ var _a, _b;
100
102
  if (o == null && n != null) {
101
103
  fetchData();
102
104
  }
105
+ if (isField(field.value) && field.value.visited) {
106
+ (_b = (_a = field.value).validate) == null ? void 0 : _b.call(_a);
107
+ }
103
108
  }, {
104
109
  immediate: true
105
110
  });
@@ -116,6 +121,11 @@ const script = defineComponent({
116
121
  var _a, _b;
117
122
  return (_b = (_a = props.urlConfig) == null ? void 0 : _a.valueKey) != null ? _b : "value";
118
123
  });
124
+ function onFocus() {
125
+ if (isField(field.value)) {
126
+ field.value.visited = true;
127
+ }
128
+ }
119
129
  return () => createVNode(NSelect, {
120
130
  "value": props.value,
121
131
  "onUpdate:value": update,
@@ -125,6 +135,7 @@ const script = defineComponent({
125
135
  "valueField": valueKey.value,
126
136
  "onSearch": fetchData,
127
137
  "onUpdate:show": (show) => show && fetchData(),
138
+ "onFocus": onFocus,
128
139
  "options": parsedOptions.value
129
140
  }, slots);
130
141
  }
@@ -47,7 +47,6 @@ const buttonScript = (props) => {
47
47
  const cb = propFor("onClick") || ((_a2 = propFor("componentProps")) == null ? void 0 : _a2.onClick);
48
48
  return () => isFunction(cb) && cb(props.fieldItem);
49
49
  }
50
- console.log(props.content);
51
50
  return createVNode(NButton, mergeProps((_a = propFor("componentProps")) != null ? _a : {}, {
52
51
  "onClick": onClick()
53
52
  }), _isSlot(_slot = createSlot(props.content, props)) ? _slot : {
@@ -2732,3 +2732,46 @@ body > .vxe-table--tooltip-wrapper {
2732
2732
  display: flex !important;
2733
2733
  gap: 0 8px;
2734
2734
  }
2735
+ .c-fabric-chart-popup-tip,
2736
+ .c-fabric-chart-popup-menu {
2737
+ position: absolute;
2738
+ z-index: 1001;
2739
+ display: flex;
2740
+ flex-flow: column nowrap;
2741
+ margin: 0;
2742
+ padding: 8px 12px;
2743
+ font-size: 12px;
2744
+ }
2745
+ .c-fabric-chart-popup-tip > li,
2746
+ .c-fabric-chart-popup-menu > li {
2747
+ list-style: none;
2748
+ }
2749
+ .c-fabric-chart-popup-tip {
2750
+ border-radius: 4px;
2751
+ background: rgba(0, 0, 0, 0.7);
2752
+ }
2753
+ .c-fabric-chart-popup-tip > li {
2754
+ color: #fff;
2755
+ }
2756
+ .c-fabric-chart-popup-menu {
2757
+ padding: 8px 5px !important;
2758
+ z-index: 1001;
2759
+ background: #fff;
2760
+ box-shadow: 0 2px 12px 0 rgba(56, 56, 56, 0.2);
2761
+ border: 1px solid #e2e6ed;
2762
+ border-radius: 2px;
2763
+ }
2764
+ .c-fabric-chart-popup-menu > li {
2765
+ padding: 5px;
2766
+ background: #fff;
2767
+ cursor: pointer;
2768
+ }
2769
+ .c-fabric-chart-popup-menu > li:hover {
2770
+ background: #f0f7ff;
2771
+ }
2772
+ .c-fabric-chart-popup-menu > li.no-click {
2773
+ cursor: default;
2774
+ }
2775
+ .c-fabric-chart-popup-menu > li.no-click:hover {
2776
+ background: #fff;
2777
+ }
@@ -120,12 +120,7 @@ const ScaleViewComputed = (props, state, config) => {
120
120
  const showAnswerParse = computed(() => (item) => {
121
121
  var _a;
122
122
  let { evaluateAnswer, checkAnswerMode, evaluateStartTime, evaluateTime } = ((_a = state.config) == null ? void 0 : _a.evaluateResultSetting) || {};
123
- let arr = [
124
- "EVALUATE_RADIO_BLOCK",
125
- "EVALUATE_CHECKBOX_BLOCK",
126
- "EVALUATE_SELECT",
127
- "EVALUATE_INPUT"
128
- ];
123
+ let arr = ["EVALUATE_RADIO_BLOCK", "EVALUATE_CHECKBOX_BLOCK", "EVALUATE_SELECT", "EVALUATE_INPUT"];
129
124
  let maxScore = (item == null ? void 0 : item.scoreConfigs) || 0;
130
125
  let isShow = evaluateAnswer && state.isFinished && arr.includes(item.type) && maxScore;
131
126
  if (!evaluateStartTime || !evaluateTime || checkAnswerMode && checkAnswerMode == 1) {
@@ -179,12 +174,12 @@ const ScaleViewComputed = (props, state, config) => {
179
174
  };
180
175
  });
181
176
  const comProsMap = {
182
- "RSelectCom": selectProps.value,
183
- "RCascaderCom": cascaderProps.value,
184
- "RUploadCom": uploadProps.value,
185
- "RMapCom": mapProps.value,
186
- "RVodChunkUploadCom": vodChunkUploadProps.value,
187
- "CSelectLabelCom": selectLabelProps.value
177
+ RSelectCom: selectProps.value,
178
+ RCascaderCom: cascaderProps.value,
179
+ RUploadCom: uploadProps.value,
180
+ RMapCom: mapProps.value,
181
+ RVodChunkUploadCom: vodChunkUploadProps.value,
182
+ CSelectLabelCom: selectLabelProps.value
188
183
  };
189
184
  const propsConfig = computed(() => (item, index) => {
190
185
  var _a;
@@ -10,12 +10,7 @@ import { useDialog } from 'naive-ui';
10
10
  const ScaleViewInit = (props, state, emit, config) => {
11
11
  const dialog = useDialog();
12
12
  const { setNoData } = useNoData();
13
- const {
14
- hasEvaluateResultSetting,
15
- hasparamsEvaluate,
16
- hasDefault,
17
- formKey
18
- } = ScaleViewComputed(props, state, config);
13
+ const { hasEvaluateResultSetting, hasparamsEvaluate, hasDefault, formKey } = ScaleViewComputed(props, state, config);
19
14
  const { formatRules } = ScaleViewValidate(props, state, config);
20
15
  const { nextLogicEvent } = useEvent(props, state);
21
16
  const setEvaluateStartTime = (evaluateResultSetting) => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "cnhis-design-vue",
3
3
  "private": false,
4
- "version": "3.1.12-beta.6",
4
+ "version": "3.1.13-beta.0",
5
5
  "license": "ISC",
6
6
  "module": "es/packages/index.js",
7
7
  "main": "es/packages/index.js",