import{d as D,u as L,r as c,a as K,b as N,e as m,o as O,f as Q,w as n,g as o,T as R,h as e,i as I,j as U,v as q,k as A,l as H,I as M}from"./index-17740f03-1778929502341v=1.0.0.js";import{u as W,E as G}from"./useProject-96e60a2a-1778929502341v=1.0.0.js";import{u as J}from"./useTable-9e9e4bef-1778929502341v=1.0.0.js";import{g as X}from"./project-d8b2e0b3-1778929502341v=1.0.0.js";import{u as Y}from"./useProjectList-1324487d-1778929502341v=1.0.0.js";import"./options-6ad40925-1778929502341v=1.0.0.js";import"./tagManage-07146c77-1778929502341v=1.0.0.js";import"./fileManage-21b3e25f-1778929502341v=1.0.0.js";const ie=D({__name:"index",setup(Z){const{columns:g,tableColumns:d,dataCallBack:v,paramCallBack:y}=W([{prop:"build_progress_str",label:"\u9879\u76EE\u8FDB\u5C55",tag:!0,isFilterEnum:!0,width:120},{prop:"progress_str",label:"\u9879\u76EE\u72B6\u6001",tag:!0,isFilterEnum:!0,width:120},{prop:"status",label:"\u5B8C\u6210\u62A5\u5907",tag:!0,isFilterEnum:!0,fixed:"right",width:120,enum:[{label:"\u8349\u7A3F",value:"1",tagType:"info"},{label:"\u5BA1\u6838\u4E2D",value:"2",tagType:"warning"},{label:"\u901A\u8FC7",value:"3",tagType:"success"},{label:"\u9A73\u56DE",value:"4",tagType:"danger"},{label:"\u901A\u8FC7",value:"5",tagType:"success"}]}],!1,100),{tableData:_,pageable:l,baseParam:u,searchParam:a,totalParam:f,pageParam:h,handleSizeChange:b,handleCurrentChange:k,getTableList:C,search:p,reset:w}=J(X,{},v,y),{fileterData:x,expandKeys:T,defaultValue:s,getCompanyArea:z}=Y(),P=L(),F=c(!0),j=c(null),S=t=>{if(a.value.company_area_id!=t){switch(`${t}`.length){case 2:a.value.province=t,a.value.city="",a.value.county="";break;case 4:a.value.city=t,a.value.province="",a.value.county="";break;case 6:a.value.county=t,a.value.city="",a.value.province="";break}a.value.company_area_id=t,u.value.company_area_id=t,p()}},V=K(()=>({param:{...f.value,...h.value}})),E=t=>{P.push({name:"areaQueryProjecDetail",query:{type_id:t.type_id,project_id:t.project_id}})};return N(async()=>{switch(u.value.progress=3,a.value.progress=3,await z(),u.value.company_area_id=s.value,`${s.value}`.length){case 2:u.value.province=s.value;break;case 4:u.value.city=s.value;break;case 6:a.value.county=s.value;break}await C()}),(t,r)=>{const B=m("el-button"),$=m("el-pagination");return O(),Q(M,{filterWidth:280},{treeCard:n(()=>[o(R,{ref_key:"TreeFilterRef",ref:j,title:"\u533A\u57DF",data:e(x),defaultValue:e(s),expandKeys:e(T),onChange:S,type:"company_area_id"},null,8,["data","defaultValue","expandKeys"])]),searchForm:n(()=>[I(o(U,{"search-param":e(a),columns:e(g),search:e(p),reset:e(w)},null,8,["search-param","columns","search","reset"]),[[q,e(F)]])]),pagination:n(()=>[o($,{"current-page":e(l).page,"onUpdate:currentPage":r[0]||(r[0]=i=>e(l).page=i),"page-size":e(l).size,"onUpdate:pageSize":r[1]||(r[1]=i=>e(l).size=i),"page-sizes":[10,20,50,100],background:"",layout:"total, sizes, prev, pager, next",total:e(l).count,onSizeChange:e(b),onCurrentChange:e(k)},null,8,["current-page","page-size","total","onSizeChange","onCurrentChange"])]),default:n(()=>[o(A,{columns:e(d),data:e(_)},{tableHeader:n(()=>r[2]||(r[2]=[])),toolButton:n(()=>[o(G,{taskName:"projectQueryListExport",class:"mr10 ml10",taskOption:e(V)},null,8,["taskOption"])]),operation:n(i=>[o(B,{type:"primary",link:"",onClick:ee=>E(i.row)},{default:n(()=>r[3]||(r[3]=[H("\u67E5\u770B")])),_:2},1032,["onClick"])]),_:1},8,["columns","data"])]),_:1})}}});export{ie as default};
