cnhis-design-vue 3.1.54-beta.1 → 3.1.54-beta.3
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.
- package/es/components/fabric-chart/src/hooks/electrocardiogram/hooks/useDetailEvent.d.ts +4 -4
- package/es/components/fabric-chart/src/hooks/electrocardiogram/hooks/useDetailEvent.js +1 -1
- package/es/components/fabric-chart/src/hooks/electrocardiogram/useElectrocardiogram.js +1 -1
- package/es/shared/package.json.js +1 -1
- package/es/shared/utils/business.js +1 -1
- package/package.json +2 -2
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
import { fabric } from '../../../../../../../es/shared/utils/fabricjs';
|
|
2
|
-
declare type DetailEventOptions =
|
|
3
|
-
beforeEvent
|
|
2
|
+
declare type DetailEventOptions = {
|
|
3
|
+
beforeEvent?: () => any | Promise<any>;
|
|
4
4
|
showScaleText: boolean;
|
|
5
|
-
|
|
5
|
+
showNumberText: boolean;
|
|
6
6
|
scale: number;
|
|
7
7
|
endX: number;
|
|
8
8
|
endY: number;
|
|
9
9
|
};
|
|
10
|
-
export declare function useDetailEvent(polyline: fabric.Polyline, { scale, beforeEvent, endY, endX, showScaleText }: DetailEventOptions): void;
|
|
10
|
+
export declare function useDetailEvent(polyline: fabric.Polyline, { scale, beforeEvent, endY, endX, showScaleText, showNumberText }: DetailEventOptions): void;
|
|
11
11
|
export {};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{fabric as
|
|
1
|
+
import{fabric as e}from"../../../../../../shared/utils/fabricjs/index.js";import{defaultStyle as t}from"../../useDraw.js";import"date-fns";import"lodash-es";import"../../useEvent.js";import"vue";import"../../temperature/useShadow.js";import"naive-ui";import"@vueuse/core";import{POLYLINE_BASIC_SCALE as n,DETAIL_RADIUS as o}from"../constants/index.js";function r(r,{scale:l,beforeEvent:s,endY:i,endX:a,showScaleText:u,showNumberText:f}){let p=null;function c(){var e;p&&(null==(e=r.canvas)||e.remove(p)),p=null}r.on("mousedown",(async y=>{var d,h;if(await(null==s?void 0:s()),1!==y.button||!y.target||!y.pointer)return;const w=y.target;if(!w.points)return;const{x:m,y:x}=y.pointer,v=(m-(w.left||0))/n;let g=v-o,b=v+o;g<=0?(g=0,b=Math.min(2*o,w.points.length-1)):b>=w.points.length-1&&(b=w.points.length-1,g=Math.max(w.points.length-2*o,0));const k=w.points.slice(g,b).map((({y:e},t)=>({x:t,y:e}))),j=v-g;let T=0,S=0;k.forEach(((e,t)=>{e.y>k[T].y&&(T=t),e.y<k[S].y&&(S=t)}));const $=n*l*o*2-1,E=n*l*(k[T].y-k[S].y)-1,G=E+30+70,L={x:a-m<=$?m-$:m,y:i-x<=G?x-G:x};c(),p=new e.Group;const W=[new e.Rect({...t,left:L.x,top:L.y,width:$,height:G,stroke:"transparent",fill:"#fff",shadow:new e.Shadow({color:"rgba(0, 0, 0, 0.3)",blur:15,offsetX:8,offsetY:8})}),(z=k,new e.Polyline(z,{...t,fill:"transparent",stroke:"red",strokeWidth:3,scaleX:n*l,scaleY:n*l,left:L.x,top:L.y+30})),function(n,o){const r={strokeDashArray:[3,4],width:3,top:L.y},l=new e.Line(a(n[T]),{...t,...r,left:L.x+T/n.length*$,stroke:"red"}),s=new e.Line(a(n[S]),{...t,...r,stroke:"blue",left:L.x+S/n.length*$}),i=new e.Line(a(n[o]),{...t,...r,stroke:"green",left:L.x+o/n.length*$});return new e.Group([l,s,i]);function a(e){return[e.x,e.y,e.x,e.y-G]}}(k,j),(X=k,Y=j,new e.Circle({...t,radius:5,fill:"transparent",stroke:"green",strokeWidth:1,left:L.x+Y/X.length*$-5,top:L.y+(X[Y].y-X[S].y)/(X[T].y-X[S].y)*E-5+30}))];var X,Y,z;u&&W.push(new e.Text(`x${l}`,{...t,fill:"black",fontSize:20,left:L.x+10,top:L.y+G-30})),f&&W.push(function(n,o){const r={fontSize:16,left:L.x+$/2+10},l=new e.Text(`最大: ${n[T].y} mv`,{...t,...r,fill:"red",top:L.y+G-20}),s=new e.Text(`最小: ${n[S].y} mv`,{...t,...r,fill:"blue",top:L.y+G-40}),i=new e.Text(`当前: ${n[o].y} mv`,{...t,...r,fill:"green",top:L.y+G-60});return new e.Group([l,s,i])}(k,j)),p.add(...W).addWithUpdate(),null==(d=r.canvas)||d.add(p),null==(h=r.canvas)||h.discardActiveObject()})),r.on("mouseup",(async e=>{await(null==s?void 0:s()),1===e.button&&c()}))}export{r as useDetailEvent};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{fabric as e}from"../../../../../shared/utils/fabricjs/index.js";import{useThrottleFn as t}from"@vueuse/core";import{range as r}from"lodash-es";import{useDetailEvent as o}from"./hooks/useDetailEvent.js";import{defaultTextStyle as n,drawLine as i}from"../useDraw.js";import{useGrid as s}from"../useGrid.js";import"date-fns";import"../useEvent.js";import"vue";import"../temperature/useShadow.js";import"naive-ui";import{POLYLINE_BASIC_SCALE as a}from"./constants/index.js";function l(l,d,c){const{borderStyle:u,originX:
|
|
1
|
+
import{fabric as e}from"../../../../../shared/utils/fabricjs/index.js";import{useThrottleFn as t}from"@vueuse/core";import{range as r}from"lodash-es";import{useDetailEvent as o}from"./hooks/useDetailEvent.js";import{defaultTextStyle as n,drawLine as i}from"../useDraw.js";import{useGrid as s}from"../useGrid.js";import"date-fns";import"../useEvent.js";import"vue";import"../temperature/useShadow.js";import"naive-ui";import{POLYLINE_BASIC_SCALE as a}from"./constants/index.js";function l(l,d,c){const{borderStyle:u,originX:h,originY:f,xCellWidth:m,endY:p,yCellHeight:g,endX:v,canvasWidth:x,canvasHeight:w,dataList:j,columnNumber:k}=d,S=new Set,Y=new Set;function b(t=0){j.forEach(((r,o)=>{if(o===j.length-1&&arguments.length)return;const{x:i,y:s}=r.origin,l=~~(r.data.length/k),d=r.data.reduce(((e,r,n)=>{const i=o<12&&n>=t&&n<=t+l||12===o?[{x:e.length+1,y:p-+r}]:[];return e.concat(i)}),[]),c=new e.Polyline(d,{fill:"transparent",stroke:"red",strokeWidth:10,left:i,top:s,scaleX:a,scaleY:a,originY:"center",hasControls:!1,hasBorders:!1,hoverCursor:"default",lockMovementX:!0,lockMovementY:!0});if(y(c),c.startIdx=t,o<j.length-1?S.add(c):Y.add(c),arguments.length)return;const u=new e.Text(String(r.title),{...n,left:i+m,top:s-2*g,originX:"left",originY:"top"});Y.add(u)}));const r=arguments.length?[...S]:[...S,...Y];l.value.add(...r)}function y(e,{scale:t=4,showScaleText:r=!0,showNumberText:n=!0}={}){o(e,{scale:t,endX:v,endY:p,showNumberText:n,showScaleText:r,beforeEvent:()=>c.value&&Promise.reject()})}s(l,d),function(){const{strokeWidth:t}=u,r=new e.Rect({...u,width:x-t,height:w-t,left:h,top:f,fill:"transparent"});l.value.add(r)}(),function(){const e=x/k,t=[];r(k).forEach((r=>{if(r+1>=k)return;const o=(r+1)*e,n=i([o,0,o,w],{stroke:"#000"});t.push(n)})),l.value.add(...t)}(),b();return{updatePolyline:t((e=>{if(1===k)return;const t=j[j.length-1].data.length,r=~~(t/k),o=e/100*t-r/2,n=o+r>t?t-r:Math.max(0,o);if(S.size){const[e]=[...S];if(e.startIdx===n)return;[...S].forEach((e=>l.value.remove(e))),S.clear()}requestAnimationFrame((()=>{b(n)}))}),200)}}export{l as useElectrocardiogram};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e="@cnhis-design-vue/shared",i="3.1.54-beta.
|
|
1
|
+
var e="@cnhis-design-vue/shared",i="3.1.54-beta.3",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.1.54-beta.3",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 +1 @@
|
|
|
1
|
-
import{Path as e}from"@formily/path";import{isArray as r,isString as n,includes as t,negate as o,gt as a,gte as l,isNumber as
|
|
1
|
+
import{Path as e}from"@formily/path";import{isArray as r,isString as n,includes as t,negate as o,gt as a,gte as l,isNumber as i,lt as c,lte as u,noop as p,isObject as s}from"lodash-es";import{unref as f}from"vue";function m(e){return null==e||""==e}const E={EQ:(e,r)=>`${e}`===r,NEQ:(e,r)=>`${e}`!==r,CL:(e,o)=>!(!r(e)&&!n(e))&&t(e,o),NC:(e,o)=>!r(e)&&!n(e)||!t(e,o),NULL:m,NOT_NULL:o(m),BIG:a,BIGEQ:l,LESS:(e,r)=>!!(i(e)||n(e)&&e)&&c(e,r),LESSEQ:(e,r)=>!!(i(e)||n(e)&&e)&&u(e,r)};function g(e,r,n={}){return(n[r.con]||E[r.con]||(()=>!1))(e,`${r.value}`)}function _(t,o){if(!r(o.conObj))return!1;if(!o.sqlExpression||!n(o.sqlExpression))return o.conObj.every((r=>g(e.getIn(t,r.field_key),r,o.compareMap)));const a=o.conObj.map((r=>g(e.getIn(t,r.field_key),r,o.compareMap)));try{return new Function("return "+o.sqlExpression.replace(/OR/g,"||").replace(/AND/g,"&&").replace(/[a-zA-Z]/g,"").replace(/\d+/g,(e=>a[+e-1]?"true":"false")))()}catch(e){return console.error("表达式错误=>",o.sqlExpression),!1}}const d=Object.freeze({SET_VALUE:function(e,{getter:r,setter:t}){if(!s(e))return;const{results:o=[],params:a=[],compareMap:l={}}=e;if(!o.length)return;function i(e){var t;if(!n(e))return e;const o=e.trim().match(/^\$\{([a-zA-Z\d\s]+)}$/);return o?r(null==(t=o[1])?void 0:t.trim()):e}a.every((e=>e&&e.p_name&&g(r(e.p_name),{con:e.p_select,value:i(e.p_value)},l)))&&o.forEach((e=>t(e.p_name,i(e.p_value))))},REPEAT_VALIDATE:p,IS_SHOW_FIELD:p,SQLSAVE:p,API:p});function L(e){return d[e]||p}function A(e,t,o){function a(e){return r(e)&&!!e.length}function l(e,r=!0){e.forEach((e=>{const a=e.operationFormParam.reduce(((e,r)=>(e[r=r.replace(/^table\./,"")]=+t(r),e)),{}),l=e.operationalRule.replace(/\${(.+?)}/g,"$1");let c=new Function("table",`return ${l}`)(a);n(c)&&(c=+c),c=i(c)?isNaN(c)?"":c.toFixed(+e.operationalPrecision):"",(r||null==t(e.operationalResult))&&o(e.operationalResult,c)}))}return{operationalFormHandler:function(r){if(!a(f(e)))return;const n=f(e).filter((e=>e.operationFormParam.includes(`table.${r}`)));n.length&&l(n)},triggerAllOperationalFormHandler:function(){a(f(e))&&l(f(e),!1)}}}export{L as getBindEventSettingTrigger,A as getOperationalFormHandler,g as isMatchLowCodeCondition,_ as isMatchLowCodeConditionsWithSqlExpression};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cnhis-design-vue",
|
|
3
|
-
"version": "3.1.54-beta.
|
|
3
|
+
"version": "3.1.54-beta.3",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"module": "./es/components/index.js",
|
|
6
6
|
"main": "./es/components/index.js",
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"iOS 7",
|
|
64
64
|
"last 3 iOS versions"
|
|
65
65
|
],
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "e7181d09c84223705700163272c36f86e8c4a6ab"
|
|
67
67
|
}
|