Bladeren bron

更新刷新列表

wangziqian 4 jaren geleden
bovenliggende
commit
bc623dd447

BIN
public/favicon-tips.ico


+ 2 - 2
src/layout/components/Sidebar/SidebarItem.vue

@@ -108,8 +108,8 @@ export default {
 <style lang="scss" scoped>
 .if-notice {
   position: absolute;
-  height: 10px;
-  width: 10px;
+  height: 8px;
+  width: 8px;
   background-color: #E02020;
   border-radius: 50%;
   top: 43%;

+ 4 - 1
src/layout/components/Sidebar/index.vue

@@ -79,10 +79,13 @@ export default {
       const { hasReminding } = JSON.parse(e.data)
       if (hasReminding) {
         this.showTips = true
+        const link = document.querySelector('link')
+        link.href = link.href.replace(/favicon.ico/, 'favicon-tips.ico')
       } else {
         this.showTips = false
+        const link = document.querySelector('link')
+        link.href = link.href.replace(/favicon-tips.ico/, 'favicon.ico')
       }
-      console.log(this.showTips)
     }
   }
 }

+ 5 - 1
src/views/workbench/bugTableList.vue

@@ -29,7 +29,7 @@
       <el-table-column prop="priorityName" label="缺陷等级" align="center" />
       <el-table-column prop="bugStatusName" label="状态" min-width="110" align="center">
         <template slot-scope="scope">
-          <statusChange :bug-id="scope.row.id" :status-code="Number(scope.row.status)" :bug-data="scope.row" :status-obj="statusObj" @bugGet="bugGetTableList" />
+          <statusChange :bug-id="scope.row.id" :status-code="Number(scope.row.status)" :bug-data="scope.row" :status-obj="statusObj" @bugGet="getNew" />
         </template>
       </el-table-column>
       <el-table-column prop="taskName" label="所属任务" align="center" min-width="250" show-overflow-tooltip />
@@ -182,6 +182,10 @@ export default {
         JSON.stringify(this.tableData.filter(value => value.id === e)[0])
       )
       this.drawerShow = true
+    },
+    getNew() {
+      this.bugGetTableList()
+      this.$emit('change', '缺陷')
     }
   }
 }

+ 9 - 3
src/views/workbench/components/statisticsSection.vue

@@ -5,7 +5,7 @@
         <div class="statistics-data">
           <h2>{{ title }}统计</h2>
           <div class="data-main">
-            <div v-for="(item,index) in statisticsList" :key="title+'-statistics-'+index" class="data-item" @click="changeData(item.idList,item.label)">
+            <div v-for="(item,index) in statisticsList" :key="title+'-statistics-'+index" class="data-item" :class="{'active': clickItem === index }" @click="changeData(item.idList,item.label);clickItem=index">
               <label>
                 {{ item.label }}
                 <template v-if="(title === '需求' || title ==='任务')&& index<5">
@@ -16,7 +16,7 @@
               </label>
               <div
                 class="number"
-                :class="{'color-red': index === 0 || index === 1}"
+                :class="{'color-red': (index === 0 || index === 1) && item.total>0}"
               >
                 {{ item.total }}
               </div>
@@ -105,7 +105,8 @@ export default {
           '交付日期在本周,且状态仍未变更为“已上线”的任务数量。',
           '交付日期在下周任务数量。'
         ]
