cnhis-design-vue 3.1.22-beta.5 → 3.1.22-beta.6

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 (24) hide show
  1. package/es/components/fabric-chart/index.d.ts +1 -0
  2. package/es/components/fabric-chart/src/FabricChart.js +3 -2
  3. package/es/components/fabric-chart/src/FabricChart.vue.d.ts +1 -0
  4. package/es/components/fabric-chart/src/hooks/useCenter.d.ts +1 -0
  5. package/es/components/fabric-chart/src/hooks/useCenter2.js +15 -3
  6. package/es/components/fabric-chart/src/hooks/useLeft.d.ts +1 -1
  7. package/es/components/fabric-chart/src/hooks/useLeft2.js +7 -5
  8. package/es/components/fabric-chart/src/interface.d.ts +2 -0
  9. package/es/components/iho-table/index.d.ts +453 -348
  10. package/es/components/iho-table/index2.js +1 -0
  11. package/es/components/iho-table/src/IhoTable.js +23 -8
  12. package/es/components/iho-table/src/IhoTable.vue.d.ts +454 -348
  13. package/es/components/iho-table/src/components/IhoTableColumn.d.ts +2 -2
  14. package/es/components/iho-table/src/components/IhoTableColumn.js +22 -3
  15. package/es/components/iho-table/src/hooks/tapHooks/index.d.ts +4 -1
  16. package/es/components/iho-table/src/hooks/tapHooks/index2.js +3 -2
  17. package/es/components/iho-table/src/hooks/tapHooks/useEventHooks.d.ts +59 -59
  18. package/es/components/iho-table/src/hooks/tapHooks/useEventHooks2.js +59 -59
  19. package/es/components/iho-table/src/plugins/rendererPlugins/inputs/inputRendererPlugins.js +5 -0
  20. package/es/components/iho-table/src/types/index.d.ts +4 -2
  21. package/es/components/iho-table/src/types/pluginType.d.ts +63 -62
  22. package/package.json +2 -2
  23. package/es/components/form-render/src/components/index.d.ts +0 -0
  24. package/es/components/form-render/src/components/index.js +0 -1
@@ -82,6 +82,7 @@ declare const FabricChart: SFCWithInstall<import("vue").DefineComponent<{
82
82
  }) => void;
83
83
  setPopup: (point: any) => void;
84
84
  getEqualXTypes: (pointX: number) => import("./src/interface").IPointType[];
85
+ isAddPoint: (x: number) => boolean;
85
86
  drawScaleValue: (yScaleValueList: any[]) => void;
86
87
  PopupTip: import("vue").DefineComponent<{
87
88
  show: {
@@ -240,6 +240,7 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
240
240
  xScalevalueHeight: xScalevalueHeight.value,
241
241
  topList: topList.value,
242
242
  breathingHeight: breathingHeight.value,
243
+ hospitalizationDate: props.data.hospitalizationDate,
243
244
  grid: props.data.grid,
244
245
  top: props.data.top,
245
246
  left: props.data.left,
@@ -280,8 +281,8 @@ const _sfc_main = /* @__PURE__ */ defineComponent({
280
281
  }
281
282
  const { cumputedX, cumputedY, getXValue, getYValue } = useCumputedPoint(propItems);
282
283
  useTop(canvas, propItems);
283
- const { pointTipProps, pointMenuProps, clickMenu, setPopup, getEqualXTypes } = useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, getYValue, props.addRenderItem);
284
- const { drawScaleValue } = useLeft(canvas, propItems, emits, setPopup, pointTipProps, getXValue, getYValue, getEqualXTypes);
284
+ const { pointTipProps, pointMenuProps, clickMenu, setPopup, getEqualXTypes, isAddPoint } = useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, getYValue, props.addRenderItem);
285
+ const { drawScaleValue } = useLeft(canvas, propItems, emits, setPopup, pointTipProps, getXValue, getYValue, getEqualXTypes, isAddPoint);
285
286
  useRight(canvas, propItems, drawScaleValue);
286
287
  useBottom(canvas, propItems);
287
288
  useOther(canvas, propItems, cumputedX);
@@ -83,6 +83,7 @@ declare const _default: import("vue").DefineComponent<{
83
83
  }) => void;
84
84
  setPopup: (point: any) => void;
85
85
  getEqualXTypes: (pointX: number) => IPointType[];
86
+ isAddPoint: (x: number) => boolean;
86
87
  drawScaleValue: (yScaleValueList: any[]) => void;
87
88
  PopupTip: import("vue").DefineComponent<{
88
89
  show: {
@@ -26,4 +26,5 @@ export declare function useCenter(canvas: Ref<fabric.Canvas>, propItems: IPropIt
26
26
  }) => void;
27
27
  setPopup: (point: any) => void;
28
28
  getEqualXTypes: (pointX: number) => IPointType[];
29
+ isAddPoint: (x: number) => boolean;
29
30
  };
@@ -33,7 +33,8 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
33
33
  itemList,
34
34
  event,
35
35
  vitalSignsOriginY,
36
- painOriginY
36
+ painOriginY,
37
+ hospitalizationDate
37
38
  } = propItems;
38
39
  const pointTipProps = reactive({
39
40
  show: false,
@@ -170,7 +171,7 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
170
171
  }
171
172
  }
172
173
  });
173
- if (pointMenuProps.list.length === 1) {
174
+ if (!isAddPoint(x) || pointMenuProps.list.length === 1) {
174
175
  pointMenuProps.show = false;
175
176
  console.log("\u5F53\u524D\u65F6\u95F4\u6BB5\u5185\u65E0\u53EF\u65B0\u589E\u8282\u70B9");
176
177
  }
@@ -530,6 +531,16 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
530
531
  return [x, y < objOriginY.originY ? objOriginY.originY : y > objOriginY.endY ? objOriginY.endY : y];
531
532
  }
