Просмотр исходного кода

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

qinzhipeng_v 5 лет назад
Родитель
Сommit
bd1c05017e

+ 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
+  })
+}

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

@@ -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 })

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

@@ -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 }})
     },
 
     // 删除报告

+ 14 - 17
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" />
@@ -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)
     },

+ 50 - 46
src/views/Platform/presentation/acceptTheReport.vue

@@ -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) {

+ 2 - 2
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">
@@ -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) {

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

@@ -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
+          })
         })
       })
     },

+ 2 - 2
src/views/projectManage/projectList/projectCreate.vue

@@ -147,7 +147,7 @@ export default {
   mounted() {
     if (!this.$route.query.id) {
       const editor = new E('#wangeditor')
-      editor.customConfig.menus = ['bold', 'italic', 'underline', 'link', 'list', 'justify', 'table']
+      editor.customConfig.menus = ['bold', 'italic', 'underline', 'link', 'list', 'justify', 'table', 'foreColor']
       editor.customConfig.onchange = (html) => {
         this.editorContent = html
       }
@@ -177,7 +177,7 @@ export default {
           this.form = res.data
           this.editorContent = res.data.timeInfo
           const editor = new E('#wangeditor')
-          editor.customConfig.menus = ['bold', 'italic', 'underline', 'link', 'list', 'justify', 'table']
+          editor.customConfig.menus = ['bold', 'italic', 'underline', 'link', 'list', 'justify', 'table', 'foreColor']
           editor.customConfig.onchange = (html) => {
             this.editorContent = html
           }