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

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{defineComponent as e,ref as s,reactive as t,provide as o,onBeforeUnmount as r,openBlock as n,createElementBlock as i,normalizeStyle as a,unref as c,createVNode as u,withCtx as d,createBlock as m,Fragment as p,createElementVNode as l,renderSlot as h}from"vue";import{NConfigProvider as f,NSpin as S,NLayout as v,NLayoutContent as g}from"naive-ui";import b from"./components/SiderList.vue.js";import y from"./components/ChatHeader.vue.js";import I from"./components/ChatMain.vue.js";import j from"./components/ChatFooter.vue.js";import k from"./components/ChatSearch.vue.js";import{ChatSock as _}from"./utils/chatSock.js";import{instanceAxios as L}from"./api/index.js";import{useTheme as U}from"../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import{isNumber as x}from"lodash-es";import"@vue/shared";import"../../../shared/utils/index.js";import"@vueuse/shared";import"../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import{SUBSCRIBE_MESSAGE_TYPE as C}from"./constants/index.js";import{InjectionIChatState as M,InjectionIChatStompClient as N,InjectionIChatEmits as q}from"./types/index.js";import"./utils/emoji.js";import{useSession as T}from"./hooks/useSession.js";const A={class:"c-biunique-chat__header"},E={class:"toolbar"};var O=e({__name:"Index",props:{token:{type:String,required:!0},orgId:{type:[String,Number],required:!0},userId:{type:String,required:!0},baseURL:{type:String,default:"/fdp-chat"}},emits:["template-click","unread-message-update"],setup(e,{expose:O,emit:V}){const w=e;L.defaults.baseURL=w.baseURL,L.defaults.headers.Authorization="bearer"+w.token;const J=U(),R=s(!1),F=s(),H=t({orgId:w.orgId,currentSessionItem:{},id:"",userInfo:{},msgList:[],currentMsg:{},isAppendMsg:!1,sessionList:[],isChangeSession:!1,updateSessionItem:{},isUpdateSession:!1});o(M,H),o(N,F),o(q,V);const{entrySession:$,setSessionList:z}=T(H);function D(){const e={headers:{AccessToken:w.token,UserId:w.userId},heartbeatFn:()=>{try{F.value.send("test")}catch(e){F.value.disconnect(),D()}},connectCb:()=>{console.log("连接成功"),F.value.subscribe("/user/topic/single",(({body:e})=>{try{console.log(JSON.parse(e),"订阅新增消息");const s=JSON.parse(e),{messageVo:t,sessionVo:o}=s;switch(s.event){case C.MESSAGE:if(s.messageVo.sender===H.userInfo.id)return;t.sender===H.currentSessionItem.receiver&&(H.currentMsg=t,H.isAppendMsg=!0),H.updateSessionItem={receiver:t.sender,lastMessageSendTime:t.sendTime,sortTime:t.sendTime,lastMessage:t.content},H.isUpdateSession=!0;break;case C.NEW_SESSION:H.updateSessionItem=o,H.isUpdateSession=!0}}catch(e){console.log(e)}})),F.value.subscribe("/app/sessionList",(({body:e})=>{try{const s=JSON.parse(e),{currentUser:t,sessionVos:o}=s;if(H.userInfo=t,!(null==o?void 0:o.length))return;z(o)}catch(e){console.log(e)}}))},errorCb:(e,s)=>{console.log("断线了,正在重连...")}};F.value=new _("/fdp-chat/websocket",e)}return async function(){D()}(),r((()=>{var e;null==(e=F.value)||e.disconnect()})),O({getUnreadData:function(){return H.sessionList.filter((e=>x(e.unreadNum)&&e.unreadNum>0))},entrySession:$}),(e,s)=>(n(),i("div",{class:"c-biunique-chat",style:a(c(J))},[u(c(f),{abstract:"",namespace:"c-biunique-chat__popover"},{default:d((()=>[R.value?(n(),m(c(S),{key:0,stroke:"#5585f5"})):(n(),i(p,{key:1},[l("div",A,[u(k),l("div",E,[h(e.$slots,"toolbar")])]),u(c(v),{class:"c-biunique-chat__body","has-sider":""},{default:d((()=>[u(b),u(c(g),{class:"chat-content"},{default:d((()=>[u(y),u(I),u(j)])),_:1}),h(e.$slots,"external")])),_:3})],64))])),_:3})],4))}});export{O as default};
1
+ import{defineComponent as e,ref as s,reactive as t,provide as o,onBeforeUnmount as r,openBlock as n,createElementBlock as i,normalizeStyle as a,unref as c,createVNode as u,withCtx as d,createBlock as m,Fragment as p,createElementVNode as l,renderSlot as h}from"vue";import{NConfigProvider as f,NSpin as S,NLayout as v,NLayoutContent as g}from"naive-ui";import b from"./components/SiderList.vue.js";import y from"./components/ChatHeader.vue.js";import I from"./components/ChatMain.vue.js";import j from"./components/ChatFooter.vue.js";import k from"./components/ChatSearch.vue.js";import{ChatSock as _}from"./utils/chatSock.js";import{instanceAxios as L}from"./api/index.js";import{useTheme as U}from"../../../shared/hooks/useTheme.js";import"@vueuse/core";import"date-fns";import{isNumber as x}from"lodash-es";import"@vue/shared";import"../../../shared/utils/index.js";import"@vueuse/shared";import"../../../shared/hooks/selectHooks/useSearchContent.js";import"@vicons/ionicons5";import{SUBSCRIBE_MESSAGE_TYPE as C}from"./constants/index.js";import{InjectionIChatState as M,InjectionIChatStompClient as N,InjectionIChatEmits as q}from"./types/index.js";import"./utils/emoji.js";import{useSession as T}from"./hooks/useSession.js";const A={class:"c-biunique-chat__header"},E={class:"toolbar"};var O=e({__name:"Index",props:{token:{type:String,required:!0},orgId:{type:[String,Number],required:!0},userId:{type:String,required:!0},baseURL:{type:String,default:"/fdp-chat"}},emits:["template-click","unread-message-update"],setup(e,{expose:O,emit:V}){const w=e;L.defaults.baseURL=w.baseURL,L.defaults.headers.Authorization="bearer "+w.token;const J=U(),R=s(!1),F=s(),H=t({orgId:w.orgId,currentSessionItem:{},id:"",userInfo:{},msgList:[],currentMsg:{},isAppendMsg:!1,sessionList:[],isChangeSession:!1,updateSessionItem:{},isUpdateSession:!1});o(M,H),o(N,F),o(q,V);const{entrySession:$,setSessionList:z}=T(H);function D(){const e={headers:{AccessToken:w.token,UserId:w.userId},heartbeatFn:()=>{try{F.value.send("test")}catch(e){F.value.disconnect(),D()}},connectCb:()=>{console.log("连接成功"),F.value.subscribe("/user/topic/single",(({body:e})=>{try{console.log(JSON.parse(e),"订阅新增消息");const s=JSON.parse(e),{messageVo:t,sessionVo:o}=s;switch(s.event){case C.MESSAGE:if(s.messageVo.sender===H.userInfo.id)return;t.sender===H.currentSessionItem.receiver&&(H.currentMsg=t,H.isAppendMsg=!0),H.updateSessionItem={receiver:t.sender,lastMessageSendTime:t.sendTime,sortTime:t.sendTime,lastMessage:t.content},H.isUpdateSession=!0;break;case C.NEW_SESSION:H.updateSessionItem=o,H.isUpdateSession=!0}}catch(e){console.log(e)}})),F.value.subscribe("/app/sessionList",(({body:e})=>{try{const s=JSON.parse(e),{currentUser:t,sessionVos:o}=s;if(H.userInfo=t,!(null==o?void 0:o.length))return;z(o)}catch(e){console.log(e)}}))},errorCb:(e,s)=>{console.log("断线了,正在重连...")}};F.value=new _("/fdp-chat/websocket",e)}return async function(){D()}(),r((()=>{var e;null==(e=F.value)||e.disconnect()})),O({getUnreadData:function(){return H.sessionList.filter((e=>x(e.unreadNum)&&e.unreadNum>0))},entrySession:$}),(e,s)=>(n(),i("div",{class:"c-biunique-chat",style:a(c(J))},[u(c(f),{abstract:"",namespace:"c-biunique-chat__popover"},{default:d((()=>[R.value?(n(),m(c(S),{key:0,stroke:"#5585f5"})):(n(),i(p,{key:1},[l("div",A,[u(k),l("div",E,[h(e.$slots,"toolbar")])]),u(c(v),{class:"c-biunique-chat__body","has-sider":""},{default:d((()=>[u(b),u(c(g),{class:"chat-content"},{default:d((()=>[u(y),u(I),u(j)])),_:1}),h(e.$slots,"external")])),_:3})],64))])),_:3})],4))}});export{O as default};
@@ -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};
@@ -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.25",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.25",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.25",
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": "f39622dac539ea35e5f7ffc2d1a758b41b106a72"
75
75
  }