dedsudiyu 5 månader sedan
förälder
incheckning
faa59cce23
2 ändrade filer med 15 tillägg och 72 borttagningar
  1. 1 55
      pages/views/dataBoard/equipmentControl.vue
  2. 14 17
      pages/views/dataBoard/resourceReservation.vue

+ 1 - 55
pages/views/dataBoard/equipmentControl.vue

@@ -188,8 +188,6 @@
 			this.reportAppletReportBsEquipDangerList();
 			this.reportAppletReportApiEquipOverdueList();
 			this.reportAppletReportApiEquipLifeList();
-			//this.getServerData();
-			//this.getServerDataTow();
 		},
 		methods: {
 			//隐患统计
@@ -198,7 +196,7 @@
 				const {
 					data
 				} = await reportAppletReportBsEquipDangerList({
-					dangerType: '3',
+					dangerType: '1',
 					statisticsType: this.statisticsType
 				});
 				if (data.code == 200) {
@@ -293,58 +291,6 @@
 					this.$set(self, 'dataList', data.data);
 				}
 			},
-			getServerData() {
-				//模拟从服务器获取数据时的延时
-				setTimeout(() => {
-					//模拟服务器返回数据,如果数据格式和标准格式不同,需自行按下面的格式拼接
-					let res = {
-						categories: ["植物保护", "园林艺术", "生命科学", "理学院", "农学院"],
-						series: [{
-							name: "目标值",
-							textColor: '#fff',
-							data: [62, 37, 20, 41, 32]
-						}, ]
-					};
-					this.chartData = JSON.parse(JSON.stringify(res));
-				}, 500);
-			},
-			getServerDataTow() {
-				//模拟从服务器获取数据时的延时
-				setTimeout(() => {
-					//模拟服务器返回数据,如果数据格式和标准格式不同,需自行按下面的格式拼接
-					let res = {
-						series: [{
-							data: [{
-								"name": "5年内",
-								"value": 147,
-								"labelText": "5年内 147台 26%",
-								"textColor": "#fff",
-							}, {
-								"name": "10年内",
-								"value": 136,
-								"labelText": "10年内 136台 24%",
-								"textColor": "#fff",
-							}, {
-								"name": "12年内",
-								"value": 124,
-								"labelText": "12年内 124台 22%",
-								"textColor": "#fff",
-							}, {
-								"name": "20年内",
-								"value": 96,
-								"labelText": "20年内 96台 17%",
-								"textColor": "#fff",
-							}, {
-								"name": "超期服役",
-								"value": 67,
-								"labelText": "超期服役 67台 11%",
-								"textColor": "#fff",
-							}]
-						}]
-					};
-					this.chartDataTow = JSON.parse(JSON.stringify(res));
-				}, 500);
-			},
 
 			dateClick(index) {
 				this.dateIndex = index;

+ 14 - 17
pages/views/dataBoard/resourceReservation.vue

@@ -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;