cnhis-design-vue 3.2.3-beta.23 → 3.2.3-beta.24

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.
@@ -1 +1 @@
1
- import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{drawText as e,defaultTextStyle as i,defaultStyle as n,drawPoint as o}from"../useDraw.js";import{useGrid as r}from"../useGrid.js";import{useBirthProcessCumputedPoint as l}from"../useCumputedPoint.js";import"../useEvent.js";import{getScaleInfo as s,drawScaleNumber as a,drawScaleLine as u}from"../useScaleColumn.js";import{useCommon as c}from"../useCommon.js";import"vue";import{isEffectiveNode as f,getTime as h,getScaleNumberList as d}from"../../utils/index.js";import{cloneDeep as p}from"lodash-es";import"date-fns";import"../temperature/useShadow.js";import"naive-ui";import"@vueuse/core";function m(m,v,g,x,y){const{computedX:b,computedY:w,getXValue:S,getYValue:E}=l(v),{getEqualXTypes:L,handleAddPrevent:j,isGridLimit:k,setPrevAndNextPoint:X,getPointEventProps:P}=c(m,g,v),{xAxis:A,grid:C,originX:T,originY:G,xCellWidth:Y,endY:N,startTime:V,leftScales:H,rightScales:M,yCellHeight:$,endX:B,scaleValues:W,canvasWidth:q,borderStyle:z,event:D,other:F,timeXAxisHeight:I,canvasHeight:R,extraTimeXAxisList:J}=v,K=p(W),O=new Set;function Q(){K.filter((t=>t.show)).forEach(((t,r)=>{var l;const s=[],a=[],u=[];null==(l=t.data)||l.forEach(((l,c)=>{!function(l,c,f){if(!l)return;let h,d;const{pointAttr:p={},lineAttr:m={},title:v="",key:g,type:y="circle",childbirthStyle:b={}}=t,w=t.data[f+1],L=Z(w,t);if(l&&L&&!c.breakpoint)d=U([...l,...L],m);else if(l&&!L&&!c.breakpoint){const e=Z(w,t);d=e?U([...l,...e],m):null}if(c.childbirth){const t=l[0]+Y,n=l[1]+$/2,o=U([l[0],l[1],t,n],m);u.push(o);const r=e([t,n],{value:String(c.childbirth),...i,...b,backgroundColor:"#fff"});u.push(r)}const j=a[f-1],k={origin:{data:c,title:v,key:g||"",dataIndex:r,index:f},leftLine:j,rightLine:d,...p,...P(),...n};l&&(j||(k.leftLine=null),h=o(y,{left:l[0],top:l[1],...k}));a.push(d),h&&(!function(t){D.hovered&&(t.on("mouseover",(()=>{!function(t,e="moving"){const{title:i,key:n,data:o}=t.origin;x.point={x:t.left,y:t.top},x.list=[`${i} ${"hover"===e?o.value:E(n,t.top)}`,`时间 ${S(t.left).slice(-5)}`],x.show=!0}(t,"hover")})),t.on("mouseout",(()=>{x.show=!1})))}(h),s.push(h),O.add(h))}(Z(l,t),l,c)})),Promise.all(s).then((t=>{const e=a.filter((t=>t));X(t),Promise.all(u).then((i=>{m.value.add(...e,...t,...i),t.forEach((t=>{null==t||t.bringToFront()}))}))}))}))}function U([e,i,o,r],l){return new t.Polyline([{x:e,y:i},{x:o,y:i},{x:o,y:r}],{...l,fill:"transparent",...n})}function Z(t,e){if(f(t)&&function(t){const e=V+864e5,i=h(t);return i>=V&&i<=e}(t.time)){const i=b(t.time),n=w(e.key,e.range,t.value);return[i,n<G?G:n>N?N:n]}}return r(m,v),function(){const e=new t.Rect({...z,width:B-T,height:N-G,left:T,top:G,fill:"transparent"});m.value.add(e)}(),function(){function o(o,r="left"){const l=10;let c="left"===r?0:B;o.forEach(((o,r)=>{const{range:f,spaceValue:h,width:p,title:v,titleStyle:g,unit:x,key:y,position:b="center",spaceGridNumber:w=1,showNumber:S,showMaxMinNumber:E}=o,L=[],j=[],k=d(f,h),X=k.length,{lineXMain:P,lineXSub:A,textLeft:C}=s(b,c,p);k.forEach(((t,e)=>{const i=N-e*$*w;!S||(0===e||e===X-1)&&!E||L.push(a(String(t),o,C,i)),j.push(...u(o,e,P,A,i,$,G,X))}));const T=e([c+l,G+(N-G)/2],{value:String(v+"("+x+")"),...i,originX:"center",angle:-90,...g}),Y=new t.Group([...j,...L,...T?[T]:[]],{objectCaching:!1,...n});m.value.add(Y),Y.sendToBack(),c+=p}))}o(H),o(M,"right")}(),function(){const{show:o,range:r=[0,20],position:l="top",style:s,spaceGridNumber:a=2,spaceValue:u=2}=A.time;if(o){const o=[],c=$/2;d(r,u).forEach(((t,n)=>{const r="top"===l?G-c:N+I+c;o.push(e([T+n*Y*a,r],{value:0===n?"Admission":String(t),...i,...s}))}));const f=new t.Group(o,{objectCaching:!1,...n});m.value.add(f),m.value.sendToBack(f)}!function(){if((null==J?void 0:J.length)>0){const t=[];J.forEach((n=>{const o=b(n),r=N+I;t.push(e([o,r],{value:String(n.slice(11,16)),...i,originY:"bottom"}))})),m.value.add(...t)}}()}(),function(){const{alertLineList:t=[],alertLineTitle:n="入院时宫颈扩张不同情况"}=F;if(t.length<1)return;const o=e([B,0],{value:n,...i,originX:"right",originY:"top"});m.value.add(o),t.forEach((t=>{const{style:i,data:n=[]}=t;if(n.length<1)return;const o=[],r=K.find((t=>"cervix"===t.key));n.map((t=>({...t,time:V+60*t.time*60*1e3}))).forEach(((t,n,l)=>{const s=Z(t,r),a=Z(l[n+1],r);s&&!a&&o.push(e([s[0],G-10],{value:l[0].value+(r.unit||"cm"),fill:i.stroke||"#000"})),s&&a&&o.push(U([...s,...a],i))})),m.value.add(...o)}))}(),Q(),{redrawPoints:function(){var t;O.size&&(null==(t=m.value)||t.remove(...function(t){const e=[];return t.forEach((t=>{t&&e.push(t),(null==t?void 0:t.leftLine)&&e.push(null==t?void 0:t.leftLine),(null==t?void 0:t.rightLine)&&e.push(null==t?void 0:t.rightLine)})),e}([...O]))),O.clear(),Q()}}}export{m as useNewBirthProcess};
1
+ import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{drawText as e,defaultTextStyle as i,defaultStyle as n,drawPoint as o}from"../useDraw.js";import{useGrid as r}from"../useGrid.js";import{useBirthProcessCumputedPoint as l}from"../useCumputedPoint.js";import"../useEvent.js";import{getScaleInfo as s,drawScaleNumber as u,drawScaleLine as a}from"../useScaleColumn.js";import{useCommon as c}from"../useCommon.js";import"vue";import{isEffectiveNode as d,getTime as h,getScaleNumberList as f}from"../../utils/index.js";import{cloneDeep as p,last as m}from"lodash-es";import"date-fns";import"../temperature/useShadow.js";import"naive-ui";import"@vueuse/core";function v(v,g,x,y,b){const{computedX:w,computedY:S,getXValue:E,getYValue:L}=l(g),{getEqualXTypes:j,handleAddPrevent:k,isGridLimit:X,setPrevAndNextPoint:P,getPointEventProps:A}=c(v,x,g),{xAxis:C,grid:T,originX:G,originY:Y,xCellWidth:N,endY:V,startTime:H,leftScales:M,rightScales:$,yCellHeight:B,endX:W,scaleValues:q,canvasWidth:z,borderStyle:D,event:F,other:I,timeXAxisHeight:R,canvasHeight:J,extraTimeXAxisList:K}=g,O=p(q),Q=new Set;function U(){O.filter((t=>t.show)).forEach(((t,r)=>{var l;const s=[],u=[],a=[];null==(l=t.data)||l.forEach(((l,c)=>{!function(l,c,d){if(!l&&!c.childbirth||!(null==c?void 0:c.time)||!tt(c.time))return;let h,f;const{pointAttr:v={},lineAttr:g={},title:x="",key:b,type:S="circle",childbirthStyle:j={}}=t,k=p(t.data[d+1]);k&&!k.value&&k.childbirth&&(k.value=c.value);const X=_(k,t);l&&X&&!c.breakpoint&&(f=Z([...l,...X],g));if(c.childbirth){const t=l?l[0]:w(c.time),n=l?l[1]:m(s).top,o=n+B/2,r=Z([t,n,t,o],g);a.push(r);const u=e([t,o],{value:String(c.childbirth),...i,...j,backgroundColor:"#fff"});a.push(u)}const P=u[d-1],C={origin:{data:c,title:x,key:b||"",dataIndex:r,index:d},leftLine:P,rightLine:f,...v,...A(),...n};l&&(P||(C.leftLine=null),h=o(S,{left:l[0],top:l[1],...C}));f&&u.push(f),h&&(!function(t){F.hovered&&(t.on("mouseover",(()=>{!function(t,e="moving"){const{title:i,key:n,data:o}=t.origin;y.point={x:t.left,y:t.top},y.list=[`${i} ${"hover"===e?o.value:L(n,t.top)}`,`时间 ${E(t.left).slice(-5)}`],y.show=!0}(t,"hover")})),t.on("mouseout",(()=>{y.show=!1})))}(h),s.push(h),Q.add(h))}(_(l,t),l,c)})),Promise.all(s).then((t=>{P(t),Promise.all(a).then((e=>{v.value.add(...u,...t,...e),t.forEach((t=>{null==t||t.bringToFront()}))}))}))}))}function Z([e,i,o,r],l){return new t.Polyline([{x:e,y:i},{x:o,y:i},{x:o,y:r}],{...l,fill:"transparent",...n})}function _(t,e){if(d(t)&&tt(t.time)){const i=w(t.time),n=S(e.key,e.range,t.value);return[i,n<Y?Y:n>V?V:n]}}function tt(t){var e,i;const n=(null==(i=null==(e=null==C?void 0:C.time)?void 0:e.range)?void 0:i[1])||20,o=H+60*n*60*1e3,r=h(t);return r>=H&&r<=o}return r(v,g),function(){const e=new t.Rect({...D,width:W-G,height:V-Y,left:G,top:Y,fill:"transparent"});v.value.add(e)}(),function(){function o(o,r="left"){const l=10;let c="left"===r?0:W;o.forEach(((o,r)=>{const{range:d,spaceValue:h,width:p,title:m,titleStyle:g,unit:x,key:y,position:b="center",spaceGridNumber:w=1,showNumber:S,showMaxMinNumber:E}=o,L=[],j=[],k=f(d,h),X=k.length,{lineXMain:P,lineXSub:A,textLeft:C}=s(b,c,p);k.forEach(((t,e)=>{const i=V-e*B*w;!S||(0===e||e===X-1)&&!E||L.push(u(String(t),o,C,i)),j.push(...a(o,e,P,A,i,B,Y,X))}));const T=e([c+l,Y+(V-Y)/2],{value:String(m+"("+x+")"),...i,originX:"center",angle:-90,...g}),G=new t.Group([...j,...L,...T?[T]:[]],{objectCaching:!1,...n});v.value.add(G),G.sendToBack(),c+=p}))}o(M),o($,"right")}(),function(){const{show:o,range:r=[0,20],position:l="top",style:s,spaceGridNumber:u=2,spaceValue:a=2}=C.time;if(o){const o=[],c=B/2;f(r,a).forEach(((t,n)=>{const r="top"===l?Y-c:V+R+c;o.push(e([G+n*N*u,r],{value:0===n?"Admission":String(t),...i,...s}))}));const d=new t.Group(o,{objectCaching:!1,...n});v.value.add(d),v.value.sendToBack(d)}!function(){if((null==K?void 0:K.length)>0){const t=[];K.forEach((n=>{const o=w(n),r=V+R;t.push(e([o,r],{value:String(n.slice(11,16)),...i,originY:"bottom"}))})),v.value.add(...t)}}()}(),function(){const{alertLineList:t=[],alertLineTitle:n="入院时宫颈扩张不同情况"}=I;if(t.length<1)return;const o=e([W,0],{value:n,...i,originX:"right",originY:"top"});v.value.add(o),t.forEach((t=>{const{style:i,data:n=[]}=t;if(n.length<1)return;const o=[],r=O.find((t=>"cervix"===t.key));n.map((t=>({...t,time:H+60*t.time*60*1e3}))).forEach(((t,n,l)=>{const s=_(t,r),u=_(l[n+1],r);s&&!u&&o.push(e([s[0],Y-10],{value:l[0].value+(r.unit||"cm"),fill:i.stroke||"#000"})),s&&u&&o.push(Z([...s,...u],i))})),v.value.add(...o)}))}(),U(),{redrawPoints:function(){var t;Q.size&&(null==(t=v.value)||t.remove(...function(t){const e=[];return t.forEach((t=>{t&&e.push(t),(null==t?void 0:t.leftLine)&&e.push(null==t?void 0:t.leftLine),(null==t?void 0:t.rightLine)&&e.push(null==t?void 0:t.rightLine)})),e}([...Q]))),Q.clear(),U()}}}export{v as useNewBirthProcess};
@@ -457,9 +457,9 @@ declare const _default: import("vue").DefineComponent<{
457
457
  requiredDisable: boolean;
458
458
  hide: boolean;
459
459
  }>;
