|
@@ -56,11 +56,11 @@
|
|
|
</view>
|
|
|
</view>
|
|
|
<view class="small-title">
|
|
|
- <view class="small-title-l">资源室隐患统计</view>
|
|
|
+ <view class="small-title-l">资源分类占比统计</view>
|
|
|
<viwe class="chart-tab-tow">
|
|
|
- <view class="chart-tab-li" :class="chartTabIndexThree==index?'tab-A':'tab-B'"
|
|
|
+ <!-- <view class="chart-tab-li" :class="chartTabIndexThree==index?'tab-A':'tab-B'"
|
|
|
v-for="(item,index) in chartTabListThree" :key="index" @click="chartTabClickThree(index)">{{item}}
|
|
|
- </view>
|
|
|
+ </view> -->
|
|
|
</viwe>
|
|
|
</view>
|
|
|
<view class="chart-tow">
|
|
@@ -78,7 +78,7 @@
|
|
|
} from '@/api/request/config.js'
|
|
|
import {
|
|
|
reportAppletReportApiResourceRateResourceList,
|
|
|
- reportAppletReportBsEquipDangerList
|
|
|
+ reportAppletReportApiResourceRateAnalysisList
|
|
|
} from '@/pages/api/index.js'
|
|
|
export default {
|
|
|
name: "resourceReservation",
|
|
@@ -192,7 +192,7 @@
|
|
|
rotate: false,
|
|
|
rotateLock: false,
|
|
|
color: ["#1890FF", "#91CB74", "#FAC858", "#EE6666", "#73C0DE", "#3CA272", "#FC8452", "#9A60B4", "#ea7ccc"],
|
|
|
- padding: [15, 20, 15, 15],
|
|
|
+ padding: [15, 40, 15, 15],
|
|
|
dataLabel: true,
|
|
|
enableScroll: false,
|
|
|
fontColor:'#ffffff',
|
|
@@ -245,7 +245,7 @@
|
|
|
mounted() {
|
|
|
|
|
|
this.reportAppletReportApiResourceRateResourceList();
|
|
|
- this.reportAppletReportBsEquipDangerList()
|
|
|
+ this.reportAppletReportApiResourceRateAnalysisList()
|
|
|
},
|
|
|
methods: {
|
|
|
async reportAppletReportApiResourceRateResourceList() {
|
|
@@ -276,24 +276,21 @@
|
|
|
})
|
|
|
}
|
|
|
},
|
|
|
- async reportAppletReportBsEquipDangerList() {
|
|
|
+ async reportAppletReportApiResourceRateAnalysisList() {
|
|
|
let self = this;
|
|
|
const {
|
|
|
data
|
|
|
- } = await reportAppletReportBsEquipDangerList({
|
|
|
- dangerType: '4',
|
|
|
- statisticsType: this.statisticsType
|
|
|
- });
|
|
|
+ } = await reportAppletReportApiResourceRateAnalysisList({});
|
|
|
if (data.code == 200) {
|
|
|
let categories = [];
|
|
|
let list = [];
|
|
|
- data.data.subjectList.forEach((item, index)=>{
|
|
|
+ data.data.forEach((item, index)=>{
|
|
|
if (index < 5) {
|
|
|
- if (item.subjectName.length > 6) {
|
|
|
- item.subjectName = item.subjectName.slice(0, 6) + '...';
|
|
|
+ if (item.equType.length > 6) {
|
|
|
+ item.equType = item.equType.slice(0, 6) + '...';
|
|
|
}
|
|
|
- categories.push(item.subjectName)
|
|
|
- list.push(item.dangerNum)
|
|
|
+ categories.push(item.equType)
|
|
|
+ list.push(item.equNumber)
|
|
|
}
|
|
|
})
|
|
|
let res = {};
|
|
@@ -321,7 +318,7 @@
|
|
|
chartTabClickThree(index) {
|
|
|
this.chartTabIndexThree = index;
|
|
|
this.statisticsType = index + 1;
|
|
|
- this.reportAppletReportBsEquipDangerList();
|
|
|
+ this.reportAppletReportApiResourceRateAnalysisList();
|
|
|
},
|
|
|
chartTabClick(index) {
|
|
|
this.chartTabIndex = index;
|