Переглянути джерело

Merge branch 'master' of http://gogs.gisvg.com/YDM/graduate-ui

# Conflicts:
#	src/views/system/Home/Index.vue
47 4 місяців тому
батько
коміт
04786c1658
2 змінених файлів з 13 додано та 24 видалено
  1. 1 1
      src/views/Home/Index.vue
  2. 12 23
      src/views/system/Home/Index.vue

+ 1 - 1
src/views/Home/Index.vue

@@ -276,7 +276,7 @@ import { useWatermark } from '@/hooks/web/useWatermark'
 import type { WorkplaceTotal, Project, Notice, Shortcut } from './types'
 import { pieOptions, barOptions } from './echarts-data'
 import { reactive, onMounted, watchEffect } from "vue";
-import { vue3ScrollSeamless } from "vue3-scroll-seamless";
+import {vue3ScrollSeamless} from "vue3-scroll-seamless";
 import * as UserApi from '@/api/system/user'
 import * as  DeptApi from '@/api/system/dept'
 import  { StudentAttendanceApi } from '@/api/system/studentAttendance'

+ 12 - 23
src/views/system/Home/Index.vue

@@ -80,7 +80,7 @@
                     <span style="color: rgba(4,53,103,0.89)">实时打卡状态</span>
                   </div>
                 </template>
-                <!-- <div class="demo" >-->
+                <!--                <div class="demo" >-->
                 <div class="table-header" >
                   <div class="header" >
                     <el-row class="shouye" >
@@ -178,13 +178,10 @@
                     </div>
                   </div>
 
-                  <vue3ScrollSeamless
-class="scroll-wraps text-color" :classOptions="class2Options"
-                                      :dataList="list2">
+                  <vue3ScrollSeamless class="scroll-wraps text-color" :classOptions="class2Options"
+                                      :dataList="list2" v-if="list2.length > 0">
                     <div v-if="list2.length > 0">
-                      <el-row
-v-for="(item, i) of list2" :key="i" class="shouye"
-                              style="margin-bottom: 5px; display: flex; justify-content: center;background :rgba(147,208,255,0.18);padding:2px">
+                      <el-row v-for="(item, i) of list2" :key="i" class="shouye" style="margin-bottom: 5px; display: flex; justify-content: center;background :rgba(147,208,255,0.18);padding:2px">
                         <!-- <el-col :span="6" class="center" style="padding: 10px; border: none;">
                           <div>{{ item.ID }}</div>
                         </el-col> -->
@@ -207,17 +204,14 @@ v-for="(item, i) of list2" :key="i" class="shouye"
                       暂无预测记录
                     </div> -->
                   </vue3ScrollSeamless>
-                  <div
-v-if="list2.length == 0"
-                       style="width: 100%; height: 100px; display: flex; justify-content: center; align-items: center; margin-top: -230px;">
+                  <div v-if="list2.length == 0" style="width: 100%; height: 100px; display: flex; justify-content: center; align-items: center; margin-top: -230px;">
                     <el-empty description="暂无数据"/>
                   </div>
                 </div>
               </el-card>
             </el-col>
             <el-col :xs="24" :sm="24" :md="12" :lg="12" :xl="8">
-              <el-card
-class=" mb-27px h-465px mt-40px "
+              <el-card class=" mb-27px h-465px mt-40px "
                        style="border: 4px solid rgba(109,181,255,0.42);border-radius:15px">
                 <template #header>
                   <div class="h-7 flex justify-between fw-800 text-20px">
@@ -264,24 +258,19 @@ class=" mb-27px h-465px mt-40px "
               <div class="demoss">
                 <div class="header">
                   <el-row class="shouye h-40px" style="border: none;">
-                    <el-col
-:span="12" class="center text-18px"
+                    <el-col :span="12" class="center text-18px"
                             style="border: none;padding: 8px;margin-left: 5px; margin-top: -5px;">
                       <div style="font-weight:550">工作间</div>
                     </el-col>
-                    <el-col
-:span="12" class="center text-18px"
+                    <el-col :span="12" class="center text-18px"
                             style="border: none;padding: 8px;margin-left: -15px; margin-top: -5px;">
                       <div style="font-weight:550">达成率</div>
                     </el-col>
                   </el-row>
                 </div>
-                <vue3ScrollSeamless
-class="scroll-wrapss  text-color" :classOptions="list1Options"
-                                    :dataList="list1">
+                <vue3ScrollSeamless v-if="list1.length != 0" class="scroll-wrapss text-color" :classOptions="list1Options" :dataList="list1">
                   <div v-if="list1.length > 0">
-                    <el-row
-v-for="(item, i) of list1" :key="i" class="shouye"
+                    <el-row v-for="(item, i) of list1" :key="i" class="shouye"
                             style="margin-bottom: 10px ;  display: flex; justify-content: center;background: rgba(138,193,248,0.17);padding: 2px">
                       <!-- 增加行与行之间的间距 -->
                       <el-col :span="12" class="center" style="padding: 15px;"> <!-- 增加内边距 -->
@@ -292,8 +281,7 @@ v-for="(item, i) of list1" :key="i" class="shouye"
                       </el-col>
                     </el-row>
                   </div>
-                  <div
-v-if="list1.length == 0"
+                  <div v-if="list1.length == 0"
                        style="width: 100%; height: 100px; display: flex; justify-content: center; align-items: center; color: white; font-size: 18px;">
                     暂无预测记录
                   </div>
@@ -654,6 +642,7 @@ const list1Options = reactive({
       if (chartRef.value) {
         chartInstance.value = echarts.init(chartRef.value);
         chartInstance.value.setOption(pieOptionsData);
+
         window.addEventListener('resize', resizeChart);
         resizeChart();
       }