Kaynağa Gözat

可接受任务添加提示

sunjh 6 yıl önce
ebeveyn
işleme
4d2af0cbfe
1 değiştirilmiş dosya ile 11 ekleme ve 5 silme
  1. 11 5
      src/components/Mine.vue

+ 11 - 5
src/components/Mine.vue

@@ -93,7 +93,7 @@
           <span slot="label">
             <el-badge v-if="myProjectNoticeCount>0" :value="myProjectNoticeCount" class="item"
                       style="height:auto;margin-top: 10px;margin-bottom: 25px; font-size: 16px;">我的项目</el-badge>
-            <el-badge v-if="myProjectNoticeCount==0" class="item"
+            <el-badge v-if="myProjectNoticeCount==null || myProjectNoticeCount == 0" class="item"
                       style="margin-top: 10px;margin-bottom: 25px; font-size: 16px;">我的项目</el-badge>
           </span>
           <span v-if="myProjects == null || myProjects.length == 0"> 暂无项目 </span>
@@ -112,7 +112,8 @@
           <span slot="label">
             <el-badge v-if="processProjectNoticeCount>0" :value="processProjectNoticeCount" class="item"
                       style="margin-top: 10px;margin-bottom: 25px; font-size: 16px;">处理中项目</el-badge>
-            <el-badge v-if="processProjectNoticeCount==0" class="item" style="margin-top: 10px;margin-bottom: 25px; font-size: 16px;">处理中项目</el-badge>
+            <el-badge v-if="processProjectNoticeCount==null || processProjectNoticeCount==0" class="item"
+                      style="margin-top: 10px;margin-bottom: 25px; font-size: 16px;">处理中项目</el-badge>
           </span>
           <el-row v-if="handlingProjects != null && handlingProjects.length != 0" type="flex" align="middle"
                   justify="center" style="font-size: 14px;">
@@ -128,7 +129,10 @@
         </el-tab-pane>
         <el-tab-pane name="acceptableProject">
           <span slot="label">
-            <el-badge class="item" style="margin-top: 10px;margin-bottom: 25px; font-size: 16px;">可接收项目</el-badge>
+            <el-badge v-if="acceptableProjectNoticeCount>0" :value="acceptableProjectNoticeCount" class="item"
+                      style="margin-top: 10px;margin-bottom: 25px; font-size: 16px;">可接收项目</el-badge>
+            <el-badge v-if="acceptableProjectNoticeCount==null || acceptableProjectNoticeCount==0" class="item"
+                      style="margin-top: 10px;margin-bottom: 25px; font-size: 16px;">可接收项目</el-badge>
           </span>
           <el-row v-if="acceptableProjects != null && acceptableProjects.length != 0" type="flex" align="middle"
                   justify="center" style="font-size: 14px;">
@@ -180,6 +184,7 @@ export default {
       defaultValue: defaultValue,
       myProjectNoticeCount: 0,
       processProjectNoticeCount: 0,
+      acceptableProjectNoticeCount: 0,
       rolesPermissions: {
         isRegionManager: false,
         isIndividualUser: false,
@@ -219,8 +224,9 @@ export default {
       this.showLoading()
       Http.get(Apis.PAGE.MY_CROWD_TEST_PAGE.replace('{userId}', this.user.userVO.id)).then((res) => {
         this.hideLoading()
-        this.processProjectNoticeCount = res.processProjectNoticeCount
-        this.myProjectNoticeCount = res.myProjectNoticeCount
+        this.processProjectNoticeCount = res.processProjectNoticeCount == null ? 0 : res.processProjectNoticeCount
+        this.myProjectNoticeCount = res.myProjectNoticeCount == null ? 0 : res.myProjectNoticeCount
+        this.acceptableProjectNoticeCount = res.acceptableProjectNoticeCount == null ? 0 : res.acceptableProjectNoticeCount
         if (res.unfinishedTasks != null && res.unfinishedTasks.length > 0) {
           this.unFinishedTaskList = res.unfinishedTasks
         }