|
@@ -4,17 +4,17 @@
|
|
|
<view class="statistics">
|
|
|
<view class="statistics-b">
|
|
|
<view class="statistics-b-li">
|
|
|
- <view class="statistics-b-li-t color-A">99</view>
|
|
|
+ <view class="statistics-b-li-t color-A">{{totalDeviceNum}}</view>
|
|
|
<view class="statistics-b-li-b">设备总数</view>
|
|
|
</view>
|
|
|
<view class="line"></view>
|
|
|
<view class="statistics-b-li">
|
|
|
- <view class="statistics-b-li-t color-B">16</view>
|
|
|
+ <view class="statistics-b-li-t color-B">{{newlyAddToday}}</view>
|
|
|
<view class="statistics-b-li-b">今日新增设备</view>
|
|
|
</view>
|
|
|
<view class="line"></view>
|
|
|
<view class="statistics-b-li">
|
|
|
- <view class="statistics-b-li-t color-C">33</view>
|
|
|
+ <view class="statistics-b-li-t color-C">{{overdueDeviceNum}}</view>
|
|
|
<view class="statistics-b-li-b">超期服役设备</view>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -68,7 +68,8 @@
|
|
|
config
|
|
|
} from '@/api/request/config.js'
|
|
|
import {
|
|
|
- reportAppletReportApiDeviceStatGetDeviceStat
|
|
|
+ reportAppletReportApiDeviceStatGetDeviceStat,
|
|
|
+ reportAppletReportBsEquipDangerCheckList,
|
|
|
} from '@/pages/api/index.js'
|
|
|
export default {
|
|
|
name: "equipmentControl",
|
|
@@ -181,6 +182,9 @@
|
|
|
|
|
|
],
|
|
|
total: 0,
|
|
|
+ newlyAddToday: 0,
|
|
|
+ overdueDeviceNum: 0,
|
|
|
+ totalDeviceNum: 0,
|
|
|
}
|
|
|
},
|
|
|
created() {
|
|
@@ -191,6 +195,7 @@
|
|
|
},
|
|
|
mounted() {
|
|
|
this.reportAppletReportApiDeviceStatGetDeviceStat();
|
|
|
+ this.reportAppletReportBsEquipDangerCheckList();
|
|
|
this.getServerData();
|
|
|
this.getServerDataTow();
|
|
|
this.getServerDataThree();
|
|
@@ -202,11 +207,21 @@
|
|
|
data
|
|
|
} = await reportAppletReportApiDeviceStatGetDeviceStat();
|
|
|
if (data.code == 200) {
|
|
|
- /* this.dataList = data.data.warningList;
|
|
|
- this.$set(self, 'todayTotal', data.data.warning.todayTotal);
|
|
|
- this.$set(self, 'yesterdayTotal', data.data.warning.yesterdayTotal);
|
|
|
- this.$set(self, 'rate', data.data.warning.rate);
|
|
|
- */
|
|
|
+ this.$set(self, 'newlyAddToday', data.data.newlyAddToday);
|
|
|
+ this.$set(self, 'overdueDeviceNum', data.data.overdueDeviceNum);
|
|
|
+ this.$set(self, 'totalDeviceNum', data.data.totalDeviceNum)
|
|
|
+ }
|
|
|
+ },
|
|
|
+ //安全检查指标
|
|
|
+ async reportAppletReportBsEquipDangerCheckList() {
|
|
|
+ let self = this;
|
|
|
+ const {
|
|
|
+ data
|
|
|
+ } = await reportAppletReportBsEquipDangerCheckList();
|
|
|
+ if (data.code == 200) {
|
|
|
+ /* this.$set(self, 'newlyAddToday', data.data.newlyAddToday);
|
|
|
+ this.$set(self, 'overdueDeviceNum', data.data.overdueDeviceNum);
|
|
|
+ this.$set(self, 'totalDeviceNum', data.data.totalDeviceNum) */
|
|
|
}
|
|
|
},
|
|
|
getServerData() {
|