@bscjc/webui 1.4.0 → 1.4.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/JcColumnConfig/index.d.ts +15 -0
- package/dist/components/JcColumnConfig/index.vue.d.ts +9 -0
- package/dist/components/JcColumnConfig/types.d.ts +2 -0
- package/dist/components/JcColumnConfig/useColumnConfig.d.ts +2 -0
- package/dist/es/index.mjs +1462 -1427
- package/dist/index.css +2 -2
- package/dist/lib/index.cjs +8 -8
- package/dist/types/components/JcColumnConfig/index.d.ts +15 -0
- package/dist/types/components/JcColumnConfig/index.vue.d.ts +9 -0
- package/dist/types/components/JcColumnConfig/types.d.ts +2 -0
- package/dist/types/components/JcColumnConfig/useColumnConfig.d.ts +2 -0
- package/package.json +2 -2
package/dist/lib/index.cjs
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),
|
|
2
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Ft(t){var n;return typeof t=="function"?n={callback:t}:n=t,n}function It(t,n){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,s,o,a=function(u){for(var d=arguments.length,c=new Array(d>1?d-1:0),h=1;h<d;h++)c[h-1]=arguments[h];if(o=c,!(i&&u===s)){var f=l.leading;typeof f=="function"&&(f=f(u,s)),(!i||u!==s)&&f&&t.apply(void 0,[u].concat(De(o))),s=u,clearTimeout(i),i=setTimeout(function(){t.apply(void 0,[u].concat(De(o))),i=0},n)}};return a._clear=function(){clearTimeout(i),i=null},a}function Qe(t,n){if(t===n)return!0;if(me(t)==="object"){for(var l in t)if(!Qe(t[l],n[l]))return!1;return!0}return!1}var zt=function(){function t(n,l,i){Et(this,t),this.el=n,this.observer=null,this.frozen=!1,this.createObserver(l,i)}return _t(t,[{key:"createObserver",value:function(l,i){var s=this;if(this.observer&&this.destroyObserver(),!this.frozen){if(this.options=Ft(l),this.callback=function(r,u){s.options.callback(r,u),r&&s.options.once&&(s.frozen=!0,s.destroyObserver())},this.callback&&this.options.throttle){var o=this.options.throttleOptions||{},a=o.leading;this.callback=It(this.callback,this.options.throttle,{leading:function(u){return a==="both"||a==="visible"&&u||a==="hidden"&&!u}})}this.oldResult=void 0,this.observer=new IntersectionObserver(function(r){var u=r[0];if(r.length>1){var d=r.find(function(h){return h.isIntersecting});d&&(u=d)}if(s.callback){var c=u.isIntersecting&&u.intersectionRatio>=s.threshold;if(c===s.oldResult)return;s.oldResult=c,s.callback(c,u)}},this.options.intersection),e.nextTick(function(){s.observer&&s.observer.observe(s.el)})}}},{key:"destroyObserver",value:function(){this.observer&&(this.observer.disconnect(),this.observer=null),this.callback&&this.callback._clear&&(this.callback._clear(),this.callback=null)}},{key:"threshold",get:function(){return this.options.intersection&&typeof this.options.intersection.threshold=="number"?this.options.intersection.threshold:0}}]),t}();function Ke(t,n,l){var i=n.value;if(i)if(typeof IntersectionObserver>"u")console.warn("[vue-observe-visibility] IntersectionObserver API is not available in your browser. Please install this polyfill: https://github.com/w3c/IntersectionObserver/tree/master/polyfill");else{var s=new zt(t,i,l);t._vue_visibilityState=s}}function $t(t,n,l){var i=n.value,s=n.oldValue;if(!Qe(i,s)){var o=t._vue_visibilityState;if(!i){Je(t);return}o?o.createObserver(i,l):Ke(t,{value:i},l)}}function Je(t){var n=t._vue_visibilityState;n&&(n.destroyObserver(),delete t._vue_visibilityState)}var Mt={beforeMount:Ke,updated:$t,unmounted:Je},Tt={itemsLimit:1e3},Dt=/(auto|scroll)/;function He(t,n){return t.parentNode===null?n:He(t.parentNode,n.concat([t]))}var Ce=function(n,l){return getComputedStyle(n,null).getPropertyValue(l)},Lt=function(n){return Ce(n,"overflow")+Ce(n,"overflow-y")+Ce(n,"overflow-x")},Ot=function(n){return Dt.test(Lt(n))};function Le(t){if(t instanceof HTMLElement||t instanceof SVGElement){for(var n=He(t.parentNode,[]),l=0;l<n.length;l+=1)if(Ot(n[l]))return n[l];return document.scrollingElement||document.documentElement}}function ke(t){"@babel/helpers - typeof";return ke=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},ke(t)}var Rt={items:{type:Array,required:!0},keyField:{type:String,default:"id"},direction:{type:String,default:"vertical",validator:function(n){return["vertical","horizontal"].includes(n)}},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"}};function jt(){return this.items.length&&ke(this.items[0])!=="object"}var Ee=!1;if(typeof window<"u"){Ee=!1;try{var Pt=Object.defineProperty({},"passive",{get:function(){Ee=!0}});window.addEventListener("test",null,Pt)}catch{}}let qt=0;var ze={name:"RecycleScroller",components:{ResizeObserver:ye},directives:{ObserveVisibility:Mt},props:{...Rt,itemSize:{type:Number,default:null},gridItems:{type:Number,default:void 0},itemSecondarySize:{type:Number,default:void 0},minItemSize:{type:[Number,String],default:null},sizeField:{type:String,default:"size"},typeField:{type:String,default:"type"},buffer:{type:Number,default:200},pageMode:{type:Boolean,default:!1},prerender:{type:Number,default:0},emitUpdate:{type:Boolean,default:!1},updateInterval:{type:Number,default:0},skipHover:{type:Boolean,default:!1},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"},listClass:{type:[String,Object,Array],default:""},itemClass:{type:[String,Object,Array],default:""}},emits:["resize","visible","hidden","update","scroll-start","scroll-end"],data(){return{pool:[],totalSize:0,ready:!1,hoverKey:null}},computed:{sizes(){if(this.itemSize===null){const t={"-1":{accumulator:0}},n=this.items,l=this.sizeField,i=this.minItemSize;let s=1e4,o=0,a;for(let r=0,u=n.length;r<u;r++)a=n[r][l]||i,a<s&&(s=a),o+=a,t[r]={accumulator:o,size:a};return this.$_computedMinItemSize=s,t}return[]},simpleArray:jt,itemIndexByKey(){const{keyField:t,items:n}=this,l={};for(let i=0,s=n.length;i<s;i++)l[n[i][t]]=i;return l}},watch:{items(){this.updateVisibleItems(!0)},pageMode(){this.applyPageMode(),this.updateVisibleItems(!1)},sizes:{handler(){this.updateVisibleItems(!1)},deep:!0},gridItems(){this.updateVisibleItems(!0)},itemSecondarySize(){this.updateVisibleItems(!0)}},created(){this.$_startIndex=0,this.$_endIndex=0,this.$_views=new Map,this.$_unusedViews=new Map,this.$_scrollDirty=!1,this.$_lastUpdateScrollPosition=0,this.prerender&&(this.$_prerender=!0,this.updateVisibleItems(!1)),this.gridItems&&!this.itemSize&&console.error("[vue-recycle-scroller] You must provide an itemSize when using gridItems")},mounted(){this.applyPageMode(),this.$nextTick(()=>{this.$_prerender=!1,this.updateVisibleItems(!0),this.ready=!0})},activated(){const t=this.$_lastUpdateScrollPosition;typeof t=="number"&&this.$nextTick(()=>{this.scrollToPosition(t)})},beforeUnmount(){this.removeListeners()},methods:{addView(t,n,l,i,s){const o=e.markRaw({id:qt++,index:n,used:!0,key:i,type:s}),a=e.shallowReactive({item:l,position:0,nr:o});return t.push(a),a},unuseView(t,n=!1){const l=this.$_unusedViews,i=t.nr.type;let s=l.get(i);s||(s=[],l.set(i,s)),s.push(t),n||(t.nr.used=!1,t.position=-9999)},handleResize(){this.$emit("resize"),this.ready&&this.updateVisibleItems(!1)},handleScroll(t){if(!this.$_scrollDirty){if(this.$_scrollDirty=!0,this.$_updateTimeout)return;const n=()=>requestAnimationFrame(()=>{this.$_scrollDirty=!1;const{continuous:l}=this.updateVisibleItems(!1,!0);l||(clearTimeout(this.$_refreshTimout),this.$_refreshTimout=setTimeout(this.handleScroll,this.updateInterval+100))});n(),this.updateInterval&&(this.$_updateTimeout=setTimeout(()=>{this.$_updateTimeout=0,this.$_scrollDirty&&n()},this.updateInterval))}},handleVisibilityChange(t,n){this.ready&&(t||n.boundingClientRect.width!==0||n.boundingClientRect.height!==0?(this.$emit("visible"),requestAnimationFrame(()=>{this.updateVisibleItems(!1)})):this.$emit("hidden"))},updateVisibleItems(t,n=!1){const l=this.itemSize,i=this.gridItems||1,s=this.itemSecondarySize||l,o=this.$_computedMinItemSize,a=this.typeField,r=this.simpleArray?null:this.keyField,u=this.items,d=u.length,c=this.sizes,h=this.$_views,f=this.$_unusedViews,y=this.pool,B=this.itemIndexByKey;let k,w,m,p,b;if(!d)k=w=p=b=m=0;else if(this.$_prerender)k=p=0,w=b=Math.min(this.prerender,u.length),m=null;else{const V=this.getScroll();if(n){let q=V.start-this.$_lastUpdateScrollPosition;if(q<0&&(q=-q),l===null&&q<o||q<l)return{continuous:!0}}this.$_lastUpdateScrollPosition=V.start;const L=this.buffer;V.start-=L,V.end+=L;let T=0;if(this.$refs.before&&(T=this.$refs.before.scrollHeight,V.start-=T),this.$refs.after){const q=this.$refs.after.scrollHeight;V.end+=q}if(l===null){let q,z=0,C=d-1,S=~~(d/2),N;do N=S,q=c[S].accumulator,q<V.start?z=S:S<d-1&&c[S+1].accumulator>V.start&&(C=S),S=~~((z+C)/2);while(S!==N);for(S<0&&(S=0),k=S,m=c[d-1].accumulator,w=S;w<d&&c[w].accumulator<V.end;w++);for(w===-1?w=u.length-1:(w++,w>d&&(w=d)),p=k;p<d&&T+c[p].accumulator<V.start;p++);for(b=p;b<d&&T+c[b].accumulator<V.end;b++);}else{k=~~(V.start/l*i);const q=k%i;k-=q,w=Math.ceil(V.end/l*i),p=Math.max(0,Math.floor((V.start-T)/l*i)),b=Math.floor((V.end-T)/l*i),k<0&&(k=0),w>d&&(w=d),p<0&&(p=0),b>d&&(b=d),m=Math.ceil(d/i)*l}}w-k>Tt.itemsLimit&&this.itemsLimitError(),this.totalSize=m;let x;const _=k<=this.$_endIndex&&w>=this.$_startIndex;if(_)for(let V=0,L=y.length;V<L;V++)x=y[V],x.nr.used&&(t&&(x.nr.index=B[x.item[r]]),(x.nr.index==null||x.nr.index<k||x.nr.index>=w)&&this.unuseView(x));const E=_?null:new Map;let g,I,D;for(let V=k;V<w;V++){g=u[V];const L=r?g[r]:g;if(L==null)throw new Error(`Key is ${L} on item (keyField is '${r}')`);if(x=h.get(L),!l&&!c[V].size){x&&this.unuseView(x);continue}I=g[a];let T=f.get(I),q=!1;if(!x)_?T&&T.length?x=T.pop():x=this.addView(y,V,g,L,I):(D=E.get(I)||0,(!T||D>=T.length)&&(x=this.addView(y,V,g,L,I),this.unuseView(x,!0),T=f.get(I)),x=T[D],E.set(I,D+1)),h.delete(x.nr.key),x.nr.used=!0,x.nr.index=V,x.nr.key=L,x.nr.type=I,h.set(L,x),q=!0;else if(!x.nr.used&&(x.nr.used=!0,q=!0,T)){const z=T.indexOf(x);z!==-1&&T.splice(z,1)}x.item=g,q&&(V===u.length-1&&this.$emit("scroll-end"),V===0&&this.$emit("scroll-start")),l===null?(x.position=c[V-1].accumulator,x.offset=0):(x.position=Math.floor(V/i)*l,x.offset=V%i*s)}return this.$_startIndex=k,this.$_endIndex=w,this.emitUpdate&&this.$emit("update",k,w,p,b),clearTimeout(this.$_sortTimer),this.$_sortTimer=setTimeout(this.sortViews,this.updateInterval+300),{continuous:_}},getListenerTarget(){let t=Le(this.$el);return window.document&&(t===window.document.documentElement||t===window.document.body)&&(t=window),t},getScroll(){const{$el:t,direction:n}=this,l=n==="vertical";let i;if(this.pageMode){const s=t.getBoundingClientRect(),o=l?s.height:s.width;let a=-(l?s.top:s.left),r=l?window.innerHeight:window.innerWidth;a<0&&(r+=a,a=0),a+r>o&&(r=o-a),i={start:a,end:a+r}}else l?i={start:t.scrollTop,end:t.scrollTop+t.clientHeight}:i={start:t.scrollLeft,end:t.scrollLeft+t.clientWidth};return i},applyPageMode(){this.pageMode?this.addListeners():this.removeListeners()},addListeners(){this.listenerTarget=this.getListenerTarget(),this.listenerTarget.addEventListener("scroll",this.handleScroll,Ee?{passive:!0}:!1),this.listenerTarget.addEventListener("resize",this.handleResize)},removeListeners(){this.listenerTarget&&(this.listenerTarget.removeEventListener("scroll",this.handleScroll),this.listenerTarget.removeEventListener("resize",this.handleResize),this.listenerTarget=null)},scrollToItem(t){let n;const l=this.gridItems||1;this.itemSize===null?n=t>0?this.sizes[t-1].accumulator:0:n=Math.floor(t/l)*this.itemSize,this.scrollToPosition(n)},scrollToPosition(t){const n=this.direction==="vertical"?{scroll:"scrollTop",start:"top"}:{scroll:"scrollLeft",start:"left"};let l,i,s;if(this.pageMode){const o=Le(this.$el),a=o.tagName==="HTML"?0:o[n.scroll],r=o.getBoundingClientRect(),d=this.$el.getBoundingClientRect()[n.start]-r[n.start];l=o,i=n.scroll,s=t+a+d}else l=this.$el,i=n.scroll,s=t;l[i]=s},itemsLimitError(){throw setTimeout(()=>{console.log("It seems the scroller element isn't scrolling, so it tries to render all the items at once.","Scroller:",this.$el),console.log("Make sure the scroller has a fixed height (or width) and 'overflow-y' (or 'overflow-x') set to 'auto' so it can scroll correctly and only render the items visible in the scroll viewport.")}),new Error("Rendered items limit reached")},sortViews(){this.pool.sort((t,n)=>t.nr.index-n.nr.index)}}};const Ut={key:0,ref:"before",class:"vue-recycle-scroller__slot"},Qt={key:1,ref:"after",class:"vue-recycle-scroller__slot"};function Kt(t,n,l,i,s,o){const a=e.resolveComponent("ResizeObserver"),r=e.resolveDirective("observe-visibility");return e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["vue-recycle-scroller",{ready:s.ready,"page-mode":l.pageMode,[`direction-${t.direction}`]:!0}]),onScrollPassive:n[0]||(n[0]=(...u)=>o.handleScroll&&o.handleScroll(...u))},[t.$slots.before?(e.openBlock(),e.createElementBlock("div",Ut,[e.renderSlot(t.$slots,"before")],512)):e.createCommentVNode("v-if",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.listTag),{ref:"wrapper",style:e.normalizeStyle({[t.direction==="vertical"?"minHeight":"minWidth"]:s.totalSize+"px"}),class:e.normalizeClass(["vue-recycle-scroller__item-wrapper",l.listClass])},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.pool,u=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.itemTag),e.mergeProps({key:u.nr.id,style:s.ready?{transform:`translate${t.direction==="vertical"?"Y":"X"}(${u.position}px) translate${t.direction==="vertical"?"X":"Y"}(${u.offset}px)`,width:l.gridItems?`${t.direction==="vertical"&&l.itemSecondarySize||l.itemSize}px`:void 0,height:l.gridItems?`${t.direction==="horizontal"&&l.itemSecondarySize||l.itemSize}px`:void 0}:null,class:["vue-recycle-scroller__item-view",[l.itemClass,{hover:!l.skipHover&&s.hoverKey===u.nr.key}]]},e.toHandlers(l.skipHover?{}:{mouseenter:()=>{s.hoverKey=u.nr.key},mouseleave:()=>{s.hoverKey=null}})),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default",{item:u.item,index:u.nr.index,active:u.nr.used})]),_:2},1040,["style","class"]))),128)),e.renderSlot(t.$slots,"empty")]),_:3},8,["style","class"])),t.$slots.after?(e.openBlock(),e.createElementBlock("div",Qt,[e.renderSlot(t.$slots,"after")],512)):e.createCommentVNode("v-if",!0),e.createVNode(a,{onNotify:o.handleResize},null,8,["onNotify"])],34)),[[r,o.handleVisibilityChange]])}ze.render=Kt;ze.__file="src/components/RecycleScroller.vue";function ie(t){return Array.isArray?Array.isArray(t):Ye(t)==="[object Array]"}function Jt(t){if(typeof t=="string")return t;let n=t+"";return n=="0"&&1/t==-1/0?"-0":n}function Ht(t){return t==null?"":Jt(t)}function le(t){return typeof t=="string"}function We(t){return typeof t=="number"}function Wt(t){return t===!0||t===!1||Gt(t)&&Ye(t)=="[object Boolean]"}function Ge(t){return typeof t=="object"}function Gt(t){return Ge(t)&&t!==null}function Z(t){return t!=null}function be(t){return!t.trim().length}function Ye(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const Yt="Incorrect 'index' type",Xt=t=>`Invalid value for key ${t}`,Zt=t=>`Pattern length exceeds max of ${t}.`,en=t=>`Missing ${t} property in key`,tn=t=>`Property 'weight' in key '${t}' must be a positive integer`,Oe=Object.prototype.hasOwnProperty;class nn{constructor(n){this._keys=[],this._keyMap={};let l=0;n.forEach(i=>{let s=Xe(i);this._keys.push(s),this._keyMap[s.id]=s,l+=s.weight}),this._keys.forEach(i=>{i.weight/=l})}get(n){return this._keyMap[n]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function Xe(t){let n=null,l=null,i=null,s=1,o=null;if(le(t)||ie(t))i=t,n=Re(t),l=Se(t);else{if(!Oe.call(t,"name"))throw new Error(en("name"));const a=t.name;if(i=a,Oe.call(t,"weight")&&(s=t.weight,s<=0))throw new Error(tn(a));n=Re(a),l=Se(a),o=t.getFn}return{path:n,id:l,weight:s,src:i,getFn:o}}function Re(t){return ie(t)?t:t.split(".")}function Se(t){return ie(t)?t.join("."):t}function ln(t,n){let l=[],i=!1;const s=(o,a,r)=>{if(Z(o))if(!a[r])l.push(o);else{let u=a[r];const d=o[u];if(!Z(d))return;if(r===a.length-1&&(le(d)||We(d)||Wt(d)))l.push(Ht(d));else if(ie(d)){i=!0;for(let c=0,h=d.length;c<h;c+=1)s(d[c],a,r+1)}else a.length&&s(d,a,r+1)}};return s(t,le(n)?n.split("."):n,0),i?l:l[0]}const sn={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},on={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(t,n)=>t.score===n.score?t.idx<n.idx?-1:1:t.score<n.score?-1:1},rn={location:0,threshold:.6,distance:100},an={useExtendedSearch:!1,getFn:ln,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var $={...on,...sn,...rn,...an};const un=/[^ ]+/g;function cn(t=1,n=3){const l=new Map,i=Math.pow(10,n);return{get(s){const o=s.match(un).length;if(l.has(o))return l.get(o);const a=1/Math.pow(o,.5*t),r=parseFloat(Math.round(a*i)/i);return l.set(o,r),r},clear(){l.clear()}}}class $e{constructor({getFn:n=$.getFn,fieldNormWeight:l=$.fieldNormWeight}={}){this.norm=cn(l,3),this.getFn=n,this.isCreated=!1,this.setIndexRecords()}setSources(n=[]){this.docs=n}setIndexRecords(n=[]){this.records=n}setKeys(n=[]){this.keys=n,this._keysMap={},n.forEach((l,i)=>{this._keysMap[l.id]=i})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,le(this.docs[0])?this.docs.forEach((n,l)=>{this._addString(n,l)}):this.docs.forEach((n,l)=>{this._addObject(n,l)}),this.norm.clear())}add(n){const l=this.size();le(n)?this._addString(n,l):this._addObject(n,l)}removeAt(n){this.records.splice(n,1);for(let l=n,i=this.size();l<i;l+=1)this.records[l].i-=1}getValueForItemAtKeyId(n,l){return n[this._keysMap[l]]}size(){return this.records.length}_addString(n,l){if(!Z(n)||be(n))return;let i={v:n,i:l,n:this.norm.get(n)};this.records.push(i)}_addObject(n,l){let i={i:l,$:{}};this.keys.forEach((s,o)=>{let a=s.getFn?s.getFn(n):this.getFn(n,s.path);if(Z(a)){if(ie(a)){let r=[];const u=[{nestedArrIndex:-1,value:a}];for(;u.length;){const{nestedArrIndex:d,value:c}=u.pop();if(Z(c))if(le(c)&&!be(c)){let h={v:c,i:d,n:this.norm.get(c)};r.push(h)}else ie(c)&&c.forEach((h,f)=>{u.push({nestedArrIndex:f,value:h})})}i.$[o]=r}else if(le(a)&&!be(a)){let r={v:a,n:this.norm.get(a)};i.$[o]=r}}}),this.records.push(i)}toJSON(){return{keys:this.keys,records:this.records}}}function Ze(t,n,{getFn:l=$.getFn,fieldNormWeight:i=$.fieldNormWeight}={}){const s=new $e({getFn:l,fieldNormWeight:i});return s.setKeys(t.map(Xe)),s.setSources(n),s.create(),s}function dn(t,{getFn:n=$.getFn,fieldNormWeight:l=$.fieldNormWeight}={}){const{keys:i,records:s}=t,o=new $e({getFn:n,fieldNormWeight:l});return o.setKeys(i),o.setIndexRecords(s),o}function fe(t,{errors:n=0,currentLocation:l=0,expectedLocation:i=0,distance:s=$.distance,ignoreLocation:o=$.ignoreLocation}={}){const a=n/t.length;if(o)return a;const r=Math.abs(i-l);return s?a+r/s:r?1:a}function fn(t=[],n=$.minMatchCharLength){let l=[],i=-1,s=-1,o=0;for(let a=t.length;o<a;o+=1){let r=t[o];r&&i===-1?i=o:!r&&i!==-1&&(s=o-1,s-i+1>=n&&l.push([i,s]),i=-1)}return t[o-1]&&o-i>=n&&l.push([i,o-1]),l}const ce=32;function hn(t,n,l,{location:i=$.location,distance:s=$.distance,threshold:o=$.threshold,findAllMatches:a=$.findAllMatches,minMatchCharLength:r=$.minMatchCharLength,includeMatches:u=$.includeMatches,ignoreLocation:d=$.ignoreLocation}={}){if(n.length>ce)throw new Error(Zt(ce));const c=n.length,h=t.length,f=Math.max(0,Math.min(i,h));let y=o,B=f;const k=r>1||u,w=k?Array(h):[];let m;for(;(m=t.indexOf(n,B))>-1;){let g=fe(n,{currentLocation:m,expectedLocation:f,distance:s,ignoreLocation:d});if(y=Math.min(g,y),B=m+c,k){let I=0;for(;I<c;)w[m+I]=1,I+=1}}B=-1;let p=[],b=1,x=c+h;const _=1<<c-1;for(let g=0;g<c;g+=1){let I=0,D=x;for(;I<D;)fe(n,{errors:g,currentLocation:f+D,expectedLocation:f,distance:s,ignoreLocation:d})<=y?I=D:x=D,D=Math.floor((x-I)/2+I);x=D;let V=Math.max(1,f-D+1),L=a?h:Math.min(f+D,h)+c,T=Array(L+2);T[L+1]=(1<<g)-1;for(let z=L;z>=V;z-=1){let C=z-1,S=l[t.charAt(C)];if(k&&(w[C]=+!!S),T[z]=(T[z+1]<<1|1)&S,g&&(T[z]|=(p[z+1]|p[z])<<1|1|p[z+1]),T[z]&_&&(b=fe(n,{errors:g,currentLocation:C,expectedLocation:f,distance:s,ignoreLocation:d}),b<=y)){if(y=b,B=C,B<=f)break;V=Math.max(1,2*f-B)}}if(fe(n,{errors:g+1,currentLocation:f,expectedLocation:f,distance:s,ignoreLocation:d})>y)break;p=T}const E={isMatch:B>=0,score:Math.max(.001,b)};if(k){const g=fn(w,r);g.length?u&&(E.indices=g):E.isMatch=!1}return E}function mn(t){let n={};for(let l=0,i=t.length;l<i;l+=1){const s=t.charAt(l);n[s]=(n[s]||0)|1<<i-l-1}return n}const pe=String.prototype.normalize?t=>t.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,""):t=>t;class et{constructor(n,{location:l=$.location,threshold:i=$.threshold,distance:s=$.distance,includeMatches:o=$.includeMatches,findAllMatches:a=$.findAllMatches,minMatchCharLength:r=$.minMatchCharLength,isCaseSensitive:u=$.isCaseSensitive,ignoreDiacritics:d=$.ignoreDiacritics,ignoreLocation:c=$.ignoreLocation}={}){if(this.options={location:l,threshold:i,distance:s,includeMatches:o,findAllMatches:a,minMatchCharLength:r,isCaseSensitive:u,ignoreDiacritics:d,ignoreLocation:c},n=u?n:n.toLowerCase(),n=d?pe(n):n,this.pattern=n,this.chunks=[],!this.pattern.length)return;const h=(y,B)=>{this.chunks.push({pattern:y,alphabet:mn(y),startIndex:B})},f=this.pattern.length;if(f>ce){let y=0;const B=f%ce,k=f-B;for(;y<k;)h(this.pattern.substr(y,ce),y),y+=ce;if(B){const w=f-ce;h(this.pattern.substr(w),w)}}else h(this.pattern,0)}searchIn(n){const{isCaseSensitive:l,ignoreDiacritics:i,includeMatches:s}=this.options;if(n=l?n:n.toLowerCase(),n=i?pe(n):n,this.pattern===n){let k={isMatch:!0,score:0};return s&&(k.indices=[[0,n.length-1]]),k}const{location:o,distance:a,threshold:r,findAllMatches:u,minMatchCharLength:d,ignoreLocation:c}=this.options;let h=[],f=0,y=!1;this.chunks.forEach(({pattern:k,alphabet:w,startIndex:m})=>{const{isMatch:p,score:b,indices:x}=hn(n,k,w,{location:o+m,distance:a,threshold:r,findAllMatches:u,minMatchCharLength:d,includeMatches:s,ignoreLocation:c});p&&(y=!0),f+=b,p&&x&&(h=[...h,...x])});let B={isMatch:y,score:y?f/this.chunks.length:1};return y&&s&&(B.indices=h),B}}class ae{constructor(n){this.pattern=n}static isMultiMatch(n){return je(n,this.multiRegex)}static isSingleMatch(n){return je(n,this.singleRegex)}search(){}}function je(t,n){const l=t.match(n);return l?l[1]:null}class pn extends ae{constructor(n){super(n)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(n){const l=n===this.pattern;return{isMatch:l,score:l?0:1,indices:[0,this.pattern.length-1]}}}class vn extends ae{constructor(n){super(n)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(n){const i=n.indexOf(this.pattern)===-1;return{isMatch:i,score:i?0:1,indices:[0,n.length-1]}}}class gn extends ae{constructor(n){super(n)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(n){const l=n.startsWith(this.pattern);return{isMatch:l,score:l?0:1,indices:[0,this.pattern.length-1]}}}class yn extends ae{constructor(n){super(n)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(n){const l=!n.startsWith(this.pattern);return{isMatch:l,score:l?0:1,indices:[0,n.length-1]}}}class Cn extends ae{constructor(n){super(n)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(n){const l=n.endsWith(this.pattern);return{isMatch:l,score:l?0:1,indices:[n.length-this.pattern.length,n.length-1]}}}class bn extends ae{constructor(n){super(n)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(n){const l=!n.endsWith(this.pattern);return{isMatch:l,score:l?0:1,indices:[0,n.length-1]}}}class tt extends ae{constructor(n,{location:l=$.location,threshold:i=$.threshold,distance:s=$.distance,includeMatches:o=$.includeMatches,findAllMatches:a=$.findAllMatches,minMatchCharLength:r=$.minMatchCharLength,isCaseSensitive:u=$.isCaseSensitive,ignoreDiacritics:d=$.ignoreDiacritics,ignoreLocation:c=$.ignoreLocation}={}){super(n),this._bitapSearch=new et(n,{location:l,threshold:i,distance:s,includeMatches:o,findAllMatches:a,minMatchCharLength:r,isCaseSensitive:u,ignoreDiacritics:d,ignoreLocation:c})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(n){return this._bitapSearch.searchIn(n)}}class nt extends ae{constructor(n){super(n)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(n){let l=0,i;const s=[],o=this.pattern.length;for(;(i=n.indexOf(this.pattern,l))>-1;)l=i+o,s.push([i,l-1]);const a=!!s.length;return{isMatch:a,score:a?0:1,indices:s}}}const _e=[pn,nt,gn,yn,bn,Cn,vn,tt],Pe=_e.length,xn=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,wn="|";function kn(t,n={}){return t.split(wn).map(l=>{let i=l.trim().split(xn).filter(o=>o&&!!o.trim()),s=[];for(let o=0,a=i.length;o<a;o+=1){const r=i[o];let u=!1,d=-1;for(;!u&&++d<Pe;){const c=_e[d];let h=c.isMultiMatch(r);h&&(s.push(new c(h,n)),u=!0)}if(!u)for(d=-1;++d<Pe;){const c=_e[d];let h=c.isSingleMatch(r);if(h){s.push(new c(h,n));break}}}return s})}const En=new Set([tt.type,nt.type]);class Sn{constructor(n,{isCaseSensitive:l=$.isCaseSensitive,ignoreDiacritics:i=$.ignoreDiacritics,includeMatches:s=$.includeMatches,minMatchCharLength:o=$.minMatchCharLength,ignoreLocation:a=$.ignoreLocation,findAllMatches:r=$.findAllMatches,location:u=$.location,threshold:d=$.threshold,distance:c=$.distance}={}){this.query=null,this.options={isCaseSensitive:l,ignoreDiacritics:i,includeMatches:s,minMatchCharLength:o,findAllMatches:r,ignoreLocation:a,location:u,threshold:d,distance:c},n=l?n:n.toLowerCase(),n=i?pe(n):n,this.pattern=n,this.query=kn(this.pattern,this.options)}static condition(n,l){return l.useExtendedSearch}searchIn(n){const l=this.query;if(!l)return{isMatch:!1,score:1};const{includeMatches:i,isCaseSensitive:s,ignoreDiacritics:o}=this.options;n=s?n:n.toLowerCase(),n=o?pe(n):n;let a=0,r=[],u=0;for(let d=0,c=l.length;d<c;d+=1){const h=l[d];r.length=0,a=0;for(let f=0,y=h.length;f<y;f+=1){const B=h[f],{isMatch:k,indices:w,score:m}=B.search(n);if(k){if(a+=1,u+=m,i){const p=B.constructor.type;En.has(p)?r=[...r,...w]:r.push(w)}}else{u=0,a=0,r.length=0;break}}if(a){let f={isMatch:!0,score:u/a};return i&&(f.indices=r),f}}return{isMatch:!1,score:1}}}const Ve=[];function _n(...t){Ve.push(...t)}function Ne(t,n){for(let l=0,i=Ve.length;l<i;l+=1){let s=Ve[l];if(s.condition(t,n))return new s(t,n)}return new et(t,n)}const ve={AND:"$and",OR:"$or"},Ae={PATH:"$path",PATTERN:"$val"},Be=t=>!!(t[ve.AND]||t[ve.OR]),Vn=t=>!!t[Ae.PATH],Nn=t=>!ie(t)&&Ge(t)&&!Be(t),qe=t=>({[ve.AND]:Object.keys(t).map(n=>({[n]:t[n]}))});function lt(t,n,{auto:l=!0}={}){const i=s=>{let o=Object.keys(s);const a=Vn(s);if(!a&&o.length>1&&!Be(s))return i(qe(s));if(Nn(s)){const u=a?s[Ae.PATH]:o[0],d=a?s[Ae.PATTERN]:s[u];if(!le(d))throw new Error(Xt(u));const c={keyId:Se(u),pattern:d};return l&&(c.searcher=Ne(d,n)),c}let r={children:[],operator:o[0]};return o.forEach(u=>{const d=s[u];ie(d)&&d.forEach(c=>{r.children.push(i(c))})}),r};return Be(t)||(t=qe(t)),i(t)}function An(t,{ignoreFieldNorm:n=$.ignoreFieldNorm}){t.forEach(l=>{let i=1;l.matches.forEach(({key:s,norm:o,score:a})=>{const r=s?s.weight:null;i*=Math.pow(a===0&&r?Number.EPSILON:a,(r||1)*(n?1:o))}),l.score=i})}function Bn(t,n){const l=t.matches;n.matches=[],Z(l)&&l.forEach(i=>{if(!Z(i.indices)||!i.indices.length)return;const{indices:s,value:o}=i;let a={indices:s,value:o};i.key&&(a.key=i.key.src),i.idx>-1&&(a.refIndex=i.idx),n.matches.push(a)})}function Fn(t,n){n.score=t.score}function In(t,n,{includeMatches:l=$.includeMatches,includeScore:i=$.includeScore}={}){const s=[];return l&&s.push(Bn),i&&s.push(Fn),t.map(o=>{const{idx:a}=o,r={item:n[a],refIndex:a};return s.length&&s.forEach(u=>{u(o,r)}),r})}class re{constructor(n,l={},i){this.options={...$,...l},this.options.useExtendedSearch,this._keyStore=new nn(this.options.keys),this.setCollection(n,i)}setCollection(n,l){if(this._docs=n,l&&!(l instanceof $e))throw new Error(Yt);this._myIndex=l||Ze(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(n){Z(n)&&(this._docs.push(n),this._myIndex.add(n))}remove(n=()=>!1){const l=[];for(let i=0,s=this._docs.length;i<s;i+=1){const o=this._docs[i];n(o,i)&&(this.removeAt(i),i-=1,s-=1,l.push(o))}return l}removeAt(n){this._docs.splice(n,1),this._myIndex.removeAt(n)}getIndex(){return this._myIndex}search(n,{limit:l=-1}={}){const{includeMatches:i,includeScore:s,shouldSort:o,sortFn:a,ignoreFieldNorm:r}=this.options;let u=le(n)?le(this._docs[0])?this._searchStringList(n):this._searchObjectList(n):this._searchLogical(n);return An(u,{ignoreFieldNorm:r}),o&&u.sort(a),We(l)&&l>-1&&(u=u.slice(0,l)),In(u,this._docs,{includeMatches:i,includeScore:s})}_searchStringList(n){const l=Ne(n,this.options),{records:i}=this._myIndex,s=[];return i.forEach(({v:o,i:a,n:r})=>{if(!Z(o))return;const{isMatch:u,score:d,indices:c}=l.searchIn(o);u&&s.push({item:o,idx:a,matches:[{score:d,value:o,norm:r,indices:c}]})}),s}_searchLogical(n){const l=lt(n,this.options),i=(r,u,d)=>{if(!r.children){const{keyId:h,searcher:f}=r,y=this._findMatches({key:this._keyStore.get(h),value:this._myIndex.getValueForItemAtKeyId(u,h),searcher:f});return y&&y.length?[{idx:d,item:u,matches:y}]:[]}const c=[];for(let h=0,f=r.children.length;h<f;h+=1){const y=r.children[h],B=i(y,u,d);if(B.length)c.push(...B);else if(r.operator===ve.AND)return[]}return c},s=this._myIndex.records,o={},a=[];return s.forEach(({$:r,i:u})=>{if(Z(r)){let d=i(l,r,u);d.length&&(o[u]||(o[u]={idx:u,item:r,matches:[]},a.push(o[u])),d.forEach(({matches:c})=>{o[u].matches.push(...c)}))}}),a}_searchObjectList(n){const l=Ne(n,this.options),{keys:i,records:s}=this._myIndex,o=[];return s.forEach(({$:a,i:r})=>{if(!Z(a))return;let u=[];i.forEach((d,c)=>{u.push(...this._findMatches({key:d,value:a[c],searcher:l}))}),u.length&&o.push({idx:r,item:a,matches:u})}),o}_findMatches({key:n,value:l,searcher:i}){if(!Z(l))return[];let s=[];if(ie(l))l.forEach(({v:o,i:a,n:r})=>{if(!Z(o))return;const{isMatch:u,score:d,indices:c}=i.searchIn(o);u&&s.push({score:d,key:n,value:o,idx:a,norm:r,indices:c})});else{const{v:o,n:a}=l,{isMatch:r,score:u,indices:d}=i.searchIn(o);r&&s.push({score:u,key:n,value:o,norm:a,indices:d})}return s}}re.version="7.1.0";re.createIndex=Ze;re.parseIndex=dn;re.config=$;re.parseQuery=lt;_n(Sn);const ue=t=>{const[n,l]=vt.createInjectionState(i=>{const s=e.reactive(i);function o(c,h){Q(h)&&Y.isObject(h)?s.queryForm[c]=void 0:s.queryForm[c]=h}function a(c){let{key:h,label:f,value:y}=c;if(Q(y)&&!Y.isObject(y))return;let B="",k=y==null?void 0:y.toString();if(typeof y=="number"||typeof y=="boolean"||typeof y=="string")B=`${f}:${k}`,k.length>50&&(B=`${f}:${k.slice(0,50)}...`);else if(Y.isArray(y)&&(B=`${f}:${k}`,k.length>50)){let p=0,b=0;for(let _=0;_<y.length;_++)if(b+=y[_].length+1,b>50){p=_+1;break}let x=y.slice(0,p);B=`${f}:${x.join(",").slice(0,50)}...`,y.length>p&&(B+=`等其余${y.length-p}项`)}const w={key:h,label:f,showStr:B,value:k},m=s.tags.findIndex(p=>p.key===h);m===-1?s.tags.push(w):s.tags.splice(m,1,w)}function r(c,h){c.key&&s.tags.findIndex(f=>f.key===c.key)!==-1&&(s.queryForm[c.key]=void 0,h?s.tags.splice(h,1):s.tags=s.tags.filter(f=>f.key!==c.key))}function u(){s.tags.forEach(c=>{s.queryForm[c.key]=void 0}),s.tags=[]}function d(c={}){Object.keys(s.queryForm).forEach(h=>{h!=="resetCount"&&(s.queryForm[h]=c[h]??void 0)}),s.tags=[]}return{state:s,setQuery:o,addTag:a,reduceTag:r,reduceAllTag:u,clearQuery:d}},{injectionKey:t});return{useProvideQueryStore:n,useQueryStore:l}},zn={class:"el-select-pop-search-container"},$n={class:"el-select-dropdown__wrap virtual-scroll-wrap"},Mn={class:"check-all ak-relative el-select-dropdown__item"},Tn=["title"],Dn=["onClick"],Ln={class:"el-select-dropdown__empty"},On={class:"custom-multi-footer"},Rn={class:"counts"},jn=e.defineComponent({name:"JcSelectQuery",__name:"index",props:{field:{type:String,required:!0,default:""},options:{type:Array,default:()=>[],required:!0},allowCreate:{type:Boolean,default:!1},keyField:{type:Array,default:()=>["label","value"]},width:{type:String,default:"160px"},size:{type:String,default:"default",validator:t=>["small","default","large"].includes(t)},footerBtnName:{type:String,default:"搜索"},maxScrollHeight:{type:String,default:"240px"},isNeedFooter:{type:Boolean,default:!0},isNeedOnlySelect:{type:Boolean,default:!0},injectionKey:{type:String,default:"jc-query-injection-key"}},setup(t,{expose:n}){const l=t,i=e.ref(),s=e.ref([]),o=e.reactive({}),a=e.ref(""),r=e.ref(),u=e.ref([]),d=e.ref([]),c=e.ref([]),h=e.ref(!1),f=e.ref(!1),y=e.ref(!1),{useQueryStore:B}=ue(l.injectionKey),{state:k,setQuery:w}=B();let m=-1,p=!1;const b=e.ref(),x=C=>{C&&(c.value=s.value,a.value="",d.value=u.value,V(c.value),e.nextTick(()=>{var S;(S=r.value)==null||S.focus()}))},_=C=>{c.value=c.value.filter(S=>S.value!==C.value)},E=C=>{y.value=!0,w(l.field,C),e.nextTick(()=>{y.value=!1})},g=()=>{const C=a.value.trim();C!==""?d.value=b.value.search(C).map(S=>S.item):d.value=u.value},I=()=>{Q(a.value)||d.value.map(C=>C.value).includes(a.value)||(u.value.unshift({label:a.value,value:a.value}),c.value.push({label:a.value,value:a.value}),s.value=c.value,w(l.field,s.value),e.nextTick(()=>{b.value=new re(u.value,{keys:l.keyField}),g()}))},D=C=>{c.value=C?d.value:[],f.value=!1,l.isNeedFooter||(s.value=c.value,w(l.field,s.value))},V=C=>{if(C.length===0){h.value=!1,f.value=!1;return}const S=C.length;h.value=S===d.value.length,f.value=S>0&&S<d.value.length;const{options:N}=l;let M=0;if(C.length>0){const j=C[C.length-1];M=N.findIndex(W=>W.value===j.value)}if(p){const j=Math.abs(m-M)+1,W=Math.min(m,M);let J=0;for(;J<j;){const X=W+J;Y.findIndex(C,N[X])===-1&&c.value.push(N[X]),J++}}l.isNeedFooter||(s.value=c.value,w(l.field,s.value))},L=C=>{!p&&!c.value.includes(C)&&(m=u.value.findIndex(S=>S.value===C.value))},T=C=>{c.value=[C],z()},q=()=>{var C;(C=i.value)==null||C.blur()},z=()=>{y.value=!0,s.value=c.value,w(l.field,s.value),q(),e.nextTick(()=>{y.value=!1})};return e.watch(()=>l.options,()=>{var C;!Y.isArray(l.options)||((C=l.options)==null?void 0:C.length)===0||(d.value=l.options,u.value=Y.cloneDeep(l.options),b.value=new re(u.value,{keys:l.keyField,threshold:.1}))},{immediate:!0,deep:!0}),e.watch(()=>k.queryForm[l.field],C=>{y.value||(Q(C)?(s.value=[],c.value=[]):s.value=Y.isArray(C)?C:[])},{deep:!0}),e.onMounted(()=>{window.addEventListener("keydown",C=>{C.shiftKey&&(p=!0)}),window.addEventListener("keyup",()=>{p=!1}),e.nextTick(()=>{b.value=new re(u.value,{keys:l.keyField})})}),e.onUnmounted(()=>{window.removeEventListener("keydown",C=>{C.shiftKey&&(p=!0)}),window.removeEventListener("keyup",()=>{p=!1})}),e.onMounted(()=>{var C;i.value&&(o.focus=i.value.focus,o.blur=i.value.blur,o.selectedLabel=(C=i.value)==null?void 0:C.selectedLabel)}),n(o),(C,S)=>(e.openBlock(),e.createBlock(e.unref(A.ElSelect),e.mergeProps({ref_key:"selectRef",ref:i,modelValue:s.value,"onUpdate:modelValue":S[3]||(S[3]=N=>s.value=N)},C.$attrs,{multiple:"",clearable:"","show-arrow":!1,"collapse-tags":!0,"collapse-tags-tooltip":!0,"max-collapse-tags":1,size:t.size,style:{width:t.width},class:"jc-select","popper-class":"jc-select-popper",placeholder:"请选择",onVisibleChange:x,onRemoveTag:_,onChange:E}),e.createSlots({default:e.withCtx(()=>[e.createVNode(e.unref(A.ElOption),{value:"1",hidden:""}),e.createElementVNode("div",zn,[e.createVNode(e.unref(ee.Search),{class:"selcet-icon search-icon"}),e.withDirectives(e.createElementVNode("input",{ref_key:"searchInputRef",ref:r,"onUpdate:modelValue":S[0]||(S[0]=N=>a.value=N),class:"el-select-pop__input",onInput:g},null,544),[[e.vModelText,a.value]]),t.allowCreate?(e.openBlock(),e.createBlock(e.unref(ee.CirclePlus),{key:0,class:"selcet-icon circle-icon",onClick:I})):e.createCommentVNode("",!0)]),e.withDirectives(e.createElementVNode("div",$n,[e.createElementVNode("li",Mn,[e.createVNode(e.unref(A.ElCheckbox),{modelValue:h.value,"onUpdate:modelValue":S[1]||(S[1]=N=>h.value=N),indeterminate:f.value,size:t.size,onChange:D},{default:e.withCtx(()=>S[4]||(S[4]=[e.createTextVNode("全选")])),_:1,__:[4]},8,["modelValue","indeterminate","size"])]),e.createVNode(e.unref(A.ElCheckboxGroup),{modelValue:c.value,"onUpdate:modelValue":S[2]||(S[2]=N=>c.value=N),onChange:V,size:t.size},{default:e.withCtx(()=>[e.createVNode(e.unref(ze),{class:"recycle-scroller",items:d.value,"item-size":30,"key-field":"value",style:e.normalizeStyle({maxHeight:t.maxScrollHeight})},{default:e.withCtx(({item:N})=>[e.createElementVNode("li",{class:"el-select-dropdown__item",title:N.label},[e.createVNode(e.unref(A.ElCheckbox),{size:t.size,value:N,label:N,disabled:N.disabled,onClick:M=>L(N)},{default:e.withCtx(()=>[e.renderSlot(C.$slots,"default",{scope:N},()=>[e.createElementVNode("span",null,e.toDisplayString(N.label),1)])]),_:2},1032,["size","value","label","disabled","onClick"]),t.isNeedOnlySelect?(e.openBlock(),e.createElementBlock("div",{key:0,class:"select-tag",onClick:e.withModifiers(M=>T(N),["stop"])},S[5]||(S[5]=[e.createElementVNode("span",null,"仅筛选此项",-1)]),8,Dn)):e.createCommentVNode("",!0)],8,Tn)]),_:3},8,["items","style"])]),_:3},8,["modelValue","size"])],512),[[e.vShow,d.value.length>0]]),e.withDirectives(e.createElementVNode("p",Ln,"无数据",512),[[e.vShow,d.value.length===0]])]),_:2},[t.isNeedFooter?{name:"footer",fn:e.withCtx(()=>[e.createElementVNode("div",On,[e.createElementVNode("span",null,[e.createElementVNode("span",Rn,"已选 "+e.toDisplayString(c.value.length)+" 项",1),S[6]||(S[6]=e.createElementVNode("span",{class:"shift-tips"},"(按住Shift可以快速多选)",-1))]),e.createElementVNode("span",null,[e.createVNode(e.unref(A.ElButton),{size:t.size,onClick:q,plain:""},{default:e.withCtx(()=>S[7]||(S[7]=[e.createTextVNode("关闭")])),_:1,__:[7]},8,["size"]),e.createVNode(e.unref(A.ElButton),{type:"primary",size:t.size,onClick:z,plain:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.footerBtnName),1)]),_:1},8,["size"])])])]),key:"0"}:void 0]),1040,["modelValue","size","style"]))}}),ne=t=>(t.install=n=>{const l=t.name;n.component(l,t)},t),it=ne(jn),Pn={class:"jc-cascader-item"},qn={title:"{{ data.label }}"},Un=["onClick"],Qn={class:"custom-multi-footer"},Kn=e.defineComponent({name:"JcCascader",__name:"index",props:{field:{type:String,required:!0,default:""},options:{type:Array,default:()=>[]},keyField:{type:Array,default:()=>["label","value"]},width:{type:String,default:"200px"},size:{type:String,default:"default",validator:t=>["small","default","large"].includes(t)},footerBtnName:{type:String,default:"搜索"},isNeedFooter:{type:Boolean,default:!0},isNeedHeader:{type:Boolean,default:!0},isNeedOnlySelect:{type:Boolean,default:!0},injectionKey:{type:String,default:"jc-query-injection-key"}},setup(t,{expose:n}){const l=t,i=e.ref(),s=e.ref([]),o=e.reactive({}),a=(_,E)=>{const g=String(_.label).trim().toLowerCase(),I=E.trim().toLowerCase();return g.indexOf(I)!==-1},r={multiple:!0,expandTrigger:"hover"},u=e.ref(!1),{useQueryStore:d}=ue(l.injectionKey),{state:c,setQuery:h}=d(),f=e.ref(!1),y=e.ref(!1),B=e.computed(()=>{var g;const _=[],E=l.options.map(I=>({node:I,path:[I.value]}));for(;E.length>0;){const{node:I,path:D}=E.shift();(g=I.children)!=null&&g.length?I.children.forEach(V=>{E.push({node:V,path:[...D,V.value]})}):_.push(D)}return _});e.watch(s,_=>{_.length===0?(f.value=!1,y.value=!1):_.length===B.value.length?(f.value=!0,y.value=!1):y.value=!0});const k=_=>{y.value=!1,s.value=_?B.value:[]},w=()=>{var _;s.value=[],f.value=!1,y.value=!1,(_=i.value)==null||_.togglePopperVisible(!1)},m=()=>{var _;u.value=!0,h(l.field,s.value),(_=i.value)==null||_.togglePopperVisible(!1),e.nextTick(()=>{u.value=!1})},p=()=>{e.nextTick(()=>{m()})},b=()=>{s.value=[],m()},x=_=>{const E=B.value.filter(g=>g.includes(_.value));s.value=E,m()};return e.watch(()=>c.queryForm[l.field],_=>{u.value||(Q(_)?s.value=[]:s.value=Y.isArray(_)?_:[])},{deep:!0}),e.onMounted(()=>{}),e.onUnmounted(()=>{}),e.onMounted(()=>{var _,E,g;i.value&&(o.getCheckedNodes=i.value.getCheckedNodes,o.cascaderPanelRef=i.value.cascaderPanelRef,o.togglePopperVisible=(_=i.value)==null?void 0:_.togglePopperVisible,o.contentRef=(E=i.value)==null?void 0:E.contentRef,o.presentText=(g=i.value)==null?void 0:g.presentText)}),n(o),(_,E)=>{const g=e.resolveComponent("el-checkbox"),I=e.resolveComponent("el-button"),D=e.resolveComponent("el-cascader");return e.openBlock(),e.createBlock(D,e.mergeProps({ref_key:"cascaderRef",ref:i,class:"jc-cascader","popper-class":"jc-cascader-popper",modelValue:s.value,"onUpdate:modelValue":E[1]||(E[1]=V=>s.value=V)},_.$attrs,{props:r,options:t.options,filterable:"",clearable:!0,"filter-method":a,"show-arrow":!1,"collapse-tags":!0,"collapse-tags-tooltip":!0,size:t.size,style:{width:t.width},placeholder:"请选择",onRemoveTag:p,onClear:b}),e.createSlots({default:e.withCtx(({data:V})=>[e.createElementVNode("div",Pn,[e.createElementVNode("span",qn,e.toDisplayString(V.label),1),t.isNeedOnlySelect?(e.openBlock(),e.createElementBlock("span",{key:0,class:"select-tag",onClick:e.withModifiers(L=>x(V),["stop"])},E[3]||(E[3]=[e.createElementVNode("span",null,"仅筛选此项",-1)]),8,Un)):e.createCommentVNode("",!0)])]),footer:e.withCtx(()=>[e.createElementVNode("div",Qn,[e.createElementVNode("span",null,[e.createVNode(I,{size:t.size,onClick:w,plain:""},{default:e.withCtx(()=>E[4]||(E[4]=[e.createTextVNode("关闭")])),_:1,__:[4]},8,["size"]),e.createVNode(I,{type:"primary",size:t.size,onClick:m,plain:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.footerBtnName),1)]),_:1},8,["size"])])])]),_:2},[t.isNeedHeader?{name:"header",fn:e.withCtx(()=>[e.createElementVNode("div",null,[e.createVNode(g,{style:{"margin-left":"10px"},size:t.size,modelValue:f.value,"onUpdate:modelValue":E[0]||(E[0]=V=>f.value=V),indeterminate:y.value,onChange:k},{default:e.withCtx(()=>E[2]||(E[2]=[e.createTextVNode(" 全部 ")])),_:1,__:[2]},8,["size","modelValue","indeterminate"])])]),key:"0"}:void 0]),1040,["modelValue","options","size","style"])}}}),st=ne(Kn),Jn={style:{"max-width":"100px"}},Hn=e.defineComponent({name:"JcDatePicker",__name:"index",props:{fieldList:{type:Array,require:!0,default:()=>[]},type:{type:String,default:"daterange",validator:t=>["daterange","monthrange"].includes(t)},size:{type:String,default:"default",validator:t=>["small","default","large"].includes(t)},width:{type:String,default:"320px"},injectionKey:{type:String,default:"jc-query-injection-key"}},emits:["fieldChange"],setup(t,{expose:n,emit:l}){const i=t,s=l,o=e.ref([]),a=e.ref([]),r=e.ref(""),u=e.ref(""),d=e.ref(!1),{useQueryStore:c}=ue(i.injectionKey),{state:h,setQuery:f}=c(),y=()=>{i.fieldList.forEach(p=>{f(p.value,void 0)})},B=p=>{Q(o.value)||(d.value=!0,y(),f(p,o.value),e.nextTick(()=>{d.value=!1})),s("fieldChange",p)},k=()=>{d.value=!0,u.value=r.value,a.value=o.value,f(r.value,o.value),e.nextTick(()=>{d.value=!1})};e.watch(()=>i.fieldList,p=>{(!Q(p)&&Q(r.value)||r.value&&!i.fieldList.map(b=>b.value).includes(r.value))&&(r.value=p[0].value,o.value=[])},{immediate:!0,deep:!0}),e.watch(i.fieldList.map(p=>()=>h.queryForm[p.value]),p=>{if(!d.value){const b=p.findIndex(x=>!Q(x));b===-1?(r.value=i.fieldList[0].value,o.value=[]):(r.value=i.fieldList[b].value,o.value=p[b]||[])}},{deep:!0});const w=e.ref(),m=e.reactive({});return e.onMounted(()=>{var p,b,x,_;w.value&&(m.focus=(p=w.value)==null?void 0:p.focus,m.blur=(b=w.value)==null?void 0:b.blur,m.handleOpen=(x=w.value)==null?void 0:x.handleOpen,m.handleClose=(_=w.value)==null?void 0:_.handleClose)}),n(m),(p,b)=>{const x=e.resolveComponent("el-option"),_=e.resolveComponent("el-select"),E=e.resolveComponent("el-date-picker");return e.openBlock(),e.createElementBlock("div",{class:"jc-date-picker",style:e.normalizeStyle({width:t.width})},[e.createElementVNode("div",Jn,[e.createVNode(_,{modelValue:r.value,"onUpdate:modelValue":b[0]||(b[0]=g=>r.value=g),size:t.size,class:"select-field",onChange:B},{prefix:e.withCtx(()=>[e.createTextVNode(e.toDisplayString((t.fieldList.find(g=>g.value===r.value)||{}).label),1)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.fieldList,g=>(e.openBlock(),e.createBlock(x,{key:g.value,label:g.label,value:g.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","size"])]),e.createVNode(E,e.mergeProps({ref_key:"datePickerRef",ref:w,modelValue:o.value,"onUpdate:modelValue":b[1]||(b[1]=g=>o.value=g),type:t.type},p.$attrs,{"range-separator":"至","start-placeholder":"开始时间","end-placeholder":"结束时间",size:t.size,"value-format":t.type==="daterange"?"YYYY-MM-DD":"YYYY-MM",onChange:k}),null,16,["modelValue","type","size","value-format"])],4)}}}),ot=ne(Hn),Wn={class:"suffixContent"},Gn=e.defineComponent({name:"JcInputSwitch",__name:"index",props:{fieldList:{type:Array,required:!0,default:()=>[]},size:{type:String,default:"default",validator:t=>["small","default","large"].includes(t)},width:{type:String,default:"320px"},injectionKey:{type:String,default:"jc-query-injection-key"}},emits:["fieldChange"],setup(t,{expose:n,emit:l}){const i=t,s=l,o=e.ref(""),a=e.ref(""),r=e.ref(""),u=e.ref(""),{useQueryStore:d}=ue(i.injectionKey),{state:c,setQuery:h}=d(),f=e.ref(!1),y=()=>{i.fieldList.forEach(b=>{h(b.value,void 0)})},B=()=>{f.value=!0,o.value="",y(),e.nextTick(()=>{f.value=!1})},k=b=>{o.value&&(f.value=!0,y(),h(b,o.value),e.nextTick(()=>{f.value=!1})),s("fieldChange",b)},w=()=>{f.value=!0,a.value=o.value,u.value=r.value,h(r.value,o.value.trim()),e.nextTick(()=>{f.value=!1})};e.watch(()=>i.fieldList,b=>{(!Q(b)&&Q(r.value)||r.value&&!i.fieldList.map(x=>x.value).includes(r.value))&&(r.value=b[0].value,o.value="")},{immediate:!0,deep:!0}),e.watch(()=>c.queryForm.resetCount,()=>{B()}),e.watch(i.fieldList.map(b=>()=>c.queryForm[b.value]),b=>{if(!f.value){const x=b.findIndex(_=>!Q(_));x===-1?(r.value=i.fieldList[0].value,o.value=""):(r.value=i.fieldList[x].value,o.value=b[x]||"")}},{deep:!0});const m=e.ref(),p=e.reactive({});return e.onMounted(()=>{var b,x,_,E,g,I,D,V,L,T;m.value&&(p.blur=(b=m.value)==null?void 0:b.blur,p.clear=(x=m.value)==null?void 0:x.clear,p.focus=(_=m.value)==null?void 0:_.focus,p.input=(E=m.value)==null?void 0:E.input,p.ref=(g=m.value)==null?void 0:g.ref,p.resizeTextarea=(I=m.value)==null?void 0:I.resizeTextarea,p.select=(D=m.value)==null?void 0:D.select,p.textarea=(V=m.value)==null?void 0:V.textarea,p.textareaStyle=(L=m.value)==null?void 0:L.textareaStyle,p.isComposing=(T=m.value)==null?void 0:T.isComposing)}),n(p),(b,x)=>(e.openBlock(),e.createBlock(e.unref(A.ElInput),e.mergeProps({ref_key:"inputRef",ref:m,modelValue:o.value,"onUpdate:modelValue":x[1]||(x[1]=_=>o.value=_),modelModifiers:{trim:!0}},b.$attrs,{placeholder:"请输入内容",style:{width:t.width},size:t.size,class:"jc-input jc-input-switch"}),{prepend:e.withCtx(()=>[e.createVNode(e.unref(A.ElSelect),{modelValue:r.value,"onUpdate:modelValue":x[0]||(x[0]=_=>r.value=_),size:t.size,class:"select-field",onChange:k},{prefix:e.withCtx(()=>[e.createTextVNode(e.toDisplayString((t.fieldList.find(_=>_.value===r.value)||{}).label),1)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.fieldList,_=>(e.openBlock(),e.createBlock(e.unref(A.ElOption),{key:_.value,label:_.label,value:_.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","size"])]),suffix:e.withCtx(()=>[e.createElementVNode("div",Wn,[e.withDirectives(e.createVNode(e.unref(A.ElIcon),{class:"el-input__icon",onClick:B},{default:e.withCtx(()=>[e.createVNode(e.unref(ee.Close))]),_:1},512),[[e.vShow,o.value]]),e.createVNode(e.unref(A.ElIcon),{class:"el-input__icon",onClick:w},{default:e.withCtx(()=>[e.createVNode(e.unref(ee.Search))]),_:1})])]),_:1},16,["modelValue","style","size"]))}}),rt=ne(Gn),Yn={class:"suffixContent"},Xn={class:"popover-body"},Zn={class:"popover-btn"},el={class:"popover-btn-right"},tl=e.defineComponent({name:"JcInputComplex",__name:"index",props:{fieldList:{type:Array,require:!0,default:()=>[]},size:{type:String,default:"default",validator:t=>["small","default","large"].includes(t)},width:{type:String,default:"320px"},injectionKey:{type:String,default:"jc-query-injection-key"}},emits:["fieldChange"],setup(t,{expose:n,emit:l}){const i=t,s=l,o=e.ref(""),a=e.ref(""),r=e.ref(""),u=e.ref(""),d=e.ref(!1),c=e.computed(()=>r.value+"List"),h=e.computed(()=>{var N;return((N=i.fieldList.find(M=>M.value===r.value))==null?void 0:N.label)||""}),f=e.ref(""),y=e.ref(!1),{useQueryStore:B}=ue(i.injectionKey),{state:k,setQuery:w,addTag:m,reduceTag:p}=B(),b={},x={};i.fieldList.forEach(N=>{b[N.value]=void 0,x[N.value+"List"]=[]});const _=N=>{d.value=!1,E(),s("fieldChange",N)},E=()=>{k.queryForm[c.value]?f.value=k.queryForm[c.value].join(`
|
|
3
|
-
`):f.value=""},g=()=>{y.value=!0,o.value="",
|
|
4
|
-
`).filter(M=>!Q(M));if(N.length>0){const M=[...new Set(N)],
|
|
5
|
-
`)}`;A.ElMessage.warning(
|
|
6
|
-
`),
|
|
7
|
-
`),V()})},
|
|
8
|
-
`))||"",Y.isArray(k.queryForm[J])&&!Q(k.queryForm[J])){m({key:J,label:W.label,value:k.queryForm[J]});return}else p({key:J});k.queryForm[W.value]?(j=!0,r.value=W.value,o.value=k.queryForm[W.value]||""):j||(o.value="")})}},{deep:!0});const C=e.ref(),S=e.reactive({});return e.onMounted(()=>{var N,M,j,W,J,X,se,v,F,P;C.value&&(S.blur=(N=C.value)==null?void 0:N.blur,S.clear=(M=C.value)==null?void 0:M.clear,S.focus=(j=C.value)==null?void 0:j.focus,S.input=(W=C.value)==null?void 0:W.input,S.ref=(J=C.value)==null?void 0:J.ref,S.resizeTextarea=(X=C.value)==null?void 0:X.resizeTextarea,S.select=(se=C.value)==null?void 0:se.select,S.textarea=(v=C.value)==null?void 0:v.textarea,S.textareaStyle=(F=C.value)==null?void 0:F.textareaStyle,S.isComposing=(P=C.value)==null?void 0:P.isComposing)}),S.setInputValueMult=q,S.setInputByOutside=z,n(S),(N,M)=>(e.openBlock(),e.createBlock(e.unref(A.ElInput),e.mergeProps({ref_key:"inputRef",ref:C,modelValue:o.value,"onUpdate:modelValue":M[5]||(M[5]=j=>o.value=j),modelModifiers:{trim:!0}},N.$attrs,{placeholder:"请输入内容",style:{width:t.width},class:"jc-input jc-input-complex search-input",size:t.size}),{prepend:e.withCtx(()=>[e.createVNode(e.unref(A.ElSelect),{ref:"selectRef",modelValue:r.value,"onUpdate:modelValue":M[0]||(M[0]=j=>r.value=j),size:t.size,class:"select-field",onChange:_},{prefix:e.withCtx(()=>[e.createTextVNode(e.toDisplayString((t.fieldList.find(j=>j.value===r.value)||{}).label),1)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.fieldList,j=>(e.openBlock(),e.createBlock(e.unref(A.ElOption),{key:j.value,label:j.label,value:j.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","size"])]),suffix:e.withCtx(()=>[e.createElementVNode("div",Yn,[e.withDirectives(e.createVNode(e.unref(A.ElIcon),{class:"el-input__icon",onClick:g},{default:e.withCtx(()=>[e.createVNode(e.unref(ee.Close))]),_:1},512),[[e.vShow,o.value]]),e.createVNode(e.unref(A.ElIcon),{class:"el-input__icon",onClick:D},{default:e.withCtx(()=>[e.createVNode(e.unref(ee.Search))]),_:1}),e.createVNode(e.unref(A.ElPopover),{visible:d.value,"onUpdate:visible":M[4]||(M[4]=j=>d.value=j),placement:"bottom-end",width:"240","show-arrow":!1,"popper-class":"jc-input-pop",trigger:"click"},{reference:e.withCtx(()=>[e.createVNode(e.unref(A.ElIcon),{class:"el-input__icon",title:"多项搜索",style:{"background-color":"#f0f2f5"},onClick:E},{default:e.withCtx(()=>[e.createVNode(e.unref(ee.Grid))]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("div",Xn,[e.createVNode(e.unref(A.ElInput),e.mergeProps({modelValue:f.value,"onUpdate:modelValue":M[1]||(M[1]=j=>f.value=j),type:"textarea"},N.$attrs,{size:t.size,placeholder:"一行一项",class:"popover-textarea",wrap:"off"}),null,16,["modelValue","size"]),e.createElementVNode("div",Zn,[e.createVNode(e.unref(A.ElButton),{size:t.size,onClick:M[2]||(M[2]=j=>f.value=""),plain:""},{default:e.withCtx(()=>M[6]||(M[6]=[e.createTextVNode("清空")])),_:1,__:[6]},8,["size"]),e.createElementVNode("div",el,[e.createVNode(e.unref(A.ElButton),{size:t.size,plain:"",onClick:L},{default:e.withCtx(()=>M[7]||(M[7]=[e.createTextVNode("关闭")])),_:1,__:[7]},8,["size"]),e.createVNode(e.unref(A.ElButton),{type:"primary",plain:"",size:t.size,onClick:M[3]||(M[3]=j=>V())},{default:e.withCtx(()=>M[8]||(M[8]=[e.createTextVNode("搜索")])),_:1,__:[8]},8,["size"])])])])]),_:1},8,["visible"])])]),_:1},16,["modelValue","style","size"]))}}),at=ne(tl),nl={style:{display:"flex","flex-wrap":"wrap",flex:"1","flex-basis":"calc(100% - 50px)","font-size":"12px","margin-top":"4px"}},ll=e.defineComponent({name:"JcTagQuery",__name:"index",props:{injectionKey:{type:String,default:"jc-query-injection-key"}},setup(t){const n=t,{useQueryStore:l}=ue(n.injectionKey),{state:i,reduceTag:s,reduceAllTag:o}=l();return(a,r)=>(e.openBlock(),e.createElementBlock("div",nl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(i).tags,(u,d)=>(e.openBlock(),e.createBlock(e.unref(A.ElTag),e.mergeProps({ref_for:!0},a.$attrs,{key:u.label,closable:"",style:[{height:"auto","max-height":"28px","white-space":"normal","text-align":"left","max-width":"1800px",overflow:"hidden","word-break":"break-word","text-overflow":"ellipsis"},{marginLeft:d>0?"4px":"0px"}],onClose:c=>e.unref(s)(u,d)}),{default:e.withCtx(()=>[e.createVNode(e.unref(A.ElTooltip),{content:u.value,placement:"bottom",effect:"light"},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(u.showStr),1)]),_:2},1032,["content"])]),_:2},1040,["style","onClose"]))),128)),e.unref(i).tags.length>1?(e.openBlock(),e.createElementBlock("span",{key:0,style:{"margin-left":"10px","margin-top":"2px",display:"block"},onClick:r[0]||(r[0]=(...u)=>e.unref(o)&&e.unref(o)(...u))},[e.createVNode(e.unref(A.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(ee.Delete))]),_:1})])):e.createCommentVNode("",!0)]))}}),Me=(t,n)=>{const l=t.__vccOpts||t;for(const[i,s]of n)l[i]=s;return l},il=Me(ll,[["__scopeId","data-v-fddb24ed"]]),ut=ne(il),sl={class:"popover-btn"},ol={class:"popover-btn-right"},rl=e.defineComponent({name:"JcMoreQueryContain",__name:"index",props:{fieldList:{type:Array,require:!0,default:()=>[]},customTagObj:{type:Object,default:()=>({})},width:{type:Number,default:400},size:{type:String,default:"default",validator:t=>["small","default","large"].includes(t)},injectionKey:{type:String,default:"jc-query-injection-key"}},setup(t,{expose:n}){const l=e.ref(!1),i=e.ref({}),s=t,{useQueryStore:o}=ue(s.injectionKey),{state:a,setQuery:r,addTag:u,reduceTag:d}=o(),c=e.ref(!1),h=()=>{l.value=!l.value,l.value&&s.fieldList.forEach(m=>{i.value[m.value]=a.queryForm[m.value]||void 0})},f=()=>{c.value=!0,i.value={},s.fieldList.forEach(m=>{r(m.value,void 0),d({key:m.value})}),l.value=!1,e.nextTick(()=>{c.value=!1})},y=(m,p)=>{var b;typeof i.value[m]>"u"||(typeof i.value[m]=="string"||typeof i.value[m]=="number"?u({key:m,label:p,value:Q(s.customTagObj[m])?i.value[m]:s.customTagObj[m]}):u({key:m,label:p,value:Q(s.customTagObj[m])?(b=i.value[m])==null?void 0:b.join(","):s.customTagObj[m]}))},B=()=>{c.value=!0;for(const m in i.value){r(m,Q(i.value[m])?void 0:i.value[m]);const p=s.fieldList.find(b=>b.value===m);p===void 0&&A.ElMessage.warning("传入的fieldList和表单绑定的字段不匹配"),y(m,p.label)}l.value=!1,e.nextTick(()=>{c.value=!1})};e.watch(()=>a.queryForm.resetCount,()=>{f()}),e.watch(s.fieldList.map(m=>()=>a.queryForm[m.value]),()=>{c.value||s.fieldList.forEach(m=>{i.value[m.value]=a.queryForm[m.value],Q(a.queryForm[m.value])?d({key:m.value}):y(m.value,m.label)})},{deep:!0});const k=e.ref(),w=e.reactive({});return e.onMounted(()=>{var m;k.value&&(w.hide=(m=k.value)==null?void 0:m.hide)}),n(w),(m,p)=>(e.openBlock(),e.createBlock(e.unref(A.ElPopover),e.mergeProps({ref_key:"popoverRef",ref:k},m.$attrs,{visible:l.value,placement:"bottom",width:t.width,"show-arrow":!1,"popper-class":"moreQuery-pop",trigger:"click"}),{reference:e.withCtx(()=>[e.createVNode(e.unref(A.ElButton),{size:t.size,icon:e.unref(ee.Operation),onClick:h},null,8,["size","icon"])]),default:e.withCtx(()=>[e.renderSlot(m.$slots,"default",{scopeForm:i.value}),e.createElementVNode("div",sl,[e.createVNode(e.unref(A.ElButton),{size:t.size,onClick:f,plain:""},{default:e.withCtx(()=>p[1]||(p[1]=[e.createTextVNode("清空")])),_:1,__:[1]},8,["size"]),e.createElementVNode("div",ol,[e.createVNode(e.unref(A.ElButton),{size:t.size,onClick:p[0]||(p[0]=b=>l.value=!1),plain:""},{default:e.withCtx(()=>p[2]||(p[2]=[e.createTextVNode("关闭")])),_:1,__:[2]},8,["size"]),e.createVNode(e.unref(A.ElButton),{type:"primary",plain:"",size:t.size,onClick:B},{default:e.withCtx(()=>p[3]||(p[3]=[e.createTextVNode("搜索")])),_:1,__:[3]},8,["size"])])])]),_:3},16,["visible","width"]))}}),ct=ne(rl),al={class:"jc-list-layout"},ul={key:1,class:"bottom-header"},cl=e.defineComponent({name:"JcListLayout",__name:"index",setup(t){return(n,l)=>(e.openBlock(),e.createElementBlock("div",al,[n.$slots["top-body"]?(e.openBlock(),e.createBlock(e.unref(A.ElCard),{key:0,class:"top-card",shadow:"never"},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"top-body")]),_:3})):e.createCommentVNode("",!0),n.$slots["bottom-header"]?(e.openBlock(),e.createElementBlock("div",ul,[e.renderSlot(n.$slots,"bottom-header")])):e.createCommentVNode("",!0),n.$slots["bottom-body"]?(e.openBlock(),e.createBlock(e.unref(A.ElCard),{key:2,class:"bottom-card",shadow:"never"},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"bottom-body")]),_:3})):e.createCommentVNode("",!0)]))}}),dt=ne(cl),dl={class:"jc-import-dialog"},fl={id:"import-wrapper"},hl={class:"basic-btn"},ml={class:"import-info"},pl=e.defineComponent({name:"JcImportDialog",__name:"index",props:{btnName:{type:String,default:"导入"},title:{type:String,default:"导入"},importInfoArr:{type:Array,default:()=>["表头字段不可重复","表格中存在多条相同记录时,以第一条为准","导入格式为xlsx(手动修改文件后缀无效),行数不超过5000条,文件大小不超过5M"]},uploadFileFn:{type:Function,required:!0},downloadFileFn:{type:Function}},emits:["onSuccess","onError"],setup(t,{emit:n}){const l=t,i=n,s=e.ref(!1),o=e.ref(),a=e.ref(!1),r=()=>{s.value=!0,e.nextTick(()=>{o.value.clearFiles()})},u=c=>{if(!l.uploadFileFn){A.ElMessage.warning("导入函数未定义");return}const h=A.ElLoading.service({lock:!0,text:"导入中,请耐心等待ing.....",spinner:"el-icon-loading",background:"rgba(0, 0, 0, 0.7)"});o.value.clearFiles();const f=new FormData;f.append("file",c.file),l.uploadFileFn(f).then(y=>{h.close(),y.code===200?(A.ElMessage.success("导入成功"),s.value=!1,i("onSuccess")):(A.ElMessage.warning(y.message||"导入失败"),i("onError"))})},d=()=>{if(!l.downloadFileFn){A.ElMessage.warning("下载函数未定义");return}a.value=!0,l.downloadFileFn().then(c=>{a.value=!1,c.code===200?A.ElMessage.success("下载导入模版成功"):A.ElMessage.warning(c.message||"下载导入模版失败")})};return(c,h)=>{const f=e.resolveComponent("el-button"),y=e.resolveComponent("el-upload"),B=e.resolveComponent("el-icon"),k=e.resolveComponent("el-dialog");return e.openBlock(),e.createElementBlock("div",dl,[e.createVNode(f,e.mergeProps(c.$attrs,{onClick:r}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.btnName),1)]),_:1},16),e.createVNode(k,e.mergeProps({modelValue:s.value,"onUpdate:modelValue":h[0]||(h[0]=w=>s.value=w),title:t.title,class:"is-no-footer",width:"800px"},c.$attrs,{top:"10vh",style:{height:"calc(100vh - 200px)"}}),{default:e.withCtx(()=>[e.createElementVNode("div",fl,[e.createElementVNode("div",hl,[e.createElementVNode("div",null,[e.createVNode(y,{ref_key:"importUploadRef",ref:o,"http-request":u,action:"#","show-file-list":!1,accept:".xlsx,.xls,.txt",limit:1,style:{margin:"0 10px 0px 0px"}},{default:e.withCtx(()=>[e.createVNode(f,{type:"primary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.title),1)]),_:1})]),_:1},512)]),e.createVNode(f,{type:"primary",text:"",loading:a.value,onClick:d},{default:e.withCtx(()=>h[1]||(h[1]=[e.createTextVNode("下载导入模板")])),_:1,__:[1]},8,["loading"])]),e.createElementVNode("div",ml,[e.createElementVNode("div",null,[e.createVNode(B,{color:"#005bf5",size:18,class:"icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(ee.InfoFilled))]),_:1})]),e.createElementVNode("ol",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.importInfoArr,(w,m)=>(e.openBlock(),e.createElementBlock("li",{key:m},[e.createElementVNode("span",null,e.toDisplayString(w),1)]))),128))])])])]),_:1},16,["modelValue","title"])])}}}),vl=Me(pl,[["__scopeId","data-v-2660dae9"]]),ft=ne(vl),gl={class:"jc-import-button"},yl=e.defineComponent({name:"JcImportButton",__name:"index",props:{btnName:{type:String,default:"导入"},uploadFileFn:{type:Function,required:!0}},emits:["onSuccess","onError"],setup(t,{emit:n}){const l=t,i=n,s=e.ref(!1),o=e.ref(),a=r=>{if(!l.uploadFileFn){A.ElMessage.warning("导入函数未定义");return}const u=A.ElLoading.service({lock:!0,text:"导入中,请耐心等待ing.....",spinner:"el-icon-loading",background:"rgba(0, 0, 0, 0.7)"});o.value.clearFiles();const d=new FormData;d.append("file",r.file),l.uploadFileFn(d).then(c=>{u.close(),c.code===200?(A.ElMessage.success("导入成功"),s.value=!1,i("onSuccess")):(A.ElMessage.warning(c.message||"导入失败"),i("onError"))})};return(r,u)=>{const d=e.resolveComponent("el-button"),c=e.resolveComponent("el-upload");return e.openBlock(),e.createElementBlock("div",gl,[e.createVNode(c,e.mergeProps({ref_key:"importUploadRef",ref:o,"http-request":a,action:"#","show-file-list":!1,accept:".xlsx,.xls,.txt",limit:1},r.$attrs),{default:e.withCtx(()=>[e.createVNode(d,e.normalizeProps(e.guardReactiveProps(r.$attrs)),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.btnName),1)]),_:1},16)]),_:1},16)])}}}),ht=ne(yl),Cl="VXE_TABLE_CUSTOM_COLUMN_",Fe=1,bl=["checkbox","seq","radio","expand"],Te=(t,n)=>`${n}${t}`,ge=(t,n)=>{try{const l=Te(t,n),i=localStorage.getItem(l);if(!i)return null;const s=JSON.parse(i);return s.version!==Fe?(console.warn(`[ToolbarColumnConfigV2] 存储版本不匹配 (当前: ${s.version}, 期望: ${Fe}),将使用默认配置`),null):s}catch(l){return console.error("[ToolbarColumnConfigV2] 读取列配置存储失败:",l),null}},Ie=(t,n,l)=>{try{const i=Te(t,n),s={version:Fe,timestamp:Date.now(),columns:l};localStorage.setItem(i,JSON.stringify(s))}catch(i){console.error("[ToolbarColumnConfigV2] 保存列配置存储失败:",i)}},xl=(t,n)=>{try{const l=Te(t,n);localStorage.removeItem(l)}catch(l){console.error("[ToolbarColumnConfigV2] 删除列配置存储失败:",l)}},wl=(t,n,l,i,s)=>{const o=ge(t,n);if(o){const a=o.columns.find(r=>r.field===l);a?a.width=i:o.columns.push({field:l,visible:!0,width:i,sortNumber:o.columns.length}),Ie(t,n,o.columns)}else if(s){const a=s.map(r=>r.field===l?{...r,width:i}:r);Ie(t,n,a)}},kl=(t,n)=>{const l=ge(t,n);return l!==null&&l.columns.length>0};function El(t){const{table:n,lockFieldList:l,maxFixedCount:i,storagePrefix:s,columnGroupsConfig:o}=t,a=e.ref([]),r=e.ref([]),u=e.ref([]),d=e.ref([]),c=e.computed(()=>u.value.map(v=>a.value.find(F=>F.field===v)).filter(v=>v!==void 0)),h=e.computed(()=>a.value.filter(v=>v.visible).sort((v,F)=>v.sortNumber-F.sortNumber)),f=e.computed(()=>h.value.length),y=e.computed(()=>h.value.filter(v=>v.fixed==="left").length),B=e.computed(()=>h.value.filter(v=>v.fixed==="right").length),k=e.computed(()=>y.value+B.value),w=e.computed(()=>a.value.length>0&&a.value.every(v=>v.visible)),m=e.computed(()=>{const v=a.value.filter(F=>F.visible).length;return v>0&&v<a.value.length}),p=v=>v.fixed==="left"?!0:k.value<i.value,b=v=>v.fixed==="right"?!0:k.value<i.value,x=v=>!!(v.type&&bl.includes(v.type)),_=()=>{const v=o.value||[],F=a.value.map(K=>K.field),P=new Set,R=v.map((K,oe)=>{const de=K.fields.filter(H=>F.includes(H));return de.forEach(H=>P.add(H)),{id:`group_${oe}`,title:K.title,fields:de}}).filter(K=>K.fields.length>0),O=F.filter(K=>!P.has(K));if(O.length>0||R.length===0){const K={id:"__default__",title:"基础信息",fields:O.length>0?O:F,isDefault:!0};R.push(K)}r.value=R},E=()=>{const v=n.value;if(!v||d.value.length>0)return;const F=v.getTableColumn(),P=F.fullColumn||F.tableColumn||v.getColumns();d.value=Y.cloneDeep(P);const R=P.filter(O=>!x(O)&&O.field);u.value=R.map(O=>O.field)},g=()=>{const v=n.value;if(!v||!v.id)return;const F=v.id,P=v.getTableColumn(),R=P.fullColumn||P.tableColumn||v.getColumns(),O=ge(F,s.value),K=new Map((O==null?void 0:O.columns.map(H=>[H.field,H]))||[]),de=R.filter(H=>!x(H)&&H.field).map((H,U)=>{const G=H.field,te=K.get(G),pt=l.value.includes(G);return{field:G,title:H.title||G||"未命名",visible:te?te.visible:H.visible!==!1,fixed:(te==null?void 0:te.fixed)||H.fixed||void 0,width:(te==null?void 0:te.width)||H.renderWidth||void 0,sortNumber:(te==null?void 0:te.sortNumber)??U,visibleLocked:pt,originalIndex:U}});a.value=de,_(),a.value.forEach(H=>{const U=r.value.find(G=>G.fields.includes(H.field));H.groupId=U==null?void 0:U.id})},I=()=>a.value.map(v=>({field:v.field,visible:v.visible,fixed:v.fixed,width:v.width,sortNumber:v.sortNumber})),D=async v=>{const F=n.value;if(!F)return;const P=F.getTableColumn(),R=P.fullColumn||P.tableColumn||F.getColumns(),O=R.filter(U=>x(U)),K=R.filter(U=>!x(U)),oe=new Map(v.map(U=>[U.field,U])),de=K.map(U=>{const G=oe.get(U.field);return G&&(U.visible=G.visible,U.fixed=G.fixed||"",G.width&&(U.width=G.width)),{column:U,sortNumber:(G==null?void 0:G.sortNumber)??9999}}).sort((U,G)=>U.sortNumber-G.sortNumber).map(U=>U.column),H=[...O,...de];await F.loadColumn(H)};return{allColumns:a,columnGroups:r,originalOrder:u,filteredColumns:c,selectedColumns:h,selectedCount:f,leftFixedCount:y,rightFixedCount:B,totalFixedCount:k,selectAll:w,isIndeterminate:m,canFixLeft:p,canFixRight:b,initColumns:g,buildCurrentConfig:I,applyConfigToTable:D,loadStoredConfig:async()=>{const v=n.value;if(!v||!v.id)return;E();const F=ge(v.id,s.value);!F||!F.columns.length||await D(F.columns)},saveAndApply:async()=>{const v=n.value;if(!v||!v.id)throw new Error("表格实例不存在或未设置 ID");const F=I();await D(F),Ie(v.id,s.value,F)},resetToDefault:async()=>{const v=n.value;!v||!v.id||(xl(v.id,s.value),d.value.length?await v.reloadColumn(Y.cloneDeep(d.value)):await v.refreshColumn(),g())},onResizableChange:v=>{const F=n.value;if(!F||!F.id)return;const{column:P}=v,R=P.field,O=P.renderWidth;if(!R||!O)return;const K=a.value.find(oe=>oe.field===R);K&&(K.width=O),wl(F.id,s.value,R,O,I())},checkHasStoredConfig:()=>{const v=n.value;return!v||!v.id?!1:kl(v.id,s.value)},updateSelectedOrder:v=>{v.forEach((F,P)=>{const R=a.value.find(O=>O.field===F.field);R&&(R.sortNumber=P)})},onSelectAllChange:v=>{a.value.forEach(F=>{F.visibleLocked||(F.visible=v)})},onColumnVisibleChange:v=>{!v.visible&&v.fixed&&(v.fixed=void 0)},onDragEnd:()=>{h.value.forEach((v,F)=>{v.sortNumber=F})},moveToTop:(v,F)=>{var O;if(F===0)return;const R=((O=a.value.filter(K=>K.visible).sort((K,oe)=>K.sortNumber-oe.sortNumber)[0])==null?void 0:O.sortNumber)??0;v.sortNumber=R-1},removeFromSelected:v=>v.visibleLocked?!1:(v.visible=!1,v.fixed&&(v.fixed=void 0),!0),toggleFixed:(v,F)=>v.fixed===F?(v.fixed=void 0,!0):F==="left"&&!p(v)||F==="right"&&!b(v)?!1:(v.fixed=F,!0),onGroupSelectChange:(v,F)=>{const P=r.value.find(R=>R.id===v);P&&a.value.forEach(R=>{P.fields.includes(R.field)&&!R.visibleLocked&&(R.visible=F)})},getGroupCheckState:v=>{const F=r.value.find(O=>O.id===v);if(!F)return{checked:!1,indeterminate:!1};const P=a.value.filter(O=>F.fields.includes(O.field)&&!O.visibleLocked);if(P.length===0)return{checked:!0,indeterminate:!1};const R=P.filter(O=>O.visible).length;return{checked:R===P.length,indeterminate:R>0&&R<P.length}}}}const Sl={class:"toolbar-column-config"},_l={class:"column-config-body"},Vl={class:"column-list-left"},Nl={class:"left-header"},Al={class:"column-grid-wrapper"},Bl={class:"group-header"},Fl={class:"group-title"},Il={class:"group-count"},zl={class:"column-grid"},$l=["title"],Ml={key:0,class:"vxe-icon-lock lock-icon"},Tl={class:"column-list-right"},Dl={class:"right-header"},Ll={class:"selected-list-wrapper"},Ol={class:"selected-item"},Rl={class:"index"},jl=["title"],Pl={class:"item-actions"},ql=["onClick"],Ul=["onClick"],Ql=["onClick"],Kl=["onClick"],Jl={class:"drawer-footer"},Hl={class:"footer-right"},Wl=e.defineComponent({name:"JcColumnConfig",__name:"index",props:{table:{type:Object,default:null},itemWidth:{type:Number,default:110},drawerWidth:{type:String,default:"720px"},maxFixedCount:{type:Number,default:4},lockFieldList:{type:Array,default:()=>[]},storagePrefix:{type:String,default:Cl},columnGroups:{type:Array,default:()=>[]}},emits:["change","saved","reset","width-change"],setup(t,{expose:n,emit:l}){const i=t,s=l,o=El({table:e.toRef(i,"table"),lockFieldList:e.toRef(i,"lockFieldList"),maxFixedCount:e.toRef(i,"maxFixedCount"),storagePrefix:e.toRef(i,"storagePrefix"),columnGroupsConfig:e.toRef(i,"columnGroups")}),a=e.ref(!1),r=e.ref(""),u=e.computed(()=>{const E=o.filteredColumns.value;if(!r.value)return E;const g=r.value.toLowerCase();return E.filter(I=>(I.title||I.field||"").toLowerCase().includes(g))}),d=e.computed(()=>o.columnGroups.value.map(E=>({...E,columns:u.value.filter(g=>g.groupId===E.id),checkState:o.getGroupCheckState(E.id)})).filter(E=>E.columns.length>0)),c=(E,g)=>{o.onGroupSelectChange(E,g)};e.watch(()=>i.table,async E=>{E&&E.id&&(await e.nextTick(),await b())},{immediate:!0});const h=()=>{if(!i.table){A.ElMessage.warning("表格实例未就绪");return}o.initColumns(),a.value=!0},f=()=>{a.value=!1},y=()=>{a.value=!1},B=E=>{o.onSelectAllChange(E)},k=(E,g)=>{o.toggleFixed(E,g)||A.ElMessage.warning(`最多只能固定 ${i.maxFixedCount} 列`)},w=E=>{o.removeFromSelected(E)||A.ElMessage.warning("该列不能取消选中")},m=async()=>{try{await o.saveAndApply(),s("saved",o.allColumns.value),A.ElMessage.success("列配置已保存并应用"),a.value=!1}catch(E){console.error("保存列配置失败:",E),A.ElMessage.error("保存列配置失败")}},p=async()=>{try{await A.ElMessageBox.confirm("确定要恢复默认配置吗?(包括可见、固定、排序、列宽)。","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}),await o.resetToDefault(),s("reset"),A.ElMessage.success("已恢复默认配置")}catch{}},b=async()=>{await o.loadStoredConfig()};return n({openDrawer:h,closeDrawer:f,loadStoredConfig:b,resetToDefault:p,saveAndApply:m,onResizableChange:E=>{o.onResizableChange(E);const g=E.column.field,I=E.column.renderWidth;g&&I&&s("width-change",{field:g,width:I})},hasStoredConfig:()=>o.checkHasStoredConfig()}),(E,g)=>{const I=e.resolveComponent("el-icon"),D=e.resolveComponent("el-button"),V=e.resolveComponent("el-input"),L=e.resolveComponent("el-checkbox"),T=e.resolveComponent("el-tooltip"),q=e.resolveComponent("el-drawer");return e.openBlock(),e.createElementBlock("div",Sl,[e.createVNode(D,{link:"",class:"config-trigger-btn",onClick:h},{default:e.withCtx(()=>[e.createVNode(I,{size:16},{default:e.withCtx(()=>[e.createVNode(e.unref(ee.Setting))]),_:1})]),_:1}),e.createVNode(q,{modelValue:a.value,"onUpdate:modelValue":g[1]||(g[1]=z=>a.value=z),title:"列配置",direction:"rtl",size:t.drawerWidth,"close-on-click-modal":!1,class:"column-config-drawer"},{header:e.withCtx(()=>g[2]||(g[2]=[e.createElementVNode("div",{class:"drawer-header"},[e.createElementVNode("span",{class:"drawer-title"},"列配置")],-1)])),footer:e.withCtx(()=>[e.createElementVNode("div",Jl,[e.createVNode(D,{onClick:p},{default:e.withCtx(()=>g[9]||(g[9]=[e.createTextVNode("恢复默认")])),_:1,__:[9]}),e.createElementVNode("div",Hl,[e.createVNode(D,{onClick:y},{default:e.withCtx(()=>g[10]||(g[10]=[e.createTextVNode("取消")])),_:1,__:[10]}),e.createVNode(D,{type:"primary",onClick:m},{default:e.withCtx(()=>g[11]||(g[11]=[e.createTextVNode("保存并应用")])),_:1,__:[11]})])])]),default:e.withCtx(()=>[e.createElementVNode("div",_l,[e.createElementVNode("div",Vl,[e.createElementVNode("div",Nl,[e.createVNode(V,{modelValue:r.value,"onUpdate:modelValue":g[0]||(g[0]=z=>r.value=z),placeholder:"搜索",clearable:"","prefix-icon":e.unref(ee.Search),size:"small"},null,8,["modelValue","prefix-icon"]),e.createVNode(L,{"model-value":e.unref(o).selectAll.value,indeterminate:e.unref(o).isIndeterminate.value,class:"select-all-checkbox",onChange:B},{default:e.withCtx(()=>g[3]||(g[3]=[e.createTextVNode(" 全选 ")])),_:1,__:[3]},8,["model-value","indeterminate"])]),e.createElementVNode("div",Al,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,z=>(e.openBlock(),e.createElementBlock("div",{key:z.id,class:"column-group"},[e.createElementVNode("div",Bl,[e.createVNode(L,{"model-value":z.checkState.checked,indeterminate:z.checkState.indeterminate,onChange:C=>c(z.id,C),size:"small"},{default:e.withCtx(()=>[e.createElementVNode("span",Fl,e.toDisplayString(z.title),1),e.createElementVNode("span",Il,"("+e.toDisplayString(z.columns.length)+")",1)]),_:2},1032,["model-value","indeterminate","onChange"])]),e.createElementVNode("div",zl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(z.columns,C=>(e.openBlock(),e.createElementBlock("div",{key:C.field,class:"column-checkbox-item",style:e.normalizeStyle({width:t.itemWidth+"px"})},[e.createVNode(L,{modelValue:C.visible,"onUpdate:modelValue":S=>C.visible=S,disabled:C.visibleLocked,onChange:S=>e.unref(o).onColumnVisibleChange(C),size:"small"},{default:e.withCtx(()=>[e.createElementVNode("span",{class:"column-title",title:C.title},[e.createTextVNode(e.toDisplayString(C.title||C.field)+" ",1),C.visibleLocked?(e.openBlock(),e.createElementBlock("i",Ml)):e.createCommentVNode("",!0)],8,$l)]),_:2},1032,["modelValue","onUpdate:modelValue","disabled","onChange"])],4))),128))])]))),128))])]),e.createElementVNode("div",Tl,[e.createElementVNode("div",Dl,[e.createElementVNode("span",null,"已选("+e.toDisplayString(e.unref(o).selectedCount.value)+")",1),g[4]||(g[4]=e.createElementVNode("span",{class:"drag-hint"},"编号可拖拽排序",-1))]),e.createElementVNode("div",Ll,[e.createVNode(e.unref(gt),{"item-key":"field",animation:200,"ghost-class":"ghost-item","model-value":e.unref(o).selectedColumns.value,"onUpdate:modelValue":e.unref(o).updateSelectedOrder,onEnd:e.unref(o).onDragEnd},{item:e.withCtx(({element:z,index:C})=>[e.createElementVNode("div",Ol,[e.createElementVNode("span",Rl,e.toDisplayString(C+1),1),e.createElementVNode("span",{class:"title",title:z.title},e.toDisplayString(z.title||z.field),9,jl),e.createElementVNode("div",Pl,[e.createVNode(T,{content:"取消选中",placement:"top","show-after":500,disabled:z.visibleLocked},{default:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass(["action-btn remove-btn",{"is-hidden":z.visibleLocked}]),onClick:S=>!z.visibleLocked&&w(z)},g[5]||(g[5]=[e.createElementVNode("i",{class:"vxe-icon-close"},null,-1)]),10,ql)]),_:2},1032,["disabled"]),e.createVNode(T,{content:"置顶",placement:"top","show-after":500,disabled:C===0},{default:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass(["action-btn",{"is-hidden":C===0}]),onClick:S=>C!==0&&e.unref(o).moveToTop(z,C)},g[6]||(g[6]=[e.createElementVNode("i",{class:"vxe-icon-caret-up"},null,-1)]),10,Ul)]),_:2},1032,["disabled"]),e.createVNode(T,{content:"固定到左侧",placement:"top","show-after":500},{default:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass(["fixed-btn",{"is-active":z.fixed==="left","is-disabled":!e.unref(o).canFixLeft(z)}]),onClick:S=>k(z,"left")},g[7]||(g[7]=[e.createElementVNode("i",{class:"vxe-icon-fixed-left"},null,-1)]),10,Ql)]),_:2},1024),e.createVNode(T,{content:"固定到右侧",placement:"top","show-after":500},{default:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass(["fixed-btn",{"is-active":z.fixed==="right","is-disabled":!e.unref(o).canFixRight(z)}]),onClick:S=>k(z,"right")},g[8]||(g[8]=[e.createElementVNode("i",{class:"vxe-icon-fixed-right"},null,-1)]),10,Kl)]),_:2},1024)])])]),_:1},8,["model-value","onUpdate:modelValue","onEnd"])])])])]),_:1},8,["modelValue","size"])])}}}),Gl=Me(Wl,[["__scopeId","data-v-a067f6d1"]]),mt=ne(Gl),Yl=Object.freeze(Object.defineProperty({__proto__:null,JcCascader:st,JcColumnConfig:mt,JcDatePicker:ot,JcImportButton:ht,JcImportDialog:ft,JcInputComplex:at,JcInputSwitch:rt,JcListLayout:dt,JcMoreQueryContain:ct,JcSelectQuery:it,JcTagQuery:ut},Symbol.toStringTag,{value:"Module"})),Xl=(t={},n="jc-query-injection-key")=>{t.resetCount=0;const l=Y.cloneDeep(t),i=e.reactive({queryForm:l,tags:[]}),{useProvideQueryStore:s}=ue(n),{state:o,setQuery:a,addTag:r,reduceTag:u,reduceAllTag:d,clearQuery:c}=s(i),h=()=>{o.queryForm.resetCount++,c(t)};return{queryForm:o.queryForm,setQuery:a,addTag:r,reduceTag:u,reduceAllTag:d,clearQuery:h}},Zl={install:t=>{for(const n of Object.values(Yl))t.use(n)}};exports.JcCascader=st;exports.JcColumnConfig=mt;exports.JcDatePicker=ot;exports.JcImportButton=ht;exports.JcImportDialog=ft;exports.JcInputComplex=at;exports.JcInputSwitch=rt;exports.JcListLayout=dt;exports.JcMoreQueryContain=ct;exports.JcSelectQuery=it;exports.JcTagQuery=ut;exports.default=Zl;exports.reactiveQuery=Xl;
|
|
1
|
+
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const e=require("vue"),G=require("lodash-es"),bt=require("@vueuse/shared"),Z=require("@element-plus/icons-vue"),A=require("element-plus");require("element-plus/es/components/select/style/index"),require("element-plus/es/components/option/style/index"),require("element-plus/es/components/checkbox-group/style/index"),require("element-plus/es/components/checkbox/style/index"),require("element-plus/es/components/button/style/index"),require("element-plus/es/components/input/style/index"),require("element-plus/es/components/icon/style/index"),require("element-plus/es/components/popover/style/index"),require("element-plus/es/components/message/style/index"),require("element-plus/es/components/tag/style/index"),require("element-plus/es/components/tooltip/style/index"),require("element-plus/es/components/card/style/index"),require("element-plus/es/components/loading/style/index"),require("element-plus/es/components/message-box/style/index");const xt=require("vuedraggable");function wt(t){const n=Object.create(null);return function(i){return n[i]||(n[i]=t(i))}}const Je=wt(function(t){return t===null?"":t.replace(/(\s*)/g,"")});function kt(t){const n=Object.prototype.toString.call(t);return Je(n).replace(/(\[|object|\])/g,"")}function Q(t){const n=kt(t);let l;switch(n){case"String":l=!Je(t);break;case"Number":l=G.isNil(t);break;case"Boolean":l=G.isNil(t);break;case"Array":case"Object":case"Map":case"Set":l=G.isEmpty(t);break;default:l=!0;break}return l}function Et(){var t=window.navigator.userAgent,n=t.indexOf("MSIE ");if(n>0)return parseInt(t.substring(n+5,t.indexOf(".",n)),10);var l=t.indexOf("Trident/");if(l>0){var i=t.indexOf("rv:");return parseInt(t.substring(i+3,t.indexOf(".",i)),10)}var s=t.indexOf("Edge/");return s>0?parseInt(t.substring(s+5,t.indexOf(".",s)),10):-1}let me;function Ee(){Ee.init||(Ee.init=!0,me=Et()!==-1)}var Ce={name:"ResizeObserver",props:{emitOnMount:{type:Boolean,default:!1},ignoreWidth:{type:Boolean,default:!1},ignoreHeight:{type:Boolean,default:!1}},emits:["notify"],mounted(){Ee(),e.nextTick(()=>{this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitOnMount&&this.emitSize()});const t=document.createElement("object");this._resizeObject=t,t.setAttribute("aria-hidden","true"),t.setAttribute("tabindex",-1),t.onload=this.addResizeHandlers,t.type="text/html",me&&this.$el.appendChild(t),t.data="about:blank",me||this.$el.appendChild(t)},beforeUnmount(){this.removeResizeHandlers()},methods:{compareAndNotify(){(!this.ignoreWidth&&this._w!==this.$el.offsetWidth||!this.ignoreHeight&&this._h!==this.$el.offsetHeight)&&(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.emitSize())},emitSize(){this.$emit("notify",{width:this._w,height:this._h})},addResizeHandlers(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers(){this._resizeObject&&this._resizeObject.onload&&(!me&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),this.$el.removeChild(this._resizeObject),this._resizeObject.onload=null,this._resizeObject=null)}}};const St=e.withScopeId("data-v-b329ee4c");e.pushScopeId("data-v-b329ee4c");const _t={class:"resize-observer",tabindex:"-1"};e.popScopeId();const Vt=St((t,n,l,i,s,o)=>(e.openBlock(),e.createBlock("div",_t)));Ce.render=Vt;Ce.__scopeId="data-v-b329ee4c";Ce.__file="src/components/ResizeObserver.vue";function pe(t){"@babel/helpers - typeof";return typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?pe=function(n){return typeof n}:pe=function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},pe(t)}function Nt(t,n){if(!(t instanceof n))throw new TypeError("Cannot call a class as a function")}function At(t,n){for(var l=0;l<n.length;l++){var i=n[l];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function Ft(t,n,l){return n&&At(t.prototype,n),t}function Re(t){return Bt(t)||It(t)||zt(t)||$t()}function Bt(t){if(Array.isArray(t))return Se(t)}function It(t){if(typeof Symbol<"u"&&Symbol.iterator in Object(t))return Array.from(t)}function zt(t,n){if(t){if(typeof t=="string")return Se(t,n);var l=Object.prototype.toString.call(t).slice(8,-1);if(l==="Object"&&t.constructor&&(l=t.constructor.name),l==="Map"||l==="Set")return Array.from(t);if(l==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(l))return Se(t,n)}}function Se(t,n){(n==null||n>t.length)&&(n=t.length);for(var l=0,i=new Array(n);l<n;l++)i[l]=t[l];return i}function $t(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
2
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Mt(t){var n;return typeof t=="function"?n={callback:t}:n=t,n}function Tt(t,n){var l=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},i,s,o,a=function(c){for(var d=arguments.length,u=new Array(d>1?d-1:0),v=1;v<d;v++)u[v-1]=arguments[v];if(o=u,!(i&&c===s)){var f=l.leading;typeof f=="function"&&(f=f(c,s)),(!i||c!==s)&&f&&t.apply(void 0,[c].concat(Re(o))),s=c,clearTimeout(i),i=setTimeout(function(){t.apply(void 0,[c].concat(Re(o))),i=0},n)}};return a._clear=function(){clearTimeout(i),i=null},a}function He(t,n){if(t===n)return!0;if(pe(t)==="object"){for(var l in t)if(!He(t[l],n[l]))return!1;return!0}return!1}var Dt=function(){function t(n,l,i){Nt(this,t),this.el=n,this.observer=null,this.frozen=!1,this.createObserver(l,i)}return Ft(t,[{key:"createObserver",value:function(l,i){var s=this;if(this.observer&&this.destroyObserver(),!this.frozen){if(this.options=Mt(l),this.callback=function(r,c){s.options.callback(r,c),r&&s.options.once&&(s.frozen=!0,s.destroyObserver())},this.callback&&this.options.throttle){var o=this.options.throttleOptions||{},a=o.leading;this.callback=Tt(this.callback,this.options.throttle,{leading:function(c){return a==="both"||a==="visible"&&c||a==="hidden"&&!c}})}this.oldResult=void 0,this.observer=new IntersectionObserver(function(r){var c=r[0];if(r.length>1){var d=r.find(function(v){return v.isIntersecting});d&&(c=d)}if(s.callback){var u=c.isIntersecting&&c.intersectionRatio>=s.threshold;if(u===s.oldResult)return;s.oldResult=u,s.callback(u,c)}},this.options.intersection),e.nextTick(function(){s.observer&&s.observer.observe(s.el)})}}},{key:"destroyObserver",value:function(){this.observer&&(this.observer.disconnect(),this.observer=null),this.callback&&this.callback._clear&&(this.callback._clear(),this.callback=null)}},{key:"threshold",get:function(){return this.options.intersection&&typeof this.options.intersection.threshold=="number"?this.options.intersection.threshold:0}}]),t}();function We(t,n,l){var i=n.value;if(i)if(typeof IntersectionObserver>"u")console.warn("[vue-observe-visibility] IntersectionObserver API is not available in your browser. Please install this polyfill: https://github.com/w3c/IntersectionObserver/tree/master/polyfill");else{var s=new Dt(t,i,l);t._vue_visibilityState=s}}function Lt(t,n,l){var i=n.value,s=n.oldValue;if(!He(i,s)){var o=t._vue_visibilityState;if(!i){Ge(t);return}o?o.createObserver(i,l):We(t,{value:i},l)}}function Ge(t){var n=t._vue_visibilityState;n&&(n.destroyObserver(),delete t._vue_visibilityState)}var Ot={beforeMount:We,updated:Lt,unmounted:Ge},Rt={itemsLimit:1e3},jt=/(auto|scroll)/;function Ye(t,n){return t.parentNode===null?n:Ye(t.parentNode,n.concat([t]))}var we=function(n,l){return getComputedStyle(n,null).getPropertyValue(l)},Pt=function(n){return we(n,"overflow")+we(n,"overflow-y")+we(n,"overflow-x")},qt=function(n){return jt.test(Pt(n))};function je(t){if(t instanceof HTMLElement||t instanceof SVGElement){for(var n=Ye(t.parentNode,[]),l=0;l<n.length;l+=1)if(qt(n[l]))return n[l];return document.scrollingElement||document.documentElement}}function _e(t){"@babel/helpers - typeof";return _e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(n){return typeof n}:function(n){return n&&typeof Symbol=="function"&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n},_e(t)}var Ut={items:{type:Array,required:!0},keyField:{type:String,default:"id"},direction:{type:String,default:"vertical",validator:function(n){return["vertical","horizontal"].includes(n)}},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"}};function Qt(){return this.items.length&&_e(this.items[0])!=="object"}var Ve=!1;if(typeof window<"u"){Ve=!1;try{var Kt=Object.defineProperty({},"passive",{get:function(){Ve=!0}});window.addEventListener("test",null,Kt)}catch{}}let Jt=0;var Te={name:"RecycleScroller",components:{ResizeObserver:Ce},directives:{ObserveVisibility:Ot},props:{...Ut,itemSize:{type:Number,default:null},gridItems:{type:Number,default:void 0},itemSecondarySize:{type:Number,default:void 0},minItemSize:{type:[Number,String],default:null},sizeField:{type:String,default:"size"},typeField:{type:String,default:"type"},buffer:{type:Number,default:200},pageMode:{type:Boolean,default:!1},prerender:{type:Number,default:0},emitUpdate:{type:Boolean,default:!1},updateInterval:{type:Number,default:0},skipHover:{type:Boolean,default:!1},listTag:{type:String,default:"div"},itemTag:{type:String,default:"div"},listClass:{type:[String,Object,Array],default:""},itemClass:{type:[String,Object,Array],default:""}},emits:["resize","visible","hidden","update","scroll-start","scroll-end"],data(){return{pool:[],totalSize:0,ready:!1,hoverKey:null}},computed:{sizes(){if(this.itemSize===null){const t={"-1":{accumulator:0}},n=this.items,l=this.sizeField,i=this.minItemSize;let s=1e4,o=0,a;for(let r=0,c=n.length;r<c;r++)a=n[r][l]||i,a<s&&(s=a),o+=a,t[r]={accumulator:o,size:a};return this.$_computedMinItemSize=s,t}return[]},simpleArray:Qt,itemIndexByKey(){const{keyField:t,items:n}=this,l={};for(let i=0,s=n.length;i<s;i++)l[n[i][t]]=i;return l}},watch:{items(){this.updateVisibleItems(!0)},pageMode(){this.applyPageMode(),this.updateVisibleItems(!1)},sizes:{handler(){this.updateVisibleItems(!1)},deep:!0},gridItems(){this.updateVisibleItems(!0)},itemSecondarySize(){this.updateVisibleItems(!0)}},created(){this.$_startIndex=0,this.$_endIndex=0,this.$_views=new Map,this.$_unusedViews=new Map,this.$_scrollDirty=!1,this.$_lastUpdateScrollPosition=0,this.prerender&&(this.$_prerender=!0,this.updateVisibleItems(!1)),this.gridItems&&!this.itemSize&&console.error("[vue-recycle-scroller] You must provide an itemSize when using gridItems")},mounted(){this.applyPageMode(),this.$nextTick(()=>{this.$_prerender=!1,this.updateVisibleItems(!0),this.ready=!0})},activated(){const t=this.$_lastUpdateScrollPosition;typeof t=="number"&&this.$nextTick(()=>{this.scrollToPosition(t)})},beforeUnmount(){this.removeListeners()},methods:{addView(t,n,l,i,s){const o=e.markRaw({id:Jt++,index:n,used:!0,key:i,type:s}),a=e.shallowReactive({item:l,position:0,nr:o});return t.push(a),a},unuseView(t,n=!1){const l=this.$_unusedViews,i=t.nr.type;let s=l.get(i);s||(s=[],l.set(i,s)),s.push(t),n||(t.nr.used=!1,t.position=-9999)},handleResize(){this.$emit("resize"),this.ready&&this.updateVisibleItems(!1)},handleScroll(t){if(!this.$_scrollDirty){if(this.$_scrollDirty=!0,this.$_updateTimeout)return;const n=()=>requestAnimationFrame(()=>{this.$_scrollDirty=!1;const{continuous:l}=this.updateVisibleItems(!1,!0);l||(clearTimeout(this.$_refreshTimout),this.$_refreshTimout=setTimeout(this.handleScroll,this.updateInterval+100))});n(),this.updateInterval&&(this.$_updateTimeout=setTimeout(()=>{this.$_updateTimeout=0,this.$_scrollDirty&&n()},this.updateInterval))}},handleVisibilityChange(t,n){this.ready&&(t||n.boundingClientRect.width!==0||n.boundingClientRect.height!==0?(this.$emit("visible"),requestAnimationFrame(()=>{this.updateVisibleItems(!1)})):this.$emit("hidden"))},updateVisibleItems(t,n=!1){const l=this.itemSize,i=this.gridItems||1,s=this.itemSecondarySize||l,o=this.$_computedMinItemSize,a=this.typeField,r=this.simpleArray?null:this.keyField,c=this.items,d=c.length,u=this.sizes,v=this.$_views,f=this.$_unusedViews,y=this.pool,F=this.itemIndexByKey;let E,b,m,p,x;if(!d)E=b=p=x=m=0;else if(this.$_prerender)E=p=0,b=x=Math.min(this.prerender,c.length),m=null;else{const V=this.getScroll();if(n){let U=V.start-this.$_lastUpdateScrollPosition;if(U<0&&(U=-U),l===null&&U<o||U<l)return{continuous:!0}}this.$_lastUpdateScrollPosition=V.start;const D=this.buffer;V.start-=D,V.end+=D;let T=0;if(this.$refs.before&&(T=this.$refs.before.scrollHeight,V.start-=T),this.$refs.after){const U=this.$refs.after.scrollHeight;V.end+=U}if(l===null){let U,I=0,C=d-1,_=~~(d/2),N;do N=_,U=u[_].accumulator,U<V.start?I=_:_<d-1&&u[_+1].accumulator>V.start&&(C=_),_=~~((I+C)/2);while(_!==N);for(_<0&&(_=0),E=_,m=u[d-1].accumulator,b=_;b<d&&u[b].accumulator<V.end;b++);for(b===-1?b=c.length-1:(b++,b>d&&(b=d)),p=E;p<d&&T+u[p].accumulator<V.start;p++);for(x=p;x<d&&T+u[x].accumulator<V.end;x++);}else{E=~~(V.start/l*i);const U=E%i;E-=U,b=Math.ceil(V.end/l*i),p=Math.max(0,Math.floor((V.start-T)/l*i)),x=Math.floor((V.end-T)/l*i),E<0&&(E=0),b>d&&(b=d),p<0&&(p=0),x>d&&(x=d),m=Math.ceil(d/i)*l}}b-E>Rt.itemsLimit&&this.itemsLimitError(),this.totalSize=m;let w;const k=E<=this.$_endIndex&&b>=this.$_startIndex;if(k)for(let V=0,D=y.length;V<D;V++)w=y[V],w.nr.used&&(t&&(w.nr.index=F[w.item[r]]),(w.nr.index==null||w.nr.index<E||w.nr.index>=b)&&this.unuseView(w));const S=k?null:new Map;let g,z,L;for(let V=E;V<b;V++){g=c[V];const D=r?g[r]:g;if(D==null)throw new Error(`Key is ${D} on item (keyField is '${r}')`);if(w=v.get(D),!l&&!u[V].size){w&&this.unuseView(w);continue}z=g[a];let T=f.get(z),U=!1;if(!w)k?T&&T.length?w=T.pop():w=this.addView(y,V,g,D,z):(L=S.get(z)||0,(!T||L>=T.length)&&(w=this.addView(y,V,g,D,z),this.unuseView(w,!0),T=f.get(z)),w=T[L],S.set(z,L+1)),v.delete(w.nr.key),w.nr.used=!0,w.nr.index=V,w.nr.key=D,w.nr.type=z,v.set(D,w),U=!0;else if(!w.nr.used&&(w.nr.used=!0,U=!0,T)){const I=T.indexOf(w);I!==-1&&T.splice(I,1)}w.item=g,U&&(V===c.length-1&&this.$emit("scroll-end"),V===0&&this.$emit("scroll-start")),l===null?(w.position=u[V-1].accumulator,w.offset=0):(w.position=Math.floor(V/i)*l,w.offset=V%i*s)}return this.$_startIndex=E,this.$_endIndex=b,this.emitUpdate&&this.$emit("update",E,b,p,x),clearTimeout(this.$_sortTimer),this.$_sortTimer=setTimeout(this.sortViews,this.updateInterval+300),{continuous:k}},getListenerTarget(){let t=je(this.$el);return window.document&&(t===window.document.documentElement||t===window.document.body)&&(t=window),t},getScroll(){const{$el:t,direction:n}=this,l=n==="vertical";let i;if(this.pageMode){const s=t.getBoundingClientRect(),o=l?s.height:s.width;let a=-(l?s.top:s.left),r=l?window.innerHeight:window.innerWidth;a<0&&(r+=a,a=0),a+r>o&&(r=o-a),i={start:a,end:a+r}}else l?i={start:t.scrollTop,end:t.scrollTop+t.clientHeight}:i={start:t.scrollLeft,end:t.scrollLeft+t.clientWidth};return i},applyPageMode(){this.pageMode?this.addListeners():this.removeListeners()},addListeners(){this.listenerTarget=this.getListenerTarget(),this.listenerTarget.addEventListener("scroll",this.handleScroll,Ve?{passive:!0}:!1),this.listenerTarget.addEventListener("resize",this.handleResize)},removeListeners(){this.listenerTarget&&(this.listenerTarget.removeEventListener("scroll",this.handleScroll),this.listenerTarget.removeEventListener("resize",this.handleResize),this.listenerTarget=null)},scrollToItem(t){let n;const l=this.gridItems||1;this.itemSize===null?n=t>0?this.sizes[t-1].accumulator:0:n=Math.floor(t/l)*this.itemSize,this.scrollToPosition(n)},scrollToPosition(t){const n=this.direction==="vertical"?{scroll:"scrollTop",start:"top"}:{scroll:"scrollLeft",start:"left"};let l,i,s;if(this.pageMode){const o=je(this.$el),a=o.tagName==="HTML"?0:o[n.scroll],r=o.getBoundingClientRect(),d=this.$el.getBoundingClientRect()[n.start]-r[n.start];l=o,i=n.scroll,s=t+a+d}else l=this.$el,i=n.scroll,s=t;l[i]=s},itemsLimitError(){throw setTimeout(()=>{console.log("It seems the scroller element isn't scrolling, so it tries to render all the items at once.","Scroller:",this.$el),console.log("Make sure the scroller has a fixed height (or width) and 'overflow-y' (or 'overflow-x') set to 'auto' so it can scroll correctly and only render the items visible in the scroll viewport.")}),new Error("Rendered items limit reached")},sortViews(){this.pool.sort((t,n)=>t.nr.index-n.nr.index)}}};const Ht={key:0,ref:"before",class:"vue-recycle-scroller__slot"},Wt={key:1,ref:"after",class:"vue-recycle-scroller__slot"};function Gt(t,n,l,i,s,o){const a=e.resolveComponent("ResizeObserver"),r=e.resolveDirective("observe-visibility");return e.withDirectives((e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["vue-recycle-scroller",{ready:s.ready,"page-mode":l.pageMode,[`direction-${t.direction}`]:!0}]),onScrollPassive:n[0]||(n[0]=(...c)=>o.handleScroll&&o.handleScroll(...c))},[t.$slots.before?(e.openBlock(),e.createElementBlock("div",Ht,[e.renderSlot(t.$slots,"before")],512)):e.createCommentVNode("v-if",!0),(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.listTag),{ref:"wrapper",style:e.normalizeStyle({[t.direction==="vertical"?"minHeight":"minWidth"]:s.totalSize+"px"}),class:e.normalizeClass(["vue-recycle-scroller__item-wrapper",l.listClass])},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(s.pool,c=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(l.itemTag),e.mergeProps({key:c.nr.id,style:s.ready?{transform:`translate${t.direction==="vertical"?"Y":"X"}(${c.position}px) translate${t.direction==="vertical"?"X":"Y"}(${c.offset}px)`,width:l.gridItems?`${t.direction==="vertical"&&l.itemSecondarySize||l.itemSize}px`:void 0,height:l.gridItems?`${t.direction==="horizontal"&&l.itemSecondarySize||l.itemSize}px`:void 0}:null,class:["vue-recycle-scroller__item-view",[l.itemClass,{hover:!l.skipHover&&s.hoverKey===c.nr.key}]]},e.toHandlers(l.skipHover?{}:{mouseenter:()=>{s.hoverKey=c.nr.key},mouseleave:()=>{s.hoverKey=null}})),{default:e.withCtx(()=>[e.renderSlot(t.$slots,"default",{item:c.item,index:c.nr.index,active:c.nr.used})]),_:2},1040,["style","class"]))),128)),e.renderSlot(t.$slots,"empty")]),_:3},8,["style","class"])),t.$slots.after?(e.openBlock(),e.createElementBlock("div",Wt,[e.renderSlot(t.$slots,"after")],512)):e.createCommentVNode("v-if",!0),e.createVNode(a,{onNotify:o.handleResize},null,8,["onNotify"])],34)),[[r,o.handleVisibilityChange]])}Te.render=Gt;Te.__file="src/components/RecycleScroller.vue";function ie(t){return Array.isArray?Array.isArray(t):et(t)==="[object Array]"}function Yt(t){if(typeof t=="string")return t;let n=t+"";return n=="0"&&1/t==-1/0?"-0":n}function Xt(t){return t==null?"":Yt(t)}function ne(t){return typeof t=="string"}function Xe(t){return typeof t=="number"}function Zt(t){return t===!0||t===!1||en(t)&&et(t)=="[object Boolean]"}function Ze(t){return typeof t=="object"}function en(t){return Ze(t)&&t!==null}function X(t){return t!=null}function ke(t){return!t.trim().length}function et(t){return t==null?t===void 0?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}const tn="Incorrect 'index' type",nn=t=>`Invalid value for key ${t}`,ln=t=>`Pattern length exceeds max of ${t}.`,sn=t=>`Missing ${t} property in key`,on=t=>`Property 'weight' in key '${t}' must be a positive integer`,Pe=Object.prototype.hasOwnProperty;class rn{constructor(n){this._keys=[],this._keyMap={};let l=0;n.forEach(i=>{let s=tt(i);this._keys.push(s),this._keyMap[s.id]=s,l+=s.weight}),this._keys.forEach(i=>{i.weight/=l})}get(n){return this._keyMap[n]}keys(){return this._keys}toJSON(){return JSON.stringify(this._keys)}}function tt(t){let n=null,l=null,i=null,s=1,o=null;if(ne(t)||ie(t))i=t,n=qe(t),l=Ne(t);else{if(!Pe.call(t,"name"))throw new Error(sn("name"));const a=t.name;if(i=a,Pe.call(t,"weight")&&(s=t.weight,s<=0))throw new Error(on(a));n=qe(a),l=Ne(a),o=t.getFn}return{path:n,id:l,weight:s,src:i,getFn:o}}function qe(t){return ie(t)?t:t.split(".")}function Ne(t){return ie(t)?t.join("."):t}function an(t,n){let l=[],i=!1;const s=(o,a,r)=>{if(X(o))if(!a[r])l.push(o);else{let c=a[r];const d=o[c];if(!X(d))return;if(r===a.length-1&&(ne(d)||Xe(d)||Zt(d)))l.push(Xt(d));else if(ie(d)){i=!0;for(let u=0,v=d.length;u<v;u+=1)s(d[u],a,r+1)}else a.length&&s(d,a,r+1)}};return s(t,ne(n)?n.split("."):n,0),i?l:l[0]}const un={includeMatches:!1,findAllMatches:!1,minMatchCharLength:1},cn={isCaseSensitive:!1,ignoreDiacritics:!1,includeScore:!1,keys:[],shouldSort:!0,sortFn:(t,n)=>t.score===n.score?t.idx<n.idx?-1:1:t.score<n.score?-1:1},dn={location:0,threshold:.6,distance:100},fn={useExtendedSearch:!1,getFn:an,ignoreLocation:!1,ignoreFieldNorm:!1,fieldNormWeight:1};var $={...cn,...un,...dn,...fn};const hn=/[^ ]+/g;function mn(t=1,n=3){const l=new Map,i=Math.pow(10,n);return{get(s){const o=s.match(hn).length;if(l.has(o))return l.get(o);const a=1/Math.pow(o,.5*t),r=parseFloat(Math.round(a*i)/i);return l.set(o,r),r},clear(){l.clear()}}}class De{constructor({getFn:n=$.getFn,fieldNormWeight:l=$.fieldNormWeight}={}){this.norm=mn(l,3),this.getFn=n,this.isCreated=!1,this.setIndexRecords()}setSources(n=[]){this.docs=n}setIndexRecords(n=[]){this.records=n}setKeys(n=[]){this.keys=n,this._keysMap={},n.forEach((l,i)=>{this._keysMap[l.id]=i})}create(){this.isCreated||!this.docs.length||(this.isCreated=!0,ne(this.docs[0])?this.docs.forEach((n,l)=>{this._addString(n,l)}):this.docs.forEach((n,l)=>{this._addObject(n,l)}),this.norm.clear())}add(n){const l=this.size();ne(n)?this._addString(n,l):this._addObject(n,l)}removeAt(n){this.records.splice(n,1);for(let l=n,i=this.size();l<i;l+=1)this.records[l].i-=1}getValueForItemAtKeyId(n,l){return n[this._keysMap[l]]}size(){return this.records.length}_addString(n,l){if(!X(n)||ke(n))return;let i={v:n,i:l,n:this.norm.get(n)};this.records.push(i)}_addObject(n,l){let i={i:l,$:{}};this.keys.forEach((s,o)=>{let a=s.getFn?s.getFn(n):this.getFn(n,s.path);if(X(a)){if(ie(a)){let r=[];const c=[{nestedArrIndex:-1,value:a}];for(;c.length;){const{nestedArrIndex:d,value:u}=c.pop();if(X(u))if(ne(u)&&!ke(u)){let v={v:u,i:d,n:this.norm.get(u)};r.push(v)}else ie(u)&&u.forEach((v,f)=>{c.push({nestedArrIndex:f,value:v})})}i.$[o]=r}else if(ne(a)&&!ke(a)){let r={v:a,n:this.norm.get(a)};i.$[o]=r}}}),this.records.push(i)}toJSON(){return{keys:this.keys,records:this.records}}}function nt(t,n,{getFn:l=$.getFn,fieldNormWeight:i=$.fieldNormWeight}={}){const s=new De({getFn:l,fieldNormWeight:i});return s.setKeys(t.map(tt)),s.setSources(n),s.create(),s}function pn(t,{getFn:n=$.getFn,fieldNormWeight:l=$.fieldNormWeight}={}){const{keys:i,records:s}=t,o=new De({getFn:n,fieldNormWeight:l});return o.setKeys(i),o.setIndexRecords(s),o}function he(t,{errors:n=0,currentLocation:l=0,expectedLocation:i=0,distance:s=$.distance,ignoreLocation:o=$.ignoreLocation}={}){const a=n/t.length;if(o)return a;const r=Math.abs(i-l);return s?a+r/s:r?1:a}function vn(t=[],n=$.minMatchCharLength){let l=[],i=-1,s=-1,o=0;for(let a=t.length;o<a;o+=1){let r=t[o];r&&i===-1?i=o:!r&&i!==-1&&(s=o-1,s-i+1>=n&&l.push([i,s]),i=-1)}return t[o-1]&&o-i>=n&&l.push([i,o-1]),l}const de=32;function gn(t,n,l,{location:i=$.location,distance:s=$.distance,threshold:o=$.threshold,findAllMatches:a=$.findAllMatches,minMatchCharLength:r=$.minMatchCharLength,includeMatches:c=$.includeMatches,ignoreLocation:d=$.ignoreLocation}={}){if(n.length>de)throw new Error(ln(de));const u=n.length,v=t.length,f=Math.max(0,Math.min(i,v));let y=o,F=f;const E=r>1||c,b=E?Array(v):[];let m;for(;(m=t.indexOf(n,F))>-1;){let g=he(n,{currentLocation:m,expectedLocation:f,distance:s,ignoreLocation:d});if(y=Math.min(g,y),F=m+u,E){let z=0;for(;z<u;)b[m+z]=1,z+=1}}F=-1;let p=[],x=1,w=u+v;const k=1<<u-1;for(let g=0;g<u;g+=1){let z=0,L=w;for(;z<L;)he(n,{errors:g,currentLocation:f+L,expectedLocation:f,distance:s,ignoreLocation:d})<=y?z=L:w=L,L=Math.floor((w-z)/2+z);w=L;let V=Math.max(1,f-L+1),D=a?v:Math.min(f+L,v)+u,T=Array(D+2);T[D+1]=(1<<g)-1;for(let I=D;I>=V;I-=1){let C=I-1,_=l[t.charAt(C)];if(E&&(b[C]=+!!_),T[I]=(T[I+1]<<1|1)&_,g&&(T[I]|=(p[I+1]|p[I])<<1|1|p[I+1]),T[I]&k&&(x=he(n,{errors:g,currentLocation:C,expectedLocation:f,distance:s,ignoreLocation:d}),x<=y)){if(y=x,F=C,F<=f)break;V=Math.max(1,2*f-F)}}if(he(n,{errors:g+1,currentLocation:f,expectedLocation:f,distance:s,ignoreLocation:d})>y)break;p=T}const S={isMatch:F>=0,score:Math.max(.001,x)};if(E){const g=vn(b,r);g.length?c&&(S.indices=g):S.isMatch=!1}return S}function yn(t){let n={};for(let l=0,i=t.length;l<i;l+=1){const s=t.charAt(l);n[s]=(n[s]||0)|1<<i-l-1}return n}const ve=String.prototype.normalize?t=>t.normalize("NFD").replace(/[\u0300-\u036F\u0483-\u0489\u0591-\u05BD\u05BF\u05C1\u05C2\u05C4\u05C5\u05C7\u0610-\u061A\u064B-\u065F\u0670\u06D6-\u06DC\u06DF-\u06E4\u06E7\u06E8\u06EA-\u06ED\u0711\u0730-\u074A\u07A6-\u07B0\u07EB-\u07F3\u07FD\u0816-\u0819\u081B-\u0823\u0825-\u0827\u0829-\u082D\u0859-\u085B\u08D3-\u08E1\u08E3-\u0903\u093A-\u093C\u093E-\u094F\u0951-\u0957\u0962\u0963\u0981-\u0983\u09BC\u09BE-\u09C4\u09C7\u09C8\u09CB-\u09CD\u09D7\u09E2\u09E3\u09FE\u0A01-\u0A03\u0A3C\u0A3E-\u0A42\u0A47\u0A48\u0A4B-\u0A4D\u0A51\u0A70\u0A71\u0A75\u0A81-\u0A83\u0ABC\u0ABE-\u0AC5\u0AC7-\u0AC9\u0ACB-\u0ACD\u0AE2\u0AE3\u0AFA-\u0AFF\u0B01-\u0B03\u0B3C\u0B3E-\u0B44\u0B47\u0B48\u0B4B-\u0B4D\u0B56\u0B57\u0B62\u0B63\u0B82\u0BBE-\u0BC2\u0BC6-\u0BC8\u0BCA-\u0BCD\u0BD7\u0C00-\u0C04\u0C3E-\u0C44\u0C46-\u0C48\u0C4A-\u0C4D\u0C55\u0C56\u0C62\u0C63\u0C81-\u0C83\u0CBC\u0CBE-\u0CC4\u0CC6-\u0CC8\u0CCA-\u0CCD\u0CD5\u0CD6\u0CE2\u0CE3\u0D00-\u0D03\u0D3B\u0D3C\u0D3E-\u0D44\u0D46-\u0D48\u0D4A-\u0D4D\u0D57\u0D62\u0D63\u0D82\u0D83\u0DCA\u0DCF-\u0DD4\u0DD6\u0DD8-\u0DDF\u0DF2\u0DF3\u0E31\u0E34-\u0E3A\u0E47-\u0E4E\u0EB1\u0EB4-\u0EB9\u0EBB\u0EBC\u0EC8-\u0ECD\u0F18\u0F19\u0F35\u0F37\u0F39\u0F3E\u0F3F\u0F71-\u0F84\u0F86\u0F87\u0F8D-\u0F97\u0F99-\u0FBC\u0FC6\u102B-\u103E\u1056-\u1059\u105E-\u1060\u1062-\u1064\u1067-\u106D\u1071-\u1074\u1082-\u108D\u108F\u109A-\u109D\u135D-\u135F\u1712-\u1714\u1732-\u1734\u1752\u1753\u1772\u1773\u17B4-\u17D3\u17DD\u180B-\u180D\u1885\u1886\u18A9\u1920-\u192B\u1930-\u193B\u1A17-\u1A1B\u1A55-\u1A5E\u1A60-\u1A7C\u1A7F\u1AB0-\u1ABE\u1B00-\u1B04\u1B34-\u1B44\u1B6B-\u1B73\u1B80-\u1B82\u1BA1-\u1BAD\u1BE6-\u1BF3\u1C24-\u1C37\u1CD0-\u1CD2\u1CD4-\u1CE8\u1CED\u1CF2-\u1CF4\u1CF7-\u1CF9\u1DC0-\u1DF9\u1DFB-\u1DFF\u20D0-\u20F0\u2CEF-\u2CF1\u2D7F\u2DE0-\u2DFF\u302A-\u302F\u3099\u309A\uA66F-\uA672\uA674-\uA67D\uA69E\uA69F\uA6F0\uA6F1\uA802\uA806\uA80B\uA823-\uA827\uA880\uA881\uA8B4-\uA8C5\uA8E0-\uA8F1\uA8FF\uA926-\uA92D\uA947-\uA953\uA980-\uA983\uA9B3-\uA9C0\uA9E5\uAA29-\uAA36\uAA43\uAA4C\uAA4D\uAA7B-\uAA7D\uAAB0\uAAB2-\uAAB4\uAAB7\uAAB8\uAABE\uAABF\uAAC1\uAAEB-\uAAEF\uAAF5\uAAF6\uABE3-\uABEA\uABEC\uABED\uFB1E\uFE00-\uFE0F\uFE20-\uFE2F]/g,""):t=>t;class lt{constructor(n,{location:l=$.location,threshold:i=$.threshold,distance:s=$.distance,includeMatches:o=$.includeMatches,findAllMatches:a=$.findAllMatches,minMatchCharLength:r=$.minMatchCharLength,isCaseSensitive:c=$.isCaseSensitive,ignoreDiacritics:d=$.ignoreDiacritics,ignoreLocation:u=$.ignoreLocation}={}){if(this.options={location:l,threshold:i,distance:s,includeMatches:o,findAllMatches:a,minMatchCharLength:r,isCaseSensitive:c,ignoreDiacritics:d,ignoreLocation:u},n=c?n:n.toLowerCase(),n=d?ve(n):n,this.pattern=n,this.chunks=[],!this.pattern.length)return;const v=(y,F)=>{this.chunks.push({pattern:y,alphabet:yn(y),startIndex:F})},f=this.pattern.length;if(f>de){let y=0;const F=f%de,E=f-F;for(;y<E;)v(this.pattern.substr(y,de),y),y+=de;if(F){const b=f-de;v(this.pattern.substr(b),b)}}else v(this.pattern,0)}searchIn(n){const{isCaseSensitive:l,ignoreDiacritics:i,includeMatches:s}=this.options;if(n=l?n:n.toLowerCase(),n=i?ve(n):n,this.pattern===n){let E={isMatch:!0,score:0};return s&&(E.indices=[[0,n.length-1]]),E}const{location:o,distance:a,threshold:r,findAllMatches:c,minMatchCharLength:d,ignoreLocation:u}=this.options;let v=[],f=0,y=!1;this.chunks.forEach(({pattern:E,alphabet:b,startIndex:m})=>{const{isMatch:p,score:x,indices:w}=gn(n,E,b,{location:o+m,distance:a,threshold:r,findAllMatches:c,minMatchCharLength:d,includeMatches:s,ignoreLocation:u});p&&(y=!0),f+=x,p&&w&&(v=[...v,...w])});let F={isMatch:y,score:y?f/this.chunks.length:1};return y&&s&&(F.indices=v),F}}class re{constructor(n){this.pattern=n}static isMultiMatch(n){return Ue(n,this.multiRegex)}static isSingleMatch(n){return Ue(n,this.singleRegex)}search(){}}function Ue(t,n){const l=t.match(n);return l?l[1]:null}class Cn extends re{constructor(n){super(n)}static get type(){return"exact"}static get multiRegex(){return/^="(.*)"$/}static get singleRegex(){return/^=(.*)$/}search(n){const l=n===this.pattern;return{isMatch:l,score:l?0:1,indices:[0,this.pattern.length-1]}}}class bn extends re{constructor(n){super(n)}static get type(){return"inverse-exact"}static get multiRegex(){return/^!"(.*)"$/}static get singleRegex(){return/^!(.*)$/}search(n){const i=n.indexOf(this.pattern)===-1;return{isMatch:i,score:i?0:1,indices:[0,n.length-1]}}}class xn extends re{constructor(n){super(n)}static get type(){return"prefix-exact"}static get multiRegex(){return/^\^"(.*)"$/}static get singleRegex(){return/^\^(.*)$/}search(n){const l=n.startsWith(this.pattern);return{isMatch:l,score:l?0:1,indices:[0,this.pattern.length-1]}}}class wn extends re{constructor(n){super(n)}static get type(){return"inverse-prefix-exact"}static get multiRegex(){return/^!\^"(.*)"$/}static get singleRegex(){return/^!\^(.*)$/}search(n){const l=!n.startsWith(this.pattern);return{isMatch:l,score:l?0:1,indices:[0,n.length-1]}}}class kn extends re{constructor(n){super(n)}static get type(){return"suffix-exact"}static get multiRegex(){return/^"(.*)"\$$/}static get singleRegex(){return/^(.*)\$$/}search(n){const l=n.endsWith(this.pattern);return{isMatch:l,score:l?0:1,indices:[n.length-this.pattern.length,n.length-1]}}}class En extends re{constructor(n){super(n)}static get type(){return"inverse-suffix-exact"}static get multiRegex(){return/^!"(.*)"\$$/}static get singleRegex(){return/^!(.*)\$$/}search(n){const l=!n.endsWith(this.pattern);return{isMatch:l,score:l?0:1,indices:[0,n.length-1]}}}class it extends re{constructor(n,{location:l=$.location,threshold:i=$.threshold,distance:s=$.distance,includeMatches:o=$.includeMatches,findAllMatches:a=$.findAllMatches,minMatchCharLength:r=$.minMatchCharLength,isCaseSensitive:c=$.isCaseSensitive,ignoreDiacritics:d=$.ignoreDiacritics,ignoreLocation:u=$.ignoreLocation}={}){super(n),this._bitapSearch=new lt(n,{location:l,threshold:i,distance:s,includeMatches:o,findAllMatches:a,minMatchCharLength:r,isCaseSensitive:c,ignoreDiacritics:d,ignoreLocation:u})}static get type(){return"fuzzy"}static get multiRegex(){return/^"(.*)"$/}static get singleRegex(){return/^(.*)$/}search(n){return this._bitapSearch.searchIn(n)}}class st extends re{constructor(n){super(n)}static get type(){return"include"}static get multiRegex(){return/^'"(.*)"$/}static get singleRegex(){return/^'(.*)$/}search(n){let l=0,i;const s=[],o=this.pattern.length;for(;(i=n.indexOf(this.pattern,l))>-1;)l=i+o,s.push([i,l-1]);const a=!!s.length;return{isMatch:a,score:a?0:1,indices:s}}}const Ae=[Cn,st,xn,wn,En,kn,bn,it],Qe=Ae.length,Sn=/ +(?=(?:[^\"]*\"[^\"]*\")*[^\"]*$)/,_n="|";function Vn(t,n={}){return t.split(_n).map(l=>{let i=l.trim().split(Sn).filter(o=>o&&!!o.trim()),s=[];for(let o=0,a=i.length;o<a;o+=1){const r=i[o];let c=!1,d=-1;for(;!c&&++d<Qe;){const u=Ae[d];let v=u.isMultiMatch(r);v&&(s.push(new u(v,n)),c=!0)}if(!c)for(d=-1;++d<Qe;){const u=Ae[d];let v=u.isSingleMatch(r);if(v){s.push(new u(v,n));break}}}return s})}const Nn=new Set([it.type,st.type]);class An{constructor(n,{isCaseSensitive:l=$.isCaseSensitive,ignoreDiacritics:i=$.ignoreDiacritics,includeMatches:s=$.includeMatches,minMatchCharLength:o=$.minMatchCharLength,ignoreLocation:a=$.ignoreLocation,findAllMatches:r=$.findAllMatches,location:c=$.location,threshold:d=$.threshold,distance:u=$.distance}={}){this.query=null,this.options={isCaseSensitive:l,ignoreDiacritics:i,includeMatches:s,minMatchCharLength:o,findAllMatches:r,ignoreLocation:a,location:c,threshold:d,distance:u},n=l?n:n.toLowerCase(),n=i?ve(n):n,this.pattern=n,this.query=Vn(this.pattern,this.options)}static condition(n,l){return l.useExtendedSearch}searchIn(n){const l=this.query;if(!l)return{isMatch:!1,score:1};const{includeMatches:i,isCaseSensitive:s,ignoreDiacritics:o}=this.options;n=s?n:n.toLowerCase(),n=o?ve(n):n;let a=0,r=[],c=0;for(let d=0,u=l.length;d<u;d+=1){const v=l[d];r.length=0,a=0;for(let f=0,y=v.length;f<y;f+=1){const F=v[f],{isMatch:E,indices:b,score:m}=F.search(n);if(E){if(a+=1,c+=m,i){const p=F.constructor.type;Nn.has(p)?r=[...r,...b]:r.push(b)}}else{c=0,a=0,r.length=0;break}}if(a){let f={isMatch:!0,score:c/a};return i&&(f.indices=r),f}}return{isMatch:!1,score:1}}}const Fe=[];function Fn(...t){Fe.push(...t)}function Be(t,n){for(let l=0,i=Fe.length;l<i;l+=1){let s=Fe[l];if(s.condition(t,n))return new s(t,n)}return new lt(t,n)}const ge={AND:"$and",OR:"$or"},Ie={PATH:"$path",PATTERN:"$val"},ze=t=>!!(t[ge.AND]||t[ge.OR]),Bn=t=>!!t[Ie.PATH],In=t=>!ie(t)&&Ze(t)&&!ze(t),Ke=t=>({[ge.AND]:Object.keys(t).map(n=>({[n]:t[n]}))});function ot(t,n,{auto:l=!0}={}){const i=s=>{let o=Object.keys(s);const a=Bn(s);if(!a&&o.length>1&&!ze(s))return i(Ke(s));if(In(s)){const c=a?s[Ie.PATH]:o[0],d=a?s[Ie.PATTERN]:s[c];if(!ne(d))throw new Error(nn(c));const u={keyId:Ne(c),pattern:d};return l&&(u.searcher=Be(d,n)),u}let r={children:[],operator:o[0]};return o.forEach(c=>{const d=s[c];ie(d)&&d.forEach(u=>{r.children.push(i(u))})}),r};return ze(t)||(t=Ke(t)),i(t)}function zn(t,{ignoreFieldNorm:n=$.ignoreFieldNorm}){t.forEach(l=>{let i=1;l.matches.forEach(({key:s,norm:o,score:a})=>{const r=s?s.weight:null;i*=Math.pow(a===0&&r?Number.EPSILON:a,(r||1)*(n?1:o))}),l.score=i})}function $n(t,n){const l=t.matches;n.matches=[],X(l)&&l.forEach(i=>{if(!X(i.indices)||!i.indices.length)return;const{indices:s,value:o}=i;let a={indices:s,value:o};i.key&&(a.key=i.key.src),i.idx>-1&&(a.refIndex=i.idx),n.matches.push(a)})}function Mn(t,n){n.score=t.score}function Tn(t,n,{includeMatches:l=$.includeMatches,includeScore:i=$.includeScore}={}){const s=[];return l&&s.push($n),i&&s.push(Mn),t.map(o=>{const{idx:a}=o,r={item:n[a],refIndex:a};return s.length&&s.forEach(c=>{c(o,r)}),r})}class oe{constructor(n,l={},i){this.options={...$,...l},this.options.useExtendedSearch,this._keyStore=new rn(this.options.keys),this.setCollection(n,i)}setCollection(n,l){if(this._docs=n,l&&!(l instanceof De))throw new Error(tn);this._myIndex=l||nt(this.options.keys,this._docs,{getFn:this.options.getFn,fieldNormWeight:this.options.fieldNormWeight})}add(n){X(n)&&(this._docs.push(n),this._myIndex.add(n))}remove(n=()=>!1){const l=[];for(let i=0,s=this._docs.length;i<s;i+=1){const o=this._docs[i];n(o,i)&&(this.removeAt(i),i-=1,s-=1,l.push(o))}return l}removeAt(n){this._docs.splice(n,1),this._myIndex.removeAt(n)}getIndex(){return this._myIndex}search(n,{limit:l=-1}={}){const{includeMatches:i,includeScore:s,shouldSort:o,sortFn:a,ignoreFieldNorm:r}=this.options;let c=ne(n)?ne(this._docs[0])?this._searchStringList(n):this._searchObjectList(n):this._searchLogical(n);return zn(c,{ignoreFieldNorm:r}),o&&c.sort(a),Xe(l)&&l>-1&&(c=c.slice(0,l)),Tn(c,this._docs,{includeMatches:i,includeScore:s})}_searchStringList(n){const l=Be(n,this.options),{records:i}=this._myIndex,s=[];return i.forEach(({v:o,i:a,n:r})=>{if(!X(o))return;const{isMatch:c,score:d,indices:u}=l.searchIn(o);c&&s.push({item:o,idx:a,matches:[{score:d,value:o,norm:r,indices:u}]})}),s}_searchLogical(n){const l=ot(n,this.options),i=(r,c,d)=>{if(!r.children){const{keyId:v,searcher:f}=r,y=this._findMatches({key:this._keyStore.get(v),value:this._myIndex.getValueForItemAtKeyId(c,v),searcher:f});return y&&y.length?[{idx:d,item:c,matches:y}]:[]}const u=[];for(let v=0,f=r.children.length;v<f;v+=1){const y=r.children[v],F=i(y,c,d);if(F.length)u.push(...F);else if(r.operator===ge.AND)return[]}return u},s=this._myIndex.records,o={},a=[];return s.forEach(({$:r,i:c})=>{if(X(r)){let d=i(l,r,c);d.length&&(o[c]||(o[c]={idx:c,item:r,matches:[]},a.push(o[c])),d.forEach(({matches:u})=>{o[c].matches.push(...u)}))}}),a}_searchObjectList(n){const l=Be(n,this.options),{keys:i,records:s}=this._myIndex,o=[];return s.forEach(({$:a,i:r})=>{if(!X(a))return;let c=[];i.forEach((d,u)=>{c.push(...this._findMatches({key:d,value:a[u],searcher:l}))}),c.length&&o.push({idx:r,item:a,matches:c})}),o}_findMatches({key:n,value:l,searcher:i}){if(!X(l))return[];let s=[];if(ie(l))l.forEach(({v:o,i:a,n:r})=>{if(!X(o))return;const{isMatch:c,score:d,indices:u}=i.searchIn(o);c&&s.push({score:d,key:n,value:o,idx:a,norm:r,indices:u})});else{const{v:o,n:a}=l,{isMatch:r,score:c,indices:d}=i.searchIn(o);r&&s.push({score:c,key:n,value:o,norm:a,indices:d})}return s}}oe.version="7.1.0";oe.createIndex=nt;oe.parseIndex=pn;oe.config=$;oe.parseQuery=ot;Fn(An);const ae=t=>{const[n,l]=bt.createInjectionState(i=>{const s=e.reactive(i);function o(u,v){Q(v)&&G.isObject(v)?s.queryForm[u]=void 0:s.queryForm[u]=v}function a(u){let{key:v,label:f,value:y}=u;if(Q(y)&&!G.isObject(y))return;let F="",E=y==null?void 0:y.toString();if(typeof y=="number"||typeof y=="boolean"||typeof y=="string")F=`${f}:${E}`,E.length>50&&(F=`${f}:${E.slice(0,50)}...`);else if(G.isArray(y)&&(F=`${f}:${E}`,E.length>50)){let p=0,x=0;for(let k=0;k<y.length;k++)if(x+=y[k].length+1,x>50){p=k+1;break}let w=y.slice(0,p);F=`${f}:${w.join(",").slice(0,50)}...`,y.length>p&&(F+=`等其余${y.length-p}项`)}const b={key:v,label:f,showStr:F,value:E},m=s.tags.findIndex(p=>p.key===v);m===-1?s.tags.push(b):s.tags.splice(m,1,b)}function r(u,v){u.key&&s.tags.findIndex(f=>f.key===u.key)!==-1&&(s.queryForm[u.key]=void 0,v?s.tags.splice(v,1):s.tags=s.tags.filter(f=>f.key!==u.key))}function c(){s.tags.forEach(u=>{s.queryForm[u.key]=void 0}),s.tags=[]}function d(u={}){Object.keys(s.queryForm).forEach(v=>{v!=="resetCount"&&(s.queryForm[v]=u[v]??void 0)}),s.tags=[]}return{state:s,setQuery:o,addTag:a,reduceTag:r,reduceAllTag:c,clearQuery:d}},{injectionKey:t});return{useProvideQueryStore:n,useQueryStore:l}},Dn={class:"el-select-pop-search-container"},Ln={class:"el-select-dropdown__wrap virtual-scroll-wrap"},On={class:"check-all ak-relative el-select-dropdown__item"},Rn=["title"],jn=["onClick"],Pn={class:"el-select-dropdown__empty"},qn={class:"custom-multi-footer"},Un={class:"counts"},Qn=e.defineComponent({name:"JcSelectQuery",__name:"index",props:{field:{type:String,required:!0,default:""},options:{type:Array,default:()=>[],required:!0},allowCreate:{type:Boolean,default:!1},keyField:{type:Array,default:()=>["label","value"]},width:{type:String,default:"160px"},size:{type:String,default:"default",validator:t=>["small","default","large"].includes(t)},footerBtnName:{type:String,default:"搜索"},maxScrollHeight:{type:String,default:"240px"},isNeedFooter:{type:Boolean,default:!0},isNeedOnlySelect:{type:Boolean,default:!0},injectionKey:{type:String,default:"jc-query-injection-key"}},setup(t,{expose:n}){const l=t,i=e.ref(),s=e.ref([]),o=e.reactive({}),a=e.ref(""),r=e.ref(),c=e.ref([]),d=e.ref([]),u=e.ref([]),v=e.ref(!1),f=e.ref(!1),y=e.ref(!1),{useQueryStore:F}=ae(l.injectionKey),{state:E,setQuery:b}=F();let m=-1,p=!1;const x=e.ref(),w=C=>{C&&(u.value=s.value,a.value="",d.value=c.value,V(u.value),e.nextTick(()=>{var _;(_=r.value)==null||_.focus()}))},k=C=>{u.value=u.value.filter(_=>_.value!==C.value)},S=C=>{y.value=!0,b(l.field,C),e.nextTick(()=>{y.value=!1})},g=()=>{const C=a.value.trim();C!==""?d.value=x.value.search(C).map(_=>_.item):d.value=c.value},z=()=>{Q(a.value)||d.value.map(C=>C.value).includes(a.value)||(c.value.unshift({label:a.value,value:a.value}),u.value.push({label:a.value,value:a.value}),s.value=u.value,b(l.field,s.value),e.nextTick(()=>{x.value=new oe(c.value,{keys:l.keyField}),g()}))},L=C=>{u.value=C?d.value:[],f.value=!1,l.isNeedFooter||(s.value=u.value,b(l.field,s.value))},V=C=>{if(C.length===0){v.value=!1,f.value=!1;return}const _=C.length;v.value=_===d.value.length,f.value=_>0&&_<d.value.length;const{options:N}=l;let M=0;if(C.length>0){const q=C[C.length-1];M=N.findIndex(H=>H.value===q.value)}if(p){const q=Math.abs(m-M)+1,H=Math.min(m,M);let J=0;for(;J<q;){const Y=H+J;G.findIndex(C,N[Y])===-1&&u.value.push(N[Y]),J++}}l.isNeedFooter||(s.value=u.value,b(l.field,s.value))},D=C=>{!p&&!u.value.includes(C)&&(m=c.value.findIndex(_=>_.value===C.value))},T=C=>{u.value=[C],I()},U=()=>{var C;(C=i.value)==null||C.blur()},I=()=>{y.value=!0,s.value=u.value,b(l.field,s.value),U(),e.nextTick(()=>{y.value=!1})};return e.watch(()=>l.options,()=>{var C;!G.isArray(l.options)||((C=l.options)==null?void 0:C.length)===0||(d.value=l.options,c.value=G.cloneDeep(l.options),x.value=new oe(c.value,{keys:l.keyField,threshold:.1}))},{immediate:!0,deep:!0}),e.watch(()=>E.queryForm[l.field],C=>{y.value||(Q(C)?(s.value=[],u.value=[]):s.value=G.isArray(C)?C:[])},{deep:!0}),e.onMounted(()=>{window.addEventListener("keydown",C=>{C.shiftKey&&(p=!0)}),window.addEventListener("keyup",()=>{p=!1}),e.nextTick(()=>{x.value=new oe(c.value,{keys:l.keyField})})}),e.onUnmounted(()=>{window.removeEventListener("keydown",C=>{C.shiftKey&&(p=!0)}),window.removeEventListener("keyup",()=>{p=!1})}),e.onMounted(()=>{var C;i.value&&(o.focus=i.value.focus,o.blur=i.value.blur,o.selectedLabel=(C=i.value)==null?void 0:C.selectedLabel)}),n(o),(C,_)=>(e.openBlock(),e.createBlock(e.unref(A.ElSelect),e.mergeProps({ref_key:"selectRef",ref:i,modelValue:s.value,"onUpdate:modelValue":_[3]||(_[3]=N=>s.value=N)},C.$attrs,{multiple:"",clearable:"","show-arrow":!1,"collapse-tags":!0,"collapse-tags-tooltip":!0,"max-collapse-tags":1,size:t.size,style:{width:t.width},class:"jc-select","popper-class":"jc-select-popper",placeholder:"请选择",onVisibleChange:w,onRemoveTag:k,onChange:S}),e.createSlots({default:e.withCtx(()=>[e.createVNode(e.unref(A.ElOption),{value:"1",hidden:""}),e.createElementVNode("div",Dn,[e.createVNode(e.unref(Z.Search),{class:"selcet-icon search-icon"}),e.withDirectives(e.createElementVNode("input",{ref_key:"searchInputRef",ref:r,"onUpdate:modelValue":_[0]||(_[0]=N=>a.value=N),class:"el-select-pop__input",onInput:g},null,544),[[e.vModelText,a.value]]),t.allowCreate?(e.openBlock(),e.createBlock(e.unref(Z.CirclePlus),{key:0,class:"selcet-icon circle-icon",onClick:z})):e.createCommentVNode("",!0)]),e.withDirectives(e.createElementVNode("div",Ln,[e.createElementVNode("li",On,[e.createVNode(e.unref(A.ElCheckbox),{modelValue:v.value,"onUpdate:modelValue":_[1]||(_[1]=N=>v.value=N),indeterminate:f.value,size:t.size,onChange:L},{default:e.withCtx(()=>_[4]||(_[4]=[e.createTextVNode("全选")])),_:1,__:[4]},8,["modelValue","indeterminate","size"])]),e.createVNode(e.unref(A.ElCheckboxGroup),{modelValue:u.value,"onUpdate:modelValue":_[2]||(_[2]=N=>u.value=N),onChange:V,size:t.size},{default:e.withCtx(()=>[e.createVNode(e.unref(Te),{class:"recycle-scroller",items:d.value,"item-size":30,"key-field":"value",style:e.normalizeStyle({maxHeight:t.maxScrollHeight})},{default:e.withCtx(({item:N})=>[e.createElementVNode("li",{class:"el-select-dropdown__item",title:N.label},[e.createVNode(e.unref(A.ElCheckbox),{size:t.size,value:N,label:N,disabled:N.disabled,onClick:M=>D(N)},{default:e.withCtx(()=>[e.renderSlot(C.$slots,"default",{scope:N},()=>[e.createElementVNode("span",null,e.toDisplayString(N.label),1)])]),_:2},1032,["size","value","label","disabled","onClick"]),t.isNeedOnlySelect?(e.openBlock(),e.createElementBlock("div",{key:0,class:"select-tag",onClick:e.withModifiers(M=>T(N),["stop"])},_[5]||(_[5]=[e.createElementVNode("span",null,"仅筛选此项",-1)]),8,jn)):e.createCommentVNode("",!0)],8,Rn)]),_:3},8,["items","style"])]),_:3},8,["modelValue","size"])],512),[[e.vShow,d.value.length>0]]),e.withDirectives(e.createElementVNode("p",Pn,"无数据",512),[[e.vShow,d.value.length===0]])]),_:2},[t.isNeedFooter?{name:"footer",fn:e.withCtx(()=>[e.createElementVNode("div",qn,[e.createElementVNode("span",null,[e.createElementVNode("span",Un,"已选 "+e.toDisplayString(u.value.length)+" 项",1),_[6]||(_[6]=e.createElementVNode("span",{class:"shift-tips"},"(按住Shift可以快速多选)",-1))]),e.createElementVNode("span",null,[e.createVNode(e.unref(A.ElButton),{size:t.size,onClick:U,plain:""},{default:e.withCtx(()=>_[7]||(_[7]=[e.createTextVNode("关闭")])),_:1,__:[7]},8,["size"]),e.createVNode(e.unref(A.ElButton),{type:"primary",size:t.size,onClick:I,plain:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.footerBtnName),1)]),_:1},8,["size"])])])]),key:"0"}:void 0]),1040,["modelValue","size","style"]))}}),te=t=>(t.install=n=>{const l=t.name;n.component(l,t)},t),rt=te(Qn),Kn={class:"jc-cascader-item"},Jn={title:"{{ data.label }}"},Hn=["onClick"],Wn={class:"custom-multi-footer"},Gn=e.defineComponent({name:"JcCascader",__name:"index",props:{field:{type:String,required:!0,default:""},options:{type:Array,default:()=>[]},keyField:{type:Array,default:()=>["label","value"]},width:{type:String,default:"200px"},size:{type:String,default:"default",validator:t=>["small","default","large"].includes(t)},footerBtnName:{type:String,default:"搜索"},isNeedFooter:{type:Boolean,default:!0},isNeedHeader:{type:Boolean,default:!0},isNeedOnlySelect:{type:Boolean,default:!0},injectionKey:{type:String,default:"jc-query-injection-key"}},setup(t,{expose:n}){const l=t,i=e.ref(),s=e.ref([]),o=e.reactive({}),a=(k,S)=>{const g=String(k.label).trim().toLowerCase(),z=S.trim().toLowerCase();return g.indexOf(z)!==-1},r={multiple:!0,expandTrigger:"hover"},c=e.ref(!1),{useQueryStore:d}=ae(l.injectionKey),{state:u,setQuery:v}=d(),f=e.ref(!1),y=e.ref(!1),F=e.computed(()=>{var g;const k=[],S=l.options.map(z=>({node:z,path:[z.value]}));for(;S.length>0;){const{node:z,path:L}=S.shift();(g=z.children)!=null&&g.length?z.children.forEach(V=>{S.push({node:V,path:[...L,V.value]})}):k.push(L)}return k});e.watch(s,k=>{k.length===0?(f.value=!1,y.value=!1):k.length===F.value.length?(f.value=!0,y.value=!1):y.value=!0});const E=k=>{y.value=!1,s.value=k?F.value:[]},b=()=>{var k;s.value=[],f.value=!1,y.value=!1,(k=i.value)==null||k.togglePopperVisible(!1)},m=()=>{var k;c.value=!0,v(l.field,s.value),(k=i.value)==null||k.togglePopperVisible(!1),e.nextTick(()=>{c.value=!1})},p=()=>{e.nextTick(()=>{m()})},x=()=>{s.value=[],m()},w=k=>{const S=F.value.filter(g=>g.includes(k.value));s.value=S,m()};return e.watch(()=>u.queryForm[l.field],k=>{c.value||(Q(k)?s.value=[]:s.value=G.isArray(k)?k:[])},{deep:!0}),e.onMounted(()=>{}),e.onUnmounted(()=>{}),e.onMounted(()=>{var k,S,g;i.value&&(o.getCheckedNodes=i.value.getCheckedNodes,o.cascaderPanelRef=i.value.cascaderPanelRef,o.togglePopperVisible=(k=i.value)==null?void 0:k.togglePopperVisible,o.contentRef=(S=i.value)==null?void 0:S.contentRef,o.presentText=(g=i.value)==null?void 0:g.presentText)}),n(o),(k,S)=>{const g=e.resolveComponent("el-checkbox"),z=e.resolveComponent("el-button"),L=e.resolveComponent("el-cascader");return e.openBlock(),e.createBlock(L,e.mergeProps({ref_key:"cascaderRef",ref:i,class:"jc-cascader","popper-class":"jc-cascader-popper",modelValue:s.value,"onUpdate:modelValue":S[1]||(S[1]=V=>s.value=V)},k.$attrs,{props:r,options:t.options,filterable:"",clearable:!0,"filter-method":a,"show-arrow":!1,"collapse-tags":!0,"collapse-tags-tooltip":!0,size:t.size,style:{width:t.width},placeholder:"请选择",onRemoveTag:p,onClear:x}),e.createSlots({default:e.withCtx(({data:V})=>[e.createElementVNode("div",Kn,[e.createElementVNode("span",Jn,e.toDisplayString(V.label),1),t.isNeedOnlySelect?(e.openBlock(),e.createElementBlock("span",{key:0,class:"select-tag",onClick:e.withModifiers(D=>w(V),["stop"])},S[3]||(S[3]=[e.createElementVNode("span",null,"仅筛选此项",-1)]),8,Hn)):e.createCommentVNode("",!0)])]),footer:e.withCtx(()=>[e.createElementVNode("div",Wn,[e.createElementVNode("span",null,[e.createVNode(z,{size:t.size,onClick:b,plain:""},{default:e.withCtx(()=>S[4]||(S[4]=[e.createTextVNode("关闭")])),_:1,__:[4]},8,["size"]),e.createVNode(z,{type:"primary",size:t.size,onClick:m,plain:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.footerBtnName),1)]),_:1},8,["size"])])])]),_:2},[t.isNeedHeader?{name:"header",fn:e.withCtx(()=>[e.createElementVNode("div",null,[e.createVNode(g,{style:{"margin-left":"10px"},size:t.size,modelValue:f.value,"onUpdate:modelValue":S[0]||(S[0]=V=>f.value=V),indeterminate:y.value,onChange:E},{default:e.withCtx(()=>S[2]||(S[2]=[e.createTextVNode(" 全部 ")])),_:1,__:[2]},8,["size","modelValue","indeterminate"])])]),key:"0"}:void 0]),1040,["modelValue","options","size","style"])}}}),at=te(Gn),Yn={style:{"max-width":"100px"}},Xn=e.defineComponent({name:"JcDatePicker",__name:"index",props:{fieldList:{type:Array,require:!0,default:()=>[]},type:{type:String,default:"daterange",validator:t=>["daterange","monthrange"].includes(t)},size:{type:String,default:"default",validator:t=>["small","default","large"].includes(t)},width:{type:String,default:"320px"},injectionKey:{type:String,default:"jc-query-injection-key"}},emits:["fieldChange"],setup(t,{expose:n,emit:l}){const i=t,s=l,o=e.ref([]),a=e.ref([]),r=e.ref(""),c=e.ref(""),d=e.ref(!1),{useQueryStore:u}=ae(i.injectionKey),{state:v,setQuery:f}=u(),y=()=>{i.fieldList.forEach(p=>{f(p.value,void 0)})},F=p=>{Q(o.value)||(d.value=!0,y(),f(p,o.value),e.nextTick(()=>{d.value=!1})),s("fieldChange",p)},E=()=>{d.value=!0,c.value=r.value,a.value=o.value,f(r.value,o.value),e.nextTick(()=>{d.value=!1})};e.watch(()=>i.fieldList,p=>{(!Q(p)&&Q(r.value)||r.value&&!i.fieldList.map(x=>x.value).includes(r.value))&&(r.value=p[0].value,o.value=[])},{immediate:!0,deep:!0}),e.watch(i.fieldList.map(p=>()=>v.queryForm[p.value]),p=>{if(!d.value){const x=p.findIndex(w=>!Q(w));x===-1?(r.value=i.fieldList[0].value,o.value=[]):(r.value=i.fieldList[x].value,o.value=p[x]||[])}},{deep:!0});const b=e.ref(),m=e.reactive({});return e.onMounted(()=>{var p,x,w,k;b.value&&(m.focus=(p=b.value)==null?void 0:p.focus,m.blur=(x=b.value)==null?void 0:x.blur,m.handleOpen=(w=b.value)==null?void 0:w.handleOpen,m.handleClose=(k=b.value)==null?void 0:k.handleClose)}),n(m),(p,x)=>{const w=e.resolveComponent("el-option"),k=e.resolveComponent("el-select"),S=e.resolveComponent("el-date-picker");return e.openBlock(),e.createElementBlock("div",{class:"jc-date-picker",style:e.normalizeStyle({width:t.width})},[e.createElementVNode("div",Yn,[e.createVNode(k,{modelValue:r.value,"onUpdate:modelValue":x[0]||(x[0]=g=>r.value=g),size:t.size,class:"select-field",onChange:F},{prefix:e.withCtx(()=>[e.createTextVNode(e.toDisplayString((t.fieldList.find(g=>g.value===r.value)||{}).label),1)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.fieldList,g=>(e.openBlock(),e.createBlock(w,{key:g.value,label:g.label,value:g.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","size"])]),e.createVNode(S,e.mergeProps({ref_key:"datePickerRef",ref:b,modelValue:o.value,"onUpdate:modelValue":x[1]||(x[1]=g=>o.value=g),type:t.type},p.$attrs,{"range-separator":"至","start-placeholder":"开始时间","end-placeholder":"结束时间",size:t.size,"value-format":t.type==="daterange"?"YYYY-MM-DD":"YYYY-MM",onChange:E}),null,16,["modelValue","type","size","value-format"])],4)}}}),ut=te(Xn),Zn={class:"suffixContent"},el=e.defineComponent({name:"JcInputSwitch",__name:"index",props:{fieldList:{type:Array,required:!0,default:()=>[]},size:{type:String,default:"default",validator:t=>["small","default","large"].includes(t)},width:{type:String,default:"320px"},injectionKey:{type:String,default:"jc-query-injection-key"}},emits:["fieldChange"],setup(t,{expose:n,emit:l}){const i=t,s=l,o=e.ref(""),a=e.ref(""),r=e.ref(""),c=e.ref(""),{useQueryStore:d}=ae(i.injectionKey),{state:u,setQuery:v}=d(),f=e.ref(!1),y=()=>{i.fieldList.forEach(x=>{v(x.value,void 0)})},F=()=>{f.value=!0,o.value="",y(),e.nextTick(()=>{f.value=!1})},E=x=>{o.value&&(f.value=!0,y(),v(x,o.value),e.nextTick(()=>{f.value=!1})),s("fieldChange",x)},b=()=>{f.value=!0,a.value=o.value,c.value=r.value,v(r.value,o.value.trim()),e.nextTick(()=>{f.value=!1})};e.watch(()=>i.fieldList,x=>{(!Q(x)&&Q(r.value)||r.value&&!i.fieldList.map(w=>w.value).includes(r.value))&&(r.value=x[0].value,o.value="")},{immediate:!0,deep:!0}),e.watch(()=>u.queryForm.resetCount,()=>{F()}),e.watch(i.fieldList.map(x=>()=>u.queryForm[x.value]),x=>{if(!f.value){const w=x.findIndex(k=>!Q(k));w===-1?(r.value=i.fieldList[0].value,o.value=""):(r.value=i.fieldList[w].value,o.value=x[w]||"")}},{deep:!0});const m=e.ref(),p=e.reactive({});return e.onMounted(()=>{var x,w,k,S,g,z,L,V,D,T;m.value&&(p.blur=(x=m.value)==null?void 0:x.blur,p.clear=(w=m.value)==null?void 0:w.clear,p.focus=(k=m.value)==null?void 0:k.focus,p.input=(S=m.value)==null?void 0:S.input,p.ref=(g=m.value)==null?void 0:g.ref,p.resizeTextarea=(z=m.value)==null?void 0:z.resizeTextarea,p.select=(L=m.value)==null?void 0:L.select,p.textarea=(V=m.value)==null?void 0:V.textarea,p.textareaStyle=(D=m.value)==null?void 0:D.textareaStyle,p.isComposing=(T=m.value)==null?void 0:T.isComposing)}),n(p),(x,w)=>(e.openBlock(),e.createBlock(e.unref(A.ElInput),e.mergeProps({ref_key:"inputRef",ref:m,modelValue:o.value,"onUpdate:modelValue":w[1]||(w[1]=k=>o.value=k),modelModifiers:{trim:!0}},x.$attrs,{placeholder:"请输入内容",style:{width:t.width},size:t.size,class:"jc-input jc-input-switch"}),{prepend:e.withCtx(()=>[e.createVNode(e.unref(A.ElSelect),{modelValue:r.value,"onUpdate:modelValue":w[0]||(w[0]=k=>r.value=k),size:t.size,class:"select-field",onChange:E},{prefix:e.withCtx(()=>[e.createTextVNode(e.toDisplayString((t.fieldList.find(k=>k.value===r.value)||{}).label),1)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.fieldList,k=>(e.openBlock(),e.createBlock(e.unref(A.ElOption),{key:k.value,label:k.label,value:k.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","size"])]),suffix:e.withCtx(()=>[e.createElementVNode("div",Zn,[e.withDirectives(e.createVNode(e.unref(A.ElIcon),{class:"el-input__icon",onClick:F},{default:e.withCtx(()=>[e.createVNode(e.unref(Z.Close))]),_:1},512),[[e.vShow,o.value]]),e.createVNode(e.unref(A.ElIcon),{class:"el-input__icon",onClick:b},{default:e.withCtx(()=>[e.createVNode(e.unref(Z.Search))]),_:1})])]),_:1},16,["modelValue","style","size"]))}}),ct=te(el),tl={class:"suffixContent"},nl={class:"popover-body"},ll={class:"popover-btn"},il={class:"popover-btn-right"},sl=e.defineComponent({name:"JcInputComplex",__name:"index",props:{fieldList:{type:Array,require:!0,default:()=>[]},size:{type:String,default:"default",validator:t=>["small","default","large"].includes(t)},width:{type:String,default:"320px"},injectionKey:{type:String,default:"jc-query-injection-key"}},emits:["fieldChange"],setup(t,{expose:n,emit:l}){const i=t,s=l,o=e.ref(""),a=e.ref(""),r=e.ref(""),c=e.ref(""),d=e.ref(!1),u=e.computed(()=>r.value+"List"),v=e.computed(()=>{var N;return((N=i.fieldList.find(M=>M.value===r.value))==null?void 0:N.label)||""}),f=e.ref(""),y=e.ref(!1),{useQueryStore:F}=ae(i.injectionKey),{state:E,setQuery:b,addTag:m,reduceTag:p}=F(),x={},w={};i.fieldList.forEach(N=>{x[N.value]=void 0,w[N.value+"List"]=[]});const k=N=>{d.value=!1,S(),s("fieldChange",N)},S=()=>{E.queryForm[u.value]?f.value=E.queryForm[u.value].join(`
|
|
3
|
+
`):f.value=""},g=()=>{y.value=!0,o.value="",b(r.value,void 0),V(),e.nextTick(()=>{y.value=!1})},z=()=>{for(const N in x)b(N,void 0)},L=()=>{y.value=!0,f.value="",a.value=o.value,c.value=r.value,z(),b(u.value,void 0),p({key:u.value}),b(r.value,o.value.trim()),e.nextTick(()=>{y.value=!1})},V=()=>{y.value=!0;const N=f.value.split(`
|
|
4
|
+
`).filter(M=>!Q(M));if(N.length>0){const M=[...new Set(N)],q=G.filter(N,(J,Y,se)=>G.includes(se,J,Y+1)),H=[...new Set(q)];if(H.length>0){const J=i.fieldList.find(se=>se.value===r.value),Y=`搜索条件中包含重复的内容:${J==null?void 0:J.label}:${H.join(`
|
|
5
|
+
`)}`;A.ElMessage.warning(Y)}f.value=M.join(`
|
|
6
|
+
`),z(),b(u.value,M),m({key:u.value,label:v.value,value:M})}else b(u.value,void 0),p({key:u.value});D(),e.nextTick(()=>{y.value=!1})},D=()=>{d.value=!1},T=()=>{o.value="",f.value="",a.value="",D()},U=N=>{Object.keys(N).forEach(M=>{r.value=M.replace("List",""),f.value=N[M].join(`
|
|
7
|
+
`),V()})},I=()=>{!Q(o.value)&&(o.value!==a.value||r.value!==c.value)?(a.value=o.value,c.value=r.value,z(),b(u.value,void 0),p({key:u.value}),b(r.value,o.value.trim())):Q(o.value)&&(a.value=o.value,b(r.value,void 0))};e.watch(()=>i.fieldList,N=>{(!Q(N)&&Q(r.value)||r.value&&!i.fieldList.map(M=>M.value).includes(r.value))&&(r.value=N[0].value,o.value="",f.value="")},{immediate:!0,deep:!0}),e.watch(()=>E.queryForm.resetCount,()=>{T()}),e.watch(i.fieldList.flatMap(N=>[()=>E.queryForm[N.value],()=>E.queryForm[N.value+"List"]]),N=>{if(!y.value){if(N.findIndex(H=>!Q(H))===-1){T();return}let q=!1;i.fieldList.forEach(H=>{var Y;const J=H.value+"List";if(f.value=((Y=E.queryForm[J])==null?void 0:Y.join(`
|
|
8
|
+
`))||"",G.isArray(E.queryForm[J])&&!Q(E.queryForm[J])){m({key:J,label:H.label,value:E.queryForm[J]});return}else p({key:J});E.queryForm[H.value]?(q=!0,r.value=H.value,o.value=E.queryForm[H.value]||""):q||(o.value="")})}},{deep:!0});const C=e.ref(),_=e.reactive({});return e.onMounted(()=>{var N,M,q,H,J,Y,se,be,xe,h;C.value&&(_.blur=(N=C.value)==null?void 0:N.blur,_.clear=(M=C.value)==null?void 0:M.clear,_.focus=(q=C.value)==null?void 0:q.focus,_.input=(H=C.value)==null?void 0:H.input,_.ref=(J=C.value)==null?void 0:J.ref,_.resizeTextarea=(Y=C.value)==null?void 0:Y.resizeTextarea,_.select=(se=C.value)==null?void 0:se.select,_.textarea=(be=C.value)==null?void 0:be.textarea,_.textareaStyle=(xe=C.value)==null?void 0:xe.textareaStyle,_.isComposing=(h=C.value)==null?void 0:h.isComposing)}),_.setInputValueMult=U,_.setInputByOutside=I,n(_),(N,M)=>(e.openBlock(),e.createBlock(e.unref(A.ElInput),e.mergeProps({ref_key:"inputRef",ref:C,modelValue:o.value,"onUpdate:modelValue":M[5]||(M[5]=q=>o.value=q),modelModifiers:{trim:!0}},N.$attrs,{placeholder:"请输入内容",style:{width:t.width},class:"jc-input jc-input-complex search-input",size:t.size}),{prepend:e.withCtx(()=>[e.createVNode(e.unref(A.ElSelect),{ref:"selectRef",modelValue:r.value,"onUpdate:modelValue":M[0]||(M[0]=q=>r.value=q),size:t.size,class:"select-field",onChange:k},{prefix:e.withCtx(()=>[e.createTextVNode(e.toDisplayString((t.fieldList.find(q=>q.value===r.value)||{}).label),1)]),default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.fieldList,q=>(e.openBlock(),e.createBlock(e.unref(A.ElOption),{key:q.value,label:q.label,value:q.value},null,8,["label","value"]))),128))]),_:1},8,["modelValue","size"])]),suffix:e.withCtx(()=>[e.createElementVNode("div",tl,[e.withDirectives(e.createVNode(e.unref(A.ElIcon),{class:"el-input__icon",onClick:g},{default:e.withCtx(()=>[e.createVNode(e.unref(Z.Close))]),_:1},512),[[e.vShow,o.value]]),e.createVNode(e.unref(A.ElIcon),{class:"el-input__icon",onClick:L},{default:e.withCtx(()=>[e.createVNode(e.unref(Z.Search))]),_:1}),e.createVNode(e.unref(A.ElPopover),{visible:d.value,"onUpdate:visible":M[4]||(M[4]=q=>d.value=q),placement:"bottom-end",width:"240","show-arrow":!1,"popper-class":"jc-input-pop",trigger:"click"},{reference:e.withCtx(()=>[e.createVNode(e.unref(A.ElIcon),{class:"el-input__icon",title:"多项搜索",style:{"background-color":"#f0f2f5"},onClick:S},{default:e.withCtx(()=>[e.createVNode(e.unref(Z.Grid))]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("div",nl,[e.createVNode(e.unref(A.ElInput),e.mergeProps({modelValue:f.value,"onUpdate:modelValue":M[1]||(M[1]=q=>f.value=q),type:"textarea"},N.$attrs,{size:t.size,placeholder:"一行一项",class:"popover-textarea",wrap:"off"}),null,16,["modelValue","size"]),e.createElementVNode("div",ll,[e.createVNode(e.unref(A.ElButton),{size:t.size,onClick:M[2]||(M[2]=q=>f.value=""),plain:""},{default:e.withCtx(()=>M[6]||(M[6]=[e.createTextVNode("清空")])),_:1,__:[6]},8,["size"]),e.createElementVNode("div",il,[e.createVNode(e.unref(A.ElButton),{size:t.size,plain:"",onClick:D},{default:e.withCtx(()=>M[7]||(M[7]=[e.createTextVNode("关闭")])),_:1,__:[7]},8,["size"]),e.createVNode(e.unref(A.ElButton),{type:"primary",plain:"",size:t.size,onClick:M[3]||(M[3]=q=>V())},{default:e.withCtx(()=>M[8]||(M[8]=[e.createTextVNode("搜索")])),_:1,__:[8]},8,["size"])])])])]),_:1},8,["visible"])])]),_:1},16,["modelValue","style","size"]))}}),dt=te(sl),ol={style:{display:"flex","flex-wrap":"wrap",flex:"1","flex-basis":"calc(100% - 50px)","font-size":"12px","margin-top":"4px"}},rl=e.defineComponent({name:"JcTagQuery",__name:"index",props:{injectionKey:{type:String,default:"jc-query-injection-key"}},setup(t){const n=t,{useQueryStore:l}=ae(n.injectionKey),{state:i,reduceTag:s,reduceAllTag:o}=l();return(a,r)=>(e.openBlock(),e.createElementBlock("div",ol,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(e.unref(i).tags,(c,d)=>(e.openBlock(),e.createBlock(e.unref(A.ElTag),e.mergeProps({ref_for:!0},a.$attrs,{key:c.label,closable:"",style:[{height:"auto","max-height":"28px","white-space":"normal","text-align":"left","max-width":"1800px",overflow:"hidden","word-break":"break-word","text-overflow":"ellipsis"},{marginLeft:d>0?"4px":"0px"}],onClose:u=>e.unref(s)(c,d)}),{default:e.withCtx(()=>[e.createVNode(e.unref(A.ElTooltip),{content:c.value,placement:"bottom",effect:"light"},{default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(c.showStr),1)]),_:2},1032,["content"])]),_:2},1040,["style","onClose"]))),128)),e.unref(i).tags.length>1?(e.openBlock(),e.createElementBlock("span",{key:0,style:{"margin-left":"10px","margin-top":"2px",display:"block"},onClick:r[0]||(r[0]=(...c)=>e.unref(o)&&e.unref(o)(...c))},[e.createVNode(e.unref(A.ElIcon),null,{default:e.withCtx(()=>[e.createVNode(e.unref(Z.Delete))]),_:1})])):e.createCommentVNode("",!0)]))}}),Le=(t,n)=>{const l=t.__vccOpts||t;for(const[i,s]of n)l[i]=s;return l},al=Le(rl,[["__scopeId","data-v-fddb24ed"]]),ft=te(al),ul={class:"popover-btn"},cl={class:"popover-btn-right"},dl=e.defineComponent({name:"JcMoreQueryContain",__name:"index",props:{fieldList:{type:Array,require:!0,default:()=>[]},customTagObj:{type:Object,default:()=>({})},width:{type:Number,default:400},size:{type:String,default:"default",validator:t=>["small","default","large"].includes(t)},injectionKey:{type:String,default:"jc-query-injection-key"}},setup(t,{expose:n}){const l=e.ref(!1),i=e.ref({}),s=t,{useQueryStore:o}=ae(s.injectionKey),{state:a,setQuery:r,addTag:c,reduceTag:d}=o(),u=e.ref(!1),v=()=>{l.value=!l.value,l.value&&s.fieldList.forEach(m=>{i.value[m.value]=a.queryForm[m.value]||void 0})},f=()=>{u.value=!0,i.value={},s.fieldList.forEach(m=>{r(m.value,void 0),d({key:m.value})}),l.value=!1,e.nextTick(()=>{u.value=!1})},y=(m,p)=>{var x;typeof i.value[m]>"u"||(typeof i.value[m]=="string"||typeof i.value[m]=="number"?c({key:m,label:p,value:Q(s.customTagObj[m])?i.value[m]:s.customTagObj[m]}):c({key:m,label:p,value:Q(s.customTagObj[m])?(x=i.value[m])==null?void 0:x.join(","):s.customTagObj[m]}))},F=()=>{u.value=!0;for(const m in i.value){r(m,Q(i.value[m])?void 0:i.value[m]);const p=s.fieldList.find(x=>x.value===m);p===void 0&&A.ElMessage.warning("传入的fieldList和表单绑定的字段不匹配"),y(m,p.label)}l.value=!1,e.nextTick(()=>{u.value=!1})};e.watch(()=>a.queryForm.resetCount,()=>{f()}),e.watch(s.fieldList.map(m=>()=>a.queryForm[m.value]),()=>{u.value||s.fieldList.forEach(m=>{i.value[m.value]=a.queryForm[m.value],Q(a.queryForm[m.value])?d({key:m.value}):y(m.value,m.label)})},{deep:!0});const E=e.ref(),b=e.reactive({});return e.onMounted(()=>{var m;E.value&&(b.hide=(m=E.value)==null?void 0:m.hide)}),n(b),(m,p)=>(e.openBlock(),e.createBlock(e.unref(A.ElPopover),e.mergeProps({ref_key:"popoverRef",ref:E},m.$attrs,{visible:l.value,placement:"bottom",width:t.width,"show-arrow":!1,"popper-class":"moreQuery-pop",trigger:"click"}),{reference:e.withCtx(()=>[e.createVNode(e.unref(A.ElButton),{size:t.size,icon:e.unref(Z.Operation),onClick:v},null,8,["size","icon"])]),default:e.withCtx(()=>[e.renderSlot(m.$slots,"default",{scopeForm:i.value}),e.createElementVNode("div",ul,[e.createVNode(e.unref(A.ElButton),{size:t.size,onClick:f,plain:""},{default:e.withCtx(()=>p[1]||(p[1]=[e.createTextVNode("清空")])),_:1,__:[1]},8,["size"]),e.createElementVNode("div",cl,[e.createVNode(e.unref(A.ElButton),{size:t.size,onClick:p[0]||(p[0]=x=>l.value=!1),plain:""},{default:e.withCtx(()=>p[2]||(p[2]=[e.createTextVNode("关闭")])),_:1,__:[2]},8,["size"]),e.createVNode(e.unref(A.ElButton),{type:"primary",plain:"",size:t.size,onClick:F},{default:e.withCtx(()=>p[3]||(p[3]=[e.createTextVNode("搜索")])),_:1,__:[3]},8,["size"])])])]),_:3},16,["visible","width"]))}}),ht=te(dl),fl={class:"jc-list-layout"},hl={key:1,class:"bottom-header"},ml=e.defineComponent({name:"JcListLayout",__name:"index",setup(t){return(n,l)=>(e.openBlock(),e.createElementBlock("div",fl,[n.$slots["top-body"]?(e.openBlock(),e.createBlock(e.unref(A.ElCard),{key:0,class:"top-card",shadow:"never"},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"top-body")]),_:3})):e.createCommentVNode("",!0),n.$slots["bottom-header"]?(e.openBlock(),e.createElementBlock("div",hl,[e.renderSlot(n.$slots,"bottom-header")])):e.createCommentVNode("",!0),n.$slots["bottom-body"]?(e.openBlock(),e.createBlock(e.unref(A.ElCard),{key:2,class:"bottom-card",shadow:"never"},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"bottom-body")]),_:3})):e.createCommentVNode("",!0)]))}}),mt=te(ml),pl={class:"jc-import-dialog"},vl={id:"import-wrapper"},gl={class:"basic-btn"},yl={class:"import-info"},Cl=e.defineComponent({name:"JcImportDialog",__name:"index",props:{btnName:{type:String,default:"导入"},title:{type:String,default:"导入"},importInfoArr:{type:Array,default:()=>["表头字段不可重复","表格中存在多条相同记录时,以第一条为准","导入格式为xlsx(手动修改文件后缀无效),行数不超过5000条,文件大小不超过5M"]},uploadFileFn:{type:Function,required:!0},downloadFileFn:{type:Function}},emits:["onSuccess","onError"],setup(t,{emit:n}){const l=t,i=n,s=e.ref(!1),o=e.ref(),a=e.ref(!1),r=()=>{s.value=!0,e.nextTick(()=>{o.value.clearFiles()})},c=u=>{if(!l.uploadFileFn){A.ElMessage.warning("导入函数未定义");return}const v=A.ElLoading.service({lock:!0,text:"导入中,请耐心等待ing.....",spinner:"el-icon-loading",background:"rgba(0, 0, 0, 0.7)"});o.value.clearFiles();const f=new FormData;f.append("file",u.file),l.uploadFileFn(f).then(y=>{v.close(),y.code===200?(A.ElMessage.success("导入成功"),s.value=!1,i("onSuccess")):(A.ElMessage.warning(y.message||"导入失败"),i("onError"))})},d=()=>{if(!l.downloadFileFn){A.ElMessage.warning("下载函数未定义");return}a.value=!0,l.downloadFileFn().then(u=>{a.value=!1,u.code===200?A.ElMessage.success("下载导入模版成功"):A.ElMessage.warning(u.message||"下载导入模版失败")})};return(u,v)=>{const f=e.resolveComponent("el-button"),y=e.resolveComponent("el-upload"),F=e.resolveComponent("el-icon"),E=e.resolveComponent("el-dialog");return e.openBlock(),e.createElementBlock("div",pl,[e.createVNode(f,e.mergeProps(u.$attrs,{onClick:r}),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.btnName),1)]),_:1},16),e.createVNode(E,e.mergeProps({modelValue:s.value,"onUpdate:modelValue":v[0]||(v[0]=b=>s.value=b),title:t.title,class:"is-no-footer",width:"800px"},u.$attrs,{top:"10vh",style:{height:"calc(100vh - 200px)"}}),{default:e.withCtx(()=>[e.createElementVNode("div",vl,[e.createElementVNode("div",gl,[e.createElementVNode("div",null,[e.createVNode(y,{ref_key:"importUploadRef",ref:o,"http-request":c,action:"#","show-file-list":!1,accept:".xlsx,.xls,.txt",limit:1,style:{margin:"0 10px 0px 0px"}},{default:e.withCtx(()=>[e.createVNode(f,{type:"primary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.title),1)]),_:1})]),_:1},512)]),e.createVNode(f,{type:"primary",text:"",loading:a.value,onClick:d},{default:e.withCtx(()=>v[1]||(v[1]=[e.createTextVNode("下载导入模板")])),_:1,__:[1]},8,["loading"])]),e.createElementVNode("div",yl,[e.createElementVNode("div",null,[e.createVNode(F,{color:"#005bf5",size:18,class:"icon"},{default:e.withCtx(()=>[e.createVNode(e.unref(Z.InfoFilled))]),_:1})]),e.createElementVNode("ol",null,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.importInfoArr,(b,m)=>(e.openBlock(),e.createElementBlock("li",{key:m},[e.createElementVNode("span",null,e.toDisplayString(b),1)]))),128))])])])]),_:1},16,["modelValue","title"])])}}}),bl=Le(Cl,[["__scopeId","data-v-2660dae9"]]),pt=te(bl),xl={class:"jc-import-button"},wl=e.defineComponent({name:"JcImportButton",__name:"index",props:{btnName:{type:String,default:"导入"},uploadFileFn:{type:Function,required:!0}},emits:["onSuccess","onError"],setup(t,{emit:n}){const l=t,i=n,s=e.ref(!1),o=e.ref(),a=r=>{if(!l.uploadFileFn){A.ElMessage.warning("导入函数未定义");return}const c=A.ElLoading.service({lock:!0,text:"导入中,请耐心等待ing.....",spinner:"el-icon-loading",background:"rgba(0, 0, 0, 0.7)"});o.value.clearFiles();const d=new FormData;d.append("file",r.file),l.uploadFileFn(d).then(u=>{c.close(),u.code===200?(A.ElMessage.success("导入成功"),s.value=!1,i("onSuccess")):(A.ElMessage.warning(u.message||"导入失败"),i("onError"))})};return(r,c)=>{const d=e.resolveComponent("el-button"),u=e.resolveComponent("el-upload");return e.openBlock(),e.createElementBlock("div",xl,[e.createVNode(u,e.mergeProps({ref_key:"importUploadRef",ref:o,"http-request":a,action:"#","show-file-list":!1,accept:".xlsx,.xls,.txt",limit:1},r.$attrs),{default:e.withCtx(()=>[e.createVNode(d,e.normalizeProps(e.guardReactiveProps(r.$attrs)),{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.btnName),1)]),_:1},16)]),_:1},16)])}}}),vt=te(wl),kl="VXE_TABLE_CUSTOM_COLUMN_",$e=1,El=["checkbox","seq","radio","expand"],Oe=(t,n)=>`${n}${t}`,ye=(t,n)=>{try{const l=Oe(t,n),i=localStorage.getItem(l);if(!i)return null;const s=JSON.parse(i);return s.version!==$e?(console.warn(`[ToolbarColumnConfigV2] 存储版本不匹配 (当前: ${s.version}, 期望: ${$e}),将使用默认配置`),null):s}catch(l){return console.error("[ToolbarColumnConfigV2] 读取列配置存储失败:",l),null}},Me=(t,n,l)=>{try{const i=Oe(t,n),s={version:$e,timestamp:Date.now(),columns:l};localStorage.setItem(i,JSON.stringify(s))}catch(i){console.error("[ToolbarColumnConfigV2] 保存列配置存储失败:",i)}},Sl=(t,n)=>{try{const l=Oe(t,n);localStorage.removeItem(l)}catch(l){console.error("[ToolbarColumnConfigV2] 删除列配置存储失败:",l)}},_l=(t,n,l,i,s)=>{const o=ye(t,n);if(o){const a=o.columns.find(r=>r.field===l);a?a.width=i:o.columns.push({field:l,visible:!0,width:i,sortNumber:o.columns.length}),Me(t,n,o.columns)}else if(s){const a=s.map(r=>r.field===l?{...r,width:i}:r);Me(t,n,a)}},Vl=(t,n)=>{const l=ye(t,n);return l!==null&&l.columns.length>0};function Nl(t){const{table:n,lockFieldList:l,maxFixedCount:i,storagePrefix:s,columnGroupsConfig:o,defaultVisibleFields:a}=t,r=e.ref([]),c=e.ref([]),d=e.ref([]),u=e.ref([]),v=e.computed(()=>d.value.map(h=>r.value.find(B=>B.field===h)).filter(h=>h!==void 0)),f=e.computed(()=>r.value.filter(h=>h.visible).sort((h,B)=>h.sortNumber-B.sortNumber)),y=e.computed(()=>f.value.length),F=e.computed(()=>f.value.filter(h=>h.fixed==="left").length),E=e.computed(()=>f.value.filter(h=>h.fixed==="right").length),b=e.computed(()=>F.value+E.value),m=e.computed(()=>r.value.length>0&&r.value.every(h=>h.visible)),p=e.computed(()=>{const h=r.value.filter(B=>B.visible).length;return h>0&&h<r.value.length}),x=h=>h.fixed==="left"?!0:b.value<i.value,w=h=>h.fixed==="right"?!0:b.value<i.value,k=h=>!!(h.type&&El.includes(h.type)),S=()=>{const h=o.value||[],B=r.value.map(K=>K.field),O=new Set,j=h.map((K,le)=>{const fe=K.fields.filter(ue=>B.includes(ue));return fe.forEach(ue=>O.add(ue)),{id:`group_${le}`,title:K.title,fields:fe}}).filter(K=>K.fields.length>0),R=B.filter(K=>!O.has(K));if(R.length>0||j.length===0){const K={id:"__default__",title:"基础信息",fields:R.length>0?R:B,isDefault:!0};j.push(K)}c.value=j},g=()=>{const h=n.value;if(!h||u.value.length>0)return;const B=h.getTableColumn(),O=B.fullColumn||B.tableColumn||h.getColumns();u.value=G.cloneDeep(O);const j=O.filter(R=>!k(R)&&R.field);d.value=j.map(R=>R.field)},z=()=>{const h=n.value;if(!h||!h.id)return;const B=h.id,O=h.getTableColumn(),j=O.fullColumn||O.tableColumn||h.getColumns(),R=ye(B,s.value),K=new Map((R==null?void 0:R.columns.map(P=>[P.field,P]))||[]),le=j.filter(P=>!k(P)&&P.field),fe=a.value.length>0,ue=le.map((P,W)=>{const ce=P.field,ee=K.get(ce),yt=l.value.includes(ce),Ct=ee?ee.visible:fe?a.value.includes(ce):P.visible!==!1;return{field:ce,title:P.title||ce||"未命名",visible:Ct,fixed:(ee==null?void 0:ee.fixed)||P.fixed||void 0,width:(ee==null?void 0:ee.width)||P.renderWidth||void 0,sortNumber:(ee==null?void 0:ee.sortNumber)??W,visibleLocked:yt,originalIndex:W}});r.value=ue,S(),r.value.forEach(P=>{const W=c.value.find(ce=>ce.fields.includes(P.field));P.groupId=W==null?void 0:W.id})},L=()=>r.value.map(h=>({field:h.field,visible:h.visible,fixed:h.fixed,width:h.width,sortNumber:h.sortNumber})),V=()=>{const h=u.value;return h.length?h.filter(O=>!k(O)&&O.field).map((O,j)=>{const R=O.field;return{field:R,visible:a.value.includes(R),fixed:O.fixed||void 0,width:O.width||void 0,sortNumber:j}}):[]},D=async h=>{const B=n.value;if(!B)return;const O=B.getTableColumn(),j=O.fullColumn||O.tableColumn||B.getColumns(),R=j.filter(P=>k(P)),K=j.filter(P=>!k(P)),le=new Map(h.map(P=>[P.field,P])),fe=K.map(P=>{const W=le.get(P.field);return W&&(P.visible=W.visible,P.fixed=W.fixed||"",W.width&&(P.width=W.width)),{column:P,sortNumber:(W==null?void 0:W.sortNumber)??9999}}).sort((P,W)=>P.sortNumber-W.sortNumber).map(P=>P.column),ue=[...R,...fe];await B.loadColumn(ue)};return{allColumns:r,columnGroups:c,originalOrder:d,filteredColumns:v,selectedColumns:f,selectedCount:y,leftFixedCount:F,rightFixedCount:E,totalFixedCount:b,selectAll:m,isIndeterminate:p,canFixLeft:x,canFixRight:w,initColumns:z,buildCurrentConfig:L,applyConfigToTable:D,loadStoredConfig:async()=>{const h=n.value;if(!h||!h.id)return;g();const B=ye(h.id,s.value);if(B&&B.columns.length)await D(B.columns);else if(a.value.length>0){const O=V();await D(O)}},saveAndApply:async()=>{const h=n.value;if(!h||!h.id)throw new Error("表格实例不存在或未设置 ID");const B=L();await D(B),Me(h.id,s.value,B)},resetToDefault:async()=>{const h=n.value;if(!(!h||!h.id)){if(Sl(h.id,s.value),u.value.length?await h.reloadColumn(G.cloneDeep(u.value)):await h.refreshColumn(),a.value.length>0){const B=V();await D(B)}z()}},onResizableChange:h=>{const B=n.value;if(!B||!B.id)return;const{column:O}=h,j=O.field,R=O.renderWidth;if(!j||!R)return;const K=r.value.find(le=>le.field===j);K&&(K.width=R),_l(B.id,s.value,j,R,L())},checkHasStoredConfig:()=>{const h=n.value;return!h||!h.id?!1:Vl(h.id,s.value)},updateSelectedOrder:h=>{h.forEach((B,O)=>{const j=r.value.find(R=>R.field===B.field);j&&(j.sortNumber=O)})},onSelectAllChange:h=>{r.value.forEach(B=>{B.visibleLocked||(B.visible=h)})},onColumnVisibleChange:h=>{!h.visible&&h.fixed&&(h.fixed=void 0)},onDragEnd:()=>{f.value.forEach((h,B)=>{h.sortNumber=B})},moveToTop:(h,B)=>{var R;if(B===0)return;const j=((R=r.value.filter(K=>K.visible).sort((K,le)=>K.sortNumber-le.sortNumber)[0])==null?void 0:R.sortNumber)??0;h.sortNumber=j-1},removeFromSelected:h=>h.visibleLocked?!1:(h.visible=!1,h.fixed&&(h.fixed=void 0),!0),toggleFixed:(h,B)=>h.fixed===B?(h.fixed=void 0,!0):B==="left"&&!x(h)||B==="right"&&!w(h)?!1:(h.fixed=B,!0),onGroupSelectChange:(h,B)=>{const O=c.value.find(j=>j.id===h);O&&r.value.forEach(j=>{O.fields.includes(j.field)&&!j.visibleLocked&&(j.visible=B)})},getGroupCheckState:h=>{const B=c.value.find(R=>R.id===h);if(!B)return{checked:!1,indeterminate:!1};const O=r.value.filter(R=>B.fields.includes(R.field)&&!R.visibleLocked);if(O.length===0)return{checked:!0,indeterminate:!1};const j=O.filter(R=>R.visible).length;return{checked:j===O.length,indeterminate:j>0&&j<O.length}}}}const Al={class:"toolbar-column-config"},Fl={class:"column-config-body"},Bl={class:"column-list-left"},Il={class:"left-header"},zl={class:"column-grid-wrapper"},$l={class:"group-header"},Ml={class:"group-title"},Tl={class:"group-count"},Dl={class:"column-grid"},Ll=["title"],Ol={key:0,class:"vxe-icon-lock lock-icon"},Rl={class:"column-list-right"},jl={class:"right-header"},Pl={class:"selected-list-wrapper"},ql={class:"selected-item"},Ul={class:"index"},Ql=["title"],Kl={class:"item-actions"},Jl=["onClick"],Hl=["onClick"],Wl=["onClick"],Gl=["onClick"],Yl={class:"drawer-footer"},Xl={class:"footer-right"},Zl=e.defineComponent({name:"JcColumnConfig",__name:"index",props:{table:{type:Object,default:null},itemWidth:{type:Number,default:110},drawerWidth:{type:String,default:"720px"},maxFixedCount:{type:Number,default:4},lockFieldList:{type:Array,default:()=>[]},storagePrefix:{type:String,default:kl},columnGroups:{type:Array,default:()=>[]},defaultVisibleFields:{type:Array,default:()=>[]}},emits:["change","saved","reset","width-change"],setup(t,{expose:n,emit:l}){const i=t,s=l,o=Nl({table:e.toRef(i,"table"),lockFieldList:e.toRef(i,"lockFieldList"),maxFixedCount:e.toRef(i,"maxFixedCount"),storagePrefix:e.toRef(i,"storagePrefix"),columnGroupsConfig:e.toRef(i,"columnGroups"),defaultVisibleFields:e.toRef(i,"defaultVisibleFields")}),a=e.ref(!1),r=e.ref(""),c=e.computed(()=>{const S=o.filteredColumns.value;if(!r.value)return S;const g=r.value.toLowerCase();return S.filter(z=>(z.title||z.field||"").toLowerCase().includes(g))}),d=e.computed(()=>o.columnGroups.value.map(S=>({...S,columns:c.value.filter(g=>g.groupId===S.id),checkState:o.getGroupCheckState(S.id)})).filter(S=>S.columns.length>0)),u=(S,g)=>{o.onGroupSelectChange(S,g)};e.watch(()=>i.table,async S=>{S&&S.id&&(await e.nextTick(),await x())},{immediate:!0});const v=()=>{if(!i.table){A.ElMessage.warning("表格实例未就绪");return}o.initColumns(),a.value=!0},f=()=>{a.value=!1},y=()=>{a.value=!1},F=S=>{o.onSelectAllChange(S)},E=(S,g)=>{o.toggleFixed(S,g)||A.ElMessage.warning(`最多只能固定 ${i.maxFixedCount} 列`)},b=S=>{o.removeFromSelected(S)||A.ElMessage.warning("该列不能取消选中")},m=async()=>{try{await o.saveAndApply(),s("saved",o.allColumns.value),A.ElMessage.success("列配置已保存并应用"),a.value=!1}catch(S){console.error("保存列配置失败:",S),A.ElMessage.error("保存列配置失败")}},p=async()=>{try{await A.ElMessageBox.confirm("确定要恢复默认配置吗?(包括可见、固定、排序、列宽)。","提示",{confirmButtonText:"确定",cancelButtonText:"取消",type:"warning"}),await o.resetToDefault(),s("reset"),A.ElMessage.success("已恢复默认配置")}catch{}},x=async()=>{await o.loadStoredConfig()};return n({openDrawer:v,closeDrawer:f,loadStoredConfig:x,resetToDefault:p,saveAndApply:m,onResizableChange:S=>{o.onResizableChange(S);const g=S.column.field,z=S.column.renderWidth;g&&z&&s("width-change",{field:g,width:z})},hasStoredConfig:()=>o.checkHasStoredConfig()}),(S,g)=>{const z=e.resolveComponent("el-icon"),L=e.resolveComponent("el-button"),V=e.resolveComponent("el-input"),D=e.resolveComponent("el-checkbox"),T=e.resolveComponent("el-tooltip"),U=e.resolveComponent("el-drawer");return e.openBlock(),e.createElementBlock("div",Al,[e.createVNode(L,{link:"",class:"config-trigger-btn",onClick:v},{default:e.withCtx(()=>[e.createVNode(z,{size:16},{default:e.withCtx(()=>[e.createVNode(e.unref(Z.Setting))]),_:1})]),_:1}),e.createVNode(U,{modelValue:a.value,"onUpdate:modelValue":g[1]||(g[1]=I=>a.value=I),title:"列配置",direction:"rtl",size:t.drawerWidth,"close-on-click-modal":!1,class:"column-config-drawer"},{header:e.withCtx(()=>g[2]||(g[2]=[e.createElementVNode("div",{class:"drawer-header"},[e.createElementVNode("span",{class:"drawer-title"},"列配置")],-1)])),footer:e.withCtx(()=>[e.createElementVNode("div",Yl,[e.createVNode(L,{onClick:p},{default:e.withCtx(()=>g[9]||(g[9]=[e.createTextVNode("恢复默认")])),_:1,__:[9]}),e.createElementVNode("div",Xl,[e.createVNode(L,{onClick:y},{default:e.withCtx(()=>g[10]||(g[10]=[e.createTextVNode("取消")])),_:1,__:[10]}),e.createVNode(L,{type:"primary",onClick:m},{default:e.withCtx(()=>g[11]||(g[11]=[e.createTextVNode("保存并应用")])),_:1,__:[11]})])])]),default:e.withCtx(()=>[e.createElementVNode("div",Fl,[e.createElementVNode("div",Bl,[e.createElementVNode("div",Il,[e.createVNode(V,{modelValue:r.value,"onUpdate:modelValue":g[0]||(g[0]=I=>r.value=I),placeholder:"搜索",clearable:"","prefix-icon":e.unref(Z.Search),size:"small"},null,8,["modelValue","prefix-icon"]),e.createVNode(D,{"model-value":e.unref(o).selectAll.value,indeterminate:e.unref(o).isIndeterminate.value,class:"select-all-checkbox",onChange:F},{default:e.withCtx(()=>g[3]||(g[3]=[e.createTextVNode(" 全选 ")])),_:1,__:[3]},8,["model-value","indeterminate"])]),e.createElementVNode("div",zl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(d.value,I=>(e.openBlock(),e.createElementBlock("div",{key:I.id,class:"column-group"},[e.createElementVNode("div",$l,[e.createVNode(D,{"model-value":I.checkState.checked,indeterminate:I.checkState.indeterminate,onChange:C=>u(I.id,C),size:"small"},{default:e.withCtx(()=>[e.createElementVNode("span",Ml,e.toDisplayString(I.title),1),e.createElementVNode("span",Tl,"("+e.toDisplayString(I.columns.length)+")",1)]),_:2},1032,["model-value","indeterminate","onChange"])]),e.createElementVNode("div",Dl,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(I.columns,C=>(e.openBlock(),e.createElementBlock("div",{key:C.field,class:"column-checkbox-item",style:e.normalizeStyle({width:t.itemWidth+"px"})},[e.createVNode(D,{modelValue:C.visible,"onUpdate:modelValue":_=>C.visible=_,disabled:C.visibleLocked,onChange:_=>e.unref(o).onColumnVisibleChange(C),size:"small"},{default:e.withCtx(()=>[e.createElementVNode("span",{class:"column-title",title:C.title},[e.createTextVNode(e.toDisplayString(C.title||C.field)+" ",1),C.visibleLocked?(e.openBlock(),e.createElementBlock("i",Ol)):e.createCommentVNode("",!0)],8,Ll)]),_:2},1032,["modelValue","onUpdate:modelValue","disabled","onChange"])],4))),128))])]))),128))])]),e.createElementVNode("div",Rl,[e.createElementVNode("div",jl,[e.createElementVNode("span",null,"已选("+e.toDisplayString(e.unref(o).selectedCount.value)+")",1),g[4]||(g[4]=e.createElementVNode("span",{class:"drag-hint"},"编号可拖拽排序",-1))]),e.createElementVNode("div",Pl,[e.createVNode(e.unref(xt),{"item-key":"field",animation:200,"ghost-class":"ghost-item","model-value":e.unref(o).selectedColumns.value,"onUpdate:modelValue":e.unref(o).updateSelectedOrder,onEnd:e.unref(o).onDragEnd},{item:e.withCtx(({element:I,index:C})=>[e.createElementVNode("div",ql,[e.createElementVNode("span",Ul,e.toDisplayString(C+1),1),e.createElementVNode("span",{class:"title",title:I.title},e.toDisplayString(I.title||I.field),9,Ql),e.createElementVNode("div",Kl,[e.createVNode(T,{content:"取消选中",placement:"top","show-after":500,disabled:I.visibleLocked},{default:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass(["action-btn remove-btn",{"is-hidden":I.visibleLocked}]),onClick:_=>!I.visibleLocked&&b(I)},g[5]||(g[5]=[e.createElementVNode("i",{class:"vxe-icon-close"},null,-1)]),10,Jl)]),_:2},1032,["disabled"]),e.createVNode(T,{content:"置顶",placement:"top","show-after":500,disabled:C===0},{default:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass(["action-btn",{"is-hidden":C===0}]),onClick:_=>C!==0&&e.unref(o).moveToTop(I,C)},g[6]||(g[6]=[e.createElementVNode("i",{class:"vxe-icon-caret-up"},null,-1)]),10,Hl)]),_:2},1032,["disabled"]),e.createVNode(T,{content:"固定到左侧",placement:"top","show-after":500},{default:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass(["fixed-btn",{"is-active":I.fixed==="left","is-disabled":!e.unref(o).canFixLeft(I)}]),onClick:_=>E(I,"left")},g[7]||(g[7]=[e.createElementVNode("i",{class:"vxe-icon-fixed-left"},null,-1)]),10,Wl)]),_:2},1024),e.createVNode(T,{content:"固定到右侧",placement:"top","show-after":500},{default:e.withCtx(()=>[e.createElementVNode("span",{class:e.normalizeClass(["fixed-btn",{"is-active":I.fixed==="right","is-disabled":!e.unref(o).canFixRight(I)}]),onClick:_=>E(I,"right")},g[8]||(g[8]=[e.createElementVNode("i",{class:"vxe-icon-fixed-right"},null,-1)]),10,Gl)]),_:2},1024)])])]),_:1},8,["model-value","onUpdate:modelValue","onEnd"])])])])]),_:1},8,["modelValue","size"])])}}}),ei=Le(Zl,[["__scopeId","data-v-f5267788"]]),gt=te(ei),ti=Object.freeze(Object.defineProperty({__proto__:null,JcCascader:at,JcColumnConfig:gt,JcDatePicker:ut,JcImportButton:vt,JcImportDialog:pt,JcInputComplex:dt,JcInputSwitch:ct,JcListLayout:mt,JcMoreQueryContain:ht,JcSelectQuery:rt,JcTagQuery:ft},Symbol.toStringTag,{value:"Module"})),ni=(t={},n="jc-query-injection-key")=>{t.resetCount=0;const l=G.cloneDeep(t),i=e.reactive({queryForm:l,tags:[]}),{useProvideQueryStore:s}=ae(n),{state:o,setQuery:a,addTag:r,reduceTag:c,reduceAllTag:d,clearQuery:u}=s(i),v=()=>{o.queryForm.resetCount++,u(t)};return{queryForm:o.queryForm,setQuery:a,addTag:r,reduceTag:c,reduceAllTag:d,clearQuery:v}},li={install:t=>{for(const n of Object.values(ti))t.use(n)}};exports.JcCascader=at;exports.JcColumnConfig=gt;exports.JcDatePicker=ut;exports.JcImportButton=vt;exports.JcImportDialog=pt;exports.JcInputComplex=dt;exports.JcInputSwitch=ct;exports.JcListLayout=mt;exports.JcMoreQueryContain=ht;exports.JcSelectQuery=rt;exports.JcTagQuery=ft;exports.default=li;exports.reactiveQuery=ni;
|
|
@@ -28,6 +28,10 @@ export declare const JcColumnConfig: {
|
|
|
28
28
|
type: import('vue').PropType<import('./types').ColumnGroupConfig[]>;
|
|
29
29
|
default: () => never[];
|
|
30
30
|
};
|
|
31
|
+
defaultVisibleFields: {
|
|
32
|
+
type: import('vue').PropType<string[]>;
|
|
33
|
+
default: () => never[];
|
|
34
|
+
};
|
|
31
35
|
}>> & Readonly<{
|
|
32
36
|
onChange?: ((config: import('./types').ColumnConfig[]) => any) | undefined;
|
|
33
37
|
onReset?: (() => any) | undefined;
|
|
@@ -57,6 +61,7 @@ export declare const JcColumnConfig: {
|
|
|
57
61
|
lockFieldList: string[];
|
|
58
62
|
maxFixedCount: number;
|
|
59
63
|
storagePrefix: string;
|
|
64
|
+
defaultVisibleFields: string[];
|
|
60
65
|
itemWidth: number;
|
|
61
66
|
drawerWidth: string;
|
|
62
67
|
columnGroups: import('./types').ColumnGroupConfig[];
|
|
@@ -96,6 +101,10 @@ export declare const JcColumnConfig: {
|
|
|
96
101
|
type: import('vue').PropType<import('./types').ColumnGroupConfig[]>;
|
|
97
102
|
default: () => never[];
|
|
98
103
|
};
|
|
104
|
+
defaultVisibleFields: {
|
|
105
|
+
type: import('vue').PropType<string[]>;
|
|
106
|
+
default: () => never[];
|
|
107
|
+
};
|
|
99
108
|
}>> & Readonly<{
|
|
100
109
|
onChange?: ((config: import('./types').ColumnConfig[]) => any) | undefined;
|
|
101
110
|
onReset?: (() => any) | undefined;
|
|
@@ -117,6 +126,7 @@ export declare const JcColumnConfig: {
|
|
|
117
126
|
lockFieldList: string[];
|
|
118
127
|
maxFixedCount: number;
|
|
119
128
|
storagePrefix: string;
|
|
129
|
+
defaultVisibleFields: string[];
|
|
120
130
|
itemWidth: number;
|
|
121
131
|
drawerWidth: string;
|
|
122
132
|
columnGroups: import('./types').ColumnGroupConfig[];
|
|
@@ -153,6 +163,10 @@ export declare const JcColumnConfig: {
|
|
|
153
163
|
type: import('vue').PropType<import('./types').ColumnGroupConfig[]>;
|
|
154
164
|
default: () => never[];
|
|
155
165
|
};
|
|
166
|
+
defaultVisibleFields: {
|
|
167
|
+
type: import('vue').PropType<string[]>;
|
|
168
|
+
default: () => never[];
|
|
169
|
+
};
|
|
156
170
|
}>> & Readonly<{
|
|
157
171
|
onChange?: ((config: import('./types').ColumnConfig[]) => any) | undefined;
|
|
158
172
|
onReset?: (() => any) | undefined;
|
|
@@ -182,6 +196,7 @@ export declare const JcColumnConfig: {
|
|
|
182
196
|
lockFieldList: string[];
|
|
183
197
|
maxFixedCount: number;
|
|
184
198
|
storagePrefix: string;
|
|
199
|
+
defaultVisibleFields: string[];
|
|
185
200
|
itemWidth: number;
|
|
186
201
|
drawerWidth: string;
|
|
187
202
|
columnGroups: import('./types').ColumnGroupConfig[];
|
|
@@ -30,6 +30,10 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
30
30
|
type: PropType<ColumnGroupConfig[]>;
|
|
31
31
|
default: () => never[];
|
|
32
32
|
};
|
|
33
|
+
defaultVisibleFields: {
|
|
34
|
+
type: PropType<string[]>;
|
|
35
|
+
default: () => never[];
|
|
36
|
+
};
|
|
33
37
|
}>, {
|
|
34
38
|
openDrawer: () => void;
|
|
35
39
|
closeDrawer: () => void;
|
|
@@ -75,6 +79,10 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
75
79
|
type: PropType<ColumnGroupConfig[]>;
|
|
76
80
|
default: () => never[];
|
|
77
81
|
};
|
|
82
|
+
defaultVisibleFields: {
|
|
83
|
+
type: PropType<string[]>;
|
|
84
|
+
default: () => never[];
|
|
85
|
+
};
|
|
78
86
|
}>> & Readonly<{
|
|
79
87
|
onChange?: ((config: ColumnConfig[]) => any) | undefined;
|
|
80
88
|
onReset?: (() => any) | undefined;
|
|
@@ -88,6 +96,7 @@ declare const _default: import('vue').DefineComponent<import('vue').ExtractPropT
|
|
|
88
96
|
lockFieldList: string[];
|
|
89
97
|
maxFixedCount: number;
|
|
90
98
|
storagePrefix: string;
|
|
99
|
+
defaultVisibleFields: string[];
|
|
91
100
|
itemWidth: number;
|
|
92
101
|
drawerWidth: string;
|
|
93
102
|
columnGroups: ColumnGroupConfig[];
|
|
@@ -7,6 +7,8 @@ export interface UseColumnConfigOptions {
|
|
|
7
7
|
maxFixedCount: Ref<number>;
|
|
8
8
|
storagePrefix: Ref<string>;
|
|
9
9
|
columnGroupsConfig: Ref<ColumnGroupConfig[]>;
|
|
10
|
+
/** 默认可见的字段列表(仅这些字段可见,其他隐藏) */
|
|
11
|
+
defaultVisibleFields: Ref<string[]>;
|
|
10
12
|
}
|
|
11
13
|
export declare function useColumnConfig(options: UseColumnConfigOptions): {
|
|
12
14
|
allColumns: Ref<{
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bscjc/webui",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "1.4.
|
|
4
|
+
"version": "1.4.1",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/lib/index.cjs",
|
|
7
7
|
"module": "./dist/es/index.mjs",
|
|
@@ -55,5 +55,5 @@
|
|
|
55
55
|
"cssnano": "^7.0.7",
|
|
56
56
|
"unplugin-element-plus": "^0.10.0"
|
|
57
57
|
},
|
|
58
|
-
"gitHead": "
|
|
58
|
+
"gitHead": "1e9d673f933fc2ff528d6faedf03d43b46a1a437"
|
|
59
59
|
}
|