From 8a9bdcafd93d489a28cca24d9a911f30d7720d6f Mon Sep 17 00:00:00 2001 From: Vitormanoel17 Date: Mon, 25 Apr 2022 21:51:58 -0300 Subject: [PATCH] =?UTF-8?q?[UPDATE]:=20Tornando=20os=20dados=20din=C3=A2mi?= =?UTF-8?q?cos,=20relacionados=20aos=20cr=C3=A9ditos?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/telaGraficos.vue | 27 +++++++++++++++++++++++---- 1 file changed, 23 insertions(+), 4 deletions(-) diff --git a/src/components/telaGraficos.vue b/src/components/telaGraficos.vue index 0db79bc..6a2ec39 100644 --- a/src/components/telaGraficos.vue +++ b/src/components/telaGraficos.vue @@ -13,7 +13,7 @@ >

-

CRÉDITOS POR DISCIPLINAS OBRIGATÓRIAS - 232

+

CRÉDITOS POR DISCIPLINAS OBRIGATÓRIAS - {{obg}}

CRÉDITOS CURSADOS - 32

@@ -31,7 +31,7 @@

- CRÉDITOS POR DISCIPLINAS OPTATIVAS E MÓDULO LIVRE - 24 + CRÉDITOS POR DISCIPLINAS OPTATIVAS E MÓDULO LIVRE - {{opt}}

CRÉDITOS CURSADOS - 6

@@ -49,8 +49,8 @@ >

-

CRÉDITOS TOTAIS DO CURSO - 256

-

CRÉDITOS CURSADOS - 38

+

CRÉDITOS TOTAIS DO CURSO - {{cred}}

+

CRÉDITOS CURSADOS - {{credCursados}}

@@ -64,8 +64,27 @@ export default { percentageObg: "14", percentageOpt: "50", percentageTotal: "15", + obg:0, + opt:0, + cred: 0, + credCursados: 0, }; }, + + mounted(){ + let cred = document.querySelector("#agenda-docente > table > tbody > tr:nth-child(10) > td > table > tbody > tr:nth-child(3) > td:nth-child(2)") + this.cred = Number.parseInt(cred.innerText)/15 + + let opt = document.querySelector("#agenda-docente > table > tbody > tr:nth-child(10) > td > table > tbody > tr:nth-child(2) > td:nth-child(2)") + this.opt = Number.parseInt(opt.innerText)/15 + + let obg = document.querySelector("#agenda-docente > table > tbody > tr:nth-child(10) > td > table > tbody > tr:nth-child(1) > td:nth-child(2)") + this.obg = Number.parseInt(obg.innerText)/15 + + this.credCursados = this.cred - (this.obg + this.opt) + this.percentageTotal = Number.parseInt((this.credCursados/this.cred)*100) + this.percentageTotal = this.percentageTotal.toString(); + } };