cnhis-design-vue 3.1.45-beta.4 → 3.1.45-beta.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (63) hide show
  1. package/es/components/annotation-edit/src/AnnotationEdit.js +1 -1
  2. package/es/components/fabric-chart/index.d.ts +40 -5
  3. package/es/components/fabric-chart/src/FabricChart.vue.d.ts +40 -5
  4. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +1 -1
  5. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/index.d.ts +2 -0
  6. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/index.js +1 -0
  7. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.d.ts +4 -0
  8. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.js +1 -0
  9. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.d.ts +20 -0
  10. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js +1 -1
  11. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.d.ts +4 -0
  12. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.js +1 -0
  13. package/es/components/fabric-chart/src/hooks/useGrid.d.ts +1 -1
  14. package/es/components/fabric-chart/src/hooks/useGrid.js +1 -1
  15. package/es/components/fabric-chart/src/interface.d.ts +4 -0
  16. package/es/components/fabric-chart/src/utils/index.d.ts +2 -1
  17. package/es/components/fabric-chart/src/utils/index.js +1 -1
  18. package/es/components/field-set/index.d.ts +157 -38
  19. package/es/components/field-set/src/FieldSet.vue.d.ts +160 -23
  20. package/es/components/field-set/src/FieldSet.vue2.js +1 -1
  21. package/es/components/field-set/src/components/Row.vue.d.ts +132 -0
  22. package/es/components/field-set/src/components/Row.vue.js +1 -0
  23. package/es/components/field-set/src/components/Row.vue2.js +1 -0
  24. package/es/components/field-set/src/types/index.d.ts +1 -0
  25. package/es/components/field-set/src/utils/index.d.ts +7 -0
  26. package/es/components/field-set/src/utils/index.js +1 -0
  27. package/es/components/field-set/style/index.css +1 -1
  28. package/es/components/form-config/index.d.ts +62 -8
  29. package/es/components/form-config/src/FormConfig.vue.d.ts +62 -8
  30. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +31 -4
  31. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +31 -4
  32. package/es/components/form-render/index.d.ts +31 -4
  33. package/es/components/form-render/src/FormRender.vue.d.ts +31 -4
  34. package/es/components/form-render/src/FormRender.vue2.js +1 -1
  35. package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +31 -4
  36. package/es/components/form-render/src/constants/index.d.ts +2 -0
  37. package/es/components/form-render/src/constants/index.js +1 -1
  38. package/es/components/form-render/src/hooks/useFormAsyncQueue.d.ts +1 -1
  39. package/es/components/form-render/src/hooks/useFormAsyncQueue.js +1 -1
  40. package/es/components/form-render/src/hooks/useFormContext.js +1 -1
  41. package/es/components/form-render/src/hooks/useFormRenderLifeCycle.d.ts +3 -1
  42. package/es/components/form-render/src/hooks/useFormRenderOptions.d.ts +1 -1
  43. package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -1
  44. package/es/components/form-render/src/hooks/useNuiThemeOverrides.js +1 -1
  45. package/es/components/form-render/src/types/index.d.ts +2 -0
  46. package/es/components/index.css +1 -1
  47. package/es/components/info-header/index.d.ts +72 -10
  48. package/es/components/info-header/src/InfoHeader.vue.d.ts +72 -10
  49. package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +31 -4
  50. package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +31 -4
  51. package/es/components/keyboard/index.d.ts +1 -1
  52. package/es/components/keyboard/src/Keyboard.vue.d.ts +1 -1
  53. package/es/components/recommend-search/index.d.ts +2 -2
  54. package/es/components/recommend-search/src/RecommendSearch.vue.d.ts +2 -2
  55. package/es/components/recommend-search/src/components/BaseSearch.d.ts +1 -1
  56. package/es/components/recommend-search/src/components/RecommendInput.vue.d.ts +1 -1
  57. package/es/components/recommend-search/src/components/RecommendSelect.vue.d.ts +1 -1
  58. package/es/components/shortcut-setter/index.d.ts +31 -4
  59. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +31 -4
  60. package/es/shared/hooks/useAsyncQueue.d.ts +3 -1
  61. package/es/shared/hooks/useAsyncQueue.js +1 -1
  62. package/es/shared/package.json.js +1 -1
  63. package/package.json +2 -2
