芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/nectar.sdektun.com/assets/index-Wo5B0amb.js
import{D as _}from"./DataTable-CZYvSVis.js";import{_ as h,a as p,b as e,d as i,w as o,r as n,o as m,e as u,t as l}from"./index-Bl6SGUXe.js";const f={components:{DataTable:_},data(){return{loading:!0,data:[],mockdata:[{idRol:1,descripcion:"Administrador"},{idRol:2,descripcion:"Cobranza"}]}},methods:{fillData(t){for(var s in t)this.data.push(t[s])}},mounted(){this.$restapi.get(this.$routes.roles.list).then(t=>{this.fillData(this.mockdata)}).catch(t=>{this.fillData(this.mockdata)}).finally(t=>{this.loading=!1})}},b={class:"card"},g={class:"card-body"},D=e("h4",{class:"card-title"},"Roles del sistema",-1),k=e("p",{class:"card-description"}," Listando roles del sistema",-1),x=e("th",null,"ID",-1),$=e("th",null,"Nombre",-1);function v(t,s,y,C,a,N){const d=n("router-link"),c=n("DataTable");return m(),p("div",b,[e("div",g,[i(d,{class:"pull-right btn btn-gradient-primary",to:"/roles/create"},{default:o(()=>[u("Crear")]),_:1}),D,k,i(c,{items:a.data,route:t.$routes.roles,loading:a.loading},{header:o(()=>[x,$]),row:o(r=>[e("td",null,l(r.idRol),1),e("td",null,l(r.descripcion),1)]),_:1},8,["items","route","loading"])])])}const w=h(f,[["render",v]]);export{w as default};