Explorar o código

优化任务详情页提测报告

qinzhipeng_v %!s(int64=5) %!d(string=hai) anos
pai
achega
2d02016a9b

+ 19 - 0
src/views/Platform/presentation/Templates/TestReport.vue

@@ -139,6 +139,25 @@ export default {
           this.preview = newData
           this.active = 3
           break
+        case 4:
+          this.clienData = newData
+          this.present_task = newData.taskIds
+          this.showOne = false
+          this.showThree = false
+          this.showTow = true
+          this.active = 2
+          this.newNum = 1
+          if (newData.type === 1) {
+            this.radio = '1'
+            this.Present1 = true
+            this.presentation1 = false
+          }
+          if (newData.type === 2) {
+            this.radio = '2'
+            this.Present1 = false
+            this.presentation1 = true
+          }
+          break
         case 7:
           this.present_task = newData
           this.clienData.taskIds = newData

+ 3 - 3
src/views/projectManage/bugList/bugindex.vue

@@ -387,7 +387,7 @@
               show-overflow-tooltip="true"
               :header-cell-style="{ color: '#4A4A4A', fontSize: '14px', fontWeight: '500' }"
             >
-              <el-table-column label="优先级" prop="priorityCode" sortable align="center">
+              <el-table-column label="优先级" prop="priorityCode" min-width="100" sortable align="center">
                 <template slot-scope="scope" style="text-align: center;">
                   <span class="div_priority" :class="[{'high': scope.row.priorityLevel === 'High'},{'medium': scope.row.priorityLevel === 'Medium'},{'low': scope.row.priorityLevel === 'Low'}]">
                     {{ scope.row.priorityLevel | oneA }}
@@ -420,8 +420,8 @@
               </el-table-column>
               <el-table-column prop="taskName" label="所属任务" align="center" min-width="250" show-overflow-tooltip />
               <el-table-column prop="creatorList" label="提报人" align="center" />
-              <el-table-column prop="assignerList" label="责任人" align="center" />
-              <el-table-column prop="currentHandlerList" label="修复人" align="center" />
+              <el-table-column prop="assignerList" label="责任人" min-width="150" align="center" show-overflow-tooltip />
+              <el-table-column prop="currentHandlerList" label="修复人" min-width="150" align="center" show-overflow-tooltip />
               <el-table-column prop="gmtCreate" label="创建日期" min-width="120" align="center">
                 <template slot-scope="scope">{{ scope.row.gmtCreate | naspOut }}</template>
               </el-table-column>

+ 2 - 1
src/views/projectManage/bugList/details/index.vue

@@ -194,7 +194,7 @@
                     </el-select>
                   </el-form-item>
                   <el-form-item label="所属模块">
-                    <el-cascader v-if="bug.moduleIds" v-model="bug.moduleIds" collapse-tags :props="props" :options="business_platform_Modular" placeholder="请选择" @change="bugUpdate(bug,'details')" @click.native="getBusinessLinePlatformModule" />
+                    <el-cascader v-model="bug.moduleIds" class="current" collapse-tags :props="props" :options="business_platform_Modular" placeholder="请选择" @change="bugUpdate(bug,'details')" @click.native="getBusinessLinePlatformModule" />
                   </el-form-item>
                   <el-form-item label="发现方式">
                     <el-select v-model="bug.discoveryMeth" @change="bugUpdate(bug,'details')">
@@ -1525,6 +1525,7 @@ border-color: #DCDFE6;
   cursor: pointer;
 }
 .current:hover{
+  cursor: pointer;
   border-radius: 4px;
   border: 1px solid #DCDFE6;
 }

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

@@ -278,7 +278,7 @@
             >
               <el-table-column type="selection" width="55" align="center" />
               <el-table-column label="任务名称" min-width="100" align="center" show-overflow-tooltip>
-                <template slot-scope="scope" @click="link_task(scope.row.id)">{{ scope.row.name }}</template>
+                <template slot-scope="scope"><span @click="link_task(scope.row.id)">{{ scope.row.name }}</span></template>
               </el-table-column>
               <el-table-column label="所属需求" min-width="100" align="center" show-overflow-tooltip>
                 <template slot-scope="scope">{{ scope.row.requireName }}</template>

+ 97 - 29
src/views/projectManage/taskList/taskViewDetails.vue

@@ -197,35 +197,46 @@
                 </el-table-column>
               </el-table>
               <div style="display:flex;align-items: center;justify-content: flex-end;">
