芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/nectar.sdektun.com/assets/form-UUiLLFlL.js
import{V as n}from"./VForm-C3kZ1XFr.js";import{_ as a,a as u,b as o,d as t,w as _,r as i,o as p}from"./index-Bl6SGUXe.js";const f={components:{VForm:n},data(){return{create:!0,modelid:this.$route.params.id,model:{nombre:"",email:"",userName:"",telefono:"",direccion:"",idRol:"",rol:"",password:""},roles:[],mockdata:[{idRol:1,nombre:"Administrador"},{idRol:2,nombre:"Cobranza"}]}},methods:{fillRoles(r){this.roles=r}},mounted(){this.$restapi.get(this.$routes.roles.list).then(r=>{this.fillRoles(this.mockdata)}).catch(r=>{this.fillRoles(this.mockdata)})}},h={class:"card"},v={class:"card-body"},V=o("h5",null,"Agregar usuario",-1),b={class:"row"},w={class:"col-md-6"},g={class:"form-group row"},R=o("label",{class:"col-sm-3 col-form-label"},"Nombre",-1),U={class:"col-sm-9"},q={class:"col-md-6"},y={class:"form-group row"},x=o("label",{class:"col-sm-3 col-form-label"},"Correo",-1),N={class:"col-sm-9"},k={class:"row"},C={class:"col-md-6"},B={class:"form-group row"},F=o("label",{class:"col-sm-3 col-form-label"},"Teléfono",-1),A={class:"col-sm-9"},D={class:"form-group row"},z=o("label",{class:"col-sm-3 col-form-label"},"Rol",-1),E={class:"col-sm-9"},T={class:"col-md-6"},j={class:"form-group row"},G=o("label",{class:"col-sm-3 col-form-label"},"Dirección",-1),H={class:"col-sm-9"},I=o("h5",null,"Datos de acceso",-1),J={class:"row"},K={class:"col-md-6"},L={class:"form-group row"},M=o("label",{class:"col-sm-3 col-form-label"},"Usuario",-1),O={class:"col-sm-9"},P={class:"col-md-6"},Q={class:"form-group row"},S=o("label",{class:"col-sm-3 col-form-label"},"Contraseña",-1),W={class:"col-sm-9"};function X(r,s,Y,Z,e,$){const d=i("form-input"),m=i("form-select"),c=i("VForm");return p(),u("div",h,[o("div",v,[V,t(c,{action:r.$routes.users,id:e.modelid,model:e.model},{inputs:_(()=>[o("div",b,[o("div",w,[o("div",g,[R,o("div",U,[t(d,{modelValue:e.model.nombre,"onUpdate:modelValue":s[0]||(s[0]=l=>e.model.nombre=l),type:"text",required:!0},null,8,["modelValue"])])])]),o("div",q,[o("div",y,[x,o("div",N,[t(d,{modelValue:e.model.email,"onUpdate:modelValue":s[1]||(s[1]=l=>e.model.email=l),type:"email",uppercase:!1,required:!0},null,8,["modelValue"])])])])]),o("div",k,[o("div",C,[o("div",B,[F,o("div",A,[t(d,{modelValue:e.model.telefono,"onUpdate:modelValue":s[2]||(s[2]=l=>e.model.telefono=l),type:"phone",required:!0},null,8,["modelValue"])])]),o("div",D,[z,o("div",E,[t(m,{modelValue:e.model.idRol,"onUpdate:modelValue":s[3]||(s[3]=l=>e.model.idRol=l),required:!0,options:e.roles,id:"idRol",value:"nombre"},null,8,["modelValue","options"])])])]),o("div",T,[o("div",j,[G,o("div",H,[t(d,{modelValue:e.model.direccion,"onUpdate:modelValue":s[4]||(s[4]=l=>e.model.direccion=l),type:"textarea",rows:7,required:!0},null,8,["modelValue"])])])])]),I,o("div",J,[o("div",K,[o("div",L,[M,o("div",O,[t(d,{modelValue:e.model.userName,"onUpdate:modelValue":s[5]||(s[5]=l=>e.model.userName=l),uppercase:!1,type:"text",required:!0},null,8,["modelValue"])])])]),o("div",P,[o("div",Q,[S,o("div",W,[t(d,{modelValue:e.model.password,"onUpdate:modelValue":s[6]||(s[6]=l=>e.model.password=l),type:"password",uppercase:!1,required:!0},null,8,["modelValue"])])])])])]),_:1},8,["action","id","model"])])])}const so=a(f,[["render",X]]);export{so as default};