Browse Source

Merge branch 'http_mock' of git.xiaojukeji.com:jacklijiajia/thoth-frontend into http_mock

qinzhipeng_v 5 năm trước cách đây
mục cha
commit
6e62aa3330

+ 7 - 0
src/utils/global.js

@@ -0,0 +1,7 @@
+let timer = null
+export function debounce(func, delay) { // 防抖
+  clearTimeout(timer)
+  timer = setTimeout(() => {
+    func.apply(this, arguments)
+  }, delay)
+}

+ 50 - 2
src/views/projectManage/bugList/bugindex.vue

@@ -21,7 +21,7 @@
           <el-col :span="24" class="Layout" style="padding: 0 0 1% 0">
             <el-form :model="formInline" class="flex_start" style="width: 100%;">
               <div class="Layout">
-                <div class="queryName">缺陷ID</div>
+                <div class="queryName">缺陷标题</div>
                 <el-input
                   v-model="formInline.bugId"
                   size="small"
@@ -330,6 +330,40 @@
                       </el-select>
                     </div>
                   </div>
+                  <div style="margin: 1.5% 0;" class="flex_start">
+                    <div class="Layout">
+                      <div class="queryName">缺陷类型</div>
+                      <el-select
+                        v-model="formInline.theBugType"
+                        size="small"
+                        clearable
+                        filterable
+                        placeholder="请选择"
+                      >
+                        <el-option
+                          v-for="item in bugTypeEnumList"
+                          :key="item.code"
+                          :label="item.name"
+                          :value="item.code"
+                        />
+                      </el-select>
+                    </div>
+                    <div class="Layout marginLeft">
+                      <div class="queryName">创建日期</div>
+                      <el-date-picker
+                        v-model="stratAndEnd"
+                        type="daterange"
+                        align="right"
+                        unlink-panels
+                        range-separator="至"
+                        start-placeholder="开始日期"
+                        end-placeholder="结束日期"
+                        size="small"
+                        value-format="yyyy-MM-dd HH:mm:ss"
+                        @change="changDate"
+                      />
+                    </div>
+                  </div>
                   <div align="right">
                     <el-button type="primary" size="mini" @click="getBugList()">筛 选</el-button>
                     <el-button size="mini" @click="resetQuery()">重 置</el-button>
@@ -385,6 +419,7 @@
                   >{{ scope.row.bugStatusName }}</div>
                 </template>
               </el-table-column>
+              <el-table-column prop="taskName" label="所属任务" align="center" />
               <el-table-column prop="creatorList" label="提报人" align="center" />
               <el-table-column prop="assignerList" label="责任人" align="center" />
               <el-table-column prop="currentHandlerList" label="修复人" align="center" />
@@ -446,6 +481,7 @@ import {
   settingQueryBizModuleList
 } from '@/api/defectManage'
 import { memberQueryMemberInfoByIDAPorName } from '@/api/projectIndex'
