import{d as V,u as P,r as o,z as $,b as L,e as h,o as M,f as Y,w as l,g as p,T as B,h as e,i as K,j as O,v as R,k as j,l as A,I,F as N}from"./index-17740f03-1778929502341v=1.0.0.js";import{u as U}from"./useTable-9e9e4bef-1778929502341v=1.0.0.js";import{a as q}from"./operat-65158dfc-1778929502341v=1.0.0.js";const Q=V({__name:"index",setup(W){const y=P(),_=o(!0),v=o([{prop:"keyword",search:{el:"input",placeholder:"\u8BF7\u8F93\u5165\u4E1A\u52A1\u5BF9\u8C61\u540D\u79F0"}},{label:"\u65F6\u95F4\u7B5B\u9009",prop:"time",search:{el:"date-picker",props:{type:"daterange",format:"YYYY/MM/DD",valueFormat:"x"},placeholder:"\u8BF7\u9009\u62E9\u65F6\u95F4"}}]),b=$([{type:"index",label:"\u5E8F\u53F7",width:70},{prop:"c_time_str",label:"\u64CD\u4F5C\u65F6\u95F4"},{prop:"organ_unit_name",label:"\u64CD\u4F5C\u5355\u4F4D"},{prop:"operator",label:"\u64CD\u4F5C\u4EBA"},{prop:"handle",label:"\u64CD\u4F5C"},{prop:"type_str",label:"\u4E1A\u52A1\u7C7B\u578B"},{prop:"object_name",label:"\u4E1A\u52A1\u5BF9\u8C61"},{prop:"operation",label:"\u64CD\u4F5C",fixed:"right",width:150}]),{tableData:f,pageable:s,searchParam:t,baseParam:c,handleSizeChange:C,handleCurrentChange:k,getTableList:w,search:d,reset:x}=U(q),z=o(null),S=a=>{if(t.value.company_area_id!=a){switch(`${a}`.length){case 2:t.value.province=a,t.value.city="",t.value.county="";break;case 4:t.value.city=a,t.value.province="",t.value.county="";break;case 6:t.value.county=a,t.value.city="",t.value.province="";break}t.value.company_area_id=a,d()}},m=o([]),g=o([]),r=o(""),T=async()=>{var u;let a=await N({});m.value=a.data;let n=(u=a==null?void 0:a.data[0])==null?void 0:u.company_area_id;g.value=[n],r.value=String(n)},F=async a=>{y.push({name:"systemManageOperatLogDetail",query:{id:a.id}})};return L(async()=>{switch(await T(),c.value.company_area_id=r.value,`${r.value}`.length){case 2:c.value.province=r.value;break;case 4:c.value.city=r.value;break;case 6:t.value.county=r.value;break}await w()}),(a,n)=>{const u=h("el-button"),D=h("el-pagination");return M(),Y(I,{filterWidth:280},{treeCard:l(()=>[p(B,{ref_key:"TreeFilterRef",ref:z,title:"\u533A\u57DF",data:e(m),defaultValue:e(r),expandKeys:e(g),onChange:S},null,8,["data","defaultValue","expandKeys"])]),searchForm:l(()=>[K(p(O,{"search-param":e(t),columns:e(v),search:e(d),reset:e(x)},null,8,["search-param","columns","search","reset"]),[[R,e(_)]])]),pagination:l(()=>[p(D,{"current-page":e(s).page,"onUpdate:currentPage":n[0]||(n[0]=i=>e(s).page=i),"page-size":e(s).size,"onUpdate:pageSize":n[1]||(n[1]=i=>e(s).size=i),"page-sizes":[10,20,50,100],background:"",layout:"total, sizes, prev, pager, next",total:e(s).count,onSizeChange:e(C),onCurrentChange:e(k)},null,8,["current-page","page-size","total","onSizeChange","onCurrentChange"])]),default:l(()=>[p(j,{columns:e(b),data:e(f)},{operation:l(i=>[p(u,{type:"primary",link:"",onClick:E=>F(i.row)},{default:l(()=>n[2]||(n[2]=[A("\u67E5\u770B")])),_:2},1032,["onClick"])]),_:1},8,["columns","data"])]),_:1})}}});export{Q as default};
