cnhis-design-vue 3.2.5-beta.28 → 3.2.5-beta.30

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. package/es/components/callback/src/components/render/popupMaps.d.ts +1 -0
  2. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.d.ts +1 -0
  3. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useCenter.js +1 -1
  4. package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js +1 -1
  5. package/es/components/field-set/src/FieldColor.vue.d.ts +1 -1
  6. package/es/components/field-set/src/FieldFilter.vue.d.ts +1 -1
  7. package/es/components/field-set/src/FieldSet.vue.d.ts +1 -1
  8. package/es/components/field-set/src/components/Row.vue.d.ts +1 -1
  9. package/es/components/form-config/index.d.ts +2 -0
  10. package/es/components/form-config/src/FormConfig.vue.d.ts +2 -0
  11. package/es/components/form-config/src/components/FormConfigCreator.vue.d.ts +1 -0
  12. package/es/components/form-config/src/components/FormConfigEdit.vue.d.ts +1 -0
  13. package/es/components/form-render/index.d.ts +1 -0
  14. package/es/components/form-render/src/FormRender.vue.d.ts +1 -0
  15. package/es/components/form-render/src/FormRenderWrapper.vue.d.ts +1 -0
  16. package/es/components/form-render/src/hooks/useAnchor.d.ts +1 -0
  17. package/es/components/form-render/src/hooks/useAnchor.js +1 -1
  18. package/es/components/form-render/src/hooks/useFieldListAdaptor.js +1 -1
  19. package/es/components/info-header/index.d.ts +2 -0
  20. package/es/components/info-header/src/InfoHeader.vue.d.ts +2 -0
  21. package/es/components/info-header/src/components/infoDescription/index.vue.d.ts +1 -0
  22. package/es/components/info-header/src/components/patientInfo/index.vue.d.ts +1 -0
  23. package/es/components/scale-view/index.d.ts +4 -4
  24. package/es/components/scale-view/src/components/formitem/r-address.js +1 -1
  25. package/es/components/scale-view/src/components/formitem/r-input.js +1 -1
  26. package/es/components/scale-view/src/components/formitem/r-select.d.ts +4 -4
  27. package/es/components/scale-view/src/components/formitem/r-select.js +1 -1
  28. package/es/components/scale-view/src/hooks/scaleview-init.js +1 -1
  29. package/es/components/scale-view/src/hooks/use-component.d.ts +8 -8
  30. package/es/components/shortcut-setter/index.d.ts +1 -0
  31. package/es/components/shortcut-setter/src/ShortcutSetter.vue.d.ts +1 -0
  32. package/es/shared/package.json.js +1 -1
  33. package/package.json +2 -2
