cnhis-design-vue 3.1.44-release.5 → 3.1.44

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 (169) hide show
  1. package/README.md +87 -87
  2. package/es/components/base-search/index.d.ts +0 -6
  3. package/es/components/base-search/src/index.vue.d.ts +0 -6
  4. package/es/components/base-search/src/index.vue2.js +1 -1
  5. package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
  6. package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +1 -0
  7. package/es/components/bpmn-workflow/types/ModelingModule.d.ts +1 -0
  8. package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +1 -0
  9. package/es/components/classification/index.d.ts +553 -75
  10. package/es/components/classification/src/components/search-filter/index.vue.d.ts +551 -61
  11. package/es/components/classification/src/components/search-filter/index.vue2.js +1 -1
  12. package/es/components/classification/src/components/set-classification/index.vue.d.ts +553 -75
  13. package/es/components/classification/src/components/set-classification/index.vue2.js +1 -1
  14. package/es/components/classification/src/components/table-modal/index.vue.d.ts +1 -1
  15. package/es/components/classification/src/const/index.d.ts +2 -2
  16. package/es/components/classification/src/index.vue.d.ts +553 -75
  17. package/es/components/classification/src/index.vue2.js +1 -1
  18. package/es/components/classification/style/index.css +1 -1
  19. package/es/components/fabric-chart/src/FabricChart.vue2.js +1 -1
  20. package/es/components/fabric-chart/src/hooks/useBirthProcess.d.ts +1 -1
  21. package/es/components/fabric-chart/src/hooks/useBirthProcess.js +1 -1
  22. package/es/components/fabric-chart/src/hooks/useBirthProcessChart.d.ts +1 -1
  23. package/es/components/fabric-chart/src/hooks/useBirthProcessChart.js +1 -1
  24. package/es/components/fabric-chart/src/hooks/useBottom.d.ts +1 -1
  25. package/es/components/fabric-chart/src/hooks/useBottom.js +1 -1
  26. package/es/components/fabric-chart/src/hooks/useCenter.d.ts +1 -1
  27. package/es/components/fabric-chart/src/hooks/useCenter.js +1 -1
  28. package/es/components/fabric-chart/src/hooks/useCommon.d.ts +1 -1
  29. package/es/components/fabric-chart/src/hooks/useCumputedPoint.js +1 -1
  30. package/es/components/fabric-chart/src/hooks/useDraw.d.ts +1 -1
  31. package/es/components/fabric-chart/src/hooks/useDraw.js +1 -1
  32. package/es/components/fabric-chart/src/hooks/useEvent.d.ts +1 -1
  33. package/es/components/fabric-chart/src/hooks/useEvent.js +1 -1
  34. package/es/components/fabric-chart/src/hooks/useGrid.d.ts +1 -1
  35. package/es/components/fabric-chart/src/hooks/useGrid.js +1 -1
  36. package/es/components/fabric-chart/src/hooks/useLeft.d.ts +1 -1
  37. package/es/components/fabric-chart/src/hooks/useLeft.js +1 -1
  38. package/es/components/fabric-chart/src/hooks/useOther.d.ts +1 -1
  39. package/es/components/fabric-chart/src/hooks/useOther.js +1 -1
  40. package/es/components/fabric-chart/src/hooks/useRight.d.ts +1 -1
  41. package/es/components/fabric-chart/src/hooks/useRight.js +1 -1
  42. package/es/components/fabric-chart/src/hooks/useScaleColumn.d.ts +1 -1
  43. package/es/components/fabric-chart/src/hooks/useScaleColumn.js +1 -1
  44. package/es/components/fabric-chart/src/hooks/useShadow.d.ts +1 -1
  45. package/es/components/fabric-chart/src/hooks/useShadow.js +1 -1
  46. package/es/components/fabric-chart/src/hooks/useTemperatureChart.d.ts +1 -1
  47. package/es/components/fabric-chart/src/hooks/useTemperatureChart.js +1 -1
  48. package/es/components/fabric-chart/src/hooks/useTop.d.ts +1 -1
  49. package/es/components/fabric-chart/src/hooks/useTop.js +1 -1
  50. package/es/components/fabric-chart/src/interface.d.ts +2 -2
  51. package/es/components/fabric-chart/src/utils/index.js +1 -1
  52. package/es/components/form-config/index.d.ts +0 -2
  53. package/es/components/form-config/src/FormConfig.vue.d.ts +0 -2
  54. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +0 -1
  55. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +0 -1
  56. package/es/components/form-render/index.d.ts +0 -1
  57. package/es/components/form-render/src/FormRender.vue.d.ts +0 -1
  58. package/es/components/form-render/src/FormRender.vue2.js +1 -1
  59. package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +0 -1
  60. package/es/components/form-render/src/components/renderer/input.d.ts +4 -4
  61. package/es/components/form-render/src/components/renderer/input.js +1 -1
  62. package/es/components/form-render/src/components/renderer/inputNumber.d.ts +4 -4
  63. package/es/components/form-render/src/components/renderer/inputNumber.js +1 -1
  64. package/es/components/form-render/src/types/index.d.ts +2 -0
  65. package/es/components/iho-table/index.d.ts +2 -0
  66. package/es/components/iho-table/src/IhoTable.vue.d.ts +2 -0
  67. package/es/components/iho-table/src/hooks/tapHooks/useConfigHooks.d.ts +1 -0
  68. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/editDate.vue2.js +1 -1
  69. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/dateRendererPlugin/index.js +1 -1
  70. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useAutoFocus.d.ts +3 -4
  71. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useAutoFocus.js +1 -1
  72. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.js +1 -1
  73. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/index.js +1 -1
  74. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/editSeparate.vue2.js +1 -1
  75. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/separateRendererPlugin/index.js +1 -1
  76. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/editTime.vue2.js +1 -1
  77. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/index.js +1 -1
  78. package/es/components/iho-table/src/plugins/rendererPlugins/widgets/checkRendererPlugin.js +1 -1
  79. package/es/components/iho-table/src/types/index.d.ts +1 -0
  80. package/es/components/iho-table/style/index.css +1 -1
  81. package/es/components/index.css +1 -1
  82. package/es/components/index.d.ts +2 -1
  83. package/es/components/index.js +1 -1
  84. package/es/components/info-header/index.d.ts +8 -2
  85. package/es/components/info-header/src/InfoHeader.vue.d.ts +8 -2
  86. package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +0 -1
  87. package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +0 -1
  88. package/es/components/picture-clipper/index.d.ts +59 -0
  89. package/es/components/picture-clipper/index.js +1 -0
  90. package/es/components/picture-clipper/src/PictureClipper.vue.d.ts +59 -0
  91. package/es/components/picture-clipper/src/PictureClipper.vue.js +1 -0
  92. package/es/components/picture-clipper/src/PictureClipper.vue2.js +1 -0
  93. package/es/components/picture-clipper/style/index.css +1 -0
  94. package/es/components/quick-search/index.d.ts +0 -6
  95. package/es/components/quick-search/src/index.vue.d.ts +0 -6
  96. package/es/components/quick-search/src/index.vue2.js +1 -1
  97. package/es/components/quick-search/style/index.css +1 -1
  98. package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
  99. package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
  100. package/es/components/select-person/src/SearchMultiple.vue.d.ts +0 -6
  101. package/es/components/shortcut-setter/index.d.ts +0 -1
  102. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +0 -1
  103. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +551 -48
  104. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue2.js +1 -1
  105. package/es/components/table-filter/src/components/classify-filter/components/Date.vue.d.ts +134 -0
  106. package/es/components/table-filter/src/components/classify-filter/components/Date.vue.js +1 -0
  107. package/es/components/table-filter/src/components/classify-filter/components/Date.vue2.js +1 -0
  108. package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue.d.ts +140 -0
  109. package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue.js +1 -0
  110. package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue2.js +1 -0
  111. package/es/components/table-filter/src/components/classify-filter/components/InputFilter.vue.d.ts +28 -0
  112. package/es/components/table-filter/src/components/classify-filter/components/InputFilter.vue.js +1 -0
  113. package/es/components/table-filter/src/components/classify-filter/components/InputFilter.vue2.js +1 -0
  114. package/es/components/table-filter/src/components/classify-filter/components/InputNumber.vue.d.ts +28 -0
  115. package/es/components/table-filter/src/components/classify-filter/components/InputNumber.vue.js +1 -0
  116. package/es/components/table-filter/src/components/classify-filter/components/InputNumber.vue2.js +1 -0
  117. package/es/components/table-filter/src/components/classify-filter/components/InputNumberGroup.vue.d.ts +54 -0
  118. package/es/components/table-filter/src/components/classify-filter/components/InputNumberGroup.vue.js +1 -0
  119. package/es/components/table-filter/src/components/classify-filter/components/InputNumberGroup.vue2.js +1 -0
  120. package/es/components/table-filter/src/components/classify-filter/components/SelectDynamic.vue.d.ts +61 -0
  121. package/es/components/table-filter/src/components/classify-filter/components/SelectDynamic.vue.js +1 -0
  122. package/es/components/table-filter/src/components/classify-filter/components/SelectDynamic.vue2.js +1 -0
  123. package/es/components/table-filter/src/components/classify-filter/components/SelectFilter.vue.d.ts +68 -0
  124. package/es/components/table-filter/src/components/classify-filter/components/SelectFilter.vue.js +1 -0
  125. package/es/components/table-filter/src/components/classify-filter/components/SelectFilter.vue2.js +1 -0
  126. package/es/components/table-filter/src/components/classify-filter/components/SelectLabel.vue.d.ts +47 -0
  127. package/es/components/table-filter/src/components/classify-filter/components/SelectLabel.vue2.js +1 -0
  128. package/es/components/table-filter/src/components/classify-filter/components/index.d.ts +551 -0
  129. package/es/components/table-filter/src/components/classify-filter/components/index.js +1 -0
  130. package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +551 -48
  131. package/es/components/table-filter/src/components/render-widget/components/Date.vue2.js +1 -1
  132. package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue2.js +1 -1
  133. package/es/components/table-filter/src/components/render-widget/components/DateRangeOut.vue2.js +1 -1
  134. package/es/components/table-filter/src/components/render-widget/components/{Label.vue.d.ts → LabelInner.vue.d.ts} +1 -9
  135. package/es/components/table-filter/src/components/render-widget/components/LabelInner.vue.js +1 -0
  136. package/es/components/table-filter/src/components/render-widget/components/LabelInner.vue2.js +1 -0
  137. package/es/components/table-filter/src/components/render-widget/components/{SelectLabel.vue.d.ts → LabelOut.vue.d.ts} +1 -9
  138. package/es/components/table-filter/src/components/render-widget/components/LabelOut.vue.js +1 -0
  139. package/es/components/table-filter/src/components/render-widget/components/LabelOut.vue2.js +1 -0
  140. package/es/components/table-filter/src/components/render-widget/components/Select.vue.d.ts +1 -9
  141. package/es/components/table-filter/src/components/render-widget/components/Select.vue2.js +1 -1
  142. package/es/components/table-filter/src/components/render-widget/components/index.d.ts +713 -8
  143. package/es/components/table-filter/src/components/render-widget/components/index.js +1 -1
  144. package/es/components/table-filter/src/components/render-widget/index.vue.d.ts +0 -6
  145. package/es/components/table-filter/src/components/render-widget/index.vue.js +1 -1
  146. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +3 -27
  147. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +1 -1
  148. package/es/components/table-filter/src/constants/index.d.ts +3 -0
  149. package/es/components/table-filter/src/constants/index.js +1 -0
  150. package/es/components/table-filter/src/directive/resize.js +1 -1
  151. package/es/components/table-filter/src/tool/baseOptions.d.ts +4 -0
  152. package/es/components/table-filter/src/tool/baseOptions.js +1 -1
  153. package/es/components/table-filter/src/tool/transformData.d.ts +1 -0
  154. package/es/components/table-filter/src/tool/transformData.js +1 -1
  155. package/es/components/table-filter/src/types/enums.d.ts +1 -0
  156. package/es/components/table-filter/src/types/enums.js +1 -1
  157. package/es/env.d.ts +25 -25
  158. package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +86 -0
  159. package/es/shared/package.json.js +1 -1
  160. package/es/shared/utils/fabricjs/index.d.ts +6823 -0
  161. package/es/shared/utils/fabricjs/index.js +1 -0
  162. package/es/shared/utils/tapable/index.d.ts +139 -0
  163. package/package.json +2 -2
  164. package/es/components/fabric-chart/src/utils/utils.js +0 -1
  165. package/es/components/table-filter/src/components/render-widget/components/Label.vue.js +0 -1
  166. package/es/components/table-filter/src/components/render-widget/components/Label.vue2.js +0 -1
  167. package/es/components/table-filter/src/components/render-widget/components/SelectLabel.vue2.js +0 -1
  168. /package/es/components/fabric-chart/src/utils/{utils.d.ts → index.d.ts} +0 -0
  169. /package/es/components/table-filter/src/components/{render-widget → classify-filter}/components/SelectLabel.vue.js +0 -0
