|
@@ -117,7 +117,7 @@ import * as echarts from 'echarts'
|
|
|
// import { listNotice } from "@/api/system/notice";
|
|
|
// import { firstload } from "@/api/homepage.js";
|
|
|
// import { envirinfo } from "@/api/environSafe/hsmsstatistics.js";
|
|
|
- import { httpAction, getAction } from '@/api/manage'
|
|
|
+ import { httpAction, getAction, postAction } from '@/api/manage'
|
|
|
import { emsdata } from '../module_ems/energyAnalyse/emsdata';
|
|
|
|
|
|
export default {
|
|
@@ -223,6 +223,11 @@ export default {
|
|
|
humis:[],
|
|
|
url: {
|
|
|
list: "/homepate/statistics/firstload",
|
|
|
+ equipment: "/equipmentStatistics/equipmentStatistics/machineSum",
|
|
|
+ repair: "/cmmsRepair/cmmsRepair/indexrepairnum",
|
|
|
+ upkeep: "/cmmsUpkeep/cmmsUpkeep/getMyChargeNumDay",
|
|
|
+ upkeepAll: "/cmmsUpkeep/cmmsUpkeep/getMyChargeNum",
|
|
|
+ inspect: "/cmmsInspect/cmmsInspect/indexinspectnum",
|
|
|
},
|
|
|
}
|
|
|
},
|
|
@@ -241,14 +246,15 @@ export default {
|
|
|
var _this = this;
|
|
|
setInterval(function () {
|
|
|
// _this.getInfo();
|
|
|
- _this.getTest();
|
|
|
+ // _this.getTest();
|
|
|
}, 60000);
|
|
|
},
|
|
|
methods: {
|
|
|
/** 首次打开加载整个页面 */
|
|
|
getList() {
|
|
|
// this.getInfo();
|
|
|
- this.getTest();
|
|
|
+ this.getInfo2();
|
|
|
+ // this.getTest();
|
|
|
},
|
|
|
// 处理/查看
|
|
|
chakan(){
|
|
@@ -341,6 +347,41 @@ export default {
|
|
|
|
|
|
});
|
|
|
},
|
|
|
+ getInfo2() {
|
|
|
+ getAction(this.url.equipment, null).then((res) => {
|
|
|
+ console.log('equipment',res)
|
|
|
+ this.operaStatistics.machineIncomplete = res.result.runSum;
|
|
|
+ this.operaStatistics.machineCompleted = res.result.allSum;
|
|
|
+ })
|
|
|
+ postAction(this.url.repair, null).then((res) => {
|
|
|
+ console.log('repair',res)
|
|
|
+ this.operaStatistics.repairCompleted = res.result.totalnum;
|
|
|
+ this.operaStatistics.repairIncomplete = res.result.todaynum;
|
|
|
+ })
|
|
|
+ getAction(this.url.upkeep, null).then((res) => {
|
|
|
+ console.log('upkeep',res)
|
|
|
+ this.operaStatistics.upkeepIncomplete = res.result;
|
|
|
+ })
|
|
|
+ getAction(this.url.upkeepAll, null).then((res) => {
|
|
|
+ console.log('upkeepAll',res)
|
|
|
+ this.operaStatistics.upkeepCompleted = res.result;
|
|
|
+ })
|
|
|
+ postAction(this.url.inspect, null).then((res) => {
|
|
|
+ console.log('inspect',res)
|
|
|
+ this.operaStatistics.inspectCompleted = res.result.totalnum;
|
|
|
+ this.operaStatistics.inspectIncomplete = res.result.todaynum;
|
|
|
+ })
|
|
|
+
|
|
|
+ this.TodayElectricity = emsdata.homedata.TodayElectricity;
|
|
|
+ this.EnvironmentTemp = emsdata.homedata.EnvironmentTemp;
|
|
|
+ this.alarmList = emsdata.homedata.alarmData;
|
|
|
+ this.noticeList = emsdata.homedata.noticeData;
|
|
|
+
|
|
|
+ this.temperatureData = emsdata.homedata.envirData;
|
|
|
+
|
|
|
+ this.initEcharts();
|
|
|
+ this.initTempAndHumiEcharts();
|
|
|
+ },
|
|
|
/** 查询报警数据列表 */
|
|
|
getAlarmList() {
|
|
|
var queryParams = {
|