|
@@ -120,7 +120,7 @@ export default ({
|
120
|
120
|
position: 'center',
|
121
|
121
|
color: '#fff',
|
122
|
122
|
formatter: () => { // 格式化要展示的文本
|
123
|
|
- return `总计\n\n1430间`
|
|
123
|
+ return `总计\n\n${roomtotle.value}间`
|
124
|
124
|
},
|
125
|
125
|
|
126
|
126
|
// formatter: '{total|' + 200 + '}' + '\n\r' + '{active|共发布活动}',
|
|
@@ -202,6 +202,9 @@ export default ({
|
202
|
202
|
const classCount = ref([])
|
203
|
203
|
// 智慧教室使用数据
|
204
|
204
|
const classRoom = ref([])
|
|
205
|
+ const roomtotle = ref([])
|
|
206
|
+
|
|
207
|
+
|
205
|
208
|
|
206
|
209
|
|
207
|
210
|
const getClassData = async () => {
|
|
@@ -210,6 +213,10 @@ export default ({
|
210
|
213
|
let { course, classroomDetail, category } = res.data;
|
211
|
214
|
classRoomCount.value = category;
|
212
|
215
|
|
|
216
|
+ //获取教室总数
|
|
217
|
+ roomtotle.value= category.reduce((accumulator, currentValue) => accumulator + currentValue.value, 0);
|
|
218
|
+ console.log('categorycategory',roomtotle);
|
|
219
|
+
|
213
|
220
|
if (classRoomCount.value) {
|
214
|
221
|
initeCharts()
|
215
|
222
|
}
|