-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'newDesign' into 'development'
New Design Implemented See merge request lappis-unb/projects/SMI/smi-mobile!16
- Loading branch information
Showing
23 changed files
with
791 additions
and
305 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,3 +14,9 @@ export default { | |
} | ||
} | ||
</script> | ||
|
||
<style lang="scss"> | ||
body { | ||
background-color: #fafafa; | ||
} | ||
</style> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,55 @@ | ||
<template> | ||
<div> | ||
<q-spinner v-if="isLoading" size="3em" class="spinner"/> | ||
<main-list | ||
v-if="critical_tension.length > 0" | ||
:title="'Tensão crítica'" | ||
:items="critical_tension" | ||
:type="'occurence'" | ||
:info="'critical_tension'" | ||
icon="error" | ||
/> | ||
<main-list | ||
v-if="phase_drop.length > 0" | ||
:title="'Queda de tensão'" | ||
:items="phase_drop" | ||
:type="'occurence'" | ||
:info="'phase_drop'" | ||
icon="error" | ||
/> | ||
<main-list | ||
v-if="transductor_connection_fail.length > 0" | ||
:title="'Falha de comunicação'" | ||
:items="transductor_connection_fail" | ||
:type="'occurence'" | ||
:info="'conection_fail'" | ||
icon="warning" | ||
/> | ||
<main-list | ||
v-if="precarious_tension.length > 0" | ||
:title="'Tensão precária'" | ||
:items="precarious_tension" | ||
:type="'occurence'" | ||
:info="'precarious_tension'" | ||
icon="warning" | ||
|
||
/> | ||
|
||
<div v-if="!isLoading && | ||
transductor_connection_fail.length === 0 && | ||
<div :class="{'container': isLoading || transductor_connection_fail.length === 0 && | ||
critical_tension.length === 0 && | ||
precarious_tension.length === 0 && | ||
phase_drop.length === 0"> | ||
<p>Não há nenhuma ocorrência em andamento</p> | ||
phase_drop.length === 0 }"> | ||
<q-spinner v-if="isLoading" size="3em" class="spinner" /> | ||
<div | ||
v-else-if="transductor_connection_fail.length === 0 && | ||
critical_tension.length === 0 && | ||
precarious_tension.length === 0 && | ||
phase_drop.length === 0" | ||
> | ||
<p >Não há nenhuma ocorrência em andamento</p> | ||
</div> | ||
<div v-else> | ||
<main-list | ||
v-if="critical_tension.length > 0" | ||
:title="'Tensão crítica'" | ||
:items="critical_tension" | ||
:type="'occurence'" | ||
:info="'critical_tension'" | ||
:icon="serious_icon" | ||
:serious="true" | ||
/> | ||
<main-list | ||
v-if="phase_drop.length > 0" | ||
:title="'Queda de fase'" | ||
:items="phase_drop" | ||
:type="'occurence'" | ||
:info="'phase_drop'" | ||
:icon="serious_icon" | ||
:serious="true" | ||
/> | ||
<main-list | ||
v-if="transductor_connection_fail.length > 0" | ||
:title="'Falha de comunicação'" | ||
:items="transductor_connection_fail" | ||
:type="'occurence'" | ||
:info="'conection_fail'" | ||
:icon="light_icon" | ||
:serious="false" | ||
/> | ||
<main-list | ||
v-if="precarious_tension.length > 0" | ||
:title="'Tensão precária'" | ||
:items="precarious_tension" | ||
:type="'occurence'" | ||
:info="'precarious_tension'" | ||
:icon="light_icon" | ||
:serious="false" | ||
/> | ||
</div> | ||
|
||
</div> | ||
</template> | ||
<script> | ||
|
@@ -56,6 +63,8 @@ export default { | |
}, | ||
data () { | ||
return { | ||
serious_icon: 'img:statics/[email protected]', | ||
light_icon: 'img:statics/[email protected]', | ||
transductor_connection_fail: [], | ||
critical_tension: [], | ||
precarious_tension: [], | ||
|
@@ -65,7 +74,7 @@ export default { | |
}, | ||
created () { | ||
MASTER.get('occurences/') | ||
.then((res) => { | ||
.then(res => { | ||
this.transductor_connection_fail = res.data.transductor_connection_fail | ||
this.critical_tension = res.data.critical_tension | ||
this.precarious_tension = res.data.precarious_tension | ||
|
@@ -77,18 +86,25 @@ export default { | |
}) | ||
this.isLoading = false | ||
}) | ||
.catch((err) => { | ||
.catch(err => { | ||
console.log('ERROR: ', err) | ||
this.isLoading = false | ||
}) | ||
} | ||
} | ||
</script> | ||
|
||
<style lang="scss"> | ||
.spinner{ | ||
<style lang="scss" scoped> | ||
.spinner { | ||
display: flex; | ||
flex: center; | ||
margin: 0 auto; | ||
} | ||
.container { | ||
height: 80vh; | ||
width: 100vw; | ||
display: flex; | ||
align-items: center; | ||
justify-content: center; | ||
} | ||
</style> |
Oops, something went wrong.