-                <el-pagination background :current-page="currentPage" :page-sizes="[15, 20, 25]" :page-size="15" layout="total, prev, pager, next, jumper" :total="total" @size-change="handleSizeChange" @current-change="handleCurrentChange" />
+                <el-pagination background :current-page="currentPage" :page-sizes="[10, 20, 25]" :page-size="10" layout="total, prev, pager, next, jumper" :total="total" @size-change="handleSizeChange" @current-change="handleCurrentChange" />
               </div>
             </el-tab-pane>
             <el-tab-pane label="提测报告">
               <el-table :data="launchTestInfoDOS" size="small" :header-cell-style="{ background: '#E9E9E9', color: '#333B4A' }" show-overflow-tooltip="true">
-                <el-table-column label="标题名称" min-width="100" align="center">
+                <el-table-column label="标题名称" min-width="150">
                   <template slot-scope="scope">
-                    <a href="javascript:void(0)" style="color:#20a0ff" @click="toReportView(scope.row, 2)">{{ scope.row.name }}</a>
+                    <span class="btn" @click="toReportView(scope.row, 2)">{{ scope.row.name }}</span>
                   </template>
                 </el-table-column>
                 <el-table-column label="状态" min-width="100" align="center">
-                  <template slot-scope="scope">{{ scope.row.statusString }}</template>
+                  <template slot-scope="scope">
+                    <span :style="{color: stColors[scope.row.status]}"> {{ scope.row.statusString }} </span>
+                  </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="200" align="center">
+                <el-table-column label="创建日期" min-width="150" align="center">
                   <template slot-scope="scope">{{ scope.row.gmtCreate }}</template>
                 </el-table-column>
-                <el-table-column label="操作" align="center" width="300">
+                <el-table-column label="操作" width="200">
                   <template slot-scope="scope">
-                    <div>
-                      <el-button size="mini" type="primary" plain @click="pass(1,scope.row.id)">通过</el-button>
-                      <el-button size="mini" type="danger" plain @click="back(2,scope.row.id)">打回</el-button>
-                      <el-dialog title="打回原因" :visible.sync="dialog_launchTestInfoDOS" width="30%" :close-on-click-modal="false">
-                        <el-input v-model="CallBackTheReason" type="textarea" :rows="3" />
+                    <div v-if="scope.row.status === 1 ? false : true">
+                      <span v-if="scope.row.status === 3 ? true : false" class="btn" @click="back(1,scope.row.id, scope.row)">通过</span>
+                      <span v-if="scope.row.status === 3 ? true : false" style="margin-left: 30px;" class="btn" @click="back(2,scope.row.id, scope.row)">打回</span>
+                      <span v-if="scope.row.status === 0 ? true : false" class="btn" @click="back(5,scope.row.id, scope.row)">发送</span>
+                      <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">
+                        <div style="position: absolute; top: 23px; left: 12px;width:4px;height:17px;background:#409EFF;border-radius:1px;" />
+                        <div align="center">
+                          <div>是否{{ Str }}以下提测?</div>
+                          <div style="color: #f79232;">{{ requireName }}</div>
+                        </div>
+                        <el-input v-show="Str === '打回'" v-model="CallBackTheReason" type="textarea" placeholder="请输入打回原因..." :rows="3" />
                         <span slot="footer" class="dialog-footer">
                           <el-button type="primary" size="mini" @click="passOrBackSend()">确 定</el-button>
-                          <el-button type="danger" size="mini" @click="dialog_launchTestInfoDOS = false">取 消</el-button>
+                          <el-button type="danger" size="mini" @click="endDialog">取 消</el-button>
                         </span>
                       </el-dialog>
                     </div>
@@ -401,6 +412,7 @@ import openDialog from '@/views/projectManage/dialog_vue'
 import Utils from '../../../util.js'
 import { launchTestUpdate } from '@/api/projectPage.js'
 import { bugList, bugGetEnum } from '@/api/defectManage'
+import { launchTestDelete } from '@/api/InterfaceReport'
 import echarts from 'echarts'
 import dayjs from 'dayjs'
 import { releaseScheduleList } from '@/api/teamBench'
