layui.define(["jquery","dropdown","table","form"],function(C){"use strict";var O=layui.dropdown,u=layui.table,a=layui.jquery,E=layui.form,k="dropdownTable",S={version:"1.0.4",config:{selectType:"radio",emptyMsg:"点击此处选择"},index:layui[k]?layui[k].index+1e4:0,set:function(e){var o,r;this.config=a.extend(!0,{},that.config,e);let t=this.config,l=t.selectType,i={type:l,fixed:"left"};return((r=(o=t==null?void 0:t.selectTable)==null?void 0:o.cols)!=null?r:[[]]).forEach(f=>{JSON.stringify(f).indexOf(JSON.stringify(i))<0&&f.splice(0,0,i)}),that}},v=function(){let e=this,t=e.config,l=t.id||e.index;return v.that[l]=e,{config:t,reload:function(i){e.reload.call(e,i)}}},x=function(e){var r,f;let t=++S.index;this.index=t,this.tableId="dropdown-select-table-"+t,this.dropdownId="dropdown-"+t,this.config=a.extend(!0,{},S.config,e,{selectedIds:[],selectedDisplayValues:[]});let l=this.config,i=l.selectType,n={type:i,fixed:"left"},o=(f=(r=l==null?void 0:l.selectTable)==null?void 0:r.cols)!=null?f:[[]];i==="checkbox"&&o.forEach(d=>{JSON.stringify(d).indexOf(JSON.stringify(n))<0&&d.splice(0,0,n)}),this.render()};x.prototype.reloadSelectTable=function(e){let t=this.config;layui.each(e,function(l,i){layui.type(i)==="array"&&delete t.selectTable[l]}),a.extend(!0,t.selectTable,e),this.clearSelected()},x.prototype.clearSelected=function(){let e=this.config,t=e.bindInput;a(t).val(""),a(t)[0].dataset.displayValue="",a.extend(e,{selectedIds:[],selectedDisplayValues:[]}),this.setSelectedDisplayAndValue()},x.prototype.render=function(){let e=this,t=e.config;(t.elem=a(t.elem))[0]&&(e.initElemArea(),e.iniDropdown())},x.prototype.initElemArea=function(){var w,V,D;let e=this,t=this.config,l=t.elem,i=(V=(w=this.config)==null?void 0:w.searchName)!=null?V:"keywords";a(l).css({display:"inline-block",width:"80%",height:"100%","min-height":"35px",border:"1px solid #eee","line-height":"35px","box-sizing":"border-box",padding:"0 10px",cursor:"pointer"}),a(l).hover(()=>{a(l).css({"border-color":"#e2e2e2"})},()=>{a(l).css({"border-color":"#eee"})});let n=a("");n.css({display:"inline-block",width:"20%","min-width":"45px",height:"100%","box-sizing":"border-box","font-size":"12px",padding:"0","line-height":"36px"}),(D=t==null?void 0:t.needPopup)==null||D?a(l).after(n):a(l).css({width:"100%"});let o=`