瀏覽代碼

三报跳转

panxiandiao_i 5 年之前
父節點
當前提交
f36743b17a

+ 24 - 0
src/api/testPresentetion.js

@@ -56,3 +56,27 @@ export function bugDailyList(data) {
     data
   })
 }
+// 日报
+export function dailyReport(params) {
+  return request({
+    url: mockUrl + '/dailyReport/get',
+    method: 'get',
+    params
+  })
+}
+// 提测报告
+export function launchTest(params) {
+  return request({
+    url: mockUrl + '/launchTest/get',
+    method: 'get',
+    params
+  })
+}
+// echarts
+export function projectTestReport(params) {
+  return request({
+    url: mockUrl + '/projectTestReport/get',
+    method: 'get',
+    params
+  })
+}

+ 2 - 2
src/views/Platform/presentation/Assumptions.vue

@@ -30,7 +30,7 @@
         </el-table-column>
       </el-table>
     </template>
-    <el-pagination style="margin-top:30px" align="center" :current-page="curIndex" :page-sizes="[5, 10, 20]" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="handleSizeChange" @current-change="handleCurrentChange" />
+    <el-pagination style="margin-top:30px;" align="center" :current-page="curIndex" :page-sizes="[5, 10, 20]" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="handleSizeChange" @current-change="handleCurrentChange" />
     <el-dialog title="提示" :visible.sync="centerDialogVisible" width="30%" center>
       选择任务 :
       <el-select v-model="queryData.state" filterable placeholder="搜索" style="width:80%;" @change="handleSelect($event)">
@@ -175,7 +175,7 @@ export default {
           this.haha = { haha: vel }
         }
       }
-      this.$router.push({ path: '/Platform/presentation/acceptTheReport', query: { data: this.haha.haha }})
+      this.$router.push({ path: '/Platform/presentation/acceptTheReport', query: { id: e }})
     },
     errorFun() {
       this.$notify({ title: 'Failed', message: 'Created Failed', type: 'error', duration: 2000 })

+ 2 - 2
src/views/Platform/presentation/ResultPage.vue

@@ -34,7 +34,7 @@
     </template>
     <el-pagination style="margin-top:30px;" align="center" :current-page="curIndex" :page-sizes="[20, 30, 50]" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="handleSizeChange" @current-change="handleCurrentChange" />
     <el-dialog title="选择任务" :visible.sync="centerDialogVisible" width="30%" center @close="closeChange">
-      <div style="text-align:text;margin:10px 0">
+      <div style="text-align:text;margin:10px 0;">
         <el-button ref="btn1" size="mini" @click="getQueryData(1)">项目</el-button>
         <el-button ref="btn2" size="mini" @click="getQueryData(2)">任务</el-button>
       </div>
@@ -99,7 +99,7 @@ export default {
           this.haha = { haha: vel }
         }
       }
-      this.$router.push({ path: '/Platform/presentation/ResultPageyL', query: { data: this.haha.haha }})
+      this.$router.push({ path: '/Platform/presentation/ResultPageyL', query: { id: e }})
     },
 
     // 删除报告

+ 15 - 18
src/views/Platform/presentation/ResultPageyL.vue

@@ -55,7 +55,7 @@
 
           <div class="marage">4、缺陷分析</div>
 
-          <el-table :data="tableData" border @cell-dblclick="celledit">
+          <el-table :data="tableData" border>
             <el-table-column prop="totalBug" label="bug总数" min-width="200" align="center" edit="false">
               <template slot-scope="scope">
                 <el-input v-if="scope.row.totalBug.edit" ref="totalBug" v-model="scope.row.totalBug.value" style="width: 100%" @blur="scope.row.totalBug.edit = false" />
@@ -118,7 +118,7 @@
       </div>
 
       <div v-if="oneShow">
-        <div id="resumeId1" style="padding: 3% 6%; color: #333B4A">
+        <div id="resumeId1" style="padding: 3% 6%; color: #333B4A;">
           <div style="display: flex; font-size: 19px;  white-space: nowrap; font-weight: bold;">
             <span style="flex:1;">{{ ClientDatayl.reportName }}</span>
             <span style="flex:1;">by : {{ ClientDatayl.ownner }}
@@ -174,7 +174,7 @@
 
           <div class="titleStyle">五. bug指标</div>
 