@@ -422,6 +422,7 @@ export declare const CallbackMaps: Map<string, {
422
422
  anchorIdList: import("vue").Ref<{
423
423
  name: string;
424
424
  title: string;
425
+ index: number;
425
426
  }[]>;
426
427
  onScroll: (scrollEvent: Event) => void;
427
428
  callLifeCycle: <T extends "onSetup" | "beforeSetValue" | "beforeRequest" | "afterRequest" | "afterOptionInit">(lifeCycleName: T, payload?: Parameters<Required<Partial<{
@@ -15,4 +15,5 @@ export declare function useCenter(canvas: Ref<fabric.Canvas>, propItems: AnyObje
15
15
  getContainPoints: (gridPoints?: never[]) => IObject[];
16
16
  showDialog: (callback: Function) => void;
17
17
  removeCurrentSelection: () => void;
18
+ pauseFlickerPoint: import("@vueuse/shared").Fn;
18
19
  };
@@ -1 +1 @@
1
- import{onUnmounted as e}from"vue";import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{defaultStyle as n,drawLine as i,drawPoint as o}from"../useDraw.js";import{useGrid as l}from"../useGrid.js";import{useBirthProcessCumputedPoint as r}from"../useCumputedPoint.js";import{bus as s}from"../useEvent.js";import{useCommon as a}from"../useCommon.js";import{getPointRange as f,getIndex as u,isEffectiveNode as c,getTime as p}from"../../utils/index.js";import{cloneDeep as d,last as m,omit as v,flatten as g}from"lodash-es";import"date-fns";import"../temperature/useShadow.js";import"@vueuse/shared";import"naive-ui";import{useIntervalFn as y}from"@vueuse/core";function h(h,k,x,L,P,w){const{computedX:b,computedY:A,getXValue:I,getYValue:C}=r(k),{xCellWidth:K,pointSelectionStyle:E,originX:j,endX:T,originY:X,endY:V,event:Y,scaleValues:M,xAxis:S,startTime:D,timeXCell:O,itemList:$,dialog:F,topGridOriginY:_,topGridEndY:z}=k,G=new Map,N=new Set,J=d(M);let q=[],R=null;const W=new Set;l(h,k);const{getEqualXTypes:B,handleAddPrevent:H,setPrevAndNextPoint:Q,getPointEventProps:U}=a(h,x,k),{pause:Z,resume:ee}=y((()=>{!function(){if(!W.size)return;for(const e of W)e.set("opacity",1===e.opacity?.5:1);h.value.renderAll()}()}),800);function te(){J.forEach((e=>{const{range:t=[],spaceValue:n}=e;n&&(t[0]||t[1])&&e.dataList.forEach(((t,n)=>{t.show&&(!function(e,t){const{max:n={},min:o={}}=e.panicValue||{},{max:l={},min:r={}}=e.diffValue||{};function s({show:e=!1,value:n,name:o,lineStyle:l}){if(!e||!n)return;const r=A(t.type,t.range,n),s=i([j,r,T,r],{...l,evented:!0,lockMovementX:!0,lockMovementY:!0,hoverCursor:"pointer"});Y.hovered&&o&&(s.on("mousemove",(({pointer:e})=>{L.point={...e||{x:s.left,y:s.top}},L.list=[`${o} ${n}${t.unit||""}`],L.show=!0})),s.on("mouseout",(()=>{L.show=!1}))),h.value.add(s)}s(n),s(o),s(l),s(r)}(t,e),le(t,n,e))}))}))}function ne(e=[]){if(!(null==R?void 0:R.areaPos))return[];const{startPos:t,endPos:n}=R.areaPos,[i,o]=[t.x,n.x].sort(((e,t)=>e-t)),[l,r]=[t.y,n.y].sort(((e,t)=>e-t));return(e.length?e:me()).filter((e=>e.left>=i&&e.left<=o&&e.top>=l&&e.top<=r))}function ie(e){F.warning({maskClosable:!1,closeOnEsc:!1,title:"警告",content:"确认删除当前选中的节点?",positiveText:"确定",negativeText:"取消",onPositiveClick:()=>{e(),oe()},onNegativeClick:()=>oe(),onClose:()=>oe()})}function oe(){R&&h.value.remove(R),R=null}function le(e,t,n){var l;const{type:r,unit:s,dataList:a=[]}=n,f=[];G.set(e.key,[]),function(e,t){W.size&&[...W].forEach((n=>{const{dataIndex:i,type:o}=n.origin;i===t&&o===e&&W.delete(n)}))}(r,t),null==(l=e.list)||l.forEach(((l,u)=>{!function(e,l,u,c){var p;let d,g,y=c;l.key&&(y=a.find((e=>e.key===l.key)));const{pointAttr:k={},lineAttr:P={},title:w="",key:b,type:A="circle"}=y,E=de(c.list[u+1],n);e&&E&&!l.breakpoint&&e[0]!==E[0]&&(g=i([...e,...E],P));const j=f[u-1],T={origin:{data:l,title:w,key:c.key,selfKey:b,unit:s,type:r,dataIndex:t,index:u,lineAttr:P},__type:"main",leftLine:j,rightLine:g,...k,...U()};e&&(j||(T.leftLine=null),d=o(A,{left:e[0],top:e[1],...T}));f.push(g),d&&(d.originLeft=d.left,d.originTop=d.top,function(e){Y.hovered&&(e.on("mouseover",(()=>{ce(e,"hover")})),e.on("mouseout",(()=>{L.show=!1})));if(e.lockMovementX&&e.lockMovementY)return;e.on("moving",(()=>{pe(e),function(e){var t,n;null==(t=e.leftLine)||t.setCoords().set({x2:e.left,y2:e.top}),null==(n=e.rightLine)||n.setCoords().set({x1:e.left,y1:e.top})}(e),Y.hovered&&ce(e),function(e){var t,n,i,o;const{originLeft:l,originTop:r,left:s,top:a,origin:f}=e,u=~~((s-l)/K);if(s>l+K){if(0===q.length){se(e,[...e.leftLine?[e.leftLine.x1,e.leftLine.y1]:[l,r],l,r]),null==(n=null==(t=e.leftLine)?void 0:t.set)||n.call(t,"stroke","transparent"),null==(o=null==(i=e.rightLine)?void 0:i.set)||o.call(i,"stroke","transparent")}const c=l+K*u;if(q.every((e=>e.left!==c))){const t=I(c),n=C(f.type,a);q.push({data:{time:t,value:n,...f.selfKey!==f.key?{key:f.selfKey}:{}},left:c,top:a}),se(e,[...e.prevPointer,c,a])}if(q.length<u&&function(e,t){const{originLeft:n,originTop:i,origin:o}=e;let l=1;for(;l<=t;){const t=n+K*l,r=q.some((e=>Math.abs(e.left-t)<=1));if(!r){let l=0;const r=q.find(((e,n)=>(e.left>t&&(l=n),e.left>t)));if(r){const s=JSON.parse(JSON.stringify(r)),a=q[l-1]||{left:n,top:i},f=~~((r.left-(t-K))/K),u=(r.top-a.top)/f;s.top=a.top+u,s.left=t,s.data={time:I(t),value:C(o.type,s.top),...o.selfKey!==o.key?{key:o.selfKey}:{}},q.splice(l,0,s),se(e,[a.left,a.top,s.left,s.top])}}l++}}(e,u),e.nextPoint){const t=G.get(f.key);!function(e,t){const{left:n,top:i,origin:o}=t,l=K/2,r=e.findIndex((e=>Math.abs(n-e.left)<l&&Math.abs(i-e.top)<l&&o.index!==e.origin.index));r>-1?(t.set({scaleX:2.5,scaleY:2.5}),t.coincidePoint=e[r]):t.set({scaleX:t.scale,scaleY:t.scale})}(t,e),null==t||t.forEach((e=>{e.left<=l||f.index===e.origin.index||(e.left<s?re(e,"#999"):re(e,e.origin.lineAttr.stroke))}))}}!function(e){var t,n;const{left:i}=e;if(q.length>0&&i<q[q.length-1].left){for(const e of N)e.left>i&&(e.leftLine&&h.value.remove(e.leftLine),h.value.remove(e));if(q=q.filter((e=>e.left<=i)),0===q.length){null==(n=null==(t=e.leftLine)?void 0:t.set)||n.call(t,e.origin.lineAttr);for(const e of N)e.leftLine&&h.value.remove(e.leftLine),h.value.remove(e)}if(q.length>0){const t=m(q);e.prevPointer=[t.left,t.top]}}}(e)}(e)})),e.on("mouseup",(t=>{if(L.show=!1,1===t.button){const{type:t,selfKey:n,dataIndex:i}=e.origin,o={...e.origin,data:{...e.origin.data,time:I(e.left),value:C(t,e.top)}};if(h.value.discardActiveObject(),q.length>0){const l=J.find((e=>e.type===t));let r=-1;const s=q.map((e=>e.data));if(e.nextPoint){if(2.5!==e.scaleX)return void fe({dataIndex:i,scaleValue:l});const t=e.coincidePoint.origin,n=t.data;r=t.index;const o=s.findIndex((e=>e.time===n.time));o>-1?s[o].value=n.value:s.push({...m(s),time:n.time,value:n.value})}const a=l.dataList.findIndex((e=>e.key===n));x("add",{...v(o,["index","selfKey","lineAttr"]),dataIndex:a,key:n,data:s}),ae({...o,data:s,coincideIndex:r})}else x("change",{...v(o,["selfKey","lineAttr"]),key:n}),ae(o,"change")}}))}(d),null==(p=G.get(c.key))||p.push(d))}(de(l,n),l,u,e)})),Promise.all(G.get(e.key)).then((t=>{const n=f.filter((e=>e));Q(t),h.value.add(...n,...t),function(e,t){const{max:n={},min:i={}}=t.panicValue||{},{max:o={},min:l={}}=t.diffValue||{};function r({show:t=!1,value:n,flickerable:i},o){!t&&n&&i&&e.forEach((e=>{const t=e.origin.data.value;"max"===o&&t<n||"min"===o&&t>n||W.add(e)}))}r(n,"max"),r(i,"min"),r(o,"max"),r(l,"min")}(t,e)}))}function re(e,t){["stroke","fill"].forEach((n=>{const i=e[n];i&&!["transparent","#fff","#ffffff","#FFFFFF"].includes(i)&&i!==t&&e.set(n,t)})),e.rightLine&&e.rightLine.stroke!==t&&e.rightLine.set("stroke",t)}function se(e,t){const[,,n,o]=t;e.clone((l=>{l.set({left:n,top:o,scaleX:1,scaleY:1}),e.prevPointer=[n,o];const r=i(t,e.origin.lineAttr);l.leftLine=r,N.add(l),h.value.add(r,l)}))}function ae(e,t="add",n=1){const{data:i,index:o,key:l,type:r,coincideIndex:s}=e;let{dataIndex:a}=e;const f=J.find((e=>e.type===r)),c=f.dataList.find(((e,t)=>(a=t,e.key===l)));switch(t){case"remove":c.list.splice(o,n),c.list[o-1]&&(c.list[o-1].breakpoint=!0);break;case"change":c.list[o]=i;break;default:{const e=Array.isArray(i)?i[0].time:i.time,t=u(e,c.list),n=Array.isArray(i)?i:[i];c.list.splice(t,s>-1?s-t+1:0,...n);break}}fe({dataIndex:a,scaleValue:f})}function fe(e){var t,n,i;if(N.size&&(null==(t=h.value)||t.remove(...ue([...N]))),N.clear(),q=[],e){const{dataIndex:t,scaleValue:i}=e,o=i.dataList[t];null==(n=h.value)||n.remove(...ue(G.get(o.key))),G.delete(o.key),le(o,t,i)}else G.size&&(null==(i=h.value)||i.remove(...ue(me()))),G.clear(),te()}function ue(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)})),t}function ce(e,t="moving"){const{title:n,type:i,data:o,unit:l,selfKey:r}=e.origin;L.point={x:e.left,y:e.top};const s=I(e.left),a=`${"hover"===t?o.value:C(i,e.top)}`;L.list=[`${n} ${a}${l||""}`,`时间 ${s.slice(-5)}`],L.sourceData=[{type:i,title:n,unit:l,key:r,time:s,value:a}],L.isTarget=!0,L.show=!0}function pe(e){e.setCoords();const t=6e4/O,n=e.prevPoint?e.prevPoint.left+t:j,i=T;e.top<X&&e.set("top",X),e.top>V&&e.set("top",V),e.left<n&&e.set("left",n),e.left>i&&e.set("left",i)}function de(e,t){if(c(e)&&function(e){const t=Date.parse(m(S.list)),n=p(e);return n>=D&&n<=t}(e.time)){const n=b(e.time),i=A(t.type,t.range,e.value);return[n,i<X?X:i>V?V:i]}}function me(){return g(Array.from(G.values()))}return e((()=>{Z()})),te(),function(){if(!Y.evented)return;let e=!1,i={x:0,y:0};h.value.on("mouse:up",(t=>{if(3===t.button&&function(e){L.show=!1;const{x:t=0,y:n=0}=e.pointer||{};if(t>=j&&t<=T&&n>=X&&n<=V)if(e.target){if("main"!==e.target.__type)return;i(e.pointer,e.target,["删除节点"]);const{minLeft:t,maxLeft:n,minTop:o,maxTop:l}=f(e.target);me().forEach((i=>{"main"===i.__type&&i.left>t&&i.left<n&&i.top>o&&i.top<l&&P.list.push({renderItem:()=>i.origin.title,origin:{...i.origin},mode:"remove",pointer:e.pointer})})),1===P.list.length&&(P.show=!1,console.log("当前时间段内无可删除节点"))}else i(e.pointer,null,["新增节点"]),$.forEach((n=>{B(me(),t,"key",2*K).includes(n.linkKey||n.key)||P.list.push({renderItem:()=>n.title,origin:{title:n.title,unit:n.unit,type:n.bigType,dataIndex:n.dataIndex,key:n.key,linkKey:n.linkKey},pointer:e.pointer})})),1===P.list.length&&(P.show=!1,H("repeat"),console.log("当前时间段内无可新增节点"));function i(e,t,n){Object.assign(P,{point:e,show:!0,target:t,list:n})}}(t),1===t.button&&e){e=!1;const t=ne();t.length>0?ie((()=>{const e=function(e){const t=e.reduce(((e,t)=>{const{key:n}=t.origin;return e[n]=e[n]?e[n].concat(t.origin):[t.origin],e}),{});return Object.keys(t).map((e=>{const n=t[e].sort(((e,t)=>Date.parse(e.data.time)-Date.parse(t.data.time)));return ae(n[0],"remove",n.length),n.map((e=>({...v(e,["selfKey","lineAttr"]),key:e.selfKey})))}))}(t);x("remove",e)})):s.emit(R)}})),h.value.on("mouse:down",(t=>{1!==t.button||t.target||(e=!0,i=t.pointer)})),h.value.on("mouse:move",(o=>{if(function(e){if(!w||P.show)return;const{target:t,pointer:n}=e,{x:i=0,y:o=0}=n;L.movable=!1,(i<j||i>T)&&(L.show=!1);if(!t&&i>=j&&i<=T){const e=o>=X&&o<=V,l=o>=_&&o<=z;if(e||l){const l=I(i);L.sourceData=e?J.map((e=>{const{type:t,title:n,unit:i}=e;return{type:t,title:n,unit:i,time:l,value:C(t,o)}})):[{type:"tree",time:l}],L.isTarget=!!t,L.point=n,L.movable=!0}else L.show=!1}}(o),!e)return;const{x:l,y:r}=i,{x:s,y:a}=o.pointer;R&&h.value.remove(R),R=new t.Rect({...n,fill:"#CAF982",opacity:.4,...E,left:l,top:r,width:s-l,height:a-r,objectCaching:!0}),R.areaPos={startPos:i,endPos:o.pointer},h.value.add(R)}))}(),{redrawPoints:fe,clickMenu:function({item:e,target:t}){const n={...e.origin};"remove"===e.mode?(x("remove",n),ae(n,"remove")):(Object.assign(n,{data:{time:I(e.pointer.x),value:C(e.origin.type,e.pointer.y),...e.origin.linkKey?{key:e.origin.key}:{}}}),x("add",n),ae({...n,key:e.origin.linkKey||e.origin.key}))},moveLimit:pe,setPopup:ce,updateData:ae,getGridPoints:me,getContainPoints:ne,showDialog:ie,removeCurrentSelection:oe}}export{h as useCenter};
1
+ import{fabric as e}from"../../../../../shared/utils/fabricjs/index.js";import{defaultStyle as t,drawLine as n,drawPoint as i}from"../useDraw.js";import{useGrid as o}from"../useGrid.js";import{useBirthProcessCumputedPoint as l}from"../useCumputedPoint.js";import{bus as r}from"../useEvent.js";import{useCommon as s}from"../useCommon.js";import"vue";import{getPointRange as a,getIndex as f,isEffectiveNode as u,getTime as c}from"../../utils/index.js";import{cloneDeep as p,last as d,omit as m,flatten as v}from"lodash-es";import"date-fns";import"../temperature/useShadow.js";import"@vueuse/shared";import"naive-ui";import{useIntervalFn as g}from"@vueuse/core";function y(y,h,k,x,L,P){const{computedX:w,computedY:b,getXValue:A,getYValue:I}=l(h),{xCellWidth:C,pointSelectionStyle:K,originX:E,endX:j,originY:T,endY:X,event:V,scaleValues:Y,xAxis:M,startTime:S,timeXCell:D,itemList:F,dialog:O,topGridOriginY:$,topGridEndY:_}=h,z=new Map,G=new Set,N=p(Y);let J=[],q=null;const R=new Set;o(y,h);const{getEqualXTypes:W,handleAddPrevent:B,setPrevAndNextPoint:H,getPointEventProps:Q}=s(y,k,h),{pause:U,resume:Z}=g((()=>{!function(){if(!R.size)return;for(const e of R)e.set("opacity",1===e.opacity?.5:1);y.value.renderAll()}()}),800);function ee(){N.forEach((e=>{const{range:t=[],spaceValue:i}=e;i&&(t[0]||t[1])&&e.dataList.forEach(((t,i)=>{t.show&&(!function(e,t){const{max:i={},min:o={}}=e.panicValue||{},{max:l={},min:r={}}=e.diffValue||{};function s({show:e=!1,value:i,name:o,lineStyle:l}){if(!e||!i)return;const r=b(t.type,t.range,i),s=n([E,r,j,r],{...l,evented:!0,lockMovementX:!0,lockMovementY:!0,hoverCursor:"pointer"});V.hovered&&o&&(s.on("mousemove",(({pointer:e})=>{x.point={...e||{x:s.left,y:s.top}},x.list=[`${o} ${i}${t.unit||""}`],x.show=!0})),s.on("mouseout",(()=>{x.show=!1}))),y.value.add(s)}s(i),s(o),s(l),s(r)}(t,e),oe(t,i,e))}))}))}function te(e=[]){if(!(null==q?void 0:q.areaPos))return[];const{startPos:t,endPos:n}=q.areaPos,[i,o]=[t.x,n.x].sort(((e,t)=>e-t)),[l,r]=[t.y,n.y].sort(((e,t)=>e-t));return(e.length?e:de()).filter((e=>e.left>=i&&e.left<=o&&e.top>=l&&e.top<=r))}function ne(e){O.warning({maskClosable:!1,closeOnEsc:!1,title:"警告",content:"确认删除当前选中的节点?",positiveText:"确定",negativeText:"取消",onPositiveClick:()=>{e(),ie()},onNegativeClick:()=>ie(),onClose:()=>ie()})}function ie(){q&&y.value.remove(q),q=null}function oe(e,t,o){var l;const{type:r,unit:s,dataList:a=[]}=o,f=[];z.set(e.key,[]),function(e,t){R.size&&[...R].forEach((n=>{const{dataIndex:i,type:o}=n.origin;i===t&&o===e&&R.delete(n)}))}(r,t),null==(l=e.list)||l.forEach(((l,u)=>{!function(e,l,u,c){var p;let v,g,h=c;l.key&&(h=a.find((e=>e.key===l.key)));const{pointAttr:L={},lineAttr:P={},title:w="",key:b,type:K="circle"}=h,E=pe(c.list[u+1],o);e&&E&&!l.breakpoint&&e[0]!==E[0]&&(g=n([...e,...E],P));const j=f[u-1],T={origin:{data:l,title:w,key:c.key,selfKey:b,unit:s,type:r,dataIndex:t,index:u,lineAttr:P},__type:"main",leftLine:j,rightLine:g,...L,...Q()};e&&(j||(T.leftLine=null),v=i(K,{left:e[0],top:e[1],...T}));f.push(g),v&&(v.originLeft=v.left,v.originTop=v.top,function(e){V.hovered&&(e.on("mouseover",(()=>{ue(e,"hover")})),e.on("mouseout",(()=>{x.show=!1})));if(e.lockMovementX&&e.lockMovementY)return;e.on("moving",(()=>{ce(e),function(e){var t,n;null==(t=e.leftLine)||t.setCoords().set({x2:e.left,y2:e.top}),null==(n=e.rightLine)||n.setCoords().set({x1:e.left,y1:e.top})}(e),V.hovered&&ue(e),function(e){var t,n,i,o;const{originLeft:l,originTop:r,left:s,top:a,origin:f}=e,u=~~((s-l)/C);if(s>l+C){if(0===J.length){re(e,[...e.leftLine?[e.leftLine.x1,e.leftLine.y1]:[l,r],l,r]),null==(n=null==(t=e.leftLine)?void 0:t.set)||n.call(t,"stroke","transparent"),null==(o=null==(i=e.rightLine)?void 0:i.set)||o.call(i,"stroke","transparent")}const c=l+C*u;if(J.every((e=>e.left!==c))){const t=A(c),n=I(f.type,a);J.push({data:{time:t,value:n,...f.selfKey!==f.key?{key:f.selfKey}:{}},left:c,top:a}),re(e,[...e.prevPointer,c,a])}if(J.length<u&&function(e,t){const{originLeft:n,originTop:i,origin:o}=e;let l=1;for(;l<=t;){const t=n+C*l,r=J.some((e=>Math.abs(e.left-t)<=1));if(!r){let l=0;const r=J.find(((e,n)=>(e.left>t&&(l=n),e.left>t)));if(r){const s=JSON.parse(JSON.stringify(r)),a=J[l-1]||{left:n,top:i},f=~~((r.left-(t-C))/C),u=(r.top-a.top)/f;s.top=a.top+u,s.left=t,s.data={time:A(t),value:I(o.type,s.top),...o.selfKey!==o.key?{key:o.selfKey}:{}},J.splice(l,0,s),re(e,[a.left,a.top,s.left,s.top])}}l++}}(e,u),e.nextPoint){const t=z.get(f.key);!function(e,t){const{left:n,top:i,origin:o}=t,l=C/2,r=e.findIndex((e=>Math.abs(n-e.left)<l&&Math.abs(i-e.top)<l&&o.index!==e.origin.index));r>-1?(t.set({scaleX:2.5,scaleY:2.5}),t.coincidePoint=e[r]):t.set({scaleX:t.scale,scaleY:t.scale})}(t,e),null==t||t.forEach((e=>{e.left<=l||f.index===e.origin.index||(e.left<s?le(e,"#999"):le(e,e.origin.lineAttr.stroke))}))}}!function(e){var t,n;const{left:i}=e;if(J.length>0&&i<J[J.length-1].left){for(const e of G)e.left>i&&(e.leftLine&&y.value.remove(e.leftLine),y.value.remove(e));if(J=J.filter((e=>e.left<=i)),0===J.length){null==(n=null==(t=e.leftLine)?void 0:t.set)||n.call(t,e.origin.lineAttr);for(const e of G)e.leftLine&&y.value.remove(e.leftLine),y.value.remove(e)}if(J.length>0){const t=d(J);e.prevPointer=[t.left,t.top]}}}(e)}(e)})),e.on("mouseup",(t=>{if(x.show=!1,1===t.button){const{type:t,selfKey:n,dataIndex:i}=e.origin,o={...e.origin,data:{...e.origin.data,time:A(e.left),value:I(t,e.top)}};if(y.value.discardActiveObject(),J.length>0){const l=N.find((e=>e.type===t));let r=-1;const s=J.map((e=>e.data));if(e.nextPoint){if(2.5!==e.scaleX)return void ae({dataIndex:i,scaleValue:l});const t=e.coincidePoint.origin,n=t.data;r=t.index;const o=s.findIndex((e=>e.time===n.time));o>-1?s[o].value=n.value:s.push({...d(s),time:n.time,value:n.value})}const a=l.dataList.findIndex((e=>e.key===n));k("add",{...m(o,["index","selfKey","lineAttr"]),dataIndex:a,key:n,data:s}),se({...o,data:s,coincideIndex:r})}else k("change",{...m(o,["selfKey","lineAttr"]),key:n}),se(o,"change")}}))}(v),null==(p=z.get(c.key))||p.push(v))}(pe(l,o),l,u,e)})),Promise.all(z.get(e.key)).then((t=>{const n=f.filter((e=>e));H(t),y.value.add(...n,...t),function(e,t){const{max:n={},min:i={}}=t.panicValue||{},{max:o={},min:l={}}=t.diffValue||{};function r({show:t=!1,value:n,flickerable:i},o){!t&&n&&i&&e.forEach((e=>{const t=e.origin.data.value;"max"===o&&t<n||"min"===o&&t>n||R.add(e)}))}r(n,"max"),r(i,"min"),r(o,"max"),r(l,"min")}(t,e)}))}function le(e,t){["stroke","fill"].forEach((n=>{const i=e[n];i&&!["transparent","#fff","#ffffff","#FFFFFF"].includes(i)&&i!==t&&e.set(n,t)})),e.rightLine&&e.rightLine.stroke!==t&&e.rightLine.set("stroke",t)}function re(e,t){const[,,i,o]=t;e.clone((l=>{l.set({left:i,top:o,scaleX:1,scaleY:1}),e.prevPointer=[i,o];const r=n(t,e.origin.lineAttr);l.leftLine=r,G.add(l),y.value.add(r,l)}))}function se(e,t="add",n=1){const{data:i,index:o,key:l,type:r,coincideIndex:s}=e;let{dataIndex:a}=e;const u=N.find((e=>e.type===r)),c=u.dataList.find(((e,t)=>(a=t,e.key===l)));switch(t){case"remove":c.list.splice(o,n),c.list[o-1]&&(c.list[o-1].breakpoint=!0);break;case"change":c.list[o]=i;break;default:{const e=Array.isArray(i)?i[0].time:i.time,t=f(e,c.list),n=Array.isArray(i)?i:[i];c.list.splice(t,s>-1?s-t+1:0,...n);break}}ae({dataIndex:a,scaleValue:u})}function ae(e){var t,n,i;if(G.size&&(null==(t=y.value)||t.remove(...fe([...G]))),G.clear(),J=[],e){const{dataIndex:t,scaleValue:i}=e,o=i.dataList[t];null==(n=y.value)||n.remove(...fe(z.get(o.key))),z.delete(o.key),oe(o,t,i)}else z.size&&(null==(i=y.value)||i.remove(...fe(de()))),z.clear(),ee()}function fe(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)})),t}function ue(e,t="moving"){const{title:n,type:i,data:o,unit:l,selfKey:r}=e.origin;x.point={x:e.left,y:e.top};const s=A(e.left),a=`${"hover"===t?o.value:I(i,e.top)}`;x.list=[`${n} ${a}${l||""}`,`时间 ${s.slice(-5)}`],x.sourceData=[{type:i,title:n,unit:l,key:r,time:s,value:a}],x.isTarget=!0,x.show=!0}function ce(e){e.setCoords();const t=6e4/D,n=e.prevPoint?e.prevPoint.left+t:E,i=j;e.top<T&&e.set("top",T),e.top>X&&e.set("top",X),e.left<n&&e.set("left",n),e.left>i&&e.set("left",i)}function pe(e,t){if(u(e)&&function(e){const t=Date.parse(d(M.list)),n=c(e);return n>=S&&n<=t}(e.time)){const n=w(e.time),i=b(t.type,t.range,e.value);return[n,i<T?T:i>X?X:i]}}function de(){return v(Array.from(z.values()))}return ee(),function(){if(!V.evented)return;let n=!1,i={x:0,y:0};y.value.on("mouse:up",(e=>{if(3===e.button&&function(e){x.show=!1;const{x:t=0,y:n=0}=e.pointer||{};if(t>=E&&t<=j&&n>=T&&n<=X)if(e.target){if("main"!==e.target.__type)return;i(e.pointer,e.target,["删除节点"]);const{minLeft:t,maxLeft:n,minTop:o,maxTop:l}=a(e.target);de().forEach((i=>{"main"===i.__type&&i.left>t&&i.left<n&&i.top>o&&i.top<l&&L.list.push({renderItem:()=>i.origin.title,origin:{...i.origin},mode:"remove",pointer:e.pointer})})),1===L.list.length&&(L.show=!1,console.log("当前时间段内无可删除节点"))}else i(e.pointer,null,["新增节点"]),F.forEach((n=>{W(de(),t,"key",2*C).includes(n.linkKey||n.key)||L.list.push({renderItem:()=>n.title,origin:{title:n.title,unit:n.unit,type:n.bigType,dataIndex:n.dataIndex,key:n.key,linkKey:n.linkKey},pointer:e.pointer})})),1===L.list.length&&(L.show=!1,B("repeat"),console.log("当前时间段内无可新增节点"));function i(e,t,n){Object.assign(L,{point:e,show:!0,target:t,list:n})}}(e),1===e.button&&n){n=!1;const e=te();e.length>0?ne((()=>{const t=function(e){const t=e.reduce(((e,t)=>{const{key:n}=t.origin;return e[n]=e[n]?e[n].concat(t.origin):[t.origin],e}),{});return Object.keys(t).map((e=>{const n=t[e].sort(((e,t)=>Date.parse(e.data.time)-Date.parse(t.data.time)));return se(n[0],"remove",n.length),n.map((e=>({...m(e,["selfKey","lineAttr"]),key:e.selfKey})))}))}(e);k("remove",t)})):r.emit(q)}})),y.value.on("mouse:down",(e=>{1!==e.button||e.target||(n=!0,i=e.pointer)})),y.value.on("mouse:move",(o=>{if(function(e){if(!P||L.show)return;const{target:t,pointer:n}=e,{x:i=0,y:o=0}=n;x.movable=!1,(i<E||i>j)&&(x.show=!1);if(!t&&i>=E&&i<=j){const e=o>=T&&o<=X,l=o>=$&&o<=_;if(e||l){const l=A(i);x.sourceData=e?N.map((e=>{const{type:t,title:n,unit:i}=e;return{type:t,title:n,unit:i,time:l,value:I(t,o)}})):[{type:"tree",time:l}],x.isTarget=!!t,x.point=n,x.movable=!0}else x.show=!1}}(o),!n)return;const{x:l,y:r}=i,{x:s,y:a}=o.pointer;q&&y.value.remove(q),q=new e.Rect({...t,fill:"#CAF982",opacity:.4,...K,left:l,top:r,width:s-l,height:a-r,objectCaching:!0}),q.areaPos={startPos:i,endPos:o.pointer},y.value.add(q)}))}(),{redrawPoints:ae,clickMenu:function({item:e,target:t}){const n={...e.origin};"remove"===e.mode?(k("remove",n),se(n,"remove")):(Object.assign(n,{data:{time:A(e.pointer.x),value:I(e.origin.type,e.pointer.y),...e.origin.linkKey?{key:e.origin.key}:{}}}),k("add",n),se({...n,key:e.origin.linkKey||e.origin.key}))},moveLimit:ce,setPopup:ue,updateData:se,getGridPoints:de,getContainPoints:te,showDialog:ne,removeCurrentSelection:ie,pauseFlickerPoint:U}}export{y as useCenter};
@@ -1 +1 @@
1
- import{ref as e,computed as t,reactive as a,unref as r,onMounted as i,nextTick as o,watch as l}from"vue";import{useDialog as n}from"naive-ui";import{defaultBorderStyle as u}from"../useDraw.js";import"../../../../../shared/utils/fabricjs/index.js";import{format as s}from"date-fns";import{getChildrenSize as d}from"../../utils/index.js";import{cloneDeep as c,range as p,flatten as m}from"lodash-es";import"../useEvent.js";import"../temperature/useShadow.js";import{OTHER_MENU as v}from"../../constants/index.js";import"@vueuse/shared";import"@vueuse/core";import{useTop as h}from"./useTop.js";import{useLeft as f}from"./useLeft.js";import{useCenter as g}from"./useCenter.js";import{useOther as y}from"./useOther.js";function w(w,x,b,j,C,Y,H){const S=n(),T=e(),D=e(),A=e();let M=null;const X=t((()=>x.data.layout||{top:"drug",center:"xAxis",bottom:"intraoperatively"})),G=t((()=>{var e;return null!=(e=x.data.left.width)?e:0})),V=t((()=>{const{grid:e}=x.data;return e.mainXCell*e.subXCell})),k=t((()=>{const{grid:e}=x.data;return e.mainYCell*e.subYCell})),P=t((()=>{const{treeData:e=[],show:t=!0}=x.data.top;return t?d(e):0})),L=t((()=>x.data.top.tree.cellHeight)),N=t((()=>L.value*P.value)),O=t((()=>ie(ae("drug")||"top"))),E=t((()=>O.value+N.value)),W=t((()=>{var e;return Date.parse((null==(e=x.data.xAxis)?void 0:e.startTime)||s(new Date,"yyyy-MM-dd HH:mm:ss"))})),I=t((()=>{const e=c(x.data.xAxis),{spaceValue:t,spaceTimeStamp:a}=e,r=p(V.value/t+1).map((r=>0===r?e.startTime:s(new Date(W.value+r*t*a),"yyyy-MM-dd HH:mm:ss")));return{...e,list:r,left:G.value}})),q=function(){const{show:e=!0}=x.data.top;if(!e)return[];const t=c(x.data.top.treeData);let a=0;const{cellWidth:r,cellHeight:i}=x.data.top.tree;return function e(t,o=0){t.forEach((t=>{var l;const n={top:a*i+O.value,left:o*r,width:r,height:i};if(a++,null==(l=t.children)?void 0:l.length){a--;const r=d(t.children);n.height=r*i,e(t.children,o+1)}else n.width=G.value-n.left;Object.assign(t,n)}))}(t),t}(),z=t((()=>ie(ae("xAxis")||"center"))),B=t((()=>{var e;const{width:t,right:a}=x.data;if(!a)return t;return t-(null!=(e=a.width)?e:0)})),F=t((()=>ie(ae("intraoperatively")||"bottom"))),J=t((()=>{var e;const{show:t=!0,height:a}=(null==(e=x.data.other)?void 0:e.mark)||{};return t&&a?a:0})),K=t((()=>F.value+(x.data.height-N.value-I.value.height-J.value))),Q=t((()=>(B.value-G.value)/V.value)),R=t((()=>(K.value-F.value)/k.value)),U=t((()=>I.value.spaceTimeStamp/Q.value)),Z=t((()=>{const{scaleValues:e}=x.data;return m(e.map((e=>e.dataList.filter((e=>e.show)).map(((t,a)=>({...t,bigType:e.type,unit:e.unit,dataIndex:a}))))))})),$=t((()=>oe("pulse"))),_=t((()=>oe("temperature"))),ee=t((()=>{var e;return(null==(e=x.data.grid)?void 0:e.event)||{selectable:!0,evented:!0,hovered:!0}})),te=a({canvasWidth:x.data.width,canvasHeight:x.data.height,borderStyle:{...u,...x.data.borderStyle},pointSelectionStyle:x.data.pointSelectionStyle||{},grid:x.data.grid,top:x.data.top,left:x.data.left,other:x.data.other,topGridYNumber:r(P),topGridYCellHeight:r(L),topGridOriginY:r(O),topGridEndY:r(E),treeData:q,xAxis:r(I),originYXAxis:r(z),startTime:r(W),timeXCell:r(U),gridXNumber:r(V),gridYNumber:r(k),xCellWidth:r(Q),yCellHeight:r(R),originX:r(G),endX:r(B),originY:r(F),endY:r(K),markHeight:r(J),itemList:r(Z),scaleValues:x.data.scaleValues,pulseYCell:r($),temperatureYCell:r(_),event:r(ee),dialog:S});function ae(e){let t="";return Object.entries(X.value).some((([a,r])=>{if(r===e)return t=a,!0})),t}function re(e){const t=X.value[e],a=I.value.height;switch(t){case"drug":return N.value;case"xAxis":return a;default:return x.data.height-N.value-a}}function ie(e){switch(e){case"top":return 0;case"center":return re("top");default:return re("top")+re("center")}}function oe(e){const{scaleValues:t}=x.data,a=t.find((t=>t.type===e));return R.value*(a.spaceGridNumber||1)/(a.spaceValue||1)}return i((async()=>{await o(),h(w,te,b,C);const{redrawPoints:e,clickMenu:t,moveLimit:a,setPopup:r,updateData:i,getGridPoints:l,getContainPoints:n,showDialog:u,removeCurrentSelection:s}=g(w,te,b,C,Y,H);f(w,te,b,C,a,r,i,l);const{clickMenu:d}=y(w,te,b,C,Y,a,n,u,s);D.value=e,A.value=e=>{const{item:a}=e;a.type&&v.map((e=>e.type)).includes(a.type)?d(e):t(e)}})),H&&l((()=>null==C?void 0:C.point),(()=>{C.movable?(C.show=!0,M&&clearTimeout(M),M=setTimeout((()=>{C.show=!1,C.movable=!1}),3e3)):M&&clearTimeout(M)}),{deep:!0}),{propItems:te,redrawPoints:D,select:T,clickMenu:A}}export{w as useSurgicalAnesthesiaChart};
1
+ import{ref as e,computed as t,reactive as a,unref as r,onMounted as i,nextTick as o,onBeforeUnmount as l,watch as n}from"vue";import{useDialog as u}from"naive-ui";import{defaultBorderStyle as s}from"../useDraw.js";import"../../../../../shared/utils/fabricjs/index.js";import{format as d}from"date-fns";import{getChildrenSize as c}from"../../utils/index.js";import{cloneDeep as p,range as m,flatten as v}from"lodash-es";import"../useEvent.js";import"../temperature/useShadow.js";import{OTHER_MENU as h}from"../../constants/index.js";import"@vueuse/shared";import"@vueuse/core";import{useTop as f}from"./useTop.js";import{useLeft as g}from"./useLeft.js";import{useCenter as w}from"./useCenter.js";import{useOther as y}from"./useOther.js";function b(b,x,j,C,Y,H,S){var T;const D=u(),A=e(),M=e(),X=e(),k=e();let G=null;const N=c((null==(T=x.data.top)?void 0:T.treeData)||[]),P=t((()=>x.data.layout||{top:"drug",center:"xAxis",bottom:"intraoperatively"})),V=t((()=>{var e;return null!=(e=x.data.left.width)?e:0})),L=t((()=>{const{grid:e}=x.data;return e.mainXCell*e.subXCell})),O=t((()=>{const{grid:e}=x.data;return e.mainYCell*e.subYCell})),E=t((()=>{const{show:e=!0,tree:t={}}=x.data.top;if(!e)return 0;const{rowNumber:a=N}=t;return N<a?a:N})),W=t((()=>x.data.top.tree.cellHeight)),I=t((()=>W.value*E.value)),F=t((()=>ue(le("drug")||"top"))),q=t((()=>F.value+I.value)),z=t((()=>{var e;return Date.parse((null==(e=x.data.xAxis)?void 0:e.startTime)||d(new Date,"yyyy-MM-dd HH:mm:ss"))})),B=t((()=>{const e=p(x.data.xAxis),{spaceValue:t,spaceTimeStamp:a}=e,r=m(L.value/t+1).map((r=>0===r?e.startTime:d(new Date(z.value+r*t*a),"yyyy-MM-dd HH:mm:ss")));return{...e,list:r,left:V.value}})),J=function(){const{show:e=!0,tree:t={}}=x.data.top;if(!e)return[];const a=p(x.data.top.treeData);let r=0;const{cellWidth:i,cellHeight:o}=x.data.top.tree,{rowNumber:l=N}=t;N<l&&a.push(...m(l-N).map((()=>({}))));return function e(t,a=0){t.forEach((t=>{var l;const n={top:r*o+F.value,left:a*i,width:i,height:o};if(r++,null==(l=t.children)?void 0:l.length){r--;const i=c(t.children);n.height=i*o,e(t.children,a+1)}else n.width=V.value-n.left;Object.assign(t,n)}))}(a),a}(),K=t((()=>ue(le("xAxis")||"center"))),Q=t((()=>{var e;const{width:t,right:a}=x.data;if(!a)return t;return t-(null!=(e=a.width)?e:0)})),R=t((()=>ue(le("intraoperatively")||"bottom"))),U=t((()=>{var e;const{show:t=!0,height:a}=(null==(e=x.data.other)?void 0:e.mark)||{};return t&&a?a:0})),Z=t((()=>R.value+(x.data.height-I.value-B.value.height-U.value))),$=t((()=>(Q.value-V.value)/L.value)),_=t((()=>(Z.value-R.value)/O.value)),ee=t((()=>B.value.spaceTimeStamp/$.value)),te=t((()=>{const{scaleValues:e}=x.data;return v(e.map((e=>e.dataList.filter((e=>e.show)).map(((t,a)=>({...t,bigType:e.type,unit:e.unit,dataIndex:a}))))))})),ae=t((()=>se("pulse"))),re=t((()=>se("temperature"))),ie=t((()=>{var e;return(null==(e=x.data.grid)?void 0:e.event)||{selectable:!0,evented:!0,hovered:!0}})),oe=a({canvasWidth:x.data.width,canvasHeight:x.data.height,borderStyle:{...s,...x.data.borderStyle},pointSelectionStyle:x.data.pointSelectionStyle||{},grid:x.data.grid,top:x.data.top,left:x.data.left,other:x.data.other,topGridYNumber:r(E),topGridYCellHeight:r(W),topGridOriginY:r(F),topGridEndY:r(q),treeData:J,xAxis:r(B),originYXAxis:r(K),startTime:r(z),timeXCell:r(ee),gridXNumber:r(L),gridYNumber:r(O),xCellWidth:r($),yCellHeight:r(_),originX:r(V),endX:r(Q),originY:r(R),endY:r(Z),markHeight:r(U),itemList:r(te),scaleValues:x.data.scaleValues,pulseYCell:r(ae),temperatureYCell:r(re),event:r(ie),dialog:D});function le(e){let t="";return Object.entries(P.value).some((([a,r])=>{if(r===e)return t=a,!0})),t}function ne(e){const t=P.value[e],a=B.value.height;switch(t){case"drug":return I.value;case"xAxis":return a;default:return x.data.height-I.value-a}}function ue(e){switch(e){case"top":return 0;case"center":return ne("top");default:return ne("top")+ne("center")}}function se(e){const{scaleValues:t}=x.data,a=t.find((t=>t.type===e));return _.value*(a.spaceGridNumber||1)/(a.spaceValue||1)}return i((async()=>{await o(),f(b,oe,j,Y);const{redrawPoints:e,clickMenu:t,moveLimit:a,setPopup:r,updateData:i,getGridPoints:l,getContainPoints:n,showDialog:u,removeCurrentSelection:s,pauseFlickerPoint:d}=w(b,oe,j,Y,H,S);k.value=d,g(b,oe,j,Y,a,r,i,l);const{clickMenu:c}=y(b,oe,j,Y,H,a,n,u,s);M.value=e,X.value=e=>{const{item:a}=e;a.type&&h.map((e=>e.type)).includes(a.type)?c(e):t(e)}})),l((()=>{k.value()})),S&&n((()=>null==Y?void 0:Y.point),(()=>{Y.movable?(Y.show=!0,G&&clearTimeout(G),G=setTimeout((()=>{Y.show=!1,Y.movable=!1}),3e3)):G&&clearTimeout(G)}),{deep:!0}),{propItems:oe,redrawPoints:M,select:A,clickMenu:X}}export{b as useSurgicalAnesthesiaChart};
@@ -475,9 +475,9 @@ declare const _default: import("vue").DefineComponent<{
475
475
  hide: boolean;
476
476
  }>;
