cnhis-design-vue 3.1.49-beta.20 → 3.1.49-beta.22
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/README.md +87 -87
- package/es/components/expand-field/src/components/form.vue2.js +1 -1
- package/es/components/expand-field/src/index.vue2.js +1 -1
- package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +1 -1
- package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcessChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.d.ts +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useLeft.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useOther.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useTop.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useBottom.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useCenter.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useLeft.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useOther.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useTemperatureChart.js +1 -1
- package/es/components/fabric-chart/src/hooks/temperature/useTop.js +1 -1
- package/es/components/form-config/index.d.ts +14 -0
- package/es/components/form-config/src/FormConfig.vue.d.ts +14 -0
- package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +6 -0
- package/es/components/form-render/src/components/renderer/select.d.ts +2 -5
- package/es/components/form-render/src/components/renderer/select.js +1 -1
- package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
- package/es/components/form-render/src/hooks/useFormRenderOptions.d.ts +4 -0
- package/es/components/form-render/src/hooks/useFormRenderOptions.js +1 -1
- package/es/components/form-render/src/types/fieldItem.d.ts +7 -5
- package/es/components/form-render/src/utils/index.d.ts +1 -0
- package/es/components/iho-table/src/plugins/lowCodeFieldAdaptorPlugin/index.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useAutoFocus.d.ts +6 -2
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/hooks/useAutoFocus.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/inputRendererPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/numberRendererPlugin.js +1 -1
- package/es/components/iho-table/src/plugins/rendererPlugins/editableWidgets/timeRendererPlugin/index.js +1 -1
- package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
- package/es/components/select-label/src/LabelFormContent.vue2.js +1 -1
- package/es/components/select-person/src/SearchMultiple.vue.d.ts +6 -0
- package/es/components/shortcut-setter/index.d.ts +2 -0
- package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +2 -0
- package/es/components/table-export-field/src/components/ExportModal.vue.d.ts +0 -3
- package/es/env.d.ts +25 -25
- package/es/shared/assets/img/failure.png.js +1 -1
- package/es/shared/assets/img/no-permission.png.js +1 -1
- package/es/shared/assets/img/nodata.png.js +1 -1
- package/es/shared/assets/img/notfound.png.js +1 -1
- package/es/shared/assets/img/qr.png.js +1 -1
- package/es/shared/assets/img/success.png.js +1 -1
- package/es/shared/assets/img/video.png.js +1 -1
- package/es/shared/assets/img/video_default_cover.png.js +1 -1
- package/es/shared/assets/img/xb_big.png.js +1 -1
- package/es/shared/assets/img/xb_small.png.js +1 -1
- package/es/shared/package.json.js +1 -1
- package/package.json +2 -2
- package/es/components/bpmn-workflow/src/BpmnWorkflow.d.ts +0 -0
- package/es/components/bpmn-workflow/types/BpmnViewer.d.ts +0 -1
- package/es/components/bpmn-workflow/types/ModelingModule.d.ts +0 -1
- package/es/components/bpmn-workflow/types/MoveCanvasModule.d.ts +0 -1
- package/es/shared/components/VueDraggable/src/vuedraggable.d.ts +0 -86
- package/es/shared/utils/fabricjs/index.d.ts +0 -6823
- package/es/shared/utils/tapable/index.d.ts +0 -139
|
@@ -1 +1 @@
|
|
|
1
|
-
import{fabric as e}from"../../../../../shared/utils/fabricjs/index.js";import{useShadow as t}from"./useShadow.js";import{drawLine as n,defaultStyle as i,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 g,deleteProperty as v}from"../../utils/index.js";import{useCommon as y}from"../useCommon.js";import"vue";import{cloneDeep as m}from"lodash-es";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,ne=new Set,ie=m(R.yScaleValue);function oe(t){var o;const l=ie.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:n}=t.origin||{};if("pulse"===e){const e=Z.get(n),i=null==e?void 0:e.findIndex((e=>e[0]===t.left));e.splice(i,1,[t.left,t.top])}}const o=function(){const e=[],t=[],n=[];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&&n.push(e[0])}));const[i,o]=t;let l=[],r=[];return n.forEach((t=>{const n=i.findIndex((e=>e[0]===t)),s=o.findIndex((e=>e[0]===t)),a=i[n],u=o[s],c=i[n-1],p=i[n+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 g=Math.max(a[1],u[1]);r.push([a,u].find((e=>e[1]===g)));const v=()=>{const t=[...l,...r.reverse()],[n]=t,i=t.at(-1);n[0]===i[0]&&n[1]===i[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))),v()}}else p?(l.push(p),v()):f?(r.push(f),v()):v()})),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,{...i,...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,{...i,...s}),Q.add(e)}));else{const i=function(e){const t=e.reduce(((e,t)=>{const n=Math.trunc(t[0]);return e[n]=e[n]?e[n].concat([t]):[t],e}),{}),n=Object.values(t).filter((e=>2===e.length&&Math.trunc(e[0][1])!==Math.trunc(e[1][1])));return n}(t);i.forEach((t=>{const i=n([...t.flat()],{...s,originX:"center"});e.push(i),Q.add(i)}))}L.value.add(...e)}Q.add(l),L.value.add(l)}))}}function le(){var e;const t=ie.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 n=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,...i,hoverCursor:"default"};let s="koumai";"yemai"===e&&(s=e),"humai"===e&&(s="circle"),l.push(o(s,{...n[e]||{},...r}))}}}))})),setTimeout((()=>{L.value.add(...l),l.forEach((e=>{null==e||e.bringToFront(),ne.add(e)}))}))}function re(e,t,s){var u;const{type:c,riseStyle:f={},noRiseStyle:h={},verifiedStyle:g={},reduceStyle:v={},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,n){if(!(null==e?void 0:e.length)||!K.showValue)return;const{lineAttr:i={}}=n,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:i.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 n=t+2*z;k=r([e[0],t,n],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",...g}),I.push(Y));if(p(t.physicsReduce)||p(t.drugReduce)){const l=E(c,u.list,null!=(d=t.physicsReduce)?d:t.drugReduce);b=n([...e,e[0],l],{...m,...v.line,...i}),j=o((null==(y=null==v?void 0:v.point)?void 0:y.type)||"circle",{left:e[0],top:l,...v.point,...i,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,n,i){if(!(null==e?void 0:e.length)||!["pulse"].includes(c))return;let o,a;const{upArrowShow:u=!1,limitValueShow:p=!1}=n;if(u&&+t.value>180){let t=e[1]-2.5*z,n=[e[1]-z/2,t];t<q.originY&&(t=e[1]+2.5*z,n=[t,e[1]+z/2]),o=r([e[0],n[0],n[1]],m,"up"),I.push(o)}if(p){const n={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],n),I.push(a)}+t.value<Math.min(...s.list)&&(a=l([e[0],e[1]-z],n),I.push(a))}Object.assign(i,{upArrow:{obj:o},limitValue:{obj:a,top:-z}})}(R,u,T,X),function(i,l,r,a,u){let p,f;const{pointAttr:h={},lineAttr:g={},title:v="",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);i&&j&&!l.breakpoint&&(!w&&!E||O)&&i[0]!==j[0]&&(f=n([...i,...j],{...g}));const I=l.pacemakerShow&&"pulse"==c?y.value:w&&"number"===Y?0:x,T=C[r-1],R={origin:{data:l,title:v,key:m||"",unit:s.unit,type:c,_type:d(v,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 i&&(R.leftLine=null,p=o(I,{left:i[0],top:w?i[1]-5:i[1],...R}));C.push(f),p&&(v.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,n;null==(t=e.leftLine)||t.setCoords().set({x2:e.left,y2:e.top}),null==(n=e.rightLine)||n.setCoords().set({x1:e.left,y1:e.top}),Object.values(e.otherObj).forEach((t=>{const{obj:n,type:i="",top:o=0,isFixed:l}=t||{};"reduce"!==i&&("line"===i?null==n||n.setCoords().set({x1:e.left,y1:e.top}):!l&&(null==n||n.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,n=$(t,e.top),i={...e.origin,data:{...e.origin.data,value:n}};L.value.discardActiveObject(),S("change",i),pe(i,"change")}}))}(p),A.push(p),ne.add(p))}(R,u,b,T,X)})),"pulse"===c&&U.forEach((e=>{Z.set(e,A.filter((t=>{var n;return(null==(n=t.origin)?void 0:n.key)===e})).map((e=>[e.left,e.top])))})),Promise.all(A).then((e=>{const t=C.filter((e=>e));let n=null;e=e.map((e=>(e&&n&&(n.nextPoint=e,e.prevPoint=n),n=e||n,e))),Promise.all(I).then((n=>{L.value.add(...t,...e,...n),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:n,unit:i,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}${i||""}`;if(p(s))return`物理降${"pain"==o?"痛":"温"} ${a}—>${s}${i||""}`;return`${n} ${a}${i||""}`}(),`时间 ${((null==l?void 0:l.time)||M(e.left)).slice(-5)}`],P.show=!0}function ue(e,t){const n="pain"===t.type?B:q;if(f(e)&&function(e){const[t]=X,n=X.at(-1),i=t.start,o=n.end,l=h(e);return l>=i&&l<=o}(e.time)){const i=Y(e.time),o=E(t.type,t.list,e.value);return[i,o<n.originY?n.originY:o>n.endY?n.endY:o]}}function ce(e){const t=new Date,n=String(t.getMonth()+1).padStart(2,"0"),i=String(t.getDate()).padStart(2,"0"),o=h(`${t.getFullYear()}-${n}-${i} 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:n,dataIndex:i,index:o,data:l,key:r}=e,s=ie.find((e=>e.type===n));if("add"===t){const e=a(n)?s.dataList.find((e=>e.enable)):s.dataList[i],t=g(l.time,e.list);e.list.splice(t,0,l)}else s.dataList[i].list[o]=l;de()}function de(){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]))),Z.clear(),ne.clear(),ee.clear(),te.clear(),ie.forEach((e=>{e.dataList.forEach(((t,n)=>{a(e.type)&&!t.enable||re(t,n,e)}))})),oe(),le()}return Z.clear(),ee.clear(),te.clear(),ie.forEach((e=>{!function(e){if("temperature"!==e.type||!e.positionLine)return;const t=E(e.type,e.list,e.positionLine.value),i=n([D,t,V,t],e.positionLine);L.value.add(i)}(e),e.dataList.forEach(((t,n)=>{a(e.type)&&!t.enable||re(t,n,e)}))})),oe(),le(),k.event.evented&&L.value.on("mouse:up",(e=>{var t;if(3===e.button){const{x:n=0,y:i=0}=e.pointer||{};if(n>=D&&n<=V&&i>=_&&i<=G){A.point={x:n,y:i},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([...ne],n,"_type").includes(t.bigType)){const n=["pain"].includes(t.bigType)?B:q;i>=n.originY&&i<=n.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(n);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:n,type:i,dataIndex:o,index:l}=t.origin,r=v(n,[...x,...b]);r[`${e.type}`]=e.value,a(i)&&(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:ne}}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 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 g,deleteProperty as v}from"../../utils/index.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 g=Math.max(a[1],u[1]);r.push([a,u].find((e=>e[1]===g)));const v=()=>{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))),v()}}else p?(l.push(p),v()):f?(r.push(f),v()):v()})),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:g={},reduceStyle:v={},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",...g}),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,...v.line,...n}),j=o((null==(y=null==v?void 0:v.point)?void 0:y.type)||"circle",{left:e[0],top:l,...v.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:g={},title:v="",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],{...g}));const I=l.pacemakerShow&&"pulse"==c?y.value:w&&"number"===Y?0:x,T=C[r-1],R={origin:{data:l,title:v,key:m||"",unit:s.unit,type:c,_type:d(v,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&&(v.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=g(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=v(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 +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{getScaleInfo as a,drawScaleNumber as
|
|
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{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 g(g,p,d,f,m,y,v,w,S,Y,b,x){var j,X;const{getEqualXTypes:C,handleAddPrevent:N,isGridLimit:T}=c(g,d,p),{originY:V,endY:k,originX:L,endX:M,xCellWidth:W,yCellHeight:E,left:G,vitalSignsOriginY:O,painOriginY:A,painHeight:H,iconsWidth:I,itemList:R,painIndex:_,right:B,canvasWidth:J,canvasHeight:$,getRightInfo:q,borderStyle:D}=p;function P(o){var s;if(!(null==o?void 0:o.length))return;const{layout:r}=o[0];let c=I,p=L;"right"===r&&(c=M,p=M+(null!=(s=null==B?void 0:B.width)?s:0));const d=[],f=H&&"right"!==r?o.length-1:o.length,m=(p-c)/f,y=m+(p-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:p,style:d,title:f}=n,m=l({width:L-I,height:H,...D},{value:`${f}`,...i,...d||{}},{left:I,top:A.originY}),y=e([I,A.originY,L,A.originY],D),v=[];if(r||h){const{lineXMain:e,textLeft:i}=a(c,I,L-I),l=o.length;o.forEach(((o,a)=>{let c=A.endY-a*E*s;if(0===a&&(c=k-5),!h||(0===a||a===l-1)&&!p||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)}}))}g.value.add(y,m,...v),m.sendToBack()}(o);const p=[],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&&p.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*E*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}),p.push(e)}p.push(...h(o,s,t,e,r,E,O.originY))}))}let V=o.title||"";o.unit&&(V+="\n"+o.unit),V&&p.push(new t.Text(String(V),{...i,left:b,top:O.originY+E*j/2,textAlign:"center",...o.style}));const M=new t.Group(p,{...n,objectCaching:!1});d.push(M)}));const v=d.length>0?new t.Group([...d],{...n,objectCaching:!1}):null;v&&g.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},...p.event}});var u;e-=l.height||30,(u=a).on("moving",(()=>{u.set("originX","center"),function(t){if(t.left>=L&&t.left<=M){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)})),g.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),g.value.add(new t.Rect({left:I,top:0,width:J-I-D.strokeWidth,height:$-D.strokeWidth,fill:"transparent",...D})),{drawScaleValue:P}}export{g 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"vue";import"./useShadow.js";function i(i,n,o){const{other:l,vitalSignsOriginY:r,xCellWidth:s,yCellHeight:a,endX:c}=n;let
|
|
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"vue";import"./useShadow.js";import"naive-ui";function i(i,n,o){const{other:l,vitalSignsOriginY:r,xCellWidth:s,yCellHeight:a,endX:c}=n;let u=0;function h(i,n,o){const l=[];String(i.value).split("").forEach(((n,o)=>{const r=new t.Text(n,{left:0,top:a*o,originX:"center",...e,objectCaching:!1,...i.style||{}});u=(a-(r.height||0))/2,l.push(r)}));const r={originX:"center",left:n,top:o+u,baseTop:(i.baseTop||0)*a,trueLeft:n,trueHeight:l.length*a,objectCaching:!1};return new t.Group(l,r)}!function(){if(!(null==l?void 0:l.list))return!1;const n=[],u=[];l.list.forEach(((t,e)=>{const i=0===e?"vertical":t.align||"vertical",n=o(t.time,!0);if(n>c)return;const l=u.find((t=>t.left==n));if(l)l[i].push(t);else{const e={left:n,vertical:[],horizontal:[]};e[i].push(t),u.push(e)}})),u.forEach((t=>{let e=r.originY,i=t.left;t.vertical.forEach(((o,l)=>{var c,u;const f=(o.baseTop||0)*a,g=(null==(c=n.at(-1))?void 0:c.left)||0;0===l&&t.left<=g&&(i=g+s);if(n.filter((t=>t.trueLeft===i)).length){const t=String(o.value).length*a,l=(null==(u=n.at(-1))?void 0:u.trueHeight)||0;e+=l,e+t+f>r.endY&&(e=r.originY,i+=s)}e+=f,String(o.value).length&&n.push(h(o,i,e))})),t.horizontal.forEach(((e,o)=>{var l;const c=r.originY+(e.baseTop||0)*a,u=(null==(l=n.at(-1))?void 0:l.left)||0;t.left<=u&&(i=u+s),String(e.value).length&&n.push(h(e,i,c))}))}));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{useTop as c}from"./useTop.js";import{useLeft as
|
|
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 +1 @@
|
|
|
1
|
-
import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{drawLine as e,defaultStyle as l,drawTextGroup as
|
|
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"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};
|
|
@@ -166,6 +166,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
166
166
|
method?: import("..").FormRequestType | undefined;
|
|
167
167
|
nameKey?: string | undefined;
|
|
168
168
|
valueKey?: string | undefined;
|
|
169
|
+
showKey?: string | undefined;
|
|
169
170
|
params?: import("../../../es/shared/types").AnyObject | undefined;
|
|
170
171
|
dependKey?: string | Record<string, string> | (string | {
|
|
171
172
|
paramName: string;
|
|
@@ -204,6 +205,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
204
205
|
suffix?: string | import("../../../es/shared/types").AnyObject | (() => any) | undefined;
|
|
205
206
|
allowSlash?: boolean | undefined;
|
|
206
207
|
allowModify?: "0" | "1" | undefined;
|
|
208
|
+
show_key?: string | undefined;
|
|
207
209
|
bordered?: string | boolean | undefined;
|
|
208
210
|
fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
|
|
209
211
|
content?: string | import("..").FormRenderer | Record<string, import("..").FormRenderer> | undefined;
|
|
@@ -1896,6 +1898,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
1896
1898
|
method?: import("..").FormRequestType | undefined;
|
|
1897
1899
|
nameKey?: string | undefined;
|
|
1898
1900
|
valueKey?: string | undefined;
|
|
1901
|
+
showKey?: string | undefined;
|
|
1899
1902
|
params?: import("../../../es/shared/types").AnyObject | undefined;
|
|
1900
1903
|
dependKey?: string | Record<string, string> | (string | {
|
|
1901
1904
|
paramName: string;
|
|
@@ -1934,6 +1937,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
1934
1937
|
suffix?: string | import("../../../es/shared/types").AnyObject | (() => any) | undefined;
|
|
1935
1938
|
allowSlash?: boolean | undefined;
|
|
1936
1939
|
allowModify?: "0" | "1" | undefined;
|
|
1940
|
+
show_key?: string | undefined;
|
|
1937
1941
|
bordered?: string | boolean | undefined;
|
|
1938
1942
|
fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
|
|
1939
1943
|
content?: string | import("..").FormRenderer | Record<string, import("..").FormRenderer> | undefined;
|
|
@@ -3635,6 +3639,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
3635
3639
|
method?: import("..").FormRequestType | undefined;
|
|
3636
3640
|
nameKey?: string | undefined;
|
|
3637
3641
|
valueKey?: string | undefined;
|
|
3642
|
+
showKey?: string | undefined;
|
|
3638
3643
|
params?: import("../../../es/shared/types").AnyObject | undefined;
|
|
3639
3644
|
dependKey?: string | Record<string, string> | (string | {
|
|
3640
3645
|
paramName: string;
|
|
@@ -3673,6 +3678,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
3673
3678
|
suffix?: string | import("../../../es/shared/types").AnyObject | (() => any) | undefined;
|
|
3674
3679
|
allowSlash?: boolean | undefined;
|
|
3675
3680
|
allowModify?: "0" | "1" | undefined;
|
|
3681
|
+
show_key?: string | undefined;
|
|
3676
3682
|
bordered?: string | boolean | undefined;
|
|
3677
3683
|
fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
|
|
3678
3684
|
content?: string | import("..").FormRenderer | Record<string, import("..").FormRenderer> | undefined;
|
|
@@ -5365,6 +5371,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
5365
5371
|
method?: import("..").FormRequestType | undefined;
|
|
5366
5372
|
nameKey?: string | undefined;
|
|
5367
5373
|
valueKey?: string | undefined;
|
|
5374
|
+
showKey?: string | undefined;
|
|
5368
5375
|
params?: import("../../../es/shared/types").AnyObject | undefined;
|
|
5369
5376
|
dependKey?: string | Record<string, string> | (string | {
|
|
5370
5377
|
paramName: string;
|
|
@@ -5403,6 +5410,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
5403
5410
|
suffix?: string | import("../../../es/shared/types").AnyObject | (() => any) | undefined;
|
|
5404
5411
|
allowSlash?: boolean | undefined;
|
|
5405
5412
|
allowModify?: "0" | "1" | undefined;
|
|
5413
|
+
show_key?: string | undefined;
|
|
5406
5414
|
bordered?: string | boolean | undefined;
|
|
5407
5415
|
fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
|
|
5408
5416
|
content?: string | import("..").FormRenderer | Record<string, import("..").FormRenderer> | undefined;
|
|
@@ -8087,6 +8095,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
8087
8095
|
method?: import("..").FormRequestType | undefined;
|
|
8088
8096
|
nameKey?: string | undefined;
|
|
8089
8097
|
valueKey?: string | undefined;
|
|
8098
|
+
showKey?: string | undefined;
|
|
8090
8099
|
params?: import("../../../es/shared/types").AnyObject | undefined;
|
|
8091
8100
|
dependKey?: string | Record<string, string> | (string | {
|
|
8092
8101
|
paramName: string;
|
|
@@ -8125,6 +8134,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
8125
8134
|
suffix?: string | import("../../../es/shared/types").AnyObject | (() => any) | undefined;
|
|
8126
8135
|
allowSlash?: boolean | undefined;
|
|
8127
8136
|
allowModify?: "0" | "1" | undefined;
|
|
8137
|
+
show_key?: string | undefined;
|
|
8128
8138
|
bordered?: string | boolean | undefined;
|
|
8129
8139
|
fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
|
|
8130
8140
|
content?: string | import("..").FormRenderer | Record<string, import("..").FormRenderer> | undefined;
|
|
@@ -9828,6 +9838,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
9828
9838
|
method?: import("..").FormRequestType | undefined;
|
|
9829
9839
|
nameKey?: string | undefined;
|
|
9830
9840
|
valueKey?: string | undefined;
|
|
9841
|
+
showKey?: string | undefined;
|
|
9831
9842
|
params?: import("../../../es/shared/types").AnyObject | undefined;
|
|
9832
9843
|
dependKey?: string | Record<string, string> | (string | {
|
|
9833
9844
|
paramName: string;
|
|
@@ -9866,6 +9877,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
9866
9877
|
suffix?: string | import("../../../es/shared/types").AnyObject | (() => any) | undefined;
|
|
9867
9878
|
allowSlash?: boolean | undefined;
|
|
9868
9879
|
allowModify?: "0" | "1" | undefined;
|
|
9880
|
+
show_key?: string | undefined;
|
|
9869
9881
|
bordered?: string | boolean | undefined;
|
|
9870
9882
|
fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
|
|
9871
9883
|
content?: string | import("..").FormRenderer | Record<string, import("..").FormRenderer> | undefined;
|
|
@@ -11542,6 +11554,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
11542
11554
|
method?: import("..").FormRequestType | undefined;
|
|
11543
11555
|
nameKey?: string | undefined;
|
|
11544
11556
|
valueKey?: string | undefined;
|
|
11557
|
+
showKey?: string | undefined;
|
|
11545
11558
|
params?: import("../../../es/shared/types").AnyObject | undefined;
|
|
11546
11559
|
dependKey?: string | Record<string, string> | (string | {
|
|
11547
11560
|
paramName: string;
|
|
@@ -11580,6 +11593,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
11580
11593
|
suffix?: string | import("../../../es/shared/types").AnyObject | (() => any) | undefined;
|
|
11581
11594
|
allowSlash?: boolean | undefined;
|
|
11582
11595
|
allowModify?: "0" | "1" | undefined;
|
|
11596
|
+
show_key?: string | undefined;
|
|
11583
11597
|
bordered?: string | boolean | undefined;
|
|
11584
11598
|
fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
|
|
11585
11599
|
content?: string | import("..").FormRenderer | Record<string, import("..").FormRenderer> | undefined;
|
|
@@ -168,6 +168,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
168
168
|
method?: import("../../../../es/components/form-render").FormRequestType | undefined;
|
|
169
169
|
nameKey?: string | undefined;
|
|
170
170
|
valueKey?: string | undefined;
|
|
171
|
+
showKey?: string | undefined;
|
|
171
172
|
params?: import("../../../../es/shared/types").AnyObject | undefined;
|
|
172
173
|
dependKey?: string | Record<string, string> | (string | {
|
|
173
174
|
paramName: string;
|
|
@@ -206,6 +207,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
206
207
|
suffix?: string | import("../../../../es/shared/types").AnyObject | (() => any) | undefined;
|
|
207
208
|
allowSlash?: boolean | undefined;
|
|
208
209
|
allowModify?: "0" | "1" | undefined;
|
|
210
|
+
show_key?: string | undefined;
|
|
209
211
|
bordered?: string | boolean | undefined;
|
|
210
212
|
fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
|
|
211
213
|
content?: string | import("../../../../es/components/form-render").FormRenderer | Record<string, import("../../../../es/components/form-render").FormRenderer> | undefined;
|
|
@@ -1898,6 +1900,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1898
1900
|
method?: import("../../../../es/components/form-render").FormRequestType | undefined;
|
|
1899
1901
|
nameKey?: string | undefined;
|
|
1900
1902
|
valueKey?: string | undefined;
|
|
1903
|
+
showKey?: string | undefined;
|
|
1901
1904
|
params?: import("../../../../es/shared/types").AnyObject | undefined;
|
|
1902
1905
|
dependKey?: string | Record<string, string> | (string | {
|
|
1903
1906
|
paramName: string;
|
|
@@ -1936,6 +1939,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1936
1939
|
suffix?: string | import("../../../../es/shared/types").AnyObject | (() => any) | undefined;
|
|
1937
1940
|
allowSlash?: boolean | undefined;
|
|
1938
1941
|
allowModify?: "0" | "1" | undefined;
|
|
1942
|
+
show_key?: string | undefined;
|
|
1939
1943
|
bordered?: string | boolean | undefined;
|
|
1940
1944
|
fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
|
|
1941
1945
|
content?: string | import("../../../../es/components/form-render").FormRenderer | Record<string, import("../../../../es/components/form-render").FormRenderer> | undefined;
|
|
@@ -3637,6 +3641,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3637
3641
|
method?: import("../../../../es/components/form-render").FormRequestType | undefined;
|
|
3638
3642
|
nameKey?: string | undefined;
|
|
3639
3643
|
valueKey?: string | undefined;
|
|
3644
|
+
showKey?: string | undefined;
|
|
3640
3645
|
params?: import("../../../../es/shared/types").AnyObject | undefined;
|
|
3641
3646
|
dependKey?: string | Record<string, string> | (string | {
|
|
3642
3647
|
paramName: string;
|
|
@@ -3675,6 +3680,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3675
3680
|
suffix?: string | import("../../../../es/shared/types").AnyObject | (() => any) | undefined;
|
|
3676
3681
|
allowSlash?: boolean | undefined;
|
|
3677
3682
|
allowModify?: "0" | "1" | undefined;
|
|
3683
|
+
show_key?: string | undefined;
|
|
3678
3684
|
bordered?: string | boolean | undefined;
|
|
3679
3685
|
fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
|
|
3680
3686
|
content?: string | import("../../../../es/components/form-render").FormRenderer | Record<string, import("../../../../es/components/form-render").FormRenderer> | undefined;
|
|
@@ -5367,6 +5373,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5367
5373
|
method?: import("../../../../es/components/form-render").FormRequestType | undefined;
|
|
5368
5374
|
nameKey?: string | undefined;
|
|
5369
5375
|
valueKey?: string | undefined;
|
|
5376
|
+
showKey?: string | undefined;
|
|
5370
5377
|
params?: import("../../../../es/shared/types").AnyObject | undefined;
|
|
5371
5378
|
dependKey?: string | Record<string, string> | (string | {
|
|
5372
5379
|
paramName: string;
|
|
@@ -5405,6 +5412,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
5405
5412
|
suffix?: string | import("../../../../es/shared/types").AnyObject | (() => any) | undefined;
|
|
5406
5413
|
allowSlash?: boolean | undefined;
|
|
5407
5414
|
allowModify?: "0" | "1" | undefined;
|
|
5415
|
+
show_key?: string | undefined;
|
|
5408
5416
|
bordered?: string | boolean | undefined;
|
|
5409
5417
|
fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
|
|
5410
5418
|
content?: string | import("../../../../es/components/form-render").FormRenderer | Record<string, import("../../../../es/components/form-render").FormRenderer> | undefined;
|
|
@@ -8089,6 +8097,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
8089
8097
|
method?: import("../../../../es/components/form-render").FormRequestType | undefined;
|
|
8090
8098
|
nameKey?: string | undefined;
|
|
8091
8099
|
valueKey?: string | undefined;
|
|
8100
|
+
showKey?: string | undefined;
|
|
8092
8101
|
params?: import("../../../../es/shared/types").AnyObject | undefined;
|
|
8093
8102
|
dependKey?: string | Record<string, string> | (string | {
|
|
8094
8103
|
paramName: string;
|
|
@@ -8127,6 +8136,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
8127
8136
|
suffix?: string | import("../../../../es/shared/types").AnyObject | (() => any) | undefined;
|
|
8128
8137
|
allowSlash?: boolean | undefined;
|
|
8129
8138
|
allowModify?: "0" | "1" | undefined;
|
|
8139
|
+
show_key?: string | undefined;
|
|
8130
8140
|
bordered?: string | boolean | undefined;
|
|
8131
8141
|
fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
|
|
8132
8142
|
content?: string | import("../../../../es/components/form-render").FormRenderer | Record<string, import("../../../../es/components/form-render").FormRenderer> | undefined;
|
|
@@ -9830,6 +9840,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
9830
9840
|
method?: import("../../../../es/components/form-render").FormRequestType | undefined;
|
|
9831
9841
|
nameKey?: string | undefined;
|
|
9832
9842
|
valueKey?: string | undefined;
|
|
9843
|
+
showKey?: string | undefined;
|
|
9833
9844
|
params?: import("../../../../es/shared/types").AnyObject | undefined;
|
|
9834
9845
|
dependKey?: string | Record<string, string> | (string | {
|
|
9835
9846
|
paramName: string;
|
|
@@ -9868,6 +9879,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
9868
9879
|
suffix?: string | import("../../../../es/shared/types").AnyObject | (() => any) | undefined;
|
|
9869
9880
|
allowSlash?: boolean | undefined;
|
|
9870
9881
|
allowModify?: "0" | "1" | undefined;
|
|
9882
|
+
show_key?: string | undefined;
|
|
9871
9883
|
bordered?: string | boolean | undefined;
|
|
9872
9884
|
fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
|
|
9873
9885
|
content?: string | import("../../../../es/components/form-render").FormRenderer | Record<string, import("../../../../es/components/form-render").FormRenderer> | undefined;
|
|
@@ -11544,6 +11556,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
11544
11556
|
method?: import("../../../../es/components/form-render").FormRequestType | undefined;
|
|
11545
11557
|
nameKey?: string | undefined;
|
|
11546
11558
|
valueKey?: string | undefined;
|
|
11559
|
+
showKey?: string | undefined;
|
|
11547
11560
|
params?: import("../../../../es/shared/types").AnyObject | undefined;
|
|
11548
11561
|
dependKey?: string | Record<string, string> | (string | {
|
|
11549
11562
|
paramName: string;
|
|
@@ -11582,6 +11595,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
11582
11595
|
suffix?: string | import("../../../../es/shared/types").AnyObject | (() => any) | undefined;
|
|
11583
11596
|
allowSlash?: boolean | undefined;
|
|
11584
11597
|
allowModify?: "0" | "1" | undefined;
|
|
11598
|
+
show_key?: string | undefined;
|
|
11585
11599
|
bordered?: string | boolean | undefined;
|
|
11586
11600
|
fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
|
|
11587
11601
|
content?: string | import("../../../../es/components/form-render").FormRenderer | Record<string, import("../../../../es/components/form-render").FormRenderer> | undefined;
|
|
@@ -121,6 +121,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
121
121
|
method?: import("../../../../../es/components/form-render").FormRequestType | undefined;
|
|
122
122
|
nameKey?: string | undefined;
|
|
123
123
|
valueKey?: string | undefined;
|
|
124
|
+
showKey?: string | undefined;
|
|
124
125
|
params?: import("../../../../../es/shared/types").AnyObject | undefined;
|
|
125
126
|
dependKey?: string | Record<string, string> | (string | {
|
|
126
127
|
paramName: string;
|
|
@@ -159,6 +160,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
159
160
|
suffix?: string | import("../../../../../es/shared/types").AnyObject | (() => any) | undefined;
|
|
160
161
|
allowSlash?: boolean | undefined;
|
|
161
162
|
allowModify?: "0" | "1" | undefined;
|
|
163
|
+
show_key?: string | undefined;
|
|
162
164
|
bordered?: string | boolean | undefined;
|
|
163
165
|
fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
|
|
164
166
|
content?: string | import("../../../../../es/components/form-render").FormRenderer | Record<string, import("../../../../../es/components/form-render").FormRenderer> | undefined;
|
|
@@ -1862,6 +1864,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1862
1864
|
method?: import("../../../../../es/components/form-render").FormRequestType | undefined;
|
|
1863
1865
|
nameKey?: string | undefined;
|
|
1864
1866
|
valueKey?: string | undefined;
|
|
1867
|
+
showKey?: string | undefined;
|
|
1865
1868
|
params?: import("../../../../../es/shared/types").AnyObject | undefined;
|
|
1866
1869
|
dependKey?: string | Record<string, string> | (string | {
|
|
1867
1870
|
paramName: string;
|
|
@@ -1900,6 +1903,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
1900
1903
|
suffix?: string | import("../../../../../es/shared/types").AnyObject | (() => any) | undefined;
|
|
1901
1904
|
allowSlash?: boolean | undefined;
|
|
1902
1905
|
allowModify?: "0" | "1" | undefined;
|
|
1906
|
+
show_key?: string | undefined;
|
|
1903
1907
|
bordered?: string | boolean | undefined;
|
|
1904
1908
|
fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
|
|
1905
1909
|
content?: string | import("../../../../../es/components/form-render").FormRenderer | Record<string, import("../../../../../es/components/form-render").FormRenderer> | undefined;
|
|
@@ -3576,6 +3580,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3576
3580
|
method?: import("../../../../../es/components/form-render").FormRequestType | undefined;
|
|
3577
3581
|
nameKey?: string | undefined;
|
|
3578
3582
|
valueKey?: string | undefined;
|
|
3583
|
+
showKey?: string | undefined;
|
|
3579
3584
|
params?: import("../../../../../es/shared/types").AnyObject | undefined;
|
|
3580
3585
|
dependKey?: string | Record<string, string> | (string | {
|
|
3581
3586
|
paramName: string;
|
|
@@ -3614,6 +3619,7 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
3614
3619
|
suffix?: string | import("../../../../../es/shared/types").AnyObject | (() => any) | undefined;
|
|
3615
3620
|
allowSlash?: boolean | undefined;
|
|
3616
3621
|
allowModify?: "0" | "1" | undefined;
|
|
3622
|
+
show_key?: string | undefined;
|
|
3617
3623
|
bordered?: string | boolean | undefined;
|
|
3618
3624
|
fieldType?: import("@formily/json-schema").SchemaTypes | undefined;
|
|
3619
3625
|
content?: string | import("../../../../../es/components/form-render").FormRenderer | Record<string, import("../../../../../es/components/form-render").FormRenderer> | undefined;
|
|
@@ -28,9 +28,8 @@ export declare const SELECT: import("vue").DefineComponent<{
|
|
|
28
28
|
type: StringConstructor;
|
|
29
29
|
default: string;
|
|
30
30
|
};
|
|
31
|
-
|
|
31
|
+
showField: {
|
|
32
32
|
type: StringConstructor;
|
|
33
|
-
default: string;
|
|
34
33
|
};
|
|
35
34
|
allowCreate: BooleanConstructor;
|
|
36
35
|
shouldSave: BooleanConstructor;
|
|
@@ -123,9 +122,8 @@ export declare const SELECT: import("vue").DefineComponent<{
|
|
|
123
122
|
type: StringConstructor;
|
|
124
123
|
default: string;
|
|
125
124
|
};
|
|
126
|
-
|
|
125
|
+
showField: {
|
|
127
126
|
type: StringConstructor;
|
|
128
|
-
default: string;
|
|
129
127
|
};
|
|
130
128
|
allowCreate: BooleanConstructor;
|
|
131
129
|
shouldSave: BooleanConstructor;
|
|
@@ -210,6 +208,5 @@ export declare const SELECT: import("vue").DefineComponent<{
|
|
|
210
208
|
recentNum: number;
|
|
211
209
|
allowCreate: boolean;
|
|
212
210
|
useLoading: boolean;
|
|
213
|
-
aliasField: string;
|
|
214
211
|
shouldSave: boolean;
|
|
215
212
|
}>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,computed as l,inject as
|
|
1
|
+
import{defineComponent as e,computed as l,inject as o,useAttrs as t,ref as a,createVNode as u,mergeProps as n,toRaw as r,nextTick as s}from"vue";import{arrayed as i}from"../../../../../shared/utils/index.js";import{HelpCircleSharp as p}from"@vicons/ionicons5";import{cloneDeep as m,isArray as c,isString as d,isObject as v,omit as f}from"lodash-es";import{useCommonInjection as y,useSelectOptionProps as h}from"../../hooks/useCommonInjection.js";import{useComplexOptions as j,useComplexOptionsSpan as g}from"../../hooks/useComplexOptions.js";import{InjectionChangeContextCollector as b,InjectionFormUUID as S}from"../../constants/index.js";import"../../../index.js";import"@formily/core";import"@formily/path";import"@vue/shared";import"@vueuse/core";import{NSelect as C,NTooltip as k,NIcon as w,NTag as F}from"naive-ui";import"date-fns";import{assignUpdateValue as B,assignClearBindVisited as x,createVisitedSetter as O}from"../../utils/schema.js";import{useFormField as A}from"../../hooks/useFormField.js";import"../../../../../shared/utils/tapable/SyncHook.js";import"../../../../../shared/utils/tapable/SyncBailHook.js";import"../../../../../shared/utils/tapable/SyncWaterfallHook.js";import"../../../../../shared/utils/tapable/SyncLoopHook.js";import"../../../../../shared/utils/tapable/AsyncParallelHook.js";import"../../../../../shared/utils/tapable/AsyncParallelBailHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesBailHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesLoopHook.js";import"../../../../../shared/utils/tapable/AsyncSeriesWaterfallHook.js";import"../../hooks/useFormValidator.js";import{connect as H,mapProps as K}from"@formily/vue";import"./index.js";import{useUrlConfigOptions as L,useAutographOptions as P,useRecommendOptions as E,searchContentMatcher as R}from"../../hooks/useFormRenderOptions.js";const V=H(e({name:"FormSelect",props:{value:{type:[String,Array,Number]},lazyRequest:{type:Boolean,default:!0},requestCache:{type:Boolean,default:!0},options:{type:Array,default:()=>[]},onChange:{},labelField:{type:String,default:"text"},valueField:{type:String,default:"value"},showField:{type:String},allowCreate:Boolean,shouldSave:Boolean,allowModify:Boolean,urlConfig:{type:Object},autograph:{type:String},wordbook:{type:Object},recommend:{type:Boolean,default:!1},commonList:{type:Array},recentList:{type:Array},getRecommendInfo:{type:Function},commonNum:{type:Number,default:10},recentNum:{type:Number,default:10},recommendCache:{type:Boolean,default:!1},useLoading:{type:Boolean,default:!0},multiple:{type:Boolean}},emits:["update:value","postRecommend"],setup(e,{slots:B,emit:x}){const H=l({get:()=>e.value,async set(e){x("update:value",e),J(e)}}),K=l((()=>(e.multiple&&e.allowModify&&console.warn("多选模式下不支持allowModify"),!e.multiple&&e.allowModify))),{labelKey:V,valueKey:_,showKey:I,fetchData:N,searchContent:M,fullOptions:W,filterOptions:q,remoteOptions:U,loading:z}=e.urlConfig?L(e,H):P(e,H),{renderComplexOption:D,hasComplexOption:T}=j(e,H),{getRecommend:G,postRecommend:J,sortedOptions:Q}=E(e,q,x,V,_),{field:X,fieldKey:Y}=A();o(b).setContext(Y.value,(e=>({currentOption:m(function(e){const l=ne(W.value);return c(e)?function(e){const o=l.reduce(((e,l)=>(e[l[_.value]]=l,e)),{});return e.map((e=>o[e]))}(e):(o=e,l.find((e=>e[_.value]===o)));var o}(e))})));const Z=async(e="")=>(M.value=e,Promise.allSettled([N(e),G(e)])),{injectValueValidate:$,injectValueWatchFromEmpty:ee,injectValueBindKey:le}=y();ee(H,Z),$(H);const oe=le(H),{menuProps:te,nodeProps:ae}=h();function ue(e){const l=e[V.value];if(!l||!d(l))return"";const o=M.value?R(M.value,l):null,t=o?u("section",null,[o.map(((e,l)=>0!==l&&e?u("span",{style:{color:l%2==0?"var(--n-option-text-color-active)":""}},[e]):null))]):l;return e.desc?u("section",{style:{display:"flex",alignItems:"center",gap:"4px"}},[t,e.desc?u(k,null,{trigger:()=>u(w,{component:p},null),default:()=>e.desc}):null]):t}function ne(l){return e.allowCreate&&M.value&&!l.some((e=>e[V.value]===M.value))?[...l,{[V.value]:M.value,[_.value]:M.value,created:!0,shouldSave:e.shouldSave}]:l}const re=l((()=>ne(K.value?W.value:Q.value))),se=t(),ie=l((()=>{if(e.allowCreate)return H.value;const l=e.multiple&&c(H.value);return W.value.find((e=>l?H.value.includes(e[_.value]):e[_.value]===H.value))?H.value:null})),pe=a(!1);async function me(e){e&&await Z(),pe.value=e}let ce=null;async function de(e,l){H.value=e,ce&&v(l)&&K.value&&(ce.focus(),await s(),ce.value=l[V.value]||"",ce.dispatchEvent(new CustomEvent("input"))),U.value&&l&&i(l).forEach((e=>{if(!v(e))return;const l=e;l.created&&l.shouldSave&&U.value.push(f(r(l),["created","shouldSave"]))}))}const ve=o(S),{getSpan:fe}=g(),ye=O(X,(async e=>{var l,o;K.value&&(ce=e.target,ce&&H.value&&(await s(),ce.value=null!=(o=null==(l=W.value.find((e=>e[_.value]===H.value)))?void 0:l[V.value])?o:"",ce.dispatchEvent(new CustomEvent("input"))))}));function he(e){if(!K.value)return;if(ce=e.target,!ce)return;if(!ce.value)return H.value=null;const l=W.value.find((e=>e[V.value]===ce.value));l?H.value=l[_.value]:(M.value=ce.value,H.value=ce.value)}function je({option:l,handleClose:o}){var t;const a=null!=(t=I.value&&l[I.value])?t:l[V.value];return e.multiple?u(F,{closable:!0,onClose:e=>{e.stopPropagation(),o()}},{default:()=>a}):a}function ge(l){return u(C,n({key:oe.value,multiple:e.multiple,remote:!0,filterable:!0,loading:z.value,value:ie.value,onUpdateValue:de,"menu-props":te,"node-props":ae,labelField:V.value,valueField:_.value,options:re.value,onSearch:Z,show:pe.value,"onUpdate:show":me,onFocus:ye,onBlur:he,renderLabel:ue,renderTag:je},l,se),B)}return()=>{var e,l;if(!T.value)return ge();const o=null!=(l=null==(e=X.value.decoratorProps)?void 0:e.span)?l:6,t=fe(ve,X.value.address);return u("section",{class:"form-render__selectChildField",style:{"--column":t+o}},[ge({class:"form-render__selectChildFieldItem",style:{"--form-item-column":o}}),W.value.map((e=>D({option:e,value:H.value,valueKey:_.value,labelKey:V.value,childFieldStrategy:"checked",renderLabel:!1,attrs:{class:"form-render__selectChildFieldItem",style:{"--form-item-column":t}}})))])}}}),K({dataSource:"options"},B,x));export{V as SELECT};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{arrayed as e,deepOmit as o}from"../../../../shared/utils/index.js";import{cloneDeep as t,pick as n}from"lodash-es";import"../../index.js";import{parseNumberFromMaybeString as i,formRenderLog as r}from"../utils/index.js";import{useFieldNormalize as s}from"./useFieldNormalize.js";import{fieldKeyEscape as a,createLinebarId as p}from"../utils/schema.js";import{useFormValidator as l}from"./useFormValidator.js";import{transformDateFormat as c}from"../utils/business.js";function m(e,o){Object.assign(e["x-component-props"],{...n(o,["wordbook","autograph"])})}function d(e,o){Object.assign(e["x-component-props"],{...n(o,["urlConfig","wordbook"])})}function u(u){const{createValidatorSchema:f}=l(),
|
|
1
|
+
import{arrayed as e,deepOmit as o}from"../../../../shared/utils/index.js";import{cloneDeep as t,pick as n}from"lodash-es";import"../../index.js";import{parseNumberFromMaybeString as i,formRenderLog as r}from"../utils/index.js";import{useFieldNormalize as s}from"./useFieldNormalize.js";import{fieldKeyEscape as a,createLinebarId as p}from"../utils/schema.js";import{useFormValidator as l}from"./useFormValidator.js";import{transformDateFormat as c}from"../utils/business.js";function m(e,o){Object.assign(e["x-component-props"],{...n(o,["wordbook","autograph"])})}function d(e,o){Object.assign(e["x-component-props"],{...n(o,["urlConfig","wordbook"])})}function u(u){const{createValidatorSchema:f}=l(),_=e=>{var o;const t={name:e.val_key,type:null!=(o=e.fieldType)?o:"string",title:e.alias||e.name,"x-component":e.html_type,default:e.default_val,"x-component-props":{placeholder:e.placeholder,clearable:"0"===e.is_empty,...e.componentProps||{}},"x-content":e.slots,"x-display":"0"===e.is_show?"hidden":"visible","x-pattern":"0"===e.is_edit?"disabled":"editable","x-compile-omitted":["title","x-component-props","x-decorator-props"]};e.reactions&&(t["x-reactions"]=e.reactions),e.noDecorator||Object.assign(t,{"x-decorator":"FORM_ITEM","x-decorator-props":{fieldItem:e,span:2*(e.elem_width||3),showLabel:"1"!==e.hide_title,remark:e.remark,propertyKey:e.val_key,annotation:e.annotation,...e.decoratorProps||{}}});const n=f(e);return n&&(t["x-validator"]=n),"0"===e.is_null&&(t.required=!0),t},x=e=>{var o;const t=_(e);e.urlConfig?d(t,e):e.autograph&&m(t,e);const r=!!e.__multiple;return Object.assign(t["x-component-props"],{multiple:r,options:e.option||(null==(o=e.componentProps)?void 0:o.options),allowModify:"1"===e.allowModify,allowCreate:"1"===e.free_entry||!!t["x-component-props"].allowCreate||"1"===e.allowModify,shouldSave:"1"===e.save_free_entry,showField:e.show_key,maxTagCount:i(e.multi_select_value),...n(e,["lazyRequest","requestCache"])}),r&&(t.type="array"),t},h=e=>{const o=_(e);return Object.assign(o["x-component-props"],{options:e.option,childFieldStrategy:e.childFieldStrategy,vertical:e.__vertical}),e.urlConfig?d(o,e):e.autograph&&m(o,e),o},g=e=>{const t=_(e);return Object.assign(t["x-component-props"],{fieldItem:o(e,["reactions"])}),t},y=e=>({name:e.val_key,type:"void",title:e.alias||e.name,"x-component":"LINEBAR","x-display":"visible","x-component-props":{disabled:"1"===e.is_not_fold,id:p(e.val_key),show:"0"!==e.is_show,remark:e.remark}}),b=new Map([["LINEBAR",y],["LINE_BREAKS",e=>({name:e.val_key,type:"void",title:e.alias||e.name,"x-component":"LINE_BREAKS","x-component-props":{border:e.lineBreaksBorder},"x-display":"0"===e.is_show?"hidden":"visible"})],["INPUT",e=>{const o=_(e);return Object.assign(o["x-component-props"],{...n(e,["prefix","suffix"])}),o}],["TEXTAREA",e=>{const o=_(e);return Object.assign(o["x-component-props"],{rows:e.initialize_high||3}),o}],["INPUT_NUMBER",e=>{const o=_(e),{decimal_length:t,validate:n,allowSlash:i}=e;return i&&(o["x-component"]="INPUT_NUMBER_SLASH",o.type="string"),Object.assign(o["x-component-props"],{precision:null!=t?t:null==n?void 0:n.decimal_length,prefix:e.prefix,suffix:e.suffix}),o}],["SELECT",x],["REMOTE_SEARCH",x],["DATE",e=>{const o=_(e);return Object.assign(o["x-component-props"],{valueFormat:e.date_format,type:c(e.date_format),validate:e.validate}),o}],["LEVEL_SEARCH_CASCADER",e=>{const o=_(e);return Object.assign(o["x-component-props"],{...n(e,["wordbook","lazyRequest","autograph"])}),"1"===e.is_allow_check_mid&&e.allow_check_mid_level&&(o["x-component-props"].checkAbleLevel=+e.allow_check_mid_level),o}],["SEARCH_CASCADER",e=>{var o;const t=_(e);return Object.assign(t["x-component-props"],{urlConfig:e.urlConfig,depth:null==(o=e.wordbook)?void 0:o.level_num,options:e.option}),t}],["COMBINATION",e=>{const o=_(e);return o.type="array",!1!==e.jsonCombination&&(o["x-component"]="JSON_COMBINATION"),Object.assign(o["x-decorator-props"],{showLabel:!1,showFeedback:!1}),Object.assign(o["x-component-props"],{title:e.alias||e.name,maxGroupNum:e.maxGroupNum,properties:e.children||[],combinationItemDeletable:e.combinationItemDeletable}),o}],["RADIO",h],["CHECKBOX",h],["SWITCH",e=>{const o=_(e);return Object.assign(o["x-component-props"],{openDescription:e.open,closeDescription:e.close}),o}],["SLIDER",e=>{const o=_(e);return Object.assign(o["x-component-props"],{step:i(e.step_length),max:i(e.max_length),min:i(e.min_length),option:e.option}),o}],["COMPLEX",e=>{const o=_(e);Array.isArray(e.properties)&&r("COMPLEX控件的properties属性已经废弃, 请使用children作为替代, 在之后的版本中properties属性将不再支持");const t=Array.isArray(e.properties||e.children)?j(e.properties||e.children):{};return o.type=e.fieldType||"void",o.properties=t,Object.assign(o["x-decorator-props"],{showFeedback:!1}),Object.assign(o["x-component-props"],n(e,["wrapperStyle","display"])),o}]]),v=e=>{if(e.suffixConfig)return w(e);return(b.get(e.html_type)||g)(e)},w=o=>{if(!o.suffixConfig&&!o.prefixConfig)return v(o);const t=o.suffixConfig?e(o.suffixConfig):[],n=[...(o.prefixConfig?e(o.prefixConfig):[]).map((e=>({elem_width:o.elem_width,...e,hide_title:"1",is_show:"1"}))),{...o,is_show:"1",hide_title:"1",suffixConfig:void 0,prefixConfig:void 0},...t.map((e=>({elem_width:o.elem_width,...e,hide_title:"1",is_show:"1"})))],i=_(o),r=n.reduce(((e,o)=>e+2*(o.elem_width||3)),0);return Object.assign(i,{type:"void",name:a(n),title:o.alias||o.name,"x-component":"INPUT_GROUP","x-component-props":{span:r},"x-decorator-props":{...i["x-decorator-props"],showFeedback:!1,suffixFields:n.map((e=>e.val_key))},properties:j(n)}),i},{FieldNormalizeWaterfallHook:C,FieldListNormalizeWaterfallHook:O}=s();function j(o,n={column:9999}){let i=null;return O.call(t(o),n).reduce(((e,o,n)=>{var a;const p=null==(a=(o=C.call(o)).validate)?void 0:a.obj_type;return p&&u&&u.collect(p,t(o)),"LINEBAR"===o.html_type?(e[s(o)]=r(y(o),n),i=e[s(o)].properties={}):i?i[s(o)]=r(v(o),n):(i=null,e[s(o)]=r(v(o),n)),e}),{});function r(e,o){return e["x-index"]=o,e}function s(o){return o.suffixConfig?a([o,...e(o.suffixConfig)]):o.val_key}}return{schemaAdaptor:j}}export{u as useFieldListAdaptor};
|
|
@@ -19,6 +19,7 @@ export declare function useRecommendOptions(props: {
|
|
|
19
19
|
export declare function useUrlConfigOptions(props: {
|
|
20
20
|
labelField?: string;
|
|
21
21
|
valueField?: string;
|
|
22
|
+
showField?: string;
|
|
22
23
|
urlConfig?: UrlConfig;
|
|
23
24
|
options?: AnyObject[];
|
|
24
25
|
requestCache: boolean;
|
|
@@ -26,6 +27,7 @@ export declare function useUrlConfigOptions(props: {
|
|
|
26
27
|
}, valueRef: Ref): {
|
|
27
28
|
labelKey: import("vue").ComputedRef<string>;
|
|
28
29
|
loading: Ref<boolean>;
|
|
30
|
+
showKey: import("vue").ComputedRef<string | undefined>;
|
|
29
31
|
valueKey: import("vue").ComputedRef<string>;
|
|
30
32
|
remoteOptions: Ref<AnyObject[] | null>;
|
|
31
33
|
filterOptions: import("vue").ComputedRef<AnyObject[]>;
|
|
@@ -36,6 +38,7 @@ export declare function useUrlConfigOptions(props: {
|
|
|
36
38
|
export declare function useAutographOptions(props: Partial<{
|
|
37
39
|
labelField: string;
|
|
38
40
|
valueField: string;
|
|
41
|
+
showField: string;
|
|
39
42
|
requestCache: boolean;
|
|
40
43
|
wordbook: FormWordbook;
|
|
41
44
|
autograph: string;
|
|
@@ -43,6 +46,7 @@ export declare function useAutographOptions(props: Partial<{
|
|
|
43
46
|
options: AnyObject[];
|
|
44
47
|
}>, valueRef: Ref): {
|
|
45
48
|
labelKey: import("vue").ComputedRef<string>;
|
|
49
|
+
showKey: import("vue").ComputedRef<string | undefined>;
|
|
46
50
|
loading: Ref<boolean>;
|
|
47
51
|
remoteOptions: Ref<AnyObject[] | null>;
|
|
48
52
|
valueKey: import("vue").ComputedRef<string>;
|