+import { debounce } from '@/utils/global'
 import '@/views/projectManage/bugList/css/index.css'
 export default {
   components: {
@@ -509,6 +545,7 @@ export default {
       drawerShow: false, // drawer展示
       taskIdStr: [],
       formInline: {}, // list
+      stratAndEnd: [], // 创建日期
       tableData: [],
       dialogVisible: false,
       accessory: [],
@@ -537,12 +574,23 @@ export default {
     }
     this.bugListSelect()
     this.$store.state.data.status = true
+    if (this.$route.query.startDate && this.$route.query.endDate) {
+      this.stratAndEnd = [this.$route.query.startDate, this.$route.query.endDate]
+    }
+    console.log(this.stratAndEnd)
   },
   destroyed() {
     this.$store.state.data.status = false
   },
   methods: {
+    changDate(date) { // 创建时间添加到url参数中
+      if (date) {
+        this.$router.push({ path: this.$route.path, query: { startDate: date[0], endDate: date[1] }})
+      }
+    },
     async getBugList() {
+      this.formInline.createStartTime = this.stratAndEnd[0] || null
+      this.formInline.createEndTime = this.stratAndEnd[1] || null
       this.indexPage = this.formInline
       this.indexPage.bizId = Number(localStorage.getItem('bizId'))
       this.indexPage.pageSize = this.pageSize
@@ -704,7 +752,7 @@ export default {
       })
       bugGetEnum().then(res => {
         this.bugEnumList = res.data.bugEnumList // status
-        this.bugTypeEnumList = res.data.bugTypeEnumList // bug类型
+        this.bugTypeEnumList = res.data.theBugTypeEnumList // bug类型
         this.bugStageEnumList = res.data.bugStageEnumList // 发现阶段
         this.sysTypeEnumList = res.data.sysTypeEnumList // 端类型
         this.discoveryMethEnumList = res.data.discoveryMethEnumList // 发现方式

+ 2 - 2
src/views/projectManage/bugList/css/index.css

@@ -17,7 +17,7 @@
 }
 .headerBg {
    background: #FFFFFF;
-   padding: 1% 1% 0 1%;
+   padding: 1%;
    height: auto;
    border-radius: 4px;
    overflow-x: hidden;
@@ -175,7 +175,7 @@
 }
 .bug_manage_drawer {
   pointer-events: none;
-  margin-top: 60px;
+  margin-top: 55px;
 }
 .bug_manage_drawer .el-drawer{
   pointer-events: auto;

+ 1 - 1
src/views/projectManage/projectList/projectIndex.vue

@@ -12,7 +12,7 @@
         <div>
           <el-form :model="form_all" class="Layout">
             <div class="Layout">
-              <div class="queryName">项目ID</div>
+              <div class="queryName">项目名称</div>
               <el-input v-model="form_all.id" size="small" clearable style="width:72% !important;" @change="query_project(form_all)" />
             </div>
             <div class="Layout">

+ 1 - 1
src/views/projectManage/requirement/list/index.vue

@@ -10,7 +10,7 @@
         <div>
           <el-form :model="searchForm" class="flex_start">
             <div class="Layout">
-              <div class="queryName">需求ID</div>
+              <div class="queryName">需求名称</div>
               <el-input v-model="pauId" size="small" clearable style="width: 72%" @change="getTableData()" />
             </div>
             <div class="Layout marginLeft">

+ 9 - 1
src/views/workbench/person/index.vue

@@ -190,7 +190,11 @@
             style="width: 100%;font-size: 14px; color:#333B4A;margin-top: 20px"
             :header-cell-style="{color:'#333B4A',fontSize: '16px',fontWeight:500,background:'rgba(240,242,244,1)'}"
           >
-            <el-table-column prop="name" label="日程名称" align="center" min-width="138" />
+            <el-table-column prop="name" label="日程名称" align="center" min-width="138">
+              <template v-slot="scope">
+                {{ getName(scope) }}
+              </template>
+            </el-table-column>
             <el-table-column prop="startTime" label="日期" align="center" min-width="232">
               <template v-slot="scope">
                 {{ scope.row.startTime + ' ~ ' + scope.row.endTime }}
@@ -364,6 +368,10 @@ export default {
         })
       this.queryWorkList()
     },
+    getName(scope) {
+      const type = scope.row.origin ? '日程' : '任务'
+      return '【' + type + '】' + scope.row.name + '-' + scope.row.type + '-' + scope.row.desc
+    },
     // type: 1 我提报的 2 待我处理
     selectBugList(type) {
       const pageSize = 10

+ 9 - 1
src/views/workbench/team/index.vue

@@ -368,10 +368,18 @@ export default {
         }
         this.tasks.push(parentItem)
         for (const j in res.data[i].workData) {
+          const labelNameType = res.data[i].workData[j].origin ? '日程' : '任务'
+          let labelName = '【' + labelNameType + '】' + res.data[i].workData[j].name
+          if (res.data[i].workData[j].type) {
+            labelName = labelName + '-' + res.data[i].workData[j].type
+          }
+          if (res.data[i].workData[j].desc) {
+            labelName = labelName + '-' + res.data[i].workData[j].desc
+          }
           const item = {
             id: count++,
             parentId: parentItem.id,
-            labelName: res.data[i].workData[j].name,
+            labelName: labelName,
             label: res.data[i].workData[j].name,
             user: parentItem.user,
             progress: 0,