-          <el-table :data="tableData" border @cell-dblclick="celledit">
+          <el-table :data="tableData" border>
             <el-table-column prop="totalBug" label="bug总数" min-width="200" align="center" edit="false">
               <template slot-scope="scope">
                 <el-input v-if="scope.row.totalBug.edit" ref="totalBug" v-model="scope.row.totalBug.value" style="width: 100%" @blur="scope.row.totalBug.edit = false" />
@@ -222,6 +222,7 @@
 
 <script>
 import { projectTestReportSendmail, bugFinishList } from '@/api/ResultPage'
+import { projectTestReport } from '@/api/testPresentetion'
 import html2canvas from 'html2canvas'
 
 export default {
@@ -267,16 +268,20 @@ export default {
       tableData: [],
       bugNum: {},
       status1: { color: 'green' },
-      fctResult: ''
+      fctResult: '',
+      moniterResult: '',
+      rqtResult: '',
+      safeResult: ''
     }
   },
   created() {
-    this.getRouterData()
+    this.idGet()
+    // this.getRouterData()
   },
   methods: {
-    getRouterData() {
-      if (this.$route.query.data) {
-        this.ClientDatayl = this.$route.query.data
+    idGet() {
+      projectTestReport({ id: this.$route.query.id }).then((res) => {
+        this.ClientDatayl = res.data
         this.editorElem1 = this.ClientDatayl.projectBackground
         this.editorElems1 = this.ClientDatayl.fctInfo
         this.editorFrom1 = this.ClientDatayl.sctInfo
@@ -363,8 +368,8 @@ export default {
           case 2: this.moniterResult = '未通过'; this.moniterResultChange.color = 'red'; break
           case 3: this.moniterResult = '未执行'; this.moniterResultChange.color = 'Orange'; break
         }
-      }
-      this.getBugData(this.bugNum)
+        this.getBugData(this.bugNum)
+      })
     },
     getBugData(e) {
       bugFinishList(e).then(res => {
@@ -384,14 +389,6 @@ export default {
         }
       })
     },
-    // celledit(row, column, cell, event) {
-    //   if (row[column.property]) {
-    //     row[column.property].edit = true
-    //     setTimeout(() => {
-    //       this.$refs[column.property].focus()
-    //     }, 20)
-    //   }
-    // },
     download() {
       this.getPdf('resumeId', this.name)
     },

+ 51 - 47
src/views/Platform/presentation/acceptTheReport.vue

@@ -3,7 +3,7 @@
   <div class="eleStyle">
     <div style="height:100%;width:94%; background:#ffffff; margin: 3%; border-radius: 8px; overflow: hidden;">
       <div id="resumeId" style="padding:2% 9%;">
-        <div style="display: flex; font-size: 19px;  white-space: nowrap; font-weight: bold">
+        <div style="display: flex; font-size: 19px;  white-space: nowrap; font-weight: bold;">
           <span style="flex:2;">标题 : {{ fromCreateData.name }}</span>
           <span style="flex:1;">by : {{ fromCreateData.submitter }} </span>
           <span style="flex:1;">
@@ -120,6 +120,7 @@
 <script>
 import { launchTestSendmail } from '@/api/ResultPage'
 import html2canvas from 'html2canvas'
+import { launchTest } from '@/api/testPresentetion'
 
 export default {
   name: 'AcceptTheReport',
@@ -147,7 +148,8 @@ export default {
     }
   },
   created() {
-    this.getRouterData()
+    // this.getRouterData()
+    this.idGet()
   },
   methods: {
     download() {
@@ -163,51 +165,53 @@ export default {
         this.$message({ type: 'info', message: '取消输入' })
       })
     },
-    getRouterData() {
-      this.fromCreateData = this.$route.query.data
-      if (this.fromCreateData.type === 2) {
-        this.towShow = false
-        this.oneShow = true
-      } else {
-        this.oneShow = false
-        this.towShow = true
-      }
-      this.name = this.fromCreateData.name
-      this.joinTestOne = this.fromCreateData.joinTest
-      this.moduleInfoOne = this.fromCreateData.moduleInfo
-      if (this.fromCreateData.safeInfo !== '') {
-        this.showData = true
-        this.safeStatus = '是'
-        this.safeStatus1.color = 'red'
-      } else {
-        this.showData = false
-        this.safeStatus = '否'
-        this.safeStatus1.color = 'green'
-      }
-      if (this.fromCreateData.lateReason !== '') {
-        this.showDelay = true
-        this.lateStatus = '是'
-      } else {
-        this.showDelay = false
-        this.lateStatus = '否'
-        this.lateStatus1.color = 'green'
-      }
-      if (this.fromCreateData.configInfo !== '') {
-        this.showDelay1 = true
-        this.config = '是'
-      } else {
-        this.showDelay1 = false
-        this.config = '否'
-        this.configInfo1.color = 'red'
-      }
-      if (this.fromCreateData.dependentComponents !== '') {
-        this.showDelay2 = true
-        this.dependentCom = '是'
-      } else {
-        this.showDelay2 = false
-        this.dependentCom = '否'
-        this.dependentComponents1.color = 'red'
-      }
+    idGet() {
+      launchTest({ id: this.$route.query.id }).then((res) => {
+        this.fromCreateData = res.data
+        if (this.fromCreateData.type === 2) {
+          this.towShow = false
+          this.oneShow = true
+        } else {
+          this.oneShow = false
+          this.towShow = true
+        }
+        this.name = this.fromCreateData.name
+        this.joinTestOne = this.fromCreateData.joinTest
+        this.moduleInfoOne = this.fromCreateData.moduleInfo
+        if (this.fromCreateData.safeInfo !== '') {
+          this.showData = true
+          this.safeStatus = '是'
+          this.safeStatus1.color = 'red'
+        } else {
+          this.showData = false
+          this.safeStatus = '否'
+          this.safeStatus1.color = 'green'
+        }
+        if (this.fromCreateData.lateReason !== '') {
+          this.showDelay = true
+          this.lateStatus = '是'
+        } else {
+          this.showDelay = false
+          this.lateStatus = '否'
+          this.lateStatus1.color = 'green'
+        }
+        if (this.fromCreateData.configInfo !== '') {
+          this.showDelay1 = true
+          this.config = '是'
+        } else {
+          this.showDelay1 = false
+          this.config = '否'
+          this.configInfo1.color = 'red'
+        }
+        if (this.fromCreateData.dependentComponents !== '') {
+          this.showDelay2 = true
+          this.dependentCom = '是'
+        } else {
+          this.showDelay2 = false
+          this.dependentCom = '否'
+          this.dependentComponents1.color = 'red'
+        }
+      })
     },
     open() { this.$router.push({ path: '/Platform/presentation/Assumptions' }) },
     sendReport(e, ele) {

+ 3 - 3
src/views/Platform/presentation/testPresentation.vue

@@ -9,7 +9,7 @@
       <el-table :data="tableData" fit border style="width: 100%">
         <el-table-column label="报告名称" min-width="280" align="center">
           <template slot-scope="scope">
-            <a href="javascript:void(0)" style="color:#20a0ff" @click="toReportView(scope.row)">{{ scope.row.reportName }}</a>
+            <a href="javascript:void(0)" style="color:#20a0ff" @click="toReportView(scope.row.id)">{{ scope.row.reportName }}</a>
           </template>
         </el-table-column>
         <el-table-column label="报告人" min-width="180" align="center">
@@ -29,7 +29,7 @@
         </el-table-column>
       </el-table>
     </template>
-    <el-pagination style="margin-top:30px" align="center" :current-page="curIndex" :page-sizes="[20, 30, 50]" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="handleSizeChange" @current-change="handleCurrentChange" />
+    <el-pagination style="margin-top:30px;" align="center" :current-page="curIndex" :page-sizes="[20, 30, 50]" :page-size="pageSize" layout="total, sizes, prev, pager, next, jumper" :total="total" @size-change="handleSizeChange" @current-change="handleCurrentChange" />
     <el-dialog title="选择任务" :visible.sync="centerDialogVisible" width="30%" center @close="closeChange">
       <div style="text-align:text;margin:10px 0;">
         <el-button ref="btn1" size="mini" @click="getQueryData(1)">项目</el-button>
@@ -97,7 +97,7 @@ export default {
     },
     // 查看跳转
     toReportView(ele) {
-      this.$router.push({ path: '/Platform/presentation/testPresenyL', query: { data: ele }})
+      this.$router.push({ path: '/Platform/presentation/testPresenyL', query: { id: ele }})
     },
     // 删除报告
     delePresentation(e) {

+ 36 - 35
src/views/Platform/presentation/testPresenyL.vue

@@ -59,7 +59,7 @@
             {{ bugshow }}
           </div>
         </div>
-        <el-button style="float:right; margin:2% 50%" @click="open()"> 返 回 </el-button>
+        <el-button style="float:right; margin:2% 50%;" @click="open()"> 返 回 </el-button>
       </el-form>
     </div>
   </div>
@@ -68,7 +68,7 @@
 <script>
 import echarts from 'echarts'
 
-import { bugDailyList } from '@/api/testPresentetion'
+import { bugDailyList, dailyReport } from '@/api/testPresentetion'
 import { dailyReportSendmail } from '@/api/ResultPage'
 import html2canvas from 'html2canvas'
 export default {
@@ -113,47 +113,48 @@ export default {
     }
   },
   created() {
-    this.getRouterData()
+    // this.getRouterData()
+    this.idGet()
   },
   methods: {
-    getRouterData() {
-      if (this.$route.query.data) {
-        this.fromCreat = this.$route.query.data
+    idGet() {
+      dailyReport({ id: this.$route.query.id }).then((res) => {
+        this.fromCreat = res.data
         this.name = this.fromCreat.reportName
         this.gntCreateEnd = this.fromCreat.gmtCreate
         this.bugshow = this.fromCreat.bugExplain
         this.TestProgress = this.fromCreat.testExplain
         this.projectProgress = this.fromCreat.problemRisks
-      }
-      this.pro = { projectId: this.fromCreat.projectId, taskId: this.fromCreat.taskId, gntCreateEnd: this.gntCreateEnd }
-      bugDailyList(this.pro).then(res => {
-        this.dateList = res.data.dateList
-        this.statusMap = res.data.statusMap
-        this.statusList = res.data.statusList
-        this.numList = res.data.bugMap
-        for (var ele of this.numList) {
-          this.bugName.push(ele.name)
-        }
+        this.pro = { projectId: this.fromCreat.projectId, taskId: this.fromCreat.taskId, gntCreateEnd: this.gntCreateEnd }
+        bugDailyList(this.pro).then(res => {
+          this.dateList = res.data.dateList
+          this.statusMap = res.data.statusMap
+          this.statusList = res.data.statusList
+          this.numList = res.data.bugMap
+          for (var ele of this.numList) {
+            this.bugName.push(ele.name)
+          }
 
-        echarts.init(document.getElementById('lineShow')).setOption({
-          title: { left: 'center', text: 'bug数量汇总' },
-          tooltip: { trigger: 'axis' },
-          legend: { top: 30, data: this.bugName },
-          grid: { left: '5%', right: '25%', bottom: '12%', containLabel: true },
-          // toolbox: { feature: { saveAsImage: {}}},
-          xAxis: { type: 'category', boundaryGap: true, data: this.dateList },
-          yAxis: { type: 'value' },
-          series: this.numList
-        })
-        echarts.init(document.getElementById('barShow')).setOption({
-          title: { text: 'bug状态汇总', x: 'center' },
-          color: ['#003366', '#006699', '#4cabce', '#e5323e'],
-          tooltip: { trigger: 'axis' },
-          legend: { top: 30, data: this.statusMap },
-          grid: { left: '5%', right: '25%', bottom: '12%', containLabel: true },
-          xAxis: [{ data: this.statusList }],
-          yAxis: [{}],
-          series: this.statusMap
+          echarts.init(document.getElementById('lineShow')).setOption({
+            title: { left: 'center', text: 'bug数量汇总' },
+            tooltip: { trigger: 'axis' },
+            legend: { top: 30, data: this.bugName },
+            grid: { left: '5%', right: '25%', bottom: '12%', containLabel: true },
+            // toolbox: { feature: { saveAsImage: {}}},
+            xAxis: { type: 'category', boundaryGap: true, data: this.dateList },
+            yAxis: { type: 'value' },
+            series: this.numList
+          })
+          echarts.init(document.getElementById('barShow')).setOption({
+            title: { text: 'bug状态汇总', x: 'center' },
+            color: ['#003366', '#006699', '#4cabce', '#e5323e'],
+            tooltip: { trigger: 'axis' },
+            legend: { top: 30, data: this.statusMap },
+            grid: { left: '5%', right: '25%', bottom: '12%', containLabel: true },
+            xAxis: [{ data: this.statusList }],
+            yAxis: [{}],
+            series: this.statusMap
+          })
         })
       })
     },