import{d as E,u as L,r as m,a as R,G as K,b as N,e as d,o as O,f as I,w as o,g as s,T as M,h as e,i as U,j as q,v as A,k as G,l as H,I as W}from"./index-17740f03-1778929502341v=1.0.0.js";import{u as J,E as X}from"./useProject-96e60a2a-1778929502341v=1.0.0.js";import{u as Y}from"./useTable-9e9e4bef-1778929502341v=1.0.0.js";import{g as Z}from"./project-d8b2e0b3-1778929502341v=1.0.0.js";import{u as ee}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 ce=E({__name:"index",setup(ae){const{columns:g,tableColumns:y,dataCallBack:v,paramCallBack:_}=J([{prop:"build_progress_str",label:"\u9879\u76EE\u8FDB\u5C55",fixed:"right",isFilterEnum:!0,width:140}],!1,150),{tableData:f,pageable:l,baseParam:u,searchParam:a,totalParam:h,pageParam:k,handleSizeChange:C,handleCurrentChange:b,getTableList:x,search:p,reset:P}=Y(Z,{},v,_),{fileterData:w,expandKeys:z,defaultValue:n,getCompanyArea:j}=ee(),T=L(),S=m(!0),V=m(null),B=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()}},F=R(()=>({param:{...h.value,...k.value}})),Q=t=>{T.push({name:"areaQueryProjecDetail",query:{type_id:t.type_id,project_id:t.project_id}})},c=K();return c.name,N(async()=>{switch(await j(),u.value.company_area_id=n.value,`${n.value}`.length){case 2:u.value.province=n.value;break;case 4:u.value.city=n.value;break;case 6:a.value.county=n.value;break}let t={areaQueryProject:1,areaQueryProjectBuilding:2};u.value.progress=t[c.name],await x()}),(t,r)=>{const $=d("el-button"),D=d("el-pagination");return O(),I(W,{filterWidth:280},{treeCard:o(()=>[s(M,{ref_key:"TreeFilterRef",ref:V,title:"\u533A\u57DF",data:e(w),defaultValue:e(n),expandKeys:e(z),onChange:B},null,8,["data","defaultValue","expandKeys"])]),searchForm:o(()=>[U(s(q,{"search-param":e(a),columns:e(g),search:e(p),reset:e(P)},null,8,["search-param","columns","search","reset"]),[[A,e(S)]])]),pagination:o(()=>[s(D,{"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(C),onCurrentChange:e(b)},null,8,["current-page","page-size","total","onSizeChange","onCurrentChange"])]),default:o(()=>[s(G,{columns:e(y),data:e(f)},{tableHeader:o(()=>r[2]||(r[2]=[])),toolButton:o(()=>[s(X,{taskName:"projectQueryListExport",class:"mr10 ml10",taskOption:e(F)},null,8,["taskOption"])]),operation:o(i=>[s($,{type:"primary",link:"",onClick:te=>Q(i.row)},{default:o(()=>r[3]||(r[3]=[H("\u67E5\u770B")])),_:2},1032,["onClick"])]),_:1},8,["columns","data"])]),_:1})}}});export{ce as default};