@@ -1 +1 @@
1
- import{defineComponent as e,computed as o,ref as a,onDeactivated as t,createVNode as l,unref as u,createTextVNode as n}from"vue";import{useTheme as i}from"../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import{isString as r,isObject as s,isFunction as m}from"lodash-es";import{FileTrayFull as d,FileTray as v}from"@vicons/ionicons5";import{NPopover as c,NDivider as p,NEllipsis as f,NIcon as V,NInput as h}from"naive-ui";var g=e({props:{modelValue:{type:[String,Object],default:""}},emits:["update:modelValue"],setup(e,{emit:g}){const w=i(),x=o({get:()=>r(e.modelValue)?e.modelValue:s(e.modelValue)&&e.modelValue.content||"",set(o){let a=o;s(e.modelValue)&&(a={...e.modelValue,content:o}),g("update:modelValue",a)}}),T=a(!1),b=o({get:()=>T.value,async set(e){T.value=e,!e&&k.value&&(await new Promise((e=>setTimeout(e,200))),k.value=!1)}}),k=a(!1);let y,_;function P(e){e.stopPropagation(),clearTimeout(y),b.value&&k.value?b.value=!1:u(x)||(y=setTimeout((()=>{k.value=b.value=!0}),200))}function M(e){e.stopPropagation(),clearTimeout(y),u(x)&&(b.value=!0,k.value=!0)}function R(e){e.stopPropagation(),clearTimeout(_),u(x)&&(b.value=!0)}function j(e){e.stopPropagation(),clearTimeout(_),u(x)&&!k.value&&(_=setTimeout((()=>{b.value=!1}),300))}return t((()=>{b.value=!1})),function(){return l("section",{class:["annotation-edit",{"is-active":!!u(x)}],style:{"--icon-right":"-5",...w.value},"annotation-hover-show":!u(x)&&!k.value},[l(c,{"keep-alive-on-hover":!0,style:{maxWidth:"360px",wordBreak:"break-all"},show:b.value,"onUpdate:show":e=>b.value=e,trigger:"manual",duration:100},{default:function(){return l("section",{onMouseleave:j,onMouseenter:R},[l("div",null,[k.value?l(h,{resizable:!1,autosize:{minRows:3,maxRows:5},"show-count":!0,class:"annotation-edit__textarea",type:"textarea",value:x.value,"onUpdate:value":e=>x.value=e},null):l("span",null,[u(x)])]),s(e.modelValue)?[l(p,{style:{margin:"4px 0",minWidth:"360px"}},null),l("section",{class:"annotation-edit__footer"},[m(e.modelValue.footerRender)?e.modelValue.footerRender(e.modelValue):[l(f,null,{default:()=>{var o;return[null!=(o=e.modelValue.authorLabel)?o:"质控人",n(": "),e.modelValue.author]}}),l(f,null,{default:()=>{var o;return[null!=(o=e.modelValue.dateLabel)?o:"质控时间",n(": "),e.modelValue.date]}})]])]:null])},trigger:function(){return l("div",{class:"annotation-edit__icon",onMouseleave:j,onMouseenter:R,onDblclick:M,onClick:P},[l(V,{component:u(x)?d:v},null)])}})])}}});export{g as default};
1
+ import{defineComponent as e,computed as o,ref as a,onDeactivated as t,createVNode as l,unref as u,createTextVNode as n}from"vue";import{useTheme as i}from"../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import{isString as r,isObject as s,isFunction as m}from"lodash-es";import{FileTrayFull as d,FileTray as v}from"@vicons/ionicons5";import{NPopover as c,NDivider as p,NEllipsis as f,NIcon as V,NInput as h}from"naive-ui";var g=e({props:{modelValue:{type:[String,Object],default:""}},emits:["update:modelValue"],setup(e,{emit:g}){const w=i(),x=o({get:()=>r(e.modelValue)?e.modelValue:s(e.modelValue)&&e.modelValue.content||"",set(o){let a=o;s(e.modelValue)&&(a={...e.modelValue,content:o}),g("update:modelValue",a)}}),T=a(!1),k=o({get:()=>T.value,async set(e){T.value=e,!e&&b.value&&(await new Promise((e=>setTimeout(e,200))),b.value=!1)}}),b=a(!1);let y,_;function P(e){e.stopPropagation(),clearTimeout(y),k.value&&b.value?k.value=!1:u(x)||(y=setTimeout((()=>{b.value=k.value=!0}),200))}function M(e){e.stopPropagation(),clearTimeout(y),u(x)&&(k.value=!0,b.value=!0)}function R(e){e.stopPropagation(),clearTimeout(_),u(x)&&(k.value=!0)}function j(e){e.stopPropagation(),clearTimeout(_),u(x)&&!b.value&&(_=setTimeout((()=>{k.value=!1}),300))}return t((()=>{k.value=!1})),function(){return l("section",{class:["annotation-edit",{"is-active":!!u(x)}],style:{"--icon-right":"-5",...w.value},"annotation-hover-show":!u(x)&&!b.value},[l(c,{"keep-alive-on-hover":!0,style:{maxWidth:"360px",wordBreak:"break-all"},show:k.value,"onUpdate:show":e=>k.value=e,trigger:"manual",duration:100,onClickoutside:P},{default:function(){return l("section",{onMouseleave:j,onMouseenter:R},[l("div",null,[b.value?l(h,{resizable:!1,autosize:{minRows:3,maxRows:5},"show-count":!0,class:"annotation-edit__textarea",type:"textarea",value:x.value,"onUpdate:value":e=>x.value=e},null):l("span",null,[u(x)])]),s(e.modelValue)?[l(p,{style:{margin:"4px 0",minWidth:"360px"}},null),l("section",{class:"annotation-edit__footer"},[m(e.modelValue.footerRender)?e.modelValue.footerRender(e.modelValue):[l(f,null,{default:()=>{var o;return[null!=(o=e.modelValue.authorLabel)?o:"质控人",n(": "),e.modelValue.author]}}),l(f,null,{default:()=>{var o;return[null!=(o=e.modelValue.dateLabel)?o:"质控时间",n(": "),e.modelValue.date]}})]])]:null])},trigger:function(){return l("div",{class:"annotation-edit__icon",onMouseleave:j,onMouseenter:R,onDblclick:M,onClick:P},[l(V,{component:u(x)?d:v},null)])}})])}}});export{g as default};
@@ -35,13 +35,48 @@ declare const FabricChart: SFCWithInstall<import("vue").DefineComponent<{
35
35
  canvasRef: import("vue").Ref<HTMLCanvasElement | null>;
36
36
  canvas: import("vue").Ref<any>;
37
37
  propItems: any;
38
- redrawPoints: any;
39
- select: any;
40
- pointTipProps: any;
41
- pointMenuProps: any;
42
- clickMenu: any;
38
+ redrawPoints: import("vue").Ref<any>;
39
+ select: import("vue").Ref<any>;
40
+ pointTipProps: {
41
+ show: boolean;
42
+ point: {
43
+ x: number;
44
+ y: number;
45
+ };
46
+ list: string[];
47
+ };
48
+ pointMenuProps: {
49
+ show: boolean;
50
+ point: {
51
+ x: number;
52
+ y: number;
53
+ };
54
+ list: any[];
55
+ target: any;
56
+ };
57
+ clickMenu: import("vue").Ref<any>;
43
58
  init: () => {
44
59
  propItems: any;
60
+ redrawPoints: import("vue").Ref<any>;
61
+ select: import("vue").Ref<any>;
62
+ pointTipProps: {
63
+ show: boolean;
64
+ point: {
65
+ x: number;
66
+ y: number;
67
+ };
68
+ list: string[];
69
+ };
70
+ pointMenuProps: {
71
+ show: boolean;
72
+ point: {
73
+ x: number;
74
+ y: number;
75
+ };
76
+ list: any[];
77
+ target: any;
78
+ };
79
+ clickMenu: import("vue").Ref<any>;
45
80
  };
46
81
  PopupTip: import("vue").DefineComponent<{
47
82
  show: {
@@ -37,13 +37,48 @@ declare const _default: import("vue").DefineComponent<{
37
37
  canvasRef: import("vue").Ref<HTMLCanvasElement | null>;
38
38
  canvas: import("vue").Ref<any>;
39
39
  propItems: any;
40
- redrawPoints: any;
41
- select: any;
42
- pointTipProps: any;
43
- pointMenuProps: any;
44
- clickMenu: any;
40
+ redrawPoints: import("vue").Ref<any>;
41
+ select: import("vue").Ref<any>;
42
+ pointTipProps: {
43
+ show: boolean;
44
+ point: {
45
+ x: number;
46
+ y: number;
47
+ };
48
+ list: string[];
49
+ };
50
+ pointMenuProps: {
51
+ show: boolean;
52
+ point: {
53
+ x: number;
54
+ y: number;
55
+ };
56
+ list: any[];
57
+ target: any;
58
+ };
59
+ clickMenu: import("vue").Ref<any>;
45
60
  init: () => {
46
61
  propItems: any;
62
+ redrawPoints: import("vue").Ref<any>;
63
+ select: import("vue").Ref<any>;
64
+ pointTipProps: {
65
+ show: boolean;
66
+ point: {
67
+ x: number;
68
+ y: number;
69
+ };
70
+ list: string[];
71
+ };
72
+ pointMenuProps: {
73
+ show: boolean;
74
+ point: {
75
+ x: number;
76
+ y: number;
77
+ };
78
+ list: any[];
79
+ target: any;
80
+ };
81
+ clickMenu: import("vue").Ref<any>;
47
82
  };
48
83
  PopupTip: import("vue").DefineComponent<{
49
84
  show: {
@@ -1 +1 @@
1
- import{fabric as e}from"../../../../../shared/utils/fabricjs/index.js";import{drawLine as t,drawArrow as n,drawText as o,defaultTextStyle as i,drawPoint as r,defaultStyle as l,defaultRectStyle as s}from"../useDraw.js";import{useGrid as a}from"../useGrid.js";import{useBirthProcessCumputedPoint as u}from"../useCumputedPoint.js";import"@vueuse/core";import{getScaleInfo as c,drawScaleNumber as f,drawScaleLine as d}from"../useScaleColumn.js";import{useCommon as p}from"../useCommon.js";import"vue";import{getIndex as h,isEffectiveNode as g}from"../../utils/index.js";import"../temperature/useShadow.js";import{cloneDeep as m}from"lodash-es";import{format as v}from"date-fns";function y(y,k,w,x,b){const{cumputedX:T,cumputedY:j,getXValue:S,getYValue:C}=u(k),{getEqualXTypes:M,handleAddPrevent:P}=p(y,w),{xAxis:E,grid:G,originX:L,originY:Y,xCellWidth:X,endY:A,startTime:H,leftAddAreaWidth:I,leftScales:D,rightScales:O,yCellHeight:W,endX:V,scaleValues:N,canvasWidth:R,borderStyle:$,rightAddAreaWidth:B,event:F,originYCervix:q,other:z,canvasHeight:J}=k,K=m(N),Q=new Set;function U(){K.filter((e=>e.show)).forEach(((e,l)=>{var s;const a=[],u=[],c=[];null==(s=e.data)||s.forEach(((s,f)=>{!function(s,f,d){let p,h;const{pointAttr:g={},lineAttr:m={},title:v="",key:b,type:T="circle",childbirthStyle:j={}}=e,M=e.data[d+1],P=ne(M,e);if(s&&P&&!f.breakpoint)h=t([...s,...P],{...m});else if(s&&!P&&!f.breakpoint){const n=ne(M,e);h=n?t([...s,...n],{...m}):null}let E,G;if(f.childbirth){const e=s[1]+W;E=n([s[0],s[1],e],j),c.push(E),G=o([s[0]+X/2,e-W/2],{value:String(f.childbirth),...i,originX:"left",originY:"center",...j}),c.push(G)}const L=u[d-1],Y={origin:{data:f,title:v,key:b||"",dataIndex:l,index:d},leftLine:L,rightLine:h,arrowGroup:E,arrowGroupText:G,...g,...k.event.hovered?k.event.evented?{selectable:!0}:{selectable:!0,lockMovementX:!0,lockMovementY:!0}:k.event};L?p=r(T,{left:L.get("x2"),top:L.get("y2"),...Y}):s&&(Y.leftLine=null,p=r(T,{left:s[0],top:s[1],...Y}));u.push(h),p&&(!function(e){F.hovered&&(e.on("mouseover",(()=>{te(e,"hover")})),e.on("mouseout",(()=>{x.show=!1})));if(e.lockMovementX&&e.lockMovementY)return;e.on("moving",(()=>{ee(e),function(e){var t,n,o,i;null==(t=e.leftLine)||t.setCoords().set({x2:e.left,y2:e.top}),null==(n=e.rightLine)||n.setCoords().set({x1:e.left,y1:e.top}),null==(o=e.arrowGroup)||o.setCoords().set({left:e.left,top:e.top}),null==(i=e.arrowGroupText)||i.setCoords().set({left:e.left+X/2,top:e.top+W/2})}(e),F.hovered&&te(e)})),e.on("mouseup",(t=>{if(x.show=!1,1===t.button){const{key:t}=e.origin,n={...e.origin,data:{...e.origin.data,time:S(e.left),value:C(t,e.top)}};y.value.discardActiveObject(),w("change",n),Z(n,"change")}}))}(p),a.push(p),Q.add(p))}(ne(s,e),s,f)})),Promise.all(a).then((e=>{const t=u.filter((e=>e));let n=null;e=e.filter((e=>(e&&n&&(n.nextPoint=e,e.prevPoint=n),n=e||n,e))),Promise.all(c).then((n=>{y.value.add(...t,...e,...n),e.forEach((e=>{null==e||e.bringToFront()}))}))}))}))}function Z(e,t="add"){const{dataIndex:n,data:o,index:i,key:r}=e,l=K.find((e=>e.key===r));switch(t){case"remove":l.data.splice(i,1);break;case"change":l.data[i]=o;break;default:{const e=h(o.time,l.data);l.data.splice(e,0,o);break}}_()}function _(){var e;Q.size&&(null==(e=y.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),(null==e?void 0:e.arrowGroup)&&t.push(null==e?void 0:e.arrowGroup),(null==e?void 0:e.arrowGroupText)&&t.push(null==e?void 0:e.arrowGroupText)})),t}([...Q]))),Q.clear(),U()}function ee(e){const t=e.prevPoint?e.prevPoint.left:L,n=e.nextPoint?e.nextPoint.left:V;e.setCoords(),["cervix","fetalPresentation"].includes(e.origin.key)&&e.top<q&&e.set("top",q),e.top<Y&&e.set("top",Y),e.top>A&&e.set("top",A),e.left<t&&e.set("left",t),e.left>n&&e.set("left",n)}function te(e,t="moving"){const{title:n,key:o,data:i}=e.origin;x.point={x:e.left,y:e.top},x.list=[`${n} ${"hover"===t?i.value:C(o,e.top)}`,`时间 ${S(e.left).slice(-5)}`],x.show=!0}function ne(e,t){if(g(e)&&function(e){const t=H+864e5,n=new Date(e).getTime();return n>=H&&n<=t}(e.time)){const n=T(e.time),o=j(t.key,t.range,e.value);return[n,o<Y?Y:o>A?A:o]}}function oe(e,t){return e+1>t[1]?t[0]:e+1}return a(y,k,!0),function(){const t=new e.Rect({...$,width:R-I-B-1,height:A-1,left:I,top:0,fill:"transparent"});y.value.add(t)}(),function(){function t(t,n="left"){let r="left"===n?I:V;t.forEach(((t,n)=>{const{range:a,spaceValue:u,width:p,title:h,titleStyle:g,key:m,position:v="center",spaceGridNumber:k=1,showNumber:w,showMaxMinNumber:x}=t,b=[],T=[],j=r+p/2,S=function(e,t){const n=[],[o,i]=e;for(let e=o;t>0?e<=i:e>=i;e+=t)n.push(e);return n}(a,u),C=S.length;S.forEach(((e,n)=>{const{lineXMain:o,lineXSub:i,textLeft:l}=c(v,r,p),s=A-n*W*k,a=0===n?A-8:n!==S.length-1||Y||q&&"FHR"!==m?s:Y+8;!w||(0===n||n===C-1)&&!x||b.push(f(String(e),t,l,a)),T.push(...d(t,n,o,i,s,W,Y,C))}));const M=new e.Rect({...s,strokeWidth:.5,width:p,height:A,left:j,top:A/2}),P=o([j,Y>0?Y-W/2:W/2],{value:String(h),...i,...g}),E=new e.Group([...T,...b,M,...P?[P]:[]],{objectCaching:!1,...l});y.value.add(E),E.sendToBack(),r+=p}))}t(D),t(O,"right")}(),function(){const{show:t,startTime:n,range:r=[0,23],position:s="top",style:a}=E.time,{show:u,range:c=[0,23],position:f,style:d}=E.processTime;if(t||u){const p=[],h=[],g=[],m=[],v=L+X/2,k=W/2;for(let e=0;e<G.mainXCell;e++){if(t){const t=0===e?+n.slice(11,13):oe(p.at(-1),r);p.push(t);const l="top"===s?Y-k:A+k;g.push(o([v+e*X,l],{value:String(t),...i,...a||{}}))}if(u){const t=0===e?c[0]:h.at(-1)+1;h.push(t);const n="top"===f?k:J-k;m.push(o([v+e*X,n],{value:String(t),...i,...d||{}}))}}const w=new e.Group([...g,...m],{objectCaching:!1,...l});y.value.add(w),y.value.sendToBack(w)}}(),function(){var e;const n=Object.values(z),o=[],i={},r=K.find((e=>"cervix"===e.key&&e.show)),l=null==(e=null==r?void 0:r.data)?void 0:e.find((e=>3==+e.value));function s(e,t){const{key:n,range:o}=r||{},i=j(n,o,10),l=[0,t],s=[-t/e,0],a=[(A-i-t)/e,A-i],u=[V-L,e*(V-L)+t];let c=[],f=[];function d([n,o]){return Math.abs(o-e*n-t)<=1}function p([e,t]){const[n,o]=[...h([e,t])];return n>=L&&n<=V&&o>=i&&o<=A}function h([e,t]){return[L+e,A-t]}return d(l)&&p(l)&&(c=h(l)),d(s)&&p(s)&&(c=h(s)),d(a)&&p(a)&&(f=h(a)),d(u)&&p(u)&&(f=h(u)),[...c,...f]}n.forEach((e=>{if(!e.show)return;const{key:n}=e;switch(n){case"fetalPresentation":{const{range:i,show:r}=K.find((e=>e.key===n));if(r){const r=j(n,i,0);o.push(t([L,r,V,r],{...e}))}break}case"alert":if(l){const{key:n,range:a}=r||{},u=216e5,c={time:v(new Date(new Date(l.time).getTime()+u),"yyyy-MM-dd HH:mm"),value:10},[f,d]=[T(l.time)-L,A-j(n,a,l.value)],[p,h]=[T(c.time)-L,A-j(n,a,c.value)],g=(h-d)/(p-f),m=d-f*g,y=s(g,m);y.length>0&&(o.push(t(y,{...e})),Object.assign(i,{k:g,b:m}))}break;case"handling":if(l){const{k:n,b:r}=i,a=144e5,u=s(n,r-(T(v(new Date(new Date(l.time).getTime()+a),"yyyy-MM-dd HH:mm"))-T(l.time))*n);u.length>0&&o.push(t(u,{...e}))}}})),y.value.add(...o)}(),U(),function(){function e(e,t){const n=K.findIndex((t=>t.key===e.key));return{renderItem:()=>e.title,origin:{title:e.title,unit:e.unit,dataIndex:n,key:e.key},pointer:t}}k.event.evented&&y.value.on("mouse:up",(t=>{if(3===t.button){const{x:n=0,y:o=0}=t.pointer||{};n>=L&&n<=V&&o>=Y&&o<=A&&(b.point={x:n,y:o},b.show=!0,t.target?(b.target=t.target,b.list=["删除节点"],y.value.forEachObject((e=>{e.origin&&e.left===t.target.left&&e.top===t.target.top&&b.list.push({renderItem:()=>e.origin.title,origin:{...e.origin},mode:"remove",pointer:t.pointer})}))):(b.target=null,b.list=["新增节点"],K.filter((e=>e.show)).forEach((i=>{if(!M(n,"key",X).includes(i.key)){if(["cervix","fetalPresentation"].includes(i.key)&&o<q)return;b.list.push(e(i,t.pointer))}})),1===b.list.length&&(b.show=!1,P("repeat"),console.log("当前时间段内无可新增节点"))))}}))}(),function(){const t=R-B/2;function n(t,n){if(!t.length)return;let l=Y;const s=[];t.forEach((t=>{const o=t.title.split("").join("\n"),a=N.findIndex((e=>e.key===t.key)),u=new e.Text(String(o),{...i,...t.titleStyle||{},originY:"top",left:n,top:l,lineHeight:1}),c=r(t.type,{left:n,top:l+u.height+3,...t.pointAttr,originY:"top",origin:{title:t.title,unit:t.unit,type:t.type,dataIndex:a,key:t.key,isMenu:!0},originLeft:n,originTop:l+u.height+3,...k.event});l+=u.height+c.height+15,function(e){function t(e){const{left:t,top:n}=e;return t>=L&&t<=V&&n>=Y&&n<=A}e.on("moving",(()=>{e.set("originY","center"),t(e)?(ee(e),te(e)):x.show=!1})),e.on("mouseup:before",(n=>{if(x.show=!1,0===n.e.button&&t(e))if(M(e.left,"key",X).includes(e.origin.key))P("repeat");else{const t={data:{time:S(e.left),value:C(e.origin.key,e.top)},...e.origin};w("add",t),Z(t)}!function(e){e.setCoords().set({originY:"top",left:e.originLeft,top:e.originTop})}(e)}))}(c),s.push(u,c)})),o(s),y.value.add(...s)}function o(e){const t=e.at(-1),n=(A-Y)/2,o=(t.height+t.top-Y)/2;e.forEach((e=>{const t=e.top+n-o;e.set({top:t,originTop:t})}))}n(D,I/2),n(O,t)}(),{clickMenu:function({item:e,target:t}){const n={...e.origin};"remove"===e.mode?(w("remove",n),Z(n,"remove")):(Object.assign(n,{data:{time:S(e.pointer.x),value:C(e.origin.key,e.pointer.y)}}),w("add",n),Z(n))},redrawPoints:_}}export{y as useBirthProcess};
1
+ import{fabric as e}from"../../../../../shared/utils/fabricjs/index.js";import{drawLine as t,drawArrow as n,drawText as o,defaultTextStyle as i,drawPoint as r,defaultStyle as l,defaultRectStyle as s}from"../useDraw.js";import{useGrid as a}from"../useGrid.js";import{useBirthProcessCumputedPoint as u}from"../useCumputedPoint.js";import"@vueuse/core";import{getScaleInfo as c,drawScaleNumber as f,drawScaleLine as d}from"../useScaleColumn.js";import{useCommon as p}from"../useCommon.js";import"vue";import{getIndex as h,isEffectiveNode as g}from"../../utils/index.js";import"../temperature/useShadow.js";import{cloneDeep as m}from"lodash-es";import{format as v}from"date-fns";function y(y,k,w,x,b){const{cumputedX:T,cumputedY:j,getXValue:S,getYValue:C}=u(k),{getEqualXTypes:P,handleAddPrevent:M}=p(y,w),{xAxis:E,grid:G,originX:L,originY:Y,xCellWidth:X,endY:A,startTime:H,leftAddAreaWidth:I,leftScales:D,rightScales:O,yCellHeight:W,endX:V,scaleValues:N,canvasWidth:R,borderStyle:$,rightAddAreaWidth:B,event:F,originYCervix:q,other:z,canvasHeight:J}=k,K=m(N),Q=new Set;function U(){K.filter((e=>e.show)).forEach(((e,l)=>{var s;const a=[],u=[],c=[];null==(s=e.data)||s.forEach(((s,f)=>{!function(s,f,d){let p,h;const{pointAttr:g={},lineAttr:m={},title:v="",key:b,type:T="circle",childbirthStyle:j={}}=e,P=e.data[d+1],M=ne(P,e);if(s&&M&&!f.breakpoint)h=t([...s,...M],{...m});else if(s&&!M&&!f.breakpoint){const n=ne(P,e);h=n?t([...s,...n],{...m}):null}let E,G;if(f.childbirth){const e=s[1]+W;E=n([s[0],s[1],e],j),c.push(E),G=o([s[0]+X/2,e-W/2],{value:String(f.childbirth),...i,originX:"left",originY:"center",...j}),c.push(G)}const L=u[d-1],Y={origin:{data:f,title:v,key:b||"",dataIndex:l,index:d},leftLine:L,rightLine:h,arrowGroup:E,arrowGroupText:G,...g,...k.event.hovered?k.event.evented?{selectable:!0}:{selectable:!0,lockMovementX:!0,lockMovementY:!0}:k.event};L?p=r(T,{left:L.get("x2"),top:L.get("y2"),...Y}):s&&(Y.leftLine=null,p=r(T,{left:s[0],top:s[1],...Y}));u.push(h),p&&(!function(e){F.hovered&&(e.on("mouseover",(()=>{te(e,"hover")})),e.on("mouseout",(()=>{x.show=!1})));if(e.lockMovementX&&e.lockMovementY)return;e.on("moving",(()=>{ee(e),function(e){var t,n,o,i;null==(t=e.leftLine)||t.setCoords().set({x2:e.left,y2:e.top}),null==(n=e.rightLine)||n.setCoords().set({x1:e.left,y1:e.top}),null==(o=e.arrowGroup)||o.setCoords().set({left:e.left,top:e.top}),null==(i=e.arrowGroupText)||i.setCoords().set({left:e.left+X/2,top:e.top+W/2})}(e),F.hovered&&te(e)})),e.on("mouseup",(t=>{if(x.show=!1,1===t.button){const{key:t}=e.origin,n={...e.origin,data:{...e.origin.data,time:S(e.left),value:C(t,e.top)}};y.value.discardActiveObject(),w("change",n),Z(n,"change")}}))}(p),a.push(p),Q.add(p))}(ne(s,e),s,f)})),Promise.all(a).then((e=>{const t=u.filter((e=>e));let n=null;e=e.filter((e=>(e&&n&&(n.nextPoint=e,e.prevPoint=n),n=e||n,e))),Promise.all(c).then((n=>{y.value.add(...t,...e,...n),e.forEach((e=>{null==e||e.bringToFront()}))}))}))}))}function Z(e,t="add"){const{dataIndex:n,data:o,index:i,key:r}=e,l=K.find((e=>e.key===r));switch(t){case"remove":l.data.splice(i,1);break;case"change":l.data[i]=o;break;default:{const e=h(o.time,l.data);l.data.splice(e,0,o);break}}_()}function _(){var e;Q.size&&(null==(e=y.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),(null==e?void 0:e.arrowGroup)&&t.push(null==e?void 0:e.arrowGroup),(null==e?void 0:e.arrowGroupText)&&t.push(null==e?void 0:e.arrowGroupText)})),t}([...Q]))),Q.clear(),U()}function ee(e){const t=e.prevPoint?e.prevPoint.left:L,n=e.nextPoint?e.nextPoint.left:V;e.setCoords(),["cervix","fetalPresentation"].includes(e.origin.key)&&e.top<q&&e.set("top",q),e.top<Y&&e.set("top",Y),e.top>A&&e.set("top",A),e.left<t&&e.set("left",t),e.left>n&&e.set("left",n)}function te(e,t="moving"){const{title:n,key:o,data:i}=e.origin;x.point={x:e.left,y:e.top},x.list=[`${n} ${"hover"===t?i.value:C(o,e.top)}`,`时间 ${S(e.left).slice(-5)}`],x.show=!0}function ne(e,t){if(g(e)&&function(e){const t=H+864e5,n=new Date(e).getTime();return n>=H&&n<=t}(e.time)){const n=T(e.time),o=j(t.key,t.range,e.value);return[n,o<Y?Y:o>A?A:o]}}function oe(e,t){return e+1>t[1]?t[0]:e+1}return a(y,k,"birthProcess"),function(){const t=new e.Rect({...$,width:R-I-B-1,height:A-1,left:I,top:0,fill:"transparent"});y.value.add(t)}(),function(){function t(t,n="left"){let r="left"===n?I:V;t.forEach(((t,n)=>{const{range:a,spaceValue:u,width:p,title:h,titleStyle:g,key:m,position:v="center",spaceGridNumber:k=1,showNumber:w,showMaxMinNumber:x}=t,b=[],T=[],j=r+p/2,S=function(e,t){const n=[],[o,i]=e;for(let e=o;t>0?e<=i:e>=i;e+=t)n.push(e);return n}(a,u),C=S.length;S.forEach(((e,n)=>{const{lineXMain:o,lineXSub:i,textLeft:l}=c(v,r,p),s=A-n*W*k,a=0===n?A-8:n!==S.length-1||Y||q&&"FHR"!==m?s:Y+8;!w||(0===n||n===C-1)&&!x||b.push(f(String(e),t,l,a)),T.push(...d(t,n,o,i,s,W,Y,C))}));const P=new e.Rect({...s,strokeWidth:.5,width:p,height:A,left:j,top:A/2}),M=o([j,Y>0?Y-W/2:W/2],{value:String(h),...i,...g}),E=new e.Group([...T,...b,P,...M?[M]:[]],{objectCaching:!1,...l});y.value.add(E),E.sendToBack(),r+=p}))}t(D),t(O,"right")}(),function(){const{show:t,startTime:n,range:r=[0,23],position:s="top",style:a}=E.time,{show:u,range:c=[0,23],position:f,style:d}=E.processTime;if(t||u){const p=[],h=[],g=[],m=[],v=L+X/2,k=W/2;for(let e=0;e<G.mainXCell;e++){if(t){const t=0===e?+n.slice(11,13):oe(p.at(-1),r);p.push(t);const l="top"===s?Y-k:A+k;g.push(o([v+e*X,l],{value:String(t),...i,...a||{}}))}if(u){const t=0===e?c[0]:h.at(-1)+1;h.push(t);const n="top"===f?k:J-k;m.push(o([v+e*X,n],{value:String(t),...i,...d||{}}))}}const w=new e.Group([...g,...m],{objectCaching:!1,...l});y.value.add(w),y.value.sendToBack(w)}}(),function(){var e;const n=Object.values(z),o=[],i={},r=K.find((e=>"cervix"===e.key&&e.show)),l=null==(e=null==r?void 0:r.data)?void 0:e.find((e=>3==+e.value));function s(e,t){const{key:n,range:o}=r||{},i=j(n,o,10),l=[0,t],s=[-t/e,0],a=[(A-i-t)/e,A-i],u=[V-L,e*(V-L)+t];let c=[],f=[];function d([n,o]){return Math.abs(o-e*n-t)<=1}function p([e,t]){const[n,o]=[...h([e,t])];return n>=L&&n<=V&&o>=i&&o<=A}function h([e,t]){return[L+e,A-t]}return d(l)&&p(l)&&(c=h(l)),d(s)&&p(s)&&(c=h(s)),d(a)&&p(a)&&(f=h(a)),d(u)&&p(u)&&(f=h(u)),[...c,...f]}n.forEach((e=>{if(!e.show)return;const{key:n}=e;switch(n){case"fetalPresentation":{const{range:i,show:r}=K.find((e=>e.key===n));if(r){const r=j(n,i,0);o.push(t([L,r,V,r],{...e}))}break}case"alert":if(l){const{key:n,range:a}=r||{},u=216e5,c={time:v(new Date(new Date(l.time).getTime()+u),"yyyy-MM-dd HH:mm"),value:10},[f,d]=[T(l.time)-L,A-j(n,a,l.value)],[p,h]=[T(c.time)-L,A-j(n,a,c.value)],g=(h-d)/(p-f),m=d-f*g,y=s(g,m);y.length>0&&(o.push(t(y,{...e})),Object.assign(i,{k:g,b:m}))}break;case"handling":if(l){const{k:n,b:r}=i,a=144e5,u=s(n,r-(T(v(new Date(new Date(l.time).getTime()+a),"yyyy-MM-dd HH:mm"))-T(l.time))*n);u.length>0&&o.push(t(u,{...e}))}}})),y.value.add(...o)}(),U(),function(){function e(e,t){const n=K.findIndex((t=>t.key===e.key));return{renderItem:()=>e.title,origin:{title:e.title,unit:e.unit,dataIndex:n,key:e.key},pointer:t}}k.event.evented&&y.value.on("mouse:up",(t=>{if(3===t.button){const{x:n=0,y:o=0}=t.pointer||{};n>=L&&n<=V&&o>=Y&&o<=A&&(b.point={x:n,y:o},b.show=!0,t.target?(b.target=t.target,b.list=["删除节点"],y.value.forEachObject((e=>{e.origin&&e.left===t.target.left&&e.top===t.target.top&&b.list.push({renderItem:()=>e.origin.title,origin:{...e.origin},mode:"remove",pointer:t.pointer})}))):(b.target=null,b.list=["新增节点"],K.filter((e=>e.show)).forEach((i=>{if(!P(n,"key",X).includes(i.key)){if(["cervix","fetalPresentation"].includes(i.key)&&o<q)return;b.list.push(e(i,t.pointer))}})),1===b.list.length&&(b.show=!1,M("repeat"),console.log("当前时间段内无可新增节点"))))}}))}(),function(){const t=R-B/2;function n(t,n){if(!t.length)return;let l=Y;const s=[];t.forEach((t=>{const o=t.title.split("").join("\n"),a=N.findIndex((e=>e.key===t.key)),u=new e.Text(String(o),{...i,...t.titleStyle||{},originY:"top",left:n,top:l,lineHeight:1}),c=r(t.type,{left:n,top:l+u.height+3,...t.pointAttr,originY:"top",origin:{title:t.title,unit:t.unit,type:t.type,dataIndex:a,key:t.key,isMenu:!0},originLeft:n,originTop:l+u.height+3,...k.event});l+=u.height+c.height+15,function(e){function t(e){const{left:t,top:n}=e;return t>=L&&t<=V&&n>=Y&&n<=A}e.on("moving",(()=>{e.set("originY","center"),t(e)?(ee(e),te(e)):x.show=!1})),e.on("mouseup:before",(n=>{if(x.show=!1,0===n.e.button&&t(e))if(P(e.left,"key",X).includes(e.origin.key))M("repeat");else{const t={data:{time:S(e.left),value:C(e.origin.key,e.top)},...e.origin};w("add",t),Z(t)}!function(e){e.setCoords().set({originY:"top",left:e.originLeft,top:e.originTop})}(e)}))}(c),s.push(u,c)})),o(s),y.value.add(...s)}function o(e){const t=e.at(-1),n=(A-Y)/2,o=(t.height+t.top-Y)/2;e.forEach((e=>{const t=e.top+n-o;e.set({top:t,originTop:t})}))}n(D,I/2),n(O,t)}(),{clickMenu:function({item:e,target:t}){const n={...e.origin};"remove"===e.mode?(w("remove",n),Z(n,"remove")):(Object.assign(n,{data:{time:S(e.pointer.x),value:C(e.origin.key,e.pointer.y)}}),w("add",n),Z(n))},redrawPoints:_}}export{y as useBirthProcess};
@@ -0,0 +1,2 @@
1
+ export * from './useTop';
2
+ export * from './useCenter';
@@ -0,0 +1 @@
1
+ export{useTop}from"./useTop.js";export{useCenter}from"./useCenter.js";
@@ -0,0 +1,4 @@
1
+ import { type Ref } from 'vue';
2
+ import { fabric } from '../../../../../../es/shared/utils/fabricjs';
3
+ import { AnyObject } from '../../../../../../es/shared/types';
4
+ export declare function useCenter(canvas: Ref<fabric.Canvas>, propItems: AnyObject): void;
@@ -0,0 +1 @@
1
+ import"../useDraw.js";import{useGrid as r}from"../useGrid.js";import"date-fns";import"lodash-es";import"@vueuse/core";import"../../../../../shared/utils/fabricjs/index.js";import"vue";import"../temperature/useShadow.js";function e(e,o){r(e,o)}export{e as useCenter};
@@ -3,4 +3,24 @@ import { fabric } from '../../../../../../es/shared/utils/fabricjs';
3
3
  import { AnyObject } from '../../../../../../es/shared/types';