@@ -1,5 +1,5 @@
1
1
  import { type Ref } from 'vue';
2
- import { fabric } from '../utils';
2
+ import { fabric } from '../../../../../es/shared/utils/fabricjs';
3
3
  import { AnyObject } from '../../../../../es/shared/types';
4
4
  export default function useTemperatureChart(canvas: Ref<fabric.Canvas>, props: AnyObject, emits: Function, canvasRef: Ref<HTMLCanvasElement | null>): {
5
5
  propItems: any;
@@ -1 +1 @@
1
- import{ref as e,reactive as t,computed as a,onMounted as l,nextTick as u}from"vue";import{defaultBorderStyle as i}from"./useDraw.js";import{useCumputedPoint as n}from"./useCumputedPoint.js";import{useTop as r}from"./useTop.js";import{useLeft as o}from"./useLeft.js";import{useRight as s}from"./useRight.js";import{useCenter as d}from"./useCenter.js";import{useBottom as v}from"./useBottom.js";import{useOther as c}from"./useOther.js";import{useEvent as p,useCanvasEvent as h}from"./useEvent.js";import"../utils/index.js";import{setOtherType as g,getFloorNumber as m}from"../utils/utils.js";import"lodash-es";import"date-fns";function f(f,y,Y,S){const w=15,b=e(),C=e(),x=e(),j=t({show:!1,point:{x:0,y:0},list:[]}),D=t({show:!1,point:{x:0,y:0},list:[],target:null}),V=a((()=>{const{top:e}=y.data;return e.date.show&&(e.date.height||w)||0})),X=a((()=>{var e;const{top:t}=y.data;return(null==(e=t.hospitalDays)?void 0:e.show)&&(t.hospitalDays.height||w)||0})),H=a((()=>{var e;const{top:t}=y.data;return(null==(e=t.operationDays)?void 0:e.show)&&(t.operationDays.height||w)||0})),L=a((()=>{var e,t,a;const{top:l}=y.data;return((null==(e=l.xScalevalue)?void 0:e.show)&&(l.xScalevalue.height||w)||0)+((null==(t=l.xScalevalue)?void 0:t.show)&&null!=(a=l.dayHeight)?a:0)})),P=a((()=>{var e;const{bottom:t}=y.data;return(null==(e=null==t?void 0:t.breathing)?void 0:e.show)&&(t.breathing.height||30)||0})),$=a((()=>{const{grid:e}=y.data;return e.mainXCell*e.subXCell+e.surplusXCell})),I=a((()=>{const{grid:e}=y.data;return e.mainYCell*e.subYCell+e.surplusYCell})),N=a((()=>{var e;const{width:t,right:a=null,top:l}=y.data;if(!a)return t;return t-(null!=(e=a.width)?e:0)})),T=a((()=>{const{grid:e}=y.data;return N.value-e.surplusXCell*M.value})),O=a((()=>{const{top:e,left:t}=y.data;return e.titleWidth+q.value})),W=a((()=>{const{bottom:e=null,height:t}=y.data;if(!e)return t;return t-(e.height||30)})),k=a((()=>{var e;const{top:t}=y.data,a=t.xScalevalue.show&&(null!=(e=t.dayHeight)?e:0)||0,l=t.xScalevalue.show&&(t.xScalevalue.height||w)||0;return V.value+a+l+X.value+H.value})),G=a((()=>{const{grid:e}=y.data;return k.value+e.surplusYCell*R.value})),M=a((()=>(N.value-O.value)/$.value)),R=a((()=>(W.value-k.value)/I.value)),q=a((()=>{var e,t;const{left:a}=y.data;return(null==(e=a.icons)?void 0:e.show)&&((null==(t=a.icons)?void 0:t.width)||100)||0})),z=a((()=>{var e,t;const{top:a,grid:l}=y.data,u=(null==(t=null==(e=a.date.list)?void 0:e.slice)?void 0:t.call(e,0,l.mainXCell))||[],i=a.xScalevalue.times;let n=O.value-M.value;function r(e){const[t="2022",a="01",l="01"]=String(e).match(/\d+/g)||[];return`20${t}`.slice(-4)+"-"+`00${a}`.slice(-2)+"-"+`00${l}`.slice(-2)}return u.map((e=>i.map((t=>{n+=M.value;const a=new Date(`${r(e)} ${t.start}`).getTime(),l=new Date(`${r(e)} ${t.end}`).getTime();return{start:a,end:l,left:n,center:n+M.value/2,scaleCell:(l-a)/M.value}})))).flat()})),A=a((()=>le("breathe"))),B=a((()=>le("pulse"))),E=a((()=>le("temperature"))),F=a((()=>le("pain"))),J=a((()=>{var e;return(null==(e=y.data.grid)?void 0:e.event)||{selectable:!0,evented:!0,hovered:!0}})),K=a((()=>{const{left:e}=y.data;return e.yScaleValue.map((e=>e.dataList.filter((e=>e.show)).map(((t,a)=>({...t,bigType:g(t.title,e.type),unit:e.unit,dataIndex:a}))))).flat()})),Q=a((()=>{const{left:e}=y.data;return e.yScaleValue.findIndex((e=>"pain"===e.type))})),U=a((()=>{const{grid:e}=y.data;return-1===Q.value?0:R.value*e.subYCell})),Z=a((()=>{const{left:e}=y.data,t={originY:W.value,endY:W.value};return 0===Q.value&&e.yScaleValue.length>1?(t.originY=G.value,t.endY=G.value+U.value):Q.value===e.yScaleValue.length-1&&(t.originY=W.value-U.value,t.endY=W.value),t})),_=a((()=>{const{left:e}=y.data,t={originY:k.value,endY:W.value};return 0===Q.value&&e.yScaleValue.length>1?(t.originY=G.value+U.value,t.endY=W.value):Q.value===e.yScaleValue.length-1&&(t.originY=G.value,t.endY=W.value-U.value),t})),ee=a((()=>{var e,t;const{top:a,grid:l}=y.data,u=[];for(const i in a)a[i].show&&u.push({...a[i],list:(null==(t=null==(e=a[i].list)?void 0:e.slice)?void 0:t.call(e,0,l.mainXCell))||[],key:i});return u.sort(((e,t)=>e.seq-t.seq))})),te=a((()=>{var e;const{left:t,right:a}=y.data,l=t.yScaleValue.find((e=>"temperature"===e.type)),u=(null==a?void 0:a.yScaleValue)||{};return(null==(e=null==l?void 0:l.list)?void 0:e.length)&&Object.assign(u,{list:l.list.map((e=>m(1.8*e+32))),spaceGridNumber:l.spaceGridNumber}),u})),ae=t({canvasWidth:y.data.width,canvasHeight:y.data.height,borderStyle:{...i,...y.data.borderStyle||{}},selectionStyle:y.data.selectionStyle||{},dateHeight:V.value,hospitalDaysHeight:X.value,operationDaysHeight:H.value,xScalevalueHeight:L.value,topList:ee.value,breathingHeight:P.value,hospitalizationDate:y.data.hospitalizationDate,grid:y.data.grid,top:y.data.top,left:y.data.left,right:y.data.right,bottom:y.data.bottom,other:y.data.other,painIndex:Q.value,painHeight:U.value,painOriginY:Z.value,vitalSignsOriginY:_.value,gridXNumber:$.value,gridYNumber:I.value,iconsWidth:q.value,originX:O.value,originY:k.value,originYLimit:G.value,endX:N.value,endXLimit:T.value,endY:W.value,xCellWidth:M.value,yCellHeight:R.value,xScaleList:z.value,breatheYCell:A.value,pulseYCell:B.value,temperatureYCell:E.value,painYCell:F.value,event:J.value,itemList:K.value,getRightInfo:te.value,config:y.data.config||{}});function le(e){const{yScaleValue:t}=y.data.left,a=t.find((t=>t.type===e)),l=(null==a?void 0:a.list)||[];return l.length?R.value/((l[1]-l[0])/a.spaceGridNumber):0}const{cumputedX:ue,cumputedY:ie,getXValue:ne,getYValue:re}=n(ae);return l((()=>{u((()=>{r(f,ae);const{setPopup:e,isAddPoint:t,updateData:a,redrawPoints:l,clickMenu:u}=d(f,ae,Y,ue,ie,ne,re,y.addRenderItem,j,D);C.value=l,x.value=u;const{drawScaleValue:i}=o(f,ae,Y,e,j,ue,ie,ne,re,t,a);s(f,ae,i),v(f,ae),c(f,ae,ue),p(S.value);const{select:n}=h(f,ae,Y);b.value=n}))})),{propItems:ae,redrawPoints:C,select:b,pointTipProps:j,pointMenuProps:D,clickMenu:x}}export{f as default};
1
+ import{ref as e,reactive as t,computed as a,onMounted as l,nextTick as u}from"vue";import{defaultBorderStyle as i}from"./useDraw.js";import{useCumputedPoint as n}from"./useCumputedPoint.js";import{useTop as r}from"./useTop.js";import{useLeft as o}from"./useLeft.js";import{useRight as s}from"./useRight.js";import{useCenter as d}from"./useCenter.js";import{useBottom as v}from"./useBottom.js";import{useOther as c}from"./useOther.js";import{useEvent as p,useCanvasEvent as h}from"./useEvent.js";import"../../../../shared/utils/fabricjs/index.js";import{setOtherType as g,getFloorNumber as m}from"../utils/index.js";import"lodash-es";import"date-fns";function f(f,y,Y,S){const b=15,w=e(),C=e(),x=e(),j=t({show:!1,point:{x:0,y:0},list:[]}),D=t({show:!1,point:{x:0,y:0},list:[],target:null}),V=a((()=>{const{top:e}=y.data;return e.date.show&&(e.date.height||b)||0})),X=a((()=>{var e;const{top:t}=y.data;return(null==(e=t.hospitalDays)?void 0:e.show)&&(t.hospitalDays.height||b)||0})),H=a((()=>{var e;const{top:t}=y.data;return(null==(e=t.operationDays)?void 0:e.show)&&(t.operationDays.height||b)||0})),L=a((()=>{var e,t,a;const{top:l}=y.data;return((null==(e=l.xScalevalue)?void 0:e.show)&&(l.xScalevalue.height||b)||0)+((null==(t=l.xScalevalue)?void 0:t.show)&&null!=(a=l.dayHeight)?a:0)})),P=a((()=>{var e;const{bottom:t}=y.data;return(null==(e=null==t?void 0:t.breathing)?void 0:e.show)&&(t.breathing.height||30)||0})),$=a((()=>{const{grid:e}=y.data;return e.mainXCell*e.subXCell+e.surplusXCell})),I=a((()=>{const{grid:e}=y.data;return e.mainYCell*e.subYCell+e.surplusYCell})),N=a((()=>{var e;const{width:t,right:a=null,top:l}=y.data;if(!a)return t;return t-(null!=(e=a.width)?e:0)})),T=a((()=>{const{grid:e}=y.data;return N.value-e.surplusXCell*M.value})),O=a((()=>{const{top:e,left:t}=y.data;return e.titleWidth+q.value})),W=a((()=>{const{bottom:e=null,height:t}=y.data;if(!e)return t;return t-(e.height||30)})),k=a((()=>{var e;const{top:t}=y.data,a=t.xScalevalue.show&&(null!=(e=t.dayHeight)?e:0)||0,l=t.xScalevalue.show&&(t.xScalevalue.height||b)||0;return V.value+a+l+X.value+H.value})),G=a((()=>{const{grid:e}=y.data;return k.value+e.surplusYCell*R.value})),M=a((()=>(N.value-O.value)/$.value)),R=a((()=>(W.value-k.value)/I.value)),q=a((()=>{var e,t;const{left:a}=y.data;return(null==(e=a.icons)?void 0:e.show)&&((null==(t=a.icons)?void 0:t.width)||100)||0})),z=a((()=>{var e,t;const{top:a,grid:l}=y.data,u=(null==(t=null==(e=a.date.list)?void 0:e.slice)?void 0:t.call(e,0,l.mainXCell))||[],i=a.xScalevalue.times;let n=O.value-M.value;function r(e){const[t="2022",a="01",l="01"]=String(e).match(/\d+/g)||[];return`20${t}`.slice(-4)+"-"+`00${a}`.slice(-2)+"-"+`00${l}`.slice(-2)}return u.map((e=>i.map((t=>{n+=M.value;const a=new Date(`${r(e)} ${t.start}`).getTime(),l=new Date(`${r(e)} ${t.end}`).getTime();return{start:a,end:l,left:n,center:n+M.value/2,scaleCell:(l-a)/M.value}})))).flat()})),A=a((()=>le("breathe"))),B=a((()=>le("pulse"))),E=a((()=>le("temperature"))),F=a((()=>le("pain"))),J=a((()=>{var e;return(null==(e=y.data.grid)?void 0:e.event)||{selectable:!0,evented:!0,hovered:!0}})),K=a((()=>{const{left:e}=y.data;return e.yScaleValue.map((e=>e.dataList.filter((e=>e.show)).map(((t,a)=>({...t,bigType:g(t.title,e.type),unit:e.unit,dataIndex:a}))))).flat()})),Q=a((()=>{const{left:e}=y.data;return e.yScaleValue.findIndex((e=>"pain"===e.type))})),U=a((()=>{const{grid:e}=y.data;return-1===Q.value?0:R.value*e.subYCell})),Z=a((()=>{const{left:e}=y.data,t={originY:W.value,endY:W.value};return 0===Q.value&&e.yScaleValue.length>1?(t.originY=G.value,t.endY=G.value+U.value):Q.value===e.yScaleValue.length-1&&(t.originY=W.value-U.value,t.endY=W.value),t})),_=a((()=>{const{left:e}=y.data,t={originY:k.value,endY:W.value};return 0===Q.value&&e.yScaleValue.length>1?(t.originY=G.value+U.value,t.endY=W.value):Q.value===e.yScaleValue.length-1&&(t.originY=G.value,t.endY=W.value-U.value),t})),ee=a((()=>{var e,t;const{top:a,grid:l}=y.data,u=[];for(const i in a)a[i].show&&u.push({...a[i],list:(null==(t=null==(e=a[i].list)?void 0:e.slice)?void 0:t.call(e,0,l.mainXCell))||[],key:i});return u.sort(((e,t)=>e.seq-t.seq))})),te=a((()=>{var e;const{left:t,right:a}=y.data,l=t.yScaleValue.find((e=>"temperature"===e.type)),u=(null==a?void 0:a.yScaleValue)||{};return(null==(e=null==l?void 0:l.list)?void 0:e.length)&&Object.assign(u,{list:l.list.map((e=>m(1.8*e+32))),spaceGridNumber:l.spaceGridNumber}),u})),ae=t({canvasWidth:y.data.width,canvasHeight:y.data.height,borderStyle:{...i,...y.data.borderStyle||{}},selectionStyle:y.data.selectionStyle||{},dateHeight:V.value,hospitalDaysHeight:X.value,operationDaysHeight:H.value,xScalevalueHeight:L.value,topList:ee.value,breathingHeight:P.value,hospitalizationDate:y.data.hospitalizationDate,grid:y.data.grid,top:y.data.top,left:y.data.left,right:y.data.right,bottom:y.data.bottom,other:y.data.other,painIndex:Q.value,painHeight:U.value,painOriginY:Z.value,vitalSignsOriginY:_.value,gridXNumber:$.value,gridYNumber:I.value,iconsWidth:q.value,originX:O.value,originY:k.value,originYLimit:G.value,endX:N.value,endXLimit:T.value,endY:W.value,xCellWidth:M.value,yCellHeight:R.value,xScaleList:z.value,breatheYCell:A.value,pulseYCell:B.value,temperatureYCell:E.value,painYCell:F.value,event:J.value,itemList:K.value,getRightInfo:te.value,config:y.data.config||{}});function le(e){const{yScaleValue:t}=y.data.left,a=t.find((t=>t.type===e)),l=(null==a?void 0:a.list)||[];return l.length?R.value/((l[1]-l[0])/a.spaceGridNumber):0}const{cumputedX:ue,cumputedY:ie,getXValue:ne,getYValue:re}=n(ae);return l((()=>{u((()=>{r(f,ae);const{setPopup:e,isAddPoint:t,updateData:a,redrawPoints:l,clickMenu:u}=d(f,ae,Y,ue,ie,ne,re,y.addRenderItem,j,D);C.value=l,x.value=u;const{drawScaleValue:i}=o(f,ae,Y,e,j,ue,ie,ne,re,t,a);s(f,ae,i),v(f,ae),c(f,ae,ue),p(S.value);const{select:n}=h(f,ae,Y);w.value=n}))})),{propItems:ae,redrawPoints:C,select:w,pointTipProps:j,pointMenuProps:D,clickMenu:x}}export{f as default};
@@ -1,4 +1,4 @@
1
1
  import { type Ref } from 'vue';
2
- import { fabric } from '../utils';
2
+ import { fabric } from '../../../../../es/shared/utils/fabricjs';
3
3
  import { IPropItems } from '../interface';
4
4
  export declare function useTop(canvas: Ref<fabric.Canvas>, propItems: IPropItems): void;
@@ -1 +1 @@
1
- import{fabric as t}from"../utils/index.js";import{defaultStyle as e,drawTextGroup as l,defaultTextStyle as i}from"./useDraw.js";function o(o,n){const{grid:s,originX:h,xCellWidth:u,gridXNumber:a,top:c,xScalevalueHeight:d,iconsWidth:r,topList:f,endXLimit:p,canvasWidth:g,borderStyle:v}=n;!function(){const y=[];p&&y.push(new t.Line([p,0,g,0],v));let S=0;f.forEach(((t,e)=>{e>0&&(S+=n[`${f[e-1].key}Height`]),"xScalevalue"==t.key?(function(t,e,o){if(!c.dayHeight)return!1;const n=c.dayHeight,d=u*s.subSecondXCell,r=(a-s.surplusXCell)/s.subSecondXCell;for(let s=0;s<r;s++){const u=h+s*d,a=s%2==0?"上午":"下午",c=l({width:d,height:n,...v},{value:a,...i,...t.style||{}},{left:u,top:o});e.push(c)}}(t,y,S),function(t,e,o){var n;const a=c.xScalevalue.show&&null!=(n=c.dayHeight)?n:0,f=d-a,p=l({width:h-r,height:d,...v},{value:c.xScalevalue.title,...i,...t.style||{},...t.titleStyle||{}},{left:r,top:o});e.push(p);const g=[];for(let t=0;t<s.mainXCell;t++)g.push(c.xScalevalue.list);g.flat().forEach(((n,s)=>{const c=h+s*u,d=l({width:u,height:f,...v},{value:n.value,...i,...t.style||{},...n.style||{}},{left:c,top:o+a});e.push(d)}))}(t,y,S)):n[`${t.key}Height`]&&function(t,e,o){const a=n[`${t.key}Height`],c=l({width:h-r,height:a,...v},{value:t.title,...i,...(null==t?void 0:t.style)||{},...t.titleStyle||{}},{left:r,top:o});e.push(c);const d=u*s.subXCell;t.list.forEach(((n,s)=>{const u=h+s*d,c=l({width:d,height:a,...v},{value:n,...i,...(null==t?void 0:t.style)||{}},{left:u,top:o});e.push(c)}))}(t,y,S)}));const w=y.length>0?new t.Group([...y],{...e,objectCaching:!1}):null;w&&w.sendToBack(),w&&o.value.add(w)}()}export{o as useTop};
1
+ import{fabric as t}from"../../../../shared/utils/fabricjs/index.js";import{defaultStyle as e,drawTextGroup as l,defaultTextStyle as i}from"./useDraw.js";function o(o,s){const{grid:n,originX:h,xCellWidth:u,gridXNumber:a,top:c,xScalevalueHeight:d,iconsWidth:r,topList:f,endXLimit:p,canvasWidth:g,borderStyle:v}=s;!function(){const y=[];p&&y.push(new t.Line([p,0,g,0],v));let S=0;f.forEach(((t,e)=>{e>0&&(S+=s[`${f[e-1].key}Height`]),"xScalevalue"==t.key?(function(t,e,o){if(!c.dayHeight)return!1;const s=c.dayHeight,d=u*n.subSecondXCell,r=(a-n.surplusXCell)/n.subSecondXCell;for(let n=0;n<r;n++){const u=h+n*d,a=n%2==0?"上午":"下午",c=l({width:d,height:s,...v},{value:a,...i,...t.style||{}},{left:u,top:o});e.push(c)}}(t,y,S),function(t,e,o){var s;const a=c.xScalevalue.show&&null!=(s=c.dayHeight)?s:0,f=d-a,p=l({width:h-r,height:d,...v},{value:c.xScalevalue.title,...i,...t.style||{},...t.titleStyle||{}},{left:r,top:o});e.push(p);const g=[];for(let t=0;t<n.mainXCell;t++)g.push(c.xScalevalue.list);g.flat().forEach(((s,n)=>{const c=h+n*u,d=l({width:u,height:f,...v},{value:s.value,...i,...t.style||{},...s.style||{}},{left:c,top:o+a});e.push(d)}))}(t,y,S)):s[`${t.key}Height`]&&function(t,e,o){const a=s[`${t.key}Height`],c=l({width:h-r,height:a,...v},{value:t.title,...i,...(null==t?void 0:t.style)||{},...t.titleStyle||{}},{left:r,top:o});e.push(c);const d=u*n.subXCell;t.list.forEach(((s,n)=>{const u=h+n*d,c=l({width:d,height:a,...v},{value:s,...i,...(null==t?void 0:t.style)||{}},{left:u,top:o});e.push(c)}))}(t,y,S)}));const w=y.length>0?new t.Group([...y],{...e,objectCaching:!1}):null;w&&w.sendToBack(),w&&o.value.add(w)}()}export{o as useTop};
@@ -1,5 +1,5 @@
1
- import { Ref } from 'vue';
2
- import { fabric } from './utils';
1
+ import { type Ref } from 'vue';
2
+ import { fabric } from '../../../../es/shared/utils/fabricjs';
3
3
  import { AnyObject } from '../../../../es/shared/types';
4
4
  export declare type IType = 'temperature' | 'birthProcess' | undefined;
5
5
  interface IEvent {