cnhis-design-vue 3.4.0-beta.60 → 3.4.0-beta.63

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 (38) hide show
  1. package/es/components/expand-field/index.d.ts +31 -0
  2. package/es/components/expand-field/src/components/FormItemPerson.vue.d.ts +31 -0
  3. package/es/components/expand-field/src/components/PersonModal.vue.d.ts +31 -0
  4. package/es/components/expand-field/src/components/form.vue.d.ts +31 -0
  5. package/es/components/expand-field/src/index.vue.d.ts +31 -0
  6. package/es/components/fabric-chart/index.d.ts +3 -3
  7. package/es/components/fabric-chart/src/FabricChart.vue.d.ts +3 -3
  8. package/es/components/fabric-chart/src/components/PopupMenu.d.ts +4 -4
  9. package/es/components/fabric-chart/src/components/PopupMenu.js +57 -39
  10. package/es/components/fabric-chart/src/constants/index.d.ts +19 -4
  11. package/es/components/fabric-chart/src/constants/index.js +26 -10
  12. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.d.ts +4 -3
  13. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +119 -193
  14. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.d.ts +4 -3
  15. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.js +15 -26
  16. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useOther.d.ts +4 -3
  17. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useOther.js +6 -7
  18. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.d.ts +4 -3
  19. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.js +8 -9
  20. package/es/components/fabric-chart/src/hooks/temperature/useCenter.d.ts +4 -3
  21. package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +81 -218
  22. package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -1
  23. package/es/components/fabric-chart/src/interface.d.ts +14 -1
  24. package/es/components/fabric-chart/src/utils/index.d.ts +0 -1
  25. package/es/components/fabric-chart/src/utils/index.js +1 -10
  26. package/es/components/fabric-chart/style/index.css +1 -1
  27. package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/filter.vue.d.ts +2 -4
  28. package/es/components/iho-table/src/plugins/filterDaterangeRenderPlugin/filter.vue2.js +22 -8
  29. package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin.js +1 -1
  30. package/es/components/iho-table/src/types/index.d.ts +3 -1
  31. package/es/components/index.css +1 -1
  32. package/es/components/select-person/index.d.ts +31 -0
  33. package/es/components/select-person/src/SelectPerson.vue.d.ts +14 -0
  34. package/es/components/select-person/src/SelectPerson.vue2.js +16 -4
  35. package/es/components/select-person/src/index.vue.d.ts +31 -0
  36. package/es/components/select-person/src/index.vue2.js +4 -0
  37. package/es/shared/package.json.js +1 -1
  38. package/package.json +2 -2
@@ -1,6 +1,7 @@
1
1
  import { i18n } from '../../../../_virtual/_virtual_i18n-methods.js';
2
2
  import { defineComponent, ref, watch, withDirectives, createVNode, vShow } from 'vue';
3
- import { NSpace, NInputNumber } from 'naive-ui';
3
+ import { NIcon, NSpace, NInputNumber } from 'naive-ui';
4
+ import { ChevronForwardOutline } from '@vicons/ionicons5';
4
5
  import useStyle from './useStyle.js';
5
6
  import { useEventListener, onClickOutside } from '@vueuse/core';
6
7
 
