cnhis-design-vue 3.2.15-release.5 → 3.2.16-beta.13

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 (80) hide show
  1. package/es/components/ai-chat/src/components/ChatCard.js +1 -1
  2. package/es/components/branch-notice/src/canstants.js +1 -1
  3. package/es/components/button-print/index.d.ts +6 -13
  4. package/es/components/button-print/src/ButtonPrint.vue.d.ts +6 -13
  5. package/es/components/button-print/src/components/NewPrintComponent.vue.d.ts +6 -13
  6. package/es/components/button-print/src/components/NewPrintComponent.vue2.js +1 -1
  7. package/es/components/button-print/style/index.css +1 -1
  8. package/es/components/callback/src/components/render/popupMaps.d.ts +10 -0
  9. package/es/components/classification/src/components/table-modal/index.vue.d.ts +0 -3
  10. package/es/components/date-picker/src/DatePicker.vue2.js +1 -1
  11. package/es/components/expand-field/index.d.ts +26 -0
  12. package/es/components/expand-field/src/components/FormItemPerson.vue.d.ts +26 -0
  13. package/es/components/expand-field/src/components/PersonModal.vue.d.ts +26 -0
  14. package/es/components/expand-field/src/components/form.vue.d.ts +26 -0
  15. package/es/components/expand-field/src/index.vue.d.ts +26 -0
  16. package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
  17. package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -1
  18. package/es/components/fabric-chart/src/interface.d.ts +1 -0
  19. package/es/components/field-set/src/FieldColor.vue.d.ts +3 -3
  20. package/es/components/field-set/src/FieldFilter.vue.d.ts +3 -3
  21. package/es/components/field-set/src/FieldSet.vue.d.ts +4 -4
  22. package/es/components/field-set/src/components/table-row.vue.d.ts +3 -3
  23. package/es/components/form-config/index.d.ts +30 -0
  24. package/es/components/form-config/src/FormConfig.vue.d.ts +30 -0
  25. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +10 -0
  26. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +10 -0
  27. package/es/components/form-config/src/components/FormConfigEventSetting.vue.d.ts +10 -0
  28. package/es/components/form-render/index.d.ts +10 -0
  29. package/es/components/form-render/src/FormRender.vue.d.ts +10 -0
  30. package/es/components/form-render/src/FormRender.vue2.js +1 -1
  31. package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +10 -0
  32. package/es/components/form-render/src/components/renderer/input.d.ts +9 -1
  33. package/es/components/form-render/src/components/renderer/input.js +1 -1
  34. package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
  35. package/es/components/iho-chat/index.d.ts +181 -23
  36. package/es/components/iho-chat/src/Index.vue.d.ts +181 -23
  37. package/es/components/iho-chat/src/components/ChatAdd.vue2.js +1 -1
  38. package/es/components/iho-chat/src/components/ChatFile.vue2.js +1 -1
  39. package/es/components/iho-chat/src/components/ChatFooter.vue2.js +1 -1
  40. package/es/components/iho-chat/src/components/ChatHeader.vue.d.ts +24 -12
  41. package/es/components/iho-chat/src/components/ChatMain.vue.d.ts +150 -7
  42. package/es/components/iho-chat/src/components/ChatMain.vue2.js +1 -1
  43. package/es/components/iho-chat/src/components/ChatSet.vue.d.ts +12 -6
  44. package/es/components/iho-chat/src/components/MessageEvent.vue.d.ts +137 -0
  45. package/es/components/iho-chat/src/components/MessageEvent.vue.js +1 -0
  46. package/es/components/iho-chat/src/components/MessageEvent.vue2.js +1 -0
  47. package/es/components/iho-chat/src/components/MultipleVideo.vue.d.ts +6 -3
  48. package/es/components/iho-chat/src/components/MultipleVideo.vue2.js +1 -1
  49. package/es/components/iho-chat/src/components/PersonProfile.vue.d.ts +13 -6
  50. package/es/components/iho-chat/src/components/PersonProfile.vue2.js +1 -1
  51. package/es/components/iho-chat/src/components/Video.vue.d.ts +1 -1
  52. package/es/components/iho-chat/src/components/Video.vue2.js +1 -1
  53. package/es/components/iho-chat/src/constants/index.d.ts +2 -1
  54. package/es/components/iho-chat/src/constants/index.js +1 -1
  55. package/es/components/iho-chat/src/hooks/useVideo.d.ts +2 -2
  56. package/es/components/iho-chat/src/hooks/useVideo.js +1 -1
  57. package/es/components/iho-chat/src/utils/asyncQueue.d.ts +10 -0
  58. package/es/components/iho-chat/src/utils/asyncQueue.js +1 -0
  59. package/es/components/iho-table/src/plugins/filterRenderPlugin/index.js +1 -1
  60. package/es/components/iho-table/src/plugins/filterTextPlugin/filter.vue.d.ts +1 -0
  61. package/es/components/iho-table/src/plugins/filterTextPlugin/filter.vue2.js +1 -1
  62. package/es/components/iho-table/src/types/index.d.ts +17 -0
  63. package/es/components/iho-table/src/utils/index.js +1 -1
  64. package/es/components/index.css +1 -1
  65. package/es/components/info-header/index.d.ts +20 -0
  66. package/es/components/info-header/src/InfoHeader.vue.d.ts +20 -0
  67. package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +10 -0
  68. package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +10 -0
  69. package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
  70. package/es/components/select-person/index.d.ts +26 -0
  71. package/es/components/select-person/src/SelectPerson.vue.d.ts +14 -0
  72. package/es/components/select-person/src/SelectPerson.vue2.js +1 -1
  73. package/es/components/select-person/src/index.vue.d.ts +26 -0
  74. package/es/components/select-person/src/index.vue2.js +1 -1
  75. package/es/components/shortcut-setter/index.d.ts +10 -0
  76. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +10 -0
  77. package/es/env.d.ts +25 -25
  78. package/es/shared/hooks/useDateTime.js +1 -1
  79. package/es/shared/package.json.js +1 -1
  80. package/package.json +2 -2