4
4
  export declare function useSurgicalAnesthesiaChart(canvas: Ref<fabric.Canvas>, props: AnyObject, emits: Function, canvasRef: Ref<HTMLCanvasElement | null>): {
5
5
  propItems: any;
6
+ redrawPoints: Ref<any>;
7
+ select: Ref<any>;
8
+ pointTipProps: {
9
+ show: boolean;
10
+ point: {
11
+ x: number;
12
+ y: number;
13
+ };
14
+ list: string[];
15
+ };
16
+ pointMenuProps: {
17
+ show: boolean;
18
+ point: {
19
+ x: number;
20
+ y: number;
21
+ };
22
+ list: any[];
23
+ target: any;
24
+ };
25
+ clickMenu: Ref<any>;
6
26
  };
@@ -1 +1 @@
1
- import{ref as t,reactive as e,computed as a}from"vue";import{defaultBorderStyle as r}from"../useDraw.js";import"../../../../../shared/utils/fabricjs/index.js";import"date-fns";import"lodash-es";import"@vueuse/core";import"../temperature/useShadow.js";function i(i,l,o,n){t(),t(),t(),e({show:!1,point:{x:0,y:0},list:[]}),e({show:!1,point:{x:0,y:0},list:[],target:null});const u=a((()=>{let t=0;return function e(a){a.forEach((a=>{var r;(null==(r=a.children)?void 0:r.length)?e(a.children):t++}))}(l.data.top.treeData),t})),d=a((()=>l.data.top.tree.cellHeight)),s=a((()=>{const{xAxis:t}=l.data;return"top"===t.position?t.height:0}));a((()=>s.value+d.value*u.value));const h=a((()=>{const{grid:t}=l.data;return t.mainXCell*t.subXCell})),v=a((()=>{const{grid:t}=l.data;return t.mainYCell*t.subYCell}));a((()=>(p.value-c.value)/h.value)),a((()=>(m.value-g.value)/v.value));const c=a((()=>l.data.width-l.data.left.width)),p=a((()=>{var t;const{width:e,right:a}=l.data;if(!a)return e;return e-(null!=(t=a.width)?t:0)})),g=a((()=>l.data.xAxis.height+d.value*u.value)),m=a((()=>{var t;const{bottom:e=null,height:a}=l.data;if(!e)return a;return a-(null!=(t=e.height)?t:0)}));return{propItems:e({canvasWidth:l.data.width,canvasHeight:l.data.height,borderStyle:{...r,...l.data.borderStyle||{}},grid:l.data.grid,other:l.data.other})}}export{i as useSurgicalAnesthesiaChart};
1
+ import{ref as t,reactive as e,onMounted as i,nextTick as r}from"vue";import{defaultBorderStyle as o}from"../useDraw.js";import"../../../../../shared/utils/fabricjs/index.js";import{format as n}from"date-fns";import{getChildrenSize as a}from"../../utils/index.js";import"@vueuse/core";import{cloneDeep as s,range as l}from"lodash-es";import"../temperature/useShadow.js";import{useCenter as d}from"./useCenter.js";function u(u,c,h,p){var m;const g=t(),f=t(),x=t(),w=e({show:!1,point:{x:0,y:0},list:[]}),b=e({show:!1,point:{x:0,y:0},list:[],target:null}),y=null!=(m=c.data.left.width)?m:0,v=a(c.data.top.treeData),Y=function(){const{xAxis:t}=c.data;return"top"===t.position?t.height:0}(),C=function(){console.log(y);const t=s(c.data.top.treeData);let e=0;const{cellWidth:i,cellHeight:r}=c.data.top.tree;return function t(o,n=0){o.forEach((o=>{var s;const l={top:e*r+Y,left:n*i,width:i,height:r};if(e++,null==(s=o.children)?void 0:s.length){e--;const i=a(o.children);l.height=i*r,t(o.children,n+1)}else l.width=y-l.left;Object.assign(o,l)}))}(t),t}();console.log(C);const j=function(){const{grid:t}=c.data;return t.mainXCell*t.subXCell}(),H=c.data.top.tree.cellHeight,D=Y+H*v,X=function(){const t=s(c.data.xAxis),{position:e,startTime:i,spaceValue:r,spaceTimeStamp:o}=t,a=Date.parse(i),d=l(j/r+1).map((t=>0===t?i:n(new Date(a+t*o),"yyyy-MM-dd HH:mm:ss")));return{...t,list:d,left:y,top:"top"===e?0:D}}(),A=function(){const{grid:t}=c.data;return t.mainYCell*t.subYCell}(),G=function(){var t;const{width:e,right:i}=c.data;if(!i)return e;return e-(null!=(t=i.width)?t:0)}(),M=c.data.xAxis.height+H*v,S=function(){var t;const{bottom:e=null,height:i}=c.data;if(!e)return i;return i-(null!=(t=e.height)?t:0)}(),N=(G-y)/j,P=(S-M)/A,T=e({canvasWidth:c.data.width,canvasHeight:c.data.height,borderStyle:{...o,...c.data.borderStyle||{}},grid:c.data.grid,other:c.data.other,topGridYNumber:v,topGridYCellHeight:H,topGridOriginY:Y,topGridEndY:D,treeData:C,xAxis:X,gridXNumber:j,gridYNumber:A,xCellWidth:N,yCellHeight:P,originX:y,endX:G,originY:M,endY:S});return i((async()=>{await r(),d(u,T)})),{propItems:T,redrawPoints:f,select:g,pointTipProps:w,pointMenuProps:b,clickMenu:x}}export{u as useSurgicalAnesthesiaChart};
@@ -0,0 +1,4 @@
1
+ import { type Ref } from 'vue';
2
+ import { fabric } from '../../../../../../es/shared/utils/fabricjs';
3
+ import { AnyObject } from '../../../../../../es/shared/types';
4
+ export declare function useTop(canvas: Ref<fabric.Canvas>, propItems: AnyObject): void;
@@ -0,0 +1 @@
1
+ function o(o,n){console.log("top")}export{o as useTop};
@@ -1,4 +1,4 @@
1
1
  import { Ref } from 'vue';