477
477
  draggable: boolean;
478
+ isHighlightRow: boolean;
478
479
  idx: number;
479
480
  isHighlight: boolean;
480
- isHighlightRow: boolean;
481
481
  isFieldSet: boolean;
482
482
  fieldDescribeMode: "column" | "tooltip";
483
483
  }>;
@@ -496,9 +496,9 @@ declare const _default: import("vue").DefineComponent<{
496
496
  hide: boolean;
497
497
  }>;
498
498
  draggable: boolean;
499
+ isHighlightRow: boolean;
499
500
  idx: number;
500
501
  isHighlight: boolean;
501
- isHighlightRow: boolean;
502
502
  isFieldSet: boolean;
503
503
  fieldDescribeMode: "column" | "tooltip";
504
504
  }>;
@@ -613,9 +613,9 @@ declare const _default: import("vue").DefineComponent<{
613
613
  hide: boolean;
614
614
  }>;
615
615
  draggable: boolean;
616
+ isHighlightRow: boolean;
616
617
  idx: number;
617
618
  isHighlight: boolean;
618
- isHighlightRow: boolean;
619
619
  isFieldSet: boolean;
620
620
  fieldDescribeMode: "column" | "tooltip";
621
621
  }>;
@@ -317,9 +317,9 @@ declare const _default: import("vue").DefineComponent<{
317
317
  hide: boolean;
318
318
  }>;