-      }
+      },
+      clickItem: 0
     }
   },
   watch: {
@@ -118,6 +119,7 @@ export default {
     },
     title: {
       handler(newV) {
+        this.clickItem = 0
         this.initData()
       },
       immediate: true
@@ -252,6 +254,10 @@ export default {
       color:#E02020;
     }
   }
+  .active {
+    border: 1px solid #409EFF;
+    box-shadow: 0px 6px 12px rgba(64, 158, 255, 0.2);
+  }
 }
 .statistics-chart {
   .two-title {

+ 28 - 7
src/views/workbench/person/index.vue

@@ -59,6 +59,7 @@
       <el-container v-if="activeName === '3'">
         <section class="main-section">
           <statistics-section
+            ref="statistics-section"
             :search-form="searchForm"
             type="person"
             title="需求"
@@ -68,12 +69,18 @@
             }"
             @change="changeData"
           />
-          <needs-list :name="listName.requireList" :id-list="idList.requireList" />
+          <needs-list
+            ref="needs-list"
+            :name="listName.requireList"
+            :id-list="idList.requireList"
+            @change="changeStatus"
+          />
         </section>
       </el-container>
       <el-container v-if="activeName === '4'">
         <section class="main-section">
           <statistics-section
+            ref="statistics-section"
             :search-form="searchForm"
             type="person"
             title="任务"
@@ -83,12 +90,18 @@
             }"
             @change="changeData"
           />
-          <task-list :name="listName.taskList" :id-list="idList.taskList" />
+          <task-list
+            ref="task-list"
+            :name="listName.taskList"
+            :id-list="idList.taskList"
+            @change="changeStatus"
+          />
         </section>
       </el-container>
       <el-container v-if="activeName === '5'">
         <section class="main-section">
           <statistics-section
+            ref="statistics-section"
             :search-form="searchForm"
             type="person"
             title="缺陷"
@@ -98,7 +111,12 @@
             }"
             @change="changeData"
           />
-          <bugTableList :name="listName.bugList" :id-list="idList.bugList" />
+          <bug-tableList
+            ref="bug-tableList"
+            :name="listName.bugList"
+            :id-list="idList.bugList"
+            @change="changeStatus"
+          />
         </section>
       </el-container>
       <!-- 工作台简介 -->
@@ -534,6 +552,9 @@ export default {
         this.listName.bugList = name
       }
     },
