|
@@ -116,7 +116,7 @@ import pieCharts from "./components/piecharts.vue"
|
|
|
import mixbarCharts from "./components/mixbarcharts.vue"
|
|
|
import ycmixbarCharts from "./components/ycmixbarcharts.vue"
|
|
|
import hbarCharts from "./components/hbarcharts.vue"
|
|
|
-import {getWorkorderList,getlistGanttTaskList,getMaintenrecordList,} from "@/api/work.js"
|
|
|
+import {getWorkorderList,getlistGanttTaskList,getMaintenrecordList,getabnormalStatistics,getrecentData} from "@/api/work.js"
|
|
|
export default {
|
|
|
components:{boxTable,pieCharts,mixbarCharts,ycmixbarCharts,hbarCharts},
|
|
|
data() {
|
|
@@ -156,6 +156,7 @@ import {getWorkorderList,getlistGanttTaskList,getMaintenrecordList,} from "@/api
|
|
|
this.getList()
|
|
|
this.getWorkorderList()
|
|
|
this.getlistGanttTaskList()
|
|
|
+ this.init()
|
|
|
},
|
|
|
async mounted() {
|
|
|
clearInterval(this.timer);
|
|
@@ -177,6 +178,28 @@ import {getWorkorderList,getlistGanttTaskList,getMaintenrecordList,} from "@/api
|
|
|
this.timer = null; // 防止内存泄漏
|
|
|
}
|
|
|
},
|
|
|
+ init(){
|
|
|
+ this.getabnormalStatistics();
|
|
|
+ this.getrecentData();
|
|
|
+ },
|
|
|
+ getabnormalStatistics(){
|
|
|
+ var params={
|
|
|
+ days:6
|
|
|
+ }
|
|
|
+ getabnormalStatistics(params).then(res=>{
|
|
|
+ this.mixbarDatab=JSON.parse(JSON.stringify(res.data))
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getrecentData(){
|
|
|
+ var params={
|
|
|
+ days:6
|
|
|
+ }
|
|
|
+ getrecentData(params).then(res=>{
|
|
|
+ if(res.code==200){
|
|
|
+ this.mixbarDataa=JSON.parse(JSON.stringify(res.data))
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
getWorkorderList(){
|
|
|
var params={
|
|
|
pageNum:this.pageNum,
|