|
@@ -61,7 +61,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="bio-content">
|
|
|
- <chart-bar></chart-bar>
|
|
|
+ <chart-bar :data="data0"></chart-bar>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="bio-flex-center">
|
|
@@ -197,6 +197,8 @@
|
|
|
import { swiper, swiperSlide } from 'vue-awesome-swiper'
|
|
|
import 'swiper/css/swiper.css'
|
|
|
import ChartBar from "@/views/BioSafety/chart/ChartBar";
|
|
|
+import {getCar} from "@/utils/api";
|
|
|
+
|
|
|
export default {
|
|
|
name: "BioSafety",
|
|
|
components: {
|
|
@@ -221,6 +223,13 @@ export default {
|
|
|
// clickable: true
|
|
|
// }
|
|
|
},
|
|
|
+ data0: {
|
|
|
+ id: 11,
|
|
|
+ time: [],
|
|
|
+ data: [],
|
|
|
+ name: '',
|
|
|
+ unit: '分钟'
|
|
|
+ },
|
|
|
data1: {
|
|
|
id: 1,
|
|
|
time: ['8:00', '10:00', '12:00', '14:00', '16:00', '18:00', '20:00'],
|
|
@@ -243,6 +252,23 @@ export default {
|
|
|
unit: '次'
|
|
|
}
|
|
|
}
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ init() {
|
|
|
+ this.data0.time = [];
|
|
|
+ this.data0.data = [];
|
|
|
+ getCar({}).then(res => {
|
|
|
+ if(res.code === 10000) {
|
|
|
+ res.data.forEach(item => {
|
|
|
+ this.data0.time.push(item.time);
|
|
|
+ this.data0.data.push(item.value);
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ }
|
|
|
+ },
|
|
|
+ mounted() {
|
|
|
+ this.init()
|
|
|
}
|
|
|
}
|
|
|
</script>
|
|
@@ -537,4 +563,4 @@ export default {
|
|
|
.case1 {
|
|
|
height: 60px;
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|