Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.

2 rindas
2.7KB

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