+    changeStatus(e) { // 子组件修改状态
+      this.$refs['statistics-section'].initData()
+    },
     websocketonmessage(e) { // websocket数据接收
       const { bugHasReminding, requireHasReminding, taskHasReminding } = JSON.parse(e.data)
       this.tabTips = { // 顶部tab红点提示
@@ -577,8 +598,8 @@ export default {
     transform: translate(-50%, 0);
   }
   .tips {
-    height: 10px;
-    width: 10px;
+    height: 8px;
+    width: 8px;
     background-color: #E02020;
     border-radius: 50%;
     position: absolute;
@@ -586,8 +607,8 @@ export default {
     right: 14px;
   }
   .tips-last {
-    height: 10px;
-    width: 10px;
+    height: 8px;
+    width: 8px;
     background-color: #E02020;
     border-radius: 50%;
     position: absolute;

+ 2 - 1
src/views/workbench/team/components/needsList.vue

@@ -118,7 +118,7 @@ export default {
   },
   data() {
     return {
-      newTabOpen: false, // 是否新的tab页打开
+      newTabOpen: true, // 是否新的tab页打开
       extraUrgent: extraUrgent, // 紧急图片
       needsDataList: [], // 需求列表
       allStatus: [], // 状态列表
@@ -182,6 +182,7 @@ export default {
       if (res.code === 200) {
         this.$message({ message: '修改成功', type: 'success', offset: 150 })
         this.getNeedsList()
+        this.$emit('change', '需求')
       }
     },
     needs_link(id) {

+ 7 - 1
src/views/workbench/team/components/projectList.vue

@@ -12,6 +12,7 @@
         />
       </span>
     </div>
+    <div class="splice-line" />
     <el-table
       ref="planTable"
       :data="projectList"
@@ -239,7 +240,7 @@ export default {
   @include setStatus(#7ED321)
 }
 .search-control {
-	padding: 30px 17px 0;
+	padding: 10px 17px 10px;
 	color: #333B4A;
 	font-size: 14px;
 	span {
@@ -272,4 +273,9 @@ export default {
     text-overflow: ellipsis;
   }
 }
+.splice-line {
+  height: 14px;
+  width: 100%;
+  background-color: #F2F3F6;
+}
 </style>

+ 3 - 1
src/views/workbench/team/components/taskList.vue

@@ -163,7 +163,7 @@ export default {
   },
   data() {
     return {
-      newTabOpen: false, // 是否新的tab页打开
+      newTabOpen: true, // 是否新的tab页打开
       imgUrl: imgUrl,
       tableList: [], // 排期bable验证
       showTaskDialog: false, // 状态弹窗
@@ -270,6 +270,7 @@ export default {
         if (resTask.code === 200) {
           this.$message({ message: '修改成功', type: 'success', offset: 150 })
           this.get_allTask()
+          this.$emit('change', '任务')
         }
       }
     },
@@ -280,6 +281,7 @@ export default {
       const resTask = await taskUpdate({ taskInfoDO, user })
       if (resTask.code === 200) {
         this.$message({ message: '修改成功', type: 'success', offset: 150 })
+        this.$emit('change', '任务')
       }
     },
     handleSelectionChange(val) { // 任务列表删选操作

+ 28 - 7
src/views/workbench/team/index.vue

@@ -94,6 +94,7 @@
     <el-container v-if="activeName === '3'">
       <section class="main-section">
         <statistics-section
+          ref="statistics-section"
           :search-form="searchForm"
           type="team"
           title="需求"
@@ -103,12 +104,18 @@
           }"
           @change="changeData"
         />
-        <needs-list :name="listName.requireList" :id-list="idList.requireList" />
+        <needs-list
+          ref="needs-list"
+          :name="listName.requireList"
+          :id-list="idList.requireList"
+          @change="changeStatus"
+        />
       </section>
     </el-container>
     <el-container v-if="activeName === '4'">
       <section class="main-section">
         <statistics-section
+          ref="statistics-section"
           :search-form="searchForm"
           type="team"
           title="任务"
@@ -118,12 +125,18 @@
           }"
           @change="changeData"
         />
-        <task-list :name="listName.taskList" :id-list="idList.taskList" />
+        <task-list
+          ref="task-list"
+          :name="listName.taskList"
+          :id-list="idList.taskList"
+          @change="changeStatus"
+        />
       </section>
     </el-container>
     <el-container v-if="activeName === '5'">
       <section class="main-section">
         <statistics-section
+          ref="statistics-section"
           :search-form="searchForm"
           type="team"
           title="缺陷"
@@ -133,7 +146,12 @@
           }"
           @change="changeData"
         />
-        <bugTableList :name="listName.bugList" :id-list="idList.bugList" />
+        <bug-tableList
+          ref="bug-tableList"
+          :name="listName.bugList"
+          :id-list="idList.bugList"
+          @change="changeStatus"
+        />
       </section>
     </el-container>
     <!-- 日程 -->
@@ -500,6 +518,9 @@ export default {
         this.listName.bugList = name
       }
     },
+    changeStatus(e) { // 子组件修改状态
+      this.$refs['statistics-section'].initData()
+    },
     websocketonmessage(e) { // websocket数据接收
       const { bugHasReminding, requireHasReminding, taskHasReminding } = JSON.parse(e.data)
       this.tabTips = { // 顶部tab红点提示
@@ -543,8 +564,8 @@ export default {
     transform: translate(-50%, 0);
   }
   .tips {
-    height: 10px;
-    width: 10px;
+    height: 8px;
+    width: 8px;
     background-color: #E02020;
     border-radius: 50%;
     position: absolute;
@@ -552,8 +573,8 @@ export default {
     right: 14px;
   }
   .tips-last {
-    height: 10px;
-    width: 10px;
+    height: 8px;
+    width: 8px;
     background-color: #E02020;
     border-radius: 50%;
     position: absolute;