소스 검색

驾驶舱-我的待办角标数量显示

wanglt 6 달 전
부모
커밋
de459a0530
1개의 변경된 파일10개의 추가작업 그리고 1개의 파일을 삭제
  1. 10 1
      ygtx-ui/src/views/index4.vue

+ 10 - 1
ygtx-ui/src/views/index4.vue

@@ -299,7 +299,7 @@
             <div class="icon-circle bg-color-blue">
               <el-icon class="fa fa-ticket text-primary blue-color"></el-icon>
               <!-- 角标 -->
-              <div v-if="homePageData.pendingNum>0" class="badge">{{ homePageData.pendingNum }}</div>
+              <div v-if="homePageData.todoNum>0" class="badge">{{ homePageData.todoNum }}</div>
             </div>
           </div>
           <div class="icon-label">我的待办</div>
@@ -468,6 +468,7 @@ import { ref, reactive } from 'vue';
 import { getHomePageOrderListData } from '@/api/gxt/gxtOrder';
 import { selectHomePageData } from '@/api/gxt/repairOrder';
 import { listAllEquipment } from '@/api/gxt/equipment';
+import { listMyTodo } from '@/api/gxt/orderMine';
 import { encryptParams } from '@/utils/encrypt';
 
 export default {
@@ -586,6 +587,7 @@ export default {
         repairPending: 0,
         workPending: 0,
         pendingNum: 0,
+        todoNum: 0,        // 我的待办数量
         hasCenter: null,
         timeOutNum: 0,
       },
@@ -1403,6 +1405,13 @@ export default {
           this.homePageData.timeOutNum = response.data.timeOutNum;
         }
       });
+      
+      // 获取我的待办数量
+      listMyTodo({ pageNum: 1, pageSize: 1 }).then(response => {
+        if (response.code === 200) {
+          this.homePageData.todoNum = response.total || 0;
+        }
+      });
     },
     getTextColor(jsy) {
       if(jsy>0) {