25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2 lines
2.7KB

  1. import j from"./roleDrawer.a1259361.js";import{d as z,b as _,r as u,o as F,c as l,e as L,f as R,h as e,i as a,j as p,g as d,F as M,aq as U,ar as q,x as E}from"./index.0b616ce3.js";import"./menuManage.ba628f45.js";const G={class:"flex justify-between items-center"},I=d("span",null,"\u89D2\u8272\u5217\u8868",-1),S=["onClick"],W=["onClick"],A=z({name:"roleManage"}),X=Object.assign(A,{setup(H){const{proxy:f}=E(),s=_({name:void 0}),i=u(),b=u(0),y=_([{label:"\u5E8F\u53F7",type:"index",width:"80"},{label:"\u89D2\u8272\u540D\u79F0",key:"name",prop:"name",width:"250"},{label:"\u89D2\u8272\u63CF\u8FF0",key:"describe",prop:"describe",minWidth:"180",showOverflowTooltip:!0},{label:"\u521B\u5EFA\u65F6\u95F4",key:"createOn",prop:"createOn",width:"180"},{label:"\u64CD\u4F5C",slot:"action",width:"120",fixed:"right"}]),v=u([]),n=async(t=i.value.pageParams)=>{const r=await U({...t,...s});v.value=r.data.records,b.value=r.data.total},k=()=>{n()},x=()=>{s.name=void 0,i.value.pageParams.pageNumber=1,i.value.pageParams.pageSize=10,n()},o=_({visible:!1,rowData:void 0}),C=()=>{o.visible=!0,o.rowData=void 0},D=t=>{o.visible=!0,o.rowData=t},V=t=>{f.$messageBox.confirm("\u662F\u5426\u5220\u9664\u8BE5\u89D2\u8272?","\u63D0\u793A\uFF01",{type:"warning"}).then(async()=>{await q([t.id]),f.$message.success("\u5220\u9664\u6210\u529F\uFF01"),n()})},B=t=>{o.visible=!1,t&&n()};return F(()=>{n()}),(t,r)=>{const N=l("el-input"),w=l("el-form-item"),h=l("el-col"),m=l("el-button"),O=l("el-row"),P=l("el-form"),g=l("el-card"),T=l("table-list");return L(),R(M,null,[e(g,{shadow:"never",class:"search mb-16"},{default:a(()=>[e(P,{"label-suffix":":",model:s,size:"small"},{default:a(()=>[e(O,{gutter:16},{default:a(()=>[e(h,{span:8},{default:a(()=>[e(w,{label:"\u89D2\u8272\u540D\u79F0"},{default:a(()=>[e(N,{modelValue:s.name,"onUpdate:modelValue":r[0]||(r[0]=c=>s.name=c),placeholder:"\u8BF7\u8F93\u5165"},null,8,["modelValue"])]),_:1})]),_:1}),e(h,{span:16},{default:a(()=>[e(w,{class:"btn"},{default:a(()=>[e(m,{type:"primary",onClick:k},{default:a(()=>[p("\u67E5\u8BE2")]),_:1}),e(m,{onClick:x},{default:a(()=>[p("\u91CD\u7F6E")]),_:1})]),_:1})]),_:1})]),_:1})]),_:1},8,["model"])]),_:1}),e(g,{shadow:"never"},{header:a(()=>[d("div",G,[I,e(m,{type:"primary",icon:"Plus",size:"small",onClick:C},{default:a(()=>[p(" \u65B0\u589E\u89D2\u8272 ")]),_:1})])]),default:a(()=>[e(T,{ref_key:"tableListRef",ref:i,column:y,data:v.value,total:b.value,onGetTableData:n},{action:a(({scope:c})=>[d("a",{class:"text-primary",onClick:$=>D(c.row)},"\u7F16\u8F91",8,S),d("a",{class:"text-danger",onClick:$=>V(c.row)},"\u5220\u9664",8,W)]),_:1},8,["column","data","total"])]),_:1}),e(j,{visible:o.visible,data:o.rowData,onClose:B},null,8,["visible","data"])],64)}}});export{X as default};