319
319
  draggable: boolean;
320
+ isHighlightRow: boolean;
320
321
  idx: number;
321
322
  isHighlight: boolean;
322
- isHighlightRow: boolean;
323
323
  isFieldSet: boolean;
324
324
  fieldDescribeMode: "column" | "tooltip";
325
325
  }>;
@@ -826,6 +826,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
826
826
  anchorIdList: import("vue").Ref<{
827
827
  name: string;
828
828
  title: string;
829
+ index: number;
829
830
  }[]>;
830
831
  onScroll: (scrollEvent: Event) => void;
831
832
  callLifeCycle: <T_2 extends "onSetup" | "beforeSetValue" | "beforeRequest" | "afterRequest" | "afterOptionInit">(lifeCycleName: T_2, payload?: Parameters<Required<Partial<{
@@ -7392,6 +7393,7 @@ declare const FormConfig: SFCWithInstall<import("vue").DefineComponent<{
7392
7393
  anchorIdList: import("vue").Ref<{
7393
7394
  name: string;
7394
7395
  title: string;
7396
+ index: number;
7395
7397
  }[]>;
7396
7398
  onScroll: (scrollEvent: Event) => void;
7397
7399
  callLifeCycle: <T_2 extends "onSetup" | "beforeSetValue" | "beforeRequest" | "afterRequest" | "afterOptionInit">(lifeCycleName: T_2, payload?: Parameters<Required<Partial<{
@@ -829,6 +829,7 @@ declare const _default: import("vue").DefineComponent<{
829
829
  anchorIdList: Ref<{
830
830
  name: string;
831
831
  title: string;
832
+ index: number;
832
833
  }[]>;
833
834
  onScroll: (scrollEvent: Event) => void;
834
835
  callLifeCycle: <T_2 extends "onSetup" | "beforeSetValue" | "beforeRequest" | "afterRequest" | "afterOptionInit">(lifeCycleName: T_2, payload?: Parameters<Required<Partial<{
@@ -7395,6 +7396,7 @@ declare const _default: import("vue").DefineComponent<{
7395
7396
  anchorIdList: Ref<{
7396
7397
  name: string;
7397
7398
  title: string;
7399
+ index: number;
7398
7400
  }[]>;
7399
7401
  onScroll: (scrollEvent: Event) => void;
7400
7402
  callLifeCycle: <T_2 extends "onSetup" | "beforeSetValue" | "beforeRequest" | "afterRequest" | "afterOptionInit">(lifeCycleName: T_2, payload?: Parameters<Required<Partial<{
@@ -438,6 +438,7 @@ declare const _default: import("vue").DefineComponent<{}, {
438
438
  anchorIdList: import("vue").Ref<{
439
439
  name: string;
440
440
  title: string;
441
+ index: number;
441
442
  }[]>;
442
443
  onScroll: (scrollEvent: Event) => void;
443
444
  callLifeCycle: <T_2 extends "onSetup" | "beforeSetValue" | "beforeRequest" | "afterRequest" | "afterOptionInit">(lifeCycleName: T_2, payload?: Parameters<Required<Partial<{
@@ -5915,6 +5915,7 @@ declare const _default: import("vue").DefineComponent<{
5915
5915
  anchorIdList: import("vue").Ref<{
5916
5916
  name: string;
5917
5917
  title: string;
5918
+ index: number;
5918
5919
  }[]>;
5919
5920
  onScroll: (scrollEvent: Event) => void;
5920
5921
  callLifeCycle: <T extends "onSetup" | "beforeSetValue" | "beforeRequest" | "afterRequest" | "afterOptionInit">(lifeCycleName: T, payload?: Parameters<Required<Partial<{
@@ -425,6 +425,7 @@ declare const FormRender: SFCWithInstall<import("vue").DefineComponent<{}, {
425
425
  anchorIdList: import("vue").Ref<{
426
426
  name: string;
427
427
  title: string;
428
+ index: number;
428
429
  }[]>;
429
430
  onScroll: (scrollEvent: Event) => void;
430
431
  callLifeCycle: <T extends "onSetup" | "beforeSetValue" | "beforeRequest" | "afterRequest" | "afterOptionInit">(lifeCycleName: T, payload?: Parameters<Required<Partial<{
@@ -420,6 +420,7 @@ declare const _default: import("vue").DefineComponent<{
420
420
  anchorIdList: import("vue").Ref<{
421
421
  name: string;
422
422
  title: string;
423
+ index: number;
423
424
  }[]>;
424
425
  onScroll: (scrollEvent: Event) => void;
425
426
  callLifeCycle: <T extends "onSetup" | "beforeSetValue" | "beforeRequest" | "afterRequest" | "afterOptionInit">(lifeCycleName: T, payload?: Parameters<Required<Partial<{
@@ -423,6 +423,7 @@ declare const _default: import("vue").DefineComponent<{}, {
423
423
  anchorIdList: import("vue").Ref<{
424
424
  name: string;
425
425
  title: string;
426
+ index: number;
426
427
  }[]>;
427
428
  onScroll: (scrollEvent: Event) => void;
428
429
  callLifeCycle: <T extends "onSetup" | "beforeSetValue" | "beforeRequest" | "afterRequest" | "afterOptionInit">(lifeCycleName: T, payload?: Parameters<Required<Partial<{
@@ -8,6 +8,7 @@ export declare function useAnchor(props: Readonly<FormRenderProps>, emit: AnyFn,
8
8
  anchorIdList: Ref<{
9
9
  name: string;
10
10
  title: string;
11
+ index: number;
11
12
  }[]>;
12
13
  generateAnchorList: (formModel: Form) => Promise<void>;
13
14
  updateAnchorList: (field: GeneralField) => void;
@@ -1 +1 @@
1
- import{doAnimation as e}from"../../../../shared/utils/anime.js";import{Path as o}from"@formily/path";import{useDebounceFn as t,watchOnce as r}from"@vueuse/core";import{ref as n,computed as l,nextTick as i}from"vue";import"../../../../shared/utils/index.js";import"@formily/core";import"@vicons/ionicons5";import"@vue/shared";import"lodash-es";import"naive-ui";import"date-fns";import{createLinebarId as a}from"../utils/schema.js";function s(s,u,c,m){const v=n(),p=n(""),f=n([]),d=async function(e){var o;f.value=Object.values(e.fields).reduce(((e,o)=>{var t,r;return"LINEBAR"===o.componentType&&"visible"===o.selfDisplay&&e.push({title:null!=(r=null==(t=o.componentProps)?void 0:t.title)?r:o.title,name:o.address.toString()}),e}),[]),await i(),null==(o=v.value)||o.syncBarPosition()};let h=!1;async function y(t){h=!0;try{if(!c.value)return;m.trigger(o.parse(t),!0),await i();const r=c.value.querySelector(`#${a(t)}`);if(!r)return;await new Promise((o=>{e(c.value.scrollTop,r.offsetTop,300,(e=>{var o;null==(o=c.value)||o.scrollTo({top:e})}),"easeInSine",(()=>setTimeout(o,300)))}))}finally{h=!1}}const T=t((function(e){var o;if(h||!c.value)return;const{scrollTop:t,clientHeight:r}=c.value,n=f.value.find(((e,o,n)=>{const l=n[o+1];if(!l)return!0;const i=c.value.querySelector(`#${a(l.name)}`);return i?i.offsetTop>t+r/2:void 0}))||f.value[f.value.length-1];p.value=null!=(o=null==n?void 0:n.name)?o:"",u("scroll",e)}),300);r(f,(e=>{var o,t;p.value=null!=(t=null==(o=e[0])?void 0:o.name)?t:""}));return{currentAnchor:l({get:()=>p.value,async set(e){p.value=e,await new Promise((e=>setTimeout(e,100))),await y(e)}}),onScroll:T,anchorIdList:f,generateAnchorList:d,updateAnchorList:function(e){"LINEBAR"===e.componentType&&e.selfDisplay&&d(e.form)},scrollTo:y,anchorBarRef:v}}export{s as useAnchor};
1
+ import{doAnimation as e}from"../../../../shared/utils/anime.js";import{Path as o}from"@formily/path";import{useDebounceFn as r,watchOnce as t}from"@vueuse/core";import{ref as n,nextTick as i,computed as l}from"vue";import"../../../../shared/utils/index.js";import"@formily/core";import"@vicons/ionicons5";import"@vue/shared";import"lodash-es";import"naive-ui";import"date-fns";import{createLinebarId as a}from"../utils/schema.js";function s(s,u,c,m){const v=n(),p=n(""),f=n([]),d=r((async function(e){var o;f.value=Object.values(e.fields).reduce(((e,o)=>{var r,t,n,i;return"LINEBAR"===o.componentType&&"visible"===o.selfDisplay&&e.push({title:null!=(t=null==(r=o.componentProps)?void 0:r.title)?t:o.title,name:o.address.toString(),index:null!=(i=null==(n=o.decoratorProps)?void 0:n._index)?i:0}),e}),[]).sort(((e,o)=>e.index-o.index)),await i(),null==(o=v.value)||o.syncBarPosition()}),100);let h=!1;async function y(r){h=!0;try{if(!c.value)return;m.trigger(o.parse(r),!0),await i();const t=c.value.querySelector(`#${a(r)}`);if(!t)return;await new Promise((o=>{e(c.value.scrollTop,t.offsetTop,300,(e=>{var o;null==(o=c.value)||o.scrollTo({top:e})}),"easeInSine",(()=>setTimeout(o,300)))}))}finally{h=!1}}const T=r((function(e){var o;if(h||!c.value)return;const{scrollTop:r,clientHeight:t}=c.value,n=f.value.find(((e,o,n)=>{const i=n[o+1];if(!i)return!0;const l=c.value.querySelector(`#${a(i.name)}`);return l?l.offsetTop>r+t/2:void 0}))||f.value[f.value.length-1];p.value=null!=(o=null==n?void 0:n.name)?o:"",u("scroll",e)}),300);t(f,(e=>{var o,r;p.value=null!=(r=null==(o=e[0])?void 0:o.name)?r:""}));return{currentAnchor:l({get:()=>p.value,async set(e){p.value=e,await new Promise((e=>setTimeout(e,100))),await y(e)}}),onScroll:T,anchorIdList:f,generateAnchorList:d,updateAnchorList:function(e){"LINEBAR"===e.componentType&&e.selfDisplay&&d(e.form)},scrollTo:y,anchorBarRef:v}}export{s as useAnchor};
@@ -1 +1 @@
1
- import{arrayed as e,deepOmit as o}from"../../../../shared/utils/index.js";import{cloneDeep as t,pick as n}from"lodash-es";import"../../index.js";import{parseNumberFromMaybeString as i,formRenderLog as r}from"../utils/index.js";import{useFieldNormalize as l}from"./useFieldNormalize.js";import{fieldKeyEscape as s,createLinebarId as a}from"../utils/schema.js";import{useFormValidator as p}from"./useFormValidator.js";import{transformDateFormat as c}from"../utils/business.js";function d(e,o){Object.assign(e["x-component-props"],{...n(o,["wordbook","autograph"])})}function m(e,o){Object.assign(e["x-component-props"],{...n(o,["urlConfig","wordbook"])})}function u(e){return"1"===e||!0===e}function f(f,_){const{createValidatorSchema:x}=p(),h=e=>{var o;const t={name:e.val_key,type:null!=(o=e.fieldType)?o:"string",title:e.alias||e.name,"x-component":e.html_type,default:e.default_val,"x-component-props":{placeholder:e.placeholder,clearable:"0"===e.is_empty,...e.componentProps||{}},"x-content":e.slots,"x-display":"0"===e.is_show?"hidden":"visible","x-pattern":"0"===e.is_edit?"disabled":"editable","x-compile-omitted":["title","x-component-props","x-decorator-props"]};e.reactions&&(t["x-reactions"]=e.reactions),e.noDecorator||Object.assign(t,{"x-decorator":"FORM_ITEM","x-decorator-props":{fieldItem:e,beforeSetValue:null==_?void 0:_.beforeSetValue,span:2*(e.elem_width||3),showLabel:"1"!==e.hide_title,remark:e.remark,propertyKey:e.val_key,annotation:e.annotation,...e.decoratorProps||{}}});const n=x(e);return n&&(t["x-validator"]=n),"0"===e.is_null&&(t.required=!0),t},b=e=>{var o,t,r,l,s,a,p,c,f,_,x,b,g,v;const y=h(e);e.urlConfig?m(y,e):e.autograph&&d(y,e);const w=!!e.__multiple,C=u(null!=(t=null==(o=e.componentProps)?void 0:o.allowModify)?t:e.allowModify),O=u(null!=(l=null==(r=e.componentProps)?void 0:r.selectAll)?l:e.selectAll),A=u(null!=(a=null==(s=e.componentProps)?void 0:s.shouldSave)?a:e.save_free_entry),E=u(null!=(c=null==(p=e.componentProps)?void 0:p.allowCreate)?c:e.free_entry),j=null!=(_=null==(f=e.componentProps)?void 0:f.showField)?_:e.show_key,k=null!=(b=null==(x=e.componentProps)?void 0:x.options)?b:e.option,N=null!=(v=i(e.multi_select_value))?v:null==(g=e.componentProps)?void 0:g.maxTagCount;return Object.assign(y["x-component-props"],{multiple:w,options:k,allowModify:C,allowCreate:E||C,shouldSave:A,showField:j,maxTagCount:N,selectAll:O,...n(e,["lazyRequest","requestCache"])}),w&&(y.type="array"),y},g=e=>{var o,t;const n=h(e),i=null!=(t=null==(o=e.componentProps)?void 0:o.selectAll)?t:e.selectAll;return Object.assign(n["x-component-props"],{options:e.option,childFieldStrategy:e.childFieldStrategy,childWidthMode:e.childWidthMode,vertical:e.__vertical,selectAll:"1"===i||!0===i}),e.urlConfig?m(n,e):e.autograph&&d(n,e),n},v=e=>{const t=h(e);return Object.assign(t["x-component-props"],{fieldItem:o(e,["reactions"])}),t},y=e=>({name:e.val_key,type:"void",title:e.alias||e.name,"x-component":"LINEBAR","x-display":"visible","x-component-props":{linebarTextDirection:e.linebarTextDirection,linebarDirection:e.linebarDirection,linebarWidth:e.linebarWidth,disabled:"1"===e.is_not_fold,id:a(e.val_key),show:"0"!==e.is_show,remark:e.remark},"x-content":e.slots}),w=new Map([["LINEBAR",y],["LINE_BREAKS",e=>({name:e.val_key,type:"void",title:e.alias||e.name,"x-component":"LINE_BREAKS","x-component-props":{border:e.lineBreaksBorder},"x-display":"0"===e.is_show?"hidden":"visible"})],["INPUT",e=>{const o=h(e);return Object.assign(o["x-component-props"],{...n(e,["prefix","suffix"])}),o}],["TEXTAREA",e=>{const o=h(e);return Object.assign(o["x-component-props"],{rows:e.initialize_high||3}),o}],["INPUT_NUMBER",e=>{const o=h(e),{decimal_length:t,validate:n,allowSlash:r}=e;return!0!==r&&"1"!==r||(o["x-component"]="INPUT_NUMBER_SLASH",o.type="string"),Object.assign(o["x-component-props"],{precision:i(null!=t?t:null==n?void 0:n.decimal_length),whiteList:e.whiteList,prefix:e.prefix,suffix:e.suffix}),o}],["SELECT",b],["REMOTE_SEARCH",b],["DATE",e=>{const o=h(e);return Object.assign(o["x-component-props"],{valueFormat:e.date_format,type:c(e.date_format),validate:e.validate}),o}],["TIME",e=>{const o=h(e);return Object.assign(o["x-component-props"],{format:e.date_format,type:c(e.date_format),validate:e.validate}),o}],["LEVEL_SEARCH_CASCADER",e=>{const o=h(e);return Object.assign(o["x-component-props"],{...n(e,["wordbook","lazyRequest","autograph"])}),"1"===e.is_allow_check_mid&&e.allow_check_mid_level&&(o["x-component-props"].checkAbleLevel=+e.allow_check_mid_level),o}],["SEARCH_CASCADER",e=>{var o;const t=h(e);return Object.assign(t["x-component-props"],{urlConfig:e.urlConfig,depth:null==(o=e.wordbook)?void 0:o.level_num,options:e.option}),t}],["COMBINATION",e=>{const o=h(e);return o.type="array","table"===e.displayMode?o["x-component"]="TABLE_COMBINATION":!1!==e.jsonCombination&&(o["x-component"]="JSON_COMBINATION"),Object.assign(o["x-decorator-props"],{showLabel:!1,showFeedback:!1}),Object.assign(o["x-component-props"],{title:e.alias||e.name,maxGroupNum:e.maxGroupNum,minGroupNum:e.minGroupNum,showLabel:"1"!==e.hide_title,properties:e.children||[],combinationItemDeletable:e.combinationItemDeletable}),o}],["RADIO",g],["CHECKBOX",g],["SWITCH",e=>{const o=h(e);return Object.assign(o["x-component-props"],{openDescription:e.open,closeDescription:e.close,showMode:e.show_mode}),o}],["SLIDER",e=>{const o=h(e);return Object.assign(o["x-component-props"],{step:i(e.step_length),max:i(e.max_length),min:i(e.min_length),option:e.option}),o}],["COMPLEX",e=>{const o=h(e);Array.isArray(e.properties)&&r("COMPLEX控件的properties属性已经废弃, 请使用children作为替代, 在之后的版本中properties属性将不再支持");const t=Array.isArray(e.properties||e.children)?j(e.properties||e.children):{};return o.type=e.fieldType||"void",o.properties=t,Object.assign(o["x-decorator-props"],{showFeedback:!1}),Object.assign(o["x-component-props"],n(e,["wrapperStyle","display"])),o}]]),C=e=>{if(e.suffixConfig)return O(e);return(w.get(e.html_type)||v)(e)},O=o=>{if(!o.suffixConfig&&!o.prefixConfig)return C(o);const t=o.suffixConfig?e(o.suffixConfig):[],n=[...(o.prefixConfig?e(o.prefixConfig):[]).map((e=>({elem_width:o.elem_width,...e,hide_title:"1",is_show:"1"}))),{...o,is_show:"1",hide_title:"1",suffixConfig:void 0,prefixConfig:void 0},...t.map((e=>({elem_width:o.elem_width,...e,hide_title:"1",is_show:"1"})))],i=h(o),r=n.reduce(((e,o)=>e+2*(o.elem_width||3)),0);return Object.assign(i,{type:"void",name:s(n),title:o.alias||o.name,"x-component":"INPUT_GROUP","x-component-props":{span:r},"x-decorator-props":{...i["x-decorator-props"],showFeedback:!1,suffixFields:n.map((e=>e.val_key))},properties:j(n)}),i},{FieldNormalizeWaterfallHook:A,FieldListNormalizeWaterfallHook:E}=l();function j(o,n={column:9999}){let i=null;return E.call(t(o),n).reduce(((e,o,s)=>{var a;const p=null==(a=(o=A.call(o,n)).validate)?void 0:a.obj_type;return p&&f&&f.collect(p,t(o)),"LINEBAR"===o.html_type?(e[l(o)]=r(y(o),s),i=e[l(o)].properties={}):i?i[l(o)]=r(C(o),s):(i=null,e[l(o)]=r(C(o),s)),e}),{});function r(e,o){return e["x-index"]=o,e}function l(o){return o.suffixConfig?s([o,...e(o.suffixConfig)]):o.val_key}}return{schemaAdaptor:j}}export{f as useFieldListAdaptor};
1
+ import{arrayed as e,deepOmit as o}from"../../../../shared/utils/index.js";import{cloneDeep as t,pick as n}from"lodash-es";import"../../index.js";import{parseNumberFromMaybeString as i,formRenderLog as r}from"../utils/index.js";import{useFieldNormalize as l}from"./useFieldNormalize.js";import{fieldKeyEscape as s,createLinebarId as a}from"../utils/schema.js";import{useFormValidator as p}from"./useFormValidator.js";import{transformDateFormat as c}from"../utils/business.js";function d(e,o){Object.assign(e["x-component-props"],{...n(o,["wordbook","autograph"])})}function m(e,o){Object.assign(e["x-component-props"],{...n(o,["urlConfig","wordbook"])})}function u(e){return"1"===e||!0===e}function f(f,x){const{createValidatorSchema:_}=p(),h=e=>{var o;const t={name:e.val_key,type:null!=(o=e.fieldType)?o:"string",title:e.alias||e.name,"x-component":e.html_type,default:e.default_val,"x-component-props":{placeholder:e.placeholder,clearable:"0"===e.is_empty,...e.componentProps||{}},"x-content":e.slots,"x-display":"0"===e.is_show?"hidden":"visible","x-pattern":"0"===e.is_edit?"disabled":"editable","x-compile-omitted":["title","x-component-props","x-decorator-props"]};e.reactions&&(t["x-reactions"]=e.reactions),e.noDecorator||Object.assign(t,{"x-decorator":"FORM_ITEM","x-decorator-props":{fieldItem:e,beforeSetValue:null==x?void 0:x.beforeSetValue,span:2*(e.elem_width||3),showLabel:"1"!==e.hide_title,remark:e.remark,propertyKey:e.val_key,annotation:e.annotation,...e.decoratorProps||{}}});const n=_(e);return n&&(t["x-validator"]=n),"0"===e.is_null&&(t.required=!0),t},b=e=>{var o,t,r,l,s,a,p,c,f,x,_,b,g,v;const y=h(e);e.urlConfig?m(y,e):e.autograph&&d(y,e);const w=!!e.__multiple,C=u(null!=(t=null==(o=e.componentProps)?void 0:o.allowModify)?t:e.allowModify),O=u(null!=(l=null==(r=e.componentProps)?void 0:r.selectAll)?l:e.selectAll),A=u(null!=(a=null==(s=e.componentProps)?void 0:s.shouldSave)?a:e.save_free_entry),E=u(null!=(c=null==(p=e.componentProps)?void 0:p.allowCreate)?c:e.free_entry),j=null!=(x=null==(f=e.componentProps)?void 0:f.showField)?x:e.show_key,k=null!=(b=null==(_=e.componentProps)?void 0:_.options)?b:e.option,N=null!=(v=i(e.multi_select_value))?v:null==(g=e.componentProps)?void 0:g.maxTagCount;return Object.assign(y["x-component-props"],{multiple:w,options:k,allowModify:C,allowCreate:E||C,shouldSave:A,showField:j,maxTagCount:N,selectAll:O,...n(e,["lazyRequest","requestCache"])}),w&&(y.type="array"),y},g=e=>{var o,t;const n=h(e),i=null!=(t=null==(o=e.componentProps)?void 0:o.selectAll)?t:e.selectAll;return Object.assign(n["x-component-props"],{options:e.option,childFieldStrategy:e.childFieldStrategy,childWidthMode:e.childWidthMode,vertical:e.__vertical,selectAll:"1"===i||!0===i}),e.urlConfig?m(n,e):e.autograph&&d(n,e),n},v=e=>{const t=h(e);return Object.assign(t["x-component-props"],{fieldItem:o(e,["reactions"])}),t},y=e=>({name:e.val_key,type:"void",title:e.alias||e.name,"x-component":"LINEBAR","x-display":"visible","x-component-props":{linebarTextDirection:e.linebarTextDirection,linebarDirection:e.linebarDirection,linebarWidth:e.linebarWidth,disabled:"1"===e.is_not_fold,id:a(e.val_key),show:"0"!==e.is_show,remark:e.remark},"x-content":e.slots}),w=new Map([["LINEBAR",y],["LINE_BREAKS",e=>({name:e.val_key,type:"void",title:e.alias||e.name,"x-component":"LINE_BREAKS","x-component-props":{border:e.lineBreaksBorder},"x-display":"0"===e.is_show?"hidden":"visible"})],["INPUT",e=>{const o=h(e);return Object.assign(o["x-component-props"],{...n(e,["prefix","suffix"])}),o}],["TEXTAREA",e=>{const o=h(e);return Object.assign(o["x-component-props"],{rows:e.initialize_high||3}),o}],["INPUT_NUMBER",e=>{const o=h(e),{decimal_length:t,validate:n,allowSlash:r}=e;return!0!==r&&"1"!==r||(o["x-component"]="INPUT_NUMBER_SLASH",o.type="string"),Object.assign(o["x-component-props"],{precision:i(null!=t?t:null==n?void 0:n.decimal_length),whiteList:e.whiteList,prefix:e.prefix,suffix:e.suffix}),o}],["SELECT",b],["REMOTE_SEARCH",b],["DATE",e=>{const o=h(e);return Object.assign(o["x-component-props"],{valueFormat:e.date_format,type:c(e.date_format),validate:e.validate}),o}],["TIME",e=>{const o=h(e);return Object.assign(o["x-component-props"],{format:e.date_format,type:c(e.date_format),validate:e.validate}),o}],["LEVEL_SEARCH_CASCADER",e=>{const o=h(e);return Object.assign(o["x-component-props"],{...n(e,["wordbook","lazyRequest","autograph"])}),"1"===e.is_allow_check_mid&&e.allow_check_mid_level&&(o["x-component-props"].checkAbleLevel=+e.allow_check_mid_level),o}],["SEARCH_CASCADER",e=>{var o;const t=h(e);return Object.assign(t["x-component-props"],{urlConfig:e.urlConfig,depth:null==(o=e.wordbook)?void 0:o.level_num,options:e.option}),t}],["COMBINATION",e=>{const o=h(e);return o.type="array","table"===e.displayMode?o["x-component"]="TABLE_COMBINATION":!1!==e.jsonCombination&&(o["x-component"]="JSON_COMBINATION"),Object.assign(o["x-decorator-props"],{showLabel:!1,showFeedback:!1}),Object.assign(o["x-component-props"],{title:e.alias||e.name,maxGroupNum:e.maxGroupNum,minGroupNum:e.minGroupNum,showLabel:"1"!==e.hide_title,properties:e.children||[],combinationItemDeletable:e.combinationItemDeletable}),o}],["RADIO",g],["CHECKBOX",g],["SWITCH",e=>{const o=h(e);return Object.assign(o["x-component-props"],{openDescription:e.open,closeDescription:e.close,showMode:e.show_mode}),o}],["SLIDER",e=>{const o=h(e);return Object.assign(o["x-component-props"],{step:i(e.step_length),max:i(e.max_length),min:i(e.min_length),option:e.option}),o}],["COMPLEX",e=>{const o=h(e);Array.isArray(e.properties)&&r("COMPLEX控件的properties属性已经废弃, 请使用children作为替代, 在之后的版本中properties属性将不再支持");const t=Array.isArray(e.properties||e.children)?j(e.properties||e.children):{};return o.type=e.fieldType||"void",o.properties=t,Object.assign(o["x-decorator-props"],{showFeedback:!1}),Object.assign(o["x-component-props"],n(e,["wrapperStyle","display"])),o}]]),C=e=>{if(e.suffixConfig)return O(e);return(w.get(e.html_type)||v)(e)},O=o=>{if(!o.suffixConfig&&!o.prefixConfig)return C(o);const t=o.suffixConfig?e(o.suffixConfig):[],n=[...(o.prefixConfig?e(o.prefixConfig):[]).map((e=>({elem_width:o.elem_width,...e,hide_title:"1",is_show:"1"}))),{...o,is_show:"1",hide_title:"1",suffixConfig:void 0,prefixConfig:void 0},...t.map((e=>({elem_width:o.elem_width,...e,hide_title:"1",is_show:"1"})))],i=h(o),r=n.reduce(((e,o)=>e+2*(o.elem_width||3)),0);return Object.assign(i,{type:"void",name:s(n),title:o.alias||o.name,"x-component":"INPUT_GROUP","x-component-props":{span:r},"x-decorator-props":{...i["x-decorator-props"],showFeedback:!1,suffixFields:n.map((e=>e.val_key))},properties:j(n)}),i},{FieldNormalizeWaterfallHook:A,FieldListNormalizeWaterfallHook:E}=l();function j(o,n={column:9999}){let i=null;return E.call(t(o),n).reduce(((e,o,s)=>{var a;const p=null==(a=(o=A.call(o,n)).validate)?void 0:a.obj_type;return p&&f&&f.collect(p,t(o)),"LINEBAR"===o.html_type?(e[l(o)]=r(y(o),s),i=e[l(o)].properties={}):i?i[l(o)]=r(C(o),s):(i=null,e[l(o)]=r(C(o),s)),e}),{});function r(e,o){return e["x-index"]=o,e["x-decorator-props"]={_index:o,...e["x-decorator-props"]},e}function l(o){return o.suffixConfig?s([o,...e(o.suffixConfig)]):o.val_key}}return{schemaAdaptor:j}}export{f as useFieldListAdaptor};
@@ -3104,6 +3104,7 @@ declare const InfoHeader: SFCWithInstall<import("vue").DefineComponent<{
3104
3104
  anchorIdList: import("vue").Ref<{
3105
3105
  name: string;
3106
3106
  title: string;
3107
+ index: number;
3107
3108
  }[]>;
3108
3109
  onScroll: (scrollEvent: Event) => void;
3109
3110
  callLifeCycle: <T extends "onSetup" | "beforeSetValue" | "beforeRequest" | "afterRequest" | "afterOptionInit">(lifeCycleName: T, payload?: Parameters<Required<Partial<{
@@ -4185,6 +4186,7 @@ declare const InfoHeader: SFCWithInstall<import("vue").DefineComponent<{
4185
4186
  anchorIdList: import("vue").Ref<{
4186
4187
  name: string;
4187
4188
  title: string;
4189
+ index: number;
4188
4190
  }[]>;
4189
4191
  onScroll: (scrollEvent: Event) => void;
4190
4192
  callLifeCycle: <T extends "onSetup" | "beforeSetValue" | "beforeRequest" | "afterRequest" | "afterOptionInit">(lifeCycleName: T, payload?: Parameters<Required<Partial<{
@@ -3099,6 +3099,7 @@ declare const _default: import("vue").DefineComponent<{
3099
3099
  anchorIdList: import("vue").Ref<{
3100
3100
  name: string;
3101
3101
  title: string;
3102
+ index: number;
3102
3103
  }[]>;
3103
3104
  onScroll: (scrollEvent: Event) => void;
3104
3105
  callLifeCycle: <T extends "onSetup" | "beforeSetValue" | "beforeRequest" | "afterRequest" | "afterOptionInit">(lifeCycleName: T, payload?: Parameters<Required<Partial<{
@@ -4180,6 +4181,7 @@ declare const _default: import("vue").DefineComponent<{
4180
4181
  anchorIdList: import("vue").Ref<{
4181
4182
  name: string;
4182
4183
  title: string;
4184
+ index: number;
4183
4185
  }[]>;
4184
4186
  onScroll: (scrollEvent: Event) => void;
4185
4187
  callLifeCycle: <T extends "onSetup" | "beforeSetValue" | "beforeRequest" | "afterRequest" | "afterOptionInit">(lifeCycleName: T, payload?: Parameters<Required<Partial<{
@@ -2597,6 +2597,7 @@ declare const _default: import("vue").DefineComponent<{
2597
2597
  anchorIdList: import("vue").Ref<{
2598
2598
  name: string;
2599
2599
  title: string;
2600
+ index: number;
2600
2601
  }[]>;
2601
2602
  onScroll: (scrollEvent: Event) => void;
2602
2603
  callLifeCycle: <T extends "onSetup" | "beforeSetValue" | "beforeRequest" | "afterRequest" | "afterOptionInit">(lifeCycleName: T, payload?: Parameters<Required<Partial<{
@@ -471,6 +471,7 @@ declare const _default: import("vue").DefineComponent<{
471
471
  anchorIdList: import("vue").Ref<{
472
472
  name: string;
473
473
  title: string;
474
+ index: number;
474
475
  }[]>;
475
476
  onScroll: (scrollEvent: Event) => void;
476
477
  callLifeCycle: <T extends "onSetup" | "beforeSetValue" | "beforeRequest" | "afterRequest" | "afterOptionInit">(lifeCycleName: T, payload?: Parameters<Required<Partial<{
@@ -1228,11 +1228,11 @@ declare const CCheckbox: SFCWithInstall<import("vue").DefineComponent<{
1228
1228
  declare const CSelect: SFCWithInstall<import("vue").DefineComponent<{
1229
1229
  form: {
1230
1230
  type: ObjectConstructor;
1231
- default: () => void;
1231
+ default: () => {};
1232
1232
  };
1233
1233
  item: {
1234
1234
  type: ObjectConstructor;
1235
- default: () => void;
1235
+ default: () => {};
1236
1236
  };
1237
1237
  isLock: {
1238
1238
  type: BooleanConstructor;
@@ -1253,11 +1253,11 @@ declare const CSelect: SFCWithInstall<import("vue").DefineComponent<{
1253
1253
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "scaleChange"[], "scaleChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
1254
1254
  form: {
1255
1255
  type: ObjectConstructor;
1256
- default: () => void;
1256
+ default: () => {};
1257
1257
  };
1258
1258
  item: {
1259
1259
  type: ObjectConstructor;
1260
- default: () => void;
1260
+ default: () => {};
1261
1261
  };
1262
1262
  isLock: {
1263
1263
  type: BooleanConstructor;
@@ -1 +1 @@
1
- import{defineComponent as e,reactive as l,computed as a,createVNode as s,resolveComponent as i}from"vue";import{NSelect as t,NInput as r}from"naive-ui";import u from"./address.js";import"xe-utils";import"moment";import d from"../../../../../shared/utils/vexutilsExpand.js";var n=e({name:"RAddress",components:{NSelect:t,NInput:r},props:{form:{type:Object,default:()=>({})},item:{type:Object,default:()=>({})},isLock:{type:Boolean,default:!1}},emits:["scaleChange"],setup(e,t){const r=l({provinceValue:-1,cityValue:-1,areaValue:-1,province:[{value:-1,label:"省/自治区/直辖市"}],city:[{value:-1,label:"市"}],area:[{value:-1,label:"区/县"}],addressValue:"",allValue:{}}),n=e.item.setting||{addressType:"province-city-district-address"},o=a((()=>{let e={addressType:"province-city-district-address"};return e=d.isJSON(n)?JSON.parse(n):n,e.addressType})),c=a((()=>o.value.includes("province"))),p=a((()=>o.value.includes("city"))),v=a((()=>o.value.includes("district"))),y=a((()=>o.value.includes("address"))),m=e=>e?Object.keys(e).map((l=>({value:l,label:e[l]}))):[],V=()=>{r.area=[{value:-1,label:"区/县"}],r.areaValue=-1;r.allValue.area={key:-1,label:"区/县"}},b=(l,a,s)=>{r.provinceValue=l,r.city=[{value:-1,label:"市"}],r.cityValue=-1,r.allValue.city={key:-1,label:"市"},V(),-1!=l&&1===r.city.length&&r.city.push(...m(u[l]));const i=r.allValue;i.province={key:l,label:null==a?void 0:a.label},i.address=r.addressValue,"no"!=s&&t.emit("scaleChange",i,e.item)},f=(l,a,s)=>{r.cityValue=l,V(),-1!=l&&1===r.area.length&&r.area.push(...m(u[l]));const i=r.allValue;i.city={key:l,label:null==a?void 0:a.label},i.address=r.addressValue,"no"!=s&&t.emit("scaleChange",i,e.item)},h=(l,a,s)=>{r.areaValue=l;r.allValue.area={key:l,label:null==a?void 0:a.label},"no"!=s&&t.emit("scaleChange",r.allValue,e.item)},k=(l,a)=>{r.addressValue=l;r.allValue.address=l,"no"!=a&&t.emit("scaleChange",r.allValue,e.item)};return(()=>{var l,a,s;r.province.push(...m(u[86]));const i=e.form[e.item.val_key];if(d.isEmpty(i))return;const t=(null==(l=i.province)?void 0:l.key)||-1,n=(null==(a=i.city)?void 0:a.key)||-1,o=(null==(s=i.area)?void 0:s.key)||-1;r.addressValue=i.address,r.allValue=JSON.parse(JSON.stringify(i)),b(t,i.province,"no"),f(n,i.city,"no"),h(o,i.area,"no")})(),()=>s("div",{class:"c-scale-address"},[s("div",{class:"field-row"},[c.value&&s(i("n-select"),{value:r.provinceValue,filterable:!0,placeholder:"请选择",disabled:e.isLock,options:r.province,"onUpdate:value":b},null),p.value&&s(i("n-select"),{value:r.cityValue,filterable:!0,placeholder:"请选择",disabled:e.isLock,options:r.city,"onUpdate:value":f},null),v.value&&s(i("n-select"),{value:r.areaValue,filterable:!0,placeholder:"请选择",disabled:e.isLock,options:r.area,"onUpdate:value":h},null)]),y.value&&s(i("n-input"),{value:r.addressValue,placeholder:"请输入",disabled:e.isLock,"onUpdate:value":k},null)])}});export{n as default};
1
+ import{defineComponent as e,reactive as l,computed as a,createVNode as s,resolveComponent as i}from"vue";import{NSelect as t,NInput as r}from"naive-ui";import u from"./address.js";import"xe-utils";import"moment";import d from"../../../../../shared/utils/vexutilsExpand.js";var n=e({name:"RAddress",components:{NSelect:t,NInput:r},props:{form:{type:Object,default:()=>({})},item:{type:Object,default:()=>({})},isLock:{type:Boolean,default:!1}},emits:["scaleChange"],setup(e,t){const r=l({provinceValue:-1,cityValue:-1,areaValue:-1,province:[{value:-1,label:"省/自治区/直辖市"}],city:[{value:-1,label:"市"}],area:[{value:-1,label:"区/县"}],addressValue:"",allValue:{}}),n=e.item.setting||{addressType:"province-city-district-address"},o=a((()=>{let e={addressType:"province-city-district-address"};return e=d.isJSON(n)?JSON.parse(n):n,e.addressType})),c=a((()=>o.value.includes("province"))),p=a((()=>o.value.includes("city"))),v=a((()=>o.value.includes("district"))),y=a((()=>o.value.includes("address"))),m=e=>e?Object.keys(e).map((l=>({value:l,label:e[l]}))):[],V=()=>{r.area=[{value:-1,label:"区/县"}],r.areaValue=-1;r.allValue.area={key:-1,label:"区/县"}},b=(l,a,s)=>{r.provinceValue=l,r.city=[{value:-1,label:"市"}],r.cityValue=-1,r.allValue.city={key:-1,label:"市"},V(),-1!=l&&1===r.city.length&&r.city.push(...m(u[l]));const i=r.allValue;i.province={key:l,label:null==a?void 0:a.label},i.address=r.addressValue,"no"!=s&&t.emit("scaleChange",i,e.item)},f=(l,a,s)=>{r.cityValue=l,V(),-1!=l&&1===r.area.length&&r.area.push(...m(u[l]));const i=r.allValue;i.city={key:l,label:null==a?void 0:a.label},i.address=r.addressValue,"no"!=s&&t.emit("scaleChange",i,e.item)},h=(l,a,s)=>{r.areaValue=l;r.allValue.area={key:l,label:null==a?void 0:a.label},"no"!=s&&t.emit("scaleChange",r.allValue,e.item)},k=(l,a)=>{r.addressValue=l;r.allValue.address=l,"no"!=a&&t.emit("scaleChange",r.allValue,e.item)};return(()=>{var l,a,s;r.province.push(...m(u[86]));const i=e.form[e.item.val_key];if(d.isEmpty(i))return;const t=(null==(l=i.province)?void 0:l.key)||-1,n=(null==(a=i.city)?void 0:a.key)||-1,o=(null==(s=i.area)?void 0:s.key)||-1;r.addressValue=i.address,r.allValue=JSON.parse(JSON.stringify(i)),b(t,i.province,"no"),f(n,i.city,"no"),h(o,i.area,"no")})(),()=>s("div",{class:"c-scale-address"},[s("div",{class:"field-row"},[c.value&&s(i("n-select"),{value:r.provinceValue,filterable:!0,placeholder:"请选择",disabled:e.isLock,options:r.province,"onUpdate:value":b},null),p.value&&s(i("n-select"),{value:r.cityValue,filterable:!0,placeholder:"请选择",disabled:e.isLock,options:r.city,"onUpdate:value":f},null),v.value&&s(i("n-select"),{value:r.areaValue,filterable:!0,placeholder:"请选择",disabled:e.isLock,options:r.area,"onUpdate:value":h},null)]),y.value&&s(i("n-input"),{value:r.addressValue,clearable:!0,placeholder:"请输入",disabled:e.isLock,"onUpdate:value":k},null)])}});export{n as default};
@@ -1 +1 @@
1
- import{defineComponent as e,computed as t,ref as l,watch as a,createVNode as o}from"vue";import{NInput as u}from"naive-ui";var i=e({name:"RInput",components:{NInput:u},props:{form:{type:Object,default:()=>({})},item:{type:Object,default:()=>({})},isLock:{type:Boolean,default:!1}},emits:["scaleChange"],setup(e,{emit:i}){var n,m,r,v,d,p;let s=null==(n=e.item)?void 0:n.valueType,c=(null==(m=e.item)?void 0:m.type)||"INPUT",f="INPUT"==c||"EVALUATE_INPUT"==c,y=(null==(v=null==(r=e.item)?void 0:r.setting)?void 0:v.inputRow)||1,g=null==(p=null==(d=e.item)?void 0:d.setting)?void 0:p.defaultPlaceHolder;const k=t((()=>y&&"auto"!=y?{minRows:y||1,maxRows:y||1}:{minRows:1})),w=e=>{if(!f)return;let t=e.key;e.returnValue="e"!==t&&"E"!==t&&"+"!==t&&"-"!==t},I=l(e.form[e.item.val_key]);a((()=>e.form[e.item.val_key]),(e=>{I.value=e}),{immediate:!0});const R=t=>{I.value=f&&t&&"number"===s?t.replace(/[^\d.]/gi,""):t,i("scaleChange",I.value,e.item)};return()=>(()=>{let t=f?"textarea":s||"text";return o(u,{value:I.value,type:t,autosize:k.value,placeholder:g,disabled:e.isLock,onKeydown:w,"onUpdate:value":R},null)})()}});export{i as default};
1
+ import{defineComponent as e,computed as t,ref as l,watch as a,createVNode as o}from"vue";import{NInput as u}from"naive-ui";var i=e({name:"RInput",components:{NInput:u},props:{form:{type:Object,default:()=>({})},item:{type:Object,default:()=>({})},isLock:{type:Boolean,default:!1}},emits:["scaleChange"],setup(e,{emit:i}){var n,m,r,s,v,d;const p=null==(n=e.item)?void 0:n.valueType,c=(null==(m=e.item)?void 0:m.type)||"INPUT",f="INPUT"==c||"EVALUATE_INPUT"==c,y=(null==(s=null==(r=e.item)?void 0:r.setting)?void 0:s.inputRow)||1,b=null==(d=null==(v=e.item)?void 0:v.setting)?void 0:d.defaultPlaceHolder,g=t((()=>y&&"auto"!=y?{minRows:y||1,maxRows:y||1}:{minRows:1})),k=e=>{if(!f)return;const t=e.key;e.returnValue="e"!==t&&"E"!==t&&"+"!==t&&"-"!==t},w=l(e.form[e.item.val_key]);a((()=>e.form[e.item.val_key]),(e=>{w.value=e}),{immediate:!0});const I=t=>{w.value=f&&t&&"number"===p?t.replace(/[^\d.]/gi,""):t,i("scaleChange",w.value,e.item)};return()=>(()=>{const t=f?"textarea":p||"text";return o(u,{value:w.value,clearable:!0,type:t,autosize:g.value,placeholder:b,disabled:e.isLock,onKeydown:k,"onUpdate:value":I},null)})()}});export{i as default};
@@ -1,11 +1,11 @@
1
1
  declare const _default: import("vue").DefineComponent<{
2
2
  form: {
3
3
  type: ObjectConstructor;
4
- default: () => void;
4
+ default: () => {};
5
5
  };
6
6
  item: {
7
7
  type: ObjectConstructor;
8
- default: () => void;
8
+ default: () => {};
9
9
  };
10
10
  isLock: {
11
11
  type: BooleanConstructor;
@@ -26,11 +26,11 @@ declare const _default: import("vue").DefineComponent<{
26
26
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "scaleChange"[], "scaleChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
27
27
  form: {
28
28
  type: ObjectConstructor;
29
- default: () => void;
29
+ default: () => {};
30
30
  };
31
31
  item: {
32
32
  type: ObjectConstructor;
33
- default: () => void;
33
+ default: () => {};
34
34
  };
35
35
  isLock: {
36
36
  type: BooleanConstructor;
@@ -1 +1 @@
1
- import{defineComponent as e,reactive as t,computed as l,watch as i,createVNode as a,resolveComponent as o}from"vue";import{NSelect as n,NEmpty as u}from"naive-ui";import s from"../LoadingCom.vue.js";var r=e({name:"RSelect",components:{NSelect:n,NEmpty:u,LoadingCom:s},props:{form:{type:Object,default:()=>{}},item:{type:Object,default:()=>{}},isLock:{type:Boolean,default:!1},getSelectOptions:{type:Function,default:()=>Promise.resolve([])},getSearchOptions:{type:Function,default:()=>Promise.resolve([])},openType:{type:String,default:""}},emits:["scaleChange"],setup(e,n){const r=t({choiceValue:[],selectParams:{tableType:"TABLE_LIST",pageSize:20,page:1},cloneItem:{},columnName:"",showField:"",curOptions:[],fieldList:[],buttonList:[],fetching:!1});e.openType;const c=l((()=>{var t,l;return!!(null==(l=null==(t=e.item)?void 0:t.setting)?void 0:l.isMultiple)})),p=l((()=>{let{targetSource:t={},options:l=[],optionType:i}=e.item||{};return!(!t.target_id||!l.length&&3!=i)})),m=l((()=>{var t;let{target_id:l,values:i}=(null==(t=e.item)?void 0:t.targetSource)||{};return l&&i?p.value?i||"value":i:"value"})),v=l((()=>{var t;let{target_id:l,showField:i}=(null==(t=e.item)?void 0:t.targetSource)||{};return l&&i?p.value?i||"label":i:"label"})),d=async()=>{const{targetSource:t,type:l,options:i=[],optionType:a=1}=r.cloneItem;if(r.showField="label",null==t?void 0:t.target_id)if(p.value)r.curOptions=(e=>e&&e.length?e.map((e=>("cascadeData"in e&&Object.assign(e,{...e.cascadeData}),m.value in e||(e[m.value]=e.value||e.label),v.value in e||(e[v.value]=e.label),e))):[])(i);else try{r.fetching=!0,r.curOptions=await e.getSelectOptions(r.cloneItem),r.fetching=!1,r.columnName=null==t?void 0:t.values,r.showField=(null==t?void 0:t.showField)||(null==t?void 0:t.values)}catch(e){r.fetching=!1}},g=t=>{let l,i={value:"",list:[]};return t&&Array.isArray(t)?(i.value=t,t.length?(t.forEach((e=>{l=f(e),l&&i.list.push(l)})),void n.emit("scaleChange",i,e.item,i)):(i.list=[],void n.emit("scaleChange",i,e.item,i))):(i.value=t,l=f(t),l&&i.list.push(l),void n.emit("scaleChange",i,e.item,i))},f=e=>r.curOptions.find((t=>t.value===e));return i((()=>e.item),(e=>{e&&Object.keys(e).length&&(e=>{var t;r.cloneItem=JSON.parse(JSON.stringify(e));let l=r.cloneItem.options||[];"EVALUATE_SELECT"===e.type&&(l=(null==(t=r.cloneItem.scoreConfigs)?void 0:t.scoreRules)||[]),r.curOptions=l,d()})(e)}),{immediate:!0}),()=>a(o("n-select"),{value:e.form[e.item.val_key],"onUpdate:value":[t=>e.form[e.item.val_key]=t,g],filterable:!0,placeholder:"请选择","value-field":m.value,"label-field":v.value,multiple:c.value,disabled:e.isLock,loading:r.fetching,options:r.curOptions},{empty:()=>r.fetching?a(s,null,null):a(u,null,null)})}});export{r as default};
1
+ import{defineComponent as e,reactive as t,computed as l,watch as i,createVNode as a,resolveComponent as o}from"vue";import{NSelect as n,NEmpty as u}from"naive-ui";import s from"../LoadingCom.vue.js";var r=e({name:"RSelect",components:{NSelect:n,NEmpty:u,LoadingCom:s},props:{form:{type:Object,default:()=>({})},item:{type:Object,default:()=>({})},isLock:{type:Boolean,default:!1},getSelectOptions:{type:Function,default:()=>Promise.resolve([])},getSearchOptions:{type:Function,default:()=>Promise.resolve([])},openType:{type:String,default:""}},emits:["scaleChange"],setup(e,n){const r=t({choiceValue:[],selectParams:{tableType:"TABLE_LIST",pageSize:20,page:1},cloneItem:{},columnName:"",showField:"",curOptions:[],fieldList:[],buttonList:[],fetching:!1});e.openType;const c=l((()=>{var t,l;return!!(null==(l=null==(t=e.item)?void 0:t.setting)?void 0:l.isMultiple)})),p=l((()=>{const{targetSource:t={},options:l=[],optionType:i}=e.item||{};return!(!t.target_id||!l.length&&3!=i)})),m=l((()=>{var t;const{target_id:l,values:i}=(null==(t=e.item)?void 0:t.targetSource)||{};return l&&i?p.value?i||"value":i:"value"})),v=l((()=>{var t;const{target_id:l,showField:i}=(null==(t=e.item)?void 0:t.targetSource)||{};return l&&i?p.value?i||"label":i:"label"})),d=async()=>{const{targetSource:t,type:l,options:i=[],optionType:a=1}=r.cloneItem;if(r.showField="label",null==t?void 0:t.target_id)if(p.value)r.curOptions=(e=>e&&e.length?e.map((e=>("cascadeData"in e&&Object.assign(e,{...e.cascadeData}),m.value in e||(e[m.value]=e.value||e.label),v.value in e||(e[v.value]=e.label),e))):[])(i);else try{r.fetching=!0,r.curOptions=await e.getSelectOptions(r.cloneItem),r.fetching=!1,r.columnName=null==t?void 0:t.values,r.showField=(null==t?void 0:t.showField)||(null==t?void 0:t.values)}catch(e){r.fetching=!1}},g=t=>{const l={value:"",list:[]};let i;return t&&Array.isArray(t)?(l.value=t,t.length?(t.forEach((e=>{i=f(e),i&&l.list.push(i)})),void n.emit("scaleChange",l,e.item,l)):(l.list=[],void n.emit("scaleChange",l,e.item,l))):(l.value=t,i=f(t),i&&l.list.push(i),void n.emit("scaleChange",l,e.item,l))},f=e=>r.curOptions.find((t=>t.value===e));return i((()=>e.item),(e=>{e&&Object.keys(e).length&&(e=>{var t;r.cloneItem=JSON.parse(JSON.stringify(e));let l=r.cloneItem.options||[];"EVALUATE_SELECT"===e.type&&(l=(null==(t=r.cloneItem.scoreConfigs)?void 0:t.scoreRules)||[]),r.curOptions=l,d()})(e)}),{immediate:!0}),()=>a(o("n-select"),{value:e.form[e.item.val_key],"onUpdate:value":[t=>e.form[e.item.val_key]=t,g],filterable:!0,clearable:!0,placeholder:"请选择","value-field":m.value,"label-field":v.value,multiple:c.value,disabled:e.isLock,loading:r.fetching,options:r.curOptions},{empty:()=>r.fetching?a(s,null,null):a(u,null,null)})}});export{r 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 r}from"./use-component.js";import{useEvent as l}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:O,hasDefault:y,formKey:C,isImportScale:A}=o(c,f,p),{formatRules:h}=u(c,f,p),{nextLogicEvent:R}=l(c,f),T=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))},N=()=>{var t;if(!E.value)return!!y.value&&("evaluateResultSetting"in f.config||(f.config.evaluateResultSetting={}),(t=>{let a=e();if(O.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}T(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},b=(e,t)=>{if(["RADIO_BLOCK","CHECKBOX_BLOCK"].includes(t)&&e&&(e&&s.isJSON(e)&&(e=JSON.parse(e)),e.length))return!0},D=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 r=t.find((e=>"FRONT_ADDRESS"===e.type));if(!r||!Object.keys(r).length)return;let l;if(r.setting&&s.isJSON(r.setting)&&(l=JSON.parse(r.setting)),!l||!Object.keys(l).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}=l;if(o){const e=window.location.href;let t="?";o.includes("?")&&(t="&");return`${o}${t}redirect_url=${encodeURIComponent(e)}`}},w=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},k=t=>{if(!t||!Object.keys(t).length)return;let a=e()||{};O.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(y.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)}}))}T(t)},J=e=>{let t=1;return e.map((a=>{const i=C(a);(i||"").replace(/\n/g,""),a.showTitle=a.title,a.val_key=i,a.renderCom=r[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)=>{b(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(!b(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||!b(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 r;return e.forEach((e=>{var l;const o=e.val_key,{type:u}=e;let v;switch(v=e.dbValue?e.dbValue:((e,i)=>{var s,r,l,o;if(A.value)return;let u;const{defValType:v,dateType:d}=e.setting||{};if(3==v){const a=null==(r=null==(s=e.setting)?void 0:s.outDefaultValue)?void 0:r.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&&(u=e)}else{let a=t(i[0],f,c.params);a&&(a=decodeURIComponent(a),u="CHECKBOX_BLOCK"==e.type?a.split():a)}}}if("DATETIME"===i&&4==v){const t=(null==(l=a[d])?void 0:l.replace("-dd","-DD"))||"yyyy-MM-DD HH:mm:ss",i=m.format(t);u=1==(null==(o=e.setting)?void 0:o.startToStop)?[i,n().endOf("day").format(t)]:i}return u})(e,u),u){case"LOCATION":i[o]=v||"";break;case"SEARCH_CASCADE":case"UPFILE":case"UPPICTURE":i[o]=v||[];break;case"ADDRESS":i[o]=v||"",f.defaultAddress=v||{};break;case"LABEL":{i[o]=v||{};let e=[];s.isObject(v)?e=(null==v?void 0:v.labels)||[]:Array.isArray(v)&&(e=v),f.labelSelectedList=e,f.labelSelectedListObj[o]=e;break}case"TITLE":i[o]=e.title;break;case"IMGCARD":i[o]=(null==(l=e.setting)?void 0:l.imgUrl)||"";break;case"CHECKBOX_BLOCK":v&&!Array.isArray(v)&&"customList"===c.type?i[o]=v.split(",").filter((e=>!!e)):(r=v||e.setting.defaultValue,s.isJSON(r)&&(r=JSON.parse(r)),i[o]=r);break;default:r=v||e.setting.defaultValue,s.isJSON(r)&&(r=JSON.parse(r)),i[o]=r}})),i};return{initForm:e=>{var t;let{list:a=[],map:i={},isFinished:n=!1}=e;const r=D(a);if(r)return void(window.location.href=r);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)),"otherSetting"in i&&s.isJSON(i.otherSetting)&&(f.config.otherSetting=JSON.parse(i.otherSetting)),f.originConfig=JSON.parse(JSON.stringify(f.config)),c.params&&Object.keys(c.params).length){const e=w(c.params);e&&Object.keys(e).length&&(f.paramsEvaluate=e)}k(f.config.evaluateResultSetting),N(),f.defaultFormArray=JSON.parse(JSON.stringify(a));const l=f.filterArr;a=a.filter((e=>!l.includes(e.type))),f.formArray=J(a||[]),f.form=_(f.formArray),f.rules=h(f.formArray),f.fontSize=e.fontSize,f.spinning=!1,f.hasFrontAddress=!1}}};export{c as ScaleViewInit};
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:O,hasDefault:y,formKey:C,isImportScale:A}=o(c,f,p),{formatRules:h}=u(c,f,p),{nextLogicEvent:R}=r(c,f),T=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))},L=()=>{var t;if(!E.value)return!!y.value&&("evaluateResultSetting"in f.config||(f.config.evaluateResultSetting={}),(t=>{let a=e();if(O.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}T(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},N=(e,t)=>{const a=e.find((e=>t===e.value));return a?a.key:t},b=(e,t)=>{if(["RADIO_BLOCK","CHECKBOX_BLOCK"].includes(t)&&e&&(e&&s.isJSON(e)&&(e=JSON.parse(e)),e.length))return!0},D=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)}`}},w=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},k=t=>{if(!t||!Object.keys(t).length)return;let a=e()||{};O.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(y.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)}}))}T(t)},J=e=>{let t=1;return e.map((a=>{const i=C(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)=>{b(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(!b(a.options,a.type))return;let i=t.value;Array.isArray(i)?(i=i.map((e=>N(a.options,e))),t.value=i):t.value=N(a.options,i)})),t.relationLogic=a)})(e,t),(e=>{const{nextLogic:t,options:a,type:i}=e||{};if(!t||!b(a,i))return;const{condition:n}=t||{};n&&n.length&&n.forEach((e=>{let t=e.value;Array.isArray(t)?(t=t.map((e=>N(a,e))),e.value=t):e.value=N(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;const o=e.val_key,{type:u}=e;let v;switch(v=e.dbValue?e.dbValue:((e,i)=>{var s,l,r,o;if(A.value)return;let u;const{defValType:v,dateType:d}=e.setting||{};if(3==v){const a=null==(l=null==(s=e.setting)?void 0:s.outDefaultValue)?void 0:l.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&&(u=e)}else{let a=t(i[0],f,c.params);a&&(a=decodeURIComponent(a),u="CHECKBOX_BLOCK"==e.type?a.split():a)}}}if("DATETIME"===i&&4==v){const t=(null==(r=a[d])?void 0:r.replace("-dd","-DD"))||"yyyy-MM-DD HH:mm:ss",i=m.format(t);u=1==(null==(o=e.setting)?void 0:o.startToStop)?[i,n().endOf("day").format(t)]:i}return u})(e,u),u){case"LOCATION":i[o]=v||"";break;case"SEARCH_CASCADE":case"UPFILE":case"UPPICTURE":i[o]=v||[];break;case"ADDRESS":i[o]=v||"",f.defaultAddress=v||{};break;case"LABEL":{i[o]=v||{};let e=[];s.isObject(v)?e=(null==v?void 0:v.labels)||[]:Array.isArray(v)&&(e=v),f.labelSelectedList=e,f.labelSelectedListObj[o]=e;break}case"TITLE":i[o]=e.title;break;case"IMGCARD":i[o]=(null==(r=e.setting)?void 0:r.imgUrl)||"";break;case"CHECKBOX_BLOCK":v&&!Array.isArray(v)&&"customList"===c.type?i[o]=v.split(",").filter((e=>!!e)):(l=v||e.setting.defaultValue,s.isJSON(l)&&(l=JSON.parse(l)),i[o]=l);break;default:l=v||e.setting.defaultValue,s.isJSON(l)&&(l=JSON.parse(l)),u.includes("SELECT")&&!l&&(l=null),i[o]=l}})),i};return{initForm:e=>{var t;let{list:a=[],map:i={},isFinished:n=!1}=e;const l=D(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)),"otherSetting"in i&&s.isJSON(i.otherSetting)&&(f.config.otherSetting=JSON.parse(i.otherSetting)),f.originConfig=JSON.parse(JSON.stringify(f.config)),c.params&&Object.keys(c.params).length){const e=w(c.params);e&&Object.keys(e).length&&(f.paramsEvaluate=e)}k(f.config.evaluateResultSetting),L(),f.defaultFormArray=JSON.parse(JSON.stringify(a));const r=f.filterArr;a=a.filter((e=>!r.includes(e.type))),f.formArray=J(a||[]),f.form=_(f.formArray),f.rules=h(f.formArray),f.fontSize=e.fontSize,f.spinning=!1,f.hasFrontAddress=!1}}};export{c as ScaleViewInit};
@@ -148,11 +148,11 @@ export declare const componentMap: {
148
148
  SELECT: import("vue").ShallowRef<import("vue").DefineComponent<{
149
149
  form: {
150
150
  type: ObjectConstructor;
151
- default: () => void;
151
+ default: () => {};
152
152
  };
153
153
  item: {
154
154
  type: ObjectConstructor;
155
- default: () => void;
155
+ default: () => {};
156
156
  };
157
157
  isLock: {
158
158
  type: BooleanConstructor;
@@ -173,11 +173,11 @@ export declare const componentMap: {
173
173
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "scaleChange"[], "scaleChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
174
174
  form: {
175
175
  type: ObjectConstructor;
176
- default: () => void;
176
+ default: () => {};
177
177
  };
178
178
  item: {
179
179
  type: ObjectConstructor;
180
- default: () => void;
180
+ default: () => {};
181
181
  };
182
182
  isLock: {
183
183
  type: BooleanConstructor;
@@ -1913,11 +1913,11 @@ export declare const componentMap: {
1913
1913
  EVALUATE_SELECT: import("vue").ShallowRef<import("vue").DefineComponent<{
1914
1914
  form: {
1915
1915
  type: ObjectConstructor;
1916
- default: () => void;
1916
+ default: () => {};
1917
1917
  };
1918
1918
  item: {
1919
1919
  type: ObjectConstructor;
1920
- default: () => void;
1920
+ default: () => {};
1921
1921
  };
1922
1922
  isLock: {
1923
1923
  type: BooleanConstructor;
@@ -1938,11 +1938,11 @@ export declare const componentMap: {
1938
1938
  }, () => JSX.Element, unknown, {}, {}, import("vue").ComponentOptionsMixin, import("vue").ComponentOptionsMixin, "scaleChange"[], "scaleChange", import("vue").VNodeProps & import("vue").AllowedComponentProps & import("vue").ComponentCustomProps, Readonly<import("vue").ExtractPropTypes<{
1939
1939
  form: {
1940
1940
  type: ObjectConstructor;
1941
- default: () => void;
1941
+ default: () => {};
1942
1942
  };
1943
1943
  item: {
1944
1944
  type: ObjectConstructor;
1945
- default: () => void;
1945
+ default: () => {};
1946
1946
  };
1947
1947
  isLock: {
1948
1948
  type: BooleanConstructor;
@@ -2205,6 +2205,7 @@ declare const ShortcutSetter: SFCWithInstall<import("vue").DefineComponent<{
2205
2205
  anchorIdList: import("vue").Ref<{
2206
2206
  name: string;
2207
2207
  title: string;
2208
+ index: number;
2208
2209
  }[]>;
2209
2210
  onScroll: (scrollEvent: Event) => void;
2210
2211
  callLifeCycle: <T extends "onSetup" | "beforeSetValue" | "beforeRequest" | "afterRequest" | "afterOptionInit">(lifeCycleName: T, payload?: Parameters<Required<Partial<{
@@ -2208,6 +2208,7 @@ declare const _default: import("vue").DefineComponent<{
2208
2208
  anchorIdList: import("vue").Ref<{
2209
2209
  name: string;
2210
2210
  title: string;
2211
+ index: number;
2211
2212
  }[]>;
2212
2213
  onScroll: (scrollEvent: Event) => void;
2213
2214
  callLifeCycle: <T extends "onSetup" | "beforeSetValue" | "beforeRequest" | "afterRequest" | "afterOptionInit">(lifeCycleName: T, payload?: Parameters<Required<Partial<{
@@ -1 +1 @@
1
- var e="@cnhis-design-vue/shared",i="3.2.5-beta.28",s="index.ts",n={"naive-ui":"^2.30.0",vue:"^3.2.0"},a={"@vicons/ionicons5":"^0.12.0","lodash-es":"^4.17.21",moment:"^2.29.1","video.js":"^7.19.2","videojs-contrib-hls":"^5.15.0",viewerjs:"^1.10.5","xe-utils":"^3.5.4"},d={name:e,version:"3.2.5-beta.28",private:!0,main:"index.ts",peerDependencies:n,dependencies:a};export{d as default,a as dependencies,s as main,e as name,n as peerDependencies,i as version};
1
+ var e="@cnhis-design-vue/shared",i="3.2.5-beta.30",s="index.ts",n={"naive-ui":"^2.30.0",vue:"^3.2.0"},a={"@vicons/ionicons5":"^0.12.0","lodash-es":"^4.17.21",moment:"^2.29.1","video.js":"^7.19.2","videojs-contrib-hls":"^5.15.0",viewerjs:"^1.10.5","xe-utils":"^3.5.4"},d={name:e,version:"3.2.5-beta.30",private:!0,main:"index.ts",peerDependencies:n,dependencies:a};export{d as default,a as dependencies,s as main,e as name,n as peerDependencies,i as version};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "cnhis-design-vue",
3
- "version": "3.2.5-beta.28",
3
+ "version": "3.2.5-beta.30",
4
4
  "license": "ISC",
5
5
  "module": "./es/components/index.js",
6
6
  "main": "./es/components/index.js",
@@ -71,5 +71,5 @@
71
71
  "iOS 7",
72
72
  "last 3 iOS versions"
73
73
  ],
74
- "gitHead": "0962355311fb305f863a528fe9450e98e512fd37"
74
+ "gitHead": "1053dc226c458d17a59ad0b78c25c8458d39e2e9"
75
75
  }