460
- isHighlightRow: boolean;
461
460
  idx: number;
462
461
  isHighlight: boolean;
462
+ isHighlightRow: boolean;
463
463
  }>;
464
464
  EditDialog: import("vue").DefineComponent<{
465
465
  visible: {
@@ -575,9 +575,9 @@ declare const _default: import("vue").DefineComponent<{
575
575
  requiredDisable: boolean;
576
576
  hide: boolean;
577
577
  }>;
578
- isHighlightRow: boolean;
579
578
  idx: number;
580
579
  isHighlight: boolean;
580
+ isHighlightRow: boolean;
581
581
  }>;
582
582
  isArray: {
583
583
  (value?: any): value is any[];
@@ -282,8 +282,8 @@ declare const _default: import("vue").DefineComponent<{
282
282
  requiredDisable: boolean;
283
283
  hide: boolean;
284
284
  }>;
285
- isHighlightRow: boolean;
286
285
  idx: number;
287
286
  isHighlight: boolean;
287
+ isHighlightRow: boolean;
288
288
  }>;
289
289
  export default _default;
@@ -1 +1 @@
1
- var e="@cnhis-design-vue/shared",i="3.2.3-beta.23",s="index.ts",n={"naive-ui":"^2.30.0",vue:"^3.2.0"},a={"@vicons/ionicons5":"^0.12.0","lodash-es":"^4.17.21",moment:"^2.29.1","video.js":"^7.19.2","videojs-contrib-hls":"^5.15.0",viewerjs:"^1.10.5","xe-utils":"^3.5.4"},d={name:e,version:"3.2.3-beta.23",private:!0,main:"index.ts",peerDependencies:n,dependencies:a};export{d as default,a as dependencies,s as main,e as name,n as peerDependencies,i as version};
1
+ var e="@cnhis-design-vue/shared",i="3.2.3-beta.24",s="index.ts",n={"naive-ui":"^2.30.0",vue:"^3.2.0"},a={"@vicons/ionicons5":"^0.12.0","lodash-es":"^4.17.21",moment:"^2.29.1","video.js":"^7.19.2","videojs-contrib-hls":"^5.15.0",viewerjs:"^1.10.5","xe-utils":"^3.5.4"},d={name:e,version:"3.2.3-beta.24",private:!0,main:"index.ts",peerDependencies:n,dependencies:a};export{d as default,a as dependencies,s as main,e as name,n as peerDependencies,i as version};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cnhis-design-vue",
3
- "version": "3.2.3-beta.23",
3
+ "version": "3.2.3-beta.24",
4
4
  "license": "ISC",
5
5
  "module": "./es/components/index.js",
6
6
  "main": "./es/components/index.js",
@@ -71,5 +71,5 @@
71
71
  "iOS 7",
72
72
  "last 3 iOS versions"
73
73
  ],
74
- "gitHead": "5e2729505a15989da5ccfad82e64e02ecbcb5db9"
74
+ "gitHead": "eb35722607b65d248e4aaab157a7fce845b8825b"
75
75
  }