kuaifan 5 anni fa
parent
commit
88862fbca1

+ 2 - 2
app/Module/Project.php

@@ -37,8 +37,8 @@ class Project
     public static function updateNum($projectid)
     {
         DB::table('project_lists')->where('id', $projectid)->update([
-            'unfinished' => DB::table('project_task')->where('projectid', $projectid)->where('complete', 0)->count(),
-            'complete' => DB::table('project_task')->where('projectid', $projectid)->where('complete', 1)->count(),
+            'unfinished' => DB::table('project_task')->where('projectid', $projectid)->where('complete', 0)->where('delete', 0)->count(),
+            'complete' => DB::table('project_task')->where('projectid', $projectid)->where('complete', 1)->where('delete', 0)->count(),
         ]);
     }
 

+ 16 - 0
resources/assets/js/main/pages/project-panel.vue

@@ -11,6 +11,7 @@
                     <div class="project-title">
                         <div v-if="loadIng > 0" class="project-title-loading"><w-loading></w-loading></div>
                         <h1>{{projectDetail.title}}</h1>
+                        <div class="project-title-refresh" @click="getDetail">刷新</div>
                     </div>
                 </div>
                 <div class="w-nav-flex"></div>
@@ -112,6 +113,11 @@
             display: flex;
             flex-direction: row;
             align-items: center;
+            &:hover {
+                .project-title-refresh {
+                    display: block;
+                }
+            }
             .project-title-loading {
                 width: 18px;
                 height: 18px;
@@ -122,6 +128,16 @@
                 font-size: 14px;
                 font-weight: 500;
             }
+            .project-title-refresh {
+                display: none;
+                padding-left: 12px;
+                padding-right: 12px;
+                color: #048be0;
+                cursor: pointer;
+                &:hover {
+                    text-decoration: underline;
+                }
+            }
         }
         .label-box {
             display: flex;

+ 30 - 1
resources/assets/js/main/pages/project.vue

@@ -8,7 +8,11 @@
         <div class="w-nav">
             <div class="nav-row">
                 <div class="w-nav-left">
-                    <span class="ft hover" @click="addShow=true"><i class="ft icon">&#xE740;</i> {{$L('新建项目')}}</span>
+                    <div class="page-nav-left">
+                        <div v-if="loadIng > 0" class="page-nav-loading"><w-loading></w-loading></div>
+                        <span class="ft hover" @click="addShow=true"><i class="ft icon">&#xE740;</i> {{$L('新建项目')}}</span>
+                        <div class="page-nav-refresh" @click="getLists(true)">刷新</div>
+                    </div>
                 </div>
                 <div class="w-nav-flex"></div>
                 <div class="w-nav-right">
@@ -134,6 +138,31 @@
 
 <style lang="scss" scoped>
     .project {
+        .page-nav-left {
+            display: flex;
+            flex-direction: row;
+            align-items: center;
+            &:hover {
+                .page-nav-refresh {
+                    display: block;
+                }
+            }
+            .page-nav-loading {
+                width: 18px;
+                height: 18px;
+                margin-right: 6px;
+                display: flex;
+            }
+            .page-nav-refresh {
+                display: none;
+                padding-right: 12px;
+                color: #048be0;
+                cursor: pointer;
+                &:hover {
+                    text-decoration: underline;
+                }
+            }
+        }
         ul.project-list {
             padding: 5px;
             max-width: 2000px;