cnhis-design-vue 3.1.51-release.0 → 3.1.51-release.1

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.
Files changed (94) hide show
  1. package/es/components/base-search/index.d.ts +13 -8
  2. package/es/components/base-search/src/index.vue.d.ts +13 -8
  3. package/es/components/base-search/src/index.vue2.js +1 -1
  4. package/es/components/classification/index.d.ts +57 -15
  5. package/es/components/classification/src/components/search-filter/index.vue.d.ts +57 -15
  6. package/es/components/classification/src/components/set-classification/index.vue.d.ts +57 -15
  7. package/es/components/classification/src/index.vue.d.ts +57 -15
  8. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +1 -1
  9. package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcessChart.js +1 -1
  10. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.js +1 -1
  11. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useLeft.js +1 -1
  12. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useOther.js +1 -1
  13. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.js +1 -1
  14. package/es/components/fabric-chart/src/hooks/temperature/useBottom.js +1 -1
  15. package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
  16. package/es/components/fabric-chart/src/hooks/temperature/useLeft.js +1 -1
  17. package/es/components/fabric-chart/src/hooks/temperature/useOther.js +1 -1
  18. package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -1
  19. package/es/components/fabric-chart/src/hooks/temperature/useTop.js +1 -1
  20. package/es/components/fabric-chart/src/hooks/useCommon.d.ts +1 -0
  21. package/es/components/fabric-chart/src/hooks/useCommon.js +1 -1
  22. package/es/components/form-config/index.d.ts +174 -25
  23. package/es/components/form-config/src/FormConfig.vue.d.ts +175 -26
  24. package/es/components/form-config/src/FormConfig.vue2.js +1 -1
  25. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +4 -4
  26. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +13 -10
  27. package/es/components/form-config/src/components/FormConfigEventSetting.vue.d.ts +121 -0
  28. package/es/components/form-config/src/components/FormConfigEventSetting.vue.js +1 -0
  29. package/es/components/form-config/src/components/FormConfigEventSetting.vue2.js +1 -0
  30. package/es/components/form-config/src/constants/index.d.ts +19 -1
  31. package/es/components/form-config/src/constants/index.js +1 -1
  32. package/es/components/form-config/src/hooks/useDataNormalize.d.ts +1 -1
  33. package/es/components/form-config/src/hooks/useDataNormalize.js +1 -1
  34. package/es/components/form-config/src/types/index.d.ts +7 -3
  35. package/es/components/form-config/style/index.css +1 -1
  36. package/es/components/form-render/index.d.ts +4 -4
  37. package/es/components/form-render/src/FormRender.vue.d.ts +2 -2
  38. package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +4 -4
  39. package/es/components/form-render/src/components/renderer/select.d.ts +10 -1
  40. package/es/components/form-render/src/components/renderer/select.js +1 -1
  41. package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
  42. package/es/components/form-render/src/hooks/useFieldNormalize.d.ts +2 -2
  43. package/es/components/form-render/src/hooks/useFormValidator.js +1 -1
  44. package/es/components/form-render/src/hooks/useLowCodeReactions.d.ts +1 -1
  45. package/es/components/form-render/src/types/fieldItem.d.ts +2 -1
  46. package/es/components/form-render/src/types/index.d.ts +1 -19
  47. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js +1 -1
  48. package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/selectRendererPlugin/editSelect.d.ts +1 -1
  49. package/es/components/iho-table/src/types/index.d.ts +2 -1
  50. package/es/components/index.css +1 -1
  51. package/es/components/info-header/index.d.ts +13 -13
  52. package/es/components/info-header/src/InfoHeader.vue.d.ts +13 -13
  53. package/es/components/info-header/src/components/infoDescription/DescriptionItem.vue.d.ts +1 -1
  54. package/es/components/info-header/src/components/infoDescription/DescriptionList.vue.d.ts +1 -1
  55. package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +5 -5
  56. package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +4 -4
  57. package/es/components/quick-search/index.d.ts +13 -8
  58. package/es/components/quick-search/src/index.vue.d.ts +13 -8
  59. package/es/components/quick-search/src/index.vue2.js +1 -1
  60. package/es/components/shortcut-setter/index.d.ts +6 -5
  61. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +6 -5
  62. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue.d.ts +52 -7
  63. package/es/components/table-filter/src/components/classify-filter/ValueCfg.vue2.js +1 -1
  64. package/es/components/table-filter/src/components/classify-filter/components/Date.vue.d.ts +1 -1
  65. package/es/components/table-filter/src/components/classify-filter/components/DateRange.vue.d.ts +1 -1
  66. package/es/components/table-filter/src/components/classify-filter/components/InputFilter.vue.d.ts +34 -2
  67. package/es/components/table-filter/src/components/classify-filter/components/InputFilter.vue2.js +1 -1
  68. package/es/components/table-filter/src/components/classify-filter/components/index.d.ts +36 -4
  69. package/es/components/table-filter/src/components/classify-filter/hooks/useFilterConditions.d.ts +1 -6
  70. package/es/components/table-filter/src/components/classify-filter/hooks/useFilterConditions.js +1 -1
  71. package/es/components/table-filter/src/components/classify-filter/index.vue.d.ts +57 -15
  72. package/es/components/table-filter/src/components/classify-filter/index.vue2.js +1 -1
  73. package/es/components/table-filter/src/components/render-widget/components/InputCustom.vue.d.ts +58 -0
  74. package/es/components/table-filter/src/components/render-widget/components/InputCustom.vue.js +1 -0
  75. package/es/components/table-filter/src/components/render-widget/components/InputCustom.vue2.js +1 -0
  76. package/es/components/table-filter/src/components/render-widget/components/index.d.ts +56 -1
  77. package/es/components/table-filter/src/components/render-widget/components/index.js +1 -1
  78. package/es/components/table-filter/src/components/render-widget/index.vue.d.ts +4 -1
  79. package/es/components/table-filter/src/components/render-widget/index.vue.js +1 -1
  80. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +55 -1
  81. package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.js +1 -1
  82. package/es/components/table-filter/src/hooks/useAdvanced.d.ts +2 -0
  83. package/es/components/table-filter/src/hooks/useAdvanced.js +1 -1
  84. package/es/components/table-filter/src/hooks/useRenderWidget.d.ts +1 -7
  85. package/es/components/table-filter/src/hooks/useRenderWidget.js +1 -1
  86. package/es/components/table-filter/src/tool/transformData.d.ts +1 -6
  87. package/es/components/table-filter/src/tool/transformData.js +1 -1
  88. package/es/components/table-filter/src/types/index.d.ts +16 -1
  89. package/es/shared/components/InputNumberSlash/InputNumberSlash.d.ts +19 -1
  90. package/es/shared/components/InputNumberSlash/InputNumberSlash.js +1 -1
  91. package/es/shared/package.json.js +1 -1
  92. package/es/shared/types/business.d.ts +20 -0
  93. package/es/shared/utils/business.d.ts +1 -2
  94. package/package.json +2 -2
