import{d as N,c as j,h as F,g as O,j as K,S as f,E as M,l as p,U as R,o as g,a as q,e as D,x as a,y as l,A as G,u as E,b as h,K as _,p as v,m as A,w as H,q as J,a0 as $,_ as Q}from"./index.4042ed24.js";import{C as w}from"./api.3ac03a55.js";const W={class:"section-main-container layout-padding"},X={class:"section-main-padding layout-padding-auto layout-padding-view"},Y={class:"section-user-search mb15"},Z=N({__name:"index",setup(ee){const b=j(()=>!0),e=F({loading:!1,companyInfoList:[],searchInfo:{name:"",hasPoints:null,hasLocation:null,options:[],superviseDepartIds:[]},superviseDepartIdArr:[],totalCount:0,pageIndex:1,pageSize:10,pageCount:null}),B={multiple:!0,checkStrictly:!1,emitPath:!0,value:"code",label:"name"},y=O();K(()=>{k(),c()});const c=()=>{e.loading=!0;let t=[];y.value.getCheckedNodes().length&&y.value.getCheckedNodes().forEach(d=>t.push(d.value)),e.searchInfo.superviseDepartIds=t;let o={pageIndex:e.pageIndex,pageSize:e.pageSize,name:e.searchInfo.name,hasPoints:e.searchInfo.hasPoints,hasLocation:e.searchInfo.hasLocation,superviseDepartIds:e.searchInfo.superviseDepartIds||[],deskTypes:f.get("platform")==="2"?["Proprietor"]:f.get("platform")==="3"?["TemporarySecurity"]:["Normal"]};w().companyInfoSearchApi(o).then(d=>{let{status:r,message:u,data:s}=d;if(r!==200){M.error(u);return}let{pageCount:C,pageSize:m,totalCount:I}=s;e.pageSize=m,e.pageCount=C,e.totalCount=I,e.companyInfoList=s.data}),setTimeout(()=>{e.loading=!1},500)},x=()=>{let t={name:"",hasPoints:null,hasLocation:null,superviseDepartIds:[],options:e.searchInfo.options};e.superviseDepartIdArr=[],e.searchInfo=F(t),c()},k=()=>{w().searchDepartsApi({deskTypes:f.get("platform")==="2"?["Proprietor"]:f.get("platform")==="3"?["TemporarySecurity"]:["Normal"]}).then(t=>{if(t.status==200){let o=t.data;console.log(o),e.searchInfo.options=o}})},S=()=>{const t={pageIndex:e.pageIndex,pageSize:e.pageSize,name:e.searchInfo.name,hasPoints:e.searchInfo.hasPoints,hasLocation:e.searchInfo.hasLocation,superviseDepartIds:e.searchInfo.superviseDepartIds,deskTypes:f.get("platform")==="2"?["Proprietor"]:f.get("platform")==="3"?["TemporarySecurity"]:["Normal"]};e.loading=!0,w().exportCompanyInfoApi(t).then(o=>{setTimeout(()=>{e.loading=!0,c()},500);const d=o,r=new Blob([d]),u="\u4F01\u4E1A\u4FE1\u606F.xlsx";if("download"in document.createElement("a")){const s=document.createElement("a");s.download=u,s.style.display="none",s.href=URL.createObjectURL(r),document.body.appendChild(s),s.click(),URL.revokeObjectURL(s.href),document.body.removeChild(s)}else navigator.msSaveBlob(r,u)}).catch(o=>{})},z=t=>{$.push({path:"/dispatchView/unactivatedSecurityGuard",query:{companyName:t}})},V=t=>{e.pageSize=t,c()},L=t=>{e.pageIndex=t,c()};return(t,o)=>{const d=p("el-input"),r=p("el-form-item"),u=p("el-option"),s=p("el-select"),C=p("el-cascader"),m=p("el-button"),I=p("el-form"),i=p("el-table-column"),P=p("el-table"),U=p("el-pagination"),T=R("loading");return g(),q("div",W,[D("div",X,[D("div",Y,[a(I,{inline:!0,model:e.searchInfo,class:"demo-form-inline","label-position":"left",size:"default",onSubmit:o[4]||(o[4]=A(()=>{},["prevent"]))},{default:l(()=>[a(r,{label:"\u516C\u53F8\u540D\u79F0"},{default:l(()=>[a(d,{modelValue:e.searchInfo.name,"onUpdate:modelValue":o[0]||(o[0]=n=>e.searchInfo.name=n),placeholder:"\u8BF7\u8F93\u5165\u516C\u53F8\u540D\u79F0",clearable:"",onKeyup:G(c,["enter"]),style:{"max-width":"180px"}},null,8,["modelValue","onKeyup"])]),_:1}),E(b)?_("v-if",!0):(g(),h(r,{key:0,label:"\u8054\u52A8\u503C"},{default:l(()=>[a(s,{modelValue:e.searchInfo.hasPoints,"onUpdate:modelValue":o[1]||(o[1]=n=>e.searchInfo.hasPoints=n)},{default:l(()=>[a(u,{label:"\u5168\u90E8",value:null}),a(u,{label:"\u5DF2\u8D2D\u4E70",value:!0}),a(u,{label:"\u672A\u8D2D\u4E70",value:!1})]),_:1},8,["modelValue"])]),_:1})),a(r,{label:"\u76D1\u7BA1\u673A\u6784"},{default:l(()=>[a(C,{modelValue:e.superviseDepartIdArr,"onUpdate:modelValue":o[2]||(o[2]=n=>e.superviseDepartIdArr=n),options:e.searchInfo.options,props:B,"collapse-tags":"","collapse-tags-tooltip":"","show-all-levels":!1,clearable:"",ref_key:"myCascader",ref:y},null,8,["modelValue","options"])]),_:1}),_(` <el-form-item label="\u8C03\u5EA6\u53F0">
            <el-select v-model="source.searchInfo.hasDesk">
              <el-option label="\u5168\u90E8" :value="null"></el-option>
              <el-option label="\u5DF2\u8D2D\u4E70" :value="true"></el-option>
              <el-option label="\u672A\u8D2D\u4E70" :value="false"></el-option>
            </el-select>
          </el-form-item> `),a(r,{label:"\u7ECF\u7EAC\u5EA6\u5750\u6807"},{default:l(()=>[a(s,{modelValue:e.searchInfo.hasLocation,"onUpdate:modelValue":o[3]||(o[3]=n=>e.searchInfo.hasLocation=n)},{default:l(()=>[a(u,{label:"\u5168\u90E8",value:null}),a(u,{label:"\u5DF2\u8BBE\u7F6E",value:!0}),a(u,{label:"\u672A\u8BBE\u7F6E",value:!1})]),_:1},8,["modelValue"])]),_:1}),a(r,null,{default:l(()=>[a(m,{type:"primary",onClick:c},{default:l(()=>[v("\u67E5\u8BE2")]),_:1}),a(m,{type:"default",onClick:x},{default:l(()=>[v("\u91CD\u7F6E")]),_:1}),a(m,{type:"primary",onClick:S},{default:l(()=>[v("\u5BFC\u51FA")]),_:1})]),_:1})]),_:1},8,["model"])]),H((g(),h(P,{data:e.companyInfoList,style:{width:"100%"}},{default:l(()=>[a(i,{type:"index",width:"80",label:"\u5E8F\u53F7",align:"center"}),a(i,{prop:"name",label:"\u516C\u53F8\u540D\u79F0",align:"center","show-overflow-tooltip":""}),a(i,{prop:"legal",label:"\u6CD5\u4EBA/\u8D1F\u8D23\u4EBA",align:"center","show-overflow-tooltip":""}),a(i,{prop:"legalContact",label:"\u6CD5\u4EBA/\u8D1F\u8D23\u4EBA\u624B\u673A\u53F7",align:"center","show-overflow-tooltip":""}),E(b)?_("v-if",!0):(g(),h(i,{key:0,prop:"points",label:"\u8054\u52A8\u503C\u4F59\u989D",align:"center","show-overflow-tooltip":""})),E(b)?_("v-if",!0):(g(),h(i,{key:1,prop:"countOfDesk",label:"\u8C03\u5EA6\u53F0\u6570\u91CF",align:"center","show-overflow-tooltip":""})),a(i,{prop:"callerTencentUserId",label:"\u662F\u5426\u8BBE\u7F6E\u7ECF\u7EAC\u5EA6\u5750\u6807",align:"center","show-overflow-tooltip":""},{default:l(n=>[D("span",null,J(n.row.hasLonLat?"\u5DF2\u8BBE\u7F6E":"\u672A\u8BBE\u7F6E"),1)]),_:1}),a(i,{prop:"countOfStation",label:"\u9A7B\u52E4\u70B9\u6570",align:"center","show-overflow-tooltip":""}),a(i,{prop:"countOfSecurityMan",label:"\u9A7B\u52E4\u4EBA\u5458\u6570",align:"center","show-overflow-tooltip":""}),a(i,{label:"\u672A\u6FC0\u6D3B\u4EBA\u5458",align:"center",width:"120"},{default:l(n=>[a(m,{size:"small",text:"",type:"primary",onClick:A(ae=>z(n.row.name),["prevent"])},{default:l(()=>[v("\u67E5\u770B")]),_:2},1032,["onClick"])]),_:1})]),_:1},8,["data"])),[[T,e.loading]]),a(U,{onSizeChange:V,onCurrentChange:L,class:"mt15","pager-count":5,"page-sizes":[10,20,30,100,200,300,1e3],"current-page":e.pageIndex,"onUpdate:current-page":o[5]||(o[5]=n=>e.pageIndex=n),background:"","page-size":e.pageSize,"onUpdate:page-size":o[6]||(o[6]=n=>e.pageSize=n),layout:"total, sizes, prev, pager, next, jumper",total:e.totalCount},null,8,["current-page","page-size","total"])])])}}});const ne=Q(Z,[["__scopeId","data-v-579c2db5"],["__file","/data/jenkins/workspace/badp-bcxin-web-5.x-dispatchBusiness/src/views/dispatchView/companyInfo/index.vue"]]);export{ne as default};
