cnhis-design-vue 3.1.57-beta.7 → 3.1.57-beta.8
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/classification/src/components/table-modal/index.vue.d.ts +3 -0
- package/es/components/classification/src/index.vue.d.ts +3 -0
- package/es/components/fabric-chart/src/components/PopupMenu.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
- package/es/components/fabric-chart/src/interface.d.ts +1 -0
- package/es/components/field-set/src/FieldColor.vue.d.ts +1 -1
- package/es/components/field-set/src/FieldSet.vue.d.ts +1 -1
- package/es/components/field-set/src/components/Row.vue.d.ts +1 -1
- package/es/components/form-render/src/hooks/useNewLowCodeReactions.js +1 -1
- package/es/shared/package.json.js +1 -1
- package/package.json +2 -2
|
@@ -699,6 +699,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
699
699
|
handleInitConditions: () => Promise<void>;
|
|
700
700
|
validate: () => Promise<unknown>;
|
|
701
701
|
saveAdd: () => void;
|
|
702
|
+
/**
|
|
703
|
+
* 改变展示方式
|
|
704
|
+
*/
|
|
702
705
|
cancelSaveAdd: () => void;
|
|
703
706
|
checkActionList: () => boolean;
|
|
704
707
|
NSpin: any;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as t,watch as l,withDirectives as
|
|
1
|
+
import{defineComponent as e,ref as t,watch as l,withDirectives as o,createVNode as a,vShow as s}from"vue";import{NSpace as r,NInputNumber as u}from"naive-ui";import n from"./useStyle.js";import{useEventListener as p,onClickOutside as i}from"@vueuse/core";var c=e({name:"PopupMenu",inheritAttrs:!1,props:{show:{type:Boolean,default:!1},list:{type:Array,default:()=>[]},point:{type:Object},propItems:{type:Object},target:{type:Object}},emits:["update:show","clickMenu"],setup(e,{attrs:c,slots:f,emit:m}){const h=t(null);p(h,"contextmenu",(e=>(e.preventDefault(),!1))),i(h,(e=>{m("update:show",!1)})),e.propItems;const v=n(e);function d(e){if("string"==typeof e&&(e.startsWith("新增")||e.startsWith("删除")))return!0}function y(e){return"string"==typeof e?e:"boolean"==typeof e.value?e.label:e.renderItem?e.renderItem():a(r,{inline:!0,align:"center"},{default:()=>[a("span",null,[e.label]),a(u,{style:"width: 110px",size:"small",value:e.value,"onUpdate:value":t=>e.value=t,clearable:!0,placeholder:"请输入数值",showButton:!1,onFocus:()=>m("update:show",!0)},null)]})}return l((()=>e.show),(t=>{t&&e.list.forEach((e=>{"object"==typeof e&&Reflect.has(e,"value")&&"boolean"!=typeof e.value&&(e.value=void 0)}))})),()=>o(a("ul",{ref:h,class:"c-fabric-chart-popup-menu",style:v.value},[e.list.map((t=>e.show?a("li",{class:{"no-click":d(t)},onClick:l=>function(t,l){d(l)||""===(null==t?void 0:t.target.className)&&(m("update:show",!1),m("clickMenu",{item:l,target:e.target}))}(l,t)},[y(t)]):null))]),[[s,e.show]])}});export{c as default};
|
|
@@ -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"date-fns";import{isOneLine as a,getType as u,isOverlapPoint as c,isValidValue as p,setOtherType as d,isEffectiveNode as f,getTime as h,getIndex as v,deleteProperty as g}from"../../utils/index.js";import"../useEvent.js";import{useCommon as y}from"../useCommon.js";import"vue";import{cloneDeep as m,flatten as x}from"lodash-es";import"naive-ui";import"@vueuse/core";import{TEMPERATURE_MENU as b,PAIN_MENU as j,OVERLAP as w}from"../../constants/index.js";function L(L,S,Y,E,M,$,O,P,A,C){r(L,S);const{getEqualXTypes:I,handleAddPrevent:T}=y(L,Y,S),{createShadowLines:R}=t(),{left:X,xScaleList:V,xCellWidth:z,yCellHeight:D,originX:F,endX:H,originY:_,endY:W,itemList:q,event:G,vitalSignsOriginY:B,painOriginY:J,hospitalizationDate:K,config:N,canvasHeight:Q}=S,U=new Set,Z=["xinmai","mai"],ee=new Map,te=new Set,ie=new Set,ne=new Set,oe=m(X.yScaleValue);function le(t){var o;const l=oe.find((e=>"pulse"===e.type));if(l&&(null==(o=l.dataList)?void 0:o.length)&&(U.size&&L.value.remove(...U),U.clear(),ee.size>1)){if(t){const{type:e,key:i}=t.origin||{};if("pulse"===e){const e=ee.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 ee)t.push(e[1]),e[0]===Z[0]&&e[1].forEach((e=>{(ee.get(Z[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)),a=n[i],u=o[r],c=n[i-1],p=n[i+1],d=o[r-1],f=o[r+1];if(c&&d){if(c[0]!==d[0]){const e=Math.max(c[0],d[0]);l.push([c,d].find((t=>t[0]===e)))}}else c?l.push(c):d&&s.push(d);const h=Math.min(a[1],u[1]);l.push([a,u].find((e=>e[1]===h)));const v=Math.max(a[1],u[1]);s.push([a,u].find((e=>e[1]===v)));const g=()=>{const t=[...l,...s.reverse()],[i]=t,n=t.at(-1);i[0]===n[0]&&i[1]===n[1]&&t.splice(-1,1),e.push(t),l=[],s=[]};if(p&&f){if(p[0]!==f[0]){const e=Math.min(p[0],f[0]);l.push([p,f].find((t=>t[0]===e))),g()}}else p?(l.push(p),g()):f?(s.push(f),g()):g()})),e}(),{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(...R(t,r._angle,r.space)),e.forEach((e=>{Object.assign(e,{...n,...r}),U.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([...x(t)],{...r,originX:"center"});e.push(n),U.add(n)}))}L.value.add(...e)}U.add(l),L.value.add(l)}))}}function se(){var e;const t=oe.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({},w,X.overlap||{}),l=[];te.size&&[...te].forEach((e=>{[...ie].forEach((t=>{if(t.origin&&c(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((()=>{L.value.add(...l),l.forEach((e=>{null==e||e.bringToFront(),ne.add(e)}))}))}function re(e,t,r){var u;const{type:c,riseStyle:f={},noRiseStyle:h={},verifiedStyle:v={},reduceStyle:g={},pacemaker:y={},upArrowStyle:m={},limitValueStyle:x={},nonePainPointStyle:b={},belowMinValueStyle:j={},dataList:w=[],list:E=[]}=r,{type:$,textStyle:P,showConnectLine:C=!1}=b,I=[],T=[],R=[];null==(u=e.list)||u.forEach(((u,b)=>{const X=a(c)?w.find((e=>e.key===u.key)):e,V=ce(u,r),z={};z.value=function(e,t,i){if(!(null==e?void 0:e.length)||!N.showValue)return;const{lineAttr:n={}}=i,o=e[1]<=B.originY+D?e[1]+D:e[1]-D,s=l([e[0],o],{value:t.value,originX:"center",originY:"center",fill:n.stroke||"#000"});return R.push(s),{obj:s,top:-D}}(V,u,X),function(e,t,r,a){var u,d;if(!(null==e?void 0:e.length)||!["temperature","pain"].includes(c))return;const{lineAttr:y={}}=r,{value:m}=a;let x,b,j,w,L;if(t.noRise&&h.show){const t=k(h)?M(c,E,35):e[1];if(h.text)j=l([e[0],k(h)?t:t+5],{value:h.text.split("").join("\n"),originY:"top",...h.style});else{const i=t+2*D;j=s([e[0],t,i],{...h.style})}R.push(j)}t.rise&&f.show&&f.text&&(w=l([e[0],e[1]-(m?D:0)-5],{value:f.text.split("").join("\n"),originY:"bottom",...f.style}),R.push(w));t.verified&&(L=l([e[0],e[1]-(m?D:0)-5],{value:"v",originX:"center",originY:"bottom",...v}),R.push(L));if(p(t.physicsReduce)||p(t.drugReduce)){const l=M(c,E,null!=(u=t.physicsReduce)?u:t.drugReduce);x=i([...e,e[0],l],{...y,...g.line,...n}),b=o((null==(d=null==g?void 0:g.point)?void 0:d.type)||"circle",{left:e[0],top:l,...g.point,...n,originY:l===Q?"bottom":"center"}),x&&R.push(x),b&&R.push(b)}Object.assign(a,{reduceLine:{obj:x,type:"line"},noRiseText:{obj:j,top:h.text?5:2*D,isFixed:k(h)},riseText:{obj:w,top:(m?-D:0)-5},verifiedText:{obj:L,top:(m?-D:0)-5},reducePoint:{obj:b,type:"reduce"}})}(V,u,X,z),function(e,t,i,n){if(!(null==e?void 0:e.length)||!["pulse"].includes(c))return;const o=Math.max(...E),r=Math.min(...E);let a,u,p;const{upArrowShow:d=!1,limitValueShow:f=!1}=i;if(d&&+t.value>180){let t=e[1]-2.5*D,i=[e[1]-D/2,t];t<B.originY&&(t=e[1]+2.5*D,i=[t,e[1]+D/2]),a=s([e[0],i[0],i[1]],m,"up"),R.push(a)}if(f){const i={value:t.value,originX:"center",originY:"center",...x};if(+t.value>o){const t=a?e[1]+D/2+a.height:e[1]+D;u=l([e[0],t],i),R.push(u)}+t.value<r&&(u=l([e[0],e[1]-D],i),R.push(u))}if(j.show&&+t.value<r){const t=e[1];if(j.text)p=l([e[0],e[1]+5],{value:j.text.split("").join("\n"),originY:"top",...j.style});else{const i=t+2*D;p=s([e[0],t,i],{...j.style})}R.push(p)}Object.assign(n,{upArrow:{obj:a},limitValue:{obj:u,top:-D},belowMinValue:{obj:p,top:j.text?5:2*D,moveHide:!0}})}(V,u,X,z),function(n,l,s,a,u){let p,f;const{pointAttr:h={},lineAttr:v={},title:g="",key:m,type:x="circle"}=a,b=e.list[s+1],j=ce(b,r),w=ae(c,e.list[s].value),k=j&&ae(c,b.value);n&&j&&!l.breakpoint&&(!w&&!k||C)&&n[0]!==j[0]&&(f=i([...n,...j],{...v}));const E=l.pacemakerShow&&"pulse"==c?y.value:w&&"number"===$?0:x,M=T[s-1],R={origin:{data:l,title:g,key:m||"",unit:r.unit,type:c,_type:d(g,c),dataIndex:t,index:s},leftLine:M,rightLine:f,otherObj:u,lockMovementX:!0,...l.pacemakerShow&&"pulse"==c?y.style:h,...S.event.hovered?S.event.evented?{selectable:!0}:{selectable:!0,lockMovementY:!0}:S.event,...w?{selectable:!1,evented:!1,..."number"===$?P:{}}:{}};if(M){const e=M.get("y2");p=o(E,{left:M.get("x2"),top:w?e-5:e,...R})}else n&&(R.leftLine=null,p=o(E,{left:n[0],top:w?n[1]-5:n[1],...R}));T.push(f),p&&(g.includes("脉搏")?te.add(p):ie.add(p),function(e){G.hovered&&(e.on("mouseover",(()=>{ue(e,"hover")})),e.on("mouseout",(()=>{A.show=!1})));if(e.lockMovementX&&e.lockMovementY)return;e.on("moving",(()=>{!function(e){e.setCoords();const t="pain"===e.origin.type?J:B;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&&(L.value.remove(i),delete e.otherObj.obj)))})),le(e)}(e),G.hovered&&ue(e)})),e.on("mouseup",(t=>{if(A.show=!1,1===t.button){const{type:t}=e.origin,i=O(t,e.top),n={...e.origin,data:{...e.origin.data,value:i}};L.value.discardActiveObject(),Y("change",n),de(n,"change")}}))}(p),I.push(p),ne.add(p))}(V,u,b,X,z)})),"pulse"===c&&Z.forEach((e=>{ee.set(e,I.filter((t=>{var i;return(null==(i=t.origin)?void 0:i.key)===e})).map((e=>[e.left,e.top])))})),Promise.all(I).then((e=>{const t=T.filter((e=>e));Promise.all(R).then((i=>{L.value.add(...t,...e,...i),e.forEach((t=>{null==t||t.bringToFront(),function(e,t){if("pulse"===e.origin.type){t.filter((t=>t.left===e.left&&"pulse"===t.origin.type)).length>1&&(e.leftLine&&L.value.remove(e.leftLine),e.rightLine&&L.value.remove(e.rightLine))}}(t,e)}))}))}))}function ae(e,t){return"pain"===e&&0==t}function ue(e,t="moving"){const{title:i,unit:n,type:o,data:l}=e.origin;A.point={x:e.left,y:e.top},A.list=[function(){const{drugReduce:s,physicsReduce:r}=l||{},a="hover"===t?l.value:O(o,e.top);if(p(s))return`药物降${"pain"==o?"痛":"温"} ${a}—>${s}${n||""}`;if(p(r))return`物理降${"pain"==o?"痛":"温"} ${a}—>${r}${n||""}`;return`${i} ${a}${n||""}`}(),`时间 ${((null==l?void 0:l.time)||$(e.left)).slice(-5)}`],A.show=!0}function ce(e,t){const i="pain"===t.type?J:B;if(f(e)&&function(e){const[t]=V,i=V.at(-1),n=t.start,o=i.end,l=h(e);return l>=n&&l<=o}(e.time)){const n=E(e.time),o=M(t.type,t.list,e.value);return[n,o<i.originY?i.originY:o>i.endY?i.endY:o]}}function pe(e){const t=new Date,i=String(t.getMonth()+1).padStart(2,"0"),n=String(t.getDate()).padStart(2,"0"),o=h(`${t.getFullYear()}-${i}-${n} 23:59:59`),l=h(`${$(e)}:00`);return K&&l<h(K)?(T("exceedMin"),!1):!(l>o)||(T("exceedMax"),!1)}function de(e,t="add"){const{type:i,dataIndex:n,index:o,data:l,key:s}=e,r=oe.find((e=>e.type===i));if("add"===t){const e=a(i)?r.dataList.find((e=>e.enable)):r.dataList[n],t=v(l.time,e.list);e.list.splice(t,0,l)}else r.dataList[n].list[o]=l;fe()}function fe(){var e;ne.size&&(null==(e=L.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}([...ne]))),ee.clear(),ne.clear(),te.clear(),ie.clear(),oe.forEach((e=>{e.dataList.forEach(((t,i)=>{a(e.type)&&!t.enable||re(t,i,e)}))})),le(),se()}return ee.clear(),te.clear(),ie.clear(),oe.forEach((e=>{!function(e){if("temperature"!==e.type||!e.positionLine)return;const t=M(e.type,e.list,e.positionLine.value),n=i([F,t,H,t],e.positionLine);L.value.add(n)}(e),e.dataList.forEach(((t,i)=>{!t.show||a(e.type)&&!t.enable||re(t,i,e)}))})),le(),se(),L.value.on("mouse:up",(e=>{var t;if(3===e.button){if(!S.event.evented)return;const{x:i=0,y:n=0}=e.pointer||{};if(i>=F&&i<=H&&n>=_&&n<=W){C.point={x:i,y:n},C.show=!0;const{type:o}=(null==(t=e.target)?void 0:t.origin)||{};if(e.target&&["temperature","pain"].includes(o))"temperature"===o&&(C.list=[...b]),"pain"===o&&(C.list=[...j]),C.target=e.target;else{C.target=null,C.list=["新增节点"],q.forEach((t=>{if(!I([...ne],i,"_type").includes(t.bigType)){const i=["pain"].includes(t.bigType)?J:B;n>=i.originY&&n<=i.endY&&C.list.push({renderItem:P?P(t):()=>t.title,origin:{title:t.title,unit:t.unit,type:u(t.bigType),dataIndex:t.dataIndex,key:t.key},pointer:e.pointer})}}));const t=pe(i);t&&1!==C.list.length||(C.show=!1,1===C.list.length&&t&&T("repeat"))}}}if(1===e.button){const{x:t=0,y:i=0}=e.pointer||{};t>=F&&t<=H&&i>0&&i<Q&&Y("click:grid",{x:t,y:i,time:$(t)})}})),{clickMenu:function({item:e,target:t}){if(t){const{data:i,type:n,dataIndex:o,index:l}=t.origin,s=g(i,[...b,...j]);s[`${e.type}`]=e.value,a(n)&&(s.key=t.origin.key);const r={...t.origin,data:s};Y("change",r),de(r,"change")}else{const t={data:{time:$(e.pointer.x),value:O(e.origin.type,e.pointer.y),...a(e.origin.type)?{key:e.origin.key}:{}},...e.origin};Y("add",t),de(t)}},setPopup:ue,isAddPoint:pe,updateData:de,redrawPoints:fe,gridPoints:ne}}function k(e){return"fixed"===e.position}export{L 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"date-fns";import{isOneLine as a,getType as u,isOverlapPoint as c,isValidValue as p,setOtherType as d,isEffectiveNode as f,getTime as h,getIndex as v,deleteProperty as g}from"../../utils/index.js";import"../useEvent.js";import{useCommon as y}from"../useCommon.js";import"vue";import{cloneDeep as m,flatten as b}from"lodash-es";import"naive-ui";import"@vueuse/core";import{TEMPERATURE_MENU as x,PAIN_MENU as j,OVERLAP as w}from"../../constants/index.js";function L(L,S,Y,E,M,$,O,C,P,A){r(L,S);const{getEqualXTypes:I,handleAddPrevent:R}=y(L,Y,S),{createShadowLines:T}=t(),{left:V,xScaleList:X,xCellWidth:z,yCellHeight:D,originX:F,endX:H,originY:_,endY:W,itemList:q,event:G,vitalSignsOriginY:B,painOriginY:J,hospitalizationDate:K,config:N,canvasHeight:Q}=S,U=new Set,Z=["xinmai","mai"],ee=new Map,te=new Set,ie=new Set,ne=new Set,oe=m(V.yScaleValue);function le(t){var o;const l=oe.find((e=>"pulse"===e.type));if(l&&(null==(o=l.dataList)?void 0:o.length)&&(U.size&&L.value.remove(...U),U.clear(),ee.size>1)){if(t){const{type:e,key:i}=t.origin||{};if("pulse"===e){const e=ee.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 ee)t.push(e[1]),e[0]===Z[0]&&e[1].forEach((e=>{(ee.get(Z[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)),a=n[i],u=o[r],c=n[i-1],p=n[i+1],d=o[r-1],f=o[r+1];if(c&&d){if(c[0]!==d[0]){const e=Math.max(c[0],d[0]);l.push([c,d].find((t=>t[0]===e)))}}else c?l.push(c):d&&s.push(d);const h=Math.min(a[1],u[1]);l.push([a,u].find((e=>e[1]===h)));const v=Math.max(a[1],u[1]);s.push([a,u].find((e=>e[1]===v)));const g=()=>{const t=[...l,...s.reverse()],[i]=t,n=t.at(-1);i[0]===n[0]&&i[1]===n[1]&&t.splice(-1,1),e.push(t),l=[],s=[]};if(p&&f){if(p[0]!==f[0]){const e=Math.min(p[0],f[0]);l.push([p,f].find((t=>t[0]===e))),g()}}else p?(l.push(p),g()):f?(s.push(f),g()):g()})),e}(),{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(...T(t,r._angle,r.space)),e.forEach((e=>{Object.assign(e,{...n,...r}),U.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),U.add(n)}))}L.value.add(...e)}U.add(l),L.value.add(l)}))}}function se(){var e;const t=oe.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({},w,V.overlap||{}),l=[];te.size&&[...te].forEach((e=>{[...ie].forEach((t=>{if(t.origin&&c(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((()=>{L.value.add(...l),l.forEach((e=>{null==e||e.bringToFront(),ne.add(e)}))}))}function re(e,t,r){var u;const{type:c,riseStyle:f={},noRiseStyle:h={},verifiedStyle:v={},reduceStyle:g={},pacemaker:y={},upArrowStyle:m={},limitValueStyle:b={},nonePainPointStyle:x={},belowMinValueStyle:j={},dataList:w=[],list:E=[]}=r,{type:$,textStyle:C,showConnectLine:A=!1}=x,I=[],R=[],T=[];null==(u=e.list)||u.forEach(((u,x)=>{const V=a(c)?w.find((e=>e.key===u.key)):e,X=ce(u,r),F={};F.value=function(e,t,i){if(!(null==e?void 0:e.length)||!N.showValue)return;const{lineAttr:n={}}=i,o=e[1]<=B.originY+D?e[1]+D:e[1]-D,s=l([e[0],o],{value:t.value,originX:"center",originY:"center",fill:n.stroke||"#000"});return T.push(s),{obj:s,top:-D}}(X,u,V),function(e,t,r,a){var u,d;if(!(null==e?void 0:e.length)||!["temperature","pain"].includes(c))return;const{lineAttr:y={}}=r,{value:m}=a;let b,x,j,w,L;if(t.noRise&&h.show){const t=k(h)?M(c,E,35):e[1];if(h.text)j=l([e[0],k(h)?t:t+5],{value:h.text.split("").join("\n"),originY:"top",...h.style});else{const i=t+2*D;j=s([e[0],t,i],{...h.style})}T.push(j)}t.rise&&f.show&&f.text&&(w=l([e[0],e[1]-(m?D:0)-5],{value:f.text.split("").join("\n"),originY:"bottom",...f.style}),T.push(w));t.verified&&(L=l([e[0],e[1]-(m?D:0)-5],{value:"v",originX:"center",originY:"bottom",...v}),T.push(L));if(p(t.physicsReduce)||p(t.drugReduce)){const l=M(c,E,null!=(u=t.physicsReduce)?u:t.drugReduce),s=l<e[1]&&(null==N?void 0:N.hypothermyViewCustom)?e[0]+z/2:e[0];b=i([...e,s,l],{...y,...g.line,...n}),x=o((null==(d=null==g?void 0:g.point)?void 0:d.type)||"circle",{left:s,top:l,...g.point,...n,originY:l===Q?"bottom":"center"}),b&&T.push(b),x&&T.push(x)}Object.assign(a,{reduceLine:{obj:b,type:"line"},noRiseText:{obj:j,top:h.text?5:2*D,isFixed:k(h)},riseText:{obj:w,top:(m?-D:0)-5},verifiedText:{obj:L,top:(m?-D:0)-5},reducePoint:{obj:x,type:"reduce"}})}(X,u,V,F),function(e,t,i,n){if(!(null==e?void 0:e.length)||!["pulse"].includes(c))return;const o=Math.max(...E),r=Math.min(...E);let a,u,p;const{upArrowShow:d=!1,limitValueShow:f=!1}=i;if(d&&+t.value>180){let t=e[1]-2.5*D,i=[e[1]-D/2,t];t<B.originY&&(t=e[1]+2.5*D,i=[t,e[1]+D/2]),a=s([e[0],i[0],i[1]],m,"up"),T.push(a)}if(f){const i={value:t.value,originX:"center",originY:"center",...b};if(+t.value>o){const t=a?e[1]+D/2+a.height:e[1]+D;u=l([e[0],t],i),T.push(u)}+t.value<r&&(u=l([e[0],e[1]-D],i),T.push(u))}if(j.show&&+t.value<r){const t=e[1];if(j.text)p=l([e[0],e[1]+5],{value:j.text.split("").join("\n"),originY:"top",...j.style});else{const i=t+2*D;p=s([e[0],t,i],{...j.style})}T.push(p)}Object.assign(n,{upArrow:{obj:a},limitValue:{obj:u,top:-D},belowMinValue:{obj:p,top:j.text?5:2*D,moveHide:!0}})}(X,u,V,F),function(n,l,s,a,u){let p,f;const{pointAttr:h={},lineAttr:v={},title:g="",key:m,type:b="circle"}=a,x=e.list[s+1],j=ce(x,r),w=ae(c,e.list[s].value),k=j&&ae(c,x.value);if(n&&j&&!l.breakpoint&&(!w&&!k||A)&&n[0]!==j[0]){f=i([...n,...j],{...v});const{obj:e}=(null==u?void 0:u.reducePoint)||{};if((null==e?void 0:e.top)<n[1]&&(null==N?void 0:N.hypothermyViewCustom)){const t=i([e.left,e.top,...j],{...v});T.unshift(t),Object.assign(u,{reduceRightLine:{obj:t,type:"reduce"}}),f.set("stroke","transparent")}}const E=l.pacemakerShow&&"pulse"==c?y.value:w&&"number"===$?0:b,M=R[s-1],V={origin:{data:l,title:g,key:m||"",unit:r.unit,type:c,_type:d(g,c),dataIndex:t,index:s},leftLine:M,rightLine:f,otherObj:u,lockMovementX:!0,...l.pacemakerShow&&"pulse"==c?y.style:h,...S.event.hovered?S.event.evented?{selectable:!0}:{selectable:!0,lockMovementY:!0}:S.event,...w?{selectable:!1,evented:!1,..."number"===$?C:{}}:{}};if(M){const e=M.get("y2");p=o(E,{left:M.get("x2"),top:w?e-5:e,...V})}else n&&(V.leftLine=null,p=o(E,{left:n[0],top:w?n[1]-5:n[1],...V}));R.push(f),p&&(g.includes("脉搏")?te.add(p):ie.add(p),function(e){G.hovered&&(e.on("mouseover",(()=>{ue(e,"hover")})),e.on("mouseout",(()=>{P.show=!1})));if(e.lockMovementX&&e.lockMovementY)return;e.on("moving",(()=>{!function(e){e.setCoords();const t="pain"===e.origin.type?J:B;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&&(L.value.remove(i),delete e.otherObj.obj)))})),le(e)}(e),G.hovered&&ue(e)})),e.on("mouseup",(t=>{if(P.show=!1,1===t.button){const{type:t}=e.origin,i=O(t,e.top),n={...e.origin,data:{...e.origin.data,value:i}};L.value.discardActiveObject(),Y("change",n),de(n,"change")}}))}(p),I.push(p),ne.add(p))}(X,u,x,V,F)})),"pulse"===c&&Z.forEach((e=>{ee.set(e,I.filter((t=>{var i;return(null==(i=t.origin)?void 0:i.key)===e})).map((e=>[e.left,e.top])))})),Promise.all(I).then((e=>{const t=R.filter((e=>e));Promise.all(T).then((i=>{L.value.add(...t,...e,...i),e.forEach((t=>{null==t||t.bringToFront(),function(e,t){if("pulse"===e.origin.type){t.filter((t=>t.left===e.left&&"pulse"===t.origin.type)).length>1&&(e.leftLine&&L.value.remove(e.leftLine),e.rightLine&&L.value.remove(e.rightLine))}}(t,e)}))}))}))}function ae(e,t){return"pain"===e&&0==t}function ue(e,t="moving"){const{title:i,unit:n,type:o,data:l}=e.origin;P.point={x:e.left,y:e.top},P.list=[function(){const{drugReduce:s,physicsReduce:r}=l||{},a="hover"===t?l.value:O(o,e.top);if(p(s))return`药物降${"pain"==o?"痛":"温"} ${a}—>${s}${n||""}`;if(p(r))return`物理降${"pain"==o?"痛":"温"} ${a}—>${r}${n||""}`;return`${i} ${a}${n||""}`}(),`时间 ${((null==l?void 0:l.time)||$(e.left)).slice(-5)}`],P.show=!0}function ce(e,t){const i="pain"===t.type?J:B;if(!f(e)||!function(e){const[t]=X,i=X.at(-1),n=t.start,o=i.end,l=h(e);return l>=n&&l<=o}(e.time))return;const n=E(e.time),o=M(t.type,t.list,e.value);return[n,o<i.originY?i.originY:o>i.endY?i.endY:o]}function pe(e){const t=new Date,i=String(t.getMonth()+1).padStart(2,"0"),n=String(t.getDate()).padStart(2,"0"),o=h(`${t.getFullYear()}-${i}-${n} 23:59:59`),l=h(`${$(e)}:00`);return K&&l<h(K)?(R("exceedMin"),!1):!(l>o)||(R("exceedMax"),!1)}function de(e,t="add"){const{type:i,dataIndex:n,index:o,data:l,key:s}=e,r=oe.find((e=>e.type===i));if("add"===t){const e=a(i)?r.dataList.find((e=>e.enable)):r.dataList[n],t=v(l.time,e.list);e.list.splice(t,0,l)}else r.dataList[n].list[o]=l;fe()}function fe(){var e;ne.size&&(null==(e=L.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}([...ne]))),ee.clear(),ne.clear(),te.clear(),ie.clear(),oe.forEach((e=>{e.dataList.forEach(((t,i)=>{a(e.type)&&!t.enable||re(t,i,e)}))})),le(),se()}return ee.clear(),te.clear(),ie.clear(),oe.forEach((e=>{!function(e){if("temperature"!==e.type||!e.positionLine)return;const t=M(e.type,e.list,e.positionLine.value),n=i([F,t,H,t],e.positionLine);L.value.add(n)}(e),e.dataList.forEach(((t,i)=>{!t.show||a(e.type)&&!t.enable||re(t,i,e)}))})),le(),se(),L.value.on("mouse:up",(e=>{var t;if(3===e.button){if(!S.event.evented)return;const{x:i=0,y:n=0}=e.pointer||{};if(i>=F&&i<=H&&n>=_&&n<=W){A.point={x:i,y:n},A.show=!0;const{type:o}=(null==(t=e.target)?void 0:t.origin)||{};if(e.target&&["temperature","pain"].includes(o))"temperature"===o&&(A.list=[...x]),"pain"===o&&(A.list=[...j]),A.target=e.target;else{A.target=null,A.list=["新增节点"],q.forEach((t=>{if(!I([...ne],i,"_type").includes(t.bigType)){const i=["pain"].includes(t.bigType)?J:B;n>=i.originY&&n<=i.endY&&A.list.push({renderItem:C?C(t):()=>t.title,origin:{title:t.title,unit:t.unit,type:u(t.bigType),dataIndex:t.dataIndex,key:t.key},pointer:e.pointer})}}));const t=pe(i);t&&1!==A.list.length||(A.show=!1,1===A.list.length&&t&&R("repeat"))}}}if(1===e.button){const{x:t=0,y:i=0}=e.pointer||{};t>=F&&t<=H&&i>0&&i<Q&&Y("click:grid",{x:t,y:i,time:$(t)})}})),{clickMenu:function({item:e,target:t}){if(t){const{data:i,type:n,dataIndex:o,index:l}=t.origin,s=g(i,[...x,...j]);s[`${e.type}`]=e.value,a(n)&&(s.key=t.origin.key);const r={...t.origin,data:s};Y("change",r),de(r,"change")}else{const t={data:{time:$(e.pointer.x),value:O(e.origin.type,e.pointer.y),...a(e.origin.type)?{key:e.origin.key}:{}},...e.origin};Y("add",t),de(t)}},setPopup:ue,isAddPoint:pe,updateData:de,redrawPoints:fe,gridPoints:ne}}function k(e){return"fixed"===e.position}export{L as useCenter};
|
|
@@ -173,4 +173,5 @@ export declare type IPointMenuProps = Pick<IPointTipProps, 'show' | 'point'> & {
|
|
|
173
173
|
target: any;
|
|
174
174
|
};
|
|
175
175
|
export declare type IFabricChartMainParam = [Ref<fabric.Canvas>, any, any, Ref<any>, IPointTipProps, IPointMenuProps];
|
|
176
|
+
export declare type IPonter = [number, number];
|
|
176
177
|
export {};
|
|
@@ -456,9 +456,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
456
456
|
requiredDisable: boolean;
|
|
457
457
|
hide: boolean;
|
|
458
458
|
}>;
|
|
459
|
+
isHighlightRow: boolean;
|
|
459
460
|
idx: number;
|
|
460
461
|
isHighlight: boolean;
|
|
461
|
-
isHighlightRow: boolean;
|
|
462
462
|
}>;
|
|
463
463
|
EditDialog: import("vue").DefineComponent<{
|
|
464
464
|
visible: {
|
|
@@ -574,9 +574,9 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
574
574
|
requiredDisable: boolean;
|
|
575
575
|
hide: boolean;
|
|
576
576
|
}>;
|
|
577
|
+
isHighlightRow: boolean;
|
|
577
578
|
idx: number;
|
|
578
579
|
isHighlight: boolean;
|
|
579
|
-
isHighlightRow: boolean;
|
|
580
580
|
}>;
|
|
581
581
|
isArray: {
|
|
582
582
|
(value?: any): value is any[];
|
|
@@ -281,8 +281,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
281
281
|
requiredDisable: boolean;
|
|
282
282
|
hide: boolean;
|
|
283
283
|
}>;
|
|
284
|
+
isHighlightRow: boolean;
|
|
284
285
|
idx: number;
|
|
285
286
|
isHighlight: boolean;
|
|
286
|
-
isHighlightRow: boolean;
|
|
287
287
|
}>;
|
|
288
288
|
export default _default;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import"../../../../shared/utils/index.js";import{isField as e}from"@formily/core";import{isEmpty as o,isString as i,isArray as n}from"lodash-es";import{computed as r,unref as t}from"vue";import{isMatchNewLowCodeConditionsWithSqlExpression as
|
|
1
|
+
import"../../../../shared/utils/index.js";import{isField as e}from"@formily/core";import{isEmpty as o,isString as i,isArray as n}from"lodash-es";import{computed as r,unref as t}from"vue";import{isMatchNewLowCodeConditionsWithSqlExpression as s}from"../../../../shared/utils/business.js";function a(a,l){function u(o){return(i,n)=>{i.fields.forEach((r=>{const t=l.query(r).take();t&&e(t)&&o(t,n,i)}))}}const d=new Map([[["show","hide"],u(((e,o,{actionConfig:{restoreDefault:i}={}})=>{var n;return o?e.display="visible":i?(e.setValue(null!=(n=e.initialValue)?n:null),void(e.display="hidden")):void(e.display="none")}))],[["required","notRequired"],u(((e,o)=>{e.required=o}))],[["disabled","enabled"],u(((e,o)=>{e.disabled=o}))]]),f=r((()=>{const e=new Map,n=t(a);return n?(n.forEach((n=>{o(n.conditions)||n.conditions.forEach((o=>{const r=[];i(o.field)&&o.field&&r.push(o.field),"field"===o.valueType&&i(o.value)&&o.value&&r.push(o.value),r.forEach((o=>{var i;e.has(o)||e.set(o,[]),null==(i=e.get(o))||i.push(n)}))}))})),e):e}));return{newLowCodeReactionsHandler:function(e){const o=f.value.get(e);o&&o.forEach((e=>{!function(e,o){if(!n(e.actions))return;e.actions.forEach((e=>{for(const[i,n]of[...d]){const r=i.indexOf(e.action);if(~r){n(e,r?!o:o);break}}}))}(e,s(l.values,e))}))}}}export{a as useNewLowCodeReactions};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e="@cnhis-design-vue/shared",i="3.1.57-beta.
|
|
1
|
+
var e="@cnhis-design-vue/shared",i="3.1.57-beta.8",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.57-beta.8",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.1.57-beta.
|
|
3
|
+
"version": "3.1.57-beta.8",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"module": "./es/components/index.js",
|
|
6
6
|
"main": "./es/components/index.js",
|
|
@@ -64,5 +64,5 @@
|
|
|
64
64
|
"iOS 7",
|
|
65
65
|
"last 3 iOS versions"
|
|
66
66
|
],
|
|
67
|
-
"gitHead": "
|
|
67
|
+
"gitHead": "268c642d06b1a1cc342f92f6603516c02a008e57"
|
|
68
68
|
}
|