Browse Source

上线

feature
lucky 4 years ago
parent
commit
ef401a5d05
  1. 9
      src/components/heat.vue
  2. 1
      src/components/humidity.vue
  3. 1
      src/components/temperature.vue
  4. 22
      src/components/top-bar.vue

9
src/components/heat.vue

@ -23,12 +23,11 @@ export default defineComponent({
}, },
mounted() { mounted() {
this.getHeatImaging();
setInterval(() => { setInterval(() => {
// //
this.getHeatImaging(); this.getHeatImaging();
}, 5000); }, 3000);
//
this.getHeatImaging();
}, },
unmounted() { unmounted() {
@ -45,7 +44,9 @@ export default defineComponent({
const { warehouseId } = this.$route.query; const { warehouseId } = this.$route.query;
const param = { warehouseId: warehouseId ? warehouseId : 7 }; const param = { warehouseId: warehouseId ? warehouseId : 7 };
const data = await getHeatImaging(param); const data = await getHeatImaging(param);
this.src = data.imageData; if (data && data.imageData) {
this.src = data.imageData;
}
} catch (error) { } catch (error) {
console.log("error: ", error); console.log("error: ", error);
} }

1
src/components/humidity.vue

@ -61,6 +61,7 @@ export default defineComponent({
}, },
mounted() { mounted() {
this.getTeamAndHumidity();
setInterval(() => { setInterval(() => {
// //
this.getTeamAndHumidity(); this.getTeamAndHumidity();

1
src/components/temperature.vue

@ -61,6 +61,7 @@ export default defineComponent({
}, },
mounted() { mounted() {
this.getTeamAndHumidity();
setInterval(() => { setInterval(() => {
// //
this.getTeamAndHumidity(); this.getTeamAndHumidity();

22
src/components/top-bar.vue

@ -59,6 +59,9 @@ export default defineComponent({
}, },
mounted() { mounted() {
this.getTeamAndHumidity();
this.getFireOrFlood();
// //
setInterval(() => { setInterval(() => {
this.getNowFormatDate(); this.getNowFormatDate();
@ -68,7 +71,7 @@ export default defineComponent({
// //
this.getTeamAndHumidity(); this.getTeamAndHumidity();
this.getFireOrFlood(); this.getFireOrFlood();
}, 600000); }, 3000);
}, },
methods: { methods: {
@ -77,7 +80,7 @@ export default defineComponent({
try { try {
const { parkId, warehouseId } = this.$route.query; const { parkId, warehouseId } = this.$route.query;
const param = { const param = {
parkId: parkId ? parkId : 1, parkId: parkId ? parkId : 2,
warehouseId: warehouseId ? warehouseId : 7, warehouseId: warehouseId ? warehouseId : 7,
}; };
const data = await getTeamAndHumidity(param); const data = await getTeamAndHumidity(param);
@ -97,7 +100,7 @@ export default defineComponent({
try { try {
const { parkId, warehouseId } = this.$route.query; const { parkId, warehouseId } = this.$route.query;
const param = { const param = {
parkId: parkId ? parkId : 1, parkId: parkId ? parkId : 2,
warehouseId: warehouseId ? warehouseId : 7, warehouseId: warehouseId ? warehouseId : 7,
}; };
const data = await getFireOrFlood(param); const data = await getFireOrFlood(param);
@ -240,6 +243,15 @@ export default defineComponent({
background-image: url("../assets/img/water.png"); background-image: url("../assets/img/water.png");
} }
.state {
animation: twinkling 1s infinite ease-in-out;
}
.animated {
animation-duration: 1s;
animation-duration: 1s;
animation-fill-mode: both;
animation-fill-mode: both;
}
@keyframes twinkling { @keyframes twinkling {
0% { 0% {
opacity: 0; opacity: 0;
@ -248,8 +260,4 @@ export default defineComponent({
opacity: 1; opacity: 1;
} }
} }
.state {
animation: twinkling 1s infinite;
}
</style> </style>

Loading…
Cancel
Save