2
2
  import { fabric } from '../../../../../es/shared/utils/fabricjs';
3
3
  import { AnyObject } from '../../../../../es/shared/types';
4
- export declare function useGrid(canvas: Ref<fabric.Canvas>, propItems: AnyObject, isBirthProcess?: boolean): void;
4
+ export declare function useGrid(canvas: Ref<fabric.Canvas>, propItems: AnyObject, type?: string): void;
@@ -1 +1 @@
1
- import{fabric as e}from"../../../../shared/utils/fabricjs/index.js";import{drawLine as n,defaultStyle as l}from"./useDraw.js";function i(i,s,t=!1){var o,r,u,d;const{gridYNumber:a,originY:c,grid:S,originX:b,endX:y,xCellWidth:m,yCellHeight:p,gridXNumber:f,endY:g,borderStyle:h}=s,v=[],C=[],L=new Set;for(let e=0;e<=a;e++){const l=c+parseInt(String(p*(a-e)));if(t){const e=n([b,l,y,l],{...h,...(null==(o=S.mainLineStyle)?void 0:o.x)||{}});v.push(e)}else{const i=e%S.subYCell==0?(null==(r=S.mainLineStyle)?void 0:r.x)||{}:S.subLineStyle||{},s=n([b,l,y,l],i);e%S.subYCell==0?L.add(s):v.push(s)}}for(let e=0;e<=f;e++){const l=b+parseInt(String(m*e));if(t){const e=n([l,c,l,g],{...h,...(null==(u=S.mainLineStyle)?void 0:u.y)||{}});C.push(e)}else{let i=S.subLineStyle||{};e%S.subSecondXCell==0&&(i=S.subSecondLineStyle||{}),e%S.subXCell==0&&(i=0!==e&&e!==f?(null==(d=S.mainLineStyle)?void 0:d.y)||{}:h);const s=n([l,c,l,g],i);e%S.subXCell==0&&0!==e&&e!==f?L.add(s):C.push(s)}}const X=new e.Group([...C,...v,...L],l);i.value.add(X),i.value.sendToBack(X)}export{i as useGrid};
1
+ import{fabric as e}from"../../../../shared/utils/fabricjs/index.js";import{drawLine as n,defaultStyle as l}from"./useDraw.js";function i(i,s,t="temperature"){var r,o,u,d;const{gridYNumber:a,originY:c,grid:b,originX:S,endX:m,xCellWidth:p,yCellHeight:y,gridXNumber:h,endY:f,borderStyle:g}=s,v=[],C=[],L=new Set;for(let e=0;e<=a;e++){const l=c+parseInt(String(y*(a-e)));if("birthProcess"===t){const e=n([S,l,m,l],{...g,...(null==(r=b.mainLineStyle)?void 0:r.x)||{}});v.push(e)}else{const i=e%b.subYCell==0?(null==(o=b.mainLineStyle)?void 0:o.x)||{}:b.subLineStyle||{},s=n([S,l,m,l],i);e%b.subYCell==0?L.add(s):v.push(s)}}for(let e=0;e<=h;e++){const l=S+parseInt(String(p*e));if("birthProcess"===t){const e=n([l,c,l,f],{...g,...(null==(u=b.mainLineStyle)?void 0:u.y)||{}});C.push(e)}else{let i=b.subLineStyle||{};e%b.subSecondXCell==0&&(i=b.subSecondLineStyle||{}),e%b.subXCell==0&&(i=0!==e&&e!==h?(null==(d=b.mainLineStyle)?void 0:d.y)||{}:g);const s=n([l,c,l,f],i);e%b.subXCell==0&&0!==e&&e!==h?L.add(s):C.push(s)}}const X=new e.Group([...C,...v,...L],l);i.value.add(X),i.value.sendToBack(X)}export{i as useGrid};
@@ -15,6 +15,10 @@ export declare type ITreeItem = Partial<{
15
15
  value: AnyObject;
16
16
  }>;