@@ -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 r}from"../useDraw.js";import{useGrid as s}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}from"lodash-es";import"naive-ui";import{TEMPERATURE_MENU as x,PAIN_MENU as b,OVERLAP as j}from"../../constants/index.js";function L(L,k,S,Y,E,M,$,O,P,A){s(L,k);const{getEqualXTypes:C,handleAddPrevent:I}=y(L,S,k),{createShadowLines:T}=t(),{left:R,xScaleList:X,xCellWidth:F,yCellHeight:z,originX:D,endX:V,originY:_,endY:G,itemList:H,event:W,vitalSignsOriginY:q,painOriginY:B,hospitalizationDate:J,config:K,canvasHeight:N}=k,Q=new Set,U=["xinmai","mai"],Z=new Map,ee=new Set,te=new Set,ie=new Set,ne=m(R.yScaleValue);function oe(t){var o;const l=ne.find((e=>"pulse"===e.type));if(l&&(null==(o=l.dataList)?void 0:o.length)&&(Q.size&&L.value.remove(...Q),Q.clear(),Z.size>1)){if(t){const{type:e,key:i}=t.origin||{};if("pulse"===e){const e=Z.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 Z)t.push(e[1]),e[0]===U[0]&&e[1].forEach((e=>{(Z.get(U[1])||[]).findIndex((t=>t[0]===e[0]))>-1&&i.push(e[0])}));const[n,o]=t;let l=[],r=[];return i.forEach((t=>{const i=n.findIndex((e=>e[0]===t)),s=o.findIndex((e=>e[0]===t)),a=n[i],u=o[s],c=n[i-1],p=n[i+1],d=o[s-1],f=o[s+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&&r.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]);r.push([a,u].find((e=>e[1]===v)));const g=()=>{const t=[...l,...r.reverse()],[i]=t,n=t.at(-1);i[0]===n[0]&&i[1]===n[1]&&t.splice(-1,1),e.push(t),l=[],r=[]};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?(r.push(f),g()):g()})),e}(),{mode:r,style:s={}}=l.shadow||{};o.forEach((t=>{const o=t.map((e=>({x:e[0],y:e[1]}))),l=new e.Polygon(o,{...n,...s,strokeWidth:1});if(["slash","line"].includes(r)){l.set({fill:"transparent",stroke:s.stroke||"#f00"});const e=[];if(["slash"].includes(r))e.push(...T(t,s._angle,s.space)),e.forEach((e=>{Object.assign(e,{...n,...s}),Q.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([...t.flat()],{...s,originX:"center"});e.push(n),Q.add(n)}))}L.value.add(...e)}Q.add(l),L.value.add(l)}))}}function le(){var e;const t=ne.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({},j,R.overlap||{}),l=[];ee.size&&[...ee].forEach((e=>{[...te].forEach((t=>{if(t.origin&&c(e,t)){const e=t.origin.key;if(e){const r={left:t.left,top:t.top,...n,hoverCursor:"default"};let s="koumai";"yemai"===e&&(s=e),"humai"===e&&(s="circle"),l.push(o(s,{...i[e]||{},...r}))}}}))})),setTimeout((()=>{L.value.add(...l),l.forEach((e=>{null==e||e.bringToFront(),ie.add(e)}))}))}function re(e,t,s){var u;const{type:c,riseStyle:f={},noRiseStyle:h={},verifiedStyle:v={},reduceStyle:g={},pacemaker:y={},upArrowStyle:m={},limitValueStyle:x={},nonePainPointStyle:b={},dataList:j=[]}=s,{type:Y,textStyle:M,showConnectLine:O=!1}=b,A=[],C=[],I=[];null==(u=e.list)||u.forEach(((u,b)=>{const T=a(c)?j.find((e=>e.key===u.key)):e,R=ue(u,s),X={};X.value=function(e,t,i){if(!(null==e?void 0:e.length)||!K.showValue)return;const{lineAttr:n={}}=i,o=e[1]<=q.originY+z?e[1]+z:e[1]-z,r=l([e[0],o],{value:t.value,originX:"center",originY:"center",fill:n.stroke||"#000"});return I.push(r),{obj:r,top:-z}}(R,u,T),function(e,t,s,a,u){var d,y;if(!(null==e?void 0:e.length)||!["temperature","pain"].includes(c))return;const{lineAttr:m={}}=s,{value:x}=a;let b,j,L,k,S,Y;if(t.noRise&&h.show){const t=w(h)?E(u.type,u.list,35):e[1];if(h.text)L=l([e[0],w(h)?t:t+5],{value:h.text.split("").join("\n"),originY:"top",...h.style||{}}),I.push(L);else{const i=t+2*z;k=r([e[0],t,i],h.style||{}),I.push(k)}}t.rise&&f.show&&f.text&&(S=l([e[0],e[1]-(x?z:0)-5],{value:f.text.split("").join("\n"),originY:"bottom",...f.style||{}}),I.push(S));t.verified&&(Y=l([e[0],e[1]-(x?z:0)-5],{value:"v",originX:"center",originY:"bottom",...v}),I.push(Y));if(p(t.physicsReduce)||p(t.drugReduce)){const l=E(c,u.list,null!=(d=t.physicsReduce)?d:t.drugReduce);b=i([...e,e[0],l],{...m,...g.line,...n}),j=o((null==(y=null==g?void 0:g.point)?void 0:y.type)||"circle",{left:e[0],top:l,...g.point,...n,originY:l===N?"bottom":"center"}),b&&I.push(b),j&&I.push(j)}Object.assign(a,{reduceLine:{obj:b,type:"line"},noRiseText:{obj:L,top:5,isFixed:w(h)},arrowGroup:{obj:k,top:2*z,isFixed:w(h)},riseText:{obj:S,top:(x?-z:0)-5},verifiedText:{obj:Y,top:(x?-z:0)-5},reducePoint:{obj:j,type:"reduce"}})}(R,u,T,X,s),function(e,t,i,n){if(!(null==e?void 0:e.length)||!["pulse"].includes(c))return;let o,a;const{upArrowShow:u=!1,limitValueShow:p=!1}=i;if(u&&+t.value>180){let t=e[1]-2.5*z,i=[e[1]-z/2,t];t<q.originY&&(t=e[1]+2.5*z,i=[t,e[1]+z/2]),o=r([e[0],i[0],i[1]],m,"up"),I.push(o)}if(p){const i={value:t.value,originX:"center",originY:"center",...x};if(+t.value>Math.max(...s.list)){const t=o?e[1]+z/2+o.height:e[1]+z;a=l([e[0],t],i),I.push(a)}+t.value<Math.min(...s.list)&&(a=l([e[0],e[1]-z],i),I.push(a))}Object.assign(n,{upArrow:{obj:o},limitValue:{obj:a,top:-z}})}(R,u,T,X),function(n,l,r,a,u){let p,f;const{pointAttr:h={},lineAttr:v={},title:g="",key:m,type:x="circle"}=a,b=e.list[r+1],j=ue(b,s),w=se(c,e.list[r].value),E=j&&se(c,b.value);n&&j&&!l.breakpoint&&(!w&&!E||O)&&n[0]!==j[0]&&(f=i([...n,...j],{...v}));const I=l.pacemakerShow&&"pulse"==c?y.value:w&&"number"===Y?0:x,T=C[r-1],R={origin:{data:l,title:g,key:m||"",unit:s.unit,type:c,_type:d(g,c),dataIndex:t,index:r},leftLine:T,rightLine:f,otherObj:u,lockMovementX:!0,...l.pacemakerShow&&"pulse"==c?y.style:h,...k.event.hovered?k.event.evented?{selectable:!0}:{selectable:!0,lockMovementY:!0}:k.event,...w?{selectable:!1,evented:!1,..."number"===Y?M:{}}:{}};if(T){const e=T.get("y2");p=o(I,{left:T.get("x2"),top:w?e-5:e,...R})}else n&&(R.leftLine=null,p=o(I,{left:n[0],top:w?n[1]-5:n[1],...R}));C.push(f),p&&(g.includes("脉搏")?ee.add(p):te.add(p),function(e){W.hovered&&(e.on("mouseover",(()=>{ae(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?B:q;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}=t||{};"reduce"!==n&&("line"===n?null==i||i.setCoords().set({x1:e.left,y1:e.top}):!l&&(null==i||i.setCoords().set({left:e.left,top:e.top+o})))})),oe(e)}(e),W.hovered&&ae(e)})),e.on("mouseup",(t=>{if(P.show=!1,1===t.button){const{type:t}=e.origin,i=$(t,e.top),n={...e.origin,data:{...e.origin.data,value:i}};L.value.discardActiveObject(),S("change",n),pe(n,"change")}}))}(p),A.push(p),ie.add(p))}(R,u,b,T,X)})),"pulse"===c&&U.forEach((e=>{Z.set(e,A.filter((t=>{var i;return(null==(i=t.origin)?void 0:i.key)===e})).map((e=>[e.left,e.top])))})),Promise.all(A).then((e=>{const t=C.filter((e=>e));let i=null;e=e.map((e=>(e&&i&&(i.nextPoint=e,e.prevPoint=i),i=e||i,e))),Promise.all(I).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 se(e,t){return"pain"===e&&0==t}function ae(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:r,physicsReduce:s}=l||{},a="hover"===t?l.value:$(o,e.top);if(p(r))return`药物降${"pain"==o?"痛":"温"} ${a}—>${r}${n||""}`;if(p(s))return`物理降${"pain"==o?"痛":"温"} ${a}—>${s}${n||""}`;return`${i} ${a}${n||""}`}(),`时间 ${((null==l?void 0:l.time)||M(e.left)).slice(-5)}`],P.show=!0}function ue(e,t){const i="pain"===t.type?B:q;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)){const n=Y(e.time),o=E(t.type,t.list,e.value);return[n,o<i.originY?i.originY:o>i.endY?i.endY:o]}}function ce(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(`${M(e)}:00`);return J&&l<h(J)?(I("exceedMin"),!1):!(l>o)||(I("exceedMax"),!1)}function pe(e,t="add"){const{type:i,dataIndex:n,index:o,data:l,key:r}=e,s=ne.find((e=>e.type===i));if("add"===t){const e=a(i)?s.dataList.find((e=>e.enable)):s.dataList[n],t=v(l.time,e.list);e.list.splice(t,0,l)}else s.dataList[n].list[o]=l;de()}function de(){var e;ie.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}([...ie]))),Z.clear(),ie.clear(),ee.clear(),te.clear(),ne.forEach((e=>{e.dataList.forEach(((t,i)=>{a(e.type)&&!t.enable||re(t,i,e)}))})),oe(),le()}return Z.clear(),ee.clear(),te.clear(),ne.forEach((e=>{!function(e){if("temperature"!==e.type||!e.positionLine)return;const t=E(e.type,e.list,e.positionLine.value),n=i([D,t,V,t],e.positionLine);L.value.add(n)}(e),e.dataList.forEach(((t,i)=>{a(e.type)&&!t.enable||re(t,i,e)}))})),oe(),le(),k.event.evented&&L.value.on("mouse:up",(e=>{var t;if(3===e.button){const{x:i=0,y:n=0}=e.pointer||{};if(i>=D&&i<=V&&n>=_&&n<=G){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=[...b]),A.target=e.target;else{A.target=null,A.list=["新增节点"],H.forEach((t=>{if(!C([...ie],i,"_type").includes(t.bigType)){const i=["pain"].includes(t.bigType)?B:q;n>=i.originY&&n<=i.endY&&A.list.push({renderItem:O?O(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=ce(i);t&&1!==A.list.length||(A.show=!1,1===A.list.length&&t&&I("repeat"))}}}})),{clickMenu:function({item:e,target:t}){if(t){const{data:i,type:n,dataIndex:o,index:l}=t.origin,r=g(i,[...x,...b]);r[`${e.type}`]=e.value,a(n)&&(r.key=t.origin.key);const s={...t.origin,data:r};S("change",s),pe(s,"change")}else{const t={data:{time:M(e.pointer.x),value:$(e.origin.type,e.pointer.y),...a(e.origin.type)?{key:e.origin.key}:{}},...e.origin};S("add",t),pe(t)}},setPopup:ae,isAddPoint:ce,updateData:pe,redrawPoints:de,gridPoints:ie}}function w(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}from"lodash-es";import"naive-ui";import"@vueuse/core";import{TEMPERATURE_MENU as x,PAIN_MENU as b,OVERLAP as j}from"../../constants/index.js";function w(w,k,S,Y,E,M,$,O,P,A){r(w,k);const{getEqualXTypes:C,handleAddPrevent:I}=y(w,S,k),{createShadowLines:T}=t(),{left:R,xScaleList:X,xCellWidth:V,yCellHeight:z,originX:D,endX:F,originY:H,endY:_,itemList:W,event:q,vitalSignsOriginY:G,painOriginY:B,hospitalizationDate:J,config:K,canvasHeight:N}=k,Q=new Set,U=["xinmai","mai"],Z=new Map,ee=new Set,te=new Set,ie=new Set,ne=m(R.yScaleValue);function oe(t){var o;const l=ne.find((e=>"pulse"===e.type));if(l&&(null==(o=l.dataList)?void 0:o.length)&&(Q.size&&w.value.remove(...Q),Q.clear(),Z.size>1)){if(t){const{type:e,key:i}=t.origin||{};if("pulse"===e){const e=Z.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 Z)t.push(e[1]),e[0]===U[0]&&e[1].forEach((e=>{(Z.get(U[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}),Q.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([...t.flat()],{...r,originX:"center"});e.push(n),Q.add(n)}))}w.value.add(...e)}Q.add(l),w.value.add(l)}))}}function le(){var e;const t=ne.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({},j,R.overlap||{}),l=[];ee.size&&[...ee].forEach((e=>{[...te].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((()=>{w.value.add(...l),l.forEach((e=>{null==e||e.bringToFront(),ie.add(e)}))}))}function se(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:Y=[],list:M=[]}=r,{type:O,textStyle:A,showConnectLine:C=!1}=b,I=[],T=[],R=[];null==(u=e.list)||u.forEach(((u,b)=>{const X=a(c)?Y.find((e=>e.key===u.key)):e,V=ue(u,r),D={};D.value=function(e,t,i){if(!(null==e?void 0:e.length)||!K.showValue)return;const{lineAttr:n={}}=i,o=e[1]<=G.originY+z?e[1]+z:e[1]-z,s=l([e[0],o],{value:t.value,originX:"center",originY:"center",fill:n.stroke||"#000"});return R.push(s),{obj:s,top:-z}}(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,k;if(t.noRise&&h.show){const t=L(h)?E(c,M,35):e[1];if(h.text)j=l([e[0],L(h)?t:t+5],{value:h.text.split("").join("\n"),originY:"top",...h.style});else{const i=t+2*z;j=s([e[0],t,i],{...h.style})}R.push(j)}t.rise&&f.show&&f.text&&(w=l([e[0],e[1]-(m?z:0)-5],{value:f.text.split("").join("\n"),originY:"bottom",...f.style}),R.push(w));t.verified&&(k=l([e[0],e[1]-(m?z:0)-5],{value:"v",originX:"center",originY:"bottom",...v}),R.push(k));if(p(t.physicsReduce)||p(t.drugReduce)){const l=E(c,M,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===N?"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*z,isFixed:L(h)},riseText:{obj:w,top:(m?-z:0)-5},verifiedText:{obj:k,top:(m?-z:0)-5},reducePoint:{obj:b,type:"reduce"}})}(V,u,X,D),function(e,t,i,n){if(!(null==e?void 0:e.length)||!["pulse"].includes(c))return;const o=Math.max(...M),r=Math.min(...M);let a,u,p;const{upArrowShow:d=!1,limitValueShow:f=!1}=i;if(d&&+t.value>180){let t=e[1]-2.5*z,i=[e[1]-z/2,t];t<G.originY&&(t=e[1]+2.5*z,i=[t,e[1]+z/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]+z/2+a.height:e[1]+z;u=l([e[0],t],i),R.push(u)}+t.value<r&&(u=l([e[0],e[1]-z],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*z;p=s([e[0],t,i],{...j.style})}R.push(p)}Object.assign(n,{upArrow:{obj:a},limitValue:{obj:u,top:-z},belowMinValue:{obj:p,top:j.text?5:2*z,moveHide:!0}})}(V,u,X,D),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=ue(b,r),L=re(c,e.list[s].value),Y=j&&re(c,b.value);n&&j&&!l.breakpoint&&(!L&&!Y||C)&&n[0]!==j[0]&&(f=i([...n,...j],{...v}));const E=l.pacemakerShow&&"pulse"==c?y.value:L&&"number"===O?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,...k.event.hovered?k.event.evented?{selectable:!0}:{selectable:!0,lockMovementY:!0}:k.event,...L?{selectable:!1,evented:!1,..."number"===O?A:{}}:{}};if(M){const e=M.get("y2");p=o(E,{left:M.get("x2"),top:L?e-5:e,...R})}else n&&(R.leftLine=null,p=o(E,{left:n[0],top:L?n[1]-5:n[1],...R}));T.push(f),p&&(g.includes("脉搏")?ee.add(p):te.add(p),function(e){q.hovered&&(e.on("mouseover",(()=>{ae(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?B:G;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&&(w.value.remove(i),delete e.otherObj.obj)))})),oe(e)}(e),q.hovered&&ae(e)})),e.on("mouseup",(t=>{if(P.show=!1,1===t.button){const{type:t}=e.origin,i=$(t,e.top),n={...e.origin,data:{...e.origin.data,value:i}};w.value.discardActiveObject(),S("change",n),pe(n,"change")}}))}(p),I.push(p),ie.add(p))}(V,u,b,X,D)})),"pulse"===c&&U.forEach((e=>{Z.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=>{w.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&&w.value.remove(e.leftLine),e.rightLine&&w.value.remove(e.rightLine))}}(t,e)}))}))}))}function re(e,t){return"pain"===e&&0==t}function ae(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,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)||M(e.left)).slice(-5)}`],P.show=!0}function ue(e,t){const i="pain"===t.type?B:G;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)){const n=Y(e.time),o=E(t.type,t.list,e.value);return[n,o<i.originY?i.originY:o>i.endY?i.endY:o]}}function ce(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(`${M(e)}:00`);return J&&l<h(J)?(I("exceedMin"),!1):!(l>o)||(I("exceedMax"),!1)}function pe(e,t="add"){const{type:i,dataIndex:n,index:o,data:l,key:s}=e,r=ne.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;de()}function de(){var e;ie.size&&(null==(e=w.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}([...ie]))),Z.clear(),ie.clear(),ee.clear(),te.clear(),ne.forEach((e=>{e.dataList.forEach(((t,i)=>{a(e.type)&&!t.enable||se(t,i,e)}))})),oe(),le()}return Z.clear(),ee.clear(),te.clear(),ne.forEach((e=>{!function(e){if("temperature"!==e.type||!e.positionLine)return;const t=E(e.type,e.list,e.positionLine.value),n=i([D,t,F,t],e.positionLine);w.value.add(n)}(e),e.dataList.forEach(((t,i)=>{a(e.type)&&!t.enable||se(t,i,e)}))})),oe(),le(),k.event.evented&&w.value.on("mouse:up",(e=>{var t;if(3===e.button){const{x:i=0,y:n=0}=e.pointer||{};if(i>=D&&i<=F&&n>=H&&n<=_){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=[...b]),A.target=e.target;else{A.target=null,A.list=["新增节点"],W.forEach((t=>{if(!C([...ie],i,"_type").includes(t.bigType)){const i=["pain"].includes(t.bigType)?B:G;n>=i.originY&&n<=i.endY&&A.list.push({renderItem:O?O(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=ce(i);t&&1!==A.list.length||(A.show=!1,1===A.list.length&&t&&I("repeat"))}}}})),{clickMenu:function({item:e,target:t}){if(t){const{data:i,type:n,dataIndex:o,index:l}=t.origin,s=g(i,[...x,...b]);s[`${e.type}`]=e.value,a(n)&&(s.key=t.origin.key);const r={...t.origin,data:s};S("change",r),pe(r,"change")}else{const t={data:{time:M(e.pointer.x),value:$(e.origin.type,e.pointer.y),...a(e.origin.type)?{key:e.origin.key}:{}},...e.origin};S("add",t),pe(t)}},setPopup:ae,isAddPoint:ce,updateData:pe,redrawPoints:de,gridPoints:ie}}function L(e){return"fixed"===e.position}export{w as useCenter};
@@ -1 +1 @@
1
- import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{drawLine as e,defaultTextStyle as i,defaultStyle as n,drawTextAndIconGroup as o,drawTextGroup as l}from"../useDraw.js";import"date-fns";import{getType as s,isOneLine as r}from"../../utils/index.js";import"../useEvent.js";import{getScaleInfo as a,drawScaleNumber as u,drawScaleLine as h}from"../useScaleColumn.js";import{useCommon as c}from"../useCommon.js";import"vue";import"lodash-es";import"./useShadow.js";import"naive-ui";function p(p,g,d,f,m,y,v,w,S,Y,b,x){var j,X;const{getEqualXTypes:C,handleAddPrevent:N,isGridLimit:T}=c(p,d,g),{originY:V,endY:k,originX:E,endX:L,xCellWidth:M,yCellHeight:W,left:G,vitalSignsOriginY:O,painOriginY:A,painHeight:H,iconsWidth:I,itemList:R,painIndex:_,right:B,canvasWidth:J,canvasHeight:$,getRightInfo:q,borderStyle:D}=g;function P(o){var s;if(!(null==o?void 0:o.length))return;const{layout:r}=o[0];let c=I,g=E;"right"===r&&(c=L,g=L+(null!=(s=null==B?void 0:B.width)?s:0));const d=[],f=H&&"right"!==r?o.length-1:o.length,m=(g-c)/f,y=m+(g-c)%f;o.forEach(((o,s)=>{if("pain"===o.type)return void function(n){const{list:o=[],spaceGridNumber:s=5,showScale:r,showNumber:h,position:c,showMaxMinNumber:g,style:d,title:f}=n,m=l({width:E-I,height:H,...D},{value:`${f}`,...i,...d||{}},{left:I,top:A.originY}),y=e([I,A.originY,E,A.originY],D),v=[];if(r||h){const{lineXMain:e,textLeft:i}=a(c,I,E-I),l=o.length;o.forEach(((o,a)=>{let c=A.endY-a*W*s;if(0===a&&(c=k-5),!h||(0===a||a===l-1)&&!g||v.push(u(o,n,i,c)),r&&0!==a){const[i,n]=e,o=new t.Line([i,c,n,c],{...D,...d});v.push(o)}}))}p.value.add(y,m,...v),m.sendToBack()}(o);const g=[],f=0===s?y:m,v=0===s?c:y+c+(s-1)*m,w="right"===r?0:O.originY,S="right"===r?$:O.endY,Y=s>0?e([v,w,v,S],{objectCaching:!1,...D}):null;Y&&g.push(Y);const b=v+f/2,{list:x=[],spaceGridNumber:j=5,showScale:X,showNumber:C,position:N,showMaxMinNumber:T}=o;if(X||C){const{lineXMain:t,lineXSub:e,textLeft:i}=a(N,v,f),n=x.length;x.forEach(((l,s)=>{const r=O.endY-s*W*j;if(C&&(!(0===s||s===n-1)||T)){const t=0==s?r-5:r,e=u(l,o,i,t),n=O.originY+e.height/2;t<n&&e.set({top:n}),g.push(e)}g.push(...h(o,s,t,e,r,W,O.originY))}))}let V=o.title||"";o.unit&&(V+="\n"+o.unit),V&&g.push(new t.Text(String(V),{...i,left:b,top:O.originY+W*j/2,textAlign:"center",...o.style}));const L=new t.Group(g,{...n,objectCaching:!1});d.push(L)}));const v=d.length>0?new t.Group([...d],{...n,objectCaching:!1}):null;v&&p.value.add(v),v&&v.sendToBack()}I&&function(){const t=JSON.parse(JSON.stringify(R));let e=k;const i=I-G.icons.marginRight;t.reverse().forEach((t=>{e-=10;let n=t.title.replace(/(.{2})/g,"$1\n");n.endsWith("\n")&&(n=n.slice(0,n.length-1));const{text:l,icon:a}=o(n,t,{text:{left:i-(t.pointAttr.width||10)-5,top:e,originX:"right"},icon:{originX:"right",left:i,topY:e,origin:{type:s(t.bigType),_type:t.bigType},...g.event}});var u;e-=l.height||30,(u=a).on("moving",(()=>{u.set("originX","center"),function(t){if(t.left>=E&&t.left<=L){t.setCoords();const e="pain"===t.origin.type?A:O;t.top<e.originY&&t.set("top",e.originY),t.top>e.endY&&t.set("top",e.endY)}}(u),T(u)?f(u):m.show=!1})),u.on("mouseup:before",(t=>{if(m.show=!1,0===t.e.button&&T(u)){const t=C([...x],u.left,"_type").includes(u.origin._type),e=Y(u.left);if(!e||t)t&&e&&N("repeat");else{const t={data:{time:w(u.left),value:S(u.origin.type,u.top),...r(u.origin.type)?{key:u.origin.key}:{}},...u.origin};d("add",t),b(t)}}!function(t){t.setCoords().set({originX:"right",left:t.originLeft,top:t.originTop})}(u)})),p.value.add(l,a)}))}();const z=G.yScaleValue.filter((t=>"left"===t.layout&&"pain"!==t.type&&t.show));if((null==B?void 0:B.width)&&"left"===(null==(j=null==B?void 0:B.yScaleValue)?void 0:j.layout)&&(null==(X=null==B?void 0:B.yScaleValue)?void 0:X.show)&&z.push(q),_>0&&G.yScaleValue[_].show){const t=G.yScaleValue[_];0===_&&G.yScaleValue.length>1&&z.unshift(t),_==G.yScaleValue.length-1&&z.push(t)}const F=z.findIndex((t=>"pulse"===t.type&&t.show&&t.doubleShow)),K=z[F];return F>-1&&z.splice(F,0,{...K,title:(null==K?void 0:K.doubleTitle)||(null==K?void 0:K.title)}),P(z),p.value.add(new t.Rect({left:I,top:0,width:J-I-D.strokeWidth,height:$-D.strokeWidth,fill:"transparent",...D})),{drawScaleValue:P}}export{p as useLeft};
1
+ import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{drawLine as e,defaultTextStyle as i,defaultStyle as n,drawTextAndIconGroup as o,drawTextGroup as l}from"../useDraw.js";import"date-fns";import{getType as s,isOneLine as r}from"../../utils/index.js";import"../useEvent.js";import{getScaleInfo as a,drawScaleNumber as u,drawScaleLine as h}from"../useScaleColumn.js";import{useCommon as c}from"../useCommon.js";import"vue";import"lodash-es";import"./useShadow.js";import"naive-ui";import"@vueuse/core";function p(p,g,d,f,m,v,y,w,S,Y,b,x){var j,X;const{getEqualXTypes:C,handleAddPrevent:N,isGridLimit:T}=c(p,d,g),{originY:V,endY:k,originX:E,endX:L,xCellWidth:M,yCellHeight:W,left:G,vitalSignsOriginY:O,painOriginY:A,painHeight:H,iconsWidth:I,itemList:R,painIndex:_,right:B,canvasWidth:J,canvasHeight:$,getRightInfo:q,borderStyle:D}=g;function P(o){var s;if(!(null==o?void 0:o.length))return;const{layout:r}=o[0];let c=I,g=E;"right"===r&&(c=L,g=L+(null!=(s=null==B?void 0:B.width)?s:0));const d=[],f=H&&"right"!==r?o.length-1:o.length,m=(g-c)/f,v=m+(g-c)%f;o.forEach(((o,s)=>{if("pain"===o.type)return void function(n){const{list:o=[],spaceGridNumber:s=5,showScale:r,showNumber:h,position:c,showMaxMinNumber:g,style:d,title:f}=n,m=l({width:E-I,height:H,...D},{value:`${f}`,...i,...d||{}},{left:I,top:A.originY}),v=e([I,A.originY,E,A.originY],D),y=[];if(r||h){const{lineXMain:e,textLeft:i}=a(c,I,E-I),l=o.length;o.forEach(((o,a)=>{let c=A.endY-a*W*s;if(0===a&&(c=k-5),!h||(0===a||a===l-1)&&!g||y.push(u(o,n,i,c)),r&&0!==a){const[i,n]=e,o=new t.Line([i,c,n,c],{...D,...d});y.push(o)}}))}p.value.add(v,m,...y),m.sendToBack()}(o);const g=[],f=0===s?v:m,y=0===s?c:v+c+(s-1)*m,w="right"===r?0:O.originY,S="right"===r?$:O.endY,Y=s>0?e([y,w,y,S],{objectCaching:!1,...D}):null;Y&&g.push(Y);const b=y+f/2,{list:x=[],spaceGridNumber:j=5,showScale:X,showNumber:C,position:N,showMaxMinNumber:T}=o;if(X||C){const{lineXMain:t,lineXSub:e,textLeft:i}=a(N,y,f),n=x.length;x.forEach(((l,s)=>{const r=O.endY-s*W*j;if(C&&(!(0===s||s===n-1)||T)){const t=0==s?r-5:r,e=u(l,o,i,t),n=O.originY+e.height/2;t<n&&e.set({top:n}),g.push(e)}g.push(...h(o,s,t,e,r,W,O.originY))}))}let V=o.title||"";o.unit&&(V+="\n"+o.unit),V&&g.push(new t.Text(String(V),{...i,left:b,top:O.originY+W*j/2,textAlign:"center",...o.style}));const L=new t.Group(g,{...n,objectCaching:!1});d.push(L)}));const y=d.length>0?new t.Group([...d],{...n,objectCaching:!1}):null;y&&p.value.add(y),y&&y.sendToBack()}I&&function(){const t=JSON.parse(JSON.stringify(R));let e=k;const i=I-G.icons.marginRight;t.reverse().forEach((t=>{e-=10;let n=t.title.replace(/(.{2})/g,"$1\n");n.endsWith("\n")&&(n=n.slice(0,n.length-1));const{text:l,icon:a}=o(n,t,{text:{left:i-(t.pointAttr.width||10)-5,top:e,originX:"right"},icon:{originX:"right",left:i,topY:e,origin:{type:s(t.bigType),_type:t.bigType},...g.event}});var u;e-=l.height||30,(u=a).on("moving",(()=>{u.set("originX","center"),function(t){if(t.left>=E&&t.left<=L){t.setCoords();const e="pain"===t.origin.type?A:O;t.top<e.originY&&t.set("top",e.originY),t.top>e.endY&&t.set("top",e.endY)}}(u),T(u)?f(u):m.show=!1})),u.on("mouseup:before",(t=>{if(m.show=!1,0===t.e.button&&T(u)){const t=C([...x],u.left,"_type").includes(u.origin._type),e=Y(u.left);if(!e||t)t&&e&&N("repeat");else{const t={data:{time:w(u.left),value:S(u.origin.type,u.top),...r(u.origin.type)?{key:u.origin.key}:{}},...u.origin};d("add",t),b(t)}}!function(t){t.setCoords().set({originX:"right",left:t.originLeft,top:t.originTop})}(u)})),p.value.add(l,a)}))}();const z=G.yScaleValue.filter((t=>"left"===t.layout&&"pain"!==t.type&&t.show));if((null==B?void 0:B.width)&&"left"===(null==(j=null==B?void 0:B.yScaleValue)?void 0:j.layout)&&(null==(X=null==B?void 0:B.yScaleValue)?void 0:X.show)&&z.push(q),_>0&&G.yScaleValue[_].show){const t=G.yScaleValue[_];0===_&&G.yScaleValue.length>1&&z.unshift(t),_==G.yScaleValue.length-1&&z.push(t)}const F=z.findIndex((t=>"pulse"===t.type&&t.show&&t.doubleShow)),K=z[F];return F>-1&&z.splice(F,0,{...K,title:(null==K?void 0:K.doubleTitle)||(null==K?void 0:K.title)}),P(z),p.value.add(new t.Rect({left:I,top:0,width:J-I-D.strokeWidth,height:$-D.strokeWidth,fill:"transparent",...D})),{drawScaleValue:P}}export{p as useLeft};
@@ -1 +1 @@
1
- import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{defaultStyle as e}from"../useDraw.js";import"date-fns";import"lodash-es";import"../useEvent.js";import"vue";import"./useShadow.js";import"naive-ui";function i(i,n,o){const{other:r,vitalSignsOriginY:l,xCellWidth:s,yCellHeight:a,endX:u}=n;let c=0;function h(i,n,o){const r=[];String(i.value).split("").forEach(((n,o)=>{const l=new t.Text(n,{left:0,top:a*o,originX:"center",...e,objectCaching:!1,...i.style||{}});c=(a-(l.height||0))/2,r.push(l)}));const l={originX:"center",left:n,top:o+c,baseTop:(i.baseTop||0)*a,trueLeft:n,trueHeight:r.length*a,objectCaching:!1};return new t.Group(r,l)}!function(){if(!(null==r?void 0:r.list))return!1;const n=[],c=[];r.list.forEach(((t,e)=>{const i=0===e?"vertical":t.align||"vertical",n=o(t.time,!0);if(n>u)return;const r=c.find((t=>t.left==n));if(r)r[i].push(t);else{const e={left:n,vertical:[],horizontal:[]};e[i].push(t),c.push(e)}})),c.forEach((t=>{let e=l.originY,i=t.left;t.vertical.forEach(((o,r)=>{var u,c;const f=(o.baseTop||0)*a,g=(null==(u=n.at(-1))?void 0:u.left)||0;0===r&&t.left<=g&&(i=g+s);if(n.filter((t=>t.trueLeft===i)).length){const t=String(o.value).length*a,r=(null==(c=n.at(-1))?void 0:c.trueHeight)||0;e+=r,e+t+f>l.endY&&(e=l.originY,i+=s)}e+=f,String(o.value).length&&n.push(h(o,i,e))})),t.horizontal.forEach(((e,o)=>{var r;const u=l.originY+(e.baseTop||0)*a,c=(null==(r=n.at(-1))?void 0:r.left)||0;t.left<=c&&(i=c+s),String(e.value).length&&n.push(h(e,i,u))}))}));const f=n.length>0?new t.Group([...n],{...e,objectCaching:!1}):null;f&&i.value.add(f)}()}export{i as useOther};
1
+ import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{defaultStyle as e}from"../useDraw.js";import"date-fns";import"lodash-es";import"../useEvent.js";import"vue";import"./useShadow.js";import"naive-ui";import"@vueuse/core";function i(i,n,o){const{other:r,vitalSignsOriginY:l,xCellWidth:s,yCellHeight:a,endX:u}=n;let c=0;function h(i,n,o){const r=[];String(i.value).split("").forEach(((n,o)=>{const l=new t.Text(n,{left:0,top:a*o,originX:"center",...e,objectCaching:!1,...i.style||{}});c=(a-(l.height||0))/2,r.push(l)}));const l={originX:"center",left:n,top:o+c,baseTop:(i.baseTop||0)*a,trueLeft:n,trueHeight:r.length*a,objectCaching:!1};return new t.Group(r,l)}!function(){if(!(null==r?void 0:r.list))return!1;const n=[],c=[];r.list.forEach(((t,e)=>{const i=0===e?"vertical":t.align||"vertical",n=o(t.time,!0);if(n>u)return;const r=c.find((t=>t.left==n));if(r)r[i].push(t);else{const e={left:n,vertical:[],horizontal:[]};e[i].push(t),c.push(e)}})),c.forEach((t=>{let e=l.originY,i=t.left;t.vertical.forEach(((o,r)=>{var u,c;const f=(o.baseTop||0)*a,g=(null==(u=n.at(-1))?void 0:u.left)||0;0===r&&t.left<=g&&(i=g+s);if(n.filter((t=>t.trueLeft===i)).length){const t=String(o.value).length*a,r=(null==(c=n.at(-1))?void 0:c.trueHeight)||0;e+=r,e+t+f>l.endY&&(e=l.originY,i+=s)}e+=f,String(o.value).length&&n.push(h(o,i,e))})),t.horizontal.forEach(((e,o)=>{var r;const u=l.originY+(e.baseTop||0)*a,c=(null==(r=n.at(-1))?void 0:r.left)||0;t.left<=c&&(i=c+s),String(e.value).length&&n.push(h(e,i,u))}))}));const f=n.length>0?new t.Group([...n],{...e,objectCaching:!1}):null;f&&i.value.add(f)}()}export{i as useOther};
@@ -1 +1 @@
1
- import{ref as e,computed as t,reactive as a,onMounted as l,nextTick as u}from"vue";import{defaultBorderStyle as i}from"../useDraw.js";import"../../../../../shared/utils/fabricjs/index.js";import{useCumputedPoint as r}from"../useCumputedPoint.js";import{useCanvasEvent as n}from"../useEvent.js";import{setOtherType as o,getFloorNumber as s}from"../../utils/index.js";import"lodash-es";import{format as d,addDays as v}from"date-fns";import"naive-ui";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,Y,S,b,w,C){const x=15,D=e(),j=e(),V=e(),X=t((()=>{const{top:e}=Y.data;return e.date.show&&(e.date.height||x)||0})),H=t((()=>{var e;const{top:t}=Y.data;return(null==(e=t.hospitalDays)?void 0:e.show)&&(t.hospitalDays.height||x)||0})),L=t((()=>{var e;const{top:t}=Y.data;return(null==(e=t.operationDays)?void 0:e.show)&&(t.operationDays.height||x)||0})),I=t((()=>{var e,t,a;const{top:l}=Y.data;return((null==(e=l.xScalevalue)?void 0:e.show)&&(l.xScalevalue.height||x)||0)+((null==(t=l.xScalevalue)?void 0:t.show)&&null!=(a=l.dayHeight)?a:0)})),M=t((()=>{var e;const{bottom:t}=Y.data;return(null==(e=null==t?void 0:t.breathing)?void 0:e.show)&&(t.breathing.height||30)||0})),P=t((()=>{const{grid:e}=Y.data;return e.mainXCell*e.subXCell+e.surplusXCell})),N=t((()=>{const{grid:e}=Y.data;return e.mainYCell*e.subYCell+e.surplusYCell})),O=t((()=>{var e;const{width:t,right:a=null,top:l}=Y.data;if(!a)return t;return t-(null!=(e=a.width)?e:0)})),W=t((()=>{const{grid:e}=Y.data;return O.value-e.surplusXCell*q.value})),$=t((()=>{const{top:e,left:t}=Y.data;return e.titleWidth+T.value})),k=t((()=>{const{bottom:e=null,height:t}=Y.data;if(!e)return t;return t-(e.height||30)})),G=t((()=>{var e;const{top:t}=Y.data,a=t.xScalevalue.show&&(null!=(e=t.dayHeight)?e:0)||0,l=t.xScalevalue.show&&(t.xScalevalue.height||x)||0;return X.value+a+l+H.value+L.value})),R=t((()=>{const{grid:e}=Y.data;return G.value+e.surplusYCell*z.value})),q=t((()=>(O.value-$.value)/P.value)),z=t((()=>(k.value-G.value)/N.value)),T=t((()=>{var e,t;const{left:a}=Y.data;return(null==(e=a.icons)?void 0:e.show)&&((null==(t=a.icons)?void 0:t.width)||100)||0})),A=t((()=>{var e,t;const{top:a,grid:l}=Y.data,u=(null==(t=null==(e=a.date.list)?void 0:e.slice)?void 0:t.call(e,0,l.mainXCell))||[],i=a.xScalevalue.times;let r=$.value-q.value;const n=a.date.startDate||d(new Date,"yyyy-MM-dd");return u.reduce(((e,t,a)=>0===a?e.concat(n):e.concat(d(v(new Date(n.replace(/-/g,"/")),a),"yyyy-MM-dd"))),[]).map((e=>i.map((t=>{r+=q.value;const a=Date.parse(`${e} ${t.start}`),l=Date.parse(`${e} ${t.end}`);return{start:a,end:l,left:r,center:r+q.value/2,scaleCell:(l-a)/q.value}})))).flat()})),B=t((()=>ue("breathe"))),E=t((()=>ue("pulse"))),F=t((()=>ue("temperature"))),J=t((()=>ue("pain"))),K=t((()=>{var e;return(null==(e=Y.data.grid)?void 0:e.event)||{selectable:!0,evented:!0,hovered:!0}})),Q=t((()=>{const{left:e}=Y.data;return e.yScaleValue.map((e=>e.dataList.filter((e=>e.show)).map(((t,a)=>({...t,bigType:o(t.title,e.type),unit:e.unit,dataIndex:a}))))).flat()})),U=t((()=>{const{left:e}=Y.data;return e.yScaleValue.findIndex((e=>"pain"===e.type))})),Z=t((()=>{const{grid:e}=Y.data;return-1===U.value?0:z.value*e.subYCell})),_=t((()=>{const{left:e}=Y.data,t={originY:k.value,endY:k.value};return 0===U.value&&e.yScaleValue.length>1?(t.originY=R.value,t.endY=R.value+Z.value):U.value===e.yScaleValue.length-1&&(t.originY=k.value-Z.value,t.endY=k.value),t})),ee=t((()=>{const{left:e}=Y.data,t={originY:G.value,endY:k.value};return 0===U.value&&e.yScaleValue.length>1?(t.originY=R.value+Z.value,t.endY=k.value):U.value===e.yScaleValue.length-1&&(t.originY=R.value,t.endY=k.value-Z.value),t})),te=t((()=>{var e,t;const{top:a,grid:l}=Y.data,u=[];for(const i in a)a[i].show&&u.push({...a[i],list:(null==(t=null==(e=a[i].list)?void 0:e.slice)?void 0:t.call(e,0,l.mainXCell))||[],key:i});return u.sort(((e,t)=>e.seq-t.seq))})),ae=t((()=>{var e;const{left:t,right:a}=Y.data,l=t.yScaleValue.find((e=>"temperature"===e.type)),u=(null==a?void 0:a.yScaleValue)||{};return(null==(e=null==l?void 0:l.list)?void 0:e.length)&&Object.assign(u,{list:l.list.map((e=>s(1.8*e+32))),spaceGridNumber:l.spaceGridNumber}),u})),le=a({canvasWidth:Y.data.width,canvasHeight:Y.data.height,borderStyle:{...i,...Y.data.borderStyle||{}},selectionStyle:Y.data.selectionStyle||{},dateHeight:X.value,hospitalDaysHeight:H.value,operationDaysHeight:L.value,xScalevalueHeight:I.value,topList:te.value,breathingHeight:M.value,hospitalizationDate:Y.data.hospitalizationDate,grid:Y.data.grid,top:Y.data.top,left:Y.data.left,right:Y.data.right,bottom:Y.data.bottom,other:Y.data.other,painIndex:U.value,painHeight:Z.value,painOriginY:_.value,vitalSignsOriginY:ee.value,gridXNumber:P.value,gridYNumber:N.value,iconsWidth:T.value,originX:$.value,originY:G.value,originYLimit:R.value,endX:O.value,endXLimit:W.value,endY:k.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:ae.value,config:Y.data.config||{}});function ue(e){const{yScaleValue:t}=Y.data.left,a=t.find((t=>t.type===e)),l=(null==a?void 0:a.list)||[];return l.length?z.value/((l[1]-l[0])/a.spaceGridNumber):0}const{cumputedX:ie,cumputedY:re,getXValue:ne,getYValue:oe}=r(le);return l((()=>{u((()=>{c(y,le);const{setPopup:e,isAddPoint:t,updateData:a,redrawPoints:l,clickMenu:u,gridPoints:i}=g(y,le,S,ie,re,ne,oe,Y.addRenderItem,w,C);j.value=l,V.value=u;const{drawScaleValue:r}=p(y,le,S,e,w,ie,re,ne,oe,t,a,i);h(y,le,r),m(y,le),f(y,le,ie);const{select:o}=n(y,le,S);D.value=o}))})),{propItems:le,redrawPoints:j,select:D,clickMenu:V}}export{y as useTemperatureChart};
1
+ import{ref as e,computed as t,reactive as a,onMounted as l,nextTick as u}from"vue";import{defaultBorderStyle as i}from"../useDraw.js";import"../../../../../shared/utils/fabricjs/index.js";import{useCumputedPoint as r}from"../useCumputedPoint.js";import{useCanvasEvent as n}from"../useEvent.js";import{setOtherType as o,getFloorNumber as s}from"../../utils/index.js";import"lodash-es";import{format as d,addDays as v}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,Y,S,b,w,C){const x=15,D=e(),j=e(),V=e(),X=t((()=>{const{top:e}=Y.data;return e.date.show&&(e.date.height||x)||0})),H=t((()=>{var e;const{top:t}=Y.data;return(null==(e=t.hospitalDays)?void 0:e.show)&&(t.hospitalDays.height||x)||0})),L=t((()=>{var e;const{top:t}=Y.data;return(null==(e=t.operationDays)?void 0:e.show)&&(t.operationDays.height||x)||0})),I=t((()=>{var e,t,a;const{top:l}=Y.data;return((null==(e=l.xScalevalue)?void 0:e.show)&&(l.xScalevalue.height||x)||0)+((null==(t=l.xScalevalue)?void 0:t.show)&&null!=(a=l.dayHeight)?a:0)})),M=t((()=>{var e;const{bottom:t}=Y.data;return(null==(e=null==t?void 0:t.breathing)?void 0:e.show)&&(t.breathing.height||30)||0})),P=t((()=>{const{grid:e}=Y.data;return e.mainXCell*e.subXCell+e.surplusXCell})),N=t((()=>{const{grid:e}=Y.data;return e.mainYCell*e.subYCell+e.surplusYCell})),O=t((()=>{var e;const{width:t,right:a=null,top:l}=Y.data;if(!a)return t;return t-(null!=(e=a.width)?e:0)})),W=t((()=>{const{grid:e}=Y.data;return O.value-e.surplusXCell*q.value})),$=t((()=>{const{top:e,left:t}=Y.data;return e.titleWidth+T.value})),k=t((()=>{const{bottom:e=null,height:t}=Y.data;if(!e)return t;return t-(e.height||30)})),G=t((()=>{var e;const{top:t}=Y.data,a=t.xScalevalue.show&&(null!=(e=t.dayHeight)?e:0)||0,l=t.xScalevalue.show&&(t.xScalevalue.height||x)||0;return X.value+a+l+H.value+L.value})),R=t((()=>{const{grid:e}=Y.data;return G.value+e.surplusYCell*z.value})),q=t((()=>(O.value-$.value)/P.value)),z=t((()=>(k.value-G.value)/N.value)),T=t((()=>{var e,t;const{left:a}=Y.data;return(null==(e=a.icons)?void 0:e.show)&&((null==(t=a.icons)?void 0:t.width)||100)||0})),A=t((()=>{var e,t;const{top:a,grid:l}=Y.data,u=(null==(t=null==(e=a.date.list)?void 0:e.slice)?void 0:t.call(e,0,l.mainXCell))||[],i=a.xScalevalue.times;let r=$.value-q.value;const n=a.date.startDate||d(new Date,"yyyy-MM-dd");return u.reduce(((e,t,a)=>0===a?e.concat(n):e.concat(d(v(new Date(n.replace(/-/g,"/")),a),"yyyy-MM-dd"))),[]).map((e=>i.map((t=>{r+=q.value;const a=Date.parse(`${e} ${t.start}`),l=Date.parse(`${e} ${t.end}`);return{start:a,end:l,left:r,center:r+q.value/2,scaleCell:(l-a)/q.value}})))).flat()})),B=t((()=>ue("breathe"))),E=t((()=>ue("pulse"))),F=t((()=>ue("temperature"))),J=t((()=>ue("pain"))),K=t((()=>{var e;return(null==(e=Y.data.grid)?void 0:e.event)||{selectable:!0,evented:!0,hovered:!0}})),Q=t((()=>{const{left:e}=Y.data;return e.yScaleValue.map((e=>e.dataList.filter((e=>e.show)).map(((t,a)=>({...t,bigType:o(t.title,e.type),unit:e.unit,dataIndex:a}))))).flat()})),U=t((()=>{const{left:e}=Y.data;return e.yScaleValue.findIndex((e=>"pain"===e.type))})),Z=t((()=>{const{grid:e}=Y.data;return-1===U.value?0:z.value*e.subYCell})),_=t((()=>{const{left:e}=Y.data,t={originY:k.value,endY:k.value};return 0===U.value&&e.yScaleValue.length>1?(t.originY=R.value,t.endY=R.value+Z.value):U.value===e.yScaleValue.length-1&&(t.originY=k.value-Z.value,t.endY=k.value),t})),ee=t((()=>{const{left:e}=Y.data,t={originY:G.value,endY:k.value};return 0===U.value&&e.yScaleValue.length>1?(t.originY=R.value+Z.value,t.endY=k.value):U.value===e.yScaleValue.length-1&&(t.originY=R.value,t.endY=k.value-Z.value),t})),te=t((()=>{var e,t;const{top:a,grid:l}=Y.data,u=[];for(const i in a)a[i].show&&u.push({...a[i],list:(null==(t=null==(e=a[i].list)?void 0:e.slice)?void 0:t.call(e,0,l.mainXCell))||[],key:i});return u.sort(((e,t)=>e.seq-t.seq))})),ae=t((()=>{var e;const{left:t,right:a}=Y.data,l=t.yScaleValue.find((e=>"temperature"===e.type)),u=(null==a?void 0:a.yScaleValue)||{};return(null==(e=null==l?void 0:l.list)?void 0:e.length)&&Object.assign(u,{list:l.list.map((e=>s(1.8*e+32))),spaceGridNumber:l.spaceGridNumber}),u})),le=a({canvasWidth:Y.data.width,canvasHeight:Y.data.height,borderStyle:{...i,...Y.data.borderStyle||{}},selectionStyle:Y.data.selectionStyle||{},dateHeight:X.value,hospitalDaysHeight:H.value,operationDaysHeight:L.value,xScalevalueHeight:I.value,topList:te.value,breathingHeight:M.value,hospitalizationDate:Y.data.hospitalizationDate,grid:Y.data.grid,top:Y.data.top,left:Y.data.left,right:Y.data.right,bottom:Y.data.bottom,other:Y.data.other,painIndex:U.value,painHeight:Z.value,painOriginY:_.value,vitalSignsOriginY:ee.value,gridXNumber:P.value,gridYNumber:N.value,iconsWidth:T.value,originX:$.value,originY:G.value,originYLimit:R.value,endX:O.value,endXLimit:W.value,endY:k.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:ae.value,config:Y.data.config||{}});function ue(e){const{yScaleValue:t}=Y.data.left,a=t.find((t=>t.type===e)),l=(null==a?void 0:a.list)||[];return l.length?z.value/((l[1]-l[0])/a.spaceGridNumber):0}const{cumputedX:ie,cumputedY:re,getXValue:ne,getYValue:oe}=r(le);return l((()=>{u((()=>{c(y,le);const{setPopup:e,isAddPoint:t,updateData:a,redrawPoints:l,clickMenu:u,gridPoints:i}=g(y,le,S,ie,re,ne,oe,Y.addRenderItem,w,C);j.value=l,V.value=u;const{drawScaleValue:r}=p(y,le,S,e,w,ie,re,ne,oe,t,a,i);h(y,le,r),m(y,le),f(y,le,ie);const{select:o}=n(y,le,S);D.value=o}))})),{propItems:le,redrawPoints:j,select:D,clickMenu:V}}export{y as useTemperatureChart};
@@ -1 +1 @@
1
- import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{drawLine as e,defaultStyle as l,drawTextGroup as i,defaultTextStyle as s}from"../useDraw.js";import"date-fns";import"lodash-es";import"../useEvent.js";import"vue";import"./useShadow.js";import"naive-ui";function o(o,u){const{grid:h,originX:n,endX:a,xCellWidth:c,gridXNumber:r,top:p,xScalevalueHeight:d,iconsWidth:f,topList:v,endXLimit:g,canvasWidth:y,borderStyle:m}=u;!function(){const S=[];g&&S.push(new t.Line([g,0,y,0],m));let w=0;v.forEach(((t,l)=>{if(l>0&&(w+=u[`${v[l-1].key}Height`]),"xScalevalue"==t.key)!function(t,l,o){const u=p.dayHeight;if(!u)return;l.push(e([n,o+u,a,o+u],m));const d=c*h.subSecondXCell,f=(r-h.surplusXCell)/h.subSecondXCell;for(let h=0;h<f;h++){const a=n+h*d,c=h%2==0?"上午":"下午",r=i({width:d,height:u,...m},{value:c,...s,...t.style||{}},{left:a,top:o});l.push(r),l.push(e([a+d,o,a+d,o+u],m))}}(t,S,w),function(t,l,o){var u;const r=p.xScalevalue.show&&null!=(u=p.dayHeight)?u:0,v=d-r;if(!v)return;l.push(e([f,o+d,a,o+d],m));const g=i({width:n-f,height:d,...m},{value:p.xScalevalue.title,...s,...t.style||{},...t.titleStyle||{}},{left:f,top:o});l.push(g),l.push(e([n,o,n,o+d],m));const y=[];for(let t=0;t<h.mainXCell;t++)y.push(p.xScalevalue.list);y.flat().forEach(((u,h)=>{const a=n+h*c,p=i({width:c,height:v,...m},{value:u.value,...s,...t.style||{},...u.style||{}},{left:a,top:o+r});l.push(p),l.push(e([a+c,o+r,a+c,o+r+v],m))}))}(t,S,w);else{if(!u[`${t.key}Height`])return;const o=u[`${v[l].key}Height`];!function(t,l,o){const a=u[`${t.key}Height`],r=i({width:n-f,height:a,...m},{value:t.title,...s,...(null==t?void 0:t.style)||{},...t.titleStyle||{}},{left:f,top:o});l.push(r);const p=c*h.subXCell;t.list.forEach(((u,h)=>{const c=n+h*p,r=i({width:p,height:a,...m},{value:u,...s,...(null==t?void 0:t.style)||{}},{left:c,top:o});l.push(e([c+p,o,c+p,o+a],m)),l.push(r)}))}(t,S,w),S.push(e([f,w+o,a,w+o],m)),S.push(e([n,w,n,w+o],m))}}));const X=S.length>0?new t.Group([...S],{...l,objectCaching:!1}):null;X&&X.sendToBack(),X&&o.value.add(X)}()}export{o as useTop};
1
+ import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{drawLine as e,defaultStyle as l,drawTextGroup as i,defaultTextStyle as s}from"../useDraw.js";import"date-fns";import"lodash-es";import"../useEvent.js";import"vue";import"./useShadow.js";import"naive-ui";import"@vueuse/core";function o(o,u){const{grid:h,originX:n,endX:a,xCellWidth:c,gridXNumber:r,top:p,xScalevalueHeight:d,iconsWidth:f,topList:v,endXLimit:g,canvasWidth:y,borderStyle:m}=u;!function(){const S=[];g&&S.push(new t.Line([g,0,y,0],m));let w=0;v.forEach(((t,l)=>{if(l>0&&(w+=u[`${v[l-1].key}Height`]),"xScalevalue"==t.key)!function(t,l,o){const u=p.dayHeight;if(!u)return;l.push(e([n,o+u,a,o+u],m));const d=c*h.subSecondXCell,f=(r-h.surplusXCell)/h.subSecondXCell;for(let h=0;h<f;h++){const a=n+h*d,c=h%2==0?"上午":"下午",r=i({width:d,height:u,...m},{value:c,...s,...t.style||{}},{left:a,top:o});l.push(r),l.push(e([a+d,o,a+d,o+u],m))}}(t,S,w),function(t,l,o){var u;const r=p.xScalevalue.show&&null!=(u=p.dayHeight)?u:0,v=d-r;if(!v)return;l.push(e([f,o+d,a,o+d],m));const g=i({width:n-f,height:d,...m},{value:p.xScalevalue.title,...s,...t.style||{},...t.titleStyle||{}},{left:f,top:o});l.push(g),l.push(e([n,o,n,o+d],m));const y=[];for(let t=0;t<h.mainXCell;t++)y.push(p.xScalevalue.list);y.flat().forEach(((u,h)=>{const a=n+h*c,p=i({width:c,height:v,...m},{value:u.value,...s,...t.style||{},...u.style||{}},{left:a,top:o+r});l.push(p),l.push(e([a+c,o+r,a+c,o+r+v],m))}))}(t,S,w);else{if(!u[`${t.key}Height`])return;const o=u[`${v[l].key}Height`];!function(t,l,o){const a=u[`${t.key}Height`],r=i({width:n-f,height:a,...m},{value:t.title,...s,...(null==t?void 0:t.style)||{},...t.titleStyle||{}},{left:f,top:o});l.push(r);const p=c*h.subXCell;t.list.forEach(((u,h)=>{const c=n+h*p,r=i({width:p,height:a,...m},{value:u,...s,...(null==t?void 0:t.style)||{}},{left:c,top:o});l.push(e([c+p,o,c+p,o+a],m)),l.push(r)}))}(t,S,w),S.push(e([f,w+o,a,w+o],m)),S.push(e([n,w,n,w+o],m))}}));const X=S.length>0?new t.Group([...S],{...l,objectCaching:!1}):null;X&&X.sendToBack(),X&&o.value.add(X)}()}export{o as useTop};
@@ -6,4 +6,5 @@ export declare function useCommon(canvas: Ref<fabric.Canvas>, emits: Function, p
6
6
  getEqualXTypes: (points: any[], pointX: number, field: string, range?: any) => string[];
7
7
  handleAddPrevent: (type: 'repeat' | 'exceedMax' | 'exceedMin') => void;
8
8
  isGridLimit: (point: IObject) => boolean;
9
+ setPrevAndNextPoint: (pointList: any[]) => void;
9
10
  };
@@ -1 +1 @@
1
- const e={repeat:"该时段已存在数值不能新增",exceedMax:"未来时间不允许录入",exceedMin:"不允许小于入院时间"};function n(n,t,i){return{getEqualXTypes:function(e,n,t,r=i.xCellWidth){const o=[],d=r/2;return e.forEach((e=>{e.origin&&!e.origin.isMenu&&Math.abs(n-e.left)<=d&&o.push(e.origin[t])})),[...new Set(o)]},handleAddPrevent:function(n){t("add:prevent",{type:n,message:e[n]})},isGridLimit:function(e){const{left:n,top:t}=e,{originX:r,endX:o,originY:d,endY:c}=i;return n>=r&&n<=o&&t>=d&&t<=c}}}export{n as useCommon};
1
+ const e={repeat:"该时段已存在数值不能新增",exceedMax:"未来时间不允许录入",exceedMin:"不允许小于入院时间"};function n(n,t,i){return{getEqualXTypes:function(e,n,t,r=i.xCellWidth){const o=[],d=r/2;return e.forEach((e=>{e.origin&&!e.origin.isMenu&&Math.abs(n-e.left)<=d&&o.push(e.origin[t])})),[...new Set(o)]},handleAddPrevent:function(n){t("add:prevent",{type:n,message:e[n]})},isGridLimit:function(e){const{left:n,top:t}=e,{originX:r,endX:o,originY:d,endY:u}=i;return n>=r&&n<=o&&t>=d&&t<=u},setPrevAndNextPoint:function(e){e.reduce(((e,n)=>e&&n?(n.prevPoint=e,e.nextPoint=n,n):n||e),null)}}}export{n as useCommon};
@@ -17,6 +17,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
17
17
  extraMaterialList: {
18
18
  type: import("vue").PropType<import("./src/types").FormConfigItem[] | (() => import("./src/types").FormConfigItem[] | Promise<import("./src/types").FormConfigItem[]>)>;
19
19
  };
20
+ showLowCodeReactions: BooleanConstructor;
20
21
  formProps: {
21
22
  type: import("vue").PropType<Partial<Partial<{
22
23
  fieldList: import("..").FieldItem[];
@@ -97,7 +98,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
97
98
  businessFormatter: import("..").FormBusinessFormatter;
98
99
  requestInstance: import("..").RequestInstance;
99
100
  enterToNextWidget: boolean | ((fieldItem: import("..").FieldItem) => boolean | void);
100
- lowCodeReactions: import("..").FormLowCodeReactions.Config[];
101
+ lowCodeReactions: import("../../../es/shared/types").FormLowCodeReactions.Config[];
101
102
  linebarAutoHidden: boolean;
102
103
  bordered: string | boolean;
103
104
  uniqueCacheData: boolean;
@@ -123,6 +124,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
123
124
  extraMaterialList: {
124
125
  type: import("vue").PropType<import("./src/types").FormConfigItem[] | (() => import("./src/types").FormConfigItem[] | Promise<import("./src/types").FormConfigItem[]>)>;
125
126
  };
127
+ showLowCodeReactions: BooleanConstructor;
126
128
  formProps: {
127
129
  type: import("vue").PropType<Partial<Partial<{
128
130
  fieldList: import("..").FieldItem[];
@@ -203,7 +205,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
203
205
  businessFormatter: import("..").FormBusinessFormatter;
204
206
  requestInstance: import("..").RequestInstance;
205
207
  enterToNextWidget: boolean | ((fieldItem: import("..").FieldItem) => boolean | void);
206
- lowCodeReactions: import("..").FormLowCodeReactions.Config[];
208
+ lowCodeReactions: import("../../../es/shared/types").FormLowCodeReactions.Config[];
207
209
  linebarAutoHidden: boolean;
208
210
  bordered: string | boolean;
209
211
  uniqueCacheData: boolean;
@@ -215,8 +217,9 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
215
217
  }>> & {
216
218
  onAddItem?: ((...args: any[]) => any) | undefined;
217
219
  onRemoveItem?: ((...args: any[]) => any) | undefined;
220
+ onReactionsValidateFailure?: ((...args: any[]) => any) | undefined;
218
221
  }>>;
219
- emit: (event: "addItem" | "removeItem", ...args: any[]) => void;
222
+ emit: (event: "addItem" | "removeItem" | "reactionsValidateFailure", ...args: any[]) => void;
220
223
  uuid: string;
221
224
  cssVars: import("vue").ComputedRef<import("vue").CSSProperties>;
222
225
  getCommonConfig: (formConfig?: import("./src/types").FormConfigItem | undefined) => {
@@ -382,9 +385,10 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
382
385
  allow_check_mid_level?: "1" | "2" | "3" | "4" | undefined;
383
386
  prefix?: string | import("../../../es/shared/types").AnyObject | (() => any) | undefined;
384
387
  suffix?: string | import("../../../es/shared/types").AnyObject | (() => any) | undefined;
385
- allowSlash?: boolean | undefined;
388
+ allowSlash?: string | boolean | undefined;
386
389
  allowModify?: "0" | "1" | undefined;
387
390
  show_key?: string | undefined;
391
+ whiteList?: string[] | undefined;
388
392
  bordered?: string | boolean | undefined;
389
393
  fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
390
394
  content?: string | import("..").FormRenderer | Record<string, import("..").FormRenderer> | undefined;
@@ -2115,9 +2119,10 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
2115
2119
  allow_check_mid_level?: "1" | "2" | "3" | "4" | undefined;
2116
2120
  prefix?: string | import("../../../es/shared/types").AnyObject | (() => any) | undefined;
2117
2121
  suffix?: string | import("../../../es/shared/types").AnyObject | (() => any) | undefined;
2118
- allowSlash?: boolean | undefined;
2122
+ allowSlash?: string | boolean | undefined;
2119
2123
  allowModify?: "0" | "1" | undefined;
2120
2124
  show_key?: string | undefined;
2125
+ whiteList?: string[] | undefined;
2121
2126
  bordered?: string | boolean | undefined;
2122
2127
  fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
2123
2128
  content?: string | import("..").FormRenderer | Record<string, import("..").FormRenderer> | undefined;
@@ -3695,6 +3700,22 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
3695
3700
  __isCombinationChild?: boolean | undefined;
3696
3701
  __extra?: boolean | undefined;
3697
3702
  }[]>;
3703
+ lowCodeReactionsRef: import("vue").Ref<{
3704
+ conObj: {
3705
+ con: import("../../../es/shared/types").LOW_CODE_VALUE_RELATION;
3706
+ field_key: string;
3707
+ value: unknown;
3708
+ }[];
3709
+ sqlExpression?: string | undefined;
3710
+ showField?: string[] | undefined;
3711
+ hideField?: string[] | undefined;
3712
+ requiredField?: string[] | undefined;
3713
+ notRequiredField?: string[] | undefined;
3714
+ enabledField?: string[] | undefined;
3715
+ disabledField?: string[] | undefined;
3716
+ __oppositeBindField?: any | undefined;
3717
+ __oppositeTargetField?: any | undefined;
3718
+ }[]>;
3698
3719
  addItem: (formConfigItem: import("./src/types").FormConfigItem) => void;
3699
3720
  parsedTextFormatter: import("./src/types").FormConfigTextFormatter;
3700
3721
  currentEditField: import("vue").Ref<import("./src/types").FormConfigItem | undefined>;
@@ -3702,7 +3723,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
3702
3723
  validate: import("../../../es/shared/types").Func<any[], any>;
3703
3724
  } | undefined>;
3704
3725
  transform: (fieldList: import("./src/types").FormConfigItem[]) => import("./src/types").FormConfigItem[];
3705
- inverseTransform: (fieldList: import("./src/types").FormConfigItem[], withOriginalSetting: boolean) => import("./src/types").FormConfigItem[];
3726
+ inverseTransform: (fieldList: import("./src/types").FormConfigItem[], withOriginalSetting: boolean, otherConfig?: Partial<import("./src/types").FormConfigItem> | undefined) => import("./src/types").FormConfigItem[];
3706
3727
  extraValueRef: import("vue").WritableComputedRef<any>;
3707
3728
  _extraOptions: import("vue").Ref<{
3708
3729
  key: string;
@@ -3857,9 +3878,10 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
3857
3878
  allow_check_mid_level?: "1" | "2" | "3" | "4" | undefined;
3858
3879
  prefix?: string | import("../../../es/shared/types").AnyObject | (() => any) | undefined;
3859
3880
  suffix?: string | import("../../../es/shared/types").AnyObject | (() => any) | undefined;
3860
- allowSlash?: boolean | undefined;
3881
+ allowSlash?: string | boolean | undefined;
3861
3882
  allowModify?: "0" | "1" | undefined;
3862
3883
  show_key?: string | undefined;
3884
+ whiteList?: string[] | undefined;
3863
3885
  bordered?: string | boolean | undefined;
3864
3886
  fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
3865
3887
  content?: string | import("..").FormRenderer | Record<string, import("..").FormRenderer> | undefined;
@@ -5590,9 +5612,10 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
5590
5612
  allow_check_mid_level?: "1" | "2" | "3" | "4" | undefined;
5591
5613
  prefix?: string | import("../../../es/shared/types").AnyObject | (() => any) | undefined;
5592
5614
  suffix?: string | import("../../../es/shared/types").AnyObject | (() => any) | undefined;
5593
- allowSlash?: boolean | undefined;
5615
+ allowSlash?: string | boolean | undefined;
5594
5616
  allowModify?: "0" | "1" | undefined;
5595
5617
  show_key?: string | undefined;
5618
+ whiteList?: string[] | undefined;
5596
5619
  bordered?: string | boolean | undefined;
5597
5620
  fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
5598
5621
  content?: string | import("..").FormRenderer | Record<string, import("..").FormRenderer> | undefined;
@@ -7387,7 +7410,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
7387
7410
  default: boolean;
7388
7411
  };
7389
7412
  lowCodeReactions: {
7390
- type: import("vue").PropType<import("..").FormLowCodeReactions.Config[]>;
7413
+ type: import("vue").PropType<import("../../../es/shared/types").FormLowCodeReactions.Config[]>;
7391
7414
  };
7392
7415
  operationalForm: {
7393
7416
  type: import("vue").PropType<import("../../../es/shared/types").FormOperationalConfig[]>;
@@ -7532,7 +7555,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
7532
7555
  default: boolean;
7533
7556
  };
7534
7557
  lowCodeReactions: {
7535
- type: import("vue").PropType<import("..").FormLowCodeReactions.Config[]>;
7558
+ type: import("vue").PropType<import("../../../es/shared/types").FormLowCodeReactions.Config[]>;
7536
7559
  };
7537
7560
  operationalForm: {
7538
7561
  type: import("vue").PropType<import("../../../es/shared/types").FormOperationalConfig[]>;
@@ -7691,7 +7714,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
7691
7714
  businessFormatter: import("..").FormBusinessFormatter;
7692
7715
  requestInstance: import("..").RequestInstance;
7693
7716
  enterToNextWidget: boolean | ((fieldItem: import("..").FieldItem) => boolean | void);
7694
- lowCodeReactions: import("..").FormLowCodeReactions.Config[];
7717
+ lowCodeReactions: import("../../../es/shared/types").FormLowCodeReactions.Config[];
7695
7718
  linebarAutoHidden: boolean;
7696
7719
  bordered: string | boolean;
7697
7720
  uniqueCacheData: boolean;
@@ -8102,7 +8125,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
8102
8125
  default: boolean;
8103
8126
  };
8104
8127
  lowCodeReactions: {
8105
- type: import("vue").PropType<import("..").FormLowCodeReactions.Config[]>;
8128
+ type: import("vue").PropType<import("../../../es/shared/types").FormLowCodeReactions.Config[]>;
8106
8129
  };
8107
8130
  operationalForm: {
8108
8131
  type: import("vue").PropType<import("../../../es/shared/types").FormOperationalConfig[]>;
@@ -8342,7 +8365,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
8342
8365
  businessFormatter: import("..").FormBusinessFormatter;
8343
8366
  requestInstance: import("..").RequestInstance;
8344
8367
  enterToNextWidget: boolean | ((fieldItem: import("..").FieldItem) => boolean | void);
8345
- lowCodeReactions: import("..").FormLowCodeReactions.Config[];
8368
+ lowCodeReactions: import("../../../es/shared/types").FormLowCodeReactions.Config[];
8346
8369
  linebarAutoHidden: boolean;
8347
8370
  bordered: string | boolean;
8348
8371
  uniqueCacheData: boolean;
@@ -8440,7 +8463,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
8440
8463
  businessFormatter: import("..").FormBusinessFormatter;
8441
8464
  requestInstance: import("..").RequestInstance;
8442
8465
  enterToNextWidget: boolean | ((fieldItem: import("..").FieldItem) => boolean | void);
8443
- lowCodeReactions: import("..").FormLowCodeReactions.Config[];
8466
+ lowCodeReactions: import("../../../es/shared/types").FormLowCodeReactions.Config[];
8444
8467
  linebarAutoHidden: boolean;
8445
8468
  bordered: string | boolean;
8446
8469
  uniqueCacheData: boolean;
@@ -8590,9 +8613,10 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
8590
8613
  allow_check_mid_level?: "1" | "2" | "3" | "4" | undefined;
8591
8614
  prefix?: string | import("../../../es/shared/types").AnyObject | (() => any) | undefined;
8592
8615
  suffix?: string | import("../../../es/shared/types").AnyObject | (() => any) | undefined;
8593
- allowSlash?: boolean | undefined;
8616
+ allowSlash?: string | boolean | undefined;
8594
8617
  allowModify?: "0" | "1" | undefined;
8595
8618
  show_key?: string | undefined;
8619
+ whiteList?: string[] | undefined;
8596
8620
  bordered?: string | boolean | undefined;
8597
8621
  fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
8598
8622
  content?: string | import("..").FormRenderer | Record<string, import("..").FormRenderer> | undefined;
@@ -10334,9 +10358,10 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
10334
10358
  allow_check_mid_level?: "1" | "2" | "3" | "4" | undefined;
10335
10359
  prefix?: string | import("../../../es/shared/types").AnyObject | (() => any) | undefined;
10336
10360
  suffix?: string | import("../../../es/shared/types").AnyObject | (() => any) | undefined;
10337
- allowSlash?: boolean | undefined;
10361
+ allowSlash?: string | boolean | undefined;
10338
10362
  allowModify?: "0" | "1" | undefined;
10339
10363
  show_key?: string | undefined;
10364
+ whiteList?: string[] | undefined;
10340
10365
  bordered?: string | boolean | undefined;
10341
10366
  fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
10342
10367
  content?: string | import("..").FormRenderer | Record<string, import("..").FormRenderer> | undefined;
@@ -12051,9 +12076,10 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
12051
12076
  allow_check_mid_level?: "1" | "2" | "3" | "4" | undefined;
12052
12077
  prefix?: string | import("../../../es/shared/types").AnyObject | (() => any) | undefined;
12053
12078
  suffix?: string | import("../../../es/shared/types").AnyObject | (() => any) | undefined;
12054
- allowSlash?: boolean | undefined;
12079
+ allowSlash?: string | boolean | undefined;
12055
12080
  allowModify?: "0" | "1" | undefined;
12056
12081
  show_key?: string | undefined;
12082
+ whiteList?: string[] | undefined;
12057
12083
  bordered?: string | boolean | undefined;
12058
12084
  fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
12059
12085
  content?: string | import("..").FormRenderer | Record<string, import("..").FormRenderer> | undefined;
@@ -13766,7 +13792,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
13766
13792
  default: boolean;
13767
13793
  };
13768
13794
  lowCodeReactions: {
13769
- type: import("vue").PropType<import("..").FormLowCodeReactions.Config[]>;
13795
+ type: import("vue").PropType<import("../../../es/shared/types").FormLowCodeReactions.Config[]>;
13770
13796
  };
13771
13797
  operationalForm: {
13772
13798
  type: import("vue").PropType<import("../../../es/shared/types").FormOperationalConfig[]>;
@@ -13911,7 +13937,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
13911
13937
  default: boolean;
13912
13938
  };
13913
13939
  lowCodeReactions: {
13914
- type: import("vue").PropType<import("..").FormLowCodeReactions.Config[]>;
13940
+ type: import("vue").PropType<import("../../../es/shared/types").FormLowCodeReactions.Config[]>;
13915
13941
  };
13916
13942
  operationalForm: {
13917
13943
  type: import("vue").PropType<import("../../../es/shared/types").FormOperationalConfig[]>;
@@ -14070,7 +14096,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
14070
14096
  businessFormatter: import("..").FormBusinessFormatter;
14071
14097
  requestInstance: import("..").RequestInstance;
14072
14098
  enterToNextWidget: boolean | ((fieldItem: import("..").FieldItem) => boolean | void);
14073
- lowCodeReactions: import("..").FormLowCodeReactions.Config[];
14099
+ lowCodeReactions: import("../../../es/shared/types").FormLowCodeReactions.Config[];
14074
14100
  linebarAutoHidden: boolean;
14075
14101
  bordered: string | boolean;
14076
14102
  uniqueCacheData: boolean;
@@ -14481,7 +14507,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
14481
14507
  default: boolean;
14482
14508
  };
14483
14509
  lowCodeReactions: {
14484
- type: import("vue").PropType<import("..").FormLowCodeReactions.Config[]>;
14510
+ type: import("vue").PropType<import("../../../es/shared/types").FormLowCodeReactions.Config[]>;
14485
14511
  };
14486
14512
  operationalForm: {
14487
14513
  type: import("vue").PropType<import("../../../es/shared/types").FormOperationalConfig[]>;
@@ -14611,7 +14637,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
14611
14637
  businessFormatter: import("..").FormBusinessFormatter;
14612
14638
  requestInstance: import("..").RequestInstance;
14613
14639
  enterToNextWidget: boolean | ((fieldItem: import("..").FieldItem) => boolean | void);
14614
- lowCodeReactions: import("..").FormLowCodeReactions.Config[];
14640
+ lowCodeReactions: import("../../../es/shared/types").FormLowCodeReactions.Config[];
14615
14641
  linebarAutoHidden: boolean;
14616
14642
  bordered: string | boolean;
14617
14643
  uniqueCacheData: boolean;
@@ -14621,6 +14647,124 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
14621
14647
  }>>>;
14622
14648
  };
14623
14649
  }>>, {}>;
14650
+ FormConfigEventSetting: import("vue").DefineComponent<{
14651
+ modelValue: {
14652
+ type: ArrayConstructor;
14653
+ required: true;
14654
+ default: () => never[];
14655
+ };
14656
+ }, {
14657
+ props: {
14658
+ modelValue: import("../../../es/shared/types").FormLowCodeReactions.Config[];
14659
+ };
14660
+ emit: (event: "update:modelValue" | "validateFailure", ...args: any[]) => void;
14661
+ cssVars: import("vue").ComputedRef<import("vue").CSSProperties>;
14662
+ valueRef: import("vue").Ref<{
14663
+ conObj: {
14664
+ con: import("../../../es/shared/types").LOW_CODE_VALUE_RELATION;
14665
+ field_key: string;
14666
+ value: unknown;
14667
+ }[];
14668
+ sqlExpression?: string | undefined;
14669
+ showField?: string[] | undefined;
14670
+ hideField?: string[] | undefined;
14671
+ requiredField?: string[] | undefined;
14672
+ notRequiredField?: string[] | undefined;
14673
+ enabledField?: string[] | undefined;
14674
+ disabledField?: string[] | undefined;
14675
+ __oppositeBindField?: any | undefined;
14676
+ __oppositeTargetField?: any | undefined;
14677
+ }[]>;
14678
+ expandedName: import("vue").Ref<string>;
14679
+ addConnection: () => void;
14680
+ removeConnection: (index: number) => void;
14681
+ getOppositeBtnText: (item: import("../../../es/shared/types").FormLowCodeReactions.Config) => string | undefined;
14682
+ unBindOpposite: (item: import("../../../es/shared/types").FormLowCodeReactions.Config) => void;
14683
+ addOppositeCondition: (item: import("../../../es/shared/types").FormLowCodeReactions.Config) => void;
14684
+ getOppositeSqlExpression: (expression?: string | undefined) => string | undefined;
14685
+ createOppositeCondition: (config: import("../../../es/shared/types").FormLowCodeReactions.Config) => import("../../../es/shared/types").FormLowCodeReactions.Config;
14686
+ isOppositeConfig: (c1: import("../../../es/shared/types").FormLowCodeReactions.Config, c2: import("../../../es/shared/types").FormLowCodeReactions.Config) => boolean;
14687
+ onUpdateExpandedNames: (value: string[]) => void;
14688
+ getBinderFieldDesc: (index: number) => string;
14689
+ addCondition: (config: import("../../../es/shared/types").FormLowCodeReactions.Config) => void;
14690
+ removeCondition: (config: import("../../../es/shared/types").FormLowCodeReactions.Config, index: number) => void;
14691
+ onUpdateConditionType: (condition: import("../../../es/shared/types").FormLowCodeReactions.ConObj, type: import("../../../es/shared/types").LOW_CODE_VALUE_RELATION) => void;
14692
+ showRef: import("vue").Ref<boolean>;
14693
+ fieldListRef: import("vue").Ref<import("./src/types").FormConfigItem[]>;
14694
+ fieldOptions: import("vue").ComputedRef<import("./src/types").FormConfigItem[]>;
14695
+ currentTypeList: string[];
14696
+ dialog: import("naive-ui").DialogApi;
14697
+ onNegativeClick: () => Promise<void>;
14698
+ onPositiveClick: () => Promise<void>;
14699
+ configValidate: () => Promise<void>;
14700
+ HelpCircleSharp: import("vue").DefineComponent<{}, {}, {}, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, import("vue").EmitsOptions, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{}>>, {}>;
14701
+ NButton: any;
14702
+ NModal: any;
14703
+ NSpace: any;
14704
+ NScrollbar: any;
14705
+ NThing: any;
14706
+ NInputGroup: import("vue").DefineComponent<{
14707
+ [x: string]: never;
14708
+ [x: number]: never;
14709
+ [x: symbol]: never;
14710
+ }, {
14711
+ mergedClsPrefix: import("vue").ComputedRef<string>;
14712
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
14713
+ [x: string]: never;
14714
+ [x: number]: never;
14715
+ [x: symbol]: never;
14716
+ }>>, {}>;
14717
+ NSelect: any;
14718
+ NInput: any;
14719
+ NCollapse: any;
14720
+ NCollapseItem: import("vue").DefineComponent<{
14721
+ readonly title: StringConstructor;
14722
+ readonly name: import("vue").PropType<string | number>;
14723
+ readonly disabled: BooleanConstructor;
14724
+ readonly displayDirective: import("vue").PropType<"if" | "show">;
14725
+ }, {
14726
+ rtlEnabled: import("vue").Ref<import("naive-ui/es/config-provider/src/internal-interface").RtlItem | undefined> | undefined;
14727
+ collapseSlots: Readonly<{
14728
+ [name: string]: import("vue").Slot | undefined;
14729
+ }>;
14730
+ randomName: string;
14731
+ mergedClsPrefix: import("vue").Ref<string>;
14732
+ collapsed: import("vue").ComputedRef<boolean>;
14733
+ mergedDisplayDirective: import("vue").ComputedRef<"if" | "show">;
14734
+ arrowPlacement: import("vue").ComputedRef<"left" | "right">;
14735
+ handleClick(e: MouseEvent): void;
14736
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, {}, string, import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
14737
+ readonly title: StringConstructor;
14738
+ readonly name: import("vue").PropType<string | number>;
14739
+ readonly disabled: BooleanConstructor;
14740
+ readonly displayDirective: import("vue").PropType<"if" | "show">;
14741
+ }>>, {
14742
+ readonly disabled: boolean;
14743
+ }>;
14744
+ NEllipsis: any;
14745
+ NEmpty: any;
14746
+ NTooltip: any;
14747
+ NIcon: any;
14748
+ conditionTypeOptions: {
14749
+ value: import("../../../es/shared/types").LOW_CODE_VALUE_RELATION;
14750
+ label: string;
14751
+ }[];
14752
+ connectionTypeOptions: {
14753
+ value: string;
14754
+ label: string;
14755
+ }[];
14756
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("update:modelValue" | "validateFailure")[], "update:modelValue" | "validateFailure", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
14757
+ modelValue: {
14758
+ type: ArrayConstructor;
14759
+ required: true;
14760
+ default: () => never[];
14761
+ };
14762
+ }>> & {
14763
+ "onUpdate:modelValue"?: ((...args: any[]) => any) | undefined;
14764
+ onValidateFailure?: ((...args: any[]) => any) | undefined;
14765
+ }, {
14766
+ modelValue: unknown[];
14767
+ }>;
14624
14768
  FormConfigMaterialItem: import("vue").DefineComponent<{
14625
14769
  formConfigItem: {
14626
14770
  type: import("vue").PropType<import("./src/types").FormConfigItem>;
@@ -14652,7 +14796,8 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
14652
14796
  }>;
14653
14797
  FORM_CONFIG_GROUP: string;
14654
14798
  NSelect: any;
14655
- }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("addItem" | "removeItem")[], "addItem" | "removeItem", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
14799
+ NSpace: any;
14800
+ }, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, ("addItem" | "removeItem" | "reactionsValidateFailure")[], "addItem" | "removeItem" | "reactionsValidateFailure", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
14656
14801
  maxHeight: {
14657
14802
  type: StringConstructor;
14658
14803
  };
@@ -14668,6 +14813,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
14668
14813
  extraMaterialList: {
14669
14814
  type: import("vue").PropType<import("./src/types").FormConfigItem[] | (() => import("./src/types").FormConfigItem[] | Promise<import("./src/types").FormConfigItem[]>)>;
14670
14815
  };
14816
+ showLowCodeReactions: BooleanConstructor;
14671
14817
  formProps: {
14672
14818
  type: import("vue").PropType<Partial<Partial<{
14673
14819
  fieldList: import("..").FieldItem[];
@@ -14748,7 +14894,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
14748
14894
  businessFormatter: import("..").FormBusinessFormatter;
14749
14895
  requestInstance: import("..").RequestInstance;
14750
14896
  enterToNextWidget: boolean | ((fieldItem: import("..").FieldItem) => boolean | void);
14751
- lowCodeReactions: import("..").FormLowCodeReactions.Config[];
14897
+ lowCodeReactions: import("../../../es/shared/types").FormLowCodeReactions.Config[];
14752
14898
  linebarAutoHidden: boolean;
14753
14899
  bordered: string | boolean;
14754
14900
  uniqueCacheData: boolean;
@@ -14760,5 +14906,8 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
14760
14906
  }>> & {
14761
14907
  onAddItem?: ((...args: any[]) => any) | undefined;
14762
14908
  onRemoveItem?: ((...args: any[]) => any) | undefined;
14763
- }, {}>>;
14909
+ onReactionsValidateFailure?: ((...args: any[]) => any) | undefined;
14910
+ }, {
14911
+ showLowCodeReactions: boolean;
14912
+ }>>;
14764
14913
  export default FormConfig;