cnhis-design-vue 3.1.48-beta.14 → 3.1.48-beta.16
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/base-search/index.d.ts +13 -0
- package/es/components/base-search/src/index.vue.d.ts +13 -0
- package/es/components/base-search/src/index.vue2.js +1 -1
- package/es/components/card-reader-sdk/src/cardReaderSDK.d.ts +5 -1
- package/es/components/card-reader-sdk/src/cardReaderSDK.js +1 -1
- package/es/components/card-reader-sdk/src/components/readCardDialog.vue.d.ts +19 -0
- package/es/components/card-reader-sdk/src/components/readCardDialog.vue2.js +1 -1
- package/es/components/card-reader-sdk/src/utils/readHealthCard.d.ts +6 -1
- package/es/components/card-reader-sdk/src/utils/readHealthCard.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 +7 -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/scale-view/index.d.ts +2 -0
- package/es/components/scale-view/src/ScaleView.vue.d.ts +2 -0
- package/es/components/scale-view/src/ScaleView.vue2.js +1 -1
- package/es/components/scale-view/src/components/EvaluateCountdown.vue.d.ts +2 -0
- package/es/components/scale-view/src/components/EvaluateCountdown.vue2.js +1 -1
- package/es/components/scale-view/src/components/formitem/r-datetime.js +1 -1
- package/es/components/scale-view/src/hooks/scaleview-init.js +1 -1
- package/es/components/scale-view/src/hooks/scaleview-submit.js +1 -1
- package/es/components/scale-view/src/utils/judge-types.d.ts +9 -1
- package/es/components/scale-view/src/utils/judge-types.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/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
- package/es/shared/utils/tapableLess.d.ts +0 -28
- package/es/shared/utils/tapableLess.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{drawTextGroup as e,defaultTextStyle as i,defaultStyle as n}from"../useDraw.js";import"date-fns";import"lodash-es";import"@vueuse/core";import"vue";import"./useShadow.js";
|
|
1
|
+
import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{drawTextGroup as e,defaultTextStyle as i,defaultStyle as n}from"../useDraw.js";import"date-fns";import"lodash-es";import"@vueuse/core";import"vue";import"./useShadow.js";function o(o,s){const{xScaleList:r,originX:a,endX:l,endY:c,xCellWidth:h,canvasWidth:d,canvasHeight:u,bottom:p,breathingHeight:g,iconsWidth:f,borderStyle:m}=s;!function(){var s,d,u;if(!g||!p){const e=new t.Line([f,c-1,l,c-1],m);return o.value.add(e),e.sendToBack(),!1}const v=g,b=(null==(s=p.breathing)?void 0:s.list)||[],w=[];let x=!0;r.forEach(((t,n)=>{const o=a+n*h;let s="";b.forEach(((e,i)=>{const n=new Date(e.time).getTime();n>=t&&n<+t+t.scaleCell&&(s=e.value)}));const r=x?{top:-(v/2-10)}:{top:v/2-10};s&&(x=!x);const l=e({width:h,height:v,...m},Object.assign({},{text:String(s),...i},s?r:{}),{left:o,top:c});w.push(l)}));const j=e({width:l,height:v,...m},{text:String((null==(d=p.breathing)?void 0:d.title)+(null==(u=p.breathing)?void 0:u.unit)),...i,left:-(l-a)/2},{left:0,top:c});w.push(j);const S=w.length>0?new t.Group([...w],{...n}):null;S&&S.sendToBack(),S&&o.value.add(S)}()}export{o as useBottom};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{fabric as e}from"../../../../../shared/utils/fabricjs/index.js";import{useShadow as t}from"./useShadow.js";import{drawLine as i,defaultStyle as n,drawPoint as o,drawText as l,drawArrow as s}from"../useDraw.js";import{useGrid as r}from"../useGrid.js";import"date-fns";import{isOneLine as a,getType as u,isOverlapPoint as d,isValidValue as c,setOtherType as p,isEffectiveNode as f,getTime as h,getIndex as v,deleteProperty as g}from"../../utils/index.js";import"@vueuse/core";import{useCommon as y}from"../useCommon.js";import"vue";import{cloneDeep as m}from"lodash-es";import"../../../../../shared/utils/index.js";import{TEMPERATURE_MENU as x,PAIN_MENU as b,OVERLAP as j}from"../../constants/index.js";function w(w,k,S,Y,E,$,M,P,O,A){r(w,k);const{getEqualXTypes:I,handleAddPrevent:T}=y(w,S,k),{createShadowLines:C}=t(),{left:R,xScaleList:X,xCellWidth:F,yCellHeight:z,originX:D,endX:V,originY:_,endY:G,itemList:H,event:q,vitalSignsOriginY:W,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 i;const o=ne.find((e=>"pulse"===e.type));if(o&&(null==(i=o.dataList)?void 0:i.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])}}(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],d=n[i-1],c=n[i+1],p=o[r-1],f=o[r+1];if(d&&p){if(d[0]!==p[0]){const e=Math.max(d[0],p[0]);l.push([d,p].find((t=>t[0]===e)))}}else d?l.push(d):p&&s.push(p);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(c&&f){if(c[0]!==f[0]){const e=Math.min(c[0],f[0]);l.push([c,f].find((t=>t[0]===e))),g()}}else c?(l.push(c),g()):f?(s.push(f),g()):g()})),e})().forEach((t=>{var i,l,s,r,a,u;const d=t.map((e=>({x:e[0],y:e[1]}))),c=new e.Polygon(d,{...n,...(null==(i=o.shadow)?void 0:i.style)||{}});if("slash"==(null==(l=o.shadow)?void 0:l.mode)){c.set({fill:"transparent",stroke:(null==(r=null==(s=o.shadow)?void 0:s.style)?void 0:r.stroke)||"#f00"});const e=C(t,null==(a=o.shadow)?void 0:a.style._angle,null==(u=o.shadow)?void 0:u.style.space);e.forEach((e=>{var t;Object.assign(e,{...n,...(null==(t=o.shadow)?void 0:t.style)||{}}),Q.add(e)})),w.value.add(...e)}Q.add(c),w.value.add(c)}))}}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&&d(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:d,riseStyle:f={},noRiseStyle:h={},verifiedStyle:v={},reduceStyle:g={},pacemaker:y={},upArrowStyle:m={},limitValueStyle:x={},nonePainPointStyle:b={},dataList:j=[]}=r,{type:Y,textStyle:$}=b,P=[],A=[],I=[];null==(u=e.list)||u.forEach(((u,b)=>{const T=a(d)?j.find((e=>e.key===u.key)):e,C=ue(u,r),R={};R.value=function(e,t,i){if(!(null==e?void 0:e.length)||!K.showValue)return;const{lineAttr:n={}}=i,o=e[1]<=W.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 I.push(s),{obj:s,top:-z}}(C,u,T),function(e,t,r,a,u){var p,y;if(!(null==e?void 0:e.length)||!["temperature","pain"].includes(d))return;const{lineAttr:m={}}=r,{value:x}=a;let b,j,w,k,S,Y;if(t.noRise&&h.show){const t=L(h)?E(u.type,u.list,35):e[1];if(h.text)w=l([e[0],L(h)?t:t+5],{value:h.text.split("").join("\n"),originY:"top",...h.style||{}}),I.push(w);else{const i=t+2*z;k=s([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(c(t.physicsReduce)||c(t.drugReduce)){const l=E(d,u.list,null!=(p=t.physicsReduce)?p: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:w,top:5,isFixed:L(h)},arrowGroup:{obj:k,top:2*z,isFixed:L(h)},riseText:{obj:S,top:(x?-z:0)-5},verifiedText:{obj:Y,top:(x?-z:0)-5},reducePoint:{obj:j,type:"reduce"}})}(C,u,T,R,r),function(e,t,i,n){if(!(null==e?void 0:e.length)||!["pulse"].includes(d))return;let o,a;const{upArrowShow:u=!1,limitValueShow:c=!1}=i;if(u&&+t.value>180){let t=e[1]-2.5*z,i=[e[1]-z/2,t];t<W.originY&&(t=e[1]+2.5*z,i=[t,e[1]+z/2]),o=s([e[0],i[0],i[1]],m,"up"),I.push(o)}if(c){const i={value:t.value,originX:"center",originY:"center",...x};if(+t.value>Math.max(...r.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(...r.list)&&(a=l([e[0],e[1]-z],i),I.push(a))}Object.assign(n,{upArrow:{obj:o},limitValue:{obj:a,top:-z}})}(C,u,T,R),function(n,l,s,a,u){let c,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(d,e.list[s].value),E=j&&re(d,b.value);!n||!j||l.breakpoint||L||E||n[0]===j[0]||(f=i([...n,...j],{...v}));const I=l.pacemakerShow&&"pulse"==d?y.value:L&&"number"===Y?0:x,T=A[s-1],C={origin:{data:l,title:g,key:m||"",unit:r.unit,type:d,_type:p(g,d),dataIndex:t,index:s},leftLine:T,rightLine:f,otherObj:u,lockMovementX:!0,...l.pacemakerShow&&"pulse"==d?y.style:h,...k.event.hovered?k.event.evented?{selectable:!0}:{selectable:!0,lockMovementY:!0}:k.event,...L?{selectable:!1,evented:!1,..."number"===Y?$:{}}:{}};if(T){const e=T.get("y2");c=o(I,{left:T.get("x2"),top:L?e-5:e,...C})}else n&&(C.leftLine=null,c=o(I,{left:n[0],top:L?n[1]-5:n[1],...C}));A.push(f),c&&(g.includes("脉搏")?ee.add(c):te.add(c),function(e){q.hovered&&(e.on("mouseover",(()=>{ae(e,"hover")})),e.on("mouseout",(()=>{O.show=!1})));if(e.lockMovementX&&e.lockMovementY)return;e.on("moving",(()=>{!function(e){e.setCoords();const t="pain"===e.origin.type?B:W;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),q.hovered&&ae(e)})),e.on("mouseup",(t=>{if(O.show=!1,1===t.button){const{type:t}=e.origin,i=M(t,e.top),n={...e.origin,data:{...e.origin.data,value:i}};w.value.discardActiveObject(),S("change",n),ce(n,"change")}}))}(c),P.push(c),ie.add(c))}(C,u,b,T,R)})),"pulse"===d&&U.forEach((e=>{Z.set(e,P.filter((t=>{var i;return(null==(i=t.origin)?void 0:i.key)===e})).map((e=>[e.left,e.top])))})),Promise.all(P).then((e=>{const t=A.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=>{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;O.point={x:e.left,y:e.top},O.list=[function(){const{drugReduce:s,physicsReduce:r}=l||{},a="hover"===t?l.value:M(o,e.top);if(c(s))return`药物降${"pain"==o?"痛":"温"} ${a}—>${s}${n||""}`;if(c(r))return`物理降${"pain"==o?"痛":"温"} ${a}—>${r}${n||""}`;return`${i} ${a}${n||""}`}(),`时间 ${((null==l?void 0:l.time)||$(e.left)).slice(-5)}`],O.show=!0}function ue(e,t){const i="pain"===t.type?B:W;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 de(e){const t=new Date,i=String(t.getMonth()+1).padStart(2,"0"),n=String(t.getDate()).padStart(2,"0"),o=h(`${t.getFullYear()}-${i}-${n} 23:59:59`),l=h(`${$(e)}:00`);return J&&l<h(J)?(T("exceedMin"),!1):!(l>o)||(T("exceedMax"),!1)}function ce(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;pe()}function pe(){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,V,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<=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(!I([...ie],i,"_type").includes(t.bigType)){const i=["pain"].includes(t.bigType)?B:W;n>=i.originY&&n<=i.endY&&A.list.push({renderItem:P?P(t):()=>t.title,origin:{title:t.title,unit:t.unit,type:u(t.bigType),dataIndex:t.dataIndex,key:t.key},pointer:e.pointer})}}));const t=de(i);t&&1!==A.list.length||(A.show=!1,1===A.list.length&&t&&T("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),ce(r,"change")}else{const t={data:{time:$(e.pointer.x),value:M(e.origin.type,e.pointer.y),...a(e.origin.type)?{key:e.origin.key}:{}},...e.origin};S("add",t),ce(t)}},setPopup:ae,isAddPoint:de,updateData:ce,redrawPoints:pe,gridPoints:ie}}function L(e){return"fixed"===e.position}export{w 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 d,isValidValue as c,setOtherType as p,isEffectiveNode as f,getTime as h,getIndex as v,deleteProperty as g}from"../../utils/index.js";import"@vueuse/core";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 w}from"../../constants/index.js";function j(j,k,S,Y,E,$,M,P,O,A){r(j,k);const{getEqualXTypes:I,handleAddPrevent:T}=y(j,S,k),{createShadowLines:C}=t(),{left:R,xScaleList:X,xCellWidth:F,yCellHeight:z,originX:D,endX:V,originY:_,endY:G,itemList:H,event:q,vitalSignsOriginY:W,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 i;const o=ne.find((e=>"pulse"===e.type));if(o&&(null==(i=o.dataList)?void 0:i.length)&&(Q.size&&j.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])}}(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],d=n[i-1],c=n[i+1],p=o[r-1],f=o[r+1];if(d&&p){if(d[0]!==p[0]){const e=Math.max(d[0],p[0]);l.push([d,p].find((t=>t[0]===e)))}}else d?l.push(d):p&&s.push(p);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(c&&f){if(c[0]!==f[0]){const e=Math.min(c[0],f[0]);l.push([c,f].find((t=>t[0]===e))),g()}}else c?(l.push(c),g()):f?(s.push(f),g()):g()})),e})().forEach((t=>{var i,l,s,r,a,u;const d=t.map((e=>({x:e[0],y:e[1]}))),c=new e.Polygon(d,{...n,...(null==(i=o.shadow)?void 0:i.style)||{}});if("slash"==(null==(l=o.shadow)?void 0:l.mode)){c.set({fill:"transparent",stroke:(null==(r=null==(s=o.shadow)?void 0:s.style)?void 0:r.stroke)||"#f00"});const e=C(t,null==(a=o.shadow)?void 0:a.style._angle,null==(u=o.shadow)?void 0:u.style.space);e.forEach((e=>{var t;Object.assign(e,{...n,...(null==(t=o.shadow)?void 0:t.style)||{}}),Q.add(e)})),j.value.add(...e)}Q.add(c),j.value.add(c)}))}}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({},w,R.overlap||{}),l=[];ee.size&&[...ee].forEach((e=>{[...te].forEach((t=>{if(t.origin&&d(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((()=>{j.value.add(...l),l.forEach((e=>{null==e||e.bringToFront(),ie.add(e)}))}))}function se(e,t,r){var u;const{type:d,riseStyle:f={},noRiseStyle:h={},verifiedStyle:v={},reduceStyle:g={},pacemaker:y={},upArrowStyle:m={},limitValueStyle:x={},nonePainPointStyle:b={},dataList:w=[]}=r,{type:Y,textStyle:$}=b,P=[],A=[],I=[];null==(u=e.list)||u.forEach(((u,b)=>{const T=a(d)?w.find((e=>e.key===u.key)):e,C=ue(u,r),R={};R.value=function(e,t,i){if(!(null==e?void 0:e.length)||!K.showValue)return;const{lineAttr:n={}}=i,o=e[1]<=W.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 I.push(s),{obj:s,top:-z}}(C,u,T),function(e,t,r,a,u){var p,y;if(!(null==e?void 0:e.length)||!["temperature","pain"].includes(d))return;const{lineAttr:m={}}=r,{value:x}=a;let b,w,j,k,S,Y;if(t.noRise&&h.show){const t=L(h)?E(u.type,u.list,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||{}}),I.push(j);else{const i=t+2*z;k=s([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(c(t.physicsReduce)||c(t.drugReduce)){const l=E(d,u.list,null!=(p=t.physicsReduce)?p:t.drugReduce);b=i([...e,e[0],l],{...m,...g.line,...n}),w=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),w&&I.push(w)}Object.assign(a,{reduceLine:{obj:b,type:"line"},noRiseText:{obj:j,top:5,isFixed:L(h)},arrowGroup:{obj:k,top:2*z,isFixed:L(h)},riseText:{obj:S,top:(x?-z:0)-5},verifiedText:{obj:Y,top:(x?-z:0)-5},reducePoint:{obj:w,type:"reduce"}})}(C,u,T,R,r),function(e,t,i,n){if(!(null==e?void 0:e.length)||!["pulse"].includes(d))return;let o,a;const{upArrowShow:u=!1,limitValueShow:c=!1}=i;if(u&&+t.value>180){let t=e[1]-2.5*z,i=[e[1]-z/2,t];t<W.originY&&(t=e[1]+2.5*z,i=[t,e[1]+z/2]),o=s([e[0],i[0],i[1]],m,"up"),I.push(o)}if(c){const i={value:t.value,originX:"center",originY:"center",...x};if(+t.value>Math.max(...r.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(...r.list)&&(a=l([e[0],e[1]-z],i),I.push(a))}Object.assign(n,{upArrow:{obj:o},limitValue:{obj:a,top:-z}})}(C,u,T,R),function(n,l,s,a,u){let c,f;const{pointAttr:h={},lineAttr:v={},title:g="",key:m,type:x="circle"}=a,b=e.list[s+1],w=ue(b,r),L=re(d,e.list[s].value),E=w&&re(d,b.value);!n||!w||l.breakpoint||L||E||n[0]===w[0]||(f=i([...n,...w],{...v}));const I=l.pacemakerShow&&"pulse"==d?y.value:L&&"number"===Y?0:x,T=A[s-1],C={origin:{data:l,title:g,key:m||"",unit:r.unit,type:d,_type:p(g,d),dataIndex:t,index:s},leftLine:T,rightLine:f,otherObj:u,lockMovementX:!0,...l.pacemakerShow&&"pulse"==d?y.style:h,...k.event.hovered?k.event.evented?{selectable:!0}:{selectable:!0,lockMovementY:!0}:k.event,...L?{selectable:!1,evented:!1,..."number"===Y?$:{}}:{}};if(T){const e=T.get("y2");c=o(I,{left:T.get("x2"),top:L?e-5:e,...C})}else n&&(C.leftLine=null,c=o(I,{left:n[0],top:L?n[1]-5:n[1],...C}));A.push(f),c&&(g.includes("脉搏")?ee.add(c):te.add(c),function(e){q.hovered&&(e.on("mouseover",(()=>{ae(e,"hover")})),e.on("mouseout",(()=>{O.show=!1})));if(e.lockMovementX&&e.lockMovementY)return;e.on("moving",(()=>{!function(e){e.setCoords();const t="pain"===e.origin.type?B:W;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),q.hovered&&ae(e)})),e.on("mouseup",(t=>{if(O.show=!1,1===t.button){const{type:t}=e.origin,i=M(t,e.top),n={...e.origin,data:{...e.origin.data,value:i}};j.value.discardActiveObject(),S("change",n),ce(n,"change")}}))}(c),P.push(c),ie.add(c))}(C,u,b,T,R)})),"pulse"===d&&U.forEach((e=>{Z.set(e,P.filter((t=>{var i;return(null==(i=t.origin)?void 0:i.key)===e})).map((e=>[e.left,e.top])))})),Promise.all(P).then((e=>{const t=A.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=>{j.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&&j.value.remove(e.leftLine),e.rightLine&&j.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;O.point={x:e.left,y:e.top},O.list=[function(){const{drugReduce:s,physicsReduce:r}=l||{},a="hover"===t?l.value:M(o,e.top);if(c(s))return`药物降${"pain"==o?"痛":"温"} ${a}—>${s}${n||""}`;if(c(r))return`物理降${"pain"==o?"痛":"温"} ${a}—>${r}${n||""}`;return`${i} ${a}${n||""}`}(),`时间 ${((null==l?void 0:l.time)||$(e.left)).slice(-5)}`],O.show=!0}function ue(e,t){const i="pain"===t.type?B:W;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 de(e){const t=new Date,i=String(t.getMonth()+1).padStart(2,"0"),n=String(t.getDate()).padStart(2,"0"),o=h(`${t.getFullYear()}-${i}-${n} 23:59:59`),l=h(`${$(e)}:00`);return J&&l<h(J)?(T("exceedMin"),!1):!(l>o)||(T("exceedMax"),!1)}function ce(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;pe()}function pe(){var e;ie.size&&(null==(e=j.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,V,t],e.positionLine);j.value.add(n)}(e),e.dataList.forEach(((t,i)=>{a(e.type)&&!t.enable||se(t,i,e)}))})),oe(),le(),k.event.evented&&j.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(!I([...ie],i,"_type").includes(t.bigType)){const i=["pain"].includes(t.bigType)?B:W;n>=i.originY&&n<=i.endY&&A.list.push({renderItem:P?P(t):()=>t.title,origin:{title:t.title,unit:t.unit,type:u(t.bigType),dataIndex:t.dataIndex,key:t.key},pointer:e.pointer})}}));const t=de(i);t&&1!==A.list.length||(A.show=!1,1===A.list.length&&t&&T("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),ce(r,"change")}else{const t={data:{time:$(e.pointer.x),value:M(e.origin.type,e.pointer.y),...a(e.origin.type)?{key:e.origin.key}:{}},...e.origin};S("add",t),ce(t)}},setPopup:ae,isAddPoint:de,updateData:ce,redrawPoints:pe,gridPoints:ie}}function L(e){return"fixed"===e.position}export{j 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"@vueuse/core";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";
|
|
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"@vueuse/core";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";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"@vueuse/core";import"vue";import"./useShadow.js";
|
|
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"@vueuse/core";import"vue";import"./useShadow.js";function i(i,n,o){const{other:r,vitalSignsOriginY:l,xCellWidth:s,yCellHeight:a,endX:c}=n;let u=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||{}});u=(a-(l.height||0))/2,r.push(l)}));const l={originX:"center",left:n,top:o+u,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=[],u=[];r.list.forEach(((t,e)=>{const i=0===e?"vertical":t.align||"vertical",n=o(t.time,!0);if(n>c)return;const r=u.find((t=>t.left==n));if(r)r[i].push(t);else{const e={left:n,vertical:[],horizontal:[]};e[i].push(t),u.push(e)}})),u.forEach((t=>{let e=l.originY,i=t.left;t.vertical.forEach(((o,r)=>{var c,u;const f=(o.baseTop||0)*a,g=(null==(c=n.at(-1))?void 0:c.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==(u=n.at(-1))?void 0:u.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 c=l.originY+(e.baseTop||0)*a,u=(null==(r=n.at(-1))?void 0:r.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{useEvent as n,useCanvasEvent as o}from"../useEvent.js";import{setOtherType as s,getFloorNumber as d}from"../../utils/index.js";import"lodash-es";import{format as v,addDays as c}from"date-fns";import
|
|
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{useEvent as n,useCanvasEvent as o}from"../useEvent.js";import{setOtherType as s,getFloorNumber as d}from"../../utils/index.js";import"lodash-es";import{format as v,addDays as c}from"date-fns";import{useTop as h}from"./useTop.js";import{useLeft as p}from"./useLeft.js";import{useRight as g}from"./useRight.js";import{useCenter as m}from"./useCenter.js";import{useBottom as f}from"./useBottom.js";import{useOther as y}from"./useOther.js";function Y(Y,S,b,w,C,x){const D=15,j=e(),V=e(),X=e(),H=t((()=>{const{top:e}=S.data;return e.date.show&&(e.date.height||D)||0})),L=t((()=>{var e;const{top:t}=S.data;return(null==(e=t.hospitalDays)?void 0:e.show)&&(t.hospitalDays.height||D)||0})),I=t((()=>{var e;const{top:t}=S.data;return(null==(e=t.operationDays)?void 0:e.show)&&(t.operationDays.height||D)||0})),M=t((()=>{var e,t,a;const{top:l}=S.data;return((null==(e=l.xScalevalue)?void 0:e.show)&&(l.xScalevalue.height||D)||0)+((null==(t=l.xScalevalue)?void 0:t.show)&&null!=(a=l.dayHeight)?a:0)})),P=t((()=>{var e;const{bottom:t}=S.data;return(null==(e=null==t?void 0:t.breathing)?void 0:e.show)&&(t.breathing.height||30)||0})),N=t((()=>{const{grid:e}=S.data;return e.mainXCell*e.subXCell+e.surplusXCell})),O=t((()=>{const{grid:e}=S.data;return e.mainYCell*e.subYCell+e.surplusYCell})),W=t((()=>{var e;const{width:t,right:a=null,top:l}=S.data;if(!a)return t;return t-(null!=(e=a.width)?e:0)})),$=t((()=>{const{grid:e}=S.data;return W.value-e.surplusXCell*z.value})),k=t((()=>{const{top:e,left:t}=S.data;return e.titleWidth+A.value})),G=t((()=>{const{bottom:e=null,height:t}=S.data;if(!e)return t;return t-(e.height||30)})),R=t((()=>{var e;const{top:t}=S.data,a=t.xScalevalue.show&&(null!=(e=t.dayHeight)?e:0)||0,l=t.xScalevalue.show&&(t.xScalevalue.height||D)||0;return H.value+a+l+L.value+I.value})),q=t((()=>{const{grid:e}=S.data;return R.value+e.surplusYCell*T.value})),z=t((()=>(W.value-k.value)/N.value)),T=t((()=>(G.value-R.value)/O.value)),A=t((()=>{var e,t;const{left:a}=S.data;return(null==(e=a.icons)?void 0:e.show)&&((null==(t=a.icons)?void 0:t.width)||100)||0})),B=t((()=>{var e,t;const{top:a,grid:l}=S.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=k.value-z.value;const n=a.date.startDate||v(new Date,"yyyy-MM-dd");return u.reduce(((e,t,a)=>0===a?e.concat(n):e.concat(v(c(new Date(n.replace(/-/g,"/")),a),"yyyy-MM-dd"))),[]).map((e=>i.map((t=>{r+=z.value;const a=Date.parse(`${e} ${t.start}`),l=Date.parse(`${e} ${t.end}`);return{start:a,end:l,left:r,center:r+z.value/2,scaleCell:(l-a)/z.value}})))).flat()})),E=t((()=>ie("breathe"))),F=t((()=>ie("pulse"))),J=t((()=>ie("temperature"))),K=t((()=>ie("pain"))),Q=t((()=>{var e;return(null==(e=S.data.grid)?void 0:e.event)||{selectable:!0,evented:!0,hovered:!0}})),U=t((()=>{const{left:e}=S.data;return e.yScaleValue.map((e=>e.dataList.filter((e=>e.show)).map(((t,a)=>({...t,bigType:s(t.title,e.type),unit:e.unit,dataIndex:a}))))).flat()})),Z=t((()=>{const{left:e}=S.data;return e.yScaleValue.findIndex((e=>"pain"===e.type))})),_=t((()=>{const{grid:e}=S.data;return-1===Z.value?0:T.value*e.subYCell})),ee=t((()=>{const{left:e}=S.data,t={originY:G.value,endY:G.value};return 0===Z.value&&e.yScaleValue.length>1?(t.originY=q.value,t.endY=q.value+_.value):Z.value===e.yScaleValue.length-1&&(t.originY=G.value-_.value,t.endY=G.value),t})),te=t((()=>{const{left:e}=S.data,t={originY:R.value,endY:G.value};return 0===Z.value&&e.yScaleValue.length>1?(t.originY=q.value+_.value,t.endY=G.value):Z.value===e.yScaleValue.length-1&&(t.originY=q.value,t.endY=G.value-_.value),t})),ae=t((()=>{var e,t;const{top:a,grid:l}=S.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))})),le=t((()=>{var e;const{left:t,right:a}=S.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=>d(1.8*e+32))),spaceGridNumber:l.spaceGridNumber}),u})),ue=a({canvasWidth:S.data.width,canvasHeight:S.data.height,borderStyle:{...i,...S.data.borderStyle||{}},selectionStyle:S.data.selectionStyle||{},dateHeight:H.value,hospitalDaysHeight:L.value,operationDaysHeight:I.value,xScalevalueHeight:M.value,topList:ae.value,breathingHeight:P.value,hospitalizationDate:S.data.hospitalizationDate,grid:S.data.grid,top:S.data.top,left:S.data.left,right:S.data.right,bottom:S.data.bottom,other:S.data.other,painIndex:Z.value,painHeight:_.value,painOriginY:ee.value,vitalSignsOriginY:te.value,gridXNumber:N.value,gridYNumber:O.value,iconsWidth:A.value,originX:k.value,originY:R.value,originYLimit:q.value,endX:W.value,endXLimit:$.value,endY:G.value,xCellWidth:z.value,yCellHeight:T.value,xScaleList:B.value,breatheYCell:E.value,pulseYCell:F.value,temperatureYCell:J.value,painYCell:K.value,event:Q.value,itemList:U.value,getRightInfo:le.value,config:S.data.config||{}});function ie(e){const{yScaleValue:t}=S.data.left,a=t.find((t=>t.type===e)),l=(null==a?void 0:a.list)||[];return l.length?T.value/((l[1]-l[0])/a.spaceGridNumber):0}const{cumputedX:re,cumputedY:ne,getXValue:oe,getYValue:se}=r(ue);return l((()=>{u((()=>{h(Y,ue);const{setPopup:e,isAddPoint:t,updateData:a,redrawPoints:l,clickMenu:u,gridPoints:i}=m(Y,ue,b,re,ne,oe,se,S.addRenderItem,C,x);V.value=l,X.value=u;const{drawScaleValue:r}=p(Y,ue,b,e,C,re,ne,oe,se,t,a,i);g(Y,ue,r),f(Y,ue),y(Y,ue,re),n(w.value);const{select:s}=o(Y,ue,b);j.value=s}))})),{propItems:ue,redrawPoints:V,select:j,clickMenu:X}}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 s,defaultTextStyle as i}from"../useDraw.js";import"date-fns";import"lodash-es";import"@vueuse/core";import"vue";import"./useShadow.js";
|
|
1
|
+
import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{drawLine as e,defaultStyle as l,drawTextGroup as s,defaultTextStyle as i}from"../useDraw.js";import"date-fns";import"lodash-es";import"@vueuse/core";import"vue";import"./useShadow.js";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=s({width:d,height:u,...m},{value:c,...i,...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=s({width:n-f,height:d,...m},{value:p.xScalevalue.title,...i,...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=s({width:c,height:v,...m},{value:u.value,...i,...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=s({width:n-f,height:a,...m},{value:t.title,...i,...(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=s({width:p,height:a,...m},{value:u,...i,...(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};
|
|
@@ -451,6 +451,8 @@ declare const CScaleView: SFCWithInstall<import("vue").DefineComponent<{
|
|
|
451
451
|
}>> & {
|
|
452
452
|
onCloseEvaluateCountdown?: ((...args: any[]) => any) | undefined;
|
|
453
453
|
}>>;
|
|
454
|
+
useFormArray: import("vue").ComputedRef<unknown[]>;
|
|
455
|
+
curShowTotalLen: import("vue").ComputedRef<number>;
|
|
454
456
|
calcShowEvaluateCountdown: import("vue").ComputedRef<boolean>;
|
|
455
457
|
toggleIcon: import("vue").ComputedRef<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<{}>>, {}>>;
|
|
456
458
|
hasEva: import("vue").ComputedRef<unknown>;
|
|
@@ -449,6 +449,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
449
449
|
}>> & {
|
|
450
450
|
onCloseEvaluateCountdown?: ((...args: any[]) => any) | undefined;
|
|
451
451
|
}>>;
|
|
452
|
+
useFormArray: import("vue").ComputedRef<unknown[]>;
|
|
453
|
+
curShowTotalLen: import("vue").ComputedRef<number>;
|
|
452
454
|
calcShowEvaluateCountdown: import("vue").ComputedRef<boolean>;
|
|
453
455
|
toggleIcon: import("vue").ComputedRef<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<{}>>, {}>>;
|
|
454
456
|
hasEva: import("vue").ComputedRef<unknown>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,reactive as o,ref as a,watch as t,nextTick as s,openBlock as n,createElementBlock as i,normalizeClass as l,unref as r,createCommentVNode as m,Fragment as u,createBlock as c,mergeProps as d,createElementVNode as p,normalizeStyle as v,createVNode as f,withCtx as g,renderList as h,toDisplayString as k,createTextVNode as y,resolveDynamicComponent as w}from"vue";import S from"./hooks/use-noData.js";import{ScaleViewProps as b}from"./hooks/scaleview-props.js";import{getScaleViewState as C}from"./hooks/scaleview-state.js";import{ScaleViewComputed as D}from"./hooks/scaleview-computed.js";import{ScaleViewInit as E}from"./hooks/scaleview-init.js";import{ScaleViewSubmit as j}from"./hooks/scaleview-submit.js";import{ScaleViewMethods as _}from"./hooks/scaleview-methods.js";import{handleQueryParams as x,isCollection as P}from"./utils/judge-types.js";import{useEvent as q}from"./hooks/use-event.js";import"xe-utils";import"moment";import F from"../../../shared/utils/vexutilsExpand.js";import L from"./components/NoData.vue.js";import N from"./components/EvaluateCountdown.vue.js";import R from"./components/EvaluatePage.vue.js";import T from"./components/AnswerParse.vue.js";import A from"./components/ScaleScore.js";import{NForm as M,NFormItem as O,NButton as I}from"naive-ui";const J=["innerHTML"],V={key:0,class:"required-text"},G={key:1,class:"evalute-label"},W=["onClick"],B=p("i",{class:"scale-view-iconfont icon-scale-view-dengpao"},null,-1),H={key:1,class:"footer"};var Q=e({__name:"ScaleView",props:b,emits:["onCloseSetting","submitNoRequest","onSubmit","startWriteScale"],setup(e,{expose:b,emit:Q}){const z=e,{ScaleViewState:K}=C(),U=o(K),X=a(null),Y=a(null),{noDataState:Z,setNoData:$,resetNodata:ee}=S(),oe=x(),{showEvatip:ae,isFormBoldOpen:te,scaleStyle:se,handlePageClass:ne,isShowItem:ie,handleShowQuestionNumber:le,hasScore:re,isPreviewScale:me,showEvaluateEntry:ue,showEvaluateCoundownPage:ce,showSaveBtn:de,showEvaluateLabel:pe,showAnswerParse:ve,propsConfig:fe,evaluatePageProps:ge,evaluateCountdownProps:he,isEvaluetaResSituation:ke,disableEdit:ye}=D(z,U,{query:oe}),{initForm:we}=E(z,U,Q,{query:oe}),{submitMethod:Se,onSubmitData:be,onSubmitForm:Ce,handleScoreJson:De}=j(z,U,Q,{query:oe,formRef:Y,countdownDom:X}),{nextLogicEvent:Ee,handleDynamicDataRelation:je}=q(z,U),{scaleChange:_e,labelChange:xe,vodFileList:Pe,writeGuage:qe,closeEvaluateCountdown:Fe,showEvaTipModal:Le}=_(z,U,Q,{nextLogicEvent:Ee,handleDynamicDataRelation:je,isPreviewScale:me,submitMethod:Se,isEvaluetaResSituation:ke,handleScoreJson:De,disableEdit:ye});(()=>{let{id:e}=oe;e&&(U.shareId=e)})();const Ne=e=>{try{ee(),we(e)}catch(e){console.log(e,"--error"),U.spinning=!1,U.hasFrontAddress=!1,$(!0,null==e?void 0:e.resultMsg,null==e?void 0:e.result)}};t((()=>z.ids),((e,o)=>{o?e.guage_id&&e.guage_id!=o.guage_id&&Ne(e):e.guage_id&&Ne(e)}),{immediate:!0}),t((()=>z.guageData),(e=>{if(!e||!Object.keys(e||{}).length)return;U.form={},U.formArray=[];const o=JSON.parse(JSON.stringify(e));s((()=>{we(o)}))}),{immediate:!0});const Re=F.debounce(be,300),Te=()=>{Q("onCloseSetting")};return b({getScaleData:()=>({...U}),onSubmitForm:Ce,cancel:Te}),(e,o)=>(n(),i("div",{class:l(["c-scale-view-block",{"c-scale-view-block-hasfooter":r(de)}])},[m(' <template v-if="state.spinning">\n <n-spin :show="state.spinning" description="加载中"></n-spin>\n </template> '),U.spinning||U.hasFrontAddress?m("v-if",!0):(n(),i(u,{key:0},[r(Z).noData?(n(),c(L,{key:0,noDataImg:r(Z).noDataImg,noDataTip:r(Z).noDataTip},null,8,["noDataImg","noDataTip"])):(n(),i(u,{key:1},[r(ue)?(n(),c(R,d({key:0},r(ge),{onWriteGuage:r(qe)}),null,16,["onWriteGuage"])):(n(),i(u,{key:1},[r(ce)?(n(),c(N,d({key:0,ref_key:"countdownDom",ref:X},r(he),{onCloseEvaluateCountdown:r(Fe)}),null,16,["onCloseEvaluateCountdown"])):m("v-if",!0),p("div",{class:l(["scale-container",{"scale-container-nopadding":r(ne),"scale-container-hasfooter":r(de)}]),style:v(r(se))},[r(re)?(n(),c(r(A),{key:0,config:U.config,maxScore:U.maxScore},null,8,["config","maxScore"])):m("v-if",!0),f(r(M),{ref_key:"formRef",ref:Y,model:U.form,rules:U.rules,"require-mark-placement":"left",class:"main"},{default:g((()=>[(n(!0),i(u,null,h(U.formArray,((e,o)=>(n(),i(u,{key:(e.id||e.seq)+o},[r(ie)(e)?(n(),c(r(O),{key:0,path:e.val_key,"show-label":!r(P)(e.type),class:"c-scle-form-item"},{label:g((()=>[p("span",{class:l({"scale-label-required":r(te)(e)}),innerHTML:r(le)(e)},null,10,J),r(te)(e)?(n(),i("span",V,"(必填)")):m("v-if",!0),r(pe)(e)?(n(),i("span",G,k(r(pe)(e)),1)):m("v-if",!0),r(ae)(e)?(n(),i("span",{key:2,class:"evalute-tip",onClick:o=>r(Le)(e)},[B,y(" 查看提示 ")],8,W)):m("v-if",!0)])),default:g((()=>[(n(),c(w(e.renderCom),d(r(fe)(e,o),{key:(e.id||e.seq)+o,onScaleChange:r(_e),onOnChange:o=>r(xe)(o,e),onVodFileList:r(Pe)}),null,16,["onScaleChange","onOnChange","onVodFileList"])),r(ve)(e)?(n(),c(T,{key:0,item:e},null,8,["item"])):m("v-if",!0)])),_:2},1032,["path","show-label"])):m("v-if",!0)],64)))),128))])),_:1},8,["model","rules"])],6),r(de)?(n(),i("div",H,[m(" 分享的链接 隐藏取消按钮 "),"guage"!==z.sourceType?(n(),c(r(I),{key:0,onClick:Te},{default:g((()=>[y("取消")])),_:1})):m("v-if",!0),z.isLock?m("v-if",!0):(n(),c(r(I),{key:1,onClick:r(Re),disabled:U.banSubmit,type:"primary"},{default:g((()=>[y(" 保存 ")])),_:1},8,["onClick","disabled"]))])):m("v-if",!0)],64))],64))],64))],2))}});export{Q as default};
|
|
1
|
+
import{defineComponent as e,reactive as o,ref as a,watch as t,nextTick as s,openBlock as n,createElementBlock as i,normalizeClass as l,unref as r,createCommentVNode as m,Fragment as u,createBlock as c,mergeProps as d,createElementVNode as p,normalizeStyle as v,createVNode as f,withCtx as g,renderList as h,toDisplayString as k,createTextVNode as y,resolveDynamicComponent as w}from"vue";import S from"./hooks/use-noData.js";import{ScaleViewProps as b}from"./hooks/scaleview-props.js";import{getScaleViewState as C}from"./hooks/scaleview-state.js";import{ScaleViewComputed as D}from"./hooks/scaleview-computed.js";import{ScaleViewInit as E}from"./hooks/scaleview-init.js";import{ScaleViewSubmit as j}from"./hooks/scaleview-submit.js";import{ScaleViewMethods as _}from"./hooks/scaleview-methods.js";import{handleQueryParams as x,isCollection as P}from"./utils/judge-types.js";import{useEvent as q}from"./hooks/use-event.js";import"xe-utils";import"moment";import F from"../../../shared/utils/vexutilsExpand.js";import L from"./components/NoData.vue.js";import N from"./components/EvaluateCountdown.vue.js";import R from"./components/EvaluatePage.vue.js";import T from"./components/AnswerParse.vue.js";import A from"./components/ScaleScore.js";import{NForm as M,NFormItem as O,NButton as I}from"naive-ui";const J=["innerHTML"],V={key:0,class:"required-text"},G={key:1,class:"evalute-label"},W=["onClick"],B=p("i",{class:"scale-view-iconfont icon-scale-view-dengpao"},null,-1),H={key:1,class:"footer"};var Q=e({__name:"ScaleView",props:b,emits:["onCloseSetting","submitNoRequest","onSubmit","startWriteScale"],setup(e,{expose:b,emit:Q}){const z=e,{ScaleViewState:K}=C(),U=o(K),X=a(null),Y=a(null),{noDataState:Z,setNoData:$,resetNodata:ee}=S(),oe=x(),{showEvatip:ae,isFormBoldOpen:te,scaleStyle:se,handlePageClass:ne,isShowItem:ie,handleShowQuestionNumber:le,hasScore:re,isPreviewScale:me,showEvaluateEntry:ue,showEvaluateCoundownPage:ce,showSaveBtn:de,showEvaluateLabel:pe,showAnswerParse:ve,propsConfig:fe,evaluatePageProps:ge,evaluateCountdownProps:he,isEvaluetaResSituation:ke,disableEdit:ye}=D(z,U,{query:oe}),{initForm:we}=E(z,U,Q,{query:oe}),{submitMethod:Se,onSubmitData:be,onSubmitForm:Ce,handleScoreJson:De}=j(z,U,Q,{query:oe,formRef:Y,countdownDom:X}),{nextLogicEvent:Ee,handleDynamicDataRelation:je}=q(z,U),{scaleChange:_e,labelChange:xe,vodFileList:Pe,writeGuage:qe,closeEvaluateCountdown:Fe,showEvaTipModal:Le}=_(z,U,Q,{nextLogicEvent:Ee,handleDynamicDataRelation:je,isPreviewScale:me,submitMethod:Se,isEvaluetaResSituation:ke,handleScoreJson:De,disableEdit:ye});(()=>{let{id:e}=oe;e&&(U.shareId=e)})();const Ne=e=>{try{ee(),we(e)}catch(e){console.log(e,"--error"),U.spinning=!1,U.hasFrontAddress=!1,$(!0,null==e?void 0:e.resultMsg,null==e?void 0:e.result)}};t((()=>z.ids),((e,o)=>{o?e.guage_id&&e.guage_id!=o.guage_id&&Ne(e):e.guage_id&&Ne(e)}),{immediate:!0}),t((()=>z.guageData),(e=>{if(!e||!Object.keys(e||{}).length)return;U.form={},U.formArray=[];const o=JSON.parse(JSON.stringify(e));s((()=>{we(o)}))}),{immediate:!0});const Re=F.debounce(be,300),Te=()=>{Q("onCloseSetting")};return b({getScaleData:()=>({...U}),onSubmitForm:Ce,cancel:Te}),(e,o)=>(n(),i("div",{class:l(["c-scale-view-block",{"c-scale-view-block-hasfooter":r(de)}])},[m(' <template v-if="state.spinning">\r\n <n-spin :show="state.spinning" description="加载中"></n-spin>\r\n </template> '),U.spinning||U.hasFrontAddress?m("v-if",!0):(n(),i(u,{key:0},[r(Z).noData?(n(),c(L,{key:0,noDataImg:r(Z).noDataImg,noDataTip:r(Z).noDataTip},null,8,["noDataImg","noDataTip"])):(n(),i(u,{key:1},[r(ue)?(n(),c(R,d({key:0},r(ge),{onWriteGuage:r(qe)}),null,16,["onWriteGuage"])):(n(),i(u,{key:1},[r(ce)?(n(),c(N,d({key:0,ref_key:"countdownDom",ref:X},r(he),{onCloseEvaluateCountdown:r(Fe)}),null,16,["onCloseEvaluateCountdown"])):m("v-if",!0),p("div",{class:l(["scale-container",{"scale-container-nopadding":r(ne),"scale-container-hasfooter":r(de)}]),style:v(r(se))},[r(re)?(n(),c(r(A),{key:0,config:U.config,maxScore:U.maxScore},null,8,["config","maxScore"])):m("v-if",!0),f(r(M),{ref_key:"formRef",ref:Y,model:U.form,rules:U.rules,"require-mark-placement":"left",class:"main"},{default:g((()=>[(n(!0),i(u,null,h(U.formArray,((e,o)=>(n(),i(u,{key:(e.id||e.seq)+o},[r(ie)(e)?(n(),c(r(O),{key:0,path:e.val_key,"show-label":!r(P)(e.type),class:"c-scle-form-item"},{label:g((()=>[p("span",{class:l({"scale-label-required":r(te)(e)}),innerHTML:r(le)(e)},null,10,J),r(te)(e)?(n(),i("span",V,"(必填)")):m("v-if",!0),r(pe)(e)?(n(),i("span",G,k(r(pe)(e)),1)):m("v-if",!0),r(ae)(e)?(n(),i("span",{key:2,class:"evalute-tip",onClick:o=>r(Le)(e)},[B,y(" 查看提示 ")],8,W)):m("v-if",!0)])),default:g((()=>[(n(),c(w(e.renderCom),d(r(fe)(e,o),{key:(e.id||e.seq)+o,onScaleChange:r(_e),onOnChange:o=>r(xe)(o,e),onVodFileList:r(Pe)}),null,16,["onScaleChange","onOnChange","onVodFileList"])),r(ve)(e)?(n(),c(T,{key:0,item:e},null,8,["item"])):m("v-if",!0)])),_:2},1032,["path","show-label"])):m("v-if",!0)],64)))),128))])),_:1},8,["model","rules"])],6),r(de)?(n(),i("div",H,[m(" 分享的链接 隐藏取消按钮 "),"guage"!==z.sourceType?(n(),c(r(I),{key:0,onClick:Te},{default:g((()=>[y("取消")])),_:1})):m("v-if",!0),z.isLock?m("v-if",!0):(n(),c(r(I),{key:1,onClick:r(Re),disabled:U.banSubmit,type:"primary"},{default:g((()=>[y(" 保存 ")])),_:1},8,["onClick","disabled"]))])):m("v-if",!0)],64))],64))],64))],2))}});export{Q as default};
|
|
@@ -83,6 +83,8 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
83
83
|
}>> & {
|
|
84
84
|
onCloseEvaluateCountdown?: ((...args: any[]) => any) | undefined;
|
|
85
85
|
}>>;
|
|
86
|
+
useFormArray: import("vue").ComputedRef<unknown[]>;
|
|
87
|
+
curShowTotalLen: import("vue").ComputedRef<number>;
|
|
86
88
|
calcShowEvaluateCountdown: import("vue").ComputedRef<boolean>;
|
|
87
89
|
toggleIcon: import("vue").ComputedRef<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<{}>>, {}>>;
|
|
88
90
|
hasEva: import("vue").ComputedRef<unknown>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,reactive as t,computed as a,onMounted as o,watch as
|
|
1
|
+
import{defineComponent as e,reactive as t,computed as a,onMounted as o,watch as l,openBlock as n,createElementBlock as s,normalizeClass as r,unref as u,createBlock as i,createCommentVNode as d,createElementVNode as c,toDisplayString as v,createTextVNode as f,Fragment as w,normalizeStyle as m}from"vue";import{NIcon as p}from"naive-ui";import{ChevronUpSharp as y,ChevronDownSharp as S}from"@vicons/ionicons5";import"xe-utils";import b from"moment";import C from"../../../../shared/utils/vexutilsExpand.js";import{useEvaluate as g}from"../hooks/use-evaluate.js";const h=c("i",{class:"scale-view-iconfont icon-scale-view-shijian"},null,-1),R={class:"answered-wrap"},j={class:"answered-num"},E={class:"answered-blod"},A={class:"answered-blue"},O={class:"answered-blod"},k={class:"answered-blue"},T={key:0};var x=e({__name:"EvaluateCountdown",props:{formArray:{type:Array,default:()=>[]},evaluateResultConfig:{type:Object,default:()=>({})},evaluateResultSetting:{type:Object,default:()=>({})},form:{type:Object,default:()=>({})},currentTime:{default:(new Date).getTime()},showEvaluateCountdown:{type:Boolean,default:!1},isEvaluetaResSituation:{type:Boolean,default:!1},evaResultObj:{type:Object,default:()=>({})},skipCover:{type:Boolean,default:!1}},emits:["closeEvaluateCountdown"],setup(e,{expose:x,emit:L}){const _=e,B=t({source:"countdown",setAnswered:0,unfold:!0,answeredScore:0,totalScore:0,answeredRes:"",answeredColor:"#212121"}),U=a((()=>_.formArray.filter((e=>!z.filterArr.includes(e.type)&&!e.hide&&e.isShow)))),V=a((()=>{var e;return null==(e=U.value)?void 0:e.length})),D=a((()=>_.showEvaluateCountdown&&!_.skipCover)),N=a((()=>B.unfold?y:S)),W=a((()=>_.formArray.find((e=>e.type.includes("EVALUATE_"))))),q=a((()=>!!W.value&&(_.isEvaluetaResSituation&&B.unfold))),{evaluateState:z,evaluateStartTime:F,showCountdown:G,getTotalLen:H,countdown:I,clearTimer:J}=g(_,B,{emit:L}),K=e=>{if(!W.value||!_.isEvaluetaResSituation)return;let{evaluateResultColor:t,evaluateResult:a,totalScore:o}=e;if(B.answeredScore=o||0,!a)return B.answeredRes="",void(B.answeredColor="#212121");t&&"string"==typeof t&&t.startsWith("#")||(t="#212121"),B.answeredRes=a,B.answeredColor=t},M=()=>{W.value&&(()=>{let e=0,t=_.formArray.filter((e=>e.type.includes("EVALUATE_")));if(!t.length)return B.totalScore=e,e;t.forEach((t=>{var a;const o=t.scoreConfigs?+(null==(a=t.scoreConfigs)?void 0:a.maxScore):0;e=C.add(e,o)})),B.totalScore=e})(),H();let{evaluateTime:e}=_.evaluateResultSetting;if(!G.value||!e||!D.value)return;let t=(F.value?b(F.value):b()).add(e,"minutes");J(),I(t)},P=()=>{B.unfold=!B.unfold};o((()=>{M()})),l((()=>_.form),(e=>{(e||Object.keys(e).length)&&(e=>{if(!U.value||!U.value.length)return;let t={};U.value.forEach((a=>{const o=a.databaseTitle||a.title;t[o]=e[o]}));let a=0;for(let e in t){let l=t[e],n=(o=l,Object.prototype.toString.call(o));"[object Object]"==n?l&&Object.keys(l).length&&a++:"[object Array]"==n?l&&l.length&&a++:"[object Number]"==n?(l||0===l)&&a++:l&&a++}var o;B.setAnswered=a})(e)}),{immediate:!0,deep:!0}),l((()=>_.evaResultObj),(e=>{(e||Object.keys(e).length)&&K(e)}),{immediate:!0,deep:!0});return x({getCountdownObj:()=>({setAnswered:B.setAnswered,totalLen:V.value})}),(e,t)=>(n(),s("div",{class:r(["c-evaluateCountdown",{"evaluateCountdown-hasTime":u(D),"evaluateCountdown-EvaluetaResSituation":_.isEvaluetaResSituation}])},[_.isEvaluetaResSituation?(n(),i(u(p),{key:0,class:"evaluate-toggle-icon",component:u(N),onClick:P},null,8,["component"])):d("v-if",!0),u(D)?(n(),s("div",{key:1,class:r(["countdown",{"countdown-red":u(z).countdownRed}])},[c("span",null,v(u(z).countdownStr),1),h],2)):d("v-if",!0),c("div",R,[c("div",j,[f(" 作答数量:"),c("span",E,v(B.setAnswered),1),f("/"),c("span",A,v(u(V)),1)]),u(q)?(n(),s(w,{key:0},[c("div",null,[f("作答分数:"),c("span",O,v(B.answeredScore),1),f("/"),c("span",k,v(B.totalScore),1)]),B.answeredRes?(n(),s("div",T,[f("作答结果:"),c("span",{style:m({color:B.answeredColor})},v(B.answeredRes),5)])):d("v-if",!0)],64)):d("v-if",!0)])],2))}});export{x as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,
|
|
1
|
+
import{defineComponent as e,reactive as t,computed as a,createVNode as r,resolveComponent as l,createTextVNode as u}from"vue";import{NTimePicker as n,NDatePicker as i}from"naive-ui";import"xe-utils";import o from"moment";import s from"../../../../../shared/utils/vexutilsExpand.js";import{formatMap as d,valueReg as m,transDbvalueFormat as c}from"../../utils/judge-types.js";var v=e({name:"RDatetime",components:{NTimePicker:n,NDatePicker:i},props:{form:{type:Object,default:()=>({})},item:{type:Object,default:()=>({})},isLock:{type:Boolean,default:!1}},emits:["scaleChange"],setup(e,n){var i,v,f,p,g;const y=null==(i=e.item)?void 0:i.type,D=null==(f=null==(v=e.item)?void 0:v.setting)?void 0:f.startToStop,b="DATE"===y?"date":null==(g=null==(p=e.item)?void 0:p.setting)?void 0:g.dateType,V=t({rangeValue:[null,null],dateValue:null,calcDateType:""}),k=a((()=>V.calcDateType||b)),N=a((()=>d[k.value]||"yyyy-MM-dd")),h=a((()=>"datehour"===k.value?"datetime":k.value)),w=a((()=>"datehour"===k.value?"HH:mm":"HH:mm:ss")),H=a((()=>"datetime"==k.value||"datehour"==k.value?"datetimerange":"daterange")),M=e=>["time","hour"].includes(e),T=(e,t)=>{const a=o(e,t).valueOf();let r=e;1==D&&["time","hour"].includes(k.value)&&(r=a);return s.isValidDate(new Date(a))?r:null},S=t=>{var a,r;const l=m[k.value];if(V.calcDateType="",!t||"object"==typeof t)return null;const u=null==(a=N.value)?void 0:a.replace(/yyyy/,"YYYY").replace(/dd/,"DD");if(t&&l.test(t))return T(t,u);const n=(e=>{let t="";for(const a in m)if(m[a].test(e)){t=a;break}return t})(t);if(e.isLock&&n){V.calcDateType=n;const e=null==(r=N.value)?void 0:r.replace(/yyyy/,"YYYY").replace(/dd/,"DD");return T(t,e)}const i=c.get(n);if(!(null==i?void 0:i.length)||!i.includes(k.value))return null;if("time"===k.value&&"hour"==n){t=`${o().format("yyyy-MM-DD")} ${t}`}const s=o(t).format(u);return T(s,u)},U=e=>{const t=V.rangeValue[1];if(!t)return!1;return e>Number(new Date(t).getHours())},Y=(e,t)=>{if(null===t)return!1;const a=V.rangeValue[1];if(!a)return!1;const r=Number(new Date(a).getHours()),l=Number(new Date(a).getMinutes());return!(t<r)&&e>l},A=(e,t,a)=>{if(null===a||null===t)return!1;const r=V.rangeValue[1];if(!r)return!1;const l=Number(new Date(r).getHours()),u=Number(new Date(r).getMinutes()),n=Number(new Date(r).getSeconds());return!(a<l)&&(!(t<u)&&e>=n)},L=e=>{const t=V.rangeValue[0];if(!t)return!1;return e<Number(new Date(t).getHours())},O=(e,t)=>{if(null===t)return!1;const a=V.rangeValue[0];if(!a)return!1;const r=Number(new Date(a).getHours()),l=Number(new Date(a).getMinutes());return!(t>r)&&e<l},j=(e,t,a)=>{if(null===a||null===t)return!1;const r=V.rangeValue[0];if(!r)return!1;const l=Number(new Date(r).getHours()),u=Number(new Date(r).getMinutes()),n=Number(new Date(r).getSeconds());return!(a>l)&&(!(t>u)&&e<=n)},E=(t,a,r)=>{const l="start"===r?1:0;let u=V.rangeValue[l];u&&(u=o(u).format(N.value)),"start"!==r?n.emit("scaleChange",[u||"",a],e.item):n.emit("scaleChange",[a,u||""],e.item)},x=(t,a)=>{n.emit("scaleChange",a,e.item)};return(e=>{if(s.isJSON(e)&&(e=JSON.parse(e)),!e||s.isEmpty(e))return;const t=JSON.parse(JSON.stringify(e)),a=(e=>{if(1==D&&!Array.isArray(e))return null;if(1!=D&&"string"!=typeof e)return null;if(e&&Array.isArray(e))return e.length&&2==e.length?[S(e[0]),S(e[1])]:null;return S(e)})(e);if("TIME"===y||M(k.value)){if(1!=D)return void(V.dateValue=a);if(!Array.isArray(t)||!t.length)return;V.rangeValue=a}else V.dateValue=a})(e.form[e.item.val_key]),()=>{return"TIME"===y||M(k.value)?1==D?r("div",{class:"c-time-range"},[r(l("n-time-picker"),{value:V.rangeValue[0],"onUpdate:value":[e=>V.rangeValue[0]=e,(e,t)=>E(0,t,"start")],clearable:!0,disabled:e.isLock,format:N.value,isHourDisabled:U,isMinuteDisabled:Y,isSecondDisabled:A},null),u(" - "),r(l("n-time-picker"),{value:V.rangeValue[1],"onUpdate:value":[e=>V.rangeValue[1]=e,(e,t)=>E(0,t,"end")],clearable:!0,disabled:e.isLock,format:N.value,isHourDisabled:L,isMinuteDisabled:O,isSecondDisabled:j},null)]):r(l("n-time-picker"),{"formatted-value":V.dateValue,"onUpdate:formatted-value":e=>V.dateValue=e,clearable:!0,disabled:e.isLock,"onUpdate:value":x,format:N.value},null):(t=k.value,["date","datetime","datehour"].includes(t)&&1==D?r(l("n-date-picker"),{"formatted-value":V.dateValue,"onUpdate:formatted-value":e=>V.dateValue=e,type:H.value,clearable:!0,disabled:e.isLock,format:N.value,"time-picker-props":{format:w.value},"onUpdate:value":x,"default-time":["00:00:00","23:59:59"]},null):r(l("n-date-picker"),{"formatted-value":V.dateValue,"onUpdate:formatted-value":e=>V.dateValue=e,type:h.value,clearable:!0,disabled:e.isLock,format:N.value,"time-picker-props":{format:w.value},"onUpdate:value":x},null));var t}}});export{v as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{handleQueryParams as e,getQueryVariable as t,formatMap as a}from"../utils/judge-types.js";import i from"./use-noData.js";import"xe-utils";import n from"moment";import s from"../../../../shared/utils/vexutilsExpand.js";import{componentMap as l}from"./use-component.js";import{useEvent as r}from"./use-event.js";import{ScaleViewComputed as o}from"./scaleview-computed.js";import{ScaleViewValidate as u}from"./scaleview-validate.js";import{useDialog as v}from"naive-ui";const c=(c,f,d,p)=>{const m=n(),g=v(),{setNoData:S}=i(),{hasEvaluateResultSetting:E,hasparamsEvaluate:y,hasDefault:C,formKey:O}=o(c,f,p),{formatRules:A}=u(c,f,p),{nextLogicEvent:R}=r(c,f),h=e=>{const t=null==e?void 0:e.evaluateStartTime;t&&!s.isValidDate(new Date(t))&&s.isValidDate(new Date(Number(t)))&&(e.evaluateStartTime=Number(t))},
|
|
1
|
+
import{handleQueryParams as e,getQueryVariable as t,formatMap as a}from"../utils/judge-types.js";import i from"./use-noData.js";import"xe-utils";import n from"moment";import s from"../../../../shared/utils/vexutilsExpand.js";import{componentMap as l}from"./use-component.js";import{useEvent as r}from"./use-event.js";import{ScaleViewComputed as o}from"./scaleview-computed.js";import{ScaleViewValidate as u}from"./scaleview-validate.js";import{useDialog as v}from"naive-ui";const c=(c,f,d,p)=>{const m=n(),g=v(),{setNoData:S}=i(),{hasEvaluateResultSetting:E,hasparamsEvaluate:y,hasDefault:C,formKey:O}=o(c,f,p),{formatRules:A}=u(c,f,p),{nextLogicEvent:R}=r(c,f),h=e=>{const t=null==e?void 0:e.evaluateStartTime;t&&!s.isValidDate(new Date(t))&&s.isValidDate(new Date(Number(t)))&&(e.evaluateStartTime=Number(t))},T=()=>{var t;if(!E.value)return!!C.value&&("evaluateResultSetting"in f.config||(f.config.evaluateResultSetting={}),(t=>{let a=e();if(y.value&&(a=f.paramsEvaluate),a.evaname&&(t.evaluateName=a.evaname),a.evadesc&&(t.evaluateExplain=a.evadesc),a.evast&&(t.evaluateStartTime=a.evast),a.evadur&&(t.evaluateTime=a.evadur),a.evaan){const e="true"===a.evaan||1==a.evaan;t.evaluateAnswer=e}if(a.evasit&&(t.evaluetaResSituation=!!a.evasit),a.evaztip){const e=1==a.evaan;t.evaluateZeroTip=e}h(t)})(f.config.evaluateResultSetting),f.showEvaluatePage=!0,void(f.showEvaluateCountdownWrap=!0));const{evaluateResultSetting:a={}}=f.config;if(!a||!Object.keys(a).length)return;f.showEvaluateCountdownWrap=!0;const{evaluateStartTime:i}=a,{evaluateName:n}=(null==(t=f.originConfig)?void 0:t.evaluateResultSetting)||{};if(i)return!(!s.isValidDate(new Date(i))&&!n)&&void(f.showEvaluatePage=!0);f.showEvaluatePage=!0},L=(e,t)=>{const a=e.find((e=>t===e.value));return a?a.key:t},N=(e,t)=>{if(["RADIO_BLOCK","CHECKBOX_BLOCK"].includes(t)&&e&&(e&&s.isJSON(e)&&(e=JSON.parse(e)),e.length))return!0},b=t=>{var a,i;if(!t||!t.length)return;const n=e();if((null==c?void 0:c.noBtn)||(null==n?void 0:n.noBtn))return;const l=t.find((e=>"FRONT_ADDRESS"===e.type));if(!l||!Object.keys(l).length)return;let r;if(l.setting&&s.isJSON(l.setting)&&(r=JSON.parse(l.setting)),!r||!Object.keys(r).length)return;if(1==(null==n?void 0:n.redirect)||1==(null==(a=c.params)?void 0:a.redirect)||3==n.isEdit||3==(null==(i=c.params)?void 0:i.isEdit))return;const{frontAddress:o}=r;if(o){const e=window.location.href;let t="?";o.includes("?")&&(t="&");return`${o}${t}redirect_url=${encodeURIComponent(e)}`}},D=e=>{const t=["evaname","evadesc","evast","evadur","evaan","evasit","evaztip"],a={};for(const i in e){const n=e[i];t.includes(i)&&n&&(a[i]=n)}return a},w=t=>{if(!t||!Object.keys(t).length)return;let a=e()||{};y.value&&(a=f.paramsEvaluate);const i={evaluateName:"evaname",evaluateExplain:"evadesc",evaluateStartTime:"evast",evaluateTime:"evadur",evaluateAnswer:"evaan",evaluetaResSituation:"evasit",evaluateZeroTip:"evaztip"},n=["evaluateAnswer","evaluetaResSituation","evaluateZeroTip"];for(const e in t){const s=t[e];if(s&&"evaluateAnswer"!=e&&"string"==typeof s&&s.includes("${")&&"string"==typeof s){const i=s.replace(/\$\{([^}]+)\}/g,((e,t)=>{let i;return t.startsWith("form.")&&(i=a[t.split(".")[1]]),i||""}));t[e]=i}else{let s=a[i[e]];n.includes(e)&&(s="true"===s||1==s),a[i[e]]&&(t[e]=s)}}if(C.value){const e={evaname:"evaluateName",evadesc:"evaluateExplain",evast:"evaluateStartTime",evadur:"evaluateTime",evaan:"evaluateAnswer",evasit:"evaluetaResSituation",evaztip:"evaluateZeroTip"},i=["evaan","evasit","evaztip"];["evaname","evadesc","evast","evadur","evaan","evasit","evaztip"].forEach((n=>{const s=e[n];if(!t[s]){let e=a[n];i.includes(n)&&(e="true"===e||1==e),a[n]&&(t[s]=e)}}))}h(t)},k=e=>{let t=1;return e.map((a=>{const i=O(a);(i||"").replace(/\n/g,""),a.showTitle=a.title,a.val_key=i,a.renderCom=l[a.type],a.isShow=!0,Object.keys(a).forEach((e=>{s.isJSON(a[e])&&"LOCATION"!=a.type&&(a[e]=JSON.parse(a[e]))}));var n;return["LINEBAR","TITLE","PROMPT","IMGCARD","RICH_TEXT"].indexOf(a.type)<0&&!a.hide&&(a.softcode=t++),("SELECT"==(n=a.type)||"RADIO_BLOCK"==n||"CHECKBOX_BLOCK"==n||"SEARCH_CASCADE"==n||"EVALUATE_RADIO_BLOCK"==n||"EVALUATE_CHECKBOX_BLOCK"==n||"EVALUATE_SELECT"==n)&&(((e,t)=>{N(e,t)&&e.forEach(((e,t)=>{"other"!==e.key&&(e.key=t+1),(e.prefix||e.suffix)&&(e.value=e.prefix||e.suffix)}))})(a.options,a.type),"SEARCH_CASCADE"!=a.type&&(a.dbValue?R(a.dbValue,a,e):a.setting.defaultValue&&R(a.setting.defaultValue,a,e))),a})).map((t=>(((e,t)=>{const a=s.isString(t.relationLogic)?JSON.parse(t.relationLogic):t.relationLogic,{condition:i}=a||{};i&&i.length&&(i.forEach((t=>{const a=e.find((e=>e.seq==t.subject_seq));if(!a)return;if(!N(a.options,a.type))return;let i=t.value;Array.isArray(i)?(i=i.map((e=>L(a.options,e))),t.value=i):t.value=L(a.options,i)})),t.relationLogic=a)})(e,t),(e=>{const{nextLogic:t,options:a,type:i}=e||{};if(!t||!N(a,i))return;const{condition:n}=t||{};n&&n.length&&n.forEach((e=>{let t=e.value;Array.isArray(t)?(t=t.map((e=>L(a,e))),e.value=t):e.value=L(a,t)}))})(t),"CHECKBOX_BLOCK"===t.type&&t.dbValue&&!Array.isArray(t.dbValue)&&"customList"===c.type&&(t.dbValue=t.dbValue.split(",").filter((e=>!!e))),t)))},_=e=>{const i={};let l;return e.forEach((e=>{var r,o,u,v,d;const p=e.val_key,{type:g}=e;let S;if(e.dbValue)S=e.dbValue;else{const{defValType:i,dateType:s}=e.setting||{};if(3==i){const a=null==(o=null==(r=e.setting)?void 0:r.outDefaultValue)?void 0:o.urlKey;if(a){const i=a.split(",");if(i.length>1){const e=i.map((e=>{const a=t(e,f,c.params);return a?decodeURIComponent(a):null})).filter(Boolean);e.length&&(S=e)}else{let a=t(i[0],f,c.params);a&&(a=decodeURIComponent(a),S="CHECKBOX_BLOCK"==e.type?a.split():a)}}}if("DATETIME"===g&&4==i){const t=(null==(u=a[s])?void 0:u.replace("-dd","-DD"))||"yyyy-MM-DD HH:mm:ss",i=m.format(t);if(1==(null==(v=e.setting)?void 0:v.startToStop)){S=[i,n().endOf("day").format(t)]}else S=i}}switch(g){case"LOCATION":i[p]=S||"";break;case"SEARCH_CASCADE":case"UPFILE":case"UPPICTURE":i[p]=S||[];break;case"ADDRESS":i[p]=S||"",f.defaultAddress=S||{};break;case"LABEL":i[p]=S||{},s.isObject(S)?f.labelSelectedList=(null==S?void 0:S.labels)||[]:Array.isArray(S)?f.labelSelectedList=S:f.labelSelectedList=[];break;case"TITLE":i[p]=e.title;break;case"IMGCARD":i[p]=(null==(d=e.setting)?void 0:d.imgUrl)||"";break;case"CHECKBOX_BLOCK":S&&!Array.isArray(S)&&"customList"===c.type?i[p]=S.split(",").filter((e=>!!e)):(l=S||e.setting.defaultValue,s.isJSON(l)&&(l=JSON.parse(l)),i[p]=l);break;default:l=S||e.setting.defaultValue,s.isJSON(l)&&(l=JSON.parse(l)),i[p]=l}})),i};return{initForm:e=>{var t;let{list:a=[],map:i={},isFinished:n=!1}=e;const l=b(a);if(l)return void(window.location.href=l);if(i.maxScore&&(f.maxScore=i.maxScore),f.isFinished=n,e.isNotFilled)return f.spinning=!1,f.hasFrontAddress=!1,void S(!0,"未查询到量表填写记录");if(e.isLackCustomer&&g.info({title:"已设置填写次数限制",content:"请在包含用户信息的环境中打开此量表",maskClosable:!1,onPositiveClick(){d("onCloseSetting")}}),f.config=i,"evaluateResultConfig"in i&&s.isJSON(i.evaluateResultConfig)&&(f.config.evaluateResultConfig=JSON.parse(i.evaluateResultConfig)),"evaluateResultSetting"in i&&s.isJSON(i.evaluateResultSetting)&&(f.config.evaluateResultSetting=JSON.parse(i.evaluateResultSetting),(null==(t=f.config)?void 0:t.randomId)&&f.config.evaluateResultSetting&&(f.config.evaluateResultSetting.evaluateName=f.config.name,f.config.evaluateResultSetting.evaluateExplain=f.config.remark)),f.originConfig=JSON.parse(JSON.stringify(f.config)),c.params&&Object.keys(c.params).length){const e=D(c.params);e&&Object.keys(e).length&&(f.paramsEvaluate=e)}w(f.config.evaluateResultSetting),T(),f.defaultFormArray=JSON.parse(JSON.stringify(a));const r=f.filterArr;a=a.filter((e=>!r.includes(e.type))),f.formArray=k(a||[]),f.form=_(f.formArray),f.rules=A(f.formArray),f.fontSize=e.fontSize,f.spinning=!1,f.hasFrontAddress=!1}}};export{c as ScaleViewInit};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{h as t}from"vue";import{isSortItem as e,isOnlyOptions as i,isEvaluation as o,getQueryVariable as n}from"../utils/judge-types.js";import"xe-utils";import s from"moment";import r from"../../../../shared/utils/vexutilsExpand.js";import{ScaleViewComputed as a}from"./scaleview-computed.js";import{useDialog as l,useMessage as u}from"naive-ui";const f=(f,d,m,p)=>{const c=l(),
|
|
1
|
+
import{h as t}from"vue";import{isSortItem as e,isOnlyOptions as i,isEvaluation as o,getQueryVariable as n}from"../utils/judge-types.js";import"xe-utils";import s from"moment";import r from"../../../../shared/utils/vexutilsExpand.js";import{ScaleViewComputed as a}from"./scaleview-computed.js";import{useDialog as l,useMessage as u}from"naive-ui";const f=(f,d,m,p)=>{const c=l(),g=u(),{formRef:v,countdownDom:y}=p,{showEvent:C,formKey:h,showEvaluateEntry:b,scaleEdit:O,showEvaluateCoundownPage:A,skipCover:S,hasScore:T}=a(f,d,p),E=()=>{const t=d.defaultFormArray.find((t=>"SPREAD_PARAMS"===t.type));if(t){r.isJSON(t.setting)&&(t.setting=JSON.parse(t.setting));const e=h(t);d.submitForm[e]=t.setting.spreadParams.domains.map((t=>{const e={};return"1"==t.valueType?e[t.name]=t.value:"2"==t.valueType&&(e[t.name]=n(t.value,d,f.params)),e}))}const e=d.defaultFormArray.find((t=>"CHECKBOX_BLOCK"==t.type));e&&Array.isArray(d.form[e.title])&&"customList"===f.type&&(d.form[e.title]=d.form[e.title].join(","));const i=I();let o;if("customList"===f.type)o={definedListId:f.ids.guage_id,dbId:f.ids.db_id,scoreJson:JSON.stringify(i)};else{const{guageId:t,randomId:e}=d.config;o=Object.assign(f.params,{guageId:t,scoreJson:JSON.stringify(i),randomId:e})}d.shareId&&(o.shareId=d.shareId);const s=d.defaultFormArray.find((t=>"SUCCESS_TIP"===t.type));if(s){const t=r.isJSON(s.setting)?JSON.parse(s.setting):s.setting;o.tipSetting=JSON.stringify({tipMode:t.tipMode,tipType:t.tipType,tipText:t.tipText,tipApi:t.tipApi})}const a=d.defaultFormArray.find((t=>"CALLBACK_INTERFACE"===t.type));let l=!1;a&&(l=C(a,!0));return{params:o,hasCallbackItem:a,isCallback:l}},x=(t,e)=>{if(!e.length)return e;const{type:o,options:n,scoreConfigs:s}=t;let r=n;if("EVALUATE_CHECKBOX_BLOCK"===o&&(r=(null==s?void 0:s.scoreRules)||[]),!r.length)return e;const a=i(o)?"key":"value",l=[];return r.forEach((t=>{const i=t[a];e.includes(i)&&l.push(i)})),l},I=()=>{const t=Object.assign({},d.form,d.submitForm),o={};if(!Object.keys(t).length)return{};for(const n in t){const r=d.formArray.find((t=>h(t)==n));if(n&&r){let a=n,l=t[n]?t[n]:null;if(r&&r.databaseTitle&&(a=r.databaseTitle),"customList"==f.type&&r&&r.setting&&1!=r.setting.startToStop&&t[n]&&"DATETIME"==r.type&&(r.setting&&"time"==r.setting.dateType&&t[n]&&(t[n]=s().format("YYYY-MM-DD ")+t[n]),r.setting&&"date"==r.setting.dateType&&t[n]&&(t[n]=s(t[n]).format("YYYY-MM-DD ")+s().format("HH:mm:ss"))),e(r)&&l&&(l=x(r,l),l=(null==l?void 0:l.length)?l:null),i(r.type)&&l){const{options:t}=r,e=r.val_key,i=d.choiceComObj[e];if("RADIO_BLOCK"===r.type&&l&&(l=j(l,t,i)),"CHECKBOX_BLOCK"===r.type&&(null==l?void 0:l.length)){l=w(l,t,i)}}o[a]=l}else o[n]=t[n]}return o},w=(t,e,i)=>{const o=[];let n,s=0;for(;s<t.length;s++){n=t[s];const r=e.find(((t,e)=>e+1===n));if(r&&!r.prefix&&!r.suffix){o.push(r.value);continue}const a=j(n,e,i);o.push(a)}return o},j=(t,e,i)=>{const{othersText:o,optionsPreSuffixObj:n={}}=i||{};if("other"===t)return o||"其他";const s=e.find(((e,i)=>i+1===t));if(!s)return;if(!s.prefix&&!s.suffix)return s.value;let r=n[t]||"";return s.prefix?r=s.prefix+r:r+=s.suffix,r},L=()=>new Promise((t=>{var e;null==(e=v.value)||e.validate((e=>{var i;if(e){console.log(e);const o=(null==(i=e[0])?void 0:i[0])||{};let n=o.field;const s=o.message,r=d.formArray.find((t=>t.databaseTitle===n));return r&&(n=r.title),g.error(n+s),t(!1),!1}{const e=E();t(e)}}))})),_=e=>{c.warning({title:"温馨提示",content:()=>t("div",{style:{paddingLeft:"30px"}},e),positiveText:"确定",negativeText:"取消",maskClosable:!1,closable:!1,positiveButtonProps:{type:"primary"},onPositiveClick:async()=>{const t=await L();m("onSubmit",t)},onNegativeClick(){}})};return{submitMethod:E,confirmSubmit:_,onSubmitForm:L,onSubmitData:()=>{var t;if(!d.formArray.find((t=>o(t.type))))return void _("确认要提交吗?");const{evaluateResultSetting:e}=d.config;if(!e||!Object.keys(e).length&&!b.value||O.value)return void _("确认要结束测评吗?");if("formIframe"==f.openType&&b.value)return void m("submitNoRequest");let i="确定要提前结束测评吗?";if(A.value&&(null==(t=y.value)?void 0:t.getCountdownObj)){const t=y.value.getCountdownObj(),{setAnswered:e,totalLen:o}=t;if(e<o)i="存在未作答的题目,确定要提前结束测评吗?";else{!(d.showEvaluateCountdown&&!S.value)&&(i="确认要结束测评吗?")}}S.value&&T.value&&(i="确认要结束测评吗?"),_(i)},handleScoreJson:I}};export{f as ScaleViewSubmit};
|
|
@@ -6,8 +6,16 @@ export declare const handleQueryParams: () => {};
|
|
|
6
6
|
export declare const getQueryVariable: (variable: any, state: any, params: any) => any;
|
|
7
7
|
export declare const formatMap: {
|
|
8
8
|
datetime: string;
|
|
9
|
+
datehour: string;
|
|
9
10
|
date: string;
|
|
10
11
|
time: string;
|
|
11
12
|
hour: string;
|
|
12
|
-
datehour: string;
|
|
13
13
|
};
|
|
14
|
+
export declare const valueReg: {
|
|
15
|
+
datetime: RegExp;
|
|
16
|
+
datehour: RegExp;
|
|
17
|
+
date: RegExp;
|
|
18
|
+
time: RegExp;
|
|
19
|
+
hour: RegExp;
|
|
20
|
+
};
|
|
21
|
+
export declare const transDbvalueFormat: Map<string, string[]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
const e=e=>["RADIO_BLOCK","CHECKBOX_BLOCK"].includes(e),
|
|
1
|
+
const e=e=>["RADIO_BLOCK","CHECKBOX_BLOCK"].includes(e),d=e=>{const{type:d,targetSource:t}=e;return!!["CHECKBOX_BLOCK","EVALUATE_CHECKBOX_BLOCK"].includes(d)||"SELECT"===d&&!(null==t?void 0:t.target_id)},t=e=>["TITLE","LINEBAR","PROMPT","IMGCARD","RICH_TEXT"].includes(e),o=e=>["EVALUATE_RADIO_BLOCK","EVALUATE_CHECKBOX_BLOCK","EVALUATE_SELECT","EVALUATE_INPUT"].includes(e),r=()=>{var e,d;const t={};let o=(null==(e=window.location.search.split("?"))?void 0:e[1])||(null==(d=window.location.hash.split("?"))?void 0:d[1]);if(!o)return{};o=o.replace(/\+/g,"%20");for(const[e,d]of new URLSearchParams(o).entries())t[e]=decodeURIComponent(d);return t},a=(e,d,t)=>{let o={};return o="layout"==d.source?t:r()||{},o&&o[e]||!1},i={datetime:"yyyy-MM-dd HH:mm:ss",datehour:"yyyy-MM-dd HH:mm",date:"yyyy-MM-dd",time:"HH:mm:ss",hour:"HH:mm"},u={datetime:/^(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2})$/,datehour:/^(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2})$/,date:/^(\d{4})-(\d{2})-(\d{2})$/,time:/^(\d{2}):(\d{2}):(\d{2})$/,hour:/^(\d{2}):(\d{2})$/},n=new Map([["datetime",["datetime","datehour","date","time","hour"]],["datehour",["datetime","datehour","date","time","hour"]],["date",["date"]],["time",["time","hour"]],["hour",["time","hour"]]]);export{i as formatMap,a as getQueryVariable,r as handleQueryParams,t as isCollection,o as isEvaluation,e as isOnlyOptions,d as isSortItem,n as transDbvalueFormat,u as valueReg};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as t,ref as e,reactive as l,computed as a,watch as i,openBlock as n,createElementBlock as s,unref as
|
|
1
|
+
import{defineComponent as t,ref as e,reactive as l,computed as a,watch as i,openBlock as n,createElementBlock as s,unref as r,createCommentVNode as d,withDirectives as o,createElementVNode as c,normalizeClass as b,createVNode as u,withCtx as p,Fragment as f,renderList as h,createBlock as y,createTextVNode as v,toDisplayString as m,vShow as g,nextTick as C}from"vue";import{useMessage as L,NAnchor as I,NAnchorLink as S}from"naive-ui";import E from"./components/label-classify.vue.js";import{handleLabelColor as w}from"../../../shared/utils/vexutils.js";import x from"../../../shared/utils/vexutilsExpand.js";const A={key:0,class:"label-disable-wrap"},O=[c("p",{class:"label-disable-title"},"无可选标签",-1),c("p",{class:"label-disable-desc"},"请联系管理员进行标签管理设置",-1)],K={style:{height:"100%"}},j={class:"label-wrap"},k=["id"],T={class:"edit-label-type"};var B=t({__name:"LabelFormContent",props:{item:{default:()=>({})},isEdit:{type:Boolean,default:!0},isLock:{type:Boolean,default:!1},labelSelectedList:null,isChangeWindow:{type:Boolean},getLabelList:{type:Function,default:()=>Promise.resolve({rows:[]})},deleteLabel:{type:Function,default:()=>Promise.resolve({status:!0})},saveLabelItem:{type:Function,default:()=>Promise.resolve({status:!0})},labelOptions:null,sourceType:{default:""},explicit:{type:Boolean,default:!1}},emits:["explicitOnChange","change","updateLabelData"],setup(t,{expose:B,emit:D}){const V=t,F=L(),P=e(null),_=l({editLabelItem:{},inited:!1,labelSelectedEdit:[],labelAnchorKey:"",cacheAnchorKey:"",labelConfig:{}});let N=e(0);const W=a((()=>{if(!_.inited)return!1;let t=_.labelConfig;return!t||Object.keys(t).every((e=>!t[e].itemList))})),$=a((()=>{let t=[].concat(..._.labelSelectedEdit,...V.labelSelectedList);return J(t,"labelId")})),q=a((()=>{const t=$.value||[];return Array.isArray(t)?t.map((t=>t.labelId)):[]})),J=(t,e)=>{let l={};return t.reduce(((t,a)=>(!l[a[e]]&&(l[a[e]]=t.push(a)),t)),[])},R=()=>{if(_.labelSelectedEdit=$.value,"object"==typeof _.labelConfig){Object.keys(_.labelConfig||{}).forEach((t=>{var e;let l=(null==(e=_.labelConfig[t])?void 0:e.itemList)||[];l.length&&l.forEach((t=>{q.value.includes(t.labelId)&&(t.isSelect=!0)}))}))}},z=(t,e)=>{if(!t)return;let l=Object.keys(t)||[];if(!l.length)return;let a=t[l[0]].curKey;if(e&&"string"==typeof e){let[i]=e.split("~"),n=l.find((e=>t[e]&&t[e].curKey&&t[e].curKey.includes(i)));n&&(a=t[n].curKey)}a&&Y(a)},G=(t,e)=>{e.showAdd=!0;const l=t.target.nextElementSibling;C((()=>{var t;null==(t=null==l?void 0:l.firstChild)||t.focus()}))},H=(t,e)=>{setTimeout((()=>{e.addVal?Q(e):e.showAdd=!1}),150)},M=(t,e)=>{e.addVal="",e.showAdd=!1},Q=async t=>{var e;if(!!t.itemList.filter((t=>!(t.isPublic&&1==t.isPublic))).find((e=>e.labelName===t.addVal)))return F.error("标签名称重复!"),!1;let l="";l=(null==(e=t.itemList)?void 0:e.length)?t.itemList[0].parentColor||t.parentColor||"":(null==t?void 0:t.parentColor)||"";const a={type:t.typeId,name:t.addVal,parentColor:l},{status:i}=await V.saveLabelItem(a,t);i&&(F.success("添加成功!"),D("updateLabelData"),t.showAdd=!1)},U=(t,e,l,a)=>{var i;const n=l.itemList,s=l.multipleChoice;let r=(null==(i=_.labelSelectedEdit)?void 0:i.length)&&x.clone(_.labelSelectedEdit,!0)||[];if(t){if(r.some((t=>t.labelId==e.labelId)))return;if(2==s){const{typeId:t,labelId:l}=e;r=r.filter((e=>e.typeId!==t)),n.forEach((t=>{t.labelId!==l&&(t.isSelect=!1)}))}r.push(e)}else{const t=r.findIndex((t=>t.labelId==e.labelId));-1!=t&&r.splice(t,1)}_.labelSelectedEdit=[...r],N.value++,V.explicit&&D("explicitOnChange",[..._.labelSelectedEdit])},X=async t=>{const{status:e}=await V.deleteLabel(t,V.item);if(e){F.success("删除成功!");for(const e in _.labelConfig){const l=_.labelConfig[e].itemList.findIndex((e=>e.labelId==t.labelId));-1!=l&&_.labelConfig[e].itemList.splice(l,1)}const e=_.labelSelectedEdit||[],l=V.labelSelectedList||[];if(e&&e.length){const l=e.findIndex((e=>e.labelId==t.labelId));-1!=l&&e.splice(l,1)}if(l&&l.length){const e=l.findIndex((e=>e.labelId==t.labelId));-1!=e&&l.splice(e,1),D("change",[...l],V.item)}D("updateLabelData")}else F.warning("删除失败")},Y=t=>{t&&setTimeout((()=>{let e,l="#"+t;e=P.value.querySelector("a[href='"+l+"']"),e&&e.click(),_.labelAnchorKey=t}),32)},Z=t=>{t.preventDefault()},tt=t=>{if(!t)return;let e=t.slice(1);_.cacheAnchorKey=e},et=()=>{var t;return null==(t=P.value)?void 0:t.querySelector(".right-label-wrap")};return i((()=>V.labelOptions),(t=>{t&&(()=>{var t;if(V.isLock)return;const e=JSON.parse(JSON.stringify(V.labelOptions));for(let l in e){let a=(null==(t=e[l])?void 0:t.typeId)||"";Object.assign(e[l],{curKey:`${l}_${a}}`})}_.labelConfig=e,C((()=>{let t;R(),V.explicit&&_.inited&&(t=_.labelAnchorKey),z(_.labelConfig,t),_.inited=!0}))})()}),{immediate:!0,deep:!0}),B({resetShowAdd:()=>{let{labelObj:t}=_.editLabelItem;if(t&&Object.keys(t).length)for(let e in t){let l=t[e];Object.assign(l,{showAdd:!1})}},handleLabelForm:t=>{t([..._.labelSelectedEdit||[]])},handleResetOptions:()=>{},hanldeSetLabelItem:(t,e)=>{if("object"==typeof _.labelConfig){Object.keys(_.labelConfig||{}).forEach((l=>{var a;let i=(null==(a=_.labelConfig[l])?void 0:a.itemList)||[];i.length&&i.forEach((l=>{t==l.labelId&&(l.isSelect=e)}))}))}if(!1===e&&Array.isArray(_.labelSelectedEdit)){const e=_.labelSelectedEdit.findIndex((e=>e.labelId==t));-1!=e&&_.labelSelectedEdit.splice(e,1)}}}),(e,l)=>(n(),s("div",{class:"c-label-form-content",ref_key:"labelFormContent",ref:P},[r(W)?(n(),s("div",A,O)):d("v-if",!0),o(c("div",K,[c("div",j,[d(" 表单内嵌打开标签组件的样式 "),d(' <div v-if="explicit" class="explicit-continer">\r\n\t\t\t\t\t<n-tabs :value="state.labelAnchorKey" type="card" @change="labelAnchorTabsOnChange" tab-position="top">\r\n\t\t\t\t\t\t<template v-for="(v, i) in state.labelConfig">\r\n\t\t\t\t\t\t\t<n-tab-pane :name="v.curKey">\r\n\t\t\t\t\t\t\t\t<span slot="tab">\r\n\t\t\t\t\t\t\t\t\t{{ i }}\r\n\t\t\t\t\t\t\t\t\t<span class="edit-label-type">({{ v.multipleChoice == 2 ? \'单\' : \'多\' }}选)</span>\r\n\t\t\t\t\t\t\t\t</span>\r\n\t\t\t\t\t\t\t\t<div class="explicit-label-wrap left-label-wrap">\r\n\t\t\t\t\t\t\t\t\t<div class="edit-label-content">\r\n\t\t\t\t\t\t\t\t\t\t<labelClassify\r\n\t\t\t\t\t\t\t\t\t\t\t:classifyItem="v"\r\n\t\t\t\t\t\t\t\t\t\t\t:handleLabelChange="handleLabelChange"\r\n\t\t\t\t\t\t\t\t\t\t\t:handleLabelColor="handleLabelColor"\r\n\t\t\t\t\t\t\t\t\t\t\t:handleDelLabel="handleDelLabel"\r\n\t\t\t\t\t\t\t\t\t\t\t:hanldeBlur="hanldeBlur"\r\n\t\t\t\t\t\t\t\t\t\t\t:handleAddLabel="handleAddLabel"\r\n\t\t\t\t\t\t\t\t\t\t\t:clearaddVal="clearaddVal"\r\n\t\t\t\t\t\t\t\t\t\t\t:isEdit="isEdit"\r\n\t\t\t\t\t\t\t\t\t\t\t:sourceType="sourceType"\r\n\t\t\t\t\t\t\t\t\t\t/>\r\n\t\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t\t</div>\r\n\t\t\t\t\t\t\t</n-tab-pane>\r\n\t\t\t\t\t\t</template>\r\n\t\t\t\t\t</n-tabs>\r\n\t\t\t\t</div> '),d("\r\n\t\t\t\t\t普通标签样式\r\n\t\t\t\t\tv-else\r\n\t\t\t\t\texplicit\r\n\t\t\t\t "),c("div",{class:b(["left-label-wrap",{"total-left-label-wrap":t.isChangeWindow}])},[u(r(I),{"offset-target":et,type:"block",onClick:Z,onChange:tt},{default:p((()=>[(n(!0),s(f,null,h(_.labelConfig,((t,e)=>(n(),y(r(S),{href:`#${t.curKey}`,title:String(e)},null,8,["href","title"])))),256))])),_:1})],2),d(' v-if="!explicit" '),c("div",{class:b(["right-label-wrap",{"total-right-label-wrap":t.isChangeWindow}])},[(n(!0),s(f,null,h(_.labelConfig,((e,l)=>(n(),s("div",{key:l,class:"edit-label-content"},[c("div",{class:"edit-label",id:e.curKey},[v(m(l)+" ",1),c("span",T,"("+m(2==e.multipleChoice?"单":"多")+"选)",1)],8,k),u(E,{classifyItem:e,handleLabelChange:U,handleLabelColor:r(w),handleDelLabel:X,hanldeBlur:H,handleAddLabel:G,clearaddVal:M,isEdit:t.isEdit,sourceType:t.sourceType},null,8,["classifyItem","handleLabelColor","isEdit","sourceType"])])))),128))],2)])],512),[[g,!r(W)]])],512))}});export{B as default};
|
|
@@ -95,6 +95,12 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
95
95
|
};
|
|
96
96
|
readonly 'onUpdate:value': PropType<import("naive-ui/es/_utils").MaybeArray<(value: (string | number)[], meta: {
|
|
97
97
|
actionType: "check" | "uncheck";
|
|
98
|
+
/**
|
|
99
|
+
* 取消勾选树节点
|
|
100
|
+
* baseKeys:基准值
|
|
101
|
+
* currentTree:当前树节点
|
|
102
|
+
* value:树节点的key值
|
|
103
|
+
*/
|
|
98
104
|
value: string | number;
|
|
99
105
|
}) => void>>;
|
|
100
106
|
readonly onUpdateValue: PropType<import("naive-ui/es/_utils").MaybeArray<(value: (string | number)[], meta: {
|
|
@@ -111,9 +111,6 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
111
111
|
readonly type: PropType<(string | number)[] | null>;
|
|
112
112
|
readonly default: null;
|
|
113
113
|
};
|
|
114
|
-
/**
|
|
115
|
-
* 拖拽完成
|
|
116
|
-
*/
|
|
117
114
|
readonly disabled: {
|
|
118
115
|
readonly type: PropType<boolean | undefined>;
|
|
119
116
|
readonly default: undefined;
|
package/es/env.d.ts
CHANGED
|
@@ -1,25 +1,25 @@
|
|
|
1
|
-
/// <reference types="vite/client" />
|
|
2
|
-
|
|
3
|
-
interface ImportMetaEnv {
|
|
4
|
-
readonly VITE_APP_TYPE: string;
|
|
5
|
-
// 更多环境变量...
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
interface ImportMeta {
|
|
9
|
-
readonly env: ImportMetaEnv;
|
|
10
|
-
}
|
|
11
|
-
|
|
12
|
-
declare module '*.vue' {
|
|
13
|
-
// @ts-ignore
|
|
14
|
-
import type { App, defineComponent } from 'vue';
|
|
15
|
-
// // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
|
|
16
|
-
// // const component: DefineComponent<{}, {}, any>
|
|
17
|
-
const component: ReturnType<typeof defineComponent> & {
|
|
18
|
-
install(app: App): void;
|
|
19
|
-
};
|
|
20
|
-
// @ts-ignore
|
|
21
|
-
export default component;
|
|
22
|
-
}
|
|
23
|
-
|
|
24
|
-
declare module '*.js';
|
|
25
|
-
|
|
1
|
+
/// <reference types="vite/client" />
|
|
2
|
+
|
|
3
|
+
interface ImportMetaEnv {
|
|
4
|
+
readonly VITE_APP_TYPE: string;
|
|
5
|
+
// 更多环境变量...
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
interface ImportMeta {
|
|
9
|
+
readonly env: ImportMetaEnv;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
declare module '*.vue' {
|
|
13
|
+
// @ts-ignore
|
|
14
|
+
import type { App, defineComponent } from 'vue';
|
|
15
|
+
// // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/ban-types
|
|
16
|
+
// // const component: DefineComponent<{}, {}, any>
|
|
17
|
+
const component: ReturnType<typeof defineComponent> & {
|
|
18
|
+
install(app: App): void;
|
|
19
|
+
};
|
|
20
|
+
// @ts-ignore
|
|
21
|
+
export default component;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
declare module '*.js';
|
|
25
|
+
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var
|
|
1
|
+
var A="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPoAAADCCAMAAABXGy/PAAAABGdBTUEAALGPC/xhBQAAAAFzUkdCAK7OHOkAAALKaVRYdFhNTDpjb20uYWRvYmUueG1wAAAAAAA8eDp4bXBtZXRhIHhtbG5zOng9ImFkb2JlOm5zOm1ldGEvIiB4OnhtcHRrPSJYTVAgQ29yZSA2LjAuMCI+CiAgIDxyZGY6UkRGIHhtbG5zOnJkZj0iaHR0cDovL3d3dy53My5vcmcvMTk5OS8wMi8yMi1yZGYtc3ludGF4LW5zIyI+CiAgICAgIDxyZGY6RGVzY3JpcHRpb24gcmRmOmFib3V0PSIiCiAgICAgICAgICAgIHhtbG5zOnRpZmY9Imh0dHA6Ly9ucy5hZG9iZS5jb20vdGlmZi8xLjAvIgogICAgICAgICAgICB4bWxuczpleGlmPSJodHRwOi8vbnMuYWRvYmUuY29tL2V4aWYvMS4wLyI+CiAgICAgICAgIDx0aWZmOllSZXNvbHV0aW9uPjcyPC90aWZmOllSZXNvbHV0aW9uPgogICAgICAgICA8dGlmZjpSZXNvbHV0aW9uVW5pdD4yPC90aWZmOlJlc29sdXRpb25Vbml0PgogICAgICAgICA8dGlmZjpYUmVzb2x1dGlvbj43MjwvdGlmZjpYUmVzb2x1dGlvbj4KICAgICAgICAgPHRpZmY6T3JpZW50YXRpb24+MTwvdGlmZjpPcmllbnRhdGlvbj4KICAgICAgICAgPGV4aWY6UGl4ZWxYRGltZW5zaW9uPjMxMjwvZXhpZjpQaXhlbFhEaW1lbnNpb24+CiAgICAgICAgIDxleGlmOkNvbG9yU3BhY2U+MTwvZXhpZjpDb2xvclNwYWNlPgogICAgICAgICA8ZXhpZjpQaXhlbFlEaW1lbnNpb24+MjQyPC9leGlmOlBpeGVsWURpbWVuc2lvbj4K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