import{J as e,$ as t,q as s,c as a,w as l,i as o,o as i,t as c,v as n,A as r,C as d,D as u,F as m,a0 as f,a5 as h,x as p}from"./index-DL8B2Mxu.js";import{_}from"./u-search.C1fh-wIV.js";import{r as y}from"./uni-app.es.BSVEa1f2.js";import{_ as b}from"./u-avatar.oTnux-Fl.js";import{_ as L}from"./u-icon.CLOPtL2B.js";import{_ as k}from"./mescroll-body.DoI4hLy1.js";import{_ as x}from"./u-button.D-oh2uo-.js";import{i as g}from"./flowBefore.CVOgWZ1y.js";import{r as w}from"./resources.DipqUmnN.js";import{M as C}from"./mescroll-mixins.DNza9FDh.js";import{_ as S}from"./_plugin-vue_export-helper.BCo6x5W8.js";const I=S({mixins:[C],data:()=>({downOption:{use:!0,auto:!0},upOption:{page:{num:0,size:20,time:null},empty:{use:!0,icon:w.message.nodata,tip:"暂无数据",fixed:!0,top:"300rpx"},textNoMore:"没有更多数据"},onLoadData:{},safeAreaInsetBottom:!0,list:[],show:!1,keyword:"",selectList:[],multiple:!0}),onLoad(e){this.show=!0,this.onLoadData=JSON.parse(decodeURIComponent(e.data)),this.selectList=this.onLoadData.selectList},computed:{baseURL(){return this.define.baseURL}},methods:{upCallback(e){let t={currentPage:e.num,pageSize:e.size,keyword:this.keyword,...this.onLoadData.formData,nodeCode:this.onLoadData.nodeId};g(this.onLoadData.taskId||0,t,{load:1==e.num}).then((t=>{this.mescroll.endSuccess(t.data.list.length),1==e.num&&(this.list=[]);const s=t.data.list;this.list=this.list.concat(s)})).catch((()=>{this.mescroll.endErr()}))},search(){this.searchTimer&&clearTimeout(this.searchTimer),this.searchTimer=setTimeout((()=>{this.list=[],this.mescroll.resetUpScroll()}),300)},onSelect(e){let t=!1;for(let s=0;s<this.selectList.length;s++)if(this.selectList[s].id===e.id)return void(t=!0);!t&&this.selectList.push(e),this.selectList=this.selectList.map((e=>({nodeId:this.onLoadData.nodeId,...e})))},delSelect(e){this.selectList.splice(e,1)},close(){this.list=[],this.$emit("input",!1)},getResult(s){if("confirm"!=s)return e();t(s,this.selectList,this.onLoadData.nodeId),e()},setCheckAll(){this.selectList=[]}}},[["render",function(e,t,g,w,C,S){const I=y(s("u-search"),_),D=o,j=y(s("u-avatar"),b),U=y(s("u-icon"),L),v=h,z=y(s("mescroll-body"),k),R=y(s("u-button"),x);return i(),a(D,{class:"candidateForm-v"},{default:l((()=>[c(z,{ref:"mescrollRef",onInit:e.mescrollInit,onDown:e.downCallback,onUp:S.upCallback,sticky:!0,down:C.downOption,up:C.upOption,bottombar:!1},{default:l((()=>[c(D,{class:"treeSelect-search search-box_sticky"},{default:l((()=>[c(I,{placeholder:"请输入关键词搜索",modelValue:C.keyword,"onUpdate:modelValue":t[0]||(t[0]=e=>C.keyword=e),height:"72","show-action":!1,onChange:S.search,"bg-color":"#f0f2f6",shape:"square"},null,8,["modelValue","onChange"]),c(D,{class:"alreadySelect"},{default:l((()=>[c(D,{class:"alreadySelect__box u-flex-col"},{default:l((()=>[c(D,{class:"alreadySelect_hd u-flex"},{default:l((()=>[c(D,null,{default:l((()=>[n("已选")])),_:1}),C.multiple?(i(),a(D,{key:0,onClick:S.setCheckAll,style:{color:"#2979ff"}},{default:l((()=>[n("清空列表 ")])),_:1},8,["onClick"])):r("",!0)])),_:1}),c(D,{class:"select__box u-flex-col"},{default:l((()=>[c(v,{"scroll-y":"true",style:{"max-height":"200px"}},{default:l((()=>[c(D,{class:"u-flex select__list"},{default:l((()=>[(i(!0),d(m,null,u(C.selectList,((e,t)=>(i(),a(D,{class:"u-selectTag u-flex",key:t},{default:l((()=>[c(D,{class:"avatar"},{default:l((()=>[c(j,{src:S.baseURL+e.headIcon,mode:"circle",size:"mini"},null,8,["src"])])),_:2},1024),c(D,{class:"u-font-24 content"},{default:l((()=>[c(D,{class:"nameSty u-flex"},{default:l((()=>[c(D,{class:"nameUp"},{default:l((()=>[n(p(e.fullName),1)])),_:2},1024),c(U,{name:"close",class:"close",onClick:e=>S.delSelect(t)},null,8,["onClick"])])),_:2},1024),c(D,{class:"organizeSty"},{default:l((()=>[n(p(e.organize),1)])),_:2},1024)])),_:2},1024)])),_:2},1024)))),128))])),_:1})])),_:1})])),_:1})])),_:1})])),_:1}),c(D,{class:"listTitle"},{default:l((()=>[n("全部数据")])),_:1})])),_:1}),c(D,{class:"mescroll_body"},{default:l((()=>[c(D,{style:{},class:"lists_box"},{default:l((()=>[(i(!0),d(m,null,u(C.list,((e,t)=>(i(),a(D,{class:"list-cell-txt u-border-bottom",key:t,onClick:t=>S.onSelect(e)},{default:l((()=>[c(D,{class:"avatar"},{default:l((()=>[c(j,{src:S.baseURL+e.headIcon,mode:"circle",size:"default"},null,8,["src"])])),_:2},1024),c(D,{class:"u-font-30 content"},{default:l((()=>[c(D,{class:"nameSty"},{default:l((()=>[n(p(e.fullName),1)])),_:2},1024),c(D,{class:"organizeSty"},{default:l((()=>[n(p(e.organize),1)])),_:2},1024)])),_:2},1024)])),_:2},1032,["onClick"])))),128))])),_:1})])),_:1})])),_:1},8,["onInit","onDown","onUp","down","up"]),c(D,{class:"flowBefore-actions"},{default:l((()=>[c(R,{class:"buttom-btn",onClick:t[1]||(t[1]=e=>S.getResult("cancel"))},{default:l((()=>[n("取消")])),_:1}),c(R,{class:"buttom-btn",type:"primary",onClick:t[2]||(t[2]=f((e=>S.getResult("confirm")),["stop"]))},{default:l((()=>[n("确定")])),_:1})])),_:1})])),_:1})}],["__scopeId","data-v-eff66954"]]);export{I as default};