532
533
  }
534
+ function isAddPoint(x) {
535
+ const d = new Date();
536
+ const month = `00${d.getMonth() + 1}`.slice(-2);
537
+ const day = `00${d.getDate()}`.slice(-2);
538
+ const todayTime = new Date(`${d.getFullYear()}-${month}-${day} 23:59:59`).getTime();
539
+ const pointTime = new Date(`${getXValue(x)}:00`).getTime();
540
+ if (pointTime < new Date(hospitalizationDate).getTime() || pointTime > todayTime)
541
+ return false;
542
+ return true;
543
+ }
533
544
  function clickMenu({ item, target }) {
534
545
  if (!target) {
535
546
  emits("add", {
@@ -560,7 +571,8 @@ function useCenter(canvas, propItems, emits, cumputedX, cumputedY, getXValue, ge
560
571
  pointMenuProps,
561
572
  clickMenu,
562
573
  setPopup,
563
- getEqualXTypes
574
+ getEqualXTypes,
575
+ isAddPoint
564
576
  };
565
577
  }
566
578
 
@@ -1,6 +1,6 @@
1
1
  import { Ref } from 'vue';
2
2
  import { fabric } from '../utils';
3
3
  import { IPropItems } from '../interface';
4
- export declare function useLeft(canvas: Ref<fabric.Canvas>, propItems: IPropItems, emits: any, setPopup: Function, pointTipProps: any, getXValue: Function, getYValue: Function, getEqualXTypes: Function): {
4
+ export declare function useLeft(canvas: Ref<fabric.Canvas>, propItems: IPropItems, emits: any, setPopup: Function, pointTipProps: any, getXValue: Function, getYValue: Function, getEqualXTypes: Function, isAddPoint: Function): {
5
5
  drawScaleValue: (yScaleValueList: any[]) => void;
6
6
  };
@@ -2,7 +2,7 @@ import { onMounted, nextTick } from 'vue';
2
2
  import { fabric } from '../utils/index.js';
3
3
  import { defaultBorderStyle, defaultTextStyle, defaultStyle, defaultRectStyle, drawPoint, drawTextGroup } from './useDraw2.js';
4
4
 
5
- function useLeft(canvas, propItems, emits, setPopup, pointTipProps, getXValue, getYValue, getEqualXTypes) {
5
+ function useLeft(canvas, propItems, emits, setPopup, pointTipProps, getXValue, getYValue, getEqualXTypes, isAddPoint) {
6
6
  const {
7
7
  originY,
8
8
  endY,
@@ -19,7 +19,8 @@ function useLeft(canvas, propItems, emits, setPopup, pointTipProps, getXValue, g
19
19
  right,
20
20
  canvasWidth,
21
21
  canvasHeight,
22
- getRightInfo
22
+ getRightInfo,
23
+ hospitalizationDate
23
24
  } = propItems;
24
25
  const mainScaleWidth = 9;
25
26
  const subScaleWidth = 5;
@@ -233,7 +234,7 @@ function useLeft(canvas, propItems, emits, setPopup, pointTipProps, getXValue, g
233
234
  });
234
235
  }
235
236
  function isLimit(point) {
236
- return point.left >= originX && point.left <= endX && point.top >= originY && point.top <= endY;
237
+ return point.left >= originX && point.left < endX && point.top >= originY && point.top <= endY;
237
238
  }
238
239
  function moveLimit(point) {
239
240
  if (point.left >= originX && point.left <= endX) {
@@ -249,6 +250,7 @@ function useLeft(canvas, propItems, emits, setPopup, pointTipProps, getXValue, g
249
250
  }
250
251
  function setPointEvent(point) {
251
252
  point.on("moving", () => {
253
+ point.set("originX", "center");
252
254
  moveLimit(point);
253
255
  if (isLimit(point)) {
254
256
  setPopup(point);
@@ -260,7 +262,7 @@ function useLeft(canvas, propItems, emits, setPopup, pointTipProps, getXValue, g
260
262
  pointTipProps.show = false;
261
263
  if (event.e.button === 0) {
262
264
  if (isLimit(point)) {
263
- if (!getEqualXTypes(point.left).includes(point.origin.type)) {
265
+ if (!getEqualXTypes(point.left).includes(point.origin.type) && isAddPoint(point.left)) {
264
266
  emits("add", {
265
267
  data: {
266
268
  time: getXValue(point.left),
@@ -279,7 +281,7 @@ function useLeft(canvas, propItems, emits, setPopup, pointTipProps, getXValue, g
279
281
  }
280
282
  function setRestore() {
281
283
  point.setCoords();
282
- point.set({ left: point.originLeft, top: point.originTop });
284
+ point.set({ originX: "right", left: point.originLeft, top: point.originTop });
283
285
  }
284
286
  });
285
287
  }
@@ -34,6 +34,7 @@ export interface IPropItems {
34
34
  xScalevalueHeight: number;
35
35
  topList: IDate[];
36
36
  breathingHeight: number;
37
+ hospitalizationDate: string;
37
38
  grid: IGrid;
38
39
  top: ITop;
39
40
  left: ILeft;
@@ -106,6 +107,7 @@ export interface IData {
106
107
  height: number;
107
108
  borderStyle?: fabric.ILineOptions;
108
109
  selectionStyle?: any;
110
+ hospitalizationDate: string;
109
111
  grid: IGrid;
110
112
  other?: IOther;
111
113
  top: ITop;