import{r as _,x as v,k as A,al as r,y,H as h,I as o,Q as p,u as a,M as u,L as x}from"./vendor-6ae0c374-1783405707921v=1.0.0.js";import{u as I}from"./useTable-ad933c16-1783405707921v=1.0.0.js";import{u as N}from"./useHandleData-17459d42-1783405707921v=1.0.0.js";import{u as O,b as $,_ as U}from"./index-71d7b18c-1783405707921v=1.0.0.js";import{g as q,n as Q}from"./role-ca48e7dd-1783405707921v=1.0.0.js";import{b as j}from"./roleManageApi-18d4d92d-1783405707921v=1.0.0.js";import"./eleVendor-d42abce8-1783405707921v=1.0.0.js";const G=()=>{O();const i=_([]);(async()=>{const n=await q({page:1,size:9999});n.code===200&&(i.value=n.data.list.map(t=>({label:t.mp_name,value:t.mp_id})))})();const d=_([{prop:"mp_id",label:"\u6240\u5C5E\u5E94\u7528",isFilterEnum:!0,enum:i,search:{el:"select",placeholder:"\u8BF7\u9009\u62E9\u6240\u5C5E\u5E94\u7528"}}]),c=_([{type:"index",label:"\u5E8F\u53F7",width:70,fixed:"left"},{label:"\u89D2\u8272\u7F16\u53F7",prop:"role_id"},{label:"\u6240\u5C5E\u5E94\u7528",prop:"mp_name"},{label:"\u89D2\u8272\u540D\u79F0",prop:"role_name"},{label:"\u89D2\u8272\u63CF\u8FF0",prop:"role_desc"},{label:"\u72B6\u6001",prop:"role_status_str"},{label:"\u64CD\u4F5C",prop:"operation",fixed:"right",width:200}]);return{columns:d,tableColumns:c,dataCallBack:n=>n,paramCallBack:n=>n}},J=G,K=v({name:"roleManageIndex"}),W=v({...K,setup(i){const m=$(),{tableColumns:d,columns:c,dataCallBack:g,paramCallBack:C}=J(),{tableData:n,pageable:t,baseParam:X,searchParam:B,totalParam:Y,pageParam:ee,handleSizeChange:M,handleCurrentChange:z,getTableList:b,search:w,reset:F,loading:H}=I(j,g,C);A(async()=>{b()});const P=()=>{m.push({name:"roleManageAdd"})},E=s=>{m.push({name:"roleManageEdit",query:{role_id:s.role_id,mp_id:s.mp_id}})},L=async s=>{let e="\u5220\u9664\u5F53\u524D\u6570\u636E";await N(Q,{role_id:s.role_id},e),b()};return(s,e)=>{const S=r("HZSearchForm"),Z=r("el-button"),f=r("el-link"),D=r("HZProTable"),R=r("el-pagination"),T=r("HZPageLayout");return y(),h(T,null,{searchForm:o(()=>[p(S,{"search-param":a(B),columns:a(c),search:a(w),reset:a(F)},null,8,["search-param","columns","search","reset"])]),title:o(()=>e[2]||(e[2]=[u(" \u89D2\u8272\u7BA1\u7406 ",-1)])),pagination:o(()=>[p(R,{"current-page":a(t).page,"onUpdate:currentPage":e[0]||(e[0]=l=>a(t).page=l),"page-size":a(t).size,"onUpdate:pageSize":e[1]||(e[1]=l=>a(t).size=l),"page-sizes":[10,20,50,100],background:"",layout:"total, sizes, prev, pager, next",total:a(t).count,onSizeChange:a(M),onCurrentChange:a(z)},null,8,["current-page","page-size","total","onSizeChange","onCurrentChange"])]),dialog:o(()=>e[7]||(e[7]=[])),default:o(()=>[p(D,{columns:a(d),data:a(n),isFlex:!1,loading:a(H)},{tableHeader:o(()=>e[3]||(e[3]=[])),toolButton:o(()=>[p(Z,{type:"primary",onClick:P},{default:o(()=>e[4]||(e[4]=[u(" \u65B0\u589E ",-1)])),_:1,__:[4]})]),operation:o(l=>{var k;return[x(' <el-link type="primary" @click="handleView(scope.row)"> \u67E5\u770B </el-link> '),p(f,{type:"primary",onClick:V=>E(l.row)},{default:o(()=>e[5]||(e[5]=[u(" \u7F16\u8F91 ",-1)])),_:2,__:[5]},1032,["onClick"]),(k=l.row.role_desc)!=null&&k.includes("\u52FF\u5220")?x("v-if",!0):(y(),h(f,{key:0,type:"danger",onClick:V=>L(l.row)},{default:o(()=>e[6]||(e[6]=[u(" \u5220\u9664 ",-1)])),_:2,__:[6]},1032,["onClick"]))]}),_:1},8,["columns","data","loading"])]),_:1})}}});const pe=U(W,[["__scopeId","data-v-8538c367"],["__file","D:/desktop/huaZhong/huazhong-common/apps/vue-admin/src/views/roleManage/roleManage/index.vue"]]);export{pe as default};