@@ -40,51 +41,49 @@ var PopupMenu = /* @__PURE__ */ defineComponent({
40
41
  onClickOutside(menuRef, (event) => {
41
42
  emit("update:show", false);
42
43
  });
43
- props.propItems;
44
44
  const pointStyle = useStyle(props);
45
- function setNoClick(item) {
46
- if (typeof item === "string" && (item.startsWith(i18n("10010.1.279", "\u65B0\u589E")) || item.startsWith(i18n("10010.1.215", "\u5220\u9664")))) {
47
- return true;
48
- }
49
- }
50
45
  function getItemContent(item) {
51
- if (typeof item === "string")
52
- return item;
53
- if (typeof item.value === "boolean")
54
- return item.label;
55
46
  if (item.renderItem)
56
47
  return item.renderItem();
57
- return createVNode(NSpace, {
58
- "inline": true,
59
- "align": "center"
60
- }, {
61
- default: () => [createVNode("span", null, [item.label]), createVNode(NInputNumber, {
62
- "style": "width: 110px",
63
- "size": "small",
64
- "value": item.value,
65
- "onUpdate:value": ($event) => item.value = $event,
66
- "clearable": true,
67
- "placeholder": i18n("10010.1.207", "\u8BF7\u8F93\u5165\u6570\u503C"),
68
- "showButton": false,
69
- "onFocus": () => emit("update:show", true)
70
- }, null)]
71
- });
48
+ if (item.hasInput)
49
+ return createVNode(NSpace, {
50
+ "inline": true,
51
+ "align": "center"
52
+ }, {
53
+ default: () => [createVNode("span", null, [item.label]), createVNode(NInputNumber, {
54
+ "style": "width: 110px",
55
+ "size": "small",
56
+ "value": item.value,
57
+ "onUpdate:value": ($event) => item.value = $event,
58
+ "clearable": true,
59
+ "placeholder": i18n("10010.1.207", "\u8BF7\u8F93\u5165\u6570\u503C"),
60
+ "showButton": false
61
+ }, null)]
62
+ });
63
+ return item.label;
64
+ }
65
+ function hasChildren(item) {
66
+ return Array.isArray(item.children) && item.children.length > 0;
72
67
  }
73
68
  function clickItem(event, item) {
74
- if (setNoClick(item))
75
- return void 0;
76
- if ((event == null ? void 0 : event.target.className) === "") {
77
- emit("update:show", false);
78
- emit("clickMenu", {
79
- item,
80
- target: props.target
81
- });
69
+ const target = event.target;
70
+ if (target && target.closest(".n-input-number")) {
71
+ event.stopPropagation();
72
+ return;
82
73
  }
74
+ if (item.isTitle)
75
+ return;
76
+ emit("update:show", false);
77
+ emit("clickMenu", {
78
+ item,
79
+ target: props.target,
80
+ pointer: props.point
81
+ });
83
82
  }
84
83
  watch(() => props.show, (value) => {
85
84
  if (value) {
86
85
  props.list.forEach((item) => {
87
- if (typeof item === "object" && Reflect.has(item, "value") && typeof item.value !== "boolean") {
86
+ if (Reflect.has(item, "value") && typeof item.value !== "boolean") {
88
87
  item.value = void 0;
89
88
  }
90
89
  });
@@ -94,14 +93,33 @@ var PopupMenu = /* @__PURE__ */ defineComponent({
94
93
  "ref": menuRef,
95
94
  "class": "c-fabric-chart-popup c-fabric-chart-popup__menu",
96
95
  "style": pointStyle.value
97
- }, [props.list.map((item) => {
96
+ }, [props.list.map((item, index) => {
97
+ var _a;
98
98
  return props.show ? createVNode("li", {
99
99
  "class": {
100
- "no-click": setNoClick(item)
100
+ "no-click": item.isTitle,
101
+ "has-children": hasChildren(item)
101
102
  },
102
103
  "onClick": (event) => clickItem(event, item),
103
- "key": item.type || item
104
- }, [getItemContent(item)]) : null;
104
+ "key": item.key
105
+ }, [createVNode("div", {
106
+ "class": "menu-item__content"
107
+ }, [getItemContent(item), hasChildren(item) ? createVNode(NIcon, {
108
+ "class": "submenu-arrow",
109
+ "size": 14,
110
+ "component": ChevronForwardOutline
111
+ }, null) : null]), hasChildren(item) ? createVNode("ul", {
112
+ "class": "c-fabric-chart-popup__submenu"
113
+ }, [(_a = item.children) == null ? void 0 : _a.map((child) => createVNode("li", {
114
+ "class": {
115
+ "no-click": child.isTitle,
116
+ "has-children": hasChildren(child)
117
+ },
118
+ "onClick": (event) => clickItem(event, child),
119
+ "key": child.key
120
+ }, [createVNode("div", {
121
+ "class": "menu-item__content"
122
+ }, [getItemContent(child)])]))]) : null]) : null;
105
123
  })]), [[vShow, props.show]]);
106
124
  }
107
125
  });
@@ -1,20 +1,35 @@
1
1
  export declare const TEMPERATURE_MENU: ({
2
2
  label: string;
3
3
  value: boolean;
4
- type: string;
4
+ key: string;
5
+ hasInput?: undefined;
5
6
  } | {
6
7
  label: string;
7
8
  value: undefined;
8
- type: string;
9
+ key: string;
10
+ hasInput: boolean;
9
11
  })[];
12
+ export declare const TITLE_MENU_MAP: {
13
+ add: {
14
+ label: string;
15
+ key: string;
16
+ isTitle: boolean;
17
+ };
18
+ remove: {
19
+ label: string;
20
+ key: string;
21
+ isTitle: boolean;
22
+ };
23
+ };
10
24
  export declare const PAIN_MENU: {
11
25
  label: string;
12
26
  value: undefined;
13
- type: string;
27
+ key: string;
28
+ hasInput: boolean;
14
29
  }[];
15
30
  export declare const OTHER_MENU: readonly {
16
31
  label: string;
17
- type: string;
32
+ key: string;
18
33
  }[];
19
34
  export declare const OVERLAP: {
20
35
  yemai: {
@@ -3,38 +3,54 @@ import { i18n } from '../../../../_virtual/_virtual_i18n-methods.js';
3
3
  const TEMPERATURE_MENU = [{
4
4
  label: i18n("10010.1.208", "\u5347\u6E29"),
5
5
  value: true,
6
- type: "rise"
6
+ key: "rise"
7
7
  }, {
8
8
  label: i18n("10010.1.209", "\u836F\u7269\u964D\u6E29"),
9
9
  value: void 0,
10
- type: "drugReduce"
10
+ key: "drugReduce",
11
+ hasInput: true
11
12
  }, {
12
13
  label: i18n("10010.1.210", "\u7269\u7406\u964D\u6E29"),
13
14
  value: void 0,
14
- type: "physicsReduce"
15
+ key: "physicsReduce",
16
+ hasInput: true
15
17
  }, {
16
18
  label: i18n("10010.1.211", "\u4E0D\u5347"),
17
19
  value: true,
18
- type: "noRise"
20
+ key: "noRise"
19
21
  }];
22
+ const TITLE_MENU_MAP = {
23
+ add: {
24
+ label: i18n("10010.1.219", "\u65B0\u589E\u8282\u70B9"),
25
+ key: "add",
26
+ isTitle: true
27
+ },
28
+ remove: {
29
+ label: i18n("10010.1.220", "\u5220\u9664\u8282\u70B9"),
30
+ key: "remove",
31
+ isTitle: true
32
+ }
33
+ };
20
34
  const PAIN_MENU = [{
21
35
  label: i18n("10010.1.212", "\u836F\u7269\u964D\u75DB"),
22
36
  value: void 0,
23
- type: "drugReduce"
37
+ key: "drugReduce",
38
+ hasInput: true
24
39
  }, {
25
40
  label: i18n("10010.1.213", "\u7269\u7406\u964D\u75DB"),
26
41
  value: void 0,
27
- type: "physicsReduce"
42
+ key: "physicsReduce",
43
+ hasInput: true
28
44
  }];
29
45
  const OTHER_MENU = Object.freeze([{
30
46
  label: i18n("10010.1.279", "\u65B0\u589E"),
31
- type: "add"
47
+ key: "add"
32
48
  }, {
33
49
  label: i18n("10010.1.214", "\u4FEE\u6539"),
34
- type: "edit"
50
+ key: "edit"
35
51
  }, {
36
52
  label: i18n("10010.1.215", "\u5220\u9664"),
37
- type: "remove"
53
+ key: "remove"
38
54
  }]);
39
55
  const BLUE = "#2563F4";
40
56
  const RED = "#FF1818";
@@ -86,4 +102,4 @@ var ECG = /* @__PURE__ */ ((ECG2) => {
86
102
  return ECG2;
87
103
  })(ECG || {});
88
104
 
89
- export { ECG, OTHER_MENU, OVERLAP, PAIN_MENU, TEMPERATURE_MENU };
105
+ export { ECG, OTHER_MENU, OVERLAP, PAIN_MENU, TEMPERATURE_MENU, TITLE_MENU_MAP };
@@ -1,10 +1,11 @@
1
1
  import { type Ref } from 'vue';
2
2
  import { fabric } from '../../../../../shared/utils/fabricjs';
3
3
  import { AnyObject } from '../../../../../shared/types';
4
- import { IPointTipProps, IPointMenuProps } from '../../../../../components/fabric-chart/src/interface';
4
+ import { ICoordinateValue, IPointTipProps, IPointMenuProps, PopupMenuItem } from '../../../../../components/fabric-chart/src/interface';
5
5
  export declare function useBirthProcess(canvas: Ref<fabric.Canvas>, propItems: AnyObject, emits: Function, pointTipProps: IPointTipProps, pointMenuProps: IPointMenuProps): {
6
- clickMenu: ({ item, target }: {
7
- item: any;
6
+ clickMenu: ({ item, pointer, target }: {
7
+ item: PopupMenuItem;
8
+ pointer: ICoordinateValue;
8
9
  target: any;
9
10
  }) => void;
10
11
  redrawPoints: () => void;