Selaa lähdekoodia

团队工作天websocket

wangziqian 4 vuotta sitten
vanhempi
sitoutus
86b35a893d

+ 4 - 1
src/views/quality/requireStatistics.vue

@@ -592,9 +592,12 @@ export default {
     padding: 6px 10px;
     margin-top: 5px;
     font-size: 12px;
-    color: #E6A23C;
+    color: #444444;
     background: rgba(230, 162, 61, 0.1);
     border: 2px;
+    i {
+      margin-right: 10px;
+    }
   }
 }
 .strong-font {

+ 4 - 1
src/views/quality/taskStatistics.vue

@@ -616,9 +616,12 @@ export default {
     padding: 6px 10px;
     margin-top: 5px;
     font-size: 12px;
-    color: #E6A23C;
+    color: #444444;
     background: rgba(230, 162, 61, 0.1);
     border: 2px;
+    i {
+      margin-right: 10px;
+    }
   }
 }
 .strong-font {

+ 22 - 6
src/views/workbench/components/statisticsSection.vue

@@ -6,8 +6,20 @@
           <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)">
-              <label>{{ item.label }}</label>
-              <div class="number">{{ item.total }}</div>
+              <label>
+                {{ item.label }}
+                <template v-if="(title === '需求' || title ==='任务')&& index<5">
+                  <el-tooltip class="item" effect="dark" :content="tips[title][index]" placement="top">
+                    <i class="el-icon-warning" />
+                  </el-tooltip>
+                </template>
+              </label>
+              <div
+                class="number"
+                :class="{'color-red': index === 0 || index === 1}"
+              >
+                {{ item.total }}
+              </div>
             </div>
           </div>
         </div>
@@ -177,9 +189,6 @@ export default {
 </script>
 
 <style scoped lang="scss">
-.color-red {
-  color:#E02020;
-}
 .drawer-statistics {
   position: relative;
   width: 100%;
@@ -227,17 +236,24 @@ export default {
     display: grid;
     grid-template-rows: repeat(2,50%);
     align-items: center;
-    padding: 5px 11px;
+    padding: 5px 0 5px 11px;
     label {
       font-weight: 400;
       color: #666666;
       cursor:pointer;
+      i {
+        font-size: 12px;
+        margin-left: 5px;
+      }
     }
     .number {
       font-weight: 500;
       color: #333333;
       font-size: 26px;
     }
+    .color-red {
+      color:#E02020;
+    }
   }
 }
 .statistics-chart {

+ 3 - 11
src/views/workbench/mixins/websocket.js

@@ -2,15 +2,7 @@ export default {
   name: 'test',
   data() {
     return {
-      webSock: null,
-      responesData: null
-    }
-  },
-  watch: {
-    responesData: {
-      handler(newV) {
-        console.log(newV)
-      }
+      webSock: null
     }
   },
   created() {
@@ -38,8 +30,8 @@ export default {
       this.websock.send(Data)
     },
     websocketonmessage(e) { // 数据接收
-      this.responesData = JSON.parse(e.data)
-      // console.log(this.responesData)
+      // const data = JSON.parse(e.data)
+      // console.log(data)
     },
     websocketclose(e) { // 关闭
       this.websock.close()

+ 6 - 6
src/views/workbench/team/components/taskList.vue

@@ -60,7 +60,7 @@
           </div>
         </template>
       </el-table-column>
-      <el-table-column label="状态" width="150" align="left">
+      <el-table-column label="状态" width="100" align="center">
         <template slot-scope="scope">
           <el-select
             v-model="scope.row.status"
@@ -86,19 +86,19 @@
       <el-table-column label="测试负责人" width="100" align="center" show-overflow-tooltip>
         <template slot-scope="scope">{{ scope.row.qaObject ? scope.row.qaObject.name : '' }}</template>
       </el-table-column>
-      <el-table-column label="所属模块" width="250" align="center" show-overflow-tooltip>
+      <el-table-column label="所属模块" width="200" align="center" show-overflow-tooltip>
         <template slot-scope="scope">{{ scope.row.moduleInfoName }}</template>
       </el-table-column>
-      <el-table-column label="跟版客户端" width="250" align="center" show-overflow-tooltip>
+      <el-table-column label="跟版客户端" width="150" align="center" show-overflow-tooltip>
         <template slot-scope="scope">{{ scope.row.involveAppString || '无' }}</template>
       </el-table-column>
-      <el-table-column label="交付日期" width="250" align="center" show-overflow-tooltip>
+      <el-table-column label="交付日期" width="150" align="center" show-overflow-tooltip>
         <template slot-scope="scope">{{ scope.row.optionsObject ? scope.row.optionsObject.endTime : '' }}</template>
       </el-table-column>
-      <el-table-column label="缺陷数量" width="250" align="center" show-overflow-tooltip>
+      <el-table-column label="缺陷数量" width="50" align="center" show-overflow-tooltip>
         <template slot-scope="scope">{{ scope.row.bugCount }}</template>
       </el-table-column>
-      <el-table-column label="任务进度" width="200" align="center">
+      <el-table-column label="任务进度" width="150" align="center">
         <template slot-scope="scope">
           <el-progress :percentage="Number(scope.row.rate && scope.row.rate.substring(0,4))" color="#409eff" />
         </template>

+ 10 - 0
src/views/workbench/team/index.vue

@@ -190,6 +190,7 @@ import needsList from '@/views/workbench/team/components/needsList'
 import taskList from '@/views/workbench/team/components/taskList'
 import bugTableList from '@/views/workbench/bugTableList.vue'
 import statisticsSection from '@/views/workbench/components/statisticsSection'
+import websocket from '@/views/workbench/mixins/websocket'
 
 export default {
   components: {
@@ -204,6 +205,7 @@ export default {
     taskList,
     statisticsSection
   },
+  mixins: [websocket],
   data() {
     return {
       activeName: '1', // 顶部导航栏
@@ -497,6 +499,14 @@ export default {
         this.idList.bugList = idList
         this.listName.bugList = name
       }
+    },
+    websocketonmessage(e) { // websocket数据接收
+      const { bugHasReminding, requireHasReminding, taskHasReminding } = JSON.parse(JSON.parse(e.data))
+      this.tabTips = { // 顶部tab红点提示
+        require: requireHasReminding,
+        task: taskHasReminding,
+        bug: bugHasReminding
+      }
     }
   }
 }