Преглед на файлове

驾驶舱添加岗位配置是否参与排名

wanglt преди 3 месеца
родител
ревизия
6e8a44d281
променени са 1 файла, в които са добавени 6 реда и са изтрити 1 реда
  1. 6 1
      ygtx-ui/src/views/index5.vue

+ 6 - 1
ygtx-ui/src/views/index5.vue

@@ -244,7 +244,7 @@
                 <el-table-column prop="rank" label="排名" width="80" align="center"></el-table-column>
                 <el-table-column prop="name" label="名字" width="120" align="center">
                   <template #default="scope">
-                    <span :style="{ color: scope.row.name === homePageData.nickName ? 'red' : '' }">{{ scope.row.name }}</span>
+                    <span :style="{ color: scope.row.name === homePageData.nickName && scope.row.rank === currentSort ? 'red' : '' }">{{ scope.row.name }}</span>
                   </template>
                 </el-table-column>
                 <el-table-column prop="station" label="场站" align="center"></el-table-column>
@@ -311,6 +311,7 @@ export default {
       showRankingTable: false, // 控制排名列表卡片显示
       currentRankingType: '', // 当前显示的排名类型
       currentRankingData: [], // 当前显示的排名数据
+      currentSort: null, // 当前显示方式的排名
       // 定时器
       timer: null
     }
@@ -339,6 +340,7 @@ export default {
         this.showRankingTable = false;
         this.currentRankingType = '';
         this.currentRankingData = [];
+        this.currentSort = null;
       } else {
         // 否则显示对应类型的排名列表
         this.currentRankingType = type;
@@ -348,9 +350,12 @@ export default {
         let rankingData = [];
         if (type === 'dept') {
           rankingData = [...this.homePageData.scoreDept];
+          this.currentSort = this.homePageData.deptSort;
         } else if (type === 'center') {
           rankingData = [...this.homePageData.scoreCenter];
+          this.currentSort = this.homePageData.centerSort;
         } else if (type === 'company') {
+          this.currentSort = this.homePageData.companySort;
           rankingData = [...this.homePageData.scoreCompany];
         }