cnhis-design-vue 3.1.21-beta.12 → 3.1.21-beta.14

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 (72) hide show
  1. package/es/components/fabric-chart/src/components/PopupMenu.js +2 -1
  2. package/es/components/fabric-chart/src/hooks/constant.d.ts +40 -0
  3. package/es/components/fabric-chart/src/hooks/constant.js +1 -1
  4. package/es/components/fabric-chart/src/hooks/constant2.js +43 -1
  5. package/es/components/fabric-chart/src/hooks/useCenter2.js +30 -18
  6. package/es/components/fabric-chart/src/hooks/useDraw2.js +8 -8
  7. package/es/components/fabric-chart/src/hooks/useLeft2.js +13 -0
  8. package/es/components/form-render/src/FormRender.js +2 -1
  9. package/es/components/form-render/src/components/renderer/jsonCombination/hooks/useDeepValidate2.js +1 -1
  10. package/es/components/form-render/src/hooks/useFieldListAdaptor2.js +2 -1
  11. package/es/components/form-render/src/hooks/useFieldVisitor2.js +1 -1
  12. package/es/components/form-render/src/hooks/useFormValidator2.js +2 -1
  13. package/es/components/form-render/src/utils/index.d.ts +0 -1
  14. package/es/components/form-render/src/utils/index.js +2 -6
  15. package/es/components/his-table/index.d.ts +701 -0
  16. package/es/components/his-table/index.js +3 -0
  17. package/es/components/his-table/index2.js +25 -0
  18. package/es/components/his-table/src/HisTable.js +47 -0
  19. package/es/components/his-table/src/HisTable.vue.d.ts +701 -0
  20. package/es/components/his-table/src/components/HisTableColumn.d.ts +14 -0
  21. package/es/components/his-table/src/components/HisTableColumn.js +17 -0
  22. package/es/components/his-table/src/components/index.d.ts +1 -0
  23. package/es/components/his-table/src/components/index.js +1 -0
  24. package/es/components/his-table/src/hooks/index.d.ts +2 -0
  25. package/es/components/his-table/src/hooks/index.js +2 -0
  26. package/es/components/his-table/src/hooks/tapHooks/index.d.ts +9 -0
  27. package/es/components/his-table/src/hooks/tapHooks/index.js +1 -0
  28. package/es/components/his-table/src/hooks/tapHooks/index2.js +45 -0
  29. package/es/components/his-table/src/hooks/tapHooks/useConfigHooks.d.ts +12 -0
  30. package/es/components/his-table/src/hooks/tapHooks/useConfigHooks.js +1 -0
  31. package/es/components/his-table/src/hooks/tapHooks/useConfigHooks2.js +28 -0
  32. package/es/components/his-table/src/hooks/tapHooks/useEventHooks.d.ts +67 -0
  33. package/es/components/his-table/src/hooks/tapHooks/useEventHooks.js +1 -0
  34. package/es/components/his-table/src/hooks/tapHooks/useEventHooks2.js +82 -0
  35. package/es/components/his-table/src/hooks/tapHooks/useFieldHooks.d.ts +10 -0
  36. package/es/components/his-table/src/hooks/tapHooks/useFieldHooks.js +1 -0
  37. package/es/components/his-table/src/hooks/tapHooks/useFieldHooks2.js +30 -0
  38. package/es/components/his-table/src/hooks/tapHooks/useVxeTableHooks.d.ts +9 -0
  39. package/es/components/his-table/src/hooks/tapHooks/useVxeTableHooks.js +1 -0
  40. package/es/components/his-table/src/hooks/tapHooks/useVxeTableHooks2.js +27 -0
  41. package/es/components/his-table/src/hooks/useTablePlugin.d.ts +8 -0
  42. package/es/components/his-table/src/hooks/useTablePlugin.js +1 -0
  43. package/es/components/his-table/src/hooks/useTablePlugin2.js +16 -0
  44. package/es/components/his-table/src/plugins/defaultConfigPlugin/index.d.ts +1 -0
  45. package/es/components/his-table/src/plugins/defaultConfigPlugin/index.js +1 -0
  46. package/es/components/his-table/src/plugins/defaultConfigPlugin/index2.js +24 -0
  47. package/es/components/his-table/src/plugins/index.d.ts +2 -0
  48. package/es/components/his-table/src/plugins/index.js +2 -0
  49. package/es/components/his-table/src/plugins/index2.js +2 -0
  50. package/es/components/his-table/src/plugins/lowCodeFieldAdaptorPlugin/formatter.d.ts +2 -0
  51. package/es/components/his-table/src/plugins/lowCodeFieldAdaptorPlugin/formatter.js +1 -0
  52. package/es/components/his-table/src/plugins/lowCodeFieldAdaptorPlugin/formatter2.js +5 -0
  53. package/es/components/his-table/src/plugins/lowCodeFieldAdaptorPlugin/index.d.ts +1 -0
  54. package/es/components/his-table/src/plugins/lowCodeFieldAdaptorPlugin/index.js +1 -0
  55. package/es/components/his-table/src/plugins/lowCodeFieldAdaptorPlugin/index2.js +22 -0
  56. package/es/components/his-table/src/types/index.d.ts +12 -0
  57. package/es/components/his-table/src/types/index.js +1 -0
  58. package/es/components/his-table/src/types/pluginType.d.ts +97 -0
  59. package/es/components/his-table/src/types/pluginType.js +1 -0
  60. package/es/components/his-table/src/types/pluginType2.js +10 -0
  61. package/es/components/his-table/style/index.css +0 -0
  62. package/es/components/index.d.ts +3 -1
  63. package/es/components/index.js +3 -0
  64. package/es/components/index2.js +4 -1
  65. package/es/components/shortcut-provider/src/hooks/useShortcuts2.js +5 -3
  66. package/es/shared/types/index.d.ts +1 -0
  67. package/es/shared/utils/index.d.ts +1 -0
  68. package/es/shared/utils/index.js +1 -1
  69. package/es/shared/utils/index2.js +6 -1
  70. package/es/shared/utils/tapable/AsyncParallelHook.js +17 -2
  71. package/es/shared/utils/tapable/SyncHook.js +23 -2
  72. package/package.json +2 -2