@@ -440,6 +452,7 @@ export default {
   },
   data() {
     return {
+      stColors: ['#409EFF', '#07BCA4', '#F56C6C', '#07BCA4'],
       codeCache: null,
       bugId: 0,
       initCount: 0,
@@ -448,7 +461,7 @@ export default {
       priorityColors: ['#F56C6C', '#FF8952', '#7ED321'],
       statusColors: ['#6AB4FF', '#6AB4FF', '#FFCC66', '#7ED321', '#F56C6C'],
       curIndex: 1,
-      pageSize: 15,
+      pageSize: 10,
       task_form: {
         statusString: '未开始',
         describe: '',
@@ -524,10 +537,14 @@ export default {
       bugStatus: [],
       test: {},
       taskStatus: [],
+      userData: {},
+      requireName: '',
+      Str: '',
       CallBackStatus: '',
       CallBackId: '',
       bgStyle: '',
       colorStyle: '',
+      titName: '',
       dialogDaily: false,
       dialogClient: false
     }
@@ -1035,32 +1052,77 @@ export default {
           break
       }
     },
-    // 打回
-    back(e, ele) {
-      this.dialog_launchTestInfoDOS = true
-      this.CallBackStatus = e
-      this.CallBackId = ele
+    endDialog() {
+      this.dialog_launchTestInfoDOS = false
+      this.$message({ type: 'success', message: '已取消' })
     },
-    // 通过
-    pass(e, ele) {
+    // 打回
+    back(e, ele, data) {
+      const url1 = location.href // 获取url中"?"符后的字串
+      const arr1 = url1.split('=')
+      this.requireName = data.name
       this.CallBackStatus = e
       this.CallBackId = ele
-      this.passOrBackSend()
+      switch (e) {
+        case 1:
+          this.dialog_launchTestInfoDOS = true
+          this.titName = '提测确认'
+          this.Str = '通过'
+          break
+        case 2:
+          this.dialog_launchTestInfoDOS = true
+          this.titName = '提测确认'
+          this.Str = '打回'
+          break
+        case 3:
+          data.taskIds = [Number(arr1[1])]
+          console.log(data, 'ssss')
+          this.dialogVisible1 = true
+          this.$nextTick(() => {
+            this.$refs.TestReport.init(4, data)
+          })
+          break
+        case 4:
+          this.dialog_launchTestInfoDOS = true
+          this.titName = '删除确认'
+          this.Str = '删除'
+          break
+        case 5:
+          this.dialogVisible1 = true
+          this.$nextTick(() => {
+            this.$refs.TestReport.init(3, data)
+          })
+          break
+        case 6:
+          this.dialogVisible1 = true
+          this.$nextTick(() => {
+            this.$refs.TestReport.init(2, data)
+          })
+          break
+      }
     },
     passOrBackSend() {
       this.dialog_launchTestInfoDOS = false
       const tt = { status: this.CallBackStatus, id: this.CallBackId }
       var userData = { id: '', ename: this.userInformation, name: this.userNames }
       var objData = { launchTestInfo: tt, user: userData }
-      launchTestUpdate(objData).then(res => {
-        res.code === 200 ? this.$message({ message: res.msg, type: 'success', offset: 150 }) : this.$message({ message: res.msg, type: 'error', offset: 150 })
-        var url = window.location.href // 获取url中"?"符后的字
-        this.taskId = url.split('?id=')
-        launchTest({ taskId: this.taskId[1], curIndex: this.curIndex, pageSize: this.pageSize }).then(res => {
-          this.launchTestInfoDOS = res.data.list
-          this.total = res.data.total
+      if (this.Str === '通过' || this.Str === '打回') {
+        launchTestUpdate(objData).then(res => {
+          res.code === 200 ? this.$message({ message: res.msg, type: 'success', offset: 150 }) : this.$message({ message: res.msg, type: 'error', offset: 150 })
+          var url = window.location.href // 获取url中"?"符后的字
+          this.taskId = url.split('?id=')
+          launchTest({ taskId: this.taskId[1], curIndex: this.curIndex, pageSize: this.pageSize }).then(res => {
+            this.launchTestInfoDOS = res.data.list
+            this.total = res.data.total
+          })
         })
-      })
+      } else if (this.Str === '删除') {
+        launchTestDelete(userData, this.CallBackId).then(res => {
+          if (res.code === 200) {
+            this.$message({ type: 'success', message: '已删除' })
+          }
+        })
+      }
     },
     handleSizeChange(size) { //  分页
       this.pageSize = size
@@ -1118,6 +1180,12 @@ export default {
 }
 </style>
 <style lang="stylus" scoped>
+.btn {
+  cursor: pointer;
+}
+.btn:hover {
+  color:#409EFF
+}
 .selected {
   color: rgb(106, 180, 255)
 }