@@ -195,6 +195,9 @@ declare const _default: import("vue").DefineComponent<{
195
195
  forceShowSelectAll: {
196
196
  type: BooleanConstructor;
197
197
  };
198
+ uncheckableField: {
199
+ type: StringConstructor;
200
+ };
198
201
  }, {
199
202
  $attrs: {
200
203
  [x: string]: unknown;
@@ -300,6 +303,9 @@ declare const _default: import("vue").DefineComponent<{
300
303
  forceShowSelectAll: {
301
304
  type: BooleanConstructor;
302
305
  };
306
+ uncheckableField: {
307
+ type: StringConstructor;
308
+ };
303
309
  }>> & {
304
310
  onCheck?: ((...args: any[]) => any) | undefined;
305
311
  onCheckWithLevel?: ((...args: any[]) => any) | undefined;
@@ -751,6 +757,9 @@ declare const _default: import("vue").DefineComponent<{
751
757
  forceShowSelectAll: {
752
758
  type: BooleanConstructor;
753
759
  };
760
+ uncheckableField: {
761
+ type: StringConstructor;
762
+ };
754
763
  }, {
755
764
  searchFilterBase: {
756
765
  isOpen: boolean;
@@ -852,6 +861,9 @@ declare const _default: import("vue").DefineComponent<{
852
861
  forceShowSelectAll: {
853
862
  type: BooleanConstructor;
854
863
  };
864
+ uncheckableField: {
865
+ type: StringConstructor;
866
+ };
855
867
  }>> & {}>>;
856
868
  emit: any;
857
869
  keyword: import("vue").Ref<string>;
@@ -890,6 +902,9 @@ declare const _default: import("vue").DefineComponent<{
890
902
  itemHeight: number;
891
903
  }>;
892
904
  wordbookChildExpandkeys: import("vue").ComputedRef<string[]>;
905
+ styleObject: import("vue").ComputedRef<{
906
+ height: string;
907
+ }>;
893
908
  caculateTagData: import("vue").ComputedRef<any>;
894
909
  treeDataMiddle: any;
895
910
  checkedKeysMiddle: any;
@@ -908,6 +923,7 @@ declare const _default: import("vue").DefineComponent<{
908
923
  setAllCheckedKeys: (tree: import("naive-ui").TreeOption, cb?: any) => void;
909
924
  setAllCheckedKeysWithChild: (item: import("naive-ui").TreeOption, cb?: any) => void;
910
925
  setAllCheckedKeysWithParent: (item: import("naive-ui").TreeOption, cb?: any) => void;
926
+ setAllCheckedKeysWithAll: (item: import("naive-ui").TreeOption, cb?: any) => void;
911
927
  queryLoadChildNode: (node: import("naive-ui").TreeOption) => Promise<import("../../../../shared/types").AnyObject>;
912
928
  setDisabled: (data: import("naive-ui").TreeOption) => void;
913
929
  renderLabel: ({ option }: {
@@ -922,6 +938,7 @@ declare const _default: import("vue").DefineComponent<{
922
938
  setTreeCheckd: (tree: import("naive-ui").TreeOption[], checked: boolean) => void;
923
939
  setCheckdWithChild: (tree: import("naive-ui").TreeOption[], checked: boolean) => void;
924
940
  setCheckdWithParent: (tree: import("naive-ui").TreeOption[], checked: boolean) => void;
941
+ setCheckdWithAll: (tree: import("naive-ui").TreeOption[], checked: boolean) => void;
925
942
  checkedAllChange: (checked: boolean) => void;
926
943
  uniq: (arr: {
927
944
  [key: string]: any;
@@ -1270,6 +1287,9 @@ declare const _default: import("vue").DefineComponent<{
1270
1287
  forceShowSelectAll: {
1271
1288
  type: BooleanConstructor;
1272
1289
  };
1290
+ uncheckableField: {
1291
+ type: StringConstructor;
1292
+ };
1273
1293
  }>>, {
1274
1294
  data: (import("naive-ui/es/tree/src/interface").TreeOptionBase & Record<string, unknown> & import("../../../../shared/types").AnyObject)[];
1275
1295
  defaultList: ((string | number) | {
@@ -1404,6 +1424,9 @@ declare const _default: import("vue").DefineComponent<{
1404
1424
  forceShowSelectAll: {
1405
1425
  type: BooleanConstructor;
1406
1426
  };
1427
+ uncheckableField: {
1428
+ type: StringConstructor;
1429
+ };
1407
1430
  }>> & {
1408
1431
  onCheck?: ((...args: any[]) => any) | undefined;
1409
1432
  onCheckWithLevel?: ((...args: any[]) => any) | undefined;
@@ -1513,6 +1536,9 @@ declare const _default: import("vue").DefineComponent<{
1513
1536
  forceShowSelectAll: {
1514
1537
  type: BooleanConstructor;
1515
1538
  };
1539
+ uncheckableField: {
1540
+ type: StringConstructor;
1541
+ };
1516
1542
  }>> & {
1517
1543
  onCheck?: ((...args: any[]) => any) | undefined;
1518
1544
  onCheckWithLevel?: ((...args: any[]) => any) | undefined;
@@ -154,6 +154,9 @@ declare const _default: import("vue").DefineComponent<{
154
154
  forceShowSelectAll: {
155
155
  type: BooleanConstructor;
156
156
  };
157
+ uncheckableField: {
158
+ type: StringConstructor;
159
+ };
157
160
  }, {
158
161
  $attrs: {
159
162
  [x: string]: unknown;
@@ -259,6 +262,9 @@ declare const _default: import("vue").DefineComponent<{
259
262
  forceShowSelectAll: {
260
263
  type: BooleanConstructor;
261
264
  };
265
+ uncheckableField: {
266
+ type: StringConstructor;
267
+ };
262
268
  }>> & {
263
269
  onCheck?: ((...args: any[]) => any) | undefined;
264
270
  onCheckWithLevel?: ((...args: any[]) => any) | undefined;
@@ -710,6 +716,9 @@ declare const _default: import("vue").DefineComponent<{
710
716
  forceShowSelectAll: {
711
717
  type: BooleanConstructor;
712
718
  };
719
+ uncheckableField: {
720
+ type: StringConstructor;
721
+ };
713
722
  }, {
714
723
  searchFilterBase: {
715
724
  isOpen: boolean;
@@ -811,6 +820,9 @@ declare const _default: import("vue").DefineComponent<{
811
820
  forceShowSelectAll: {
812
821
  type: BooleanConstructor;
813
822
  };
823
+ uncheckableField: {
824
+ type: StringConstructor;
825
+ };
814
826
  }>> & {}>>;
815
827
  emit: any;
816
828
  keyword: import("vue").Ref<string>;
@@ -849,6 +861,9 @@ declare const _default: import("vue").DefineComponent<{
849
861
  itemHeight: number;
850
862
  }>;
851
863
  wordbookChildExpandkeys: import("vue").ComputedRef<string[]>;
864
+ styleObject: import("vue").ComputedRef<{
865
+ height: string;
866
+ }>;
852
867
  caculateTagData: import("vue").ComputedRef<any>;
853
868
  treeDataMiddle: any;
854
869
  checkedKeysMiddle: any;
@@ -867,6 +882,7 @@ declare const _default: import("vue").DefineComponent<{
867
882
  setAllCheckedKeys: (tree: import("naive-ui").TreeOption, cb?: any) => void;
868
883
  setAllCheckedKeysWithChild: (item: import("naive-ui").TreeOption, cb?: any) => void;
869
884
  setAllCheckedKeysWithParent: (item: import("naive-ui").TreeOption, cb?: any) => void;
885
+ setAllCheckedKeysWithAll: (item: import("naive-ui").TreeOption, cb?: any) => void;
870
886
  queryLoadChildNode: (node: import("naive-ui").TreeOption) => Promise<AnyObject>;
871
887
  setDisabled: (data: import("naive-ui").TreeOption) => void;
872
888
  renderLabel: ({ option }: {
@@ -881,6 +897,7 @@ declare const _default: import("vue").DefineComponent<{
881
897
  setTreeCheckd: (tree: import("naive-ui").TreeOption[], checked: boolean) => void;
882
898
  setCheckdWithChild: (tree: import("naive-ui").TreeOption[], checked: boolean) => void;
883
899
  setCheckdWithParent: (tree: import("naive-ui").TreeOption[], checked: boolean) => void;
900
+ setCheckdWithAll: (tree: import("naive-ui").TreeOption[], checked: boolean) => void;
884
901
  checkedAllChange: (checked: boolean) => void;
885
902
  uniq: (arr: {
886
903
  [key: string]: any;
@@ -1229,6 +1246,9 @@ declare const _default: import("vue").DefineComponent<{
1229
1246
  forceShowSelectAll: {
1230
1247
  type: BooleanConstructor;
1231
1248
  };
1249
+ uncheckableField: {
1250
+ type: StringConstructor;
1251
+ };
1232
1252
  }>>, {
1233
1253
  data: (import("naive-ui/es/tree/src/interface").TreeOptionBase & Record<string, unknown> & AnyObject)[];
1234
1254
  defaultList: ((string | number) | {
@@ -1363,6 +1383,9 @@ declare const _default: import("vue").DefineComponent<{
1363
1383
  forceShowSelectAll: {
1364
1384
  type: BooleanConstructor;
1365
1385
  };
1386
+ uncheckableField: {
1387
+ type: StringConstructor;
1388
+ };
1366
1389
  }>> & {
1367
1390
  onCheck?: ((...args: any[]) => any) | undefined;
1368
1391
  onCheckWithLevel?: ((...args: any[]) => any) | undefined;
@@ -1472,6 +1495,9 @@ declare const _default: import("vue").DefineComponent<{
1472
1495
  forceShowSelectAll: {
1473
1496
  type: BooleanConstructor;
1474
1497
  };
1498
+ uncheckableField: {
1499
+ type: StringConstructor;
1500
+ };
1475
1501
  }>> & {
1476
1502
  onCheck?: ((...args: any[]) => any) | undefined;
1477
1503
  onCheckWithLevel?: ((...args: any[]) => any) | undefined;
@@ -465,6 +465,9 @@ declare const _default: import("vue").DefineComponent<{
465
465
  forceShowSelectAll: {
466
466
  type: BooleanConstructor;
467
467
  };
468
+ uncheckableField: {
469
+ type: StringConstructor;
470
+ };
468
471
  }, {
469
472
  $attrs: {
470
473
  [x: string]: unknown;
@@ -570,6 +573,9 @@ declare const _default: import("vue").DefineComponent<{
570
573
  forceShowSelectAll: {
571
574
  type: BooleanConstructor;
572
575
  };
576
+ uncheckableField: {
577
+ type: StringConstructor;
578
+ };
573
579
  }>> & {
574
580
  onCheck?: ((...args: any[]) => any) | undefined;
575
581
  onCheckWithLevel?: ((...args: any[]) => any) | undefined;
@@ -1021,6 +1027,9 @@ declare const _default: import("vue").DefineComponent<{
1021
1027
  forceShowSelectAll: {
1022
1028
  type: BooleanConstructor;
1023
1029
  };
1030
+ uncheckableField: {
1031
+ type: StringConstructor;
1032
+ };
1024
1033
  }, {
1025
1034
  searchFilterBase: {
1026
1035
  isOpen: boolean;
@@ -1122,6 +1131,9 @@ declare const _default: import("vue").DefineComponent<{
1122
1131
  forceShowSelectAll: {
1123
1132
  type: BooleanConstructor;
1124
1133
  };
1134
+ uncheckableField: {
1135
+ type: StringConstructor;
1136
+ };
1125
1137
  }>> & {}>>;
1126
1138
  emit: any;
1127
1139
  keyword: import("vue").Ref<string>;
@@ -1160,6 +1172,9 @@ declare const _default: import("vue").DefineComponent<{
1160
1172
  itemHeight: number;
1161
1173
  }>;
1162
1174
  wordbookChildExpandkeys: import("vue").ComputedRef<string[]>;
1175
+ styleObject: import("vue").ComputedRef<{
1176
+ height: string;
1177
+ }>;
1163
1178
  caculateTagData: import("vue").ComputedRef<any>;
1164
1179
  treeDataMiddle: any;
1165
1180
  checkedKeysMiddle: any;
@@ -1178,6 +1193,7 @@ declare const _default: import("vue").DefineComponent<{
1178
1193
  setAllCheckedKeys: (tree: import("naive-ui").TreeOption, cb?: any) => void;
1179
1194
  setAllCheckedKeysWithChild: (item: import("naive-ui").TreeOption, cb?: any) => void;
1180
1195
  setAllCheckedKeysWithParent: (item: import("naive-ui").TreeOption, cb?: any) => void;
1196
+ setAllCheckedKeysWithAll: (item: import("naive-ui").TreeOption, cb?: any) => void;
1181
1197
  queryLoadChildNode: (node: import("naive-ui").TreeOption) => Promise<AnyObject>;
1182
1198
  setDisabled: (data: import("naive-ui").TreeOption) => void;
1183
1199
  renderLabel: ({ option }: {
@@ -1192,6 +1208,7 @@ declare const _default: import("vue").DefineComponent<{
1192
1208
  setTreeCheckd: (tree: import("naive-ui").TreeOption[], checked: boolean) => void;
1193
1209
  setCheckdWithChild: (tree: import("naive-ui").TreeOption[], checked: boolean) => void;
1194
1210
  setCheckdWithParent: (tree: import("naive-ui").TreeOption[], checked: boolean) => void;
1211
+ setCheckdWithAll: (tree: import("naive-ui").TreeOption[], checked: boolean) => void;
1195
1212
  checkedAllChange: (checked: boolean) => void;
1196
1213
  uniq: (arr: {
1197
1214
  [key: string]: any;
@@ -1540,6 +1557,9 @@ declare const _default: import("vue").DefineComponent<{
1540
1557
  forceShowSelectAll: {
1541
1558
  type: BooleanConstructor;
1542
1559
  };
1560
+ uncheckableField: {
1561
+ type: StringConstructor;
1562
+ };
1543
1563
  }>>, {
1544
1564
  data: (import("naive-ui/es/tree/src/interface").TreeOptionBase & Record<string, unknown> & AnyObject)[];
1545
1565
  defaultList: ((string | number) | {
@@ -1674,6 +1694,9 @@ declare const _default: import("vue").DefineComponent<{
1674
1694
  forceShowSelectAll: {
1675
1695
  type: BooleanConstructor;
1676
1696
  };
1697
+ uncheckableField: {
1698
+ type: StringConstructor;
1699
+ };
1677
1700
  }>> & {
1678
1701
  onCheck?: ((...args: any[]) => any) | undefined;
1679
1702
  onCheckWithLevel?: ((...args: any[]) => any) | undefined;
@@ -1783,6 +1806,9 @@ declare const _default: import("vue").DefineComponent<{
1783
1806
  forceShowSelectAll: {
1784
1807
  type: BooleanConstructor;
1785
1808
  };
1809
+ uncheckableField: {
1810
+ type: StringConstructor;
1811
+ };
1786
1812
  }>> & {
1787
1813
  onCheck?: ((...args: any[]) => any) | undefined;
1788
1814
  onCheckWithLevel?: ((...args: any[]) => any) | undefined;
@@ -523,6 +523,9 @@ declare const _default: import("vue").DefineComponent<{
523
523
  forceShowSelectAll: {
524
524
  type: BooleanConstructor;
525
525
  };
526
+ uncheckableField: {
527
+ type: StringConstructor;
528
+ };
526
529
  }, {
527
530
  $attrs: {
528
531
  [x: string]: unknown;
@@ -628,6 +631,9 @@ declare const _default: import("vue").DefineComponent<{
628
631
  forceShowSelectAll: {
629
632
  type: BooleanConstructor;
630
633
  };
634
+ uncheckableField: {
635
+ type: StringConstructor;
636
+ };
631
637
  }>> & {
632
638
  onCheck?: ((...args: any[]) => any) | undefined;
633
639
  onCheckWithLevel?: ((...args: any[]) => any) | undefined;
@@ -1079,6 +1085,9 @@ declare const _default: import("vue").DefineComponent<{
1079
1085
  forceShowSelectAll: {
1080
1086
  type: BooleanConstructor;
1081
1087
  };
1088
+ uncheckableField: {
1089
+ type: StringConstructor;
1090
+ };
1082
1091
  }, {
1083
1092
  searchFilterBase: {
1084
1093
  isOpen: boolean;
@@ -1180,6 +1189,9 @@ declare const _default: import("vue").DefineComponent<{
1180
1189
  forceShowSelectAll: {
1181
1190
  type: BooleanConstructor;
1182
1191
  };
1192
+ uncheckableField: {
1193
+ type: StringConstructor;
1194
+ };
1183
1195
  }>> & {}>>;
1184
1196
  emit: any;
1185
1197
  keyword: import("vue").Ref<string>;
@@ -1218,6 +1230,9 @@ declare const _default: import("vue").DefineComponent<{
1218
1230
  itemHeight: number;
1219
1231
  }>;
1220
1232
  wordbookChildExpandkeys: import("vue").ComputedRef<string[]>;
1233
+ styleObject: import("vue").ComputedRef<{
1234
+ height: string;
1235
+ }>;
1221
1236
  caculateTagData: import("vue").ComputedRef<any>;
1222
1237
  treeDataMiddle: any;
1223
1238
  checkedKeysMiddle: any;
@@ -1236,6 +1251,7 @@ declare const _default: import("vue").DefineComponent<{
1236
1251
  setAllCheckedKeys: (tree: import("naive-ui").TreeOption, cb?: any) => void;
1237
1252
  setAllCheckedKeysWithChild: (item: import("naive-ui").TreeOption, cb?: any) => void;
1238
1253
  setAllCheckedKeysWithParent: (item: import("naive-ui").TreeOption, cb?: any) => void;
1254
+ setAllCheckedKeysWithAll: (item: import("naive-ui").TreeOption, cb?: any) => void;
1239
1255
  queryLoadChildNode: (node: import("naive-ui").TreeOption) => Promise<AnyObject>;
1240
1256
  setDisabled: (data: import("naive-ui").TreeOption) => void;
1241
1257
  renderLabel: ({ option }: {
@@ -1250,6 +1266,7 @@ declare const _default: import("vue").DefineComponent<{
1250
1266
  setTreeCheckd: (tree: import("naive-ui").TreeOption[], checked: boolean) => void;
1251
1267
  setCheckdWithChild: (tree: import("naive-ui").TreeOption[], checked: boolean) => void;
1252
1268
  setCheckdWithParent: (tree: import("naive-ui").TreeOption[], checked: boolean) => void;
1269
+ setCheckdWithAll: (tree: import("naive-ui").TreeOption[], checked: boolean) => void;
1253
1270
  checkedAllChange: (checked: boolean) => void;
1254
1271
  uniq: (arr: {
1255
1272
  [key: string]: any;
@@ -1598,6 +1615,9 @@ declare const _default: import("vue").DefineComponent<{
1598
1615
  forceShowSelectAll: {
1599
1616
  type: BooleanConstructor;
1600
1617
  };
1618
+ uncheckableField: {
1619
+ type: StringConstructor;
1620
+ };
1601
1621
  }>>, {
1602
1622
  data: (import("naive-ui/es/tree/src/interface").TreeOptionBase & Record<string, unknown> & AnyObject)[];
1603
1623
  defaultList: ((string | number) | {
@@ -1732,6 +1752,9 @@ declare const _default: import("vue").DefineComponent<{
1732
1752
  forceShowSelectAll: {
1733
1753
  type: BooleanConstructor;
1734
1754
  };
1755
+ uncheckableField: {
1756
+ type: StringConstructor;
1757
+ };
1735
1758
  }>> & {
1736
1759
  onCheck?: ((...args: any[]) => any) | undefined;
1737
1760
  onCheckWithLevel?: ((...args: any[]) => any) | undefined;
@@ -1841,6 +1864,9 @@ declare const _default: import("vue").DefineComponent<{
1841
1864
  forceShowSelectAll: {
1842
1865
  type: BooleanConstructor;
1843
1866
  };
1867
+ uncheckableField: {
1868
+ type: StringConstructor;
1869
+ };
1844
1870
  }>> & {
1845
1871
  onCheck?: ((...args: any[]) => any) | undefined;
1846
1872
  onCheckWithLevel?: ((...args: any[]) => any) | undefined;
@@ -1 +1 @@
1
- import{fabric as e}from"../../../../../shared/utils/fabricjs/index.js";import{drawLine as t,defaultStyle as i,drawPoint as n,drawText as o,drawArrow as l}from"../useDraw.js";import{useGrid as r}from"../useGrid.js";import{format as s}from"date-fns";import{getType as a,getTime as u,isOneLine as d,isOverlapPoint as c,getFloorNumber as p,isValidValue as f,setOtherType as h,isEffectiveNode as v,deleteProperty as g,getIndex as y}from"../../utils/index.js";import{cloneDeep as m,omit as w,flatten as x,last as b}from"lodash-es";import"../useEvent.js";import{useShadow as j}from"../useShadow.js";import{useCommon as L}from"../useCommon.js";import"vue";import"naive-ui";import"../surgicalAnesthesia/useTop.js";import"@vueuse/core";import{TEMPERATURE_MENU as k,PAIN_MENU as S,OVERLAP as Y}from"../../constants/index.js";import"../surgicalAnesthesia/useOther.js";import"../../../../../shared/utils/index.js";import{promiseTimeout as E}from"@vueuse/shared";function M(M,C,$,T,V,A,P,R,I,X){r(M,C);const{getEqualXTypes:B,handleAddPrevent:D,getPointEventProps:H}=L(M,$,C),{createShadowLines:W}=j(),{left:z,xScaleList:F,xCellWidth:_,yCellHeight:K,originX:q,endX:G,originY:N,endY:J,itemList:Q,event:U,vitalSignsOriginY:Z,painOriginY:ee,hospitalizationDate:te,config:ie,canvasHeight:ne,painSurplusCell:oe,iconsWidth:le,canvasWidth:re,borderStyle:se}=C,ae=new Set,ue=["xinmai","mai"],de=new Map,ce=new Set,pe=new Set,fe=new Set,he=m(z.yScaleValue),ve=new Set;function ge(n){var o;const l=he.find((e=>e.show&&"pulse"===e.type));if(l&&(null==(o=l.dataList)?void 0:o.length)&&(ae.size&&M.value.remove(...ae),ae.clear(),de.size>1)){if(n){const{type:e,key:t}=n.origin||{};if("pulse"===e){const e=de.get(t),i=null==e?void 0:e.findIndex((e=>e[0]===n.left));e.splice(i,1,[n.left,n.top])}}const o=function(){const e=[],t=[],i=[];for(const e of de)t.push(e[1]),e[0]===ue[0]&&e[1].forEach((e=>{(de.get(ue[1])||[]).findIndex((t=>t[0]===e[0]))>-1&&i.push(e[0])}));const[n,o]=t;let l=[],r=[];return i.forEach((t=>{const i=n.findIndex((e=>e[0]===t)),s=o.findIndex((e=>e[0]===t)),a=n[i],u=o[s],d=n[i-1],c=n[i+1],p=o[s-1],f=o[s+1];if(d&&p){if(d[0]!==p[0]){const e=Math.max(d[0],p[0]);l.push([d,p].find((t=>t[0]===e)))}}else d?l.push(d):p&&r.push(p);const h=Math.min(a[1],u[1]);l.push([a,u].find((e=>e[1]===h)));const v=Math.max(a[1],u[1]);r.push([a,u].find((e=>e[1]===v)));const g=()=>{const t=[...l,...r.reverse()],[i]=t,n=b(t);i[0]===n[0]&&i[1]===n[1]&&t.splice(-1,1),e.push(t),l=[],r=[]};if(c&&f){if(c[0]!==f[0]){const e=Math.min(c[0],f[0]);l.push([c,f].find((t=>t[0]===e))),g()}}else c?(l.push(c),g()):f?(r.push(f),g()):g()})),e}();o.length>0&&function(e){E(0).then((()=>{e.forEach((e=>{const t=[],i=[];Array.from(fe).forEach((n=>{var o,l;"pulse"===(null==(o=null==n?void 0:n.origin)?void 0:o.type)&&e.find((e=>Math.abs(n.left-e[0])<=1&&Math.abs(n.top-e[1])<=1))&&((null==(l=null==n?void 0:n.origin)?void 0:l.key)===ue[0]?t.push(n):i.push(n))})),[t,i].forEach((e=>{1!==(null==e?void 0:e.length)&&e.sort(((e,t)=>e.left-t.left)).forEach(((e,t)=>{0==t?e.rightLine&&M.value.remove(e.rightLine):e.leftLine&&M.value.remove(e.leftLine)}))}))}))}))}(o);const{mode:r,style:s={}}=l.shadow||{};o.forEach((n=>{const o=n.map((e=>({x:e[0],y:e[1]}))),l=new e.Polygon(o,{...i,...s,strokeWidth:1});if(["slash","line"].includes(r)){l.set({fill:"transparent",stroke:s.stroke||"#f00"});const e=[];if(["slash"].includes(r))e.push(...W(n,s._angle,s.space,w(s,["_angle","space"]))),e.forEach((e=>{ae.add(e)}));else{const i=function(e){const t=e.reduce(((e,t)=>{const i=Math.trunc(t[0]);return e[i]=e[i]?e[i].concat([t]):[t],e}),{}),i=Object.values(t).filter((e=>2===e.length&&Math.trunc(e[0][1])!==Math.trunc(e[1][1])));return i}(n);i.forEach((i=>{const n=t([...x(i)],{...s,originX:"center"});e.push(n),ae.add(n)}))}M.value.add(...e)}ae.add(l),M.value.add(l)}))}}function ye(e,r,s){var a;const{type:u,riseStyle:c={},noRiseStyle:v={},verifiedStyle:g={},reduceStyle:y={},pacemaker:w={},upArrowStyle:x={},limitValueStyle:b={},nonePainPointStyle:j={},belowMinValueStyle:L={},respiratorStyle:k={},dataList:S=[],list:Y=[]}=s,{type:E,textStyle:C}=j,A=[],R=[],X=[];let B=null;const D=e=>"breathe"==u&&e.respirator&&k.type&&k.fixedValue&&!e.value&&xe(e.time),W=d(s);if(null==(a=e.list)||a.forEach(((a,d)=>{var j,z,F,q;const G=W?S.find((e=>e.key===a.key)):e,N=be(D(a)?{...a,value:k.fixedValue}:a,s),J=e.list[d+1],Q=J?be(D(J)?{...J,value:k.fixedValue}:J,s):void 0,te=J?W?S.find((e=>e.key===J.key)):e:{},{title:le=""}=G;if(le===((null==(j=window.getLanguageByCode)?void 0:j.call(window,"10010.1.235"))||"脉搏")&&te.title!==((null==(z=window.getLanguageByCode)?void 0:z.call(window,"10010.1.235"))||"脉搏")||le!==((null==(F=window.getLanguageByCode)?void 0:F.call(window,"10010.1.235"))||"脉搏")&&te.title===((null==(q=window.getLanguageByCode)?void 0:q.call(window,"10010.1.235"))||"脉搏")||!N||!Q||p(N[0],1)!==p(Q[0],1))N&&B&&(N[0]=B),B=null;else{const e=N[0]-_/2;N[0]=e+_/4,Q[0]=B=N[0]+_/2}const re={};re.value=function(e,t,i){if(!(null==e?void 0:e.length)||!ie.showValue)return;const{lineAttr:n={}}=i,l=e[1]<=Z.originY+K?e[1]+K:e[1]-K,r=o([e[0],l],{value:D(t)?k.fixedValue:t.value,originX:"center",originY:"center",fill:n.stroke||"#000"});return X.push(r),{obj:r,top:-K}}(N,a,G),function(e,r,s,a){var d,p,h;if(!["temperature","pain","breathe"].includes(u))return;if(!(null==e?void 0:e.length)&&"temperature"===u&&!xe(r.time))return;if(!(null==e?void 0:e.length)&&"pain"===u)return;if(!r.value&&"breathe"===u)return;const{lineAttr:m={},key:w}=s,{value:x}=a,b=T(r.time);let j,L,S,Y,E,M;if(r.noRise&&v.show){const t=O(v,r)?V(u,35):(null==e?void 0:e[1])||0;if(v.text)S=o([b,O(v,r)?t:t+5],{value:v.text.split("").join("\n"),originY:"top",...v.style}),r.value||fe.add(S);else if(r.value){S=l([b,t,t+2*K],{...v.style})}S&&X.push(S),S&&O(v,r)&&ve.add(S)}if(null==e?void 0:e[1]){if(r.rise&&c.show&&c.text&&(Y=o([b,e[1]-(x?K:0)-5],{value:c.text.split("").join("\n"),originY:"bottom",...c.style}),X.push(Y)),r.verified){const t=(null==(d=null==g?void 0:g.position)?void 0:d[w])||"top";E=o(["top-right"===t?b+_/2:b,e[1]-(x?K:0)-5],{value:"v",originX:"center",originY:"bottom",...g}),X.push(E)}if(f(r.physicsReduce)||f(r.drugReduce)){const o=V(u,null!=(p=r.physicsReduce)?p:r.drugReduce),l=o<e[1]&&(null==ie?void 0:ie.hypothermyViewCustom)?b+_/2:b;j=t([...e,l,o],{...m,...y.line,...i}),L=n((null==(h=null==y?void 0:y.point)?void 0:h.type)||"circle",{left:l,top:o,...y.point,...i,originY:o===ne?"bottom":"center"}),j&&X.push(j),L&&X.push(L)}r.respirator&&(M=n(k.type,{left:b,top:e[1]-(x?K:0)-5,originX:"center",originY:"bottom",...k.style}),X.push(M))}Object.assign(a,{reduceLine:{obj:j,type:"line"},noRiseText:{obj:S,top:v.text?5:2*K,isFixed:O(v,r)},riseText:{obj:Y,top:(x?-K:0)-5},verifiedText:{obj:E,left:_/2,top:(x?-K:0)-5},reducePoint:{obj:L,type:"reduce"},respirator:{obj:M,top:(x?-K:0)-5}})}(N,a,G,re),function(e,t,i,n){if(!(null==e?void 0:e.length)||!["pulse"].includes(u))return;const r=Math.max(...Y),s=Math.min(...Y);let a,d,c;const{upArrowShow:p=!1,limitValueShow:f=!1}=i;if(p&&+t.value>180){let t=e[1]-2.5*K,i=[e[1]-K/2,t];t<Z.originY&&(t=e[1]+2.5*K,i=[t,e[1]+K/2]),a=l([e[0],i[0],i[1]],x,"up"),X.push(a)}if(f){const i={value:t.value,originX:"center",originY:"center",...b};if(+t.value>r){const t=a?e[1]+K/2+a.height:e[1]+K;d=o([e[0],t],i),X.push(d)}+t.value<s&&(d=o([e[0],e[1]-K],i),X.push(d))}if(L.show&&+t.value<s){const t=e[1];if(L.text)c=o([e[0],e[1]+5],{value:L.text.split("").join("\n"),originY:"top",...L.style});else{const i=t+2*K;c=l([e[0],t,i],{...L.style})}X.push(c)}Object.assign(n,{upArrow:{obj:a},limitValue:{obj:d,top:-K},belowMinValue:{obj:c,top:L.text?5:2*K,moveHide:!0}})}(N,a,G,re),function(i,o,l,a,d,c){let p,f;const{pointAttr:g={},lineAttr:y={},title:x="",key:b,type:j="circle",overlapKey:L}=d,S=g.height?g.height/2:5,Y=e.list[a+1];let O=m(i),B=m(o);const z=me(u,e.list[a].value),F=()=>"pulse"==u&&l.pacemakerShow?w.value:D(l)?k.type:z&&"number"===E?0:j,_=e=>e&&v.show&&v.fixed&&xe(e.time)&&e.noRise&&!e.value&&0!==e.value;if((()=>{if(l.breakpoint)return!1;if("temperature"===u&&(i||_(l))&&(o||_(Y))){const e=V(u,35);return i||(O=[T(l.time),e]),o||(B=[T(Y.time),e]),!0}return!!i&&!!o})()){O&&B&&z&&me(u,Y.value)&&!oe[1]&&"icon"===E&&(O[1]=O[1]-S,B[1]=B[1]-S),f=t([...O,...B],{...y});const{obj:e}=(null==c?void 0:c.reducePoint)||{};if(i&&o&&(null==e?void 0:e.top)<i[1]&&(null==ie?void 0:ie.hypothermyViewCustom)){const i=t([e.left,e.top,...o],{...y});X.unshift(i),Object.assign(c,{reduceRightLine:{obj:i,type:"reduce"}}),f.set("stroke","transparent")}}const K=F(),q=R[a-1],G={origin:{data:D(l)?{...l,value:k.fixedValue}:l,title:x,key:b||"",overlapKey:L,unit:s.unit,type:u,_type:h(x,u),dataIndex:r,index:a,isOneLine:W},leftLine:q,rightLine:f,otherObj:c,...l.pacemakerShow&&"pulse"==u?w.style:D(l)?k.style:g,...H(),lockMovementX:!0,...z?{selectable:!1,evented:!1,..."number"===E?C:{}}:{}};i&&(q?G.leftLine.set("x2",i[0]):G.leftLine=null,p=n(K,{left:i[0],top:z&&!oe[1]?i[1]-S:i[1],...G}));R.push(f),p&&(b===ue[1]?ce.add(p):D(l)||pe.add(p),function(e){U.hovered&&(e.on("mouseover",(()=>{we(e,"hover")})),e.on("mouseout",(()=>{I.show=!1})));if(e.lockMovementX&&e.lockMovementY)return;e.on("moving",(()=>{!function(e){e.setCoords();const t="pain"===e.origin.type?ee:Z;e.top<t.originY&&e.set("top",t.originY);e.top>t.endY&&e.set("top",t.endY)}(e),function(e){var t,i;null==(t=e.leftLine)||t.setCoords().set({x2:e.left,y2:e.top}),null==(i=e.rightLine)||i.setCoords().set({x1:e.left,y1:e.top}),Object.values(e.otherObj).forEach((t=>{const{obj:i,type:n="",top:o=0,isFixed:l,moveHide:r=!1,left:s=0}=t||{};"reduce"!==n&&i&&("line"===n?i.setCoords().set({x1:e.left,y1:e.top}):(l||i.setCoords().set({left:e.left+s,top:e.top+o}),r&&(M.value.remove(i),delete e.otherObj.obj)))})),ge(e)}(e),U.hovered&&we(e)})),e.on("mouseup",(t=>{if(I.show=!1,1===t.button){const{type:t}=e.origin,i=P(t,e.top),n={...e.origin,data:{...e.origin.data,value:i}};M.value.discardActiveObject(),$("change",n),Le(n,"change")}}))}(p),A.push(p),fe.add(p))}(N,Q,a,d,G,re)})),"pulse"===u){let t=null;const i=e=>e.map(((e,i,n)=>{var o,l;const r=n[i+1];if(r&&p(e.left,1)===p(r.left,1)){const i=e.left-_/2;e.set("left",i+_/4),null==(o=e.rightLine)||o.set("x1",e.left),t=e.left+_/2,r.set("left",t)}else t&&(null==(l=e.leftLine)||l.set("x2",t),e.set("left",t)),t=null;return[e.left,e.top]}));if(W){const e={};ue.forEach((t=>{e[t]=A.filter((e=>{var i;return(null==(i=e.origin)?void 0:i.key)===t})),de.set(t,i(e[t]))}))}else{const{key:t}=e;de.set(t,i(A))}}const z=R.filter((e=>e));M.value.add(...z,...A,...X)}function me(e,t){return"pain"===e&&0==t}function we(e,t="moving"){const{title:i,unit:n,type:o,data:l}=e.origin;I.point={x:e.left,y:e.top};let r=`时间 ${((null==l?void 0:l.time)||A(e.left)).slice(-5)}`;I.list=[function(){const{drugReduce:s,physicsReduce:a}=l||{},u="hover"===t?l.value:P(o,e.top);if(f(s))return r+=(null==l?void 0:l.changeTime)?"—>"+(null==l?void 0:l.changeTime.slice(-5)):"",`药物降${"pain"==o?"痛":"温"} ${u}—>${s}${n||""}`;if(f(a))return r+=(null==l?void 0:l.changeTime)?"—>"+(null==l?void 0:l.changeTime.slice(-5)):"",`物理降${"pain"==o?"痛":"温"} ${u}—>${a}${n||""}`;return`${i} ${u}${n||""}`}(),r],I.show=!0}function xe(e){const[t]=F,i=b(F),n=t.start,o=i.end,l=u(e);return l>=n&&l<=o}function be(e,t){const i="pain"===t.type?ee:Z;if(!v(e)||!xe(e.time))return;const n=T(e.time),o=V(t.type,e.value);return[n,o<i.originY?i.originY:o>i.endY?i.endY:o]}function je(e){const t=new Date,i=String(t.getMonth()+1).padStart(2,"0"),n=String(t.getDate()).padStart(2,"0"),o=u(`${t.getFullYear()}-${i}-${n} 23:59:59`),l=u(`${A(e)}:00`);return te&&l<u(te)?(D("exceedMin"),!1):!(l>o)||(D("exceedMax"),!1)}function Le(e,t="add"){const{type:i,dataIndex:n,index:o,data:l,key:r}=e,s=he.find((e=>e.type===i));if("add"===t){const e=d(s)?s.dataList.find((e=>e.enable)):s.dataList[n],t=y(l.time,e.list);e.list.splice(t,0,l)}else s.dataList[n].list[o]=l;ke()}function ke(){var e;fe.size&&(null==(e=M.value)||e.remove(...function(e){const t=[];return e.forEach((e=>{e&&t.push(e),(null==e?void 0:e.leftLine)&&t.push(null==e?void 0:e.leftLine),(null==e?void 0:e.rightLine)&&t.push(null==e?void 0:e.rightLine),Object.values((null==e?void 0:e.otherObj)||{}).forEach((e=>{(null==e?void 0:e.obj)&&t.push(null==e?void 0:e.obj)}))})),t}([...fe]))),fe.clear(),Se()}function Se(e){de.clear(),fe.clear(),ce.clear(),ve.clear(),pe.clear(),he.forEach((t=>{t.show&&(null==e||e(t),t.dataList.forEach(((e,i)=>{!e.show||d(t)&&!e.enable||ye(e,i,t)})))})),ge(),[...fe].forEach((e=>{null==e||e.bringToFront()})),function(){var e;const t=he.find((e=>e.show&&"pulse"===e.type));if(!t||!(null==(e=t.dataList)?void 0:e.length))return;if(!t.dataList.some((e=>{var t;return e.title.includes((null==(t=window.getLanguageByCode)?void 0:t.call(window,"10010.1.235"))||"脉搏")})))return;const o=Object.assign({},Y,z.overlap||{}),l=[];ce.size&&[...ce].forEach((e=>{[...pe].forEach((t=>{if(t.origin&&c(e,t)){const e=t.origin.key,r=t.origin.overlapKey;if(e){const s={left:t.left,top:t.top,...i,hoverCursor:"default"};let a=r||"koumai";"yemai"===e&&(a=e);const u=r||e;l.push(n(a,{...o[u],...s}))}}}))})),setTimeout((()=>{M.value.add(...l),l.forEach((e=>{null==e||e.bringToFront(),fe.add(e)}))}))}()}return function(){const t=new e.Rect({left:le,top:0,width:re-le-se.strokeWidth,height:ne-se.strokeWidth,fill:"transparent",...se});M.value.add(t)}(),Se((e=>function(e){if("temperature"!==e.type||!e.positionLine)return;const i=V(e.type,e.positionLine.value),n=t([q,i,G,i],e.positionLine);M.value.add(n)}(e))),M.value.on("mouse:up",(e=>{var t;const{button:i,target:n,pointer:o={}}=e;if(3===i){if(!C.event.evented)return;const{x:e=0,y:i=0}=o;if(e>=q&&e<=G&&i>=N&&i<=J){X.point={x:e,y:i},X.show=!0;const{type:l}=(null==n?void 0:n.origin)||{};if(n&&["temperature","pain"].includes(l))"temperature"===l&&(X.list=[...k]),"pain"===l&&(X.list=[...S]),X.target=n;else{X.target=null,X.list=[(null==(t=window.getLanguageByCode)?void 0:t.call(window,"10010.1.219"))||"新增节点"],Q.forEach((t=>{if(!B([...fe],e,"_type").includes(t.bigType)){const e=["pain"].includes(t.bigType)?ee:Z;i>=e.originY&&i<=e.endY&&X.list.push({renderItem:R?R(t):()=>t.title,origin:{title:t.title,unit:t.unit,type:a(t.bigType),dataIndex:t.dataIndex,key:t.key,isOneLine:t.isOneLine},pointer:o})}}));const n=je(e);n&&1!==X.list.length||(X.show=!1,1===X.list.length&&n&&D("repeat"))}}}if(1===i){if(n)return;const{x:e=0,y:t=0}=o;e>=q&&e<=G&&t>0&&t<ne&&$("click:grid",{x:e,y:t,time:A(e)})}})),{clickMenu:function({item:e,target:t}){if(t){const{data:i,type:n,isOneLine:o,dataIndex:l,index:r}=t.origin,a=g(i,[...k,...S]);a[`${e.type}`]=e.value,a.changeTime=s(new Date,"yyyy-MM-dd HH:mm"),o&&(a.key=t.origin.key);const u={...t.origin,data:a};$("change",u),Le(u,"change")}else{const t={data:{time:A(e.pointer.x),value:P(e.origin.type,e.pointer.y),...e.origin.isOneLine?{key:e.origin.key}:{}},...e.origin};$("add",t),Le(t)}},setPopup:we,isAddPoint:je,updateData:Le,redrawPoints:ke,gridPoints:fe,fixedNoRisePoints:ve}}function O(e,t){return e.fixed||!t.value&&0!==t.value}export{M as useCenter};
1
+ import{fabric as e}from"../../../../../shared/utils/fabricjs/index.js";import{drawLine as t,defaultStyle as i,drawPoint as n,drawText as o,drawArrow as l}from"../useDraw.js";import{useGrid as r}from"../useGrid.js";import{format as s}from"date-fns";import{getType as a,getTime as u,isOneLine as d,isOverlapPoint as c,getFloorNumber as p,isValidValue as f,setOtherType as h,isEffectiveNode as v,deleteProperty as g,getIndex as y}from"../../utils/index.js";import{cloneDeep as m,omit as w,flatten as x,last as b}from"lodash-es";import"../useEvent.js";import{useShadow as j}from"../useShadow.js";import{useCommon as L}from"../useCommon.js";import"vue";import"naive-ui";import"../surgicalAnesthesia/useTop.js";import"@vueuse/core";import{TEMPERATURE_MENU as k,PAIN_MENU as S,OVERLAP as Y}from"../../constants/index.js";import"../surgicalAnesthesia/useOther.js";import"../../../../../shared/utils/index.js";import{promiseTimeout as E}from"@vueuse/shared";function M(M,C,$,T,P,V,A,R,I,X){r(M,C);const{getEqualXTypes:H,handleAddPrevent:B,getPointEventProps:D}=L(M,$,C),{createShadowLines:W}=j(),{left:z,xScaleList:F,xCellWidth:_,yCellHeight:K,originX:q,endX:G,originY:N,endY:J,itemList:Q,event:U,vitalSignsOriginY:Z,painOriginY:ee,hospitalizationDate:te,config:ie,canvasHeight:ne,painSurplusCell:oe,iconsWidth:le,canvasWidth:re,borderStyle:se,painScalePositionSurplusHeight:ae}=C,ue=new Set,de=["xinmai","mai"],ce=new Map,pe=new Set,fe=new Set,he=new Set,ve=m(z.yScaleValue),ge=new Set;function ye(n){var o;const l=ve.find((e=>e.show&&"pulse"===e.type));if(l&&(null==(o=l.dataList)?void 0:o.length)&&(ue.size&&M.value.remove(...ue),ue.clear(),ce.size>1)){if(n){const{type:e,key:t}=n.origin||{};if("pulse"===e){const e=ce.get(t),i=null==e?void 0:e.findIndex((e=>e[0]===n.left));e.splice(i,1,[n.left,n.top])}}const o=function(){const e=[],t=[],i=[];for(const e of ce)t.push(e[1]),e[0]===de[0]&&e[1].forEach((e=>{(ce.get(de[1])||[]).findIndex((t=>t[0]===e[0]))>-1&&i.push(e[0])}));const[n,o]=t;let l=[],r=[];return i.forEach((t=>{const i=n.findIndex((e=>e[0]===t)),s=o.findIndex((e=>e[0]===t)),a=n[i],u=o[s],d=n[i-1],c=n[i+1],p=o[s-1],f=o[s+1];if(d&&p){if(d[0]!==p[0]){const e=Math.max(d[0],p[0]);l.push([d,p].find((t=>t[0]===e)))}}else d?l.push(d):p&&r.push(p);const h=Math.min(a[1],u[1]);l.push([a,u].find((e=>e[1]===h)));const v=Math.max(a[1],u[1]);r.push([a,u].find((e=>e[1]===v)));const g=()=>{const t=[...l,...r.reverse()],[i]=t,n=b(t);i[0]===n[0]&&i[1]===n[1]&&t.splice(-1,1),e.push(t),l=[],r=[]};if(c&&f){if(c[0]!==f[0]){const e=Math.min(c[0],f[0]);l.push([c,f].find((t=>t[0]===e))),g()}}else c?(l.push(c),g()):f?(r.push(f),g()):g()})),e}();o.length>0&&function(e){E(0).then((()=>{e.forEach((e=>{const t=[],i=[];Array.from(he).forEach((n=>{var o,l;"pulse"===(null==(o=null==n?void 0:n.origin)?void 0:o.type)&&e.find((e=>Math.abs(n.left-e[0])<=1&&Math.abs(n.top-e[1])<=1))&&((null==(l=null==n?void 0:n.origin)?void 0:l.key)===de[0]?t.push(n):i.push(n))})),[t,i].forEach((e=>{1!==(null==e?void 0:e.length)&&e.sort(((e,t)=>e.left-t.left)).forEach(((e,t)=>{0==t?e.rightLine&&M.value.remove(e.rightLine):e.leftLine&&M.value.remove(e.leftLine)}))}))}))}))}(o);const{mode:r,style:s={}}=l.shadow||{};o.forEach((n=>{const o=n.map((e=>({x:e[0],y:e[1]}))),l=new e.Polygon(o,{...i,...s,strokeWidth:1});if(["slash","line"].includes(r)){l.set({fill:"transparent",stroke:s.stroke||"#f00"});const e=[];if(["slash"].includes(r))e.push(...W(n,s._angle,s.space,w(s,["_angle","space"]))),e.forEach((e=>{ue.add(e)}));else{const i=function(e){const t=e.reduce(((e,t)=>{const i=Math.trunc(t[0]);return e[i]=e[i]?e[i].concat([t]):[t],e}),{}),i=Object.values(t).filter((e=>2===e.length&&Math.trunc(e[0][1])!==Math.trunc(e[1][1])));return i}(n);i.forEach((i=>{const n=t([...x(i)],{...s,originX:"center"});e.push(n),ue.add(n)}))}M.value.add(...e)}ue.add(l),M.value.add(l)}))}}function me(e,r,s){var a;const{type:u,riseStyle:c={},noRiseStyle:v={},verifiedStyle:g={},reduceStyle:y={},pacemaker:w={},upArrowStyle:x={},limitValueStyle:b={},nonePainPointStyle:j={},belowMinValueStyle:L={},respiratorStyle:k={},dataList:S=[],list:Y=[]}=s,{type:E,textStyle:C}=j,V=[],R=[],X=[];let H=null;const B=e=>"breathe"==u&&e.respirator&&k.type&&k.fixedValue&&!e.value&&be(e.time),W=d(s);if(null==(a=e.list)||a.forEach(((a,d)=>{var j,z,F,q;const G=W?S.find((e=>e.key===a.key)):e,N=je(B(a)?{...a,value:k.fixedValue}:a,s),J=e.list[d+1],Q=J?je(B(J)?{...J,value:k.fixedValue}:J,s):void 0,te=J?W?S.find((e=>e.key===J.key)):e:{},{title:le=""}=G;if(le===((null==(j=window.getLanguageByCode)?void 0:j.call(window,"10010.1.235"))||"脉搏")&&te.title!==((null==(z=window.getLanguageByCode)?void 0:z.call(window,"10010.1.235"))||"脉搏")||le!==((null==(F=window.getLanguageByCode)?void 0:F.call(window,"10010.1.235"))||"脉搏")&&te.title===((null==(q=window.getLanguageByCode)?void 0:q.call(window,"10010.1.235"))||"脉搏")||!N||!Q||p(N[0],1)!==p(Q[0],1))N&&H&&(N[0]=H),H=null;else{const e=N[0]-_/2;N[0]=e+_/4,Q[0]=H=N[0]+_/2}const re={};re.value=function(e,t,i){if(!(null==e?void 0:e.length)||!ie.showValue)return;const{lineAttr:n={}}=i,l=e[1]<=Z.originY+K?e[1]+K:e[1]-K,r=o([e[0],l],{value:B(t)?k.fixedValue:t.value,originX:"center",originY:"center",fill:n.stroke||"#000"});return X.push(r),{obj:r,top:-K}}(N,a,G),function(e,r,s,a){var d,p,h;if(!["temperature","pain","breathe"].includes(u))return;if(!(null==e?void 0:e.length)&&"temperature"===u&&!be(r.time))return;if(!(null==e?void 0:e.length)&&"pain"===u)return;if(!r.value&&"breathe"===u)return;const{lineAttr:m={},key:w}=s,{value:x}=a,b=T(r.time);let j,L,S,Y,E,M;if(r.noRise&&v.show){const t=O(v,r)?P(u,35):(null==e?void 0:e[1])||0;if(v.text)S=o([b,O(v,r)?t:t+5],{value:v.text.split("").join("\n"),originY:"top",...v.style}),r.value||he.add(S);else if(r.value){S=l([b,t,t+2*K],{...v.style})}S&&X.push(S),S&&O(v,r)&&ge.add(S)}if(null==e?void 0:e[1]){if(r.rise&&c.show&&c.text&&(Y=o([b,e[1]-(x?K:0)-5],{value:c.text.split("").join("\n"),originY:"bottom",...c.style}),X.push(Y)),r.verified){const t=(null==(d=null==g?void 0:g.position)?void 0:d[w])||"top";E=o(["top-right"===t?b+_/2:b,e[1]-(x?K:0)-5],{value:"v",originX:"center",originY:"bottom",...g}),X.push(E)}if(f(r.physicsReduce)||f(r.drugReduce)){const o=P(u,null!=(p=r.physicsReduce)?p:r.drugReduce),l=o<e[1]&&(null==ie?void 0:ie.hypothermyViewCustom)?b+_/2:b;j=t([...e,l,o],{...m,...y.line,...i}),L=n((null==(h=null==y?void 0:y.point)?void 0:h.type)||"circle",{left:l,top:o,...y.point,...i,originY:o===ne?"bottom":"center"}),j&&X.push(j),L&&X.push(L)}r.respirator&&(M=n(k.type,{left:b,top:e[1]-(x?K:0)-5,originX:"center",originY:"bottom",...k.style}),X.push(M))}Object.assign(a,{reduceLine:{obj:j,type:"line"},noRiseText:{obj:S,top:v.text?5:2*K,isFixed:O(v,r)},riseText:{obj:Y,top:(x?-K:0)-5},verifiedText:{obj:E,left:_/2,top:(x?-K:0)-5},reducePoint:{obj:L,type:"reduce"},respirator:{obj:M,top:(x?-K:0)-5}})}(N,a,G,re),function(e,t,i,n){if(!(null==e?void 0:e.length)||!["pulse"].includes(u))return;const r=Math.max(...Y),s=Math.min(...Y);let a,d,c;const{upArrowShow:p=!1,limitValueShow:f=!1}=i;if(p&&+t.value>180){let t=e[1]-2.5*K,i=[e[1]-K/2,t];t<Z.originY&&(t=e[1]+2.5*K,i=[t,e[1]+K/2]),a=l([e[0],i[0],i[1]],x,"up"),X.push(a)}if(f){const i={value:t.value,originX:"center",originY:"center",...b};if(+t.value>r){const t=a?e[1]+K/2+a.height:e[1]+K;d=o([e[0],t],i),X.push(d)}+t.value<s&&(d=o([e[0],e[1]-K],i),X.push(d))}if(L.show&&+t.value<s){const t=e[1];if(L.text)c=o([e[0],e[1]+5],{value:L.text.split("").join("\n"),originY:"top",...L.style});else{const i=t+2*K;c=l([e[0],t,i],{...L.style})}X.push(c)}Object.assign(n,{upArrow:{obj:a},limitValue:{obj:d,top:-K},belowMinValue:{obj:c,top:L.text?5:2*K,moveHide:!0}})}(N,a,G,re),function(i,o,l,a,d,c){let p,f;const{pointAttr:g={},lineAttr:y={},title:x="",key:b,type:j="circle",overlapKey:L}=d,S=g.height?g.height/2:5,Y=e.list[a+1];let O=m(i),H=m(o);const z=we(u,e.list[a].value),F=()=>"pulse"==u&&l.pacemakerShow?w.value:B(l)?k.type:z&&"number"===E?0:j,_=e=>e&&v.show&&v.fixed&&be(e.time)&&e.noRise&&!e.value&&0!==e.value;if((()=>{if(l.breakpoint)return!1;if("temperature"===u&&(i||_(l))&&(o||_(Y))){const e=P(u,35);return i||(O=[T(l.time),e]),o||(H=[T(Y.time),e]),!0}return!!i&&!!o})()){O&&H&&z&&we(u,Y.value)&&!oe[1]&&!ae&&"icon"===E&&(O[1]=O[1]-S,H[1]=H[1]-S),f=t([...O,...H],{...y});const{obj:e}=(null==c?void 0:c.reducePoint)||{};if(i&&o&&(null==e?void 0:e.top)<i[1]&&(null==ie?void 0:ie.hypothermyViewCustom)){const i=t([e.left,e.top,...o],{...y});X.unshift(i),Object.assign(c,{reduceRightLine:{obj:i,type:"reduce"}}),f.set("stroke","transparent")}}const K=F(),q=R[a-1],G={origin:{data:B(l)?{...l,value:k.fixedValue}:l,title:x,key:b||"",overlapKey:L,unit:s.unit,type:u,_type:h(x,u),dataIndex:r,index:a,isOneLine:W},leftLine:q,rightLine:f,otherObj:c,...l.pacemakerShow&&"pulse"==u?w.style:B(l)?k.style:g,...D(),lockMovementX:!0,...z?{selectable:!1,evented:!1,..."number"===E?C:{}}:{}};i&&(q?G.leftLine.set("x2",i[0]):G.leftLine=null,p=n(K,{left:i[0],top:!z||oe[1]||ae?i[1]:i[1]-S,...G}));R.push(f),p&&(b===de[1]?pe.add(p):B(l)||fe.add(p),function(e){U.hovered&&(e.on("mouseover",(()=>{xe(e,"hover")})),e.on("mouseout",(()=>{I.show=!1})));if(e.lockMovementX&&e.lockMovementY)return;e.on("moving",(()=>{!function(e){e.setCoords();const t="pain"===e.origin.type?ee:Z;e.top<t.originY&&e.set("top",t.originY);e.top>t.endY&&e.set("top",t.endY)}(e),function(e){var t,i;null==(t=e.leftLine)||t.setCoords().set({x2:e.left,y2:e.top}),null==(i=e.rightLine)||i.setCoords().set({x1:e.left,y1:e.top}),Object.values(e.otherObj).forEach((t=>{const{obj:i,type:n="",top:o=0,isFixed:l,moveHide:r=!1,left:s=0}=t||{};"reduce"!==n&&i&&("line"===n?i.setCoords().set({x1:e.left,y1:e.top}):(l||i.setCoords().set({left:e.left+s,top:e.top+o}),r&&(M.value.remove(i),delete e.otherObj.obj)))})),ye(e)}(e),U.hovered&&xe(e)})),e.on("mouseup",(t=>{if(I.show=!1,1===t.button){const{type:t}=e.origin,i=A(t,e.top),n={...e.origin,data:{...e.origin.data,value:i}};M.value.discardActiveObject(),$("change",n),ke(n,"change")}}))}(p),V.push(p),he.add(p))}(N,Q,a,d,G,re)})),"pulse"===u){let t=null;const i=e=>e.map(((e,i,n)=>{var o,l;const r=n[i+1];if(r&&p(e.left,1)===p(r.left,1)){const i=e.left-_/2;e.set("left",i+_/4),null==(o=e.rightLine)||o.set("x1",e.left),t=e.left+_/2,r.set("left",t)}else t&&(null==(l=e.leftLine)||l.set("x2",t),e.set("left",t)),t=null;return[e.left,e.top]}));if(W){const e={};de.forEach((t=>{e[t]=V.filter((e=>{var i;return(null==(i=e.origin)?void 0:i.key)===t})),ce.set(t,i(e[t]))}))}else{const{key:t}=e;ce.set(t,i(V))}}const z=R.filter((e=>e));M.value.add(...z,...V,...X)}function we(e,t){return"pain"===e&&0==t}function xe(e,t="moving"){const{title:i,unit:n,type:o,data:l}=e.origin;I.point={x:e.left,y:e.top};let r=`时间 ${((null==l?void 0:l.time)||V(e.left)).slice(-5)}`;I.list=[function(){const{drugReduce:s,physicsReduce:a}=l||{},u="hover"===t?l.value:A(o,e.top);if(f(s))return r+=(null==l?void 0:l.changeTime)?"—>"+(null==l?void 0:l.changeTime.slice(-5)):"",`药物降${"pain"==o?"痛":"温"} ${u}—>${s}${n||""}`;if(f(a))return r+=(null==l?void 0:l.changeTime)?"—>"+(null==l?void 0:l.changeTime.slice(-5)):"",`物理降${"pain"==o?"痛":"温"} ${u}—>${a}${n||""}`;return`${i} ${u}${n||""}`}(),r],I.show=!0}function be(e){const[t]=F,i=b(F),n=t.start,o=i.end,l=u(e);return l>=n&&l<=o}function je(e,t){const i="pain"===t.type?ee:Z;if(!v(e)||!be(e.time))return;const n=T(e.time),o=P(t.type,e.value);return[n,o<i.originY?i.originY:o>i.endY?i.endY:o]}function Le(e){const t=new Date,i=String(t.getMonth()+1).padStart(2,"0"),n=String(t.getDate()).padStart(2,"0"),o=u(`${t.getFullYear()}-${i}-${n} 23:59:59`),l=u(`${V(e)}:00`);return te&&l<u(te)?(B("exceedMin"),!1):!(l>o)||(B("exceedMax"),!1)}function ke(e,t="add"){const{type:i,dataIndex:n,index:o,data:l,key:r}=e,s=ve.find((e=>e.type===i));if("add"===t){const e=d(s)?s.dataList.find((e=>e.enable)):s.dataList[n],t=y(l.time,e.list);e.list.splice(t,0,l)}else s.dataList[n].list[o]=l;Se()}function Se(){var e;he.size&&(null==(e=M.value)||e.remove(...function(e){const t=[];return e.forEach((e=>{e&&t.push(e),(null==e?void 0:e.leftLine)&&t.push(null==e?void 0:e.leftLine),(null==e?void 0:e.rightLine)&&t.push(null==e?void 0:e.rightLine),Object.values((null==e?void 0:e.otherObj)||{}).forEach((e=>{(null==e?void 0:e.obj)&&t.push(null==e?void 0:e.obj)}))})),t}([...he]))),he.clear(),Ye()}function Ye(e){ce.clear(),he.clear(),pe.clear(),ge.clear(),fe.clear(),ve.forEach((t=>{t.show&&(null==e||e(t),t.dataList.forEach(((e,i)=>{!e.show||d(t)&&!e.enable||me(e,i,t)})))})),ye(),[...he].forEach((e=>{null==e||e.bringToFront()})),function(){var e;const t=ve.find((e=>e.show&&"pulse"===e.type));if(!t||!(null==(e=t.dataList)?void 0:e.length))return;if(!t.dataList.some((e=>{var t;return e.title.includes((null==(t=window.getLanguageByCode)?void 0:t.call(window,"10010.1.235"))||"脉搏")})))return;const o=Object.assign({},Y,z.overlap||{}),l=[];pe.size&&[...pe].forEach((e=>{[...fe].forEach((t=>{if(t.origin&&c(e,t)){const e=t.origin.key,r=t.origin.overlapKey;if(e){const s={left:t.left,top:t.top,...i,hoverCursor:"default"};let a=r||"koumai";"yemai"===e&&(a=e);const u=r||e;l.push(n(a,{...o[u],...s}))}}}))})),setTimeout((()=>{M.value.add(...l),l.forEach((e=>{null==e||e.bringToFront(),he.add(e)}))}))}()}return function(){const t=new e.Rect({left:le,top:0,width:re-le-se.strokeWidth,height:ne-se.strokeWidth,fill:"transparent",...se});M.value.add(t)}(),Ye((e=>function(e){if("temperature"!==e.type||!e.positionLine)return;const i=P(e.type,e.positionLine.value),n=t([q,i,G,i],e.positionLine);M.value.add(n)}(e))),M.value.on("mouse:up",(e=>{var t;const{button:i,target:n,pointer:o={}}=e;if(3===i){if(!C.event.evented)return;const{x:e=0,y:i=0}=o;if(e>=q&&e<=G&&i>=N&&i<=J){X.point={x:e,y:i},X.show=!0;const{type:l}=(null==n?void 0:n.origin)||{};if(n&&["temperature","pain"].includes(l))"temperature"===l&&(X.list=[...k]),"pain"===l&&(X.list=[...S]),X.target=n;else{X.target=null,X.list=[(null==(t=window.getLanguageByCode)?void 0:t.call(window,"10010.1.219"))||"新增节点"],Q.forEach((t=>{if(!H([...he],e,"_type").includes(t.bigType)){const e=["pain"].includes(t.bigType)?ee:Z;i>=e.originY&&i<=e.endY&&X.list.push({renderItem:R?R(t):()=>t.title,origin:{title:t.title,unit:t.unit,type:a(t.bigType),dataIndex:t.dataIndex,key:t.key,isOneLine:t.isOneLine},pointer:o})}}));const n=Le(e);n&&1!==X.list.length||(X.show=!1,1===X.list.length&&n&&B("repeat"))}}}if(1===i){if(n)return;const{x:e=0,y:t=0}=o;e>=q&&e<=G&&t>0&&t<ne&&$("click:grid",{x:e,y:t,time:V(e)})}})),{clickMenu:function({item:e,target:t}){if(t){const{data:i,type:n,isOneLine:o,dataIndex:l,index:r}=t.origin,a=g(i,[...k,...S]);a[`${e.type}`]=e.value,a.changeTime=s(new Date,"yyyy-MM-dd HH:mm"),o&&(a.key=t.origin.key);const u={...t.origin,data:a};$("change",u),ke(u,"change")}else{const t={data:{time:V(e.pointer.x),value:A(e.origin.type,e.pointer.y),...e.origin.isOneLine?{key:e.origin.key}:{}},...e.origin};$("add",t),ke(t)}},setPopup:xe,isAddPoint:Le,updateData:ke,redrawPoints:Se,gridPoints:he,fixedNoRisePoints:ge}}function O(e,t){return e.fixed||!t.value&&0!==t.value}export{M as useCenter};
@@ -1 +1 @@
1
- import{reactive as e,computed as a,watch as t,toRefs as l}from"vue";import{defaultBorderStyle as u}from"../useDraw.js";import"../../../../../shared/utils/fabricjs/index.js";import{useCumputedPoint as i}from"../useCumputedPoint.js";import{useCanvasEvent as n}from"../useEvent.js";import"../useShadow.js";import"../useCommon.js";import{setOtherType as r,isOneLine as o,getFloorNumber as s}from"../../utils/index.js";import{flatten as v}from"lodash-es";import{format as d,addDays as c}from"date-fns";import"naive-ui";import"../surgicalAnesthesia/useTop.js";import"@vueuse/core";import"../../constants/index.js";import"../surgicalAnesthesia/useOther.js";import"../../../../../shared/utils/index.js";import{useTop as h}from"./useTop.js";import{useLeft as p}from"./useLeft.js";import{useRight as g}from"./useRight.js";import{useCenter as m}from"./useCenter.js";import{useBottom as f}from"./useBottom.js";import{useOther as y}from"./useOther.js";function S(S,w,b,Y,j,x){const C=15,D=e({select:null,redrawPoints:null,clickMenu:null}),V=a((()=>{const{painSurplusCell:e=[0,0]}=w.data.grid||{};return~K.value?e:[0,0]})),H=a((()=>{var e,a;const t=(null==(a=null==(e=w.data.grid)?void 0:e.surplusCell)?void 0:a.slice())||[0,0,0,0];return 0===K.value?t[0]=t[0]+V.value[1]:K.value>0&&(t[2]=t[2]+V.value[0]),t})),X=a((()=>0===K.value?[V.value[0],H.value[1],H.value[2],H.value[3]]:K.value>0?[H.value[0],H.value[1],V.value[1],H.value[3]]:H.value)),L=a((()=>{const{top:e}=w.data;return e.date.show&&(e.date.height||C)||0})),P=a((()=>{var e;const{top:a}=w.data;return(null==(e=a.hospitalDays)?void 0:e.show)&&(a.hospitalDays.height||C)||0})),M=a((()=>{var e;const{top:a}=w.data;return(null==(e=a.operationDays)?void 0:e.show)&&(a.operationDays.height||C)||0})),I=a((()=>{var e,a,t;const{top:l}=w.data;return((null==(e=l.xScalevalue)?void 0:e.show)&&(l.xScalevalue.height||C)||0)+((null==(a=l.xScalevalue)?void 0:a.show)&&null!=(t=l.dayHeight)?t:0)})),O=a((()=>{var e;const{top:a}=w.data;return(null==(e=a.childbirthDays)?void 0:e.show)&&(a.childbirthDays.height||C)||0})),N=a((()=>{var e;const{bottom:a}=w.data;return(null==(e=null==a?void 0:a.breathing)?void 0:e.show)&&(a.breathing.height||30)||0})),k=a((()=>{const{grid:e}=w.data;return e.mainXCell*e.subXCell+H.value[1]+H.value[3]})),R=a((()=>{const{grid:e}=w.data,a=K.value>0?V.value[1]:V.value[0];return e.mainYCell*e.subYCell+H.value[0]+H.value[2]+a})),W=a((()=>{var e;const{width:a,right:t=null,top:l}=w.data;if(!t)return a;return a-(null!=(e=t.width)?e:0)})),$=a((()=>W.value-H.value[1]*z.value)),A=a((()=>{const{top:e,left:a}=w.data;return e.titleWidth+B.value})),T=a((()=>{const{bottom:e=null,height:a}=w.data;if(!e)return a;return a-(e.height||30)})),q=a((()=>{var e;const{top:a}=w.data,t=a.xScalevalue.show&&(null!=(e=a.dayHeight)?e:0)||0,l=a.xScalevalue.show&&(a.xScalevalue.height||C)||0;return L.value+t+l+P.value+M.value+O.value})),z=a((()=>(W.value-A.value)/k.value)),G=a((()=>(T.value-q.value)/R.value)),B=a((()=>{var e,a;const{left:t}=w.data;return(null==(e=t.icons)?void 0:e.show)&&((null==(a=t.icons)?void 0:a.width)||100)||0})),E=a((()=>{var e,a;const{top:t,grid:l}=w.data,u=(null==(a=null==(e=t.date.list)?void 0:e.slice)?void 0:a.call(e,0,l.mainXCell))||[],i=t.xScalevalue.times;let n=A.value-z.value;const r=t.date.startDate||d(new Date,"yyyy-MM-dd"),o=u.reduce(((e,a,t)=>0===t?e.concat(r):e.concat(d(c(new Date(r.replace(/-/g,"/")),t),"yyyy-MM-dd"))),[]).map((e=>i.map((a=>{n+=z.value;const t=Date.parse(`${e} ${a.start}`),l=Date.parse(`${e} ${a.end}`);return{start:t,end:l,left:n,center:n+z.value/2,scaleCell:(l-t)/z.value}}))));return v(o)})),F=a((()=>{var e;return(null==(e=w.data.grid)?void 0:e.event)||{selectable:!0,evented:!0,hovered:!0}})),J=a((()=>{const{left:e}=w.data;return v(e.yScaleValue.filter((e=>e.show)).map((e=>e.dataList.filter((e=>e.show)).map(((a,t)=>({...a,bigType:r(a.title,e.type),unit:e.unit,dataIndex:t,isOneLine:o(e)}))))))})),K=a((()=>{const{left:e}=w.data,a=e.yScaleValue.findIndex((e=>"pain"===e.type));return a>-1&&e.yScaleValue[a].show?a:-1})),Q=a((()=>{const{grid:e}=w.data;return-1===K.value?0:G.value*e.subYCell})),U=a((()=>{const{left:e}=w.data,a={originY:q.value+V.value[0]*G.value,endY:T.value-V.value[1]*G.value};return 0===K.value&&e.yScaleValue.length>1?a.endY=a.originY+Q.value:K.value===e.yScaleValue.length-1&&(a.originY=a.endY-Q.value),a})),Z=a((()=>{const{left:e}=w.data,a={originY:q.value+H.value[0]*G.value,endY:T.value-H.value[2]*G.value};return 0===K.value&&e.yScaleValue.length>1?a.originY=U.value.endY+H.value[0]*G.value:K.value===e.yScaleValue.length-1&&(a.endY=U.value.originY-H.value[2]*G.value),a})),_=a((()=>{var e,a;const{top:t,grid:l}=w.data,u=[];for(const i in t)t[i].show&&u.push({...t[i],list:(null==(a=null==(e=t[i].list)?void 0:e.slice)?void 0:a.call(e,0,l.mainXCell))||[],key:i});return u.sort(((e,a)=>e.seq-a.seq))})),ee=a((()=>{var e;const{left:a,right:t}=w.data,l=a.yScaleValue.find((e=>"temperature"===e.type)),u=(null==t?void 0:t.yScaleValue)||{};if(null==(e=null==l?void 0:l.list)?void 0:e.length){const e=(null==u?void 0:u.showdetailedScale)?l.list.reduce((e=>{const a=e[e.length-1];return a?e.concat([a+1,a+2]):e.concat([92])}),[]):[],a=l.list.map((e=>s(1.8*e+32)));Object.assign(u,{list:a,detailedList:e,spaceGridNumber:l.spaceGridNumber})}return u})),ae=e({canvasWidth:w.data.width,canvasHeight:w.data.height,borderStyle:{...u,...w.data.borderStyle||{}},selectionStyle:w.data.selectionStyle||{},dateHeight:L.value,hospitalDaysHeight:P.value,operationDaysHeight:M.value,xScalevalueHeight:I.value,childbirthDaysHeight:O.value,topList:_.value,breathingHeight:N.value,hospitalizationDate:w.data.hospitalizationDate,grid:w.data.grid,top:w.data.top,left:w.data.left,right:w.data.right,bottom:w.data.bottom,other:w.data.other,painIndex:K.value,painHeight:Q.value,painOriginY:U.value,vitalSignsOriginY:Z.value,gridXNumber:k.value,gridYNumber:R.value,iconsWidth:B.value,originX:A.value,originY:q.value,endX:W.value,endXLimit:$.value,endY:T.value,xCellWidth:z.value,yCellHeight:G.value,xScaleList:E.value,event:F.value,itemList:J.value,getRightInfo:ee.value,config:w.data.config||{},surplusCell:H.value,painSurplusCell:V.value,mainSurplusCell:X.value}),{computedX:te,computedY:le,getXValue:ue,getYValue:ie}=i(ae);return t((()=>S.value),(e=>{e&&function(){h(S,ae);const{setPopup:e,isAddPoint:a,updateData:t,redrawPoints:l,clickMenu:u,gridPoints:i,fixedNoRisePoints:r}=m(S,ae,b,te,le,ue,ie,w.addRenderItem,j,x);D.redrawPoints=l,D.clickMenu=u;const{drawScaleValue:o}=p(S,ae,b,e,j,te,le,ue,ie,a,t,i);g(S,ae,o),f(S,ae),y(S,ae,b,te,le,r);const{select:s}=n(S,ae,b);D.select=s}()}),{immediate:!0}),{propItems:ae,...l(D)}}export{S as useTemperatureChart};
1
+ import{reactive as e,computed as a,watch as t,toRefs as l}from"vue";import{defaultBorderStyle as u}from"../useDraw.js";import"../../../../../shared/utils/fabricjs/index.js";import{useCumputedPoint as i}from"../useCumputedPoint.js";import{useCanvasEvent as n}from"../useEvent.js";import"../useShadow.js";import"../useCommon.js";import{setOtherType as r,isOneLine as o,getFloorNumber as s}from"../../utils/index.js";import{flatten as v}from"lodash-es";import{format as d,addDays as c}from"date-fns";import"naive-ui";import"../surgicalAnesthesia/useTop.js";import"@vueuse/core";import"../../constants/index.js";import"../surgicalAnesthesia/useOther.js";import"../../../../../shared/utils/index.js";import{useTop as h}from"./useTop.js";import{useLeft as p}from"./useLeft.js";import{useRight as g}from"./useRight.js";import{useCenter as m}from"./useCenter.js";import{useBottom as f}from"./useBottom.js";import{useOther as y}from"./useOther.js";function S(S,w,b,Y,j,x){const C=15,D=e({select:null,redrawPoints:null,clickMenu:null}),V=a((()=>{const{painSurplusCell:e=[0,0]}=w.data.grid||{};return~Q.value?e:[0,0]})),H=a((()=>{var e,a;const t=(null==(a=null==(e=w.data.grid)?void 0:e.surplusCell)?void 0:a.slice())||[0,0,0,0];return 0===Q.value?t[0]=t[0]+V.value[1]:Q.value>0&&(t[2]=t[2]+V.value[0]),t})),P=a((()=>0===Q.value?[V.value[0],H.value[1],H.value[2],H.value[3]]:Q.value>0?[H.value[0],H.value[1],V.value[1],H.value[3]]:H.value)),X=a((()=>{const{top:e}=w.data;return e.date.show&&(e.date.height||C)||0})),L=a((()=>{var e;const{top:a}=w.data;return(null==(e=a.hospitalDays)?void 0:e.show)&&(a.hospitalDays.height||C)||0})),M=a((()=>{var e;const{top:a}=w.data;return(null==(e=a.operationDays)?void 0:e.show)&&(a.operationDays.height||C)||0})),I=a((()=>{var e,a,t;const{top:l}=w.data;return((null==(e=l.xScalevalue)?void 0:e.show)&&(l.xScalevalue.height||C)||0)+((null==(a=l.xScalevalue)?void 0:a.show)&&null!=(t=l.dayHeight)?t:0)})),O=a((()=>{var e;const{top:a}=w.data;return(null==(e=a.childbirthDays)?void 0:e.show)&&(a.childbirthDays.height||C)||0})),N=a((()=>{var e;const{bottom:a}=w.data;return(null==(e=null==a?void 0:a.breathing)?void 0:e.show)&&(a.breathing.height||30)||0})),k=a((()=>{const{grid:e}=w.data;return e.mainXCell*e.subXCell+H.value[1]+H.value[3]})),R=a((()=>{const{mainYCell:e,subYCell:a,painSubYCell:t=5}=w.data.grid,l=Q.value>0?V.value[1]:V.value[0];return(e-1)*a+t+H.value[0]+H.value[2]+l})),W=a((()=>{var e;const{width:a,right:t=null,top:l}=w.data;if(!t)return a;return a-(null!=(e=t.width)?e:0)})),$=a((()=>W.value-H.value[1]*z.value)),A=a((()=>{const{top:e,left:a}=w.data;return e.titleWidth+B.value})),T=a((()=>{const{bottom:e=null,height:a}=w.data;if(!e)return a;return a-(e.height||30)})),q=a((()=>{var e;const{top:a}=w.data,t=a.xScalevalue.show&&(null!=(e=a.dayHeight)?e:0)||0,l=a.xScalevalue.show&&(a.xScalevalue.height||C)||0;return X.value+t+l+L.value+M.value+O.value})),z=a((()=>(W.value-A.value)/k.value)),G=a((()=>(T.value-q.value)/R.value)),B=a((()=>{var e,a;const{left:t}=w.data;return(null==(e=t.icons)?void 0:e.show)&&((null==(a=t.icons)?void 0:a.width)||100)||0})),E=a((()=>{var e,a;const{top:t,grid:l}=w.data,u=(null==(a=null==(e=t.date.list)?void 0:e.slice)?void 0:a.call(e,0,l.mainXCell))||[],i=t.xScalevalue.times;let n=A.value-z.value;const r=t.date.startDate||d(new Date,"yyyy-MM-dd"),o=u.reduce(((e,a,t)=>0===t?e.concat(r):e.concat(d(c(new Date(r.replace(/-/g,"/")),t),"yyyy-MM-dd"))),[]).map((e=>i.map((a=>{n+=z.value;const t=Date.parse(`${e} ${a.start}`),l=Date.parse(`${e} ${a.end}`);return{start:t,end:l,left:n,center:n+z.value/2,scaleCell:(l-t)/z.value}}))));return v(o)})),F=a((()=>{var e;return(null==(e=w.data.grid)?void 0:e.event)||{selectable:!0,evented:!0,hovered:!0}})),J=a((()=>{const{left:e}=w.data;return v(e.yScaleValue.filter((e=>e.show)).map((e=>e.dataList.filter((e=>e.show)).map(((a,t)=>({...a,bigType:r(a.title,e.type),unit:e.unit,dataIndex:t,isOneLine:o(e)}))))))})),K=a((()=>{const{left:e}=w.data,a=e.yScaleValue.find((e=>"pain"===e.type));if(!a)return 0;const{numberVerticalPosition:t="bottom"}=a;return"center"===t?G.value/2:0})),Q=a((()=>{const{left:e}=w.data,a=e.yScaleValue.findIndex((e=>"pain"===e.type));return a>-1&&e.yScaleValue[a].show?a:-1})),U=a((()=>{const{painSubYCell:e=5}=w.data.grid;return-1===Q.value?0:G.value*e})),Z=a((()=>{const{left:e}=w.data,a={originY:q.value+V.value[0]*G.value,endY:T.value-V.value[1]*G.value-K.value};return 0===Q.value&&e.yScaleValue.length>1?a.endY=a.originY+U.value-K.value:Q.value===e.yScaleValue.length-1&&(a.originY=a.endY-U.value+K.value),a})),_=a((()=>{const{left:e}=w.data,a={originY:q.value+H.value[0]*G.value,endY:T.value-H.value[2]*G.value};return 0===Q.value&&e.yScaleValue.length>1?a.originY=Z.value.endY+K.value+H.value[0]*G.value:Q.value===e.yScaleValue.length-1&&(a.endY=Z.value.originY-H.value[2]*G.value),a})),ee=a((()=>{var e,a;const{top:t,grid:l}=w.data,u=[];for(const i in t)t[i].show&&u.push({...t[i],list:(null==(a=null==(e=t[i].list)?void 0:e.slice)?void 0:a.call(e,0,l.mainXCell))||[],key:i});return u.sort(((e,a)=>e.seq-a.seq))})),ae=a((()=>{var e;const{left:a,right:t}=w.data,l=a.yScaleValue.find((e=>"temperature"===e.type)),u=(null==t?void 0:t.yScaleValue)||{};if(null==(e=null==l?void 0:l.list)?void 0:e.length){const e=(null==u?void 0:u.showdetailedScale)?l.list.reduce((e=>{const a=e[e.length-1];return a?e.concat([a+1,a+2]):e.concat([92])}),[]):[],a=l.list.map((e=>s(1.8*e+32)));Object.assign(u,{list:a,detailedList:e,spaceGridNumber:l.spaceGridNumber})}return u})),te=e({canvasWidth:w.data.width,canvasHeight:w.data.height,borderStyle:{...u,...w.data.borderStyle||{}},selectionStyle:w.data.selectionStyle||{},dateHeight:X.value,hospitalDaysHeight:L.value,operationDaysHeight:M.value,xScalevalueHeight:I.value,childbirthDaysHeight:O.value,topList:ee.value,breathingHeight:N.value,hospitalizationDate:w.data.hospitalizationDate,grid:w.data.grid,top:w.data.top,left:w.data.left,right:w.data.right,bottom:w.data.bottom,other:w.data.other,painIndex:Q.value,painHeight:U.value,painOriginY:Z.value,vitalSignsOriginY:_.value,gridXNumber:k.value,gridYNumber:R.value,iconsWidth:B.value,originX:A.value,originY:q.value,endX:W.value,endXLimit:$.value,endY:T.value,xCellWidth:z.value,yCellHeight:G.value,xScaleList:E.value,event:F.value,itemList:J.value,getRightInfo:ae.value,config:w.data.config||{},surplusCell:H.value,painSurplusCell:V.value,mainSurplusCell:P.value,painScalePositionSurplusHeight:K.value}),{computedX:le,computedY:ue,getXValue:ie,getYValue:ne}=i(te);return t((()=>S.value),(e=>{e&&function(){h(S,te);const{setPopup:e,isAddPoint:a,updateData:t,redrawPoints:l,clickMenu:u,gridPoints:i,fixedNoRisePoints:r}=m(S,te,b,le,ue,ie,ne,w.addRenderItem,j,x);D.redrawPoints=l,D.clickMenu=u;const{drawScaleValue:o}=p(S,te,b,e,j,le,ue,ie,ne,a,t,i);g(S,te,o),f(S,te),y(S,te,b,le,ue,r);const{select:s}=n(S,te,b);D.select=s}()}),{immediate:!0}),{propItems:te,...l(D)}}export{S as useTemperatureChart};
@@ -82,6 +82,7 @@ export interface IPropItems {
82
82
  config: AnyObject;
83
83
  surplusCell: ILineCoordinate;
84
84
  painSurplusCell: [number, number];
85
+ painScalePositionSurplusHeight: number;
85
86
  }
86
87
  export interface IPoint {
87
88
  time: string;
@@ -532,12 +532,12 @@ declare const _default: import("vue").DefineComponent<{
532
532
  }>;
533
533
  developMode: boolean;
534
534
  draggable: boolean;
535
+ fieldDescribeMode: "column" | "tooltip";
536
+ isFieldSet: boolean;
537
+ hideExpressionOption: AnyObject[];
535
538
  idx: number;
536
539
  isHighlight: boolean;
537
540
  isHighlightRow: boolean;
538
- isFieldSet: boolean;
539
- fieldDescribeMode: "column" | "tooltip";
540
- hideExpressionOption: AnyObject[];
541
541
  }>;
542
542
  EditDialog: import("vue").DefineComponent<{
543
543
  visible: {
@@ -561,12 +561,12 @@ declare const _default: import("vue").DefineComponent<{
561
561
  }>;
562
562
  developMode: boolean;
563
563
  draggable: boolean;
564
+ fieldDescribeMode: "column" | "tooltip";
565
+ isFieldSet: boolean;
566
+ hideExpressionOption: AnyObject[];
564
567
  idx: number;
565
568
  isHighlight: boolean;
566
569
  isHighlightRow: boolean;
567
- isFieldSet: boolean;
568
- fieldDescribeMode: "column" | "tooltip";
569
- hideExpressionOption: AnyObject[];
570
570
  }>;
571
571
  setStyle: typeof setStyle;
572
572
  }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("close" | "save" | "reset")[], "close" | "save" | "reset", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
@@ -720,12 +720,12 @@ declare const _default: import("vue").DefineComponent<{
720
720
  }>;
721
721
  developMode: boolean;
722
722
  draggable: boolean;
723
+ fieldDescribeMode: "column" | "tooltip";
724
+ isFieldSet: boolean;
725
+ hideExpressionOption: AnyObject[];
723
726
  idx: number;
724
727
  isHighlight: boolean;
725
728
  isHighlightRow: boolean;
726
- isFieldSet: boolean;
727
- fieldDescribeMode: "column" | "tooltip";
728
- hideExpressionOption: AnyObject[];
729
729
  }>;
730
730
  isArray: {
731
731
  (value?: any): value is any[];
@@ -855,9 +855,9 @@ declare const _default: import("vue").DefineComponent<{
855
855
  showSeq: boolean;
856
856
  developMode: boolean;
857
857
  footerFlag: boolean;
858
- fieldDescribeMode: "column" | "tooltip";
859
858
  customColumns: FieldSetColumnItem[];
860
859
  showSortPriority: boolean;
861
860
  showHeadFilter: boolean;
861
+ fieldDescribeMode: "column" | "tooltip";
862
862
  }>;
863
863
  export default _default;
@@ -383,11 +383,11 @@ declare const _default: import("vue").DefineComponent<{
383
383
  }>;
384
384
  developMode: boolean;
385
385
  draggable: boolean;
386
+ fieldDescribeMode: "column" | "tooltip";
387
+ isFieldSet: boolean;
388
+ hideExpressionOption: AnyObject[];
386
389
  idx: number;
387
390
  isHighlight: boolean;
388
391
  isHighlightRow: boolean;
389
- isFieldSet: boolean;
390
- fieldDescribeMode: "column" | "tooltip";
391
- hideExpressionOption: AnyObject[];
392
392
  }>;
393
393
  export default _default;