@@ -60,7 +60,7 @@ var PopupMenu = defineComponent({
60
60
  "align": "center"
61
61
  }, {
62
62
  default: () => [createVNode("span", null, [item.label]), createVNode(NInputNumber, {
63
- "style": "width: 120px",
63
+ "style": "width: 110px",
64
64
  "size": "small",
65
65
  "value": item.value,
66
66
  "onUpdate:value": ($event) => item.value = $event,
@@ -68,6 +68,7 @@ var PopupMenu = defineComponent({
68
68
  "placeholder": "\u8BF7\u8F93\u5165\u6570\u503C",
69
69
  "max": props.target.origin.data.value,
70
70
  "min": min,
71
+ "showButton": false,
71
72
  "onFocus": () => emit("update:show", true)
72
73
  }, null)]
73
74
  });
@@ -12,3 +12,43 @@ export declare const PAIN_MENU: {
12
12
  value: undefined;
13
13
  type: string;
14
14
  }[];
15
+ export declare const OVERLAP: {
16
+ yemai: {
17
+ stroke: string;
18
+ strokeX: string;
19
+ strokeWidth: number;
20
+ strokeWidthX: number;
21
+ radius: number;
22
+ angle: number;
23
+ };
24
+ koumai: {
25
+ stroke: string;
26
+ strokeWidth: number;
27
+ radius: number;
28
+ radiusCircle: number;
29
+ fillCircle: string;
30
+ };
31
+ gangmai: {
32
+ radius: number;
33
+ radiusCircle: number;
34
+ stroke: string;
35
+ fillCircle: string;
36
+ };
37
+ xinmai: {
38
+ radius: number;
39
+ radiusCircle: number;
40
+ stroke: string;
41
+ fillCircle: string;
42
+ };
43
+ humai: {
44
+ radius: number;
45
+ fill: string;
46
+ };
47
+ ermai: {
48
+ stroke: string;
49
+ strokeWidth: number;
50
+ radius: number;
51
+ radiusCircle: number;
52
+ fillCircle: string;
53
+ };
54
+ };
@@ -1 +1 @@
1
- export { PAIN_MENU, TEMPERATURE_MENU } from './constant2.js';
1
+ export { OVERLAP, PAIN_MENU, TEMPERATURE_MENU } from './constant2.js';
@@ -32,5 +32,47 @@ const PAIN_MENU = [
32
32
  type: "physicsReduce"
33
33
  }
34
34
  ];
35
+ const BLUE = "#2563F4";
36
+ const RED = "#FF1818";
37
+ const OVERLAP = {
38
+ yemai: {
39
+ stroke: RED,
40
+ strokeX: BLUE,
41
+ strokeWidth: 1,
42
+ strokeWidthX: 1,
43
+ radius: 6,
44
+ angle: 45
45
+ },
46
+ koumai: {
47
+ stroke: RED,
48
+ strokeWidth: 1,
49
+ radius: 6,
50
+ radiusCircle: 3,
51
+ fillCircle: BLUE
52
+ },
53
+ gangmai: {
54
+ radius: 6,
55
+ radiusCircle: 3,
56
+ stroke: BLUE,
57
+ fillCircle: RED
58
+ },
59
+ xinmai: {
60
+ radius: 6,
61
+ radiusCircle: 3,
62
+ stroke: RED,
63
+ fillCircle: RED
64
+ },
65
+ humai: {
66
+ radius: 6,
67
+ fill: "green"
68
+ },
69
+ ermai: {
70
+ stroke: RED,
71
+ strokeWidth: 1,
72
+ radius: 6,
73
+ radiusCircle: 3,
74
+ fillCircle: BLUE
75
+ }
76
+ };
35
77
 
36
- export { PAIN_MENU, TEMPERATURE_MENU };
78
+ export { OVERLAP, PAIN_MENU, TEMPERATURE_MENU };
@@ -3,7 +3,7 @@ import { fabric } from '../utils/index.js';
3
3
  import { drawLine, defaultStyle, drawPoint, drawText, drawArrow } from './useDraw2.js';
4
4
  import useGrid from './useGrid2.js';
5
5
  import { useShadow } from './useShadow2.js';
6
- import { TEMPERATURE_MENU, PAIN_MENU } from './constant2.js';
6
+ import { TEMPERATURE_MENU, PAIN_MENU, OVERLAP } from './constant2.js';
7
7
 
8
8
  function isEffectiveNode(node) {
9
9
  return (node == null ? void 0 : node.time) && ((node == null ? void 0 : node.value) || (node == null ? void 0 : node.value) === 0);
@@ -154,17 +154,20 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
154
154
  pointMenuProps.list = ["\u65B0\u589E\u8282\u70B9"];
155
155
  itemList.forEach((v) => {
156
156
  if (!getEqualXTypes(x).includes(v.bigType)) {
157
- pointMenuProps.list.push({
158
- renderItem: addRenderItem ? addRenderItem(v) : () => v.title,
159
- origin: {
160
- title: v.title,
161
- unit: v.unit,
162
- type: v.bigType,
163
- dataIndex: v.dataIndex,
164
- key: v.key
165
- },
166
- pointer: event2.pointer
167
- });
157
+ const newY = ["pain"].includes(v.bigType) ? painOriginY : vitalSignsOriginY;
158
+ if (y >= newY.originY && y <= newY.endY) {
159
+ pointMenuProps.list.push({
160
+ renderItem: addRenderItem ? addRenderItem(v) : () => v.title,
161
+ origin: {
162
+ title: v.title,
163
+ unit: v.unit,
164
+ type: v.bigType,
165
+ dataIndex: v.dataIndex,
166
+ key: v.key
167
+ },
168
+ pointer: event2.pointer
169
+ });
170
+ }
168
171
  }
169
172
  });
170
173
  if (pointMenuProps.list.length === 1) {
@@ -193,7 +196,7 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
193
196
  return;
194
197
  if (!pulseObj.dataList.some((item) => item.title.includes("\u8109\u640F")))
195
198
  return;
196
- const overlap = left.overlap || {};
199
+ const overlap = Object.assign({}, OVERLAP, left.overlap || {});
197
200
  const points = [];
198
201
  maiboPoints.size && [...maiboPoints].forEach((item) => {
199
202
  [...otherPoints].forEach((obj) => {
@@ -232,6 +235,7 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
232
235
  function drawPolyLine(item, dataIndex, scaleValue) {
233
236
  const {
234
237
  type,
238
+ riseStyle = {},
235
239
  noRiseStyle = {},
236
240
  verifiedStyle = {},
237
241
  reduceStyle = {},
@@ -256,9 +260,9 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
256
260
  const points = getPointer(v, scaleValue);
257
261
  const nextV = item.list[index + 1];
258
262
  const nextPoint = getPointer(nextV, scaleValue);
259
- let reduceLine, reducePoint, noRiseText, arrowGroup, verifiedText;
263
+ let reduceLine, reducePoint, noRiseText, arrowGroup, riseText, verifiedText;
260
264
  if ((points == null ? void 0 : points.length) && (type === "temperature" || type === "pain")) {
261
- if (v.noRise) {
265
+ if (v.noRise && noRiseStyle.show) {
262
266
  if (typeof v.noRise === "string") {
263
267
  noRiseText = drawText([points[0], points[1] + 5], {
264
268
  value: v.noRise.split("").join("\n"),
@@ -272,6 +276,14 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
272
276
  otherList.push(arrowGroup);
273
277
  }
274
278
  }
279
+ if (v.rise && riseStyle.show) {
280
+ riseText = drawText([points[0], points[1] - 5], {
281
+ value: v.rise.split("").join("\n"),
282
+ originY: "bottom",
283
+ ...riseStyle
284
+ });
285
+ otherList.push(riseText);
286
+ }
275
287
  if (v.verified) {
276
288
  verifiedText = drawText([points[0], points[1] - 5], {
277
289
  value: "v",
@@ -348,8 +360,8 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
348
360
  const pointAttrNew = {
349
361
  origin: {
350
362
  data: v,
351
- title: item.title,
352
- key: item.key || "",
363
+ title: _item.title,
364
+ key: _item.key || "",
353
365
  unit: scaleValue.unit,
354
366
  type,
355
367
  dataIndex,
@@ -385,7 +397,7 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
385
397
  }
386
398
  lineList.push(line);
387
399
  if (point) {
388
- if (item.title.includes("\u8109\u640F")) {
400
+ if (_item.title.includes("\u8109\u640F")) {
389
401
  maiboPoints.add(point);
390
402
  } else {
391
403
  otherPoints.add(point);
@@ -129,13 +129,11 @@ function drawPoint(type = "circle", style) {
129
129
  ...newStyle
130
130
  });
131
131
  case "image":
132
- if (style == null ? void 0 : style.url) ; else {
133
- return new fabric.Image(style.element, {
134
- ...newStyle,
135
- scale: 1
136
- });
137
- }
138
- case "yemai":
132
+ return new fabric.Image(style.element, {
133
+ ...newStyle,
134
+ scale: 1
135
+ });
136
+ case "yemai": {
139
137
  const createAdd = () => {
140
138
  const width = ((style.radius || 5) + (style.strokeWidth || 1)) * 2;
141
139
  const subLineStyle = {
@@ -152,7 +150,8 @@ function drawPoint(type = "circle", style) {
152
150
  scale: 1,
153
151
  ...newStyle
154
152
  });
155
- case "koumai":
153
+ }
154
+ case "koumai": {
156
155
  const left = (style.radius || 5) + (style.strokeWidth || 1);
157
156
  const circle = new fabric.Circle({
158
157
  objectCaching: false,
@@ -167,6 +166,7 @@ function drawPoint(type = "circle", style) {
167
166
  scale: 1,
168
167
  ...newStyle
169
168
  });
169
+ }
170
170
  default:
171
171
  style && Reflect.deleteProperty(style, "stroke");
172
172
  return new fabric.Text(String(type), {
@@ -235,8 +235,21 @@ function useLeft(canvas, propItems, emits, setPopup, pointTipProps, getXValue, g
235
235
  function isLimit(point) {
236
236
  return point.left >= originX && point.left <= endX && point.top >= originY && point.top <= endY;
237
237
  }
238
+ function moveLimit(point) {
239
+ if (point.left >= originX && point.left <= endX) {
240
+ point.setCoords();
241
+ const newY = point.origin.type === "pain" ? painOriginY : vitalSignsOriginY;
242
+ if (point.top < newY.originY) {
243
+ point.set("top", newY.originY);
244
+ }
245
+ if (point.top > newY.endY) {
246
+ point.set("top", newY.endY);
247
+ }
248
+ }
249
+ }
238
250
  function setPointEvent(point) {
239
251
  point.on("moving", () => {
252
+ moveLimit(point);
240
253
  if (isLimit(point)) {
241
254
  setPopup(point);
242
255
  } else {
@@ -1,4 +1,5 @@
1
1
  import { defineComponent, ref, computed, watch, openBlock, createBlock, unref, withCtx, createElementBlock, createVNode, isRef, Fragment, renderList, createCommentVNode, createElementVNode, normalizeStyle, toDisplayString, nextTick } from 'vue';
2
+ import { arrayed } from '../../../shared/utils/index2.js';
2
3
  import { createForm, onFieldValueChange } from '@formily/core';
3
4
  import { FormProvider, FormConsumer } from '@formily/vue';
4
5
  import { isObject } from '@vue/shared';
@@ -7,7 +8,7 @@ import { NForm, NTabs, NTabPane, NConfigProvider } from 'naive-ui';
7
8
  import { FormItemLineBarDepKeyPrepend } from './constants/index2.js';
8
9
  import { useFormRenderLifeCycle } from './hooks/useFormRenderLifeCycle2.js';
9
10
  import { useNuiThemeOverrides } from './hooks/useNuiThemeOverrides2.js';
10
- import { arrayed } from './utils/index.js';
11
+ import './utils/index.js';
11
12
  import { useFieldListAdaptor } from './hooks/useFieldListAdaptor2.js';
12
13
  import '../index2.js';
13
14
  import { useFieldVisitor } from './hooks/useFieldVisitor2.js';
@@ -2,7 +2,7 @@ import { isField } from '@formily/core';
2
2
  import { flatten } from 'lodash-es';
3
3
  import { onMounted } from 'vue';
4
4
  import '../../../../../index2.js';
5
- import { arrayed } from '../../../../utils/index.js';
5
+ import { arrayed } from '../../../../../../../shared/utils/index2.js';
6
6
  import { useFormField } from '../../../../hooks/useFormField2.js';
7
7
 
8
8
  function useDeepValidate() {
@@ -1,7 +1,8 @@
1
+ import { arrayed } from '../../../../shared/utils/index2.js';
1
2
  import { isObject } from '@vueuse/core';
2
3
  import { cloneDeep, omit, pick } from 'lodash-es';
3
4
  import '../../index2.js';
4
- import { arrayed, parseNumberFromMaybeString, formRenderLog } from '../utils/index.js';
5
+ import { parseNumberFromMaybeString, formRenderLog } from '../utils/index.js';
5
6
  import { useFieldNormalize } from './useFieldNormalize2.js';
6
7
  import { fieldKeyEscape, createLinebarId } from '../utils/schema2.js';
7
8
  import { transformDateFormat } from '../utils/business2.js';
@@ -1,4 +1,4 @@
1
- import { arrayed } from '../utils/index.js';
1
+ import { arrayed } from '../../../../shared/utils/index2.js';
2
2
  import { isFunction } from '@vueuse/core';
3
3
 
4
4
  function useFieldVisitor() {
@@ -1,5 +1,6 @@
1
+ import { arrayed } from '../../../../shared/utils/index2.js';
1
2
  import { isString } from 'lodash-es';
2
- import { arrayed } from '../utils/index.js';
3
+ import '../utils/index.js';
3
4
  import { isFunction } from '@vueuse/core';
4
5
  import { isIdCard } from '../utils/business2.js';
5
6
 
@@ -5,7 +5,6 @@ export * from './business';
5
5
  export * from './dom';
6
6
  export * from './schema';
7
7
  export declare function formRenderLog(message: string): void;
8
- export declare function arrayed<T>(maybeArray: T): T extends Array<any> ? T : [T];
9
8
  export declare function mergeDeepProperties(target: AnyObject, fieldList: FieldItem[], traverseProperties?: string[], property?: string, targetProperty?: string): AnyObject;
10
9
  export declare function injectOrProvide<T>(key: InjectionKey<T>, creator: () => T): T;
11
10
  export declare function parseNumberFromMaybeString<T>(value: T): T extends number | string ? number : T;
@@ -1,4 +1,5 @@
1
1
  import { computed, createVNode, Fragment, inject, provide } from 'vue';
2
+ import { arrayed } from '../../../../shared/utils/index2.js';
2
3
  import { Path } from '@formily/path';
3
4
  import { isObject } from '@vue/shared';
4
5
  import { useMemoize } from '@vueuse/core';
@@ -9,11 +10,6 @@ import '@formily/core';
9
10
  function formRenderLog(message) {
10
11
  console.warn(`[FormRender]: ${message}`);
11
12
  }
12
- function arrayed(maybeArray) {
13
- if (Array.isArray(maybeArray))
14
- return maybeArray;
15
- return [maybeArray];
16
- }
17
13
  function mergeDeepProperties(target, fieldList, traverseProperties = ["children", "properties", "suffixConfig"], property = "val_key", targetProperty = "default_val") {
18
14
  function traverse(_target, _fieldList) {
19
15
  _fieldList.forEach((field) => {
@@ -138,4 +134,4 @@ function optionMatcher(options, input, key, matcherOption = {
138
134
  }
139
135
  }
140
136
 
141
- export { arrayed, createInputSlot, createSlot, formRenderLog, injectOrProvide, mergeDeepProperties, optionMatcher, parseNumberFromMaybeString, presetRequestHandler, uuidGenerator };
137
+ export { createInputSlot, createSlot, formRenderLog, injectOrProvide, mergeDeepProperties, optionMatcher, parseNumberFromMaybeString, presetRequestHandler, uuidGenerator };