cnhis-design-vue 3.1.47-beta.12 → 3.1.47-beta.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/es/components/fabric-chart/src/hooks/birthProcess/useBirthProcess.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/index.d.ts +1 -0
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/index.js +1 -1
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useLeft.d.ts +4 -0
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useLeft.js +1 -0
- package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js +1 -1
- package/es/components/fabric-chart/src/utils/index.d.ts +7 -0
- package/es/components/fabric-chart/src/utils/index.js +1 -1
- package/es/components/iho-table/src/hooks/useColumnConfigAdaptor.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/DateInner.vue2.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue2.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/SelectDynamic.vue.d.ts +5 -2
- package/es/components/table-filter/src/components/render-widget/components/SelectDynamic.vue2.js +1 -1
- package/es/components/table-filter/src/components/render-widget/components/index.d.ts +5 -2
- package/es/components/table-filter/src/components/render-widget/widgetCfgMaps.d.ts +5 -2
- package/es/components/table-filter/src/hooks/useAdvanced.js +1 -1
- package/es/shared/package.json.js +1 -1
- package/package.json +2 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{drawLine as e,drawArrow as n,drawText as o,defaultTextStyle as i,drawPoint as r,defaultStyle as l,defaultRectStyle as s}from"../useDraw.js";import{useGrid as a}from"../useGrid.js";import{useBirthProcessCumputedPoint as u}from"../useCumputedPoint.js";import"@vueuse/core";import{getScaleInfo as c,drawScaleNumber as f,drawScaleLine as d}from"../useScaleColumn.js";import{useCommon as p}from"../useCommon.js";import"vue";import{getIndex as h,isEffectiveNode as g,getTime as v}from"../../utils/index.js";import"../temperature/useShadow.js";import{cloneDeep as
|
|
1
|
+
import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{drawLine as e,drawArrow as n,drawText as o,defaultTextStyle as i,drawPoint as r,defaultStyle as l,defaultRectStyle as s}from"../useDraw.js";import{useGrid as a}from"../useGrid.js";import{useBirthProcessCumputedPoint as u}from"../useCumputedPoint.js";import"@vueuse/core";import{getScaleInfo as c,drawScaleNumber as f,drawScaleLine as d}from"../useScaleColumn.js";import{useCommon as p}from"../useCommon.js";import"vue";import{getIndex as h,isEffectiveNode as g,getTime as v,getScaleNumberList as m}from"../../utils/index.js";import"../temperature/useShadow.js";import{cloneDeep as y}from"lodash-es";import{format as k}from"date-fns";function w(w,x,b,j,S){const{cumputedX:C,cumputedY:T,getXValue:M,getYValue:P}=u(x),{getEqualXTypes:E,handleAddPrevent:G}=p(w,b),{xAxis:L,grid:Y,originX:X,originY:A,xCellWidth:H,endY:I,startTime:O,leftAddAreaWidth:W,leftScales:V,rightScales:D,yCellHeight:N,endX:R,scaleValues:$,canvasWidth:B,borderStyle:F,rightAddAreaWidth:q,event:z,originYCervix:J,other:K,canvasHeight:Q}=x,U=y($),Z=new Set;function _(){U.filter((t=>t.show)).forEach(((t,l)=>{var s;const a=[],u=[],c=[];null==(s=t.data)||s.forEach(((s,f)=>{!function(s,f,d){let p,h;const{pointAttr:g={},lineAttr:v={},title:m="",key:y,type:k="circle",childbirthStyle:S={}}=t,C=t.data[d+1],T=it(C,t);if(s&&T&&!f.breakpoint)h=e([...s,...T],{...v});else if(s&&!T&&!f.breakpoint){const n=it(C,t);h=n?e([...s,...n],{...v}):null}let E,G;if(f.childbirth){const t=s[1]+N;E=n([s[0],s[1],t],S),c.push(E),G=o([s[0]+H/2,t-N/2],{value:String(f.childbirth),...i,originX:"left",originY:"center",...S}),c.push(G)}const L=u[d-1],Y={origin:{data:f,title:m,key:y||"",dataIndex:l,index:d},leftLine:L,rightLine:h,arrowGroup:E,arrowGroupText:G,...g,...x.event.hovered?x.event.evented?{selectable:!0}:{selectable:!0,lockMovementX:!0,lockMovementY:!0}:x.event};L?p=r(k,{left:L.get("x2"),top:L.get("y2"),...Y}):s&&(Y.leftLine=null,p=r(k,{left:s[0],top:s[1],...Y}));u.push(h),p&&(!function(t){z.hovered&&(t.on("mouseover",(()=>{ot(t,"hover")})),t.on("mouseout",(()=>{j.show=!1})));if(t.lockMovementX&&t.lockMovementY)return;t.on("moving",(()=>{nt(t),function(t){var e,n,o,i;null==(e=t.leftLine)||e.setCoords().set({x2:t.left,y2:t.top}),null==(n=t.rightLine)||n.setCoords().set({x1:t.left,y1:t.top}),null==(o=t.arrowGroup)||o.setCoords().set({left:t.left,top:t.top}),null==(i=t.arrowGroupText)||i.setCoords().set({left:t.left+H/2,top:t.top+N/2})}(t),z.hovered&&ot(t)})),t.on("mouseup",(e=>{if(j.show=!1,1===e.button){const{key:e}=t.origin,n={...t.origin,data:{...t.origin.data,time:M(t.left),value:P(e,t.top)}};w.value.discardActiveObject(),b("change",n),tt(n,"change")}}))}(p),a.push(p),Z.add(p))}(it(s,t),s,f)})),Promise.all(a).then((t=>{const e=u.filter((t=>t));let n=null;t=t.filter((t=>(t&&n&&(n.nextPoint=t,t.prevPoint=n),n=t||n,t))),Promise.all(c).then((n=>{w.value.add(...e,...t,...n),t.forEach((t=>{null==t||t.bringToFront()}))}))}))}))}function tt(t,e="add"){const{dataIndex:n,data:o,index:i,key:r}=t,l=U.find((t=>t.key===r));switch(e){case"remove":l.data.splice(i,1);break;case"change":l.data[i]=o;break;default:{const t=h(o.time,l.data);l.data.splice(t,0,o);break}}et()}function et(){var t;Z.size&&(null==(t=w.value)||t.remove(...function(t){const e=[];return t.forEach((t=>{t&&e.push(t),(null==t?void 0:t.leftLine)&&e.push(null==t?void 0:t.leftLine),(null==t?void 0:t.rightLine)&&e.push(null==t?void 0:t.rightLine),(null==t?void 0:t.arrowGroup)&&e.push(null==t?void 0:t.arrowGroup),(null==t?void 0:t.arrowGroupText)&&e.push(null==t?void 0:t.arrowGroupText)})),e}([...Z]))),Z.clear(),_()}function nt(t){const e=t.prevPoint?t.prevPoint.left:X,n=t.nextPoint?t.nextPoint.left:R;t.setCoords(),["cervix","fetalPresentation"].includes(t.origin.key)&&t.top<J&&t.set("top",J),t.top<A&&t.set("top",A),t.top>I&&t.set("top",I),t.left<e&&t.set("left",e),t.left>n&&t.set("left",n)}function ot(t,e="moving"){const{title:n,key:o,data:i}=t.origin;j.point={x:t.left,y:t.top},j.list=[`${n} ${"hover"===e?i.value:P(o,t.top)}`,`时间 ${M(t.left).slice(-5)}`],j.show=!0}function it(t,e){if(g(t)&&function(t){const e=O+864e5,n=v(t);return n>=O&&n<=e}(t.time)){const n=C(t.time),o=T(e.key,e.range,t.value);return[n,o<A?A:o>I?I:o]}}function rt(t,e){return t+1>e[1]?e[0]:t+1}return a(w,x),function(){const e=new t.Rect({...F,width:B-W-q-1,height:I-1,left:W,top:0,fill:"transparent"});w.value.add(e)}(),function(){function e(e,n="left"){let r="left"===n?W:R;e.forEach(((e,n)=>{const{range:a,spaceValue:u,width:p,title:h,titleStyle:g,key:v,position:y="center",spaceGridNumber:k=1,showNumber:x,showMaxMinNumber:b}=e,j=[],S=[],C=r+p/2,T=m(a,u),M=T.length;T.forEach(((t,n)=>{const{lineXMain:o,lineXSub:i,textLeft:l}=c(y,r,p),s=I-n*N*k,a=0===n?I-8:n!==T.length-1||A||J&&"FHR"!==v?s:A+8;!x||(0===n||n===M-1)&&!b||j.push(f(String(t),e,l,a)),S.push(...d(e,n,o,i,s,N,A,M))}));const P=new t.Rect({...s,strokeWidth:.5,width:p,height:I,left:C,top:I/2}),E=o([C,A>0?A-N/2:N/2],{value:String(h),...i,...g}),G=new t.Group([...S,...j,P,...E?[E]:[]],{objectCaching:!1,...l});w.value.add(G),G.sendToBack(),r+=p}))}e(V),e(D,"right")}(),function(){const{show:e,startTime:n,range:r=[0,23],position:s="top",style:a}=L.time,{show:u,range:c=[0,23],position:f,style:d}=L.processTime;if(e||u){const p=[],h=[],g=[],v=[],m=X+H/2,y=N/2;for(let t=0;t<Y.mainXCell;t++){if(e){const e=0===t?+n.slice(11,13):rt(p.at(-1),r);p.push(e);const l="top"===s?A-y:I+y;g.push(o([m+t*H,l],{value:String(e),...i,...a||{}}))}if(u){const e=0===t?c[0]:h.at(-1)+1;h.push(e);const n="top"===f?y:Q-y;v.push(o([m+t*H,n],{value:String(e),...i,...d||{}}))}}const k=new t.Group([...g,...v],{objectCaching:!1,...l});w.value.add(k),w.value.sendToBack(k)}}(),function(){var t;const n=Object.values(K),o=[],i={},r=U.find((t=>"cervix"===t.key&&t.show)),l=null==(t=null==r?void 0:r.data)?void 0:t.find((t=>3==+t.value));function s(t,e){const{key:n,range:o}=r||{},i=T(n,o,10),l=[0,e],s=[-e/t,0],a=[(I-i-e)/t,I-i],u=[R-X,t*(R-X)+e];let c=[],f=[];function d([n,o]){return Math.abs(o-t*n-e)<=1}function p([t,e]){const[n,o]=[...h([t,e])];return n>=X&&n<=R&&o>=i&&o<=I}function h([t,e]){return[X+t,I-e]}return d(l)&&p(l)&&(c=h(l)),d(s)&&p(s)&&(c=h(s)),d(a)&&p(a)&&(f=h(a)),d(u)&&p(u)&&(f=h(u)),[...c,...f]}n.forEach((t=>{if(!t.show)return;const{key:n}=t;switch(n){case"fetalPresentation":{const{range:i,show:r}=U.find((t=>t.key===n));if(r){const r=T(n,i,0);o.push(e([X,r,R,r],{...t}))}break}case"alert":if(l){const{key:n,range:a}=r||{},u=216e5,c={time:k(new Date(v(l.time)+u),"yyyy-MM-dd HH:mm"),value:10},[f,d]=[C(l.time)-X,I-T(n,a,l.value)],[p,h]=[C(c.time)-X,I-T(n,a,c.value)],g=(h-d)/(p-f),m=d-f*g,y=s(g,m);y.length>0&&(o.push(e(y,{...t})),Object.assign(i,{k:g,b:m}))}break;case"handling":if(l){const{k:n,b:r}=i,a=144e5,u=s(n,r-(C(k(new Date(v(l.time)+a),"yyyy-MM-dd HH:mm"))-C(l.time))*n);u.length>0&&o.push(e(u,{...t}))}}})),w.value.add(...o)}(),_(),function(){function t(t,e){const n=U.findIndex((e=>e.key===t.key));return{renderItem:()=>t.title,origin:{title:t.title,unit:t.unit,dataIndex:n,key:t.key},pointer:e}}x.event.evented&&w.value.on("mouse:up",(e=>{if(3===e.button){const{x:n=0,y:o=0}=e.pointer||{};n>=X&&n<=R&&o>=A&&o<=I&&(S.point={x:n,y:o},S.show=!0,e.target?(S.target=e.target,S.list=["删除节点"],w.value.forEachObject((t=>{t.origin&&t.left===e.target.left&&t.top===e.target.top&&S.list.push({renderItem:()=>t.origin.title,origin:{...t.origin},mode:"remove",pointer:e.pointer})}))):(S.target=null,S.list=["新增节点"],U.filter((t=>t.show)).forEach((i=>{if(!E(n,"key",H).includes(i.key)){if(["cervix","fetalPresentation"].includes(i.key)&&o<J)return;S.list.push(t(i,e.pointer))}})),1===S.list.length&&(S.show=!1,G("repeat"),console.log("当前时间段内无可新增节点"))))}}))}(),function(){const e=B-q/2;function n(e,n){if(!e.length)return;let l=A;const s=[];e.forEach((e=>{const o=e.title.split("").join("\n"),a=$.findIndex((t=>t.key===e.key)),u=new t.Text(String(o),{...i,...e.titleStyle||{},originY:"top",left:n,top:l,lineHeight:1}),c=r(e.type,{left:n,top:l+u.height+3,...e.pointAttr,originY:"top",origin:{title:e.title,unit:e.unit,type:e.type,dataIndex:a,key:e.key,isMenu:!0},originLeft:n,originTop:l+u.height+3,...x.event});l+=u.height+c.height+15,function(t){function e(t){const{left:e,top:n}=t;return e>=X&&e<=R&&n>=A&&n<=I}t.on("moving",(()=>{t.set("originY","center"),e(t)?(nt(t),ot(t)):j.show=!1})),t.on("mouseup:before",(n=>{if(j.show=!1,0===n.e.button&&e(t))if(E(t.left,"key",H).includes(t.origin.key))G("repeat");else{const e={data:{time:M(t.left),value:P(t.origin.key,t.top)},...t.origin};b("add",e),tt(e)}!function(t){t.setCoords().set({originY:"top",left:t.originLeft,top:t.originTop})}(t)}))}(c),s.push(u,c)})),o(s),w.value.add(...s)}function o(t){const e=t.at(-1),n=(I-A)/2,o=(e.height+e.top-A)/2;t.forEach((t=>{const e=t.top+n-o;t.set({top:e,originTop:e})}))}n(V,W/2),n(D,e)}(),{clickMenu:function({item:t,target:e}){const n={...t.origin};"remove"===t.mode?(b("remove",n),tt(n,"remove")):(Object.assign(n,{data:{time:M(t.pointer.x),value:P(t.origin.key,t.pointer.y)}}),b("add",n),tt(n))},redrawPoints:et}}export{w as useBirthProcess};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
export{useTop}from"./useTop.js";export{useCenter}from"./useCenter.js";
|
|
1
|
+
export{useTop}from"./useTop.js";export{useLeft}from"./useLeft.js";export{useCenter}from"./useCenter.js";
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type Ref } from 'vue';
|
|
2
|
+
import { fabric } from '../../../../../../es/shared/utils/fabricjs';
|
|
3
|
+
import { AnyObject } from '../../../../../../es/shared/types';
|
|
4
|
+
export declare function useLeft(canvas: Ref<fabric.Canvas>, propItems: AnyObject, emits: Function): void;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{fabric as t}from"../../../../../shared/utils/fabricjs/index.js";import{drawTextGroup as e,defaultStyle as i,drawPoint as o,drawText as n,defaultTextStyle as r}from"../useDraw.js";import"date-fns";import{getScaleNumberList as l}from"../../utils/index.js";import"@vueuse/core";import{drawScaleNumber as s}from"../useScaleColumn.js";import"vue";import"lodash-es";import"../temperature/useShadow.js";function a(a,u,c){const{originY:h,endY:d,borderStyle:p,left:g,itemList:f,scaleValues:m,originX:y,endX:S,yCellHeight:w}=u;!function(){if(!g)return;const{title:t,titleWidth:i,titleStyle:o}=g,n=e({width:i,height:d-h,...p},{value:t.split("").join("\n"),...o||{}},{left:0,top:h},!0);a.value.add(n)}(),m.forEach(((e,o)=>{const u="left"===e.layout?y-5:S+5,{range:c,spaceValue:p,title:f,titleStyle:m,spaceGridNumber:b=1,showNumber:j,showMaxMinNumber:v}=e,x=[],N=l(c,p);console.log(555,N);const C=N.length;N.forEach(((t,i)=>{const o=0===i?d-5:d-i*w*b;!j||(0===i||i===C-1)&&!v||x.push(s(String(t),{...e,position:e.layout},u,o))}));const T=n([g.width/2,h+w],{value:String(f),...r,...m}),X=new t.Group([...x,...T?[T]:[]],{objectCaching:!1,...i});a.value.add(X),X.sendToBack()})),function(){const e=JSON.parse(JSON.stringify(f));let n=d;const r=g.titleWidth+15;e.reverse().forEach((e=>{n-=10;const l=e.title,s=new t.Text(String(l),{...i,objectCaching:!1,...e.titleStyle||{},originX:"left",originY:"bottom",left:r,top:n,lineHeight:1,fontSize:12}),u=o(e.type,{left:r+s.width+5,top:n-(s.height||30)/2-1,...e.pointAttr,originY:"center",originX:"left",origin:{title:e.title,unit:e.unit,type:e.bigType,dataIndex:e.dataIndex,key:e.key,isMenu:!0},originLeft:r+s.width+5,originTop:n-(s.height||30)/2-1});n-=s.height||30,a.value.add(s,u)}))}()}export{a as useLeft};
|
package/es/components/fabric-chart/src/hooks/surgicalAnesthesia/useSurgicalAnesthesiaChart.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{ref as t,reactive as e,computed as a,unref as
|
|
1
|
+
import{ref as t,reactive as e,computed as a,unref as i,onMounted as r,nextTick as l}from"vue";import{defaultBorderStyle as o}from"../useDraw.js";import"../../../../../shared/utils/fabricjs/index.js";import{format as s}from"date-fns";import{getChildrenSize as n}from"../../utils/index.js";import"@vueuse/core";import{cloneDeep as u,range as d}from"lodash-es";import"../temperature/useShadow.js";import{useTop as p}from"./useTop.js";import{useLeft as m}from"./useLeft.js";import{useCenter as h}from"./useCenter.js";function c(c,v,f,g){const x=t(),y=t(),w=t(),b=e({show:!1,point:{x:0,y:0},list:[]}),j=e({show:!1,point:{x:0,y:0},list:[],target:null}),C=a((()=>{var t;return null!=(t=v.data.left.width)?t:0})),H=a((()=>n(v.data.top.treeData))),Y=a((()=>{const{xAxis:t}=v.data;return"top"===t.position?t.height:0})),T=function(){const t=u(v.data.top.treeData);let e=0;const{cellWidth:a,cellHeight:i}=v.data.top.tree;return function t(r,l=0){r.forEach((r=>{var o;const s={top:e*i+Y.value,left:l*a,width:a,height:i};if(e++,null==(o=r.children)?void 0:o.length){e--;const a=n(r.children);s.height=a*i,t(r.children,l+1)}else s.width=C.value-s.left;Object.assign(r,s)}))}(t),t}();const D=a((()=>{const{grid:t}=v.data;return t.mainXCell*t.subXCell})),M=a((()=>v.data.top.tree.cellHeight)),X=a((()=>Y.value+M.value*H.value)),A=a((()=>{const t=u(v.data.xAxis),{position:e,spaceValue:a,spaceTimeStamp:i}=t,r=d(D.value/a+1).map((e=>0===e?t.startTime:s(new Date(W.value+e*a*i),"yyyy-MM-dd HH:mm:ss")));return{...t,list:r,left:C.value,top:"top"===e?0:X.value}})),S=a((()=>{const{grid:t}=v.data;return t.mainYCell*t.subYCell})),G=a((()=>{var t;const{width:e,right:a}=v.data;if(!a)return e;return e-(null!=(t=a.width)?t:0)})),V=a((()=>v.data.xAxis.height+M.value*H.value)),L=a((()=>{var t;const{bottom:e=null,height:a}=v.data;if(!e)return a;return a-(null!=(t=e.height)?t:0)})),N=a((()=>(G.value-C.value)/D.value)),P=a((()=>(L.value-V.value)/S.value)),W=a((()=>{var t;return Date.parse((null==(t=v.data.xAxis)?void 0:t.startTime)||s(new Date,"yyyy-MM-dd HH:mm:ss"))})),E=a((()=>A.value.spaceTimeStamp/N.value)),I=a((()=>{const{scaleValues:t}=v.data;return t.map((t=>t.dataList.filter((t=>t.show)).map(((e,a)=>({...e,bigType:t.type,unit:t.unit,dataIndex:a}))))).flat()})),O=e({canvasWidth:v.data.width,canvasHeight:v.data.height,borderStyle:{...o,...v.data.borderStyle||{}},grid:v.data.grid,top:v.data.top,left:v.data.left,other:v.data.other,topGridYNumber:i(H),topGridYCellHeight:i(M),topGridOriginY:i(Y),topGridEndY:i(X),treeData:T,xAxis:i(A),startTime:i(W),timeXCell:i(E),gridXNumber:i(D),gridYNumber:i(S),xCellWidth:i(N),yCellHeight:i(P),originX:i(C),endX:i(G),originY:i(V),endY:i(L),itemList:i(I),scaleValues:v.data.scaleValues});return r((async()=>{await l(),p(c,O),m(c,O),h(c,O)})),{propItems:O,redrawPoints:y,select:x,pointTipProps:b,pointMenuProps:j,clickMenu:w}}export{c as useSurgicalAnesthesiaChart};
|
|
@@ -16,3 +16,10 @@ export declare function isOverlapPoint(pointObj1: any, pointObj2: any): boolean;
|
|
|
16
16
|
export declare function getFloorNumber(value: number, n?: number): number;
|
|
17
17
|
export declare function getChildrenSize(treeData: ITreeItem[]): number;
|
|
18
18
|
export declare function getTime(value: number | string): number;
|
|
19
|
+
/**
|
|
20
|
+
* @description: 获取y轴刻度数值列表
|
|
21
|
+
* @param {[number, number]} range
|
|
22
|
+
* @param {number} spaceValue
|
|
23
|
+
* @return {number[]}
|
|
24
|
+
*/
|
|
25
|
+
export declare function getScaleNumberList(range: [number, number], spaceValue: number): number[];
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{isNull as n,isNumber as t}from"lodash-es";function e(n){return(null==n?void 0:n.time)&&((null==n?void 0:n.value)||0===(null==n?void 0:n.value))}function r(n,t){const e={};for(const r in n)t.map((n=>n.type)).includes(r)||(e[r]=n[r]);return e}function u(n,t){const e=t.findIndex((t=>d(t.time)>d(n)));return~e?e:t.length}function o(n){return["temperature","pulse"].includes(n)}function i(n,t){return n.includes("心率")?"pulse_other":t}function l(n){return n.includes("_other")?n.split("_")[0]:n}function c(t){return!Number.isNaN(+t)&&!n(t)}function f(n,t){return
|
|
1
|
+
import{isNull as n,isNumber as t}from"lodash-es";function e(n){return(null==n?void 0:n.time)&&((null==n?void 0:n.value)||0===(null==n?void 0:n.value))}function r(n,t){const e={};for(const r in n)t.map((n=>n.type)).includes(r)||(e[r]=n[r]);return e}function u(n,t){const e=t.findIndex((t=>d(t.time)>d(n)));return~e?e:t.length}function o(n){return["temperature","pulse"].includes(n)}function i(n,t){return n.includes("心率")?"pulse_other":t}function l(n){return n.includes("_other")?n.split("_")[0]:n}function c(t){return!Number.isNaN(+t)&&!n(t)}function f(n,t){return s(n.left,1)===s(t.left,1)&&Math.abs(s(n.top,1)-s(t.top,1))<=2}function s(n,t=100){return Math.floor(n*t)/t}function a(n){let t=0;return n.forEach((n=>{var e;(null==(e=n.children)?void 0:e.length)?t+=a(n.children):t++})),t}function d(n){return n?t(n)?new Date(n).getTime():Date.parse(n.replace(/-/g,"/")):Date.now()}function p(n,t){const e=[],[r,u]=n;for(let n=r;t>0?n<=u:n>=u;n+=t)e.push(n);return e}export{r as deleteProperty,a as getChildrenSize,s as getFloorNumber,u as getIndex,p as getScaleNumberList,d as getTime,l as getType,e as isEffectiveNode,o as isOneLine,f as isOverlapPoint,c as isValidValue,i as setOtherType};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{cloneDeep as e,isString as t,isFunction as n,pick as o,isArray as i,isNumber as a}from"lodash-es";import{isObject as r}from"@vue/shared";const s=Symbol("remove property");function l(){return{formConfigLikeAdaptor:function(l){const p={};return r(l)?{fieldList:function(l){const m=new Map([["NONE",0],["LEFT",1],["RIGHT",2]]),u=new Map([["0",0],["1",1]]),c=new Map([...["RADIO","RADIO_BLOCK","CHECKBOX","CHECKBOX_BLOCK","SELECT","SEARCH","SEARCH_MORE","SWITCH_COMPONENT"].map((e=>[e,"select"])),...["DATE"].map((e=>[e,"date"])),...["INPUT"].map((e=>[e,"input"])),...["DIGITAL"].map((e=>[e,"number"]))]),d=(e,t)=>{if(!r(e))return;const n={label:e.describe,...e};t.options=i(t.options)?[...t.options,n]:[n]},f=(e,n)=>{0!==e&&"0"!==e&&e&&(t(e)||a(e))&&(console.log("value=>",e),n.componentProps={maxTagCount:+e,...n.componentProps})},_=new Map([["multi_select_value",f],["is_null",(e,t,n,o)=>{"1"!==e&&"0"===e&&(o[n.val_key]=[{required:!0,message:"必填"}])}],["validate",(e,t)=>{if(!r(e))return;t.componentProps={...Object.entries({maxlength:"max_length",minlength:"min_length",max:"max_value",min:"min_value",precision:"decimal_length"}).reduce(((t,[n,o])=>(t[n]=e[o],t)),{}),...t.componentProps}}],["dateValidate",(e,t)=>{r(e)&&(t.isDateDisabled=(t,n)=>{if(!r(n))return;const{startDate:o,endDate:i}=e;let a=!1;return o&&(a=new Date(n[o]).getTime()>t),i&&(a=a||new Date(n[i]).getTime()<t),a})}],["date_format","valueFormat"],...["open","close"].map((e=>[e,d])),["is_edit",{property:"isEdit",valueMap:u}],["html_type",(e,n,o)=>{var i;if(!t(e))return;if("DATE"===e)return void(n.formType=t(o.date_format)&&o.date_format.startsWith("HH:mm")?"time":"date");n.formType=null!=(i=c.get(e))?i:e;const a="SEARCH"!==e&&("SEARCH_MORE"===e||("SELECT"===e?"0"===o.multi_select:null));a&&(n.componentProps={multiple:a,...n.componentProps})}],["option",{property:"options",fieldMap:new Map([["text","label"]])}]
|
|
1
|
+
import{cloneDeep as e,isString as t,isFunction as n,pick as o,isArray as i,isNumber as a}from"lodash-es";import{isObject as r}from"@vue/shared";const s=Symbol("remove property");function l(){return{formConfigLikeAdaptor:function(l){const p={};return r(l)?{fieldList:function(l){const m=new Map([["NONE",0],["LEFT",1],["RIGHT",2]]),u=new Map([["0",0],["1",1]]),c=new Map([...["RADIO","RADIO_BLOCK","CHECKBOX","CHECKBOX_BLOCK","SELECT","SEARCH","SEARCH_MORE","SWITCH_COMPONENT"].map((e=>[e,"select"])),...["DATE"].map((e=>[e,"date"])),...["INPUT"].map((e=>[e,"input"])),...["DIGITAL"].map((e=>[e,"number"]))]),d=(e,t)=>{if(!r(e))return;const n={label:e.describe,...e};t.options=i(t.options)?[...t.options,n]:[n]},f=(e,n)=>{0!==e&&"0"!==e&&e&&(t(e)||a(e))&&(console.log("value=>",e),n.componentProps={maxTagCount:+e,...n.componentProps})},_=new Map([["multi_select_value",f],["is_null",(e,t,n,o)=>{"1"!==e&&"0"===e&&(o[n.val_key]=[{required:!0,message:"必填"}])}],["validate",(e,t)=>{if(!r(e))return;t.componentProps={...Object.entries({maxlength:"max_length",minlength:"min_length",max:"max_value",min:"min_value",precision:"decimal_length"}).reduce(((t,[n,o])=>(t[n]=e[o],t)),{}),...t.componentProps}}],["dateValidate",(e,t)=>{r(e)&&(t.isDateDisabled=(t,n)=>{if(!r(n))return;const{startDate:o,endDate:i}=e;let a=!1;return o&&(a=new Date(n[o]).getTime()>t),i&&(a=a||new Date(n[i]).getTime()<t),a})}],["date_format","valueFormat"],...["open","close"].map((e=>[e,d])),["is_edit",{property:"isEdit",valueMap:u}],["html_type",(e,n,o)=>{var i;if(!t(e))return;if("DATE"===e)return void(n.formType=t(o.date_format)&&o.date_format.startsWith("HH:mm")?"time":"date");n.formType=null!=(i=c.get(e))?i:e;const a="SEARCH"!==e&&("SEARCH_MORE"===e||("SELECT"===e?"0"===o.multi_select:null));a&&(n.componentProps={multiple:a,...n.componentProps})}],["option",{property:"options",fieldMap:new Map([["text","label"]])}],...["alias","name"].map((e=>[e,(e,t,n)=>{var o;t.title=`${null!=(o=n.alias)?o:n.name}${n.suffix?`(${n.suffix})`:""}`}]))]),v=new Map([["sum","isSum"],["show","isShow"],["elementId","columnName"],["columnWidth","colWidth"],["fixedWayEnum",{property:"isFixed",valueMap:m}],["multi_select_value",f],["setting",{fieldMap:_,assign:!0}]]);return l.map((e=>E(e,p,v)));function E(a,l,p){if(!p)return e(a);const m={};return Object.entries(a).forEach((([e,o])=>{const i=p.get(e);return i?i!==s?t(i)?m[i]=o:n(i)?i(o,m,a,l):void(r(i)&&(i.assign?Object.assign(m,u(o,i)):m[i.property||e]=u(o,i))):void 0:m[e]=o})),m.componentProps=Object.assign({},m.componentProps,o(m,["options","isDateDisabled"])),m;function u(e,t){var o,a;return!r(t)||n(t)?e:i(e)?e.map((e=>u(e,t))):r(e)?E(e,l,t.fieldMap):null!=(a=null==(o=t.valueMap)?void 0:o.get(e))?a:e}}}(l.fieldList),editRules:p}:{fieldList:[],editRules:p}}}}export{l as useColumnConfigAdaptor};
|
package/es/components/table-filter/src/components/render-widget/components/DateInner.vue2.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as t,computed as a,watch as l,openBlock as u,createElementBlock as
|
|
1
|
+
import{defineComponent as e,ref as t,computed as a,watch as l,openBlock as u,createElementBlock as r,unref as n,createBlock as o,createCommentVNode as i,normalizeClass as d,withCtx as p,createTextVNode as m,toDisplayString as v}from"vue";import{NButton as c}from"naive-ui";import s from"../../../../../date-picker/index.js";import f from"moment";import{isString as y}from"lodash-es";import{WidgetOptionEnums as g}from"../../../types/enums.js";import{dateDisabledCollect as b,setDateDisabled as h,setTimeDisabled as k}from"../helpers/dateDisabled.js";import C from"./DateQuickBtn/index.vue.js";const Y={class:"render-widget-date-range"};var D=e({__name:"DateInner",props:{componentCfg:{type:Object},type:{type:String,default:"date"},clearable:{type:Boolean,default:!1},valueFormat:{type:String,default:"yyyy-MM-dd"},placeholder:{type:String,default:"请输入"},value:{type:String,default:""},unit:{type:String,default:""}},emits:["update:value","update:unit"],setup(e,{emit:D}){const M=e,S=t(),F=t(!1),j=a((()=>{let e="";switch(M.type){case"date":e="YYYY-MM-DD";break;case"datetime":e="YYYY-MM-DD HH:mm:ss"}return e})),T=a((()=>{let e="";switch(M.type){case"date":e="选择日期";break;case"datetime":e="选择时间"}return e})),w=a((()=>M.unit)),_=a((()=>{var e;return null==(e=M.componentCfg)?void 0:e.widgetCfg.optionSetting})),x=a((()=>_.value!==g.SELECT_TIME)),B=a((()=>b.curTime));function E(){x.value&&(F.value=!F.value)}function V(e){D("update:value",e)}function H(e){D("update:unit",e)}function I(e){S.value=e;const t=e?f(e).format(j.value):e;D("update:value",t)}function O(e){return h(e,_.value)}function Q(e){return k(e,_.value)}return l((()=>M.value),(e=>{if(e&&y(e))return w.value||(F.value=!0),void(S.value=f(e).valueOf());S.value=null}),{immediate:!0}),x.value||(F.value=!0),(t,a)=>(u(),r("div",Y,[n(x)&&!F.value?(u(),o(C,{key:0,componentCfg:e.componentCfg,type:e.type,dateFormat:n(j),radioValue:n(w),onClickQuickBtn:V,onChangeRadioValue:H},null,8,["componentCfg","type","dateFormat","radioValue"])):i("v-if",!0),n(x)?(u(),o(n(c),{key:1,secondary:"",class:d(F.value?"select-date-right":"select-date-left"),onClick:E},{default:p((()=>[m(v(n(T)),1)])),_:1},8,["class"])):i("v-if",!0),!n(x)||F.value?(u(),o(n(s),{key:2,to:"body",type:e.type,clearable:e.clearable,valueFormat:e.valueFormat,placeholder:e.placeholder,value:S.value,defaultTime:n(B),"is-date-disabled":O,"is-time-disabled":Q,"onUpdate:value":I},null,8,["type","clearable","valueFormat","placeholder","value","defaultTime"])):i("v-if",!0)]))}});export{D as default};
|
package/es/components/table-filter/src/components/render-widget/components/DateRangeInner.vue2.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,ref as a,computed as t,watch as l,openBlock as u,createElementBlock as r,unref as n,createBlock as i,createCommentVNode as d,normalizeClass as o,withCtx as v,createTextVNode as c,toDisplayString as m,createVNode as s,createElementVNode as p}from"vue";import{NButton as f}from"naive-ui";import y from"../../../../../date-picker/index.js";import g from"moment";import{isString as b}from"lodash-es";import{WidgetOptionEnums as h}from"../../../types/enums.js";import{dateDisabledCollect as k,isStartDateRangeDisabled as C,isTimeStartRangeDisabled as F,isEndDateRangeDisabled as M,isTimeEndRangeDisabled as S}from"../helpers/dateDisabled.js";import T from"./DateQuickBtn/index.vue.js";const Y={class:"render-widget-date-range"},D={key:2,class:"date-detail-range"},E=p("span",{class:"divider"},null,-1);var _=e({__name:"DateRangeInner",props:{componentCfg:{type:Object},type:{type:String,default:"date"},clearable:{type:Boolean,default:!1},valueFormat:{type:String,default:"yyyy-MM-dd"},startPlaceholder:{type:String,default:"起始"},endPlaceholder:{type:String,default:"截止"},value:{type:String,default:""},unit:{type:String,default:""}},emits:["update:value","update:unit"],setup(e,{emit:p}){const _=e,j=a(!1),w=a(),P=a(),I=t((()=>_.unit)),U=t((()=>{var e;return null==(e=_.componentCfg)?void 0:e.widgetCfg.optionSetting})),x=t((()=>U.value!==h.SELECT_TIME)),B=t((()=>U.value===h.PAST_TIME)),O=t((()=>U.value===h.FUTURE_TIME)),R=t((()=>{let e="";switch(_.type){case"date":e="YYYY-MM-DD";break;case"datetime":e="YYYY-MM-DD HH:mm:ss"}return e})),V=t((()=>{let e="";switch(_.type){case"date":e="选择日期";break;case"datetime":e="选择时间"}return e})),H=t((()=>O.value?k.curTime:"00:00:00")),Q=t((()=>B.value?k.curTime:"23:59:59"));function $(e){p("update:value",e)}function A(e){p("update:unit",e)}function L(){x.value&&(j.value=!j.value)}function q(e,a){switch(a){case"start":w.value=e;break;case"end":P.value=e}const t=w.value?g(w.value).format(R.value):null,l=P.value?g(P.value).format(R.value):null;p("update:value",t||l?`${null!=t?t:""} ~ ${null!=l?l:""}`:"")}function z(e){return C(e,U.value,P.value)}function G(e){return F(e,U.value,P.value)}function J(e){return M(e,U.value,w.value)}function K(e){return S(e,U.value,w.value)}return l((()=>_.value),(e=>{if(e&&b(e)&&e.includes("~")){const[a,t]=e.split("~");return a.trim()&&(w.value=g(a.trim()).valueOf()),void(t.trim()&&(P.value=g(t.trim()).valueOf()))}w.value=P.value=null,p("update:unit","")}),{immediate:!0}),x.value||(j.value=!0),(a,t)=>(u(),r("div",Y,[n(x)&&!j.value?(u(),i(T,{key:0,componentCfg:e.componentCfg,type:e.type,dateFormat:n(R),radioValue:n(I),onClickQuickBtn:$,onChangeRadioValue:A},null,8,["componentCfg","type","dateFormat","radioValue"])):d("v-if",!0),n(x)?(u(),i(n(f),{key:1,secondary:"",class:o(j.value?"select-date-right":"select-date-left"),onClick:L},{default:v((()=>[c(m(n(V)),1)])),_:1},8,["class"])):d("v-if",!0),d(' default-time="23:59:59" '),!n(x)||j.value?(u(),r("div",D,[s(n(y),{type:e.type,to:"body","default-time":n(H),clearable:e.clearable,valueFormat:e.valueFormat,placeholder:e.startPlaceholder,value:w.value,"is-date-disabled":z,"is-time-disabled":G,"onUpdate:value":t[0]||(t[0]=e=>q(e,"start"))},null,8,["type","default-time","clearable","valueFormat","placeholder","value"]),E,s(n(y),{type:e.type,to:"body","default-time":n(Q),clearable:e.clearable,valueFormat:e.valueFormat,placeholder:e.endPlaceholder,value:P.value,"is-date-disabled":J,"is-time-disabled":K,"onUpdate:value":t[1]||(t[1]=e=>q(e,"end"))},null,8,["type","default-time","clearable","valueFormat","placeholder","value"])])):d("v-if",!0)]))}});export{_ as default};
|
|
1
|
+
import{defineComponent as e,ref as a,computed as t,watch as l,openBlock as u,createElementBlock as r,unref as n,createBlock as i,createCommentVNode as d,normalizeClass as o,withCtx as v,createTextVNode as c,toDisplayString as m,createVNode as s,createElementVNode as p}from"vue";import{NButton as f}from"naive-ui";import y from"../../../../../date-picker/index.js";import g from"moment";import{isString as b}from"lodash-es";import{WidgetOptionEnums as h}from"../../../types/enums.js";import{dateDisabledCollect as k,isStartDateRangeDisabled as C,isTimeStartRangeDisabled as F,isEndDateRangeDisabled as M,isTimeEndRangeDisabled as S}from"../helpers/dateDisabled.js";import T from"./DateQuickBtn/index.vue.js";const Y={class:"render-widget-date-range"},D={key:2,class:"date-detail-range"},E=p("span",{class:"divider"},null,-1);var _=e({__name:"DateRangeInner",props:{componentCfg:{type:Object},type:{type:String,default:"date"},clearable:{type:Boolean,default:!1},valueFormat:{type:String,default:"yyyy-MM-dd"},startPlaceholder:{type:String,default:"起始"},endPlaceholder:{type:String,default:"截止"},value:{type:String,default:""},unit:{type:String,default:""}},emits:["update:value","update:unit"],setup(e,{emit:p}){const _=e,j=a(!1),w=a(),P=a(),I=t((()=>_.unit)),U=t((()=>{var e;return null==(e=_.componentCfg)?void 0:e.widgetCfg.optionSetting})),x=t((()=>U.value!==h.SELECT_TIME)),B=t((()=>U.value===h.PAST_TIME)),O=t((()=>U.value===h.FUTURE_TIME)),R=t((()=>{let e="";switch(_.type){case"date":e="YYYY-MM-DD";break;case"datetime":e="YYYY-MM-DD HH:mm:ss"}return e})),V=t((()=>{let e="";switch(_.type){case"date":e="选择日期";break;case"datetime":e="选择时间"}return e})),H=t((()=>O.value?k.curTime:"00:00:00")),Q=t((()=>B.value?k.curTime:"23:59:59"));function $(e){p("update:value",e)}function A(e){p("update:unit",e)}function L(){x.value&&(j.value=!j.value)}function q(e,a){switch(a){case"start":w.value=e;break;case"end":P.value=e}const t=w.value?g(w.value).format(R.value):null,l=P.value?g(P.value).format(R.value):null;p("update:value",t||l?`${null!=t?t:""} ~ ${null!=l?l:""}`:"")}function z(e){return C(e,U.value,P.value)}function G(e){return F(e,U.value,P.value)}function J(e){return M(e,U.value,w.value)}function K(e){return S(e,U.value,w.value)}return l((()=>_.value),(e=>{if(e&&b(e)&&e.includes("~")){I.value||(j.value=!0);const[a,t]=e.split("~");return a.trim()&&(w.value=g(a.trim()).valueOf()),void(t.trim()&&(P.value=g(t.trim()).valueOf()))}w.value=P.value=null,p("update:unit","")}),{immediate:!0}),x.value||(j.value=!0),(a,t)=>(u(),r("div",Y,[n(x)&&!j.value?(u(),i(T,{key:0,componentCfg:e.componentCfg,type:e.type,dateFormat:n(R),radioValue:n(I),onClickQuickBtn:$,onChangeRadioValue:A},null,8,["componentCfg","type","dateFormat","radioValue"])):d("v-if",!0),n(x)?(u(),i(n(f),{key:1,secondary:"",class:o(j.value?"select-date-right":"select-date-left"),onClick:L},{default:v((()=>[c(m(n(V)),1)])),_:1},8,["class"])):d("v-if",!0),d(' default-time="23:59:59" '),!n(x)||j.value?(u(),r("div",D,[s(n(y),{type:e.type,to:"body","default-time":n(H),clearable:e.clearable,valueFormat:e.valueFormat,placeholder:e.startPlaceholder,value:w.value,"is-date-disabled":z,"is-time-disabled":G,"onUpdate:value":t[0]||(t[0]=e=>q(e,"start"))},null,8,["type","default-time","clearable","valueFormat","placeholder","value"]),E,s(n(y),{type:e.type,to:"body","default-time":n(Q),clearable:e.clearable,valueFormat:e.valueFormat,placeholder:e.endPlaceholder,value:P.value,"is-date-disabled":J,"is-time-disabled":K,"onUpdate:value":t[1]||(t[1]=e=>q(e,"end"))},null,8,["type","default-time","clearable","valueFormat","placeholder","value"])])):d("v-if",!0)]))}});export{_ as default};
|
package/es/components/table-filter/src/components/render-widget/components/SelectDynamic.vue.d.ts
CHANGED
|
@@ -34,11 +34,14 @@ declare const _default: import("vue").DefineComponent<{
|
|
|
34
34
|
menuProps: {
|
|
35
35
|
class: string;
|
|
36
36
|
};
|
|
37
|
-
isMultiple: import("vue").ComputedRef<
|
|
37
|
+
isMultiple: import("vue").ComputedRef<any>;
|
|
38
38
|
dynamicOptionInfos: import("vue").ComputedRef<any>;
|
|
39
39
|
isShowWhole: import("vue").ComputedRef<any>;
|
|
40
40
|
isLastPage: import("vue").ComputedRef<boolean>;
|
|
41
|
-
valueCp: import("vue").ComputedRef<string | number |
|
|
41
|
+
valueCp: import("vue").ComputedRef<string | number | unknown[] | {
|
|
42
|
+
label: any;
|
|
43
|
+
value: any;
|
|
44
|
+
} | null>;
|
|
42
45
|
isForbidRequest: import("vue").ComputedRef<boolean>;
|
|
43
46
|
setOptionActive: (selectIds: string[]) => void;
|
|
44
47
|
handleUpdateSelect: (value: string[] | null) => void;
|
package/es/components/table-filter/src/components/render-widget/components/SelectDynamic.vue2.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{defineComponent as e,useAttrs as a,ref as l,inject as t,computed as n,nextTick as u,openBlock as o,createBlock as i,unref as
|
|
1
|
+
import{defineComponent as e,useAttrs as a,ref as l,inject as t,computed as n,nextTick as u,openBlock as o,createBlock as i,unref as s,mergeProps as r,isRef as c,withCtx as v,createVNode as p,h as f}from"vue";import{useMessage as m,NSelect as d,NTag as y}from"naive-ui";import{useDebounceFn as g}from"@vueuse/core";import h from"../../../hooks/useAsyncData.js";import{judgmentVariable as w}from"../helpers/setDefaultValue.js";import{WholeSelectObj as O}from"../helpers/selectExtraMap.js";import{WidgetValEnums as S}from"../../../types/enums.js";import{InjectionFilterApiConfig as b,InjectionFilterSearchConfig as j}from"../../../constants/index.js";import C from"./SelectDynamicOption/index.vue.js";import{isEqual as N,cloneDeep as A}from"lodash-es";var L=e({__name:"SelectDynamic",props:{value:{type:[Array,String,Number]},componentCfg:{type:Object}},emits:["update:value"],setup(e,{emit:L}){const P=e,k=m(),{getDynamicSelectData:x}=h(),D=a(),J=l(!1),E=t(b),I=t(j),K=l(1),$=l(),T=l([JSON.parse(JSON.stringify(O))]),U=l([]),W=l(),M=l(0),_={class:"select-dynamic-popover"},F=n((()=>D.multiple)),H=n((()=>{const{widgetCfg:e}=P.componentCfg,{dynamicOptionInfo:a={}}=e;return a})),V=n((()=>{const{widgetCfg:e}=P.componentCfg,{showWholeOption:a=!1}=e;return a&&1===K.value})),q=n((()=>M.value>0&&K.value>=M.value)),z=n((()=>{var e;if(Array.isArray(P.value)&&P.value.length>0){const e=P.value;if(G(e),!F.value&&1==e.length){const a=T.value.find((a=>a.value===e[0]));return a?JSON.stringify(a):{label:e[0].includes("&")?e[0].split("&")[0]:e[0],value:e[0]}}const a=T.value.filter((a=>e.includes(a.value))),l=a.map((e=>e.value)),t=e.filter((e=>!l.includes(e))).map((e=>({label:e.includes("&")?e.split("&")[0]:e,value:e})));return[...a,...t]}return G([]),null!=(e=P.value)?e:null})),B=n((()=>{if(Object.keys(H.value).length>0){const{defaultParams:e=[]}=H.value;return w(e)&&!P.value}return!1}));function G(e){T.value.forEach((a=>{a.actived=!1,Array.isArray(e)&&e.includes(a.value)&&(a.actived=!0)}))}function Q(e){const{widgetCfg:a}=P.componentCfg,{linkageFieldKeys:l=[]}=a;N(P.value,e)||(l.forEach((e=>{const a=I.value.find((a=>a.columnName===e));a&&a.value&&(a.value=null)})),L("update:value",e))}async function R(e){K.value=e,await X(W.value,K.value)}async function X(e,a){try{if(Object.keys(H.value).length>0){const{autograph:l,dataSourceId:t,dataSourceType:n,filterKeys:u,defaultParams:o=[],showKeys:i,valueKey:s}=H.value;let r={wordbookId:t,autograph:l,wordbookType:n,fieldKeys:u,page:a};u.length>0&&(r[u[0]]=e),J.value=!0;if(w(o)){const e=o.map((e=>e.value)).filter((e=>e.includes("${")));e.map((e=>e.match(/\$\{(.+?)\}/)[1])).forEach((e=>{const a=I.value.find((a=>a.columnName===e));a&&a.value&&a.value!==S.WHOLE&&(r[e]=a.value)}))}let c=await x(r,E);if(c){const{fieldList:e=[],rows:a=[],total:l=0}=c.map,t=a.map((e=>({...e,label:e[i[0]],value:`${e[i[0]]}&${e[s]}`}))),n=A(t);V.value&&t.unshift(JSON.parse(JSON.stringify(O))),$.value=null!=e?e:[],T.value=null!=t?t:[],U.value=n,M.value=l}}}catch(e){k.error(`异步数据源下拉框数据请求失败:${e}`),console.log(e)}finally{J.value=!1}}const Y=g((async e=>{await async function(e){W.value=e.trim(),K.value=1,await X(W.value,K.value)}(e)}),300);async function Z(){Object.keys(H.value).length>0&&E&&await X("",K.value)}async function ee(){L("update:value",null),await Z()}function ae(e){e&&Z()}function le({option:e,handleClose:a}){if(F.value){const l=e.value;return f(y,{style:{padding:"0 8px"},closable:!0,onClose:e=>{if(e.stopPropagation(),a(),Array.isArray(P.value)&&P.value.length>0){const e=P.value,a=e.indexOf(l.value);if(a>-1){const l=e.splice(0,a);L("update:value",l.length>0?l:null)}}}},{default:()=>f("div",l.label)})}const l=e.value?JSON.parse(e.value):{label:""};return f("div",l.label)}return u((()=>{B.value||Z()})),(e,a)=>(o(),i(s(d),r(s(D),{value:s(z),"onUpdate:value":a[0]||(a[0]=e=>c(z)?z.value=e:null),remote:"",loading:J.value,"render-tag":le,"menu-props":_,onSearch:s(Y),onClear:ee,"onUpdate:show":ae}),{empty:v((()=>[p(C,r(s(D),{dynamicOptionInfo:s(H),fieldTitleList:$.value,optionList:T.value,isMultiple:s(F),curPage:K.value,isLastPage:s(q),isShowWhole:s(V),onUpdateSelect:Q,onUpdatePage:R}),null,16,["dynamicOptionInfo","fieldTitleList","optionList","isMultiple","curPage","isLastPage","isShowWhole"])])),_:1},16,["value","loading","onSearch"]))}});export{L as default};
|
|
@@ -1099,11 +1099,14 @@ declare const SelectDynamic: import("vue").DefineComponent<{
|
|
|
1099
1099
|
menuProps: {
|
|
1100
1100
|
class: string;
|
|
1101
1101
|
};
|
|
1102
|
-
isMultiple: import("vue").ComputedRef<
|
|
1102
|
+
isMultiple: import("vue").ComputedRef<any>;
|
|
1103
1103
|
dynamicOptionInfos: import("vue").ComputedRef<any>;
|
|
1104
1104
|
isShowWhole: import("vue").ComputedRef<any>;
|
|
1105
1105
|
isLastPage: import("vue").ComputedRef<boolean>;
|
|
1106
|
-
valueCp: import("vue").ComputedRef<string | number |
|
|
1106
|
+
valueCp: import("vue").ComputedRef<string | number | unknown[] | {
|
|
1107
|
+
label: any;
|
|
1108
|
+
value: any;
|
|
1109
|
+
} | null>;
|
|
1107
1110
|
isForbidRequest: import("vue").ComputedRef<boolean>;
|
|
1108
1111
|
setOptionActive: (selectIds: string[]) => void;
|
|
1109
1112
|
handleUpdateSelect: (value: string[] | null) => void;
|
|
@@ -107,11 +107,14 @@ export declare const WidgetCfgMaps: Map<string, {
|
|
|
107
107
|
menuProps: {
|
|
108
108
|
class: string;
|
|
109
109
|
};
|
|
110
|
-
isMultiple: import("vue").ComputedRef<
|
|
110
|
+
isMultiple: import("vue").ComputedRef<any>;
|
|
111
111
|
dynamicOptionInfos: import("vue").ComputedRef<any>;
|
|
112
112
|
isShowWhole: import("vue").ComputedRef<any>;
|
|
113
113
|
isLastPage: import("vue").ComputedRef<boolean>;
|
|
114
|
-
valueCp: import("vue").ComputedRef<string | number |
|
|
114
|
+
valueCp: import("vue").ComputedRef<string | number | unknown[] | {
|
|
115
|
+
label: any;
|
|
116
|
+
value: any;
|
|
117
|
+
} | null>;
|
|
115
118
|
isForbidRequest: import("vue").ComputedRef<boolean>;
|
|
116
119
|
setOptionActive: (selectIds: string[]) => void;
|
|
117
120
|
handleUpdateSelect: (value: string[] | null) => void;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{WidgetOptionEnums as e,WidgetTypeEnums as i,WidgetValEnums as t}from"../types/enums.js";import{formatDateRangeInfo as n,presetValToTimestamp as l}from"../components/render-widget/helpers/presetValToTimestamp.js";import{DatePresetValEnums as o}from"../components/render-widget/enums.js";const a={[e.RADIO]:"0",[e.MULTIPLE]:"1",[e.ALL]:"0",[e.SELECT_TIME]:"1",[e.PAST_TIME]:"2",[e.FUTURE_TIME]:"3"};function u(){return{transformData:function(t,n){return t.map((t=>{var l,o,u;const{optionInfo:r={list:[],manualMapping:!0,dynamicOptionInfo:{},showWholeOption:!1},type:E,defaultValue:s,optionType:
|
|
1
|
+
import{WidgetOptionEnums as e,WidgetTypeEnums as i,WidgetValEnums as t}from"../types/enums.js";import{formatDateRangeInfo as n,presetValToTimestamp as l}from"../components/render-widget/helpers/presetValToTimestamp.js";import{DatePresetValEnums as o}from"../components/render-widget/enums.js";const a={[e.RADIO]:"0",[e.MULTIPLE]:"1",[e.ALL]:"0",[e.SELECT_TIME]:"1",[e.PAST_TIME]:"2",[e.FUTURE_TIME]:"3"};function u(){return{transformData:function(t,n){return t.map((t=>{var l,o,u;const{optionInfo:r={list:[],manualMapping:!0,dynamicOptionInfo:{},showWholeOption:!1},type:E,defaultValue:s,optionType:p,filterExplicit:T,rangeFilter:d}=t,c={},m={title:(f=t).title,alias:f.customTitle,isShowSearch:f.isShowSearch?1:0,filterExplicit:f.filterExplicit?1:0,explicitRequired:f.explicitRequired?1:0,advanceOptionSetting:f.optionType?a[f.optionType]:"",placeholder:f.remark,advanceColWidth:f.width};var f;let g,v,y=E;T?(g=E===i.SELECT&&p===e.MULTIPLE?null==s?void 0:s.valueList:null==(l=null==s?void 0:s.valueList)?void 0:l[0],v=null==s?void 0:s.unit,E===i.LABEL&&(y="SELECTLABEL",g=null==s?void 0:s.valueList),E===i.DATE&&(y="DATE_OUT"),E===i.DATE_TIME&&(y="DATETIME_OUT")):E===i.SELECT&&(null==r?void 0:r.list)&&(null==r?void 0:r.list.length)<10&&(y="CHECKBOX_GROUP"),d&&(E===i.INPUT_NUMBER&&(y="INPUTNUMBER_RANGE"),E===i.DATE&&(y=T?"DATE_RANGE_OUT":"DATE_RANGE_INNER"),E===i.DATE_TIME&&(y=T?"DATETIME_RANGE_OUT":"DATETIME_RANGE_INNER")),E===i.SELECT&&!1===(null==r?void 0:r.manualMapping)&&(y=i.SELECTDYNAMIC);const L={isRender:!0,widgetType:y,originType:E,valueList:null==(o=null==r?void 0:r.list)?void 0:o.map((({name:e,value:i})=>({value:i,label:e}))),defaultValue:g,defValueUnit:v,optionSetting:p,multiple:p===e.MULTIPLE||y===i.SELECTLABEL,manualMapping:null==r?void 0:r.manualMapping,showWholeOption:null==r?void 0:r.showWholeOption,dynamicOptionInfo:null==r?void 0:r.dynamicOptionInfo,classifyStr:null==s?void 0:s.classifyStr,linkageFieldKeys:null!=(u=null==s?void 0:s.linkageFieldKeys)?u:[]};return{...m,fieldType:t.dataType,columnName:t.name,settingObj:c,setting:JSON.stringify(c),widgetCfg:L,rangeFilter:d,unit:null!=v?v:"",_extendData:null!=n?n:{}}}))},getCacheDef:function(e,t){const{widgetType:n,widgetCfg:l}=e;return[i.SELECT,i.CHECKBOX_GROUP,i.SELECTDYNAMIC].includes(n)&&l.multiple?t:t[0]},transformClassifyChild:function(e,t){const a={};return e&&e.length>0&&e.forEach((e=>{const u=e.field_key;a[u]="";const r=t.find((e=>e.name===u));if(r){const t=Array.isArray(e.value)&&r.type===i.SELECT?e.value:e.value.toString();if(a[u]=t,e.unit&&e.unit!==o.CUSTOM){let t="";r.type===i.DATE&&(t=r.rangeFilter?n(e.unit,"YYYY-MM-DD",r.optionType):l(e.unit,"YYYY-MM-DD")),r.type===i.DATE_TIME&&(t=r.rangeFilter?n(e.unit,"YYYY-MM-DD HH:mm:ss",r.optionType):l(e.unit,"YYYY-MM-DD HH:mm:ss")),a[u]=t}}})),a},transformParams:function(e){const n={},l=[i.SELECT,i.SELECTDYNAMIC];return e&&e.length>0&&e.forEach((e=>{const i=e.field_key,o=l.includes(e.widgetType)||e.value&&e.value.length>1?e.value.map((e=>e.includes("&")?e.split("&")[1]:e)):e.value.toString();Array.isArray(o)&&o.length>0&&o.includes(t.WHOLE)||(n[i]=o)})),n}}}export{u as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
var e="@cnhis-design-vue/shared",i="3.1.47-beta.
|
|
1
|
+
var e="@cnhis-design-vue/shared",i="3.1.47-beta.14",s="index.ts",n={"naive-ui":"^2.30.0",vue:"^3.2.0"},a={"@vicons/ionicons5":"^0.12.0","lodash-es":"^4.17.21",moment:"^2.29.1","video.js":"^7.19.2","videojs-contrib-hls":"^5.15.0",viewerjs:"^1.10.5","xe-utils":"^3.5.4"},d={name:e,version:"3.1.47-beta.14",private:!0,main:"index.ts",peerDependencies:n,dependencies:a};export{d as default,a as dependencies,s as main,e as name,n as peerDependencies,i as version};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cnhis-design-vue",
|
|
3
|
-
"version": "3.1.47-beta.
|
|
3
|
+
"version": "3.1.47-beta.14",
|
|
4
4
|
"license": "ISC",
|
|
5
5
|
"module": "./es/components/index.js",
|
|
6
6
|
"main": "./es/components/index.js",
|
|
@@ -63,5 +63,5 @@
|
|
|
63
63
|
"iOS 7",
|
|
64
64
|
"last 3 iOS versions"
|
|
65
65
|
],
|
|
66
|
-
"gitHead": "
|
|
66
|
+
"gitHead": "3b6235ca49ecc27bafde5786a2b101aa52b62563"
|
|
67
67
|
}
|