17
17
  children: ITreeItem[];
18
+ top: number;
19
+ left: number;
20
+ width: number;
21
+ height: number;
18
22
  }>;
19
23
  interface ImainLineStyle {
20
24
  x: fabric.ILineOptions;
@@ -1,4 +1,4 @@
1
- import { IPoint } from '../interface';
1
+ import { IPoint, ITreeItem } from '../interface';
2
2
  import { AnyObject } from '../../../../../es/shared/types';
3
3
  export declare function isEffectiveNode(node: IPoint): string | number | boolean;
4
4
  export declare function deleteProperty(data: AnyObject, list: AnyObject[]): {};
@@ -14,3 +14,4 @@ export declare function getType(type: string): string;
14
14
  export declare function isValidValue(value: number | string): boolean;
15
15
  export declare function isOverlapPoint(pointObj1: any, pointObj2: any): boolean;
16
16
  export declare function getFloorNumber(value: number, n?: number): number;
17
+ export declare function getChildrenSize(treeData: ITreeItem[]): number;
@@ -1 +1 @@
1
- import{isNull as n}from"lodash-es";function t(n){return(null==n?void 0:n.time)&&((null==n?void 0:n.value)||0===(null==n?void 0:n.value))}function e(n,t){const e={};for(const u in n)t.map((n=>n.type)).includes(u)||(e[u]=n[u]);return e}function u(n,t){const e=t.findIndex((t=>new Date(t.time).getTime()>new Date(n).getTime()));return~e?e:t.length}function r(n){return["temperature","pulse"].includes(n)}function o(n,t){return n.includes("心率")?"pulse_other":t}function i(n){return n.includes("_other")?n.split("_")[0]:n}function l(t){return!Number.isNaN(+t)&&!n(t)}function c(n,t){return f(n.left,1)===f(t.left,1)&&Math.abs(f(n.top,1)-f(t.top,1))<=2}function f(n,t=100){return Math.floor(n*t)/t}export{e as deleteProperty,f as getFloorNumber,u as getIndex,i as getType,t as isEffectiveNode,r as isOneLine,c as isOverlapPoint,l as isValidValue,o as setOtherType};
1
+ import{isNull as n}from"lodash-es";function t(n){return(null==n?void 0:n.time)&&((null==n?void 0:n.value)||0===(null==n?void 0:n.value))}function e(n,t){const e={};for(const r in n)t.map((n=>n.type)).includes(r)||(e[r]=n[r]);return e}function r(n,t){const e=t.findIndex((t=>new Date(t.time).getTime()>new Date(n).getTime()));return~e?e:t.length}function u(n){return["temperature","pulse"].includes(n)}function i(n,t){return n.includes("心率")?"pulse_other":t}function o(n){return n.includes("_other")?n.split("_")[0]:n}function l(t){return!Number.isNaN(+t)&&!n(t)}function c(n,t){return f(n.left,1)===f(t.left,1)&&Math.abs(f(n.top,1)-f(t.top,1))<=2}function f(n,t=100){return Math.floor(n*t)/t}function s(n){let t=0;return n.forEach((n=>{var e;(null==(e=n.children)?void 0:e.length)?t+=s(n.children):t++})),t}export{e as deleteProperty,s as getChildrenSize,f as getFloorNumber,r as getIndex,o as getType,t as isEffectiveNode,u as isOneLine,c as isOverlapPoint,l as isValidValue,i as setOtherType};
@@ -34,16 +34,14 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
34
34
  type: BooleanConstructor;
35
35
  default: boolean;
36
36
  };
37
+ showColumnNames: {
38
+ type: import("vue").PropType<import("./src/types").FieldSetColumnName[]>;
39
+ };
40
+ groupSetting: {
41
+ type: import("vue").PropType<Partial<Record<"firstRowGroup" | "secondRowGroup" | "thirdRowGroup" | "fourthRowGroup" | "fifthRowGroup" | "sixthRowGroup" | "seventhRowGroup" | "eighthRowGroup" | "ninthRowGroup" | "tenthRowGroup", import("..").IhoTableRowGroupItem[]>> | undefined>;
42
+ };
37
43
  }, {
38
44
  fieldsMapping: Record<string, string>;
39
- fixedWayOptions: {
40
- label: string;
41
- value: string;
42
- }[];
43
- sortOptions: {
44
- label: string;
45
- value: string;
46
- }[];
47
45
  props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
48
46
  fields: {
49
47
  type: import("vue").PropType<Partial<{
@@ -78,6 +76,12 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
78
76
  type: BooleanConstructor;
79
77
  default: boolean;
80
78
  };
79
+ showColumnNames: {
80
+ type: import("vue").PropType<import("./src/types").FieldSetColumnName[]>;
81
+ };
82
+ groupSetting: {
83
+ type: import("vue").PropType<Partial<Record<"firstRowGroup" | "secondRowGroup" | "thirdRowGroup" | "fourthRowGroup" | "fifthRowGroup" | "sixthRowGroup" | "seventhRowGroup" | "eighthRowGroup" | "ninthRowGroup" | "tenthRowGroup", import("..").IhoTableRowGroupItem[]>> | undefined>;
84
+ };
81
85
  }>> & {
82
86
  onReset?: ((...args: any[]) => any) | undefined;
83
87
  onClose?: ((...args: any[]) => any) | undefined;
@@ -86,47 +90,24 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
86
90
  emit: (event: "close" | "save" | "reset", ...args: any[]) => void;
87
91
  newFields: import("vue").Ref<import("../../../es/shared/types").AnyObject[]>;
88
92
  columns: import("vue").Ref<import("../../../es/shared/types").AnyObject[]>;
93
+ fieldList: import("vue").ComputedRef<import("../../../es/shared/types").AnyObject[]>;
89
94
  handleFieldSave: () => void;
90
95
  onCancle: () => void;
91
96
  reset: () => void;
92
- setOptions: (column: import("../../../es/shared/types").AnyObject) => {
93
- label: string;
94
- value: string;
95
- }[];
96
- setStyle: (column: import("../../../es/shared/types").AnyObject) => import("vue").CSSProperties;
97
97
  isShowColumn: (column: import("../../../es/shared/types").AnyObject) => boolean;
98
98
  initFields: () => import("../../../es/shared/types").AnyObject[];
99
+ handleGroup: (fields: import("../../../es/shared/types").AnyObject[]) => import("../../../es/shared/types").AnyObject[];
99
100
  getTableFields: () => import("../../../es/shared/types").AnyObject[];
100
101
  handleAllCheck: (checked: boolean, field: string) => void;
101
- handleCheck: (checked: boolean, column: import("../../../es/shared/types").AnyObject) => void;
102
- isDisable: (item: Partial<{
103
- [key: string]: any;
104
- id: string;
105
- name: string;
106
- show: boolean;
107
- sort: boolean;
108
- sortDirection: "NONE" | "ASC" | "DESC";
109
- title: string;
110
- alias: string;
111
- fixedShow: boolean;
112
- fixedWay: "NONE" | "LEFT" | "RIGHT";
113
- columnWidth: number | null;
114
- editable: boolean;
115
- editableDisable: boolean;
116
- required: boolean;
117
- requiredDisable: boolean;
118
- hide: boolean;
119
- }>, key: string) => any;
102
+ handleCheck: ({ checked, column }: {
103
+ checked: boolean;
104
+ column: import("../../../es/shared/types").AnyObject;
105
+ }) => void;
120
106
  initColumns: () => void;
121
107
  isNoAllCheck: (field: string) => boolean;
122
108
  NButton: any;
123
109
  NCheckbox: any;
124
- NSelect: any;
125
- NInput: any;
126
- NInputNumber: any;
127
- NTooltip: any;
128
110
  NPopconfirm: any;
129
- NIcon: any;
130
111
  Draggable: import("vue").DefineComponent<{
131
112
  list: {
132
113
  type: ArrayConstructor;
@@ -200,7 +181,139 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
200
181
  modelValue: unknown[];
201
182
  componentData: Record<string, any>;
202
183
  }>;
203
- ReorderTwoOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
184
+ Row: import("vue").DefineComponent<{
185
+ element: {
186
+ type: import("vue").PropType<import("../../../es/shared/types").AnyObject>;
187
+ default: () => {};
188
+ };
189
+ columns: {
190
+ type: import("vue").PropType<Partial<{
191
+ [key: string]: any;
192
+ id: string;
193
+ name: string;
194
+ show: boolean;
195
+ sort: boolean;
196
+ sortDirection: "NONE" | "ASC" | "DESC";
197
+ title: string;
198
+ alias: string;
199
+ fixedShow: boolean;
200
+ fixedWay: "NONE" | "LEFT" | "RIGHT";
201
+ columnWidth: number | null;
202
+ editable: boolean;
203
+ editableDisable: boolean;
204
+ required: boolean;
205
+ requiredDisable: boolean;
206
+ hide: boolean;
207
+ }>[]>;
208
+ default: () => never[];
209
+ };
210
+ }, {
211
+ fixedWayOptions: {
212
+ label: string;
213
+ value: string;
214
+ }[];
215
+ sortOptions: {
216
+ label: string;
217
+ value: string;
218
+ }[];
219
+ props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
220
+ element: {
221
+ type: import("vue").PropType<import("../../../es/shared/types").AnyObject>;
222
+ default: () => {};
223
+ };
224
+ columns: {
225
+ type: import("vue").PropType<Partial<{
226
+ [key: string]: any;
227
+ id: string;
228
+ name: string;
229
+ show: boolean;
230
+ sort: boolean;
231
+ sortDirection: "NONE" | "ASC" | "DESC";
232
+ title: string;
233
+ alias: string;
234
+ fixedShow: boolean;
235
+ fixedWay: "NONE" | "LEFT" | "RIGHT";
236
+ columnWidth: number | null;
237
+ editable: boolean;
238
+ editableDisable: boolean;
239
+ required: boolean;
240
+ requiredDisable: boolean;
241
+ hide: boolean;
242
+ }>[]>;
243
+ default: () => never[];
244
+ };
245
+ }>> & {
246
+ onUpdateChecked?: ((...args: any[]) => any) | undefined;
247
+ }>>;
248
+ emit: (event: "updateChecked", ...args: any[]) => void;
249
+ setOptions: (column: import("../../../es/shared/types").AnyObject) => {
250
+ label: string;
251
+ value: string;
252
+ }[];
253
+ onUpdateChecked: (checked: boolean, column: import("../../../es/shared/types").AnyObject) => void;
254
+ NCheckbox: any;
255
+ NSelect: any;
256
+ NInput: any;
257
+ NInputNumber: any;
258
+ NTooltip: any;
259
+ NIcon: any;
260
+ setStyle: typeof import("./src/utils").setStyle;
261
+ isDisable: typeof import("./src/utils").isDisable;
262
+ ReorderTwoOutline: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
263
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "updateChecked"[], "updateChecked", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
264
+ element: {
265
+ type: import("vue").PropType<import("../../../es/shared/types").AnyObject>;
266
+ default: () => {};
267
+ };
268
+ columns: {
269
+ type: import("vue").PropType<Partial<{
270
+ [key: string]: any;
271
+ id: string;
272
+ name: string;
273
+ show: boolean;
274
+ sort: boolean;
275
+ sortDirection: "NONE" | "ASC" | "DESC";
276
+ title: string;
277
+ alias: string;
278
+ fixedShow: boolean;
279
+ fixedWay: "NONE" | "LEFT" | "RIGHT";
280
+ columnWidth: number | null;
281
+ editable: boolean;
282
+ editableDisable: boolean;
283
+ required: boolean;
284
+ requiredDisable: boolean;
285
+ hide: boolean;
286
+ }>[]>;
287
+ default: () => never[];
288
+ };
289
+ }>> & {
290
+ onUpdateChecked?: ((...args: any[]) => any) | undefined;
291
+ }, {
292
+ columns: Partial<{
293
+ [key: string]: any;
294
+ id: string;
295
+ name: string;
296
+ show: boolean;
297
+ sort: boolean;
298
+ sortDirection: "NONE" | "ASC" | "DESC";
299
+ title: string;
300
+ alias: string;
301
+ fixedShow: boolean;
302
+ fixedWay: "NONE" | "LEFT" | "RIGHT";
303
+ columnWidth: number | null;
304
+ editable: boolean;
305
+ editableDisable: boolean;
306
+ required: boolean;
307
+ requiredDisable: boolean;
308
+ hide: boolean;
309
+ }>[];
310
+ element: import("../../../es/shared/types").AnyObject;
311
+ }>;
312
+ isArray: {
313
+ (value?: any): value is any[];
314
+ <T>(value?: any): value is any[];
315
+ };
316
+ setStyle: typeof import("./src/utils").setStyle;
204
317
  }, 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<{
205
318
  fields: {
206
319
  type: import("vue").PropType<Partial<{
@@ -235,6 +348,12 @@ declare const FieldSet: SFCWithInstall<import("vue").DefineComponent<{
235
348
  type: BooleanConstructor;
236
349
  default: boolean;
237
350
  };
351
+ showColumnNames: {
352
+ type: import("vue").PropType<import("./src/types").FieldSetColumnName[]>;
353
+ };
354
+ groupSetting: {
355
+ type: import("vue").PropType<Partial<Record<"firstRowGroup" | "secondRowGroup" | "thirdRowGroup" | "fourthRowGroup" | "fifthRowGroup" | "sixthRowGroup" | "seventhRowGroup" | "eighthRowGroup" | "ninthRowGroup" | "tenthRowGroup", import("..").IhoTableRowGroupItem[]>> | undefined>;
356
+ };
238
357
  }>> & {
239
358
  onReset?: ((...args: any[]) => any) | undefined;
240
359
  onClose?: ((...args: any[]) => any) | undefined;