فهرست منبع

任务详情页

PrinceLee 5 سال پیش
والد
کامیت
60e9de247f

+ 7 - 1
src/views/projectManage/requirement/components/scheduleList.vue

@@ -90,6 +90,7 @@
 import Sortable from 'sortablejs'
 import moment from 'moment'
 import 'moment/locale/zh-cn'
+import { getTaskByRequireId } from '@/api/requirement.js'
 import { listByTask, scheduleDelete, sortForTask } from '@/api/projectViewDetails'
 import modifySchedule from './modifySchedule'
 export default {
@@ -107,6 +108,11 @@ export default {
       default: NaN,
       required: true
     },
+    all: {
+      type: Boolean,
+      default: false,
+      required: false
+    },
     typeList: {
       type: Array,
       default: () => [],
@@ -163,7 +169,7 @@ export default {
       return res.msg
     },
     async listByTask(id) { // 获取排期列表
-      const res = await listByTask(id)
+      const res = this.all ? await getTaskByRequireId(id) : await listByTask(id)
       if (res.code === 200) {
         this.scheduleList = res.data.schedulDetailResponses
         this.scheduleDetail = res.data || {}

+ 3 - 2
src/views/projectManage/requirement/components/taskList.vue

@@ -145,8 +145,9 @@ export default {
       const res = await getTaskByRequireId({
         id: this.$route.query.id
       })
-      if (res.code === 200) {
-        this.all_task = res.data.taskDetails
+      if (res.code === 200 && res.data) {
+        console.log(res)
+        this.all_task = res.data.taskDetails || []
         // for (const [key, value] of Object.entries(res.data[0])) {
         //   console.log(`${key}: ${value}`)
         // }

+ 25 - 3
src/views/projectManage/requirement/requirementDetail.vue

@@ -92,7 +92,9 @@
                   <el-option v-for="(item,index) in appClient" :key="item.msg + index" :label="item.msg" :value="item.code" />
                 </el-select>
               </el-form-item>
-              <el-form-item label="PRD链接:" prop="mrdUrl">
+            </el-form>
+            <el-form :model="form_query" class="demo-form-inline" label-position="right" label-width="100px">
+              <el-form-item label="PRD链接:" prop="mrdUrl" class="PRD">
                 <span class="PRD-link">{{ form_query.mrdUrl }}</span>
               </el-form-item>
             </el-form>
@@ -107,6 +109,15 @@
             <text-area :id="'pro-desc'" :value.sync="form_query.description" :empty-text="'点击'" :input-button="'添加描述'" @change="changeArea" />
           </div>
         </section>
+        <section class="main-section">
+          <div class="el-main-title">
+            <div class="title-left-icon" />
+            <div class="title-left-name">需求计划</div>
+          </div>
+          <div>
+            <schedule-list :id="requirementId" :type-list="taskScheduleEvent" />
+          </div>
+        </section>
         <section class="main-section">
           <div class="el-main-title">
             <div class="title-left-icon" />
@@ -214,6 +225,7 @@ import {
   getCommentList,
   addComment
 } from '@/api/requirement.js'
+import { configShowTaskEnum } from '@/api/taskIndex'
 import searchPeople from '@/components/select/searchPeople'
 import textArea from '@/components/input/textArea'
 import drawer from '@/views/projectManage/Drawer'
@@ -224,6 +236,7 @@ import createdBug from '@/views/projectManage/bugList/file/createdBug'
 import tasksList from './components/taskList'
 import bugsList from './components/bugsList'
 import dataStatistics from './components/dataStatistics'
+import scheduleList from './components/scheduleList'
 export default {
   components: {
     searchPeople,
@@ -234,7 +247,8 @@ export default {
     createdBug,
     tasksList,
     bugsList,
-    dataStatistics
+    dataStatistics,
+    scheduleList
   },
   filters: {
     ellipsis(value, num) {
@@ -256,6 +270,7 @@ export default {
       priorityList: [], // 优先级列表
       sourceTypeList: [], // 需求来源列表
       appClient: [], // 跟版客户端列表
+      taskScheduleEvent: [], // 排期类型列表
       dependList: [{ msg: '否', code: 0 }, { msg: '是', code: 1 }], // 是否跟版
       form_query: {},
       display: false, // 设置成员弹框
@@ -283,6 +298,7 @@ export default {
     this.getBelongProject()
     this.getIterationList()
     this.getCommentList()
+    this.getTaskStatus()
     this.$store.state.data.status = true
     this.$store.state.data.bizId = true
   },
@@ -303,7 +319,7 @@ export default {
     async getBelongProject() { // 获取所属项目列表
       const res = await projectListProject({ bizId: Number(localStorage.getItem('bizId')) })
       if (res.code === 200) {
-        this.belongProjectList = res.data.filter(item => item.id !== -1)
+        this.belongProjectList = res.data
       }
     },
     async getIterationList() { // 获取所属迭代列表
@@ -326,6 +342,12 @@ export default {
         this.appClient = res.data.appClient
       }
     },
+    async getTaskStatus() { // 获取排期类型
+      const res = await configShowTaskEnum()
+      if (res.code === 200) {
+        this.taskScheduleEvent = res.data.taskScheduleEvent || []
+      }
+    },
     async getRequirementById() { // 获取需求详情
       const res = await getRequirementById({ id: this.$route.query.id })
       if (res.code === 200) {

+ 136 - 0
src/views/projectManage/taskList/components/dataStatistics.vue

@@ -0,0 +1,136 @@
+<template>
+  <div class="data-main">
+    <article>
+      <div class="data-num">
+        <div class="data-add red" @click="created_bug()" />
+        <div class="data-detail">
+          <b v-if="bugData">{{ bugData.total }}</b>
+          <span>缺陷数量</span>
+        </div>
+      </div>
+      <div class="data-line" />
+      <div class="data-chart">
+        <normal-echart :chart-id="'chartThird'" :option="echartsOption3" />
+      </div>
+    </article>
+    <createdBug v-if="bug_open" ref="createdBug" />
+  </div>
+</template>
+<script>
+import normalEchart from '@/components/chart/normalEchart'
+import createdBug from '@/views/projectManage/bugList/file/createdBug'
+import { getRequireSumData } from '@/api/requirement'
+export default {
+  components: {
+    normalEchart,
+    createdBug
+  },
+  data() {
+    return {
+      edit: false,
+      dataChart1: false,
+      echartsOption3: null,
+      requirement: {},
+      bug_open: false, // 新建缺陷
+      bugData: null // 缺陷数据
+    }
+  },
+  mounted() {
+    this.getProjectSumData()
+  },
+  methods: {
+    async getProjectSumData() { // 获取数据
+      const res = await getRequireSumData(this.$route.query.id)
+      if (res.code === 200) {
+        this.bugData = res.data.bugData
+        this.setDataChart(this.bugData.detail, 'echartsOption3')
+      }
+    },
+    setDataChart(data, obj) {
+      this[obj] = {
+        color: ['#3AA1FF'],
+        tooltip: { trigger: 'axis', axisPointer: { type: 'line' }}, // 默认为直线,可选为:'line' | 'shadow'
+        grid: { left: '15%', right: '15%', top: '15%', bottom: '10%', containLabel: true },
+        xAxis: [{ type: 'category', data: data.xaxis, axisTick: { alignWithLabel: true }}],
+        yAxis: [{ type: 'value', axisLine: { show: false }, splitLine: { lineStyle: { type: 'dashed' }}}],
+        series: [
+          {
+            name: data.yaxis[0].name, type: 'bar', barWidth: '20px', data: data.yaxis[0].data || [],
+            itemStyle: { normal: { label: { show: true, formatter: '{c}', position: 'top' }}}
+          }
+        ]
+      }
+    },
+    created_bug() { // 缺陷创建
+      this.bug_open = true
+      this.$nextTick(() => {
+        this.$refs.createdBug.init(1)
+      })
+    },
+    change() {
+      this.$emit('change')
+    }
+  }
+}
+</script>
+<style scoped lang="scss">
+.data-main {
+  padding: 61px 0 41px 0;
+}
+article{
+  width: 85%;
+  height: 260px;
+  min-width: 1043px;
+  margin: 0 auto 20px auto;
+  box-shadow:0px 0px 11px rgba(238,240,245,1);
+  border-radius:7px;
+  display: flex;
+  align-items: center;
+  justify-content: space-between;
+  .data-num {
+    width: 41%;
+    height: 100%;
+    display: flex;
+    align-items: center;
+    justify-content: space-between;
+    padding: 0 127px 0 62px;
+    .data-add {
+      height: 92px;
+      width: 92px;
+      border-radius: 50%;
+    }
+    .blue {
+      background-color:rgba(64,158,255,0.15);
+    }
+    .green {
+      background-color:rgba(126,211,33,0.15);
+    }
+    .red {
+      background-color: rgba(245,108,108, 0.15);
+    }
+    .data-detail {
+      color: #333333;
+      display: flex;
+      width: 70px;
+      flex-direction: column;
+      align-items: center;
+      b{
+        font-size: 75px;
+      }
+      span {
+        font-size: 16px;
+      }
+    }
+  }
+  .data-line {
+    width:0px;
+    height:156px;
+    border:1px solid rgba(112,112,112,1);
+    opacity:0.15;
+  }
+  .data-chart {
+    width: 58%;
+    height: 100%;
+  }
+}
+</style>

+ 135 - 60
src/views/projectManage/taskList/components/reportList.vue

@@ -7,7 +7,7 @@
       </div>
       <div class="detail-info">
         <el-table
-          :data="launchTestInfoDOS"
+          :data="testData"
           size="small"
           :header-cell-style="{ background: '#E9E9E9', color: '#333B4A' }"
           show-overflow-tooltip="true"
@@ -38,7 +38,7 @@
                 <span v-if="scope.row.status === 0 ? true : false" style="margin: 0 30px;" class="btn" @click="back(6,scope.row.id, scope.row)">编辑</span>
                 <span v-if="scope.row.status === 0 ? true : false" class="btn" @click="back(4,scope.row.id, scope.row )">删除</span>
                 <span v-if="scope.row.status === 2 ? true : false" class="btn" @click="back(3,scope.row.id, scope.row)">重新提测</span>
-                <el-dialog :title="titName" :visible.sync="dialog_launchTestInfoDOS" width="30%" :close-on-click-modal="false">
+                <el-dialog :title="titName" :visible.sync="dialog_testData" width="30%" :close-on-click-modal="false">
                   <div style="position: absolute; top: 23px; left: 12px;width:4px;height:17px;background:#409EFF;border-radius:1px;" />
                   <div align="center">
                     <div>是否{{ Str }}以下提测?</div>
@@ -54,22 +54,20 @@
             </template>
           </el-table-column>
         </el-table>
-        <el-row>
-          <el-col :span="24">
-            <div align="right">
-              <el-pagination
-                :page-sizes="[5, 10, 15, testPages.total]"
-                :current-page="testPages.curIndex"
-                :page-size="testPages.pageSize"
-                background
-                layout="total, sizes, prev, pager, next, jumper"
-                :total="testPages.total"
-                @size-change="testSizeChange"
-                @current-change="testCurrentChange"
-              />
-            </div>
-          </el-col>
-        </el-row>
+        <el-col :span="24">
+          <div align="right">
+            <el-pagination
+              :page-sizes="[5, 10, 15, testPages.total]"
+              :current-page="testPages.curIndex"
+              :page-size="testPages.pageSize"
+              background
+              layout="total, sizes, prev, pager, next, jumper"
+              :total="testPages.total"
+              @size-change="testSizeChange"
+              @current-change="testCurrentChange"
+            />
+          </div>
+        </el-col>
       </div>
     </section>
     <section class="main-section">
@@ -78,38 +76,74 @@
         <div class="title-left-name">日报报告</div>
       </div>
       <div class="detail-info">
-        <el-tab-pane label="日报报告">
-          <el-table :data="dailyTestReports" size="small" :header-cell-style="{ background: '#E9E9E9', color: '#333B4A' }" show-overflow-tooltip="true">
-            <el-table-column label="标题名称" min-width="100" align="center">
-              <template slot-scope="scope">
-                <a href="javascript:void(0)" style="color:#20a0ff" @click="toReportView(scope.row, 0)">{{ scope.row.reportName }}</a>
-              </template>
-            </el-table-column>
-            <el-table-column label="状态" min-width="100" align="center">
-              <template slot-scope="scope">{{ scope.row.statusString }}</template>
-            </el-table-column>
-            <el-table-column label="创建人" min-width="100" align="center">
-              <template slot-scope="scope">{{ scope.row.createrObject.name }}</template>
-            </el-table-column>
-            <el-table-column label="创建日期" min-width="100" align="center">
-              <template slot-scope="scope">{{ scope.row.gmtCreate }}</template>
-            </el-table-column>
-          </el-table>
-          <el-col :span="24">
-            <div align="right">
-              <el-pagination
-                :page-sizes="[5, 10, 15, testPages.total]"
-                :current-page="testPages.curIndex"
-                :page-size="testPages.pageSize"
-                background
-                layout="total, sizes, prev, pager, next, jumper"
-                :total="testPages.total"
-                @size-change="testSizeChange"
-                @current-change="testCurrentChange"
-              />
-            </div>
-          </el-col>
-        </el-tab-pane>
+        <el-table :data="dailyData" size="small" :header-cell-style="{ background: '#E9E9E9', color: '#333B4A' }" show-overflow-tooltip="true">
+          <el-table-column label="标题名称" min-width="100" align="center">
+            <template slot-scope="scope">
+              <a href="javascript:void(0)" style="color:#20a0ff" @click="toReportView(scope.row, 0)">{{ scope.row.reportName }}</a>
+            </template>
+          </el-table-column>
+          <el-table-column label="状态" min-width="100" align="center">
+            <template slot-scope="scope">{{ scope.row.statusString }}</template>
+          </el-table-column>
+          <el-table-column label="创建人" min-width="100" align="center">
+            <template slot-scope="scope">{{ scope.row.createrObject.name }}</template>
+          </el-table-column>
+          <el-table-column label="创建日期" min-width="100" align="center">
+            <template slot-scope="scope">{{ scope.row.gmtCreate }}</template>
+          </el-table-column>
+        </el-table>
+        <el-col :span="24">
+          <div align="right">
+            <el-pagination
+              :page-sizes="[5, 10, 15, dailyPages.total]"
+              :current-page="dailyPages.curIndex"
+              :page-size="dailyPages.pageSize"
+              background
+              layout="total, sizes, prev, pager, next, jumper"
+              :total="dailyPages.total"
+              @size-change="dailySizeChange"
+              @current-change="dailyCurrentChange"
+            />
+          </div>
+        </el-col>
+      </div>
+    </section>
+    <section class="main-section">
+      <div class="el-main-title">
+        <div class="title-left-icon" />
+        <div class="title-left-name">准出报告</div>
+      </div>
+      <div class="detail-info">
+        <el-table :data="clientData" size="small" :header-cell-style="{ background: '#E9E9E9', color: '#333B4A' }" show-overflow-tooltip="true">
+          <el-table-column label="标题名称" min-width="100" align="center">
+            <template slot-scope="scope">
+              <a href="javascript:void(0)" style="color:#20a0ff" @click="toReportView(scope.row, 1)">{{ scope.row.reportName }}</a>
+            </template>
+          </el-table-column>
+          <el-table-column label="状态" min-width="100" align="center">
+            <template slot-scope="scope">{{ scope.row.reportStatusString }}</template>
+          </el-table-column>
+          <el-table-column label="创建人" min-width="100" align="center">
+            <template slot-scope="scope">{{ scope.row.createrObject.name }}</template>
+          </el-table-column>
+          <el-table-column label="创建日期" min-width="100" align="center">
+            <template slot-scope="scope">{{ scope.row.gmtCreate }}</template>
+          </el-table-column>
+        </el-table>
+        <el-col :span="24">
+          <div align="right">
+            <el-pagination
+              :page-sizes="[5, 10, 15, clientPages.total]"
+              :current-page="clientPages.curIndex"
+              :page-size="clientPages.pageSize"
+              background
+              layout="total, sizes, prev, pager, next, jumper"
+              :total="clientPages.total"
+              @size-change="clientSizeChange"
+              @current-change="clientCurrentChange"
+            />
+          </div>
+        </el-col>
       </div>
     </section>
     <!-- 弹框 -->
@@ -141,21 +175,27 @@ export default {
       userNames: localStorage.getItem('realname'),
       taskId: Number(this.$route.query.id), // 任务id
       stColors: ['#409EFF', '#07BCA4', '#F56C6C', '#07BCA4'],
-      dialog_launchTestInfoDOS: false, // 打回弹窗
+      dialog_testData: false, // 打回弹窗
       CallBackTheReason: '', // 打回原因
       CallBackStatus: '', // 打回状态
       CallBackId: '', // 打回id
       titName: '', // 打回title
       Str: '', // 打回操作名称
       requireName: '', // 归属需求name
-      launchTestInfoDOS: [], // 提测信息
+      testData: [], // 提测信息
       testPages: { // 提测分页
         curIndex: 1,
         pageSize: 5,
         total: 0
       },
-      dailyTestReports: [], // 日报信息
-      DailyPages: { // 提测分页
+      dailyData: [], // 日报信息
+      dailyPages: { // 提测分页
+        curIndex: 1,
+        pageSize: 5,
+        total: 0
+      },
+      clientData: [], // 准出信息
+      clientPages: {// 准出分页
         curIndex: 1,
         pageSize: 5,
         total: 0
@@ -167,16 +207,34 @@ export default {
   },
   created() {
     this.getTest()
+    this.getDaily()
+    this.getClient()
   },
   methods: {
     async getTest() { // 获取提测
       const params = { taskId: this.taskId, curIndex: this.testPages.curIndex, pageSize: this.testPages.pageSize }
       const res = await launchTest(params)
       if (res.code === 200) {
-        this.launchTestInfoDOS = res.data.list
+        this.testData = res.data.list
         this.testPages.total = res.data.total
       }
     },
+    async getDaily() { // 获取日报
+      const params = { taskId: this.taskId, curIndex: this.dailyPages.curIndex, pageSize: this.dailyPages.pageSize }
+      const res = await dailyReport(params)
+      if (res.code === 200) {
+        this.dailyData = res.data.list
+        this.dailyPages.total = res.data.total
+      }
+    },
+    async getClient() { // 获取准出
+      const params = { taskId: this.taskId, curIndex: this.clientPages.curIndex, pageSize: this.clientPages.pageSize }
+      const res = await projectTestReport(params)
+      if (res.code === 200) {
+        this.clientData = res.data.list
+        this.clientPages.total = res.data.total
+      }
+    },
     testSizeChange(e) { // 提测分页
       this.testPages.pageSize = e
       this.getTest()
@@ -185,8 +243,24 @@ export default {
       this.testPages.curIndex = e
       this.getTest()
     },
+    dailySizeChange(e) { // 日报分页
+      this.dailyPages.pageSize = e
+      this.getDaily()
+    },
+    dailyCurrentChange(e) { // 日报分页
+      this.dailyPages.curIndex = e
+      this.getDaily()
+    },
+    clientSizeChange(e) { // 准出分页
+      this.clientPages.pageSize = e
+      this.getClient()
+    },
+    clientCurrentChange(e) { // 准出分页
+      this.clientPages.curIndex = e
+      this.getClient()
+    },
     async passOrBackSend() { // 提测打回
-      this.dialog_launchTestInfoDOS = false
+      this.dialog_testData = false
       const launchTestInfo = { status: this.CallBackStatus, id: this.CallBackId }
       const userData = { id: '', ename: this.userInformation, name: this.userNames }
       const objData = { launchTestInfo: launchTestInfo, user: userData }
@@ -206,7 +280,7 @@ export default {
       }
     },
     endDialog() { // 结束对话框
-      this.dialog_launchTestInfoDOS = false
+      this.dialog_testData = false
       this.$message({ type: 'warning', message: '已取消' })
     },
     toReportView(ele, index) { // 进入报告详情页
@@ -237,12 +311,12 @@ export default {
       this.CallBackId = ele
       switch (e) {
         case 1:
-          this.dialog_launchTestInfoDOS = true
+          this.dialog_testData = true
           this.titName = '提测确认'
           this.Str = '通过'
           break
         case 2:
-          this.dialog_launchTestInfoDOS = true
+          this.dialog_testData = true
           this.titName = '提测确认'
           this.Str = '打回'
           break
@@ -254,7 +328,7 @@ export default {
           })
           break
         case 4:
-          this.dialog_launchTestInfoDOS = true
+          this.dialog_testData = true
           this.titName = '删除确认'
           this.Str = '删除'
           break
@@ -279,6 +353,7 @@ export default {
 @import '@/styles/detail-pages.scss';
 .main-section {
   @include main-section;
+  overflow: auto;
   .detail-info {
     padding: 0 34px 20px 34px;
   }

+ 15 - 11
src/views/projectManage/taskList/taskViewDetail.vue

@@ -66,8 +66,8 @@
                   <el-option v-for="(item,index) in requireList" :key="item.name + index" :label="item.name" :value="item.id" />
                 </el-select>
               </el-form-item>
-              <el-form-item label="所属模块:">
-                <span class="module">{{ form_query.moduleInfoName }}</span>
+              <el-form-item label="所属模块:" class="module">
+                <span>{{ form_query.moduleInfoName }}</span>
               </el-form-item>
             </el-form>
             <el-form :inline="true" :model="form_query" class="demo-form-inline" label-position="right" label-width="100px">
@@ -153,14 +153,14 @@
       <!-- 缺陷 -->
       <!-- 报告 -->
       <el-container v-show="activeName === '3'" class="is-vertical">
-        <section class="main-section">
-          <report-list />
-        </section>
+        <report-list />
       </el-container>
       <!-- 报告 -->
       <!-- 统计 -->
       <el-container v-if="activeName === '4'" class="is-vertical">
-        <section class="main-section" />
+        <section class="main-section">
+          <data-statistics />
+        </section>
       </el-container>
       <!-- 统计 -->
       <!-- 新建(bug) -->
@@ -225,6 +225,7 @@ import openDialog from '@/views/projectManage/dialog_vue'
 import scheduleList from './components/scheduleList'
 import bugsList from './components/bugsList'
 import reportList from './components/reportList'
+import dataStatistics from './components/dataStatistics'
 import TestReport from '@/views/Platform/presentation/Templates/TestReport' // 提测
 import DailyReport from '@/views/Platform/presentation/Templates/DailyReport' // 日报
 import ClientReport from '@/views/Platform/presentation/Templates/ClientReport' // 准出
@@ -239,6 +240,7 @@ export default {
     scheduleList,
     bugsList,
     reportList,
+    dataStatistics,
     TestReport,
     DailyReport,
     ClientReport
@@ -337,7 +339,6 @@ export default {
             code: `${item.code}`
           }
         })
-        console.log(this.appClient)
       }
     },
     async taskGet() { // 获取任务详情
@@ -510,10 +511,13 @@ export default {
     }
   }
 }
-.module {
-  width: 100%;
-  overflow: hidden;
-}
+>>>.module .el-form-item__content {
+    display: inline-block;
+    width: calc(100% - 100px);
+    white-space:nowrap;
+    overflow: hidden;
+    text-overflow: ellipsis;
+  }
 .dialog-change-status {
   margin: 2% 3%;
   display: flex;