%PDF- %PDF-
| Direktori : /home/tjamichg/portal.tjamich.gob.mx/ |
| Current File : /home/tjamichg/portal.tjamich.gob.mx/consulta-de-acuerdos-por-expediente.php |
<section class="page-header">
<div class="container">
<div class="row">
<div class="col">
<ul class="breadcrumb">
<li><a href="Tribunal-de-Justicia-Administrativa-de-Michoacan-de-Ocampo">Inicio</a></li>
<li class="active"><?php echo "$bread"; ?></li>
</ul>
</div>
</div>
<div class="row">
<div class="col">
<h1><?php echo "$bread"; ?></h1>
</div>
</div>
</div>
</section>
<div class="container">
<div class="row">
<div class="col-lg-12">
<p class="text" align="justify">
<strong>* Los resultados de esta consulta son de carácter informativo. No tienen validez jurisdiccional. </strong>
La consulta esta en fase de prueba; los resultados pueden demorar en mostrarse. Esta consulta muestra acuerdos publicados desde 2008 hasta la fecha actual, pudiendo variar según la ponencia que se consulte.
</p>
<div class="content content-boxed">
<!-- CKEditor (js-ckeditor-inline + js-ckeditor ids are initialized in App() -> uiHelperCkeditor()) -->
<!-- For more info and examples you can check out http://ckeditor.com -->
<div class="block">
<!-- FORMULARIO -->
<div class="block-content">
<script type="text/javascript" src="https://code.jquery.com/jquery-1.11.0.min.js"></script>
<!-- Axios -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/vue/2.6.10/vue.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/axios/0.19.0/axios.min.js"></script>
<link href="https://unpkg.com/nprogress@0.2.0/nprogress.css" rel="stylesheet" />
<script src="https://unpkg.com/nprogress@0.2.0/nprogress.js"></script>
<!--<form action="Consulta-de-Acdos" > -->
<div class="form-group">
<p>Elige la forma en la que deseas buscar los acuerdos del expediente.</p>
<div id="choise">
<input type="radio" v-model="x" value="ins" checked="checked" @change="limpiar">Por Instancia
<input type="radio" v-model="x" value="exp" @change="limpiar">Por Expediente<br><br>
<div v-show="x === 'ins'" class="card">
<div id="vueapp">
<remote-users></remote-users>
</div>
</div>
<div v-show="x === 'exp'" class="card">
<div id="agree">
<agreements-list></agreements-list>
</div>
</div>
<label class="alert-warning alert-link"> <h3>{{ message }}</h3> </label>
</div>
<script>
var choise = new Vue({
el: '#choise',
data:{
x: 'ins',
message: ''
},
methods:{
limpiar(){
vueapp.acuerdos=[]
agree.acuerdos=[]
this.message=''
}
}
})
function exp(tipo,no,anio,roman){
return this.expediente = tipo + "-" + no + "/" + anio + "-" + roman
}
function areas(inst,noInst){
var numLet
if(inst == 1)
{
if(noInst == "Uruapan")
{
return this.area = "Juzgado Administrativo Uruapan";
}
else
{
return this.area = "Juzgado " + noInst + " Administrativo";
}
}
else
{
if(inst == 2)
{
if(noInst == "Primera" || noInst == "Segunda" || noInst == "Tercera")
return this.area = noInst + " Sala Administrativa Ordinaria";
}
else
{
if(inst == 3)
return this.area = noInst + " Sala Especializada";
else
return this.area = "Verifique la selección hecha";
}
}
}
function romanos(num){
if(num == "Primero" || num == "Primera")
this.romano = "I";
else if (num == "Segundo" || num == "Segunda")
this.romano = "II";
else if (num == "Tercero" || num == "Tercera")
this.romano = "III";
else if (num == "Uruapan" || num == "Uruapan")
this.romano = "U";
else if (num == "Cuarta")
this.romano = "IV";
else if (num == "Quinta")
this.romano = "V";
return this.romano
}
function zfill(number, width) {
var numberOutput = Math.abs(number);
var length = number.toString().length;
var zero = "0";
if (width <= length) {
if (number < 0) {
return ("-" + numberOutput.toString());
} else {
return numberOutput.toString();
}
} else {
if (number < 0) {
return ("-" + (zero.repeat(width - length)) + numberOutput.toString());
} else {
return ((zero.repeat(width - length)) + numberOutput.toString());
}
}
}
function getDate(datetime){
let date = new Date(datetime).toJSON().slice(0,10)
return date
}
Vue.component('RemoteUsers', {
template: `
<div class="card-body">
<h5 class="card-title">Busqueda por Instancia</h5>
<p class="card-text">Elija las opciones sobre su Expediente.</p>
<div class="row">
<label class="col-sm-1 control-label" for="instan">Instancia</label>
<div class="col-sm-5">
<select class="form-control" v-model="selectedInstancia" @change="selectInstancia" required>
<option v-for="(instancia,index) in instancias" :value="index">{{ instancia.label }}</option>
</select>
</div>
<label class="col-sm-1 control-label" for="numer">Número</label>
<div class="col-sm-5">
<select class="form-control" v-model="selectedNumero" :disabled="habilitado == 0" @blur="noInstancia" required>
<option v-for="(numero, index) in numeros">{{ numero }}</option>
</select>
</div>
</div><br>
<div class="row">
<label class="col-sm-1 control-label">Tipo:</label>
<div class="col-sm-3">
<select class="form-control" v-model="selectedTipo" :disabled="habilitado2 == 0" @change="noTipo" required>
<option v-for="tipo in tipos">{{ tipo }}</option>
</select>
</div>
<label class="col-sm-2 control-label" for="example-text-input">Expediente: </label>
<div class="col-sm-2">
<input class="form-control" type="text" placeholder="(escriba el número sin ceros a la izquierda)" :maxlength="max" v-model="inputExpediente" @change="noExpediente" :disabled="habilitado3 == 0" @keypress="isNumber($event)" required><br>
</div>
<label class="col-sm-1 control-label">Año:</label>
<div class="col-sm-3">
<input class="form-control" placeholder="YYYY" type="text" v-model="inputAnio" @blur="noAnio" :maxlength="max" :disabled="habilitado3 == 0" @keypress="isNumber($event)" required><br>
</div>
<input v-model="expe" id="expe" type="hidden" name="expe" >
<input v-model="noarea" id="noarea" type="hidden" name="noarea" >
<input class="btn btn-m btn-primary" id="submitButton" type="submit" value="Buscar" v-on:click="buscarAcuerdos(expe)">
</div><br>
<div class="desc"> Expediente: <strong class="mrs">{{ this.exped }}</strong><br/>
<div class="desc">Área: <strong class="mrs">{{ this.area }}</strong><br/>
</div>
<ul>
<li v-for="acuerdo in acuerdos"><strong>{{ getDate(acuerdo.FechaPublicacion) }}</strong> <br/> <p align='justify'>{{ acuerdo.ExtractoSinFormato }}</p></li>
</ul>
</div>
`,
data: function() {
return {
instancias:[
{
label:"- Elige la instancia -",
numeros:[],
tipos:[],
exp:''
},
{
label:"Juzgado",
numeros:["Primero","Segundo","Tercero","Uruapan"],
tipos:["JA","JAR","JAL"],
exp:''
},
{
label:"Salas Administrativas",
numeros:["Primera","Segunda","Tercera"],
tipos:["JA","JAR","JAL","RAA"],
exp:''
},
{
label:"Salas Especializadas",
numeros:["Cuarta","Quinta"],
tipos:["PRA","RAP","RI","RER"],
exp:''
},
{
label:"Secretaría General",
numeros:["Primera","Segunda","Tercera","Cuarta","Quinta"],
tipos:["JA","JAR","JAL","RAA","QUEJA","SNA","PRA","RAP","RI","RER"],
exp:''
},
{
label:"Amparo",
numeros:[],
tipos:[],
exp:''
}
],
expe: '',
exped:'',
selectedInstancia:0,
selectedNumero:'',
selectedTipo:'',
inputExpediente:'',
numeros:[],
tipos:[],
inputAnio:'',
selectedDrinkLabel:'',
area:'',
noarea:'',
max: 4,
habilitado: 0,
habilitado2: 0,
habilitado3: 0,
message: '',
acuerdos: []
}
},
methods: {
buscarAcuerdos: function (post) {
this.acuerdos=[]
this.acuerdos=[]
this.exped = ''
this.area = ''
choise.message = ''
this.selectedInstancia=0
this.selectedNumero=0
this.selectedTipo=0
this.inputAnio=''
this.inputExpediente=''
this.habilitado = 0
this.habilitado2 = 0
this.habilitado3 = 0
NProgress.start()
//post = this.selectedTipo + "-" + this.inputExpediente + "/" + this.inputAnio + "-" + this.romano
var config = { headers: {'Content-Type': 'application/json'} }
//axios.post('http://localhost:49937/Demanda/AgreementsList', JSON.stringify(post), config)
axios.post('https://jel.tjamich.gob.mx/ApiJel/Demanda/AgreementsList', JSON.stringify(post), config)
//.then(response => (this.acuerdos = response.data.Data))
.then(response => {
if(response.data.Data === null) {
this.exped = this.expe
this.area = ''
NProgress.done()
choise.message = 'No hay información sobre el expediente, favor de verificar'
}
else
{
this.exped = this.expe
this.area = this.noarea
NProgress.done()
this.acuerdos = response.data.Data
//console.log(response)
}
})
//.then(response => (console.log(response)))
.catch(error => console.log(error))
},
selectInstancia:function() {
this.habilitado2 = 0
if (this.instancias[this.selectedInstancia].numeros.length != "")
{
this.numeros = this.instancias[this.selectedInstancia].numeros;
this.habilitado = 1
}
else
{
this.habilitado = 0
}
this.selectedDrinkLabel = this.instancias[this.selectedInstancia].label;
},
noInstancia:function(){
this.tipos=[]
this.expediente = ''
this.noarea = areas(this.selectedInstancia, this.selectedNumero)
if (this.instancias[this.selectedInstancia].numeros.length != "")
{
this.tipos = this.instancias[this.selectedInstancia].tipos;
this.habilitado2 = 1
this.romano = romanos(this.selectedNumero)
}
},
noTipo:function(){
this.habilitado3 = 1
},
noExpediente:function(){
this.inputExpediente = zfill(this.inputExpediente, 4);
},
noAnio:function(){
if(this.inputAnio.length != 4)
alert('El año no tiene un formato correcto')
this.expe = this.selectedTipo + "-" + this.inputExpediente + "/" + this.inputAnio + "-" + this.romano
},
isNumber:function(evt) {
evt = (evt) ? evt : window.event;
var charCode = (evt.which) ? evt.which : evt.keyCode;
if ((charCode > 31 && (charCode < 48 || charCode > 57)) && charCode !== 46) {
evt.preventDefault();;
} else {
return true;
}
},
}
})
const vueApp = new Vue({
el: '#vueapp'
})
Vue.component('AgreementsList', {
template: `
<div class="card-body">
<h5 class="card-title">Busqueda por Expediente</h5>
<p class="card-text">Escribe el número de expediente con el formato que se muestra como sugerencia.</p>
<div class="row">
<label class="col-sm-2 control-label" for="example-text-input">Expediente: </label>
<div class="col-sm-3">
<input class="js-maxlength form-control" v-model="expediente" id="expediente" type="text" name="expediente" placeholder="JA-0001/2008-I">
</div>
<input class="btn btn-m btn-primary" id="submitButton" type="submit" value="Buscar" v-on:click="buscarAcuerdos(expediente)">
</div><br>
<div class="desc"> Expediente: <strong class="mrs">{{ this.expediente | uppercase }}</strong><br/>
<div class="desc">Área: <strong class="mrs">{{ this.area }}</strong><br/></div>
<ul>
<li v-for="acuerdo in acuerdos"><strong>{{ getDate(acuerdo.FechaPublicacion) }}</strong> <br/> <p align='justify'>{{ acuerdo.ExtractoSinFormato }}</p></li>
</ul>
</div>
`,
data: function() {
return {
expediente: '',
acuerdos: []
}
},
methods: {
buscarAcuerdos: function (post) {
NProgress.start()
this.acuerdos=[]
this.exped = ''
this.area = ''
choise.message = ''
var config = { headers: {'Content-Type': 'application/json'} }
//axios.post('http://localhost:49937/Demanda/AgreementsList', JSON.stringify(post), config)
axios.post('https://jel.tjamich.gob.mx/ApiJel/Demanda/AgreementsList', JSON.stringify(post), config)
//.then(response => (this.acuerdos = response.data.Data))
.then(response => {
if(response.data.Data === null) {
this.exped = this.expe
this.area = ''
NProgress.done()
choise.message = 'No hay información sobre el expediente, favor de verificar'
}
else
{
//this.area = areas(this.selectedInstancia, this.selectedNumero)
NProgress.done()
this.acuerdos = response.data.Data
//console.log(response)
}
})
//.then(response => (console.log(response)))
.catch(error => console.log(error))
}
}
})
const vueAgree = new Vue({
el: '#agree'
})
Vue.filter('uppercase', function (value) {
return value.toUpperCase()
})
</script>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<section class="call-to-action call-to-action-default with-button-arrow content-align-center call-to-action-in-footer">
<div class="container">
<div class="row">
<div class="col-md-9 col-lg-9">
<div class="call-to-action-content">
<h3>Conoce cual es el <strong>Tribunal de Justicia Administrativa</strong> más cercano...</h3>
</div>
</div>
<div class="col-md-3 col-lg-3">
<div class="call-to-action-btn">
<a href="#" target="_self" class="btn btn-lg btn-primary">ver mapa</a>
</div>
</div>
</div>
</div>
</section>