cnhis-design-vue 3.2.7-beta.3 → 3.2.7-beta.5
Sign up to get free protection for your applications and to get access to all the features.
- package/es/components/fabric-chart/src/constants/index.d.ts +3 -1
- package/es/components/fabric-chart/src/constants/index.js +1 -1
- package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcessChart.d.ts +8 -3
- package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcessChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.d.ts +9 -6
- package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/newBirthProcess/useNewBirthProcessChart.d.ts +0 -2
- package/es/components/fabric-chart/src/hooks/newBirthProcess/useNewBirthProcessChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.d.ts +8 -3
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.d.ts +8 -3
- package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -1
- package/es/components/fabric-chart/src/interface.d.ts +11 -1
- package/es/components/form-config/index.d.ts +3 -3
- package/es/components/form-config/src/FormConfig.vue.d.ts +3 -3
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +3 -3
- package/es/components/form-render/src/hooks/useFormValidator.js +1 -1
- package/es/components/form-render/src/types/fieldItem.d.ts +2 -1
- package/es/components/iho-chat/index.d.ts +51 -2
- package/es/components/iho-chat/src/Index.vue.d.ts +51 -2
- package/es/components/iho-chat/src/Index.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatMain.vue.d.ts +29 -2
- package/es/components/iho-chat/src/components/ChatMain.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ChatRecord.vue2.js +1 -1
- package/es/components/iho-chat/src/components/ContextMenu.d.ts +15 -2
- package/es/components/iho-chat/src/components/ContextMenu.js +1 -1
- package/es/components/iho-chat/src/hooks/useScrollLoading.d.ts +1 -1
- package/es/components/iho-chat/src/hooks/useScrollLoading.js +1 -1
- package/es/components/iho-chat/style/index.css +1 -1
- package/es/components/index.css +1 -1
- package/es/components/shortcut-setter/index.d.ts +1 -1
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +1 -1
- package/es/shared/package.json.js +1 -1
- package/package.json +2 -2
@@ -1 +1 @@
|
|
1
|
-
const e=[{label:"升温",value:!0,type:"rise"},{label:"药物降温",value:void 0,type:"drugReduce"},{label:"物理降温",value:void 0,type:"physicsReduce"},{label:"不升",value:!0,type:"noRise"}],i=[{label:"药物降痛",value:void 0,type:"drugReduce"},{label:"物理降痛",value:void 0,type:"physicsReduce"}],l=[{label:"修改",type:"change"},{label:"删除",type:"remove"}],r="#2563F4",a="#FF1818",s={yemai:{stroke:a,strokeX:r,strokeWidth:1,strokeWidthX:1,radius:6,angle:45},koumai:{stroke:a,strokeWidth:1,radius:6,radiusCircle:3,fillCircle:r},gangmai:{radius:6,radiusCircle:3,stroke:r,fillCircle:a},xinmai:{radius:6,radiusCircle:3,stroke:a,fillCircle:a},humai:{radius:6,
|
1
|
+
const e=[{label:"升温",value:!0,type:"rise"},{label:"药物降温",value:void 0,type:"drugReduce"},{label:"物理降温",value:void 0,type:"physicsReduce"},{label:"不升",value:!0,type:"noRise"}],i=[{label:"药物降痛",value:void 0,type:"drugReduce"},{label:"物理降痛",value:void 0,type:"physicsReduce"}],l=[{label:"修改",type:"change"},{label:"删除",type:"remove"}],r="#2563F4",a="#FF1818",s={yemai:{stroke:a,strokeX:r,strokeWidth:1,strokeWidthX:1,radius:6,angle:45},koumai:{stroke:a,strokeWidth:1,radius:6,radiusCircle:3,fillCircle:r},gangmai:{radius:6,radiusCircle:3,stroke:r,fillCircle:a},xinmai:{radius:6,radiusCircle:3,stroke:a,fillCircle:a},humai:{radius:6,radiusCircle:3,stroke:a,fillCircle:r},ermai:{stroke:a,strokeWidth:1,radius:6,radiusCircle:3,fillCircle:r}};var d=(e=>(e[e.SMALLCELLNUMBER=5]="SMALLCELLNUMBER",e[e.MAXLINENUMBER=13]="MAXLINENUMBER",e[e.DEFAULTMAINXCELLVALUE=.2]="DEFAULTMAINXCELLVALUE",e))(d||{});export{d as ECG,l as OTHER_MENU,s as OVERLAP,i as PAIN_MENU,e as TEMPERATURE_MENU};
|
@@ -3,8 +3,13 @@ import { fabric } from '../../../../../shared/utils/fabricjs';
|
|
3
3
|
import { AnyObject } from '../../../../../shared/types';
|
4
4
|
import { IPointTipProps, IPointMenuProps } from '../../../../../components/fabric-chart/src/interface';
|
5
5
|
export declare function useBirthProcessChart(canvas: Ref<fabric.Canvas>, props: AnyObject, emits: Function, canvasRef: Ref<HTMLCanvasElement | null>, pointTipProps: IPointTipProps, pointMenuProps: IPointMenuProps): {
|
6
|
+
select?: Ref<import("../../../../../shared/types").AnyFn | null | undefined> | undefined;
|
7
|
+
redrawPoints?: Ref<import("../../../../../shared/types").AnyFn | null | undefined> | undefined;
|
8
|
+
clickMenu?: Ref<import("../../../../../shared/types").AnyFn | null | undefined> | undefined;
|
9
|
+
updatePolyline?: Ref<import("../../../../../shared/types").AnyFn | null | undefined> | undefined;
|
10
|
+
useMeasureRuler?: Ref<import("../../../../../shared/types").AnyFn | null | undefined> | undefined;
|
11
|
+
useCaliper?: Ref<import("../../../../../shared/types").AnyFn | null | undefined> | undefined;
|
12
|
+
useCaliperRuler?: Ref<import("../../../../../shared/types").AnyFn | null | undefined> | undefined;
|
13
|
+
useRectRuler?: Ref<import("../../../../../shared/types").AnyFn | null | undefined> | undefined;
|
6
14
|
propItems: any;
|
7
|
-
redrawPoints: Ref<any>;
|
8
|
-
select: Ref<any>;
|
9
|
-
clickMenu: Ref<any>;
|
10
15
|
};
|
@@ -1 +1 @@
|
|
1
|
-
import{
|
1
|
+
import{reactive as e,computed as a,watch as t,toRefs as l}from"vue";import{defaultBorderStyle as u}from"../useDraw.js";import"../../../../../shared/utils/fabricjs/index.js";import"date-fns";import{getTime as r}from"../../utils/index.js";import"lodash-es";import"../useEvent.js";import"../temperature/useShadow.js";import"@vueuse/shared";import"naive-ui";import"@vueuse/core";import{useBirthProcess as i}from"./useBirthProcess.js";function s(s,n,d,o,v,c){const h=e({select:null,redrawPoints:null,clickMenu:null}),m=a((()=>n.data.scaleValues.filter((e=>"left"===e.layout&&e.show)))),p=a((()=>n.data.scaleValues.filter((e=>"right"===e.layout&&e.show)))),f=a((()=>{var e;return(null==(e=p.value)?void 0:e.length)?30:0})),g=a((()=>{var e;return 30+(null==(e=m.value)?void 0:e.reduce(((e,a)=>e+=a.width),0))})),x=a((()=>{var e;const{width:a}=n.data,t=null==(e=p.value)?void 0:e.reduce(((e,a)=>e+=a.width),0);return a-f.value-t})),w=a((()=>n.data.grid.mainXCell)),y=a((()=>{const e=n.data.grid.mainYCell||14;return n.data.scaleValues.find((e=>e.show&&"FHR"===e.key))||14!==e?e:10})),V=a((()=>(x.value-g.value)/w.value)),b=a((()=>{const{xAxis:e,height:a}=n.data,t=Object.values(e).reduce(((e,a)=>(a.show&&e++,e)),0);return a/(y.value+t)})),j=a((()=>{const{xAxis:e}=n.data,a=Object.values(e).reduce(((e,a)=>(a.show&&"top"===a.position&&e++,e)),0);return b.value*a})),A=a((()=>{var e;const{scaleValues:a}=n.data;if(!(null==(e=a.find((e=>"FHR"===e.key)))?void 0:e.show)&&!j.value)return j.value;const t=a.find((e=>"cervix"===e.key)),[,l]=(null==t?void 0:t.range)||[0,10],u=(null==t?void 0:t.spaceValue)||1;return k.value-l*u*b.value})),k=a((()=>{const{xAxis:e,height:a}=n.data,t=Object.values(e).reduce(((e,a)=>(a.show&&"bottom"===a.position&&e++,e)),0);return a-b.value*t})),C=a((()=>r(n.data.xAxis.time.startTime))),Y=a((()=>36e5/V.value)),S=a((()=>{const{scaleValues:e}=n.data,a=e.find((e=>"cervix"===e.key));return b.value/((null==a?void 0:a.spaceValue)||1)})),H=a((()=>{const{scaleValues:e}=n.data,a=e.find((e=>"FHR"===e.key));return b.value/((null==a?void 0:a.spaceValue)||10)})),P=a((()=>{const{scaleValues:e}=n.data,a=e.find((e=>"fetalPresentation"===e.key));return b.value/((null==a?void 0:a.spaceValue)||1)})),X=a((()=>{var e;return(null==(e=n.data.grid)?void 0:e.event)||{selectable:!0,evented:!0,hovered:!0}})),F=e({canvasWidth:n.data.width,canvasHeight:n.data.height,borderStyle:{...u,...n.data.borderStyle||{}},selectionStyle:n.data.selectionStyle||{},grid:n.data.grid,other:n.data.other,originX:g.value,endX:x.value,originY:j.value,endY:k.value,xCellWidth:V.value,yCellHeight:b.value,gridXNumber:w.value,gridYNumber:y.value,xAxis:n.data.xAxis,leftScales:m.value,rightScales:p.value,leftAddAreaWidth:30,rightAddAreaWidth:f.value,startTime:C.value,timeXCell:Y.value,cervixYCell:S.value,FHRYCell:H.value,fetalPresentationYCell:P.value,scaleValues:n.data.scaleValues,event:X.value,originYCervix:A.value});return t((()=>s.value),(e=>{e&&function(){const{clickMenu:e,redrawPoints:a}=i(s,F,d,v,c);h.redrawPoints=a,h.clickMenu=e}()}),{immediate:!0}),{propItems:F,...l(h)}}export{s as useBirthProcessChart};
|
package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogramChart.d.ts
CHANGED
@@ -4,15 +4,18 @@ import { AnyObject } from '../../../../../shared/types';
|
|
4
4
|
import { IPointTipProps, IPointMenuProps } from '../../../../../components/fabric-chart/src/interface';
|
5
5
|
import { ECG } from '../../../../../components/fabric-chart/src/constants';
|
6
6
|
export declare function useElectrocardiogramChart(canvas: Ref<fabric.Canvas>, props: AnyObject, emits: Function, canvasRef: Ref<HTMLCanvasElement | null>, pointTipProps: IPointTipProps, pointMenuProps: IPointMenuProps): {
|
7
|
-
propItems: any;
|
8
|
-
updatePolyline: Ref<any>;
|
9
|
-
useMeasureRuler: Ref<any>;
|
10
|
-
useCaliper: Ref<any>;
|
11
|
-
useCaliperRuler: Ref<any>;
|
12
|
-
useRectRuler: Ref<any>;
|
13
7
|
getGridInfo: () => {
|
14
8
|
cellWidth: number;
|
15
9
|
cellHeight: number;
|
16
10
|
smallCellNumber: ECG;
|
17
11
|
};
|
12
|
+
select?: Ref<import("../../../../../shared/types").AnyFn | null | undefined> | undefined;
|
13
|
+
redrawPoints?: Ref<import("../../../../../shared/types").AnyFn | null | undefined> | undefined;
|
14
|
+
clickMenu?: Ref<import("../../../../../shared/types").AnyFn | null | undefined> | undefined;
|
15
|
+
updatePolyline?: Ref<import("../../../../../shared/types").AnyFn | null | undefined> | undefined;
|
16
|
+
useMeasureRuler?: Ref<import("../../../../../shared/types").AnyFn | null | undefined> | undefined;
|
17
|
+
useCaliper?: Ref<import("../../../../../shared/types").AnyFn | null | undefined> | undefined;
|
18
|
+
useCaliperRuler?: Ref<import("../../../../../shared/types").AnyFn | null | undefined> | undefined;
|
19
|
+
useRectRuler?: Ref<import("../../../../../shared/types").AnyFn | null | undefined> | undefined;
|
20
|
+
propItems: any;
|
18
21
|
};
|
@@ -1 +1 @@
|
|
1
|
-
import{
|
1
|
+
import{reactive as e,computed as a,unref as t,watch as u,toRefs as l}from"vue";import{defaultBorderStyle as r,defaultLineStyle as i,defaultTextStyle as n}from"../useDraw.js";import"../../../../../shared/utils/fabricjs/index.js";import"date-fns";import{cloneDeep as o,isNumber as d,last as s}from"lodash-es";import"../useEvent.js";import"../temperature/useShadow.js";import{ECG as v}from"../../constants/index.js";import"@vueuse/shared";import"naive-ui";import"@vueuse/core";import{useElectrocardiogram as m}from"./useElectrocardiogram.js";import{useMeasureInstrument as c}from"./useMeasureInstrument.js";function g(g,h,p,f,N,b){const M=e({updatePolyline:null,useMeasureRuler:null,useCaliper:null,useCaliperRuler:null,useRectRuler:null}),y=a((()=>h.data.width)),R=a((()=>h.data.height)),C=a((()=>{const{dataList:e=[],config:a={}}=h.data,t=o(e),u=t.find((e=>a.lastDataKey&&e.key===a.lastDataKey));return u?[...t,u]:t})),L=a((()=>(y.value-0)/S.value)),x=a((()=>(R.value-0)/w.value)),S=a((()=>{var e,a,t;const{config:u,grid:l}=h.data;if(d(l.gridXNumber))return l.gridXNumber;const r=(null!=(t=null==(a=null==(e=s(C.value))?void 0:e.data)?void 0:a.length)?t:0)/u.hz;return Math.ceil(r/u.mainXCellValue)})),w=a((()=>{const{config:e,grid:a}=h.data;if(d(a.gridYNumber))return a.gridYNumber;const t=C.value.length;return Math.ceil(E.value*t*2/e.mainYCellValue)})),E=a((()=>{var e;const{config:a}=h.data,t=null==(e=s(C.value))?void 0:e.data,u=Math.max(...t)-Math.min(...t);return"uv"===a.valueUnit?.001*u:"v"===a.valueUnit?1e3*u:u})),X=a((()=>{var e;return(null==(e=h.data.grid)?void 0:e.event)||{selectable:!0,evented:!0}})),Y=a((()=>{const{mode:e="2-6"}=h.data,[a,t]=e.split("-").map((e=>+e));return{columnNumber:a,rowNumber:t}})),j=a((()=>{const{rowNumber:e}=Y.value,a=C.value.length;return Math.round(w.value/(e+(a===v.MAXLINENUMBER?1:0)))})),I=a((()=>{const{width:e,config:a,grid:t}=h.data,{columnNumber:u,rowNumber:l}=Y.value,r=e/u,i=C.value.length,n=Math.ceil(j.value/2),o=function(){const{valueUnit:e,mainYCellValue:t}=a,l=C.value[0].data,r=o(Math.max(...l));if(2!==u)return r;const i=C.value[6].data,n=o(Math.max(...i));return Math.max(r,n);function o(a){return("uv"===e?.001*a:"v"===e?1e3*a:a)/t*x.value}}(),d=x.value*n,s=1===u||d<o?x.value*Math.ceil(o/x.value):d,m=4===u?0:L.value;return C.value.map(((e,a)=>{const t=v.MAXLINENUMBER===i&&a===i-1?l:a%l;return{...e,origin:{x:(v.MAXLINENUMBER===i&&a===i-1?0:Math.floor(a/l))*r+m,y:t*(x.value*j.value)+s,rowIdx:t}}}))})),U=a((()=>{var e;const{calibrationLineGridYNumber:a,mainYCellValue:t}=(null==(e=h.data)?void 0:e.config)||{};return a?x.value*a:t?x.value/t:x.value})),A=e({canvasWidth:h.data.width,canvasHeight:h.data.height,borderStyle:{...r,...h.data.borderStyle},lineStyle:{...i,...h.data.lineStyle},titleStyle:{...n,...h.data.titleStyle},measureLineStyle:{...i,...h.data.measureLineStyle},measureTextStyle:{...n,...h.data.measureTextStyle},grid:h.data.grid,originX:0,endX:y.value,originY:0,endY:R.value,xCellWidth:L.value,yCellHeight:x.value,gridXNumber:S.value,gridYNumber:w.value,event:X.value,dataList:I.value,columnNumber:t(Y).columnNumber,rowNumber:t(Y).rowNumber,config:h.data.config,calibrationLineHeight:t(U)});return u((()=>g.value),(e=>{e&&function(){const{useMeasureRuler:e,flag:a,useCaliper:t,useCaliperRuler:u,useRectRuler:l}=c(g,A),{updatePolyline:r}=m(g,A,a);M.useMeasureRuler=e,M.useCaliper=t,M.useCaliperRuler=u,M.updatePolyline=r,M.useRectRuler=l}()}),{immediate:!0}),{propItems:A,...l(M),getGridInfo:function(){return{cellWidth:L.value,cellHeight:x.value,smallCellNumber:v.SMALLCELLNUMBER}}}}export{g as useElectrocardiogramChart};
|
@@ -5,6 +5,4 @@ import { IPointTipProps, IPointMenuProps } from '../../../../../components/fabri
|
|
5
5
|
export declare function useNewBirthProcessChart(canvas: Ref<fabric.Canvas>, props: AnyObject, emits: Function, canvasRef: Ref<HTMLCanvasElement | null>, pointTipProps: IPointTipProps, pointMenuProps: IPointMenuProps): {
|
6
6
|
propItems: any;
|
7
7
|
redrawPoints: Ref<any>;
|
8
|
-
select: Ref<any>;
|
9
|
-
clickMenu: Ref<any>;
|
10
8
|
};
|
@@ -1 +1 @@
|
|
1
|
-
import{ref as e,computed as a,reactive as t,watch as l}from"vue";import{defaultBorderStyle as i}from"../useDraw.js";import"../../../../../shared/utils/fabricjs/index.js";import{format as r}from"date-fns";import{getTime as u}from"../../utils/index.js";import{range as s,last as n}from"lodash-es";import"../useEvent.js";import"../temperature/useShadow.js";import"@vueuse/shared";import"naive-ui";import"@vueuse/core";import{useNewBirthProcess as o}from"./useNewBirthProcess.js";function d(d,v,c,m,h,x){const p=e(),g=
|
1
|
+
import{ref as e,computed as a,reactive as t,watch as l}from"vue";import{defaultBorderStyle as i}from"../useDraw.js";import"../../../../../shared/utils/fabricjs/index.js";import{format as r}from"date-fns";import{getTime as u}from"../../utils/index.js";import{range as s,last as n}from"lodash-es";import"../useEvent.js";import"../temperature/useShadow.js";import"@vueuse/shared";import"naive-ui";import"@vueuse/core";import{useNewBirthProcess as o}from"./useNewBirthProcess.js";function d(d,v,c,m,h,x){const p=e(),g=a((()=>v.data.scaleValues.filter((e=>"left"===e.layout&&e.show)))),f=a((()=>v.data.scaleValues.filter((e=>"right"===e.layout&&e.show)))),w=a((()=>{var e;return null==(e=g.value)?void 0:e.reduce(((e,a)=>e+=a.width),0)})),b=a((()=>{var e;const{width:a}=v.data;return a-((null==(e=f.value)?void 0:e.reduce(((e,a)=>e+=a.width),0))||15)})),y=a((()=>v.data.grid.mainXCell||20)),j=a((()=>v.data.grid.mainYCell||8)),A=a((()=>(b.value-w.value)/y.value)),M=a((()=>{var e;const{xAxis:a,height:t,other:l}=v.data,i=Object.values(a).reduce(((e,a)=>(a.show&&e++,e)),0),r=(null!=(e=null==l?void 0:l.alertLineList.length)?e:0)>0;return(t-X.value)/(j.value+i+(r?1:0))})),S=a((()=>{var e;const{xAxis:a,other:t}=v.data,l=Object.values(a).reduce(((e,a)=>(a.show&&"top"===a.position&&e++,e)),0),i=(null!=(e=null==t?void 0:t.alertLineList.length)?e:0)>0;return M.value*(l||i?1:0)})),V=a((()=>{const{xAxis:e,height:a}=v.data,t=Object.values(e).reduce(((e,a)=>(a.show&&"bottom"===a.position&&e++,e)),0);return a-M.value*t-X.value})),X=a((()=>{const e=g.value.concat(f.value);return(null==e?void 0:e.length)>0?20:0})),C=a((()=>u(v.data.xAxis.time.startTime))),H=a((()=>{const{spaceValue:e,spaceGridNumber:a}=v.data.xAxis.time||{};return 60*e*60*1e3/(A.value*a)})),L=a((()=>{var e,a,t;const l=null==(t=null==(a=null==(e=g.value.concat(f.value))?void 0:e[0])?void 0:a.data)?void 0:t.map((e=>u(e.time))),i=Math.min(...l);let o=Math.min(Math.max(...l));const d=H.value*A.value,v=s(1,y.value+1).reduce(((e,a,t)=>e.concat(C.value+a*d)),[C.value]);o=Math.min(o,n(v));const c=v.findIndex((e=>Math.abs(e-i)<d)),m=v.findIndex((e=>Math.abs(e-o)<d))+1;return v.filter(((e,a)=>a>=c&&a<=m)).map((e=>r(new Date(e),"yyyy-MM-dd HH:mm:ss")))})),Y=a((()=>{const{scaleValues:e}=v.data,a=e.find((e=>"cervix"===e.key));return M.value/((null==a?void 0:a.spaceValue)||1)})),N=a((()=>{var e;return(null==(e=v.data.grid)?void 0:e.event)||{selectable:!0,evented:!0,hovered:!0}})),I=t({canvasWidth:v.data.width,canvasHeight:v.data.height,borderStyle:{...i,...v.data.borderStyle||{}},selectionStyle:v.data.selectionStyle||{},grid:v.data.grid,other:v.data.other,originX:w.value,endX:b.value,originY:S.value,endY:V.value,xCellWidth:A.value,yCellHeight:M.value,gridXNumber:y.value,gridYNumber:j.value,xAxis:v.data.xAxis,leftScales:g.value,rightScales:f.value,startTime:C.value,timeXCell:H.value,cervixYCell:Y.value,scaleValues:v.data.scaleValues,timeXAxisHeight:X.value,extraTimeXAxisList:L.value,event:N.value});return l((()=>d.value),(e=>{e&&function(){const{redrawPoints:e}=o(d,I,c,h);p.value=e}()}),{immediate:!0}),{propItems:I,redrawPoints:p}}export{d as useNewBirthProcessChart};
|
package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.d.ts
CHANGED
@@ -3,8 +3,13 @@ import { fabric } from '../../../../../shared/utils/fabricjs';
|
|
3
3
|
import { AnyObject } from '../../../../../shared/types';
|
4
4
|
import { IPointTipProps, IPointMenuProps } from '../../../../../components/fabric-chart/src/interface';
|
5
5
|
export declare function useSurgicalAnesthesiaChart(canvas: Ref<fabric.Canvas>, props: AnyObject, emits: Function, canvasRef: Ref<HTMLCanvasElement | null>, pointTipProps: IPointTipProps, pointMenuProps: IPointMenuProps, isPopupTipRender: boolean): {
|
6
|
+
select?: Ref<import("../../../../../shared/types").AnyFn | null | undefined> | undefined;
|
7
|
+
redrawPoints?: Ref<import("../../../../../shared/types").AnyFn | null | undefined> | undefined;
|
8
|
+
clickMenu?: Ref<import("../../../../../shared/types").AnyFn | null | undefined> | undefined;
|
9
|
+
updatePolyline?: Ref<import("../../../../../shared/types").AnyFn | null | undefined> | undefined;
|
10
|
+
useMeasureRuler?: Ref<import("../../../../../shared/types").AnyFn | null | undefined> | undefined;
|
11
|
+
useCaliper?: Ref<import("../../../../../shared/types").AnyFn | null | undefined> | undefined;
|
12
|
+
useCaliperRuler?: Ref<import("../../../../../shared/types").AnyFn | null | undefined> | undefined;
|
13
|
+
useRectRuler?: Ref<import("../../../../../shared/types").AnyFn | null | undefined> | undefined;
|
6
14
|
propItems: any;
|
7
|
-
redrawPoints: Ref<any>;
|
8
|
-
select: Ref<any>;
|
9
|
-
clickMenu: Ref<any>;
|
10
15
|
};
|
package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js
CHANGED
@@ -1 +1 @@
|
|
1
|
-
import{
|
1
|
+
import{reactive as e,ref as t,computed as a,unref as r,onMounted as i,nextTick as o,onBeforeUnmount as l,watch as n,toRefs as u}from"vue";import{useDialog as s}from"naive-ui";import{defaultBorderStyle as d}from"../useDraw.js";import"../../../../../shared/utils/fabricjs/index.js";import{format as c}from"date-fns";import{getChildrenSize as p}from"../../utils/index.js";import{cloneDeep as m,range as v,flatten as h}from"lodash-es";import"../useEvent.js";import"../temperature/useShadow.js";import{OTHER_MENU as f}from"../../constants/index.js";import"@vueuse/shared";import"@vueuse/core";import{useTop as g}from"./useTop.js";import{useLeft as w}from"./useLeft.js";import{useCenter as y}from"./useCenter.js";import{useOther as b}from"./useOther.js";function x(x,j,C,Y,H,S,T){var D;const M=s(),k=e({redrawPoints:null,clickMenu:null}),A=t();let P=null;const X=p((null==(D=j.data.top)?void 0:D.treeData)||[]),G=a((()=>j.data.layout||{top:"drug",center:"xAxis",bottom:"intraoperatively"})),N=a((()=>{var e;return null!=(e=j.data.left.width)?e:0})),V=a((()=>{const{grid:e}=j.data;return e.mainXCell*e.subXCell})),L=a((()=>{const{grid:e}=j.data;return e.mainYCell*e.subYCell})),O=a((()=>{const{show:e=!0,tree:t={}}=j.data.top;if(!e)return 0;const{rowNumber:a=X}=t;return X<a?a:X})),E=a((()=>j.data.top.tree.cellHeight)),W=a((()=>E.value*O.value)),I=a((()=>ne(oe("drug")||"top"))),F=a((()=>I.value+W.value)),q=a((()=>{var e;return Date.parse((null==(e=j.data.xAxis)?void 0:e.startTime)||c(new Date,"yyyy-MM-dd HH:mm:ss"))})),z=a((()=>{const e=m(j.data.xAxis),{spaceValue:t,spaceTimeStamp:a}=e,r=v(V.value/t+1).map((r=>0===r?e.startTime:c(new Date(q.value+r*t*a),"yyyy-MM-dd HH:mm:ss")));return{...e,list:r,left:N.value}})),B=function(){const{show:e=!0,tree:t={}}=j.data.top;if(!e)return[];const a=m(j.data.top.treeData);let r=0;const{cellWidth:i,cellHeight:o}=j.data.top.tree,{rowNumber:l=X}=t;X<l&&a.push(...v(l-X).map((()=>({}))));return function e(t,a=0){t.forEach((t=>{var l;const n={top:r*o+I.value,left:a*i,width:i,height:o};if(r++,null==(l=t.children)?void 0:l.length){r--;const i=p(t.children);n.height=i*o,e(t.children,a+1)}else n.width=N.value-n.left;Object.assign(t,n)}))}(a),a}(),J=a((()=>ne(oe("xAxis")||"center"))),K=a((()=>{var e;const{width:t,right:a}=j.data;if(!a)return t;return t-(null!=(e=a.width)?e:0)})),Q=a((()=>ne(oe("intraoperatively")||"bottom"))),R=a((()=>{var e;const{show:t=!0,height:a}=(null==(e=j.data.other)?void 0:e.mark)||{};return t&&a?a:0})),U=a((()=>Q.value+(j.data.height-W.value-z.value.height-R.value))),Z=a((()=>(K.value-N.value)/V.value)),$=a((()=>(U.value-Q.value)/L.value)),_=a((()=>z.value.spaceTimeStamp/Z.value)),ee=a((()=>{const{scaleValues:e}=j.data;return h(e.map((e=>e.dataList.filter((e=>e.show)).map(((t,a)=>({...t,bigType:e.type,unit:e.unit,dataIndex:a}))))))})),te=a((()=>ue("pulse"))),ae=a((()=>ue("temperature"))),re=a((()=>{var e;return(null==(e=j.data.grid)?void 0:e.event)||{selectable:!0,evented:!0,hovered:!0}})),ie=e({canvasWidth:j.data.width,canvasHeight:j.data.height,borderStyle:{...d,...j.data.borderStyle},pointSelectionStyle:j.data.pointSelectionStyle||{},grid:j.data.grid,top:j.data.top,left:j.data.left,other:j.data.other,topGridYNumber:r(O),topGridYCellHeight:r(E),topGridOriginY:r(I),topGridEndY:r(F),treeData:B,xAxis:r(z),originYXAxis:r(J),startTime:r(q),timeXCell:r(_),gridXNumber:r(V),gridYNumber:r(L),xCellWidth:r(Z),yCellHeight:r($),originX:r(N),endX:r(K),originY:r(Q),endY:r(U),markHeight:r(R),itemList:r(ee),scaleValues:j.data.scaleValues,pulseYCell:r(te),temperatureYCell:r(ae),event:r(re),dialog:M});function oe(e){let t="";return Object.entries(G.value).some((([a,r])=>{if(r===e)return t=a,!0})),t}function le(e){const t=G.value[e],a=z.value.height;switch(t){case"drug":return W.value;case"xAxis":return a;default:return j.data.height-W.value-a}}function ne(e){switch(e){case"top":return 0;case"center":return le("top");default:return le("top")+le("center")}}function ue(e){const{scaleValues:t}=j.data,a=t.find((t=>t.type===e));return $.value*(a.spaceGridNumber||1)/(a.spaceValue||1)}return i((async()=>{await o(),g(x,ie,C,H);const{redrawPoints:e,clickMenu:t,moveLimit:a,setPopup:r,updateData:i,getGridPoints:l,getContainPoints:n,showDialog:u,removeCurrentSelection:s,pauseFlickerPoint:d}=y(x,ie,C,H,S,T);A.value=d,w(x,ie,C,H,a,r,i,l);const{clickMenu:c}=b(x,ie,C,H,S,a,n,u,s);k.redrawPoints=e,k.clickMenu=e=>{const{item:a}=e;a.type&&f.map((e=>e.type)).includes(a.type)?c(e):t(e)}})),l((()=>{A.value()})),T&&n((()=>null==H?void 0:H.point),(()=>{H.movable?(H.show=!0,P&&clearTimeout(P),P=setTimeout((()=>{H.show=!1,H.movable=!1}),3e3)):P&&clearTimeout(P)}),{deep:!0}),{propItems:ie,...u(k)}}export{x as useSurgicalAnesthesiaChart};
|
@@ -1 +1 @@
|
|
1
|
-
import{fabric as e}from"../../../../../shared/utils/fabricjs/index.js";import{useShadow as t}from"./useShadow.js";import{drawLine as i,defaultStyle as n,drawPoint as o,drawText as l,drawArrow as s}from"../useDraw.js";import{useGrid as r}from"../useGrid.js";import{format as u}from"date-fns";import{getType as a,getTime as c,isOneLine as d,isOverlapPoint as p,getFloorNumber as f,isValidValue as h,setOtherType as v,isEffectiveNode as g,deleteProperty as y,getIndex as m}from"../../utils/index.js";import{cloneDeep as x,flatten as b,last as j}from"lodash-es";import"../useEvent.js";import{useCommon as w}from"../useCommon.js";import"vue";import"naive-ui";import"@vueuse/core";import{TEMPERATURE_MENU as k,PAIN_MENU as L,OVERLAP as S}from"../../constants/index.js";import{promiseTimeout as Y}from"@vueuse/shared";function E(E,$,O,T,V,P,C,A,R,I){r(E,$);const{getEqualXTypes:X,handleAddPrevent:D,getPointEventProps:H}=w(E,O,$),{createShadowLines:z}=t(),{left:F,xScaleList:_,xCellWidth:W,yCellHeight:q,originX:G,endX:N,originY:B,endY:J,itemList:K,event:Q,vitalSignsOriginY:U,painOriginY:Z,hospitalizationDate:ee,config:te,canvasHeight:ie}=$,ne=new Set,oe=["xinmai","mai"],le=new Map,se=new Set,re=new Set,ue=new Set,ae=x(F.yScaleValue),ce=new Set;function de(t){var o;const l=ae.find((e=>"pulse"===e.type));if(l&&(null==(o=l.dataList)?void 0:o.length)&&(ne.size&&E.value.remove(...ne),ne.clear(),le.size>1)){if(t){const{type:e,key:i}=t.origin||{};if("pulse"===e){const e=le.get(i),n=null==e?void 0:e.findIndex((e=>e[0]===t.left));e.splice(n,1,[t.left,t.top])}}const o=function(){const e=[],t=[],i=[];for(const e of le)t.push(e[1]),e[0]===oe[0]&&e[1].forEach((e=>{(le.get(oe[1])||[]).findIndex((t=>t[0]===e[0]))>-1&&i.push(e[0])}));const[n,o]=t;let l=[],s=[];return i.forEach((t=>{const i=n.findIndex((e=>e[0]===t)),r=o.findIndex((e=>e[0]===t)),u=n[i],a=o[r],c=n[i-1],d=n[i+1],p=o[r-1],f=o[r+1];if(c&&p){if(c[0]!==p[0]){const e=Math.max(c[0],p[0]);l.push([c,p].find((t=>t[0]===e)))}}else c?l.push(c):p&&s.push(p);const h=Math.min(u[1],a[1]);l.push([u,a].find((e=>e[1]===h)));const v=Math.max(u[1],a[1]);s.push([u,a].find((e=>e[1]===v)));const g=()=>{const t=[...l,...s.reverse()],[i]=t,n=j(t);i[0]===n[0]&&i[1]===n[1]&&t.splice(-1,1),e.push(t),l=[],s=[]};if(d&&f){if(d[0]!==f[0]){const e=Math.min(d[0],f[0]);l.push([d,f].find((t=>t[0]===e))),g()}}else d?(l.push(d),g()):f?(s.push(f),g()):g()})),e}();o.length>0&&function(e){Y(0).then((()=>{e.forEach((e=>{const t=[],i=[];Array.from(ue).forEach((n=>{var o,l;"pulse"===(null==(o=null==n?void 0:n.origin)?void 0:o.type)&&e.find((e=>Math.abs(n.left-e[0])<=1&&Math.abs(n.top-e[1])<=1))&&((null==(l=null==n?void 0:n.origin)?void 0:l.key)===oe[0]?t.push(n):i.push(n))})),[t,i].forEach((e=>{1!==(null==e?void 0:e.length)&&e.sort(((e,t)=>e.left-t.left)).forEach(((e,t)=>{t>0&&e.leftLine&&E.value.remove(e.leftLine)}))}))}))}))}(o);const{mode:s,style:r={}}=l.shadow||{};o.forEach((t=>{const o=t.map((e=>({x:e[0],y:e[1]}))),l=new e.Polygon(o,{...n,...r,strokeWidth:1});if(["slash","line"].includes(s)){l.set({fill:"transparent",stroke:r.stroke||"#f00"});const e=[];if(["slash"].includes(s))e.push(...z(t,r._angle,r.space)),e.forEach((e=>{Object.assign(e,{...n,...r}),ne.add(e)}));else{const n=function(e){const t=e.reduce(((e,t)=>{const i=Math.trunc(t[0]);return e[i]=e[i]?e[i].concat([t]):[t],e}),{}),i=Object.values(t).filter((e=>2===e.length&&Math.trunc(e[0][1])!==Math.trunc(e[1][1])));return i}(t);n.forEach((t=>{const n=i([...b(t)],{...r,originX:"center"});e.push(n),ne.add(n)}))}E.value.add(...e)}ne.add(l),E.value.add(l)}))}}function pe(e,t,r){var u;const{type:a,riseStyle:c={},noRiseStyle:p={},verifiedStyle:g={},reduceStyle:y={},pacemaker:m={},upArrowStyle:x={},limitValueStyle:b={},nonePainPointStyle:j={},belowMinValueStyle:w={},respiratorStyle:k={},dataList:L=[],list:S=[]}=r,{type:Y,textStyle:$,showConnectLine:P=!1}=j,A=[],I=[],X=[];let D=null;const z=e=>"breathe"==a&&e.respirator&&k.type&&k.fixedValue&&!e.value&&ve(e.time);if(null==(u=e.list)||u.forEach(((u,j)=>{const F=d(a)?L.find((e=>e.key===u.key)):e,_=ge(z(u)?{...u,value:k.fixedValue}:u,r),G=e.list[j+1],N=G?ge(z(G)?{...G,value:k.fixedValue}:G,r):void 0,B=G?d(a)?L.find((e=>e.key===G.key)):e:{},{title:J=""}=F;if("脉搏"===J&&"脉搏"!==B.title||"脉搏"!==J&&"脉搏"===B.title||!_||!N||f(_[0],1)!==f(N[0],1))_&&D&&(_[0]=D),D=null;else{const e=_[0]-W/2;_[0]=e+W/4,N[0]=D=_[0]+W/2}const K={};K.value=function(e,t,i){if(!(null==e?void 0:e.length)||!te.showValue)return;const{lineAttr:n={}}=i,o=e[1]<=U.originY+q?e[1]+q:e[1]-q,s=l([e[0],o],{value:z(t)?k.fixedValue:t.value,originX:"center",originY:"center",fill:n.stroke||"#000"});return X.push(s),{obj:s,top:-q}}(_,u,F),function(e,t,r,u){var d,f;if(!["temperature","pain","breathe"].includes(a))return;if(!(null==e?void 0:e.length)&&"temperature"===a&&!ve(t.time))return;if(!(null==e?void 0:e.length)&&"pain"===a)return;if(!t.value&&"breathe"===a)return;const{lineAttr:v={}}=r,{value:m}=u,x=T(t.time);let b,j,w,L,Y,E;if(t.noRise&&p.show){const i=M(p,t)?V(a,S,35):(null==e?void 0:e[1])||0;if(p.text)w=l([x,M(p,t)?i:i+5],{value:p.text.split("").join("\n"),originY:"top",...p.style}),t.value||ue.add(w);else if(t.value){w=s([x,i,i+2*q],{...p.style})}w&&X.push(w),w&&M(p,t)&&ce.add(w)}if(null==e?void 0:e[1]){if(t.rise&&c.show&&c.text&&(L=l([x,e[1]-(m?q:0)-5],{value:c.text.split("").join("\n"),originY:"bottom",...c.style}),X.push(L)),t.verified&&(Y=l([x,e[1]-(m?q:0)-5],{value:"v",originX:"center",originY:"bottom",...g}),X.push(Y)),h(t.physicsReduce)||h(t.drugReduce)){const l=V(a,S,null!=(d=t.physicsReduce)?d:t.drugReduce),s=l<e[1]&&(null==te?void 0:te.hypothermyViewCustom)?x+W/2:x;b=i([...e,s,l],{...v,...y.line,...n}),j=o((null==(f=null==y?void 0:y.point)?void 0:f.type)||"circle",{left:s,top:l,...y.point,...n,originY:l===ie?"bottom":"center"}),b&&X.push(b),j&&X.push(j)}t.respirator&&(E=o(k.type,{left:x,top:e[1]-(m?q:0)-5,originX:"center",originY:"bottom",...k.style}),X.push(E))}Object.assign(u,{reduceLine:{obj:b,type:"line"},noRiseText:{obj:w,top:p.text?5:2*q,isFixed:M(p,t)},riseText:{obj:L,top:(m?-q:0)-5},verifiedText:{obj:Y,top:(m?-q:0)-5},reducePoint:{obj:j,type:"reduce"},respirator:{obj:E,top:(m?-q:0)-5}})}(_,u,F,K),function(e,t,i,n){if(!(null==e?void 0:e.length)||!["pulse"].includes(a))return;const o=Math.max(...S),r=Math.min(...S);let u,c,d;const{upArrowShow:p=!1,limitValueShow:f=!1}=i;if(p&&+t.value>180){let t=e[1]-2.5*q,i=[e[1]-q/2,t];t<U.originY&&(t=e[1]+2.5*q,i=[t,e[1]+q/2]),u=s([e[0],i[0],i[1]],x,"up"),X.push(u)}if(f){const i={value:t.value,originX:"center",originY:"center",...b};if(+t.value>o){const t=u?e[1]+q/2+u.height:e[1]+q;c=l([e[0],t],i),X.push(c)}+t.value<r&&(c=l([e[0],e[1]-q],i),X.push(c))}if(w.show&&+t.value<r){const t=e[1];if(w.text)d=l([e[0],e[1]+5],{value:w.text.split("").join("\n"),originY:"top",...w.style});else{const i=t+2*q;d=s([e[0],t,i],{...w.style})}X.push(d)}Object.assign(n,{upArrow:{obj:u},limitValue:{obj:c,top:-q},belowMinValue:{obj:d,top:w.text?5:2*q,moveHide:!0}})}(_,u,F,K),function(n,l,s,u,c,d){let p,f;const{pointAttr:h={},lineAttr:g={},title:y="",key:x,type:b="circle"}=c,j=e.list[u+1],w=fe(a,e.list[u].value),L=l&&fe(a,j.value),S=()=>"pulse"==a&&s.pacemakerShow?m.value:z(s)?k.type:w&&"number"===Y?0:b;if(n&&l&&!s.breakpoint&&(!w&&!L||P)){f=i([...n,...l],{...g});const{obj:e}=(null==d?void 0:d.reducePoint)||{};if((null==e?void 0:e.top)<n[1]&&(null==te?void 0:te.hypothermyViewCustom)){const t=i([e.left,e.top,...l],{...g});X.unshift(t),Object.assign(d,{reduceRightLine:{obj:t,type:"reduce"}}),f.set("stroke","transparent")}}const M=S(),T=I[u-1],V={origin:{data:z(s)?{...s,value:k.fixedValue}:s,title:y,key:x||"",unit:r.unit,type:a,_type:v(y,a),dataIndex:t,index:u},leftLine:T,rightLine:f,otherObj:d,...s.pacemakerShow&&"pulse"==a?m.style:z(s)?k.style:h,lockMovementX:!0,...H(),...w?{selectable:!1,evented:!1,..."number"===Y?$:{}}:{}};n&&(T?V.leftLine.set("x2",n[0]):V.leftLine=null,p=o(M,{left:n[0],top:w?n[1]-5:n[1],...V}));I.push(f),p&&(x===oe[1]?se.add(p):re.add(p),function(e){Q.hovered&&(e.on("mouseover",(()=>{he(e,"hover")})),e.on("mouseout",(()=>{R.show=!1})));if(e.lockMovementX&&e.lockMovementY)return;e.on("moving",(()=>{!function(e){e.setCoords();const t="pain"===e.origin.type?Z:U;e.top<t.originY&&e.set("top",t.originY);e.top>t.endY&&e.set("top",t.endY)}(e),function(e){var t,i;null==(t=e.leftLine)||t.setCoords().set({x2:e.left,y2:e.top}),null==(i=e.rightLine)||i.setCoords().set({x1:e.left,y1:e.top}),Object.values(e.otherObj).forEach((t=>{const{obj:i,type:n="",top:o=0,isFixed:l,moveHide:s=!1}=t||{};"reduce"!==n&&i&&("line"===n?i.setCoords().set({x1:e.left,y1:e.top}):(l||i.setCoords().set({left:e.left,top:e.top+o}),s&&(E.value.remove(i),delete e.otherObj.obj)))})),de(e)}(e),Q.hovered&&he(e)})),e.on("mouseup",(t=>{if(R.show=!1,1===t.button){const{type:t}=e.origin,i=C(t,e.top),n={...e.origin,data:{...e.origin.data,value:i}};E.value.discardActiveObject(),O("change",n),me(n,"change")}}))}(p),A.push(p),ue.add(p))}(_,N,u,j,F,K)})),"pulse"===a){const{key:t}=e;let i=null;le.set(t,A.map(((e,t,n)=>{var o,l;const s=n[t+1];if(s&&f(e.left,1)===f(s.left,1)){const t=e.left-W/2;e.set("left",t+W/4),null==(o=e.rightLine)||o.set("x1",e.left),i=e.left+W/2,s.set("left",i)}else i&&(null==(l=e.leftLine)||l.set("x2",i),e.set("left",i)),i=null;return[e.left,e.top]})))}const F=I.filter((e=>e));E.value.add(...F,...A,...X)}function fe(e,t){return"pain"===e&&0==t}function he(e,t="moving"){const{title:i,unit:n,type:o,data:l}=e.origin;R.point={x:e.left,y:e.top};let s=`时间 ${((null==l?void 0:l.time)||P(e.left)).slice(-5)}`;R.list=[function(){const{drugReduce:r,physicsReduce:u}=l||{},a="hover"===t?l.value:C(o,e.top);if(h(r))return s+=(null==l?void 0:l.changeTime)?"—>"+(null==l?void 0:l.changeTime.slice(-5)):"",`药物降${"pain"==o?"痛":"温"} ${a}—>${r}${n||""}`;if(h(u))return s+=(null==l?void 0:l.changeTime)?"—>"+(null==l?void 0:l.changeTime.slice(-5)):"",`物理降${"pain"==o?"痛":"温"} ${a}—>${u}${n||""}`;return`${i} ${a}${n||""}`}(),s],R.show=!0}function ve(e){const[t]=_,i=j(_),n=t.start,o=i.end,l=c(e);return l>=n&&l<=o}function ge(e,t){const i="pain"===t.type?Z:U;if(!g(e)||!ve(e.time))return;const n=T(e.time),o=V(t.type,t.list,e.value);return[n,o<i.originY?i.originY:o>i.endY?i.endY:o]}function ye(e){const t=new Date,i=String(t.getMonth()+1).padStart(2,"0"),n=String(t.getDate()).padStart(2,"0"),o=c(`${t.getFullYear()}-${i}-${n} 23:59:59`),l=c(`${P(e)}:00`);return ee&&l<c(ee)?(D("exceedMin"),!1):!(l>o)||(D("exceedMax"),!1)}function me(e,t="add"){const{type:i,dataIndex:n,index:o,data:l,key:s}=e,r=ae.find((e=>e.type===i));if("add"===t){const e=d(i)?r.dataList.find((e=>e.enable)):r.dataList[n],t=m(l.time,e.list);e.list.splice(t,0,l)}else r.dataList[n].list[o]=l;xe()}function xe(){var e;ue.size&&(null==(e=E.value)||e.remove(...function(e){const t=[];return e.forEach((e=>{e&&t.push(e),(null==e?void 0:e.leftLine)&&t.push(null==e?void 0:e.leftLine),(null==e?void 0:e.rightLine)&&t.push(null==e?void 0:e.rightLine),Object.values((null==e?void 0:e.otherObj)||{}).forEach((e=>{(null==e?void 0:e.obj)&&t.push(null==e?void 0:e.obj)}))})),t}([...ue]))),ue.clear(),be()}function be(e){le.clear(),ue.clear(),se.clear(),ce.clear(),re.clear(),ae.forEach((t=>{null==e||e(t),t.dataList.forEach(((e,i)=>{!e.show||d(t.type)&&!e.enable||pe(e,i,t)}))})),de(),[...ue].forEach((e=>{null==e||e.bringToFront()})),function(){var e;const t=ae.find((e=>"pulse"===e.type));if(!t||!(null==(e=t.dataList)?void 0:e.length))return;if(!t.dataList.some((e=>e.title.includes("脉搏"))))return;const i=Object.assign({},S,F.overlap||{}),l=[];se.size&&[...se].forEach((e=>{[...re].forEach((t=>{if(t.origin&&p(e,t)){const e=t.origin.key;if(e){const s={left:t.left,top:t.top,...n,hoverCursor:"default"};let r="koumai";"yemai"===e&&(r=e),"humai"===e&&(r="circle"),l.push(o(r,{...i[e]||{},...s}))}}}))})),setTimeout((()=>{E.value.add(...l),l.forEach((e=>{null==e||e.bringToFront(),ue.add(e)}))}))}()}return be((e=>function(e){if("temperature"!==e.type||!e.positionLine)return;const t=V(e.type,e.list,e.positionLine.value),n=i([G,t,N,t],e.positionLine);E.value.add(n)}(e))),E.value.on("mouse:up",(e=>{const{button:t,target:i,pointer:n={}}=e;if(3===t){if(!$.event.evented)return;const{x:e=0,y:t=0}=n;if(e>=G&&e<=N&&t>=B&&t<=J){I.point={x:e,y:t},I.show=!0;const{type:o}=(null==i?void 0:i.origin)||{};if(i&&["temperature","pain"].includes(o))"temperature"===o&&(I.list=[...k]),"pain"===o&&(I.list=[...L]),I.target=i;else{I.target=null,I.list=["新增节点"],K.forEach((i=>{if(!X([...ue],e,"_type").includes(i.bigType)){const e=["pain"].includes(i.bigType)?Z:U;t>=e.originY&&t<=e.endY&&I.list.push({renderItem:A?A(i):()=>i.title,origin:{title:i.title,unit:i.unit,type:a(i.bigType),dataIndex:i.dataIndex,key:i.key},pointer:n})}}));const i=ye(e);i&&1!==I.list.length||(I.show=!1,1===I.list.length&&i&&D("repeat"))}}}if(1===t){if(i)return;const{x:e=0,y:t=0}=n;e>=G&&e<=N&&t>0&&t<ie&&O("click:grid",{x:e,y:t,time:P(e)})}})),{clickMenu:function({item:e,target:t}){if(t){const{data:i,type:n,dataIndex:o,index:l}=t.origin,s=y(i,[...k,...L]);s[`${e.type}`]=e.value,s.changeTime=u(new Date,"yyyy-MM-dd HH:mm"),d(n)&&(s.key=t.origin.key);const r={...t.origin,data:s};O("change",r),me(r,"change")}else{const t={data:{time:P(e.pointer.x),value:C(e.origin.type,e.pointer.y),...d(e.origin.type)?{key:e.origin.key}:{}},...e.origin};O("add",t),me(t)}},setPopup:he,isAddPoint:ye,updateData:me,redrawPoints:xe,gridPoints:ue,fixedNoRisePoints:ce}}function M(e,t){return e.fixed||!t.value&&0!==t.value}export{E as useCenter};
|
1
|
+
import{fabric as e}from"../../../../../shared/utils/fabricjs/index.js";import{useShadow as t}from"./useShadow.js";import{drawLine as i,defaultStyle as n,drawPoint as o,drawText as l,drawArrow as s}from"../useDraw.js";import{useGrid as r}from"../useGrid.js";import{format as u}from"date-fns";import{getType as a,getTime as c,isOneLine as d,isOverlapPoint as p,getFloorNumber as f,isValidValue as h,setOtherType as v,isEffectiveNode as g,deleteProperty as y,getIndex as m}from"../../utils/index.js";import{cloneDeep as x,flatten as b,last as j}from"lodash-es";import"../useEvent.js";import{useCommon as w}from"../useCommon.js";import"vue";import"naive-ui";import"@vueuse/core";import{TEMPERATURE_MENU as k,PAIN_MENU as L,OVERLAP as S}from"../../constants/index.js";import{promiseTimeout as Y}from"@vueuse/shared";function E(E,$,O,T,V,P,C,A,R,I){r(E,$);const{getEqualXTypes:X,handleAddPrevent:D,getPointEventProps:H}=w(E,O,$),{createShadowLines:z}=t(),{left:F,xScaleList:_,xCellWidth:W,yCellHeight:q,originX:G,endX:N,originY:B,endY:J,itemList:K,event:Q,vitalSignsOriginY:U,painOriginY:Z,hospitalizationDate:ee,config:te,canvasHeight:ie}=$,ne=new Set,oe=["xinmai","mai"],le=new Map,se=new Set,re=new Set,ue=new Set,ae=x(F.yScaleValue),ce=new Set;function de(t){var o;const l=ae.find((e=>"pulse"===e.type));if(l&&(null==(o=l.dataList)?void 0:o.length)&&(ne.size&&E.value.remove(...ne),ne.clear(),le.size>1)){if(t){const{type:e,key:i}=t.origin||{};if("pulse"===e){const e=le.get(i),n=null==e?void 0:e.findIndex((e=>e[0]===t.left));e.splice(n,1,[t.left,t.top])}}const o=function(){const e=[],t=[],i=[];for(const e of le)t.push(e[1]),e[0]===oe[0]&&e[1].forEach((e=>{(le.get(oe[1])||[]).findIndex((t=>t[0]===e[0]))>-1&&i.push(e[0])}));const[n,o]=t;let l=[],s=[];return i.forEach((t=>{const i=n.findIndex((e=>e[0]===t)),r=o.findIndex((e=>e[0]===t)),u=n[i],a=o[r],c=n[i-1],d=n[i+1],p=o[r-1],f=o[r+1];if(c&&p){if(c[0]!==p[0]){const e=Math.max(c[0],p[0]);l.push([c,p].find((t=>t[0]===e)))}}else c?l.push(c):p&&s.push(p);const h=Math.min(u[1],a[1]);l.push([u,a].find((e=>e[1]===h)));const v=Math.max(u[1],a[1]);s.push([u,a].find((e=>e[1]===v)));const g=()=>{const t=[...l,...s.reverse()],[i]=t,n=j(t);i[0]===n[0]&&i[1]===n[1]&&t.splice(-1,1),e.push(t),l=[],s=[]};if(d&&f){if(d[0]!==f[0]){const e=Math.min(d[0],f[0]);l.push([d,f].find((t=>t[0]===e))),g()}}else d?(l.push(d),g()):f?(s.push(f),g()):g()})),e}();o.length>0&&function(e){Y(0).then((()=>{e.forEach((e=>{const t=[],i=[];Array.from(ue).forEach((n=>{var o,l;"pulse"===(null==(o=null==n?void 0:n.origin)?void 0:o.type)&&e.find((e=>Math.abs(n.left-e[0])<=1&&Math.abs(n.top-e[1])<=1))&&((null==(l=null==n?void 0:n.origin)?void 0:l.key)===oe[0]?t.push(n):i.push(n))})),[t,i].forEach((e=>{1!==(null==e?void 0:e.length)&&e.sort(((e,t)=>e.left-t.left)).forEach(((e,t)=>{t>0&&e.leftLine&&E.value.remove(e.leftLine)}))}))}))}))}(o);const{mode:s,style:r={}}=l.shadow||{};o.forEach((t=>{const o=t.map((e=>({x:e[0],y:e[1]}))),l=new e.Polygon(o,{...n,...r,strokeWidth:1});if(["slash","line"].includes(s)){l.set({fill:"transparent",stroke:r.stroke||"#f00"});const e=[];if(["slash"].includes(s))e.push(...z(t,r._angle,r.space)),e.forEach((e=>{Object.assign(e,{...n,...r}),ne.add(e)}));else{const n=function(e){const t=e.reduce(((e,t)=>{const i=Math.trunc(t[0]);return e[i]=e[i]?e[i].concat([t]):[t],e}),{}),i=Object.values(t).filter((e=>2===e.length&&Math.trunc(e[0][1])!==Math.trunc(e[1][1])));return i}(t);n.forEach((t=>{const n=i([...b(t)],{...r,originX:"center"});e.push(n),ne.add(n)}))}E.value.add(...e)}ne.add(l),E.value.add(l)}))}}function pe(e,t,r){var u;const{type:a,riseStyle:c={},noRiseStyle:p={},verifiedStyle:g={},reduceStyle:y={},pacemaker:m={},upArrowStyle:x={},limitValueStyle:b={},nonePainPointStyle:j={},belowMinValueStyle:w={},respiratorStyle:k={},dataList:L=[],list:S=[]}=r,{type:Y,textStyle:$,showConnectLine:P=!1}=j,A=[],I=[],X=[];let D=null;const z=e=>"breathe"==a&&e.respirator&&k.type&&k.fixedValue&&!e.value&&ve(e.time);if(null==(u=e.list)||u.forEach(((u,j)=>{const F=d(a)?L.find((e=>e.key===u.key)):e,_=ge(z(u)?{...u,value:k.fixedValue}:u,r),G=e.list[j+1],N=G?ge(z(G)?{...G,value:k.fixedValue}:G,r):void 0,B=G?d(a)?L.find((e=>e.key===G.key)):e:{},{title:J=""}=F;if("脉搏"===J&&"脉搏"!==B.title||"脉搏"!==J&&"脉搏"===B.title||!_||!N||f(_[0],1)!==f(N[0],1))_&&D&&(_[0]=D),D=null;else{const e=_[0]-W/2;_[0]=e+W/4,N[0]=D=_[0]+W/2}const K={};K.value=function(e,t,i){if(!(null==e?void 0:e.length)||!te.showValue)return;const{lineAttr:n={}}=i,o=e[1]<=U.originY+q?e[1]+q:e[1]-q,s=l([e[0],o],{value:z(t)?k.fixedValue:t.value,originX:"center",originY:"center",fill:n.stroke||"#000"});return X.push(s),{obj:s,top:-q}}(_,u,F),function(e,t,r,u){var d,f;if(!["temperature","pain","breathe"].includes(a))return;if(!(null==e?void 0:e.length)&&"temperature"===a&&!ve(t.time))return;if(!(null==e?void 0:e.length)&&"pain"===a)return;if(!t.value&&"breathe"===a)return;const{lineAttr:v={}}=r,{value:m}=u,x=T(t.time);let b,j,w,L,Y,E;if(t.noRise&&p.show){const i=M(p,t)?V(a,S,35):(null==e?void 0:e[1])||0;if(p.text)w=l([x,M(p,t)?i:i+5],{value:p.text.split("").join("\n"),originY:"top",...p.style}),t.value||ue.add(w);else if(t.value){w=s([x,i,i+2*q],{...p.style})}w&&X.push(w),w&&M(p,t)&&ce.add(w)}if(null==e?void 0:e[1]){if(t.rise&&c.show&&c.text&&(L=l([x,e[1]-(m?q:0)-5],{value:c.text.split("").join("\n"),originY:"bottom",...c.style}),X.push(L)),t.verified&&(Y=l([x,e[1]-(m?q:0)-5],{value:"v",originX:"center",originY:"bottom",...g}),X.push(Y)),h(t.physicsReduce)||h(t.drugReduce)){const l=V(a,S,null!=(d=t.physicsReduce)?d:t.drugReduce),s=l<e[1]&&(null==te?void 0:te.hypothermyViewCustom)?x+W/2:x;b=i([...e,s,l],{...v,...y.line,...n}),j=o((null==(f=null==y?void 0:y.point)?void 0:f.type)||"circle",{left:s,top:l,...y.point,...n,originY:l===ie?"bottom":"center"}),b&&X.push(b),j&&X.push(j)}t.respirator&&(E=o(k.type,{left:x,top:e[1]-(m?q:0)-5,originX:"center",originY:"bottom",...k.style}),X.push(E))}Object.assign(u,{reduceLine:{obj:b,type:"line"},noRiseText:{obj:w,top:p.text?5:2*q,isFixed:M(p,t)},riseText:{obj:L,top:(m?-q:0)-5},verifiedText:{obj:Y,top:(m?-q:0)-5},reducePoint:{obj:j,type:"reduce"},respirator:{obj:E,top:(m?-q:0)-5}})}(_,u,F,K),function(e,t,i,n){if(!(null==e?void 0:e.length)||!["pulse"].includes(a))return;const o=Math.max(...S),r=Math.min(...S);let u,c,d;const{upArrowShow:p=!1,limitValueShow:f=!1}=i;if(p&&+t.value>180){let t=e[1]-2.5*q,i=[e[1]-q/2,t];t<U.originY&&(t=e[1]+2.5*q,i=[t,e[1]+q/2]),u=s([e[0],i[0],i[1]],x,"up"),X.push(u)}if(f){const i={value:t.value,originX:"center",originY:"center",...b};if(+t.value>o){const t=u?e[1]+q/2+u.height:e[1]+q;c=l([e[0],t],i),X.push(c)}+t.value<r&&(c=l([e[0],e[1]-q],i),X.push(c))}if(w.show&&+t.value<r){const t=e[1];if(w.text)d=l([e[0],e[1]+5],{value:w.text.split("").join("\n"),originY:"top",...w.style});else{const i=t+2*q;d=s([e[0],t,i],{...w.style})}X.push(d)}Object.assign(n,{upArrow:{obj:u},limitValue:{obj:c,top:-q},belowMinValue:{obj:d,top:w.text?5:2*q,moveHide:!0}})}(_,u,F,K),function(n,l,s,u,c,d){let p,f;const{pointAttr:h={},lineAttr:g={},title:y="",key:x,type:b="circle"}=c,j=e.list[u+1],w=fe(a,e.list[u].value),L=l&&fe(a,j.value),S=()=>"pulse"==a&&s.pacemakerShow?m.value:z(s)?k.type:w&&"number"===Y?0:b;if(n&&l&&!s.breakpoint&&(!w&&!L||P)){f=i([...n,...l],{...g});const{obj:e}=(null==d?void 0:d.reducePoint)||{};if((null==e?void 0:e.top)<n[1]&&(null==te?void 0:te.hypothermyViewCustom)){const t=i([e.left,e.top,...l],{...g});X.unshift(t),Object.assign(d,{reduceRightLine:{obj:t,type:"reduce"}}),f.set("stroke","transparent")}}const M=S(),T=I[u-1],V={origin:{data:z(s)?{...s,value:k.fixedValue}:s,title:y,key:x||"",unit:r.unit,type:a,_type:v(y,a),dataIndex:t,index:u},leftLine:T,rightLine:f,otherObj:d,...s.pacemakerShow&&"pulse"==a?m.style:z(s)?k.style:h,lockMovementX:!0,...H(),...w?{selectable:!1,evented:!1,..."number"===Y?$:{}}:{}};n&&(T?V.leftLine.set("x2",n[0]):V.leftLine=null,p=o(M,{left:n[0],top:w?n[1]-5:n[1],...V}));I.push(f),p&&(x===oe[1]?se.add(p):re.add(p),function(e){Q.hovered&&(e.on("mouseover",(()=>{he(e,"hover")})),e.on("mouseout",(()=>{R.show=!1})));if(e.lockMovementX&&e.lockMovementY)return;e.on("moving",(()=>{!function(e){e.setCoords();const t="pain"===e.origin.type?Z:U;e.top<t.originY&&e.set("top",t.originY);e.top>t.endY&&e.set("top",t.endY)}(e),function(e){var t,i;null==(t=e.leftLine)||t.setCoords().set({x2:e.left,y2:e.top}),null==(i=e.rightLine)||i.setCoords().set({x1:e.left,y1:e.top}),Object.values(e.otherObj).forEach((t=>{const{obj:i,type:n="",top:o=0,isFixed:l,moveHide:s=!1}=t||{};"reduce"!==n&&i&&("line"===n?i.setCoords().set({x1:e.left,y1:e.top}):(l||i.setCoords().set({left:e.left,top:e.top+o}),s&&(E.value.remove(i),delete e.otherObj.obj)))})),de(e)}(e),Q.hovered&&he(e)})),e.on("mouseup",(t=>{if(R.show=!1,1===t.button){const{type:t}=e.origin,i=C(t,e.top),n={...e.origin,data:{...e.origin.data,value:i}};E.value.discardActiveObject(),O("change",n),me(n,"change")}}))}(p),A.push(p),ue.add(p))}(_,N,u,j,F,K)})),"pulse"===a){const{key:t}=e;let i=null;le.set(t,A.map(((e,t,n)=>{var o,l;const s=n[t+1];if(s&&f(e.left,1)===f(s.left,1)){const t=e.left-W/2;e.set("left",t+W/4),null==(o=e.rightLine)||o.set("x1",e.left),i=e.left+W/2,s.set("left",i)}else i&&(null==(l=e.leftLine)||l.set("x2",i),e.set("left",i)),i=null;return[e.left,e.top]})))}const F=I.filter((e=>e));E.value.add(...F,...A,...X)}function fe(e,t){return"pain"===e&&0==t}function he(e,t="moving"){const{title:i,unit:n,type:o,data:l}=e.origin;R.point={x:e.left,y:e.top};let s=`时间 ${((null==l?void 0:l.time)||P(e.left)).slice(-5)}`;R.list=[function(){const{drugReduce:r,physicsReduce:u}=l||{},a="hover"===t?l.value:C(o,e.top);if(h(r))return s+=(null==l?void 0:l.changeTime)?"—>"+(null==l?void 0:l.changeTime.slice(-5)):"",`药物降${"pain"==o?"痛":"温"} ${a}—>${r}${n||""}`;if(h(u))return s+=(null==l?void 0:l.changeTime)?"—>"+(null==l?void 0:l.changeTime.slice(-5)):"",`物理降${"pain"==o?"痛":"温"} ${a}—>${u}${n||""}`;return`${i} ${a}${n||""}`}(),s],R.show=!0}function ve(e){const[t]=_,i=j(_),n=t.start,o=i.end,l=c(e);return l>=n&&l<=o}function ge(e,t){const i="pain"===t.type?Z:U;if(!g(e)||!ve(e.time))return;const n=T(e.time),o=V(t.type,t.list,e.value);return[n,o<i.originY?i.originY:o>i.endY?i.endY:o]}function ye(e){const t=new Date,i=String(t.getMonth()+1).padStart(2,"0"),n=String(t.getDate()).padStart(2,"0"),o=c(`${t.getFullYear()}-${i}-${n} 23:59:59`),l=c(`${P(e)}:00`);return ee&&l<c(ee)?(D("exceedMin"),!1):!(l>o)||(D("exceedMax"),!1)}function me(e,t="add"){const{type:i,dataIndex:n,index:o,data:l,key:s}=e,r=ae.find((e=>e.type===i));if("add"===t){const e=d(i)?r.dataList.find((e=>e.enable)):r.dataList[n],t=m(l.time,e.list);e.list.splice(t,0,l)}else r.dataList[n].list[o]=l;xe()}function xe(){var e;ue.size&&(null==(e=E.value)||e.remove(...function(e){const t=[];return e.forEach((e=>{e&&t.push(e),(null==e?void 0:e.leftLine)&&t.push(null==e?void 0:e.leftLine),(null==e?void 0:e.rightLine)&&t.push(null==e?void 0:e.rightLine),Object.values((null==e?void 0:e.otherObj)||{}).forEach((e=>{(null==e?void 0:e.obj)&&t.push(null==e?void 0:e.obj)}))})),t}([...ue]))),ue.clear(),be()}function be(e){le.clear(),ue.clear(),se.clear(),ce.clear(),re.clear(),ae.forEach((t=>{null==e||e(t),t.dataList.forEach(((e,i)=>{!e.show||d(t.type)&&!e.enable||pe(e,i,t)}))})),de(),[...ue].forEach((e=>{null==e||e.bringToFront()})),function(){var e;const t=ae.find((e=>"pulse"===e.type));if(!t||!(null==(e=t.dataList)?void 0:e.length))return;if(!t.dataList.some((e=>e.title.includes("脉搏"))))return;const i=Object.assign({},S,F.overlap||{}),l=[];se.size&&[...se].forEach((e=>{[...re].forEach((t=>{if(t.origin&&p(e,t)){const e=t.origin.key;if(e){const s={left:t.left,top:t.top,...n,hoverCursor:"default"};let r="koumai";"yemai"===e&&(r=e),l.push(o(r,{...i[e],...s}))}}}))})),setTimeout((()=>{E.value.add(...l),l.forEach((e=>{null==e||e.bringToFront(),ue.add(e)}))}))}()}return be((e=>function(e){if("temperature"!==e.type||!e.positionLine)return;const t=V(e.type,e.list,e.positionLine.value),n=i([G,t,N,t],e.positionLine);E.value.add(n)}(e))),E.value.on("mouse:up",(e=>{const{button:t,target:i,pointer:n={}}=e;if(3===t){if(!$.event.evented)return;const{x:e=0,y:t=0}=n;if(e>=G&&e<=N&&t>=B&&t<=J){I.point={x:e,y:t},I.show=!0;const{type:o}=(null==i?void 0:i.origin)||{};if(i&&["temperature","pain"].includes(o))"temperature"===o&&(I.list=[...k]),"pain"===o&&(I.list=[...L]),I.target=i;else{I.target=null,I.list=["新增节点"],K.forEach((i=>{if(!X([...ue],e,"_type").includes(i.bigType)){const e=["pain"].includes(i.bigType)?Z:U;t>=e.originY&&t<=e.endY&&I.list.push({renderItem:A?A(i):()=>i.title,origin:{title:i.title,unit:i.unit,type:a(i.bigType),dataIndex:i.dataIndex,key:i.key},pointer:n})}}));const i=ye(e);i&&1!==I.list.length||(I.show=!1,1===I.list.length&&i&&D("repeat"))}}}if(1===t){if(i)return;const{x:e=0,y:t=0}=n;e>=G&&e<=N&&t>0&&t<ie&&O("click:grid",{x:e,y:t,time:P(e)})}})),{clickMenu:function({item:e,target:t}){if(t){const{data:i,type:n,dataIndex:o,index:l}=t.origin,s=y(i,[...k,...L]);s[`${e.type}`]=e.value,s.changeTime=u(new Date,"yyyy-MM-dd HH:mm"),d(n)&&(s.key=t.origin.key);const r={...t.origin,data:s};O("change",r),me(r,"change")}else{const t={data:{time:P(e.pointer.x),value:C(e.origin.type,e.pointer.y),...d(e.origin.type)?{key:e.origin.key}:{}},...e.origin};O("add",t),me(t)}},setPopup:he,isAddPoint:ye,updateData:me,redrawPoints:xe,gridPoints:ue,fixedNoRisePoints:ce}}function M(e,t){return e.fixed||!t.value&&0!==t.value}export{E as useCenter};
|
@@ -3,8 +3,13 @@ import { fabric } from '../../../../../shared/utils/fabricjs';
|
|
3
3
|
import { IPointTipProps, IPointMenuProps } from '../../../../../components/fabric-chart/src/interface';
|
4
4
|
import { AnyObject } from '../../../../../shared/types';
|
5
5
|
export declare function useTemperatureChart(canvas: Ref<fabric.Canvas>, props: AnyObject, emits: Function, canvasRef: Ref<HTMLCanvasElement | null>, pointTipProps: IPointTipProps, pointMenuProps: IPointMenuProps): {
|
6
|
+
select?: Ref<import("../../../../../shared/types").AnyFn | null | undefined> | undefined;
|
7
|
+
redrawPoints?: Ref<import("../../../../../shared/types").AnyFn | null | undefined> | undefined;
|
8
|
+
clickMenu?: Ref<import("../../../../../shared/types").AnyFn | null | undefined> | undefined;
|
9
|
+
updatePolyline?: Ref<import("../../../../../shared/types").AnyFn | null | undefined> | undefined;
|
10
|
+
useMeasureRuler?: Ref<import("../../../../../shared/types").AnyFn | null | undefined> | undefined;
|
11
|
+
useCaliper?: Ref<import("../../../../../shared/types").AnyFn | null | undefined> | undefined;
|
12
|
+
useCaliperRuler?: Ref<import("../../../../../shared/types").AnyFn | null | undefined> | undefined;
|
13
|
+
useRectRuler?: Ref<import("../../../../../shared/types").AnyFn | null | undefined> | undefined;
|
6
14
|
propItems: any;
|
7
|
-
redrawPoints: Ref<any>;
|
8
|
-
select: Ref<any>;
|
9
|
-
clickMenu: Ref<any>;
|
10
15
|
};
|
@@ -1 +1 @@
|
|
1
|
-
import{
|
1
|
+
import{reactive as e,computed as a,watch as t,toRefs as l}from"vue";import{defaultBorderStyle as u}from"../useDraw.js";import"../../../../../shared/utils/fabricjs/index.js";import{useCumputedPoint as i}from"../useCumputedPoint.js";import{useCanvasEvent as n}from"../useEvent.js";import{setOtherType as r,getFloorNumber as o}from"../../utils/index.js";import{flatten as v}from"lodash-es";import{format as s,addDays as d}from"date-fns";import"naive-ui";import"@vueuse/core";import{useTop as c}from"./useTop.js";import{useLeft as p}from"./useLeft.js";import{useRight as h}from"./useRight.js";import{useCenter as g}from"./useCenter.js";import{useBottom as m}from"./useBottom.js";import{useOther as f}from"./useOther.js";function y(y,S,Y,w,b,C){const x=15,D=e({select:null,redrawPoints:null,clickMenu:null}),j=a((()=>{const{painSurplusCell:e=[0,0]}=S.data.grid||{};return~U.value?e:[0,0]})),V=a((()=>{var e,a;const t=(null==(a=null==(e=S.data.grid)?void 0:e.surplusCell)?void 0:a.slice())||[0,0,0,0];return 0===U.value?t[0]=t[0]+j.value[1]:U.value>0&&(t[2]=t[2]+j.value[0]),t})),H=a((()=>0===U.value?[j.value[0],V.value[1],V.value[2],V.value[3]]:U.value>0?[V.value[0],V.value[1],j.value[1],V.value[3]]:V.value)),X=a((()=>{const{top:e}=S.data;return e.date.show&&(e.date.height||x)||0})),L=a((()=>{var e;const{top:a}=S.data;return(null==(e=a.hospitalDays)?void 0:e.show)&&(a.hospitalDays.height||x)||0})),P=a((()=>{var e;const{top:a}=S.data;return(null==(e=a.operationDays)?void 0:e.show)&&(a.operationDays.height||x)||0})),M=a((()=>{var e,a,t;const{top:l}=S.data;return((null==(e=l.xScalevalue)?void 0:e.show)&&(l.xScalevalue.height||x)||0)+((null==(a=l.xScalevalue)?void 0:a.show)&&null!=(t=l.dayHeight)?t:0)})),I=a((()=>{var e;const{bottom:a}=S.data;return(null==(e=null==a?void 0:a.breathing)?void 0:e.show)&&(a.breathing.height||30)||0})),N=a((()=>{const{grid:e}=S.data;return e.mainXCell*e.subXCell+V.value[1]+V.value[3]})),k=a((()=>{const{grid:e}=S.data,a=U.value>0?j.value[1]:j.value[0];return e.mainYCell*e.subYCell+V.value[0]+V.value[2]+a})),O=a((()=>{var e;const{width:a,right:t=null,top:l}=S.data;if(!t)return a;return a-(null!=(e=t.width)?e:0)})),R=a((()=>O.value-V.value[1]*q.value)),W=a((()=>{const{top:e,left:a}=S.data;return e.titleWidth+T.value})),$=a((()=>{const{bottom:e=null,height:a}=S.data;if(!e)return a;return a-(e.height||30)})),G=a((()=>{var e;const{top:a}=S.data,t=a.xScalevalue.show&&(null!=(e=a.dayHeight)?e:0)||0,l=a.xScalevalue.show&&(a.xScalevalue.height||x)||0;return X.value+t+l+L.value+P.value})),q=a((()=>(O.value-W.value)/N.value)),z=a((()=>($.value-G.value)/k.value)),T=a((()=>{var e,a;const{left:t}=S.data;return(null==(e=t.icons)?void 0:e.show)&&((null==(a=t.icons)?void 0:a.width)||100)||0})),A=a((()=>{var e,a;const{top:t,grid:l}=S.data,u=(null==(a=null==(e=t.date.list)?void 0:e.slice)?void 0:a.call(e,0,l.mainXCell))||[],i=t.xScalevalue.times;let n=W.value-q.value;const r=t.date.startDate||s(new Date,"yyyy-MM-dd"),o=u.reduce(((e,a,t)=>0===t?e.concat(r):e.concat(s(d(new Date(r.replace(/-/g,"/")),t),"yyyy-MM-dd"))),[]).map((e=>i.map((a=>{n+=q.value;const t=Date.parse(`${e} ${a.start}`),l=Date.parse(`${e} ${a.end}`);return{start:t,end:l,left:n,center:n+q.value/2,scaleCell:(l-t)/q.value}}))));return v(o)})),B=a((()=>ue("breathe"))),E=a((()=>ue("pulse"))),F=a((()=>ue("temperature"))),J=a((()=>ue("pain"))),K=a((()=>{var e;return(null==(e=S.data.grid)?void 0:e.event)||{selectable:!0,evented:!0,hovered:!0}})),Q=a((()=>{const{left:e}=S.data;return v(e.yScaleValue.map((e=>e.dataList.filter((e=>e.show)).map(((a,t)=>({...a,bigType:r(a.title,e.type),unit:e.unit,dataIndex:t}))))))})),U=a((()=>{var e,a;const{left:t}=S.data,l=t.yScaleValue.findIndex((e=>"pain"===e.type));return l>-1&&(null==(a=null==(e=t.yScaleValue[l].dataList)?void 0:e[0])?void 0:a.show)?l:-1})),Z=a((()=>{const{grid:e}=S.data;return-1===U.value?0:z.value*e.subYCell})),_=a((()=>{const{left:e}=S.data,a={originY:G.value+j.value[0]*z.value,endY:$.value-j.value[1]*z.value};return 0===U.value&&e.yScaleValue.length>1?a.endY=a.originY+Z.value:U.value===e.yScaleValue.length-1&&(a.originY=a.endY-Z.value),a})),ee=a((()=>{const{left:e}=S.data,a={originY:G.value+V.value[0]*z.value,endY:$.value-V.value[2]*z.value};return 0===U.value&&e.yScaleValue.length>1?a.originY=_.value.endY+V.value[0]*z.value:U.value===e.yScaleValue.length-1&&(a.endY=_.value.originY-V.value[2]*z.value),a})),ae=a((()=>{var e,a;const{top:t,grid:l}=S.data,u=[];for(const i in t)t[i].show&&u.push({...t[i],list:(null==(a=null==(e=t[i].list)?void 0:e.slice)?void 0:a.call(e,0,l.mainXCell))||[],key:i});return u.sort(((e,a)=>e.seq-a.seq))})),te=a((()=>{var e;const{left:a,right:t}=S.data,l=a.yScaleValue.find((e=>"temperature"===e.type)),u=(null==t?void 0:t.yScaleValue)||{};if(null==(e=null==l?void 0:l.list)?void 0:e.length){const e=(null==u?void 0:u.showdetailedScale)?l.list.reduce((e=>{const a=e[e.length-1];return a?e.concat([a+1,a+2]):e.concat([92])}),[]):[],a=l.list.map((e=>o(1.8*e+32)));Object.assign(u,{list:a,detailedList:e,spaceGridNumber:l.spaceGridNumber})}return u})),le=e({canvasWidth:S.data.width,canvasHeight:S.data.height,borderStyle:{...u,...S.data.borderStyle||{}},selectionStyle:S.data.selectionStyle||{},dateHeight:X.value,hospitalDaysHeight:L.value,operationDaysHeight:P.value,xScalevalueHeight:M.value,topList:ae.value,breathingHeight:I.value,hospitalizationDate:S.data.hospitalizationDate,grid:S.data.grid,top:S.data.top,left:S.data.left,right:S.data.right,bottom:S.data.bottom,other:S.data.other,painIndex:U.value,painHeight:Z.value,painOriginY:_.value,vitalSignsOriginY:ee.value,gridXNumber:N.value,gridYNumber:k.value,iconsWidth:T.value,originX:W.value,originY:G.value,endX:O.value,endXLimit:R.value,endY:$.value,xCellWidth:q.value,yCellHeight:z.value,xScaleList:A.value,breatheYCell:B.value,pulseYCell:E.value,temperatureYCell:F.value,painYCell:J.value,event:K.value,itemList:Q.value,getRightInfo:te.value,config:S.data.config||{},surplusCell:V.value,painSurplusCell:j.value,mainSurplusCell:H.value});function ue(e){const{yScaleValue:a}=S.data.left,t=a.find((a=>a.type===e)),l=(null==t?void 0:t.list)||[];return l.length?z.value/((l[1]-l[0])/t.spaceGridNumber):0}const{computedX:ie,computedY:ne,getXValue:re,getYValue:oe}=i(le);return t((()=>y.value),(e=>{e&&function(){c(y,le);const{setPopup:e,isAddPoint:a,updateData:t,redrawPoints:l,clickMenu:u,gridPoints:i,fixedNoRisePoints:r}=g(y,le,Y,ie,ne,re,oe,S.addRenderItem,b,C);D.redrawPoints=l,D.clickMenu=u;const{drawScaleValue:o}=p(y,le,Y,e,b,ie,ne,re,oe,a,t,i);h(y,le,o),m(y,le),f(y,le,Y,ie,ne,r);const{select:v}=n(y,le,Y);D.select=v}()}),{immediate:!0}),{propItems:le,...l(D)}}export{y as useTemperatureChart};
|
@@ -1,6 +1,6 @@
|
|
1
1
|
import { type Ref } from 'vue';
|
2
2
|
import { fabric } from '../../../shared/utils/fabricjs';
|
3
|
-
import { AnyObject } from '../../../shared/types';
|
3
|
+
import { AnyObject, AnyFn } from '../../../shared/types';
|
4
4
|
export type IType = 'temperature' | 'birthProcess' | 'surgicalAnesthesia' | 'electrocardiogram' | 'newBirthProcess' | undefined;
|
5
5
|
export type ILineCoordinate = [number, number, number, number];
|
6
6
|
interface IEvent {
|
@@ -180,4 +180,14 @@ export type IPointMenuProps = Pick<IPointTipProps, 'show' | 'point'> & {
|
|
180
180
|
};
|
181
181
|
export type IFabricChartMainParam = [Ref<fabric.Canvas>, any, any, Ref<any>, IPointTipProps, IPointMenuProps];
|
182
182
|
export type IPointer = [number, number];
|
183
|
+
export type IexposeMethods = Partial<{
|
184
|
+
select: AnyFn | null;
|
185
|
+
redrawPoints: AnyFn | null;
|
186
|
+
clickMenu: AnyFn | null;
|
187
|
+
updatePolyline: AnyFn | null;
|
188
|
+
useMeasureRuler: AnyFn | null;
|
189
|
+
useCaliper: AnyFn | null;
|
190
|
+
useCaliperRuler: AnyFn | null;
|
191
|
+
useRectRuler: AnyFn | null;
|
192
|
+
}>;
|
183
193
|
export {};
|
@@ -1911,7 +1911,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
1911
1911
|
wrapperStyle?: Record<string, string> | undefined;
|
1912
1912
|
childFieldStrategy?: "checked" | "all" | undefined;
|
1913
1913
|
childWidthMode?: "inner" | "outer" | undefined;
|
1914
|
-
validator?: ((value: unknown, fieldItem: import("..").FieldItem) => string | void) | undefined;
|
1914
|
+
validator?: ((value: unknown, fieldItem: import("..").FieldItem, field: import("@formily/core").Field<any, any, any, any>) => string | void) | undefined;
|
1915
1915
|
reactions?: {
|
1916
1916
|
[x: string]: any;
|
1917
1917
|
dependencies?: string[] | undefined;
|
@@ -2158,7 +2158,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
2158
2158
|
wrapperStyle?: Record<string, string> | undefined;
|
2159
2159
|
childFieldStrategy?: "checked" | "all" | undefined;
|
2160
2160
|
childWidthMode?: "inner" | "outer" | undefined;
|
2161
|
-
validator?: ((value: unknown, fieldItem: import("..").FieldItem) => string | void) | undefined;
|
2161
|
+
validator?: ((value: unknown, fieldItem: import("..").FieldItem, field: import("@formily/core").Field<any, any, any, any>) => string | void) | undefined;
|
2162
2162
|
reactions?: {
|
2163
2163
|
[x: string]: any;
|
2164
2164
|
dependencies?: string[] | undefined;
|
@@ -2376,7 +2376,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
2376
2376
|
wrapperStyle?: Record<string, string> | undefined;
|
2377
2377
|
childFieldStrategy?: "checked" | "all" | undefined;
|
2378
2378
|
childWidthMode?: "inner" | "outer" | undefined;
|
2379
|
-
validator?: ((value: unknown, fieldItem: import("..").FieldItem) => string | void) | undefined;
|
2379
|
+
validator?: ((value: unknown, fieldItem: import("..").FieldItem, field: import("@formily/core").Field<any, any, any, any>) => string | void) | undefined;
|
2380
2380
|
reactions?: {
|
2381
2381
|
[x: string]: any;
|
2382
2382
|
dependencies?: string[] | undefined;
|
@@ -1914,7 +1914,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
1914
1914
|
wrapperStyle?: Record<string, string> | undefined;
|
1915
1915
|
childFieldStrategy?: "checked" | "all" | undefined;
|
1916
1916
|
childWidthMode?: "inner" | "outer" | undefined;
|
1917
|
-
validator?: ((value: unknown, fieldItem: import("../../../components/form-render").FieldItem) => string | void) | undefined;
|
1917
|
+
validator?: ((value: unknown, fieldItem: import("../../../components/form-render").FieldItem, field: import("@formily/core").Field<any, any, any, any>) => string | void) | undefined;
|
1918
1918
|
reactions?: {
|
1919
1919
|
[x: string]: any;
|
1920
1920
|
dependencies?: string[] | undefined;
|
@@ -2161,7 +2161,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
2161
2161
|
wrapperStyle?: Record<string, string> | undefined;
|
2162
2162
|
childFieldStrategy?: "checked" | "all" | undefined;
|
2163
2163
|
childWidthMode?: "inner" | "outer" | undefined;
|
2164
|
-
validator?: ((value: unknown, fieldItem: import("../../../components/form-render").FieldItem) => string | void) | undefined;
|
2164
|
+
validator?: ((value: unknown, fieldItem: import("../../../components/form-render").FieldItem, field: import("@formily/core").Field<any, any, any, any>) => string | void) | undefined;
|
2165
2165
|
reactions?: {
|
2166
2166
|
[x: string]: any;
|
2167
2167
|
dependencies?: string[] | undefined;
|
@@ -2379,7 +2379,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
2379
2379
|
wrapperStyle?: Record<string, string> | undefined;
|
2380
2380
|
childFieldStrategy?: "checked" | "all" | undefined;
|
2381
2381
|
childWidthMode?: "inner" | "outer" | undefined;
|
2382
|
-
validator?: ((value: unknown, fieldItem: import("../../../components/form-render").FieldItem) => string | void) | undefined;
|
2382
|
+
validator?: ((value: unknown, fieldItem: import("../../../components/form-render").FieldItem, field: import("@formily/core").Field<any, any, any, any>) => string | void) | undefined;
|
2383
2383
|
reactions?: {
|
2384
2384
|
[x: string]: any;
|
2385
2385
|
dependencies?: string[] | undefined;
|
@@ -417,7 +417,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
417
417
|
wrapperStyle?: Record<string, string> | undefined;
|
418
418
|
childFieldStrategy?: "checked" | "all" | undefined;
|
419
419
|
childWidthMode?: "inner" | "outer" | undefined;
|
420
|
-
validator?: ((value: unknown, fieldItem: FieldItem) => string | void) | undefined;
|
420
|
+
validator?: ((value: unknown, fieldItem: FieldItem, field: import("@formily/core").Field<any, any, any, any>) => string | void) | undefined;
|
421
421
|
reactions?: {
|
422
422
|
[x: string]: any;
|
423
423
|
dependencies?: string[] | undefined;
|
@@ -664,7 +664,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
664
664
|
wrapperStyle?: Record<string, string> | undefined;
|
665
665
|
childFieldStrategy?: "checked" | "all" | undefined;
|
666
666
|
childWidthMode?: "inner" | "outer" | undefined;
|
667
|
-
validator?: ((value: unknown, fieldItem: FieldItem) => string | void) | undefined;
|
667
|
+
validator?: ((value: unknown, fieldItem: FieldItem, field: import("@formily/core").Field<any, any, any, any>) => string | void) | undefined;
|
668
668
|
reactions?: {
|
669
669
|
[x: string]: any;
|
670
670
|
dependencies?: string[] | undefined;
|
@@ -882,7 +882,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
882
882
|
wrapperStyle?: Record<string, string> | undefined;
|
883
883
|
childFieldStrategy?: "checked" | "all" | undefined;
|
884
884
|
childWidthMode?: "inner" | "outer" | undefined;
|
885
|
-
validator?: ((value: unknown, fieldItem: FieldItem) => string | void) | undefined;
|
885
|
+
validator?: ((value: unknown, fieldItem: FieldItem, field: import("@formily/core").Field<any, any, any, any>) => string | void) | undefined;
|
886
886
|
reactions?: {
|
887
887
|
[x: string]: any;
|
888
888
|
dependencies?: string[] | undefined;
|
@@ -1 +1 @@
|
|
1
|
-
import{arrayed as e}from"../../../../shared/utils/index.js";import{once as a,isNumber as i,isString as m}from"lodash-es";import"vue";import{registerValidateLocale as r,registerValidateRules as s}from"@formily/core";import"@formily/path";import"@vicons/ionicons5";import"@vue/shared";import{isFunction as l}from"@vueuse/core";import"naive-ui";import{isIdCard as u}from"../utils/business.js";function n(){const a=new Map([["mobile",({validate:e})=>({format:"phone",message:null==e?void 0:e.message})],["integer",({validate:e})=>({format:"integer",message:null==e?void 0:e.message})],["number",({validate:e})=>({format:"number",message:null==e?void 0:e.message})],["id_card",({validate:e})=>({validator(a){var i;if(null!=a&&""!==a)return m(a)&&u(a)?void 0:null!=(i=null==e?void 0:e.message)?i:"该字段不是合法的身份证格式"}})],["regular",({validate:e,regular_expression:a,regular_error_tip:i})=>({pattern:a||(null==e?void 0:e.regular_expression)||"",message:i||(null==e?void 0:e.regular_error_tip)||(null==e?void 0:e.message)||"格式错误"})]]),i={triggerType:"onBlur"};return{createValidatorSchema:function(m){const r=[],{validate:{vali_obj:s,max_length:u,min_length:n,message:o,max_value:t,min_value:g,decimal_length:v}={},validator:d}=m;if(d&&e(d).forEach((e=>{l(e)&&r.push({validator:a=>e(a,m)})})),u&&r.push({max:u,message:o}),n&&r.push({min:n,message:o}),t&&r.push({maximum:t,message:o}),g&&r.push({minimum:g,message:o}),null!=v&&r.push(((e,a)=>{const i=null!=a?a:`小数位数最多${e}位`;return{validator(a){var m;return(null==(m=String(a).split(".")[1])?void 0:m.length)>e?i:""}}})(+v,o)),s){const e=a.get(s)||(({validate:e})=>({format:s,message:null==e?void 0:e.message}));r.push(Object.assign({},i,e(m)))}return r}}}const o=a((()=>{r({"zh-CN":{required:"${alias||name}为必填"}}),s({maximum:(e,a)=>i(Number(a.maximum))&&null!=e&&""!==e&&"/"!==e?(m(e)&&(e=+e),!i(e)||isNaN(e)?"":e>Number(a.maximum)&&a.message||""):"",minimum:(e,a)=>i(Number(a.minimum))&&null!=e&&""!==e&&"/"!==e?(m(e)&&(e=+e),!i(e)||isNaN(e)?"":e<Number(a.minimum)&&a.message||""):""})}));export{n as useFormValidator,o as validateMessageLocale};
|
1
|
+
import{arrayed as e}from"../../../../shared/utils/index.js";import{once as a,isNumber as i,isString as m}from"lodash-es";import"vue";import{registerValidateLocale as r,registerValidateRules as s}from"@formily/core";import"@formily/path";import"@vicons/ionicons5";import"@vue/shared";import{isFunction as l}from"@vueuse/core";import"naive-ui";import{isIdCard as u}from"../utils/business.js";function n(){const a=new Map([["mobile",({validate:e})=>({format:"phone",message:null==e?void 0:e.message})],["integer",({validate:e})=>({format:"integer",message:null==e?void 0:e.message})],["number",({validate:e})=>({format:"number",message:null==e?void 0:e.message})],["id_card",({validate:e})=>({validator(a){var i;if(null!=a&&""!==a)return m(a)&&u(a)?void 0:null!=(i=null==e?void 0:e.message)?i:"该字段不是合法的身份证格式"}})],["regular",({validate:e,regular_expression:a,regular_error_tip:i})=>({pattern:a||(null==e?void 0:e.regular_expression)||"",message:i||(null==e?void 0:e.regular_error_tip)||(null==e?void 0:e.message)||"格式错误"})]]),i={triggerType:"onBlur"};return{createValidatorSchema:function(m){const r=[],{validate:{vali_obj:s,max_length:u,min_length:n,message:o,max_value:t,min_value:g,decimal_length:v}={},validator:d}=m;if(d&&e(d).forEach((e=>{l(e)&&r.push({validator:(a,i,r)=>e(a,m,r)})})),u&&r.push({max:u,message:o}),n&&r.push({min:n,message:o}),t&&r.push({maximum:t,message:o}),g&&r.push({minimum:g,message:o}),null!=v&&r.push(((e,a)=>{const i=null!=a?a:`小数位数最多${e}位`;return{validator(a){var m;return(null==(m=String(a).split(".")[1])?void 0:m.length)>e?i:""}}})(+v,o)),s){const e=a.get(s)||(({validate:e})=>({format:s,message:null==e?void 0:e.message}));r.push(Object.assign({},i,e(m)))}return r}}}const o=a((()=>{r({"zh-CN":{required:"${alias||name}为必填"}}),s({maximum:(e,a)=>i(Number(a.maximum))&&null!=e&&""!==e&&"/"!==e?(m(e)&&(e=+e),!i(e)||isNaN(e)?"":e>Number(a.maximum)&&a.message||""):"",minimum:(e,a)=>i(Number(a.minimum))&&null!=e&&""!==e&&"/"!==e?(m(e)&&(e=+e),!i(e)||isNaN(e)?"":e<Number(a.minimum)&&a.message||""):""})}));export{n as useFormValidator,o as validateMessageLocale};
|
@@ -1,5 +1,6 @@
|
|
1
1
|
import { FormRequestDefine } from '../../../../shared/hooks';
|
2
2
|
import { AnyObject, ArrayAble, LowCodeTypes } from '../../../../shared/types';
|
3
|
+
import { Field } from '@formily/core';
|
3
4
|
import { SchemaEffectTypes, SchemaTypes } from '@formily/vue';
|
4
5
|
import { VNode } from 'vue';
|
5
6
|
import { DependKeyType, FormCommonState } from '../../../../components/form-render';
|
@@ -158,7 +159,7 @@ export type FieldItem = {
|
|
158
159
|
* @param fieldItem 配置参数
|
159
160
|
* @return {void|string} 返回校验信息
|
160
161
|
*/
|
161
|
-
validator: (value: unknown, fieldItem: FieldItem) => void | string;
|
162
|
+
validator: (value: unknown, fieldItem: FieldItem, field: Field) => void | string;
|
162
163
|
reactions: ArrayAble<ReactionType>;
|
163
164
|
[key: string]: any;
|
164
165
|
}>;
|
@@ -16,6 +16,13 @@ declare const IhoChat: SFCWithInstall<import("vue").DefineComponent<{
|
|
16
16
|
type: StringConstructor;
|
17
17
|
default: string;
|
18
18
|
};
|
19
|
+
chatBox: {
|
20
|
+
type: BooleanConstructor;
|
21
|
+
default: boolean;
|
22
|
+
};
|
23
|
+
defaultSessionKey: {
|
24
|
+
type: StringConstructor;
|
25
|
+
};
|
19
26
|
}, {
|
20
27
|
props: Readonly<import("@vue/shared").LooseRequired<Readonly<import("vue").ExtractPropTypes<{
|
21
28
|
token: {
|
@@ -34,6 +41,13 @@ declare const IhoChat: SFCWithInstall<import("vue").DefineComponent<{
|
|
34
41
|
type: StringConstructor;
|
35
42
|
default: string;
|
36
43
|
};
|
44
|
+
chatBox: {
|
45
|
+
type: BooleanConstructor;
|
46
|
+
default: boolean;
|
47
|
+
};
|
48
|
+
defaultSessionKey: {
|
49
|
+
type: StringConstructor;
|
50
|
+
};
|
37
51
|
}>> & {
|
38
52
|
"onTemplate-click"?: ((...args: any[]) => any) | undefined;
|
39
53
|
"onUnread-message-update"?: ((...args: any[]) => any) | undefined;
|
@@ -73,6 +87,7 @@ declare const IhoChat: SFCWithInstall<import("vue").DefineComponent<{
|
|
73
87
|
handleUserSearch: () => Promise<void>;
|
74
88
|
initWebSocket: () => void;
|
75
89
|
subscribeSessionList: () => void;
|
90
|
+
handleDefaultSession: () => void;
|
76
91
|
subscribeGroupMessage: () => void;
|
77
92
|
subscribeMessage: () => void;
|
78
93
|
handleMessage: (messageVo: import("../../shared/types").AnyObject, chatType: string) => Promise<void>;
|
@@ -582,7 +597,9 @@ declare const IhoChat: SFCWithInstall<import("vue").DefineComponent<{
|
|
582
597
|
setMsgList: (list?: import("../../shared/types").AnyObject[]) => void;
|
583
598
|
setCurrentSessionItem: (item: import("../../shared/types").AnyObject) => void;
|
584
599
|
isGroupChat: import("vue").ComputedRef<boolean>;
|
600
|
+
contextmenuRef: import("vue").Ref<any>;
|
585
601
|
showMenu: import("vue").Ref<boolean>;
|
602
|
+
contextmenuPosition: import("vue").Ref<import("../../shared/types").AnyObject>;
|
586
603
|
pageInfo: {
|
587
604
|
page: number;
|
588
605
|
hasMore: boolean;
|
@@ -592,7 +609,19 @@ declare const IhoChat: SFCWithInstall<import("vue").DefineComponent<{
|
|
592
609
|
'--c-tip-top': string;
|
593
610
|
'--c-tip-gap': string;
|
594
611
|
}>;
|
612
|
+
chatMainBounding: import("vue").ComputedRef<{
|
613
|
+
height: import("vue").Ref<number>;
|
614
|
+
bottom: import("vue").Ref<number>;
|
615
|
+
left: import("vue").Ref<number>;
|
616
|
+
right: import("vue").Ref<number>;
|
617
|
+
top: import("vue").Ref<number>;
|
618
|
+
width: import("vue").Ref<number>;
|
619
|
+
x: import("vue").Ref<number>;
|
620
|
+
y: import("vue").Ref<number>;
|
621
|
+
update: () => void;
|
622
|
+
}>;
|
595
623
|
getHistoryRecord: () => Promise<void>;
|
624
|
+
handleContextmenu: (event: MouseEvent) => Promise<void>;
|
596
625
|
showMessage: (item: import("../../shared/types").AnyObject) => boolean;
|
597
626
|
showTemplateMsg: (item: import("../../shared/types").AnyObject, type: "template" | "system") => boolean | undefined;
|
598
627
|
isTemplate3: (content: import("../../shared/types").AnyObject) => boolean;
|
@@ -763,13 +792,25 @@ declare const IhoChat: SFCWithInstall<import("vue").DefineComponent<{
|
|
763
792
|
type: BooleanConstructor;
|
764
793
|
default: boolean;
|
765
794
|
};
|
766
|
-
|
795
|
+
position: {
|
796
|
+
type: import("vue").PropType<import("vue").CSSProperties>;
|
797
|
+
};
|
798
|
+
exclude: {
|
799
|
+
type: import("vue").PropType<string[]>;
|
800
|
+
};
|
801
|
+
}, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("select" | "update:show")[], "select" | "update:show", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
|
767
802
|
show: {
|
768
803
|
type: BooleanConstructor;
|
769
804
|
default: boolean;
|
770
805
|
};
|
806
|
+
position: {
|
807
|
+
type: import("vue").PropType<import("vue").CSSProperties>;
|
808
|
+
};
|
809
|
+
exclude: {
|
810
|
+
type: import("vue").PropType<string[]>;
|
811
|
+
};
|
771
812
|
}>> & {
|
772
|
-
|
813
|
+
onSelect?: ((...args: any[]) => any) | undefined;
|
773
814
|
"onUpdate:show"?: ((...args: any[]) => any) | undefined;
|
774
815
|
}, {
|
775
816
|
show: boolean;
|
@@ -1217,10 +1258,18 @@ declare const IhoChat: SFCWithInstall<import("vue").DefineComponent<{
|
|
1217
1258
|
type: StringConstructor;
|
1218
1259
|
default: string;
|
1219
1260
|
};
|
1261
|
+
chatBox: {
|
1262
|
+
type: BooleanConstructor;
|
1263
|
+
default: boolean;
|
1264
|
+
};
|
1265
|
+
defaultSessionKey: {
|
1266
|
+
type: StringConstructor;
|
1267
|
+
};
|
1220
1268
|
}>> & {
|
1221
1269
|
"onTemplate-click"?: ((...args: any[]) => any) | undefined;
|
1222
1270
|
"onUnread-message-update"?: ((...args: any[]) => any) | undefined;
|
1223
1271
|
}, {
|
1224
1272
|
baseURL: string;
|
1273
|
+
chatBox: boolean;
|
1225
1274
|
}>>;
|
1226
1275
|
export default IhoChat;
|