!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e(require("vue")):"function"==typeof define&&define.amd?define(["vue"],e):(t="undefined"!=typeof globalThis?globalThis:t||self).index=e(t.Vue)}(this,(function(t){"use strict";var e=document.createElement("style");e.textContent=".comTable[data-v-05ce6964]{width:100%;--el-table-header-bg-color: #F0F0F0}.comTable[data-v-05ce6964]{font-size:var(--fontSize);color:var(--bodyColor)}.comTable[data-v-05ce6964] thead{color:var(--headerColor)}.comTable[data-v-05ce6964] th.el-table__cell{background-color:var(--headerBgColor)!important}.comTable .el-button+.el-button[data-v-05ce6964]{margin-left:0}.comTable .el-button--small[data-v-05ce6964]{padding:5px 6px}.trendsTable .tools[data-v-05ce6964]{text-align:right}.trendsTable .tools .one[data-v-05ce6964]{cursor:pointer;margin-right:10px}.trendsTable .tools .one[data-v-05ce6964]:last-child{margin-right:0}\n",document.head.appendChild(e);const i=((t,e)=>{const i=t.__vccOpts||t;for(const[a,l]of e)i[a]=l;return i})({name:"BigSelect",props:{modelValue:[String,Number,Array],data:Array,opts:{type:Object,default:()=>({})},label:{type:String,default:"大数据"},prop:{type:String,default:"enterpriseInfoId"},disabled:{type:Boolean,default:!1},size:{type:String,default:"default"},clearable:{type:Boolean,default:!0},multiple:{type:Boolean,default:!1},multipleLimit:{type:Number,default:0},placeholder:{type:String,default:"输入关键字回车检索"},max:{type:Number,default:100}},data(){return{originalData:this.data,total:0,showData:[],multipleChooseData:[],useOpts:void 0,id:void 0,keyword:"",tag:!0,moreVal:"输入更具体的条件查询更多数据"}},watch:{modelValue:{handler(t){this.id=this.modelValue,void 0!==this.id&&null!==this.id&&""!==this.id&&this.tag&&(this.initOpt(),this.getShowId())},deep:!0,immediate:!0},data:{handler(t){this.originalData=this.data,this.total=this.originalData.length,this.init()},deep:!0,immediate:!0}},created(){},methods:{getShowId(){let t=[];t=this.multiple?this.id:[this.id],this.$nextTick((()=>{this.showData=this.filterHandleF(),this.getRealShowData(t)})),this.$emit("update:modelValue",this.id),this.objCallBack()},selectChange(t){"getShowId"!==this.keyword?(""===t&&(this.keyword=t),this.showData=this.filterHandleF(this.keyword),this.tag=!1,this.multiple&&this.getRealShowData(this.id),this.objCallBack(),this.$emit("update:modelValue",this.id)):this.getShowId()},objCallBack(){if(this.multiple){const t=[];this.id.forEach((e=>{t.push(this.getChooseObj(e))})),this.$emit("getChooseData",t)}else this.$emit("getChooseData",this.getChooseObj(this.id))},getChooseObj(t){const e=this.showData.length;for(let i=0;i{const i=this.showData.length;let a=!1;for(let e=0;e{const e=this.originalData.length;for(let i=0;i0){const t=i.length;if(-2!==i[t-1].id)this.multipleChooseData.forEach((t=>{i.push(t)}));else{const e=i[t-1];i.pop(),this.multipleChooseData.forEach((t=>{i.push(t)})),i.push(e)}}this.showData=JSON.parse(JSON.stringify(i))},filterHandleF(t=""){const e=this.max,i=this.useOpts.key,a=this.useOpts.id;let l=[];const o=this.originalData;if(""!==t){if(l=o.filter((e=>e[i].includes(t)||e[a].toString().includes(t))),l.length>e){l=l.slice(0,e);const t={disabled:!0};t[this.useOpts.id]=-2,t[i]=this.moreVal,l.push(t)}}else if(this.total>e){l=o.slice(0,e);const t={disabled:!0};t[this.useOpts.id]=-2,t[i]=this.moreVal,l.push(t)}else l=o;return l},init(){this.initOpt(),this.showData=this.filterHandleF()},initOpt(){const t={key:"companyName",id:"id"};for(let e in this.opts)void 0!==t[e]&&(t[e]=this.opts[e]);this.useOpts=t}}},[["render",function(e,i,a,l,o,s){const h=t.resolveComponent("el-option"),d=t.resolveComponent("el-select"),n=t.resolveComponent("el-form-item");return t.openBlock(),t.createBlock(n,{label:e.label,prop:e.prop,size:e.size},{default:t.withCtx((()=>[t.createVNode(d,{modelValue:e.id,"onUpdate:modelValue":i[0]||(i[0]=t=>e.id=t),filterable:"","filter-method":e.filterF,onChange:e.selectChange,onKeyup:t.withKeys(e.enterF,["enter"]),"default-first-option":!1,clearable:e.clearable,multiple:e.multiple,"multiple-limit":e.multipleLimit,disabled:e.disabled,style:{width:"100%"},placeholder:e.placeholder},{default:t.withCtx((()=>[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.showData,((i,a)=>(t.openBlock(),t.createBlock(h,{key:a,label:i[e.useOpts.key],value:i[e.useOpts.id],disabled:i.disabled},null,8,["label","value","disabled"])))),128))])),_:1},8,["modelValue","filter-method","onChange","onKeyup","clearable","multiple","multiple-limit","disabled","placeholder"])])),_:1},8,["label","prop","size"])}],["__scopeId","data-v-05ce6964"]]),a=[i];return{install:function(t){a.map((e=>{t.component(e.name,e)}))},BigSelect:i}}));