import{d as H,v as L,r as b,D as N,b as l,a as s,j as u,G as R,C as $,o as A,i as q,e as n,H as G,u as a,I as J,m as c,t as O,J as W,_ as K}from"./index-8184dd63-1780045603901v=1.0.0.js";import{I as Q}from"./IndexPagePro-13c09835-1780045603901v=1.0.0.js";import{u as X,P as Z}from"./useTable-6673e486-1780045603901v=1.0.0.js";import{S as ee}from"./index-a4b7c6d3-1780045603901v=1.0.0.js";import ae from"./TagForm-df88003b-1780045603901v=1.0.0.js";import{u as C}from"./useHandleData-5092af5e-1780045603901v=1.0.0.js";import{g as te,d as le,u as oe}from"./tagManage-1b66d64b-1780045603901v=1.0.0.js";import{u as ne}from"./useTag-1edf87a7-1780045603901v=1.0.0.js";import"./notData-5e24f986-1780045603901v=1.0.0.js";import"./sortable.esm-cb107890-1780045603901v=1.0.0.js";const re=H({__name:"service",setup(se){L();const _=b("area_submit_charge_type"),y=b(!0),h=o=>(o.list.map(e=>{e.c_time=W(e.c_time*1e3).format("YYYY-MM-DD")}),o),{tableData:w,pageable:i,baseParam:k,searchParam:T,handleSizeChange:D,handleCurrentChange:S,getTableList:d,search:p,reset:x}=X(te,{},h),z=b([{prop:"keyword",label:"\u6807\u7B7E\u540D\u79F0",search:{el:"input",placeholder:"\u8BF7\u8F93\u5165\u6807\u7B7E/\u5206\u7EC4\u641C\u7D22",props:{onChange:p}}},{prop:"status",label:"\u6240\u5C5E\u72B6\u6001",enum:[{label:"\u542F\u7528",value:1},{label:"\u505C\u7528",value:2}],search:{el:"select",placeholder:"\u8BF7\u9009\u62E9\u72B6\u6001"}}]),E=N([{type:"index",label:"\u5E8F\u53F7",width:70,fixed:"left"},{prop:"name",label:"\u6807\u7B7E\u540D\u79F0"},{prop:"status",label:"\u72B6\u6001",tag:!0,isFilterEnum:!0,enum:[{label:"\u542F\u7528",value:"1",tagType:"success"},{label:"\u505C\u7528",value:"2",tagType:"danger"}]},{prop:"is_default",label:"\u9ED8\u8BA4\u6807\u7B7E",showOverflowTooltip:!1,render:o=>l(s("el-tag"),{"disable-transitions":!0,type:o.row.is_default==1?"":"danger"},{default:()=>[o.row.is_default==1?"\u662F":"\u5426"]})},{prop:"des",label:"\u5907\u6CE8"},{prop:"c_time",label:"\u521B\u5EFA\u65F6\u95F4"},{prop:"operator",label:"\u4FEE\u6539\u4EBA"},{prop:"operation",label:"\u64CD\u4F5C",headerRender:o=>l("div",{class:"flx-center"},[l("span",null,[u("\u64CD\u4F5C")]),l(s("el-tooltip"),{effect:"dark",content:"\u9ED8\u8BA4\u7C7B\u578B\u9879\u76EE\u4E0D\u53EF\u5220\u9664",placement:"top"},{default:()=>[l(s("el-icon"),null,{default:()=>[l(R,null,null)]})]})]),fixed:"right",width:200}]),{dialogVisible:m,dialogTitle:P,handleAdd:B,handleEdit:V,baseform:g,baseformLoading:f,baseformCancel:F,baseformSubmit:U,currenEditId:ie}=ne(p,"area_submit_project"),I=async o=>{let e="\u5220\u9664\u5F53\u524D\u6807\u7B7E";await C(le,{tag_id:o.tag_id},e),d()},M=async o=>{let e="\u66F4\u65B0\u5F53\u524D\u6807\u7B7E\u72B6\u6001",r=o.status==2?1:2;await C(oe,{tag_id:o.tag_id,status:r},e),d()};return $(async()=>{k.value.type=_.value,await d()}),(o,e)=>{const r=s("el-button"),Y=s("el-pagination"),j=s("el-dialog");return A(),q(Q,{filterWidth:280},{searchForm:n(()=>[G(l(ee,{"search-param":a(T),columns:a(z),search:a(p),reset:a(x)},null,8,["search-param","columns","search","reset"]),[[J,a(y)]])]),pagination:n(()=>[l(Y,{"current-page":a(i).page,"onUpdate:currentPage":e[0]||(e[0]=t=>a(i).page=t),"page-size":a(i).size,"onUpdate:pageSize":e[1]||(e[1]=t=>a(i).size=t),"page-sizes":[10,20,50,100],background:"",layout:"total, sizes, prev, pager, next",total:a(i).count,onSizeChange:a(D),onCurrentChange:a(S)},null,8,["current-page","page-size","total","onSizeChange","onCurrentChange"])]),dialog:n(()=>[l(j,{modelValue:a(m),"onUpdate:modelValue":e[4]||(e[4]=t=>c(m)?m.value=t:null),title:a(P),width:"650px",top:"10vh"},{default:n(()=>[l(ae,{value:a(g),"onUpdate:value":e[2]||(e[2]=t=>c(g)?g.value=t:null),tagType:a(_),loading:a(f),"onUpdate:loading":e[3]||(e[3]=t=>c(f)?f.value=t:null),onCancel:a(F),onSubmit:a(U)},null,8,["value","tagType","loading","onCancel","onSubmit"])]),_:1},8,["modelValue","title"])]),default:n(()=>[l(Z,{columns:a(E),data:a(w)},{tableHeader:n(()=>[...e[5]||(e[5]=[])]),toolButton:n(()=>[l(r,{type:"primary",onClick:a(B)},{default:n(()=>[...e[6]||(e[6]=[u("\u65B0\u589E",-1)])]),_:1},8,["onClick"])]),operation:n(t=>[l(r,{type:"primary",disabled:t.row.is_default==1,link:"",onClick:v=>a(V)(t.row)},{default:n(()=>[...e[7]||(e[7]=[u("\u7F16\u8F91",-1)])]),_:1},8,["disabled","onClick"]),l(r,{type:"primary",disabled:t.row.is_default==1,link:"",onClick:v=>M(t.row)},{default:n(()=>[u(O(t.row.status==1?"\u505C\u7528":"\u542F\u7528"),1)]),_:2},1032,["disabled","onClick"]),l(r,{type:"primary",disabled:t.row.is_default==1,link:"",onClick:v=>I(t.row)},{default:n(()=>[...e[8]||(e[8]=[u("\u5220\u9664",-1)])]),_:1},8,["disabled","onClick"])]),_:1},8,["columns","data"])]),_:1})}}}),Ce=K(re,[["__file","D:/desktop/yunNan/vue-area-submit/src/views/dataManage/service.vue"]]);export{Ce as default};
