zy1125 1 gadu atpakaļ
vecāks
revīzija
a379d93596

+ 2 - 2
src/components/CircleProgress.vue

@@ -3,7 +3,7 @@
3 3
         <div class="number" v-if="textPosition == 'top'">
4 4
             <ul class="flex">
5 5
                 <!-- <ScrollNum v-for="(num, idx) of numArr" :key="idx" as="li" :i="num" :delay="idx + 1" /> -->
6
-                <count-to :useEasing="false" style="font-size: 0.08rem;"  :startVal='1' :endVal='targetValue' :duration='2000'></count-to>
6
+                <count-to :useEasing="true" style="font-size: 0.08rem;"  :startVal='1' :endVal='targetValue' :duration='2000'></count-to>
7 7
                 <span>个</span>
8 8
             </ul>
9 9
         </div>
@@ -24,7 +24,7 @@
24 24
         <ul class="flex" style="width: 65px;display: flex;align-items: center;justify-content: center;">
25 25
             <!-- <ScrollNum v-for="(num, idx) of numArr" :key="idx" as="li" :i="num" :delay="idx + 1" /> -->
26 26
             <div style="color: #fff;font-weight: 600; ">
27
-                <count-to :useEasing="false" style="font-size: 0.08rem;"  :startVal='1' :endVal='targetValue' :duration='2000'></count-to>
27
+                <count-to :useEasing="true" style="font-size: 0.08rem;"  :startVal='1' :endVal='targetValue' :duration='2000'></count-to>
28 28
             </div>
29 29
             <span style="color: antiquewhite;"   v-if="text.includes('课程')">(节)</span>
30 30
             <span style="color: antiquewhite;" v-else>(个)</span>

+ 8 - 1
src/components/left.vue

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

+ 10 - 1
src/components/right.vue

@@ -40,7 +40,16 @@
40 40
                         <img :src="deviceImg + item.icon + '.png'" alt="">
41 41
                         <!-- <img :src="'src/assets/img/' + item.icon + '.png'" alt=""> -->
42 42
                     </CircleProgress>
43
-                    <div class="text">{{ item.text }}</div>
43
+
44
+                    <div  class="text">{{ item.text }}</div>
45
+
46
+                    <!-- <el-tooltip placement="bottom">
47
+                        <template    #content> multiple lines<br />second line </template>
48
+                        <el-text style="width: 100px;" class="w-100px mb-2" truncated>
49
+                            测试测试测试
50
+                        </el-text>
51
+                    </el-tooltip> -->
52
+            
44 53
                 </div>
45 54
             </div>
46 55
         </div>