import{u as A}from"./useTable-2ca1782f-1782468512657v=1.0.0.js";import{u as I}from"./useHandleData-2745be0e-1782468512657v=1.0.0.js";import{u as N,b as O,_ as $}from"./index-c87bcfde-1782468512657v=1.0.0.js";import{g as U,n as q}from"./role-d87c2313-1782468512657v=1.0.0.js";import{r as _,x as B,k as Q,al as r,y,H as x,I as o,Q as p,u as a,M as u,L as h}from"./vendor-27e23c1b-1782468512657v=1.0.0.js";import{b as j}from"./roleManageApi-4da48f6f-1782468512657v=1.0.0.js";import"./eleVendor-12a75a9a-1782468512657v=1.0.0.js";const G=()=>{N();const i=_([]);(async()=>{const t=await U({page:1,size:9999});t.code===200&&(i.value=t.data.list.map(n=>({label:n.mp_name,value:n.mp_id})))})();const m=_([{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:m,tableColumns:c,dataCallBack:t=>t,paramCallBack:t=>t}},J=G,K=B({name:"roleManageIndex"}),W=B({...K,setup(i){const d=O(),{tableColumns:m,columns:c,dataCallBack:g,paramCallBack:f}=J(),{tableData:t,pageable:n,baseParam:X,searchParam:z,totalParam:Y,pageParam:ee,handleSizeChange:M,handleCurrentChange:v,getTableList:C,search:F,reset:w,loading:H}=A(j,g,f);Q(async()=>{C()});const P=()=>{d.push({name:"roleManageAdd"})},E=s=>{d.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 I(q,{role_id:s.role_id},e),C()};return(s,e)=>{const S=r("HZSearchForm"),Z=r("el-button"),b=r("el-link"),D=r("HZProTable"),R=r("el-pagination"),T=r("HZPageLayout");return y(),x(T,null,{searchForm:o(()=>[p(S,{"search-param":a(z),columns:a(c),search:a(F),reset:a(w)},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(n).page,"onUpdate:currentPage":e[0]||(e[0]=l=>a(n).page=l),"page-size":a(n).size,"onUpdate:pageSize":e[1]||(e[1]=l=>a(n).size=l),"page-sizes":[10,20,50,100],background:"",layout:"total, sizes, prev, pager, next",total:a(n).count,onSizeChange:a(M),onCurrentChange:a(v)},null,8,["current-page","page-size","total","onSizeChange","onCurrentChange"])]),dialog:o(()=>e[7]||(e[7]=[])),default:o(()=>[p(D,{columns:a(m),data:a(t),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[h(' <el-link type="primary" @click="handleView(scope.row)"> \u67E5\u770B </el-link> '),p(b,{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")?h("v-if",!0):(y(),x(b,{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=$(W,[["__scopeId","data-v-2fd475f9"]]);export{pe as default};
