PageSourceSearch

https://painel.rmdcompliance.com.br/assets/index-B6a6gOjj.js

js rmdcompliance.com.br collected 2026-10-09 22:25:43 UTC 5,817 bytes, 1 lines download raw bytes

1import{n as o}from"./index-ytIs-52l.js";const l={data(){return{route:"baselegais",list:[],page:1,perPage:10,busca:"",total:0,query:{page:1,limit:10,skip:0}}},computed:{cardStyle(){return this.isDarkMode?{backgroundColor:"#1c1d20",borderColor:"#3c4043"}:{backgroundColor:"#FFFFFF",borderColor:"#E5E7EB"}}},methods:{rowStyle(a){return a%2===1?{backgroundColor:this.isDarkMode?"rgba(255,255,255,0.025)":"#FAFAFA"}:{}},async start(){const a=await this.$http.post(`/v1/${this.route}/list`,{busca:this.busca,skip:this.query.skip,limit:this.query.limit});this.list=a.data.data,this.total=a.data.total},async remove(a){this.$confirm({title:"Confirmação",message:"Tem certeza que deseja arquivar essa base legal?",button:{no:"Não",yes:"Sim"},callback:async t=>{t&&(await this.$http.delete(`/v1/${this.route}/${a}`),this.$toast.success("Removido com sucesso!"),this.page=1,this.start())}})},updateFiltro(){this.query.page=1,this.query.limit=this.perPage,this.query.skip=0,this.query={page:this.query.page,limit:this.query.limit,skip:this.query.skip,busca:this.busca},this.$router.push({path:`/cadastros/${this.route}`,query:this.query})},async setPage(a){const t=(a-1)*this.perPage,e=this.perPage;this.query.page=a,this.query.skip=t,this.query.limit=e,this.$router.push({path:`/cadastros/${this.route}`,query:this.query})}},async beforeRouteUpdate(a,t,e){e(),this.$route.query.busca&&(this.busca=this.$route.query.busca),this.$route.query.page&&(this.query.page=parseInt(this.$route.query.page)),this.$route.query.limit&&(this.query.limit=parseInt(this.$route.query.limit)),this.$route.query.skip&&(this.query.skip=parseInt(this.$route.query.skip)),this.start()},async beforeMount(){this.$route.query.busca&&(this.busca=this.$route.query.busca),this.$route.query.page&&(this.query.page=parseInt(this.$route.query.page)),this.$route.query.limit&&(this.query.limit=parseInt(this.$route.query.limit)),this.$route.query.skip&&(this.query.skip=parseInt(this.$route.query.skip)),this.start()}};var u=function(){var t=this,e=t._self._c;return e("div",{staticClass:"min-h-app",style:{backgroundColor:t.isDarkMode?"#151618":"#ffffff",color:t.isDarkMode?"#e8eaed":"#111827"}},[e("Navbar",{attrs:{page:"Base legais",link:"/cadastros",nameLink:"Cadastros"}}),e("div",{staticClass:"mx-4 my-4 md:mx-8 md:my-8"},[e("div",{staticClass:"flex flex-wrap gap-2 mb-4"},[e("Button",{attrs:{label:"Nova base legal","icon-left":"plus-circle",size:"sm"},on:{click:function(s){return t.$router.push(`/cadastros/${t.route}/form`)}}}),e("a",{attrs:{href:`${t.url_api}/v1/${t.route}/exportar/${t.$store.state.empresa._id}?token=${t.$store.state.token}`,target:"_blank"}},[e("Button",{attrs:{label:"Exportar base",variant:"secondary","icon-left":"download-simple",size:"sm"}})],1)],1),e("div",{staticClass:"rounded-xl border p-4 mb-4",style:t.cardStyle},[e("div",{staticClass:"flex items-center gap-2 mb-3"},[e("Icon",{attrs:{name:"funnel",size:14}}),e("h3",{staticClass:"text-xs font-semibold uppercase tracking-wide",style:{color:t.isDarkMode?"#9aa0a6":"#535862"}},[t._v("Filtros")])],1),e("div",{staticClass:"grid grid-cols-1 md:grid-cols-12 gap-3 items-end"},[e("div",{staticClass:"md:col-span-10"},[e("TextInput",{attrs:{name:"busca",label:"Buscar",placeholder:"Nome da base legal","icon-left":"magnifying-glass",size:"sm","custom-style":t.inputStyle},model:{value:t.busca,callback:function(s){t.busca=s},expression:"busca"}})],1),e("div",{staticClass:"md:col-span-2"},[e("Button",{attrs:{label:"Buscar","icon-left":"magnifying-glass",size:"sm","full-width":""},on:{click:t.updateFiltro}})],1)])]),e("div",{staticClass:"shadow overflow-x-auto sm:rounded-lg",style:{borderColor:t.isDarkMode?"#5f6368":"#e5e7eb"}},[e("table",{staticClass:"min-w-full divide-y",style:{borderColor:t.isDarkMode?"#5f6368":"#e5e7eb"}},[e("thead",{staticClass:"border-b",style:t.tableHeaderStyle},[e("tr",{staticClass:"text-left text-xs tracking-wider"},[e("th",{staticClass:"px-3 py-3"},[t._v("Nome")]),e("th",{staticClass:"px-3 py-3"},[t._v("Artigo")]),t.$store.state.empresa?t._e():e("th",{staticClass:"px-3 py-3"},[t._v("Empresa")]),e("th",{staticClass:"px-3 py-3 text-right"},[t._v("Ações")])])]),e("tbody",{staticClass:"divide-y text-sm_2 text-left",style:{...t.tableBodyStyle,borderColor:t.tableBodyStyle.borderColor}},[t._l(t.list,function(s,r){return e("tr",{key:s._id,style:t.rowStyle(r)},[e("td",{staticClass:"px-3 py-3 align-top text-sm font-medium",style:{color:t.isDarkMode?"#e8eaed":"#181D27"}},[t._v(" "+t._s(s.nome||"—")+" ")]),e("td",{staticClass:"px-3 py-3 align-top text-sm",style:{color:t.isDarkMode?"#9aa0a6":"#535862"}},[t._v(" "+t._s(s.artigo||"—")+" ")]),t.$store.state.empresa?t._e():e("td",{staticClass:"px-3 py-3 align-top text-sm",style:{color:t.isDarkMode?"#9aa0a6":"#535862"}},[t._v(" "+t._s(s.empresa?s.empresa.nome:"—")+" ")]),e("td",{staticClass:"px-3 py-3 align-top"},[e("div",{staticClass:"flex gap-1 justify-end"},[e("Button",{staticClass:"w-[90px]",attrs:{label:"Editar","icon-left":"pencil-simple",size:"xs"},on:{click:function(i){return t.$router.push(`/cadastros/${t.route}/form/${s._id}`)}}}),e("Button",{staticClass:"w-[90px]",attrs:{label:"Arquivar",variant:"danger","icon-left":"archive",size:"xs"},on:{click:function(i){return t.remove(s._id)}}}
1)],1)])])}),t.list.length?t._e():e("tr",[e("td",{staticClass:"px-4 py-8 text-center text-sm",style:{color:t.isDarkMode?"#9aa0a6":"#A4A7AE"},attrs:{colspan:t.$store.state.empresa?3:4}},[t._v(" Nenhuma base legal encontrada. ")])])],2)])]),e("TablePagination",{attrs:{page:t.query.page,total:t.total},on:{"update:page":function(s){return t.$set(t.query,"page",s)},"change-per-page":t.updateFiltro,paginate:t.setPage},model:{value:t.perPage,callback:function(s){t.perPage=s},expression:"perPage"}})],1)],1)},n=[],c=o(l,u,n,!1,null,null);const d=c.exports;export{d as default};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.