Jelajahi Sumber

准出报告优化

qinzhipeng_v 5 tahun lalu
induk
melakukan
f549fc02ca

+ 134 - 137
src/views/Platform/presentation/Acceptance.vue

@@ -171,17 +171,23 @@
 
       <div id="editorNine" class="toolbar" />
       <div id="editorNine1" class="text" />
-      <div v-show="showButton1" style="flex: 1;"><el-button type="primary" @click="getQueryData(ClientData, tableData)"> 更 新 </el-button></div>
+      <!-- <div v-show="showButton1" style="flex: 1;"><el-button type="primary" @click="getQueryData(ClientData, tableData)"> 更 新 </el-button></div> -->
     </el-form>
   </div>
 </template>
 
 <script>
 import { projectTestReportUpdate, projectTestReportCreate, bugFinishList } from '@/api/ResultPage'
-import { projectTestReport } from '@/api/testPresentetion'
+// import { projectTestReport } from '@/api/testPresentetion'
 import E from 'wangeditor'
 export default {
   name: 'Acceptance',
+  props: {
+    clienData: {
+      type: Object,
+      required: true
+    }
+  },
   data() {
     return {
       userData: '',
@@ -224,7 +230,6 @@ export default {
       },
       showData: false,
       showDelay: false,
-      showButton1: '',
       content: null,
       editorContent: '',
       taskLateStatus: 0,
@@ -320,146 +325,138 @@ export default {
   },
   methods: {
     getRouterData() {
-      this.showButton1 = false
-      this.getBugData()
-
-      if (this.$route.query.data) { // 报告主页更新
-        this.showButton1 = true
-        projectTestReport({ id: this.$route.query.id }).then((res) => {
-          this.ClientData = res.data
-          this.editorElem.txt.html(this.ClientData.projectBackground)
-          this.editorElems.txt.html(this.ClientData.moduleInfo)
-          this.editorFrom.txt.html(this.ClientData.functionInfo)
-          this.editorF.txt.html(this.ClientData.onlineRisk)
-          this.editorEle.txt.html(this.ClientData.rqtInfo)
-          this.editorEl.txt.html(this.ClientData.fctInfo)
-          this.editorSix.txt.html(this.ClientData.pftInfo)
-          this.editorEight.txt.html(this.ClientData.safeResultInfo)
-          this.editorNine.txt.html(this.ClientData.moniterResultInfo)
-          this.bugNum = { type: 1, taskId: this.$route.query.taskId, projectId: this.$route.query.projectId }
-          this.getBugData()
-          if (this.ClientData.status === 1) {
-            this.tagBtn = 'success'
-            this.status = '1'
-          } else {
-            this.tagBtn1 = 'danger'
-            this.status = '2'
-          }
-          if (this.ClientData.taskLateStatus === 1) {
-            this.tagChange = 'success'
-            this.taskLateStatus = '1'
-            this.showDelay = false
-          } else {
-            this.tagChange1 = 'danger'
-            this.taskLateStatus = '2'
-            this.showDelay = true
-          }
+      this.getBugData(this.clienData)
+      console.log(this.clienData, '准出服务端')
+      this.ClientData = this.clienData
+      this.editorElem.txt.html(this.ClientData.projectBackground)
+      this.editorElems.txt.html(this.ClientData.moduleInfo)
+      this.editorFrom.txt.html(this.ClientData.functionInfo)
+      this.editorF.txt.html(this.ClientData.onlineRisk)
+      this.editorEle.txt.html(this.ClientData.rqtInfo)
+      this.editorEl.txt.html(this.ClientData.fctInfo)
+      this.editorSix.txt.html(this.ClientData.pftInfo)
+      this.editorEight.txt.html(this.ClientData.safeResultInfo)
+      this.editorNine.txt.html(this.ClientData.moniterResultInfo)
+      this.bugNum = { type: 1, taskId: this.$route.query.taskId }
+      this.getBugData(this.clienData)
+      if (this.ClientData.status === 1) {
+        this.tagBtn = 'success'
+        this.status = '1'
+      } else {
+        this.tagBtn1 = 'danger'
+        this.status = '2'
+      }
+      if (this.ClientData.taskLateStatus === 1) {
+        this.tagChange = 'success'
+        this.taskLateStatus = '1'
+        this.showDelay = false
+      } else {
+        this.tagChange1 = 'danger'
+        this.taskLateStatus = '2'
+        this.showDelay = true
+      }
 
-          if (this.ClientData.safeInfo !== '') {
-            this.getInfoBtn1 = 'info'
-            this.getInfoBtn = 'danger'
-            this.lateStatus = 2
-            this.showData = true
-          } else {
-            this.getInfoBtn1 = 'success'
-            this.getInfoBtn = 'info'
-            this.lateStatus = 1
-            this.showData = false
-            this.$set(this.ClientData, 'safeInfo', '')
-          }
+      if (this.ClientData.safeInfo !== '') {
+        this.getInfoBtn1 = 'info'
+        this.getInfoBtn = 'danger'
+        this.lateStatus = 2
+        this.showData = true
+      } else {
+        this.getInfoBtn1 = 'success'
+        this.getInfoBtn = 'info'
+        this.lateStatus = 1
+        this.showData = false
+        this.$set(this.ClientData, 'safeInfo', '')
+      }
 
-          if (this.ClientData.fctResult) { // 功能测试
-            switch (this.ClientData.fctResult) {
-              case 1:
-                this.fctResultChange1 = 'success'
-                this.fctResult = 1
-                break
-              case 2:
-                this.fctResultChange2 = 'danger'
-                this.fctResult = 2
-                break
-              case 3:
-                this.fctResultChange = 'warning'
-                this.fctResult = 3
-                break
-            }
-          }
+      if (this.ClientData.fctResult) { // 功能测试
+        switch (this.ClientData.fctResult) {
+          case 1:
+            this.fctResultChange1 = 'success'
+            this.fctResult = 1
+            break
+          case 2:
+            this.fctResultChange2 = 'danger'
+            this.fctResult = 2
+            break
+          case 3:
+            this.fctResultChange = 'warning'
+            this.fctResult = 3
+            break
+        }
+      }
 
-          if (this.ClientData.rqtResult) { // 可靠性测试
-            switch (this.ClientData.rqtResult) {
-              case 1:
-                this.rqtResultChange1 = 'success'
-                this.rqtResult = 1
-                break
-              case 2:
-                this.rqtResultChange2 = 'danger'
-                this.rqtResult = 2
-                break
-              case 3:
-                this.rqtResultChange = 'warning'
-                this.rqtResult = 3
-                break
-            }
-          }
+      if (this.ClientData.rqtResult) { // 可靠性测试
+        switch (this.ClientData.rqtResult) {
+          case 1:
+            this.rqtResultChange1 = 'success'
+            this.rqtResult = 1
+            break
+          case 2:
+            this.rqtResultChange2 = 'danger'
+            this.rqtResult = 2
+            break
+          case 3:
+            this.rqtResultChange = 'warning'
+            this.rqtResult = 3
+            break
+        }
+      }
 
-          if (this.ClientData.pftResult) { // 稳定性测试
-            switch (this.ClientData.pftResult) {
-              case 1:
-                this.pftResultChange1 = 'success'
-                this.pftResult = 1
-                break
-              case 2:
-                this.pftResultChange2 = 'danger'
-                this.pftResult = 2
-                break
-              case 3:
-                this.pftResultChange = 'warning'
-                this.pftResult = 3
-                break
-            }
-          }
+      if (this.ClientData.pftResult) { // 稳定性测试
+        switch (this.ClientData.pftResult) {
+          case 1:
+            this.pftResultChange1 = 'success'
+            this.pftResult = 1
+            break
+          case 2:
+            this.pftResultChange2 = 'danger'
+            this.pftResult = 2
+            break
+          case 3:
+            this.pftResultChange = 'warning'
+            this.pftResult = 3
+            break
+        }
+      }
 
-          if (this.ClientData.safeResult) { // 安全性测试
-            switch (this.ClientData.safeResult) {
-              case 1:
-                this.safeResultChange1 = 'success'
-                this.safeResult = 1
-                break
-              case 2:
-                this.safeResultChange2 = 'danger'
-                this.safeResult = 2
-                break
-              case 3:
-                this.safeResultChange = 'warning'
-                this.safeResult = 3
-                break
-            }
-          }
+      if (this.ClientData.safeResult) { // 安全性测试
+        switch (this.ClientData.safeResult) {
+          case 1:
+            this.safeResultChange1 = 'success'
+            this.safeResult = 1
+            break
+          case 2:
+            this.safeResultChange2 = 'danger'
+            this.safeResult = 2
+            break
+          case 3:
+            this.safeResultChange = 'warning'
+            this.safeResult = 3
+            break
+        }
+      }
 
-          if (this.ClientData.moniterResult) { // 线上监控
-            switch (this.ClientData.moniterResult) {
-              case 1:
-                this.moniterResultChange1 = 'success'
-                this.moniterResult = 1
-                break
-              case 2:
-                this.moniterResultChange2 = 'danger'
-                this.moniterResult = 2
-                break
-              case 3:
-                this.moniterResultChange = 'warning'
-                this.moniterResult = 3
-                break
-            }
-          }
-        })
+      if (this.ClientData.moniterResult) { // 线上监控
+        switch (this.ClientData.moniterResult) {
+          case 1:
+            this.moniterResultChange1 = 'success'
+            this.moniterResult = 1
+            break
+          case 2:
+            this.moniterResultChange2 = 'danger'
+            this.moniterResult = 2
+            break
+          case 3:
+            this.moniterResultChange = 'warning'
+            this.moniterResult = 3
+            break
+        }
       }
     },
 
-    getBugData() {
-      var url = location.href // 获取url中"?"符后的字串
-      var arr = url.split('=')
-      bugFinishList({ type: 1, taskId: Number(arr[1]) }).then(res => {
+    getBugData(vel) {
+      bugFinishList({ type: 1, taskIds: vel.taskIds }).then(res => {
         this.$set(this.ClientData, 'smokeTestResult', res.data.launchInfo)
         this.tableData = [res.data]
         this.formatData()
@@ -500,14 +497,14 @@ export default {
       projectTestReportUpdate(this.objData).then(res => {
         if (res.code === 200) {
           this.$message({ type: 'success', message: '更新成功' })
-          this.$router.go(-1)
+          this.$emit('QuasiReport', res.data)
         } else {
           this.$message.error('更新失败')
         }
       })
     },
-    parentHandleclick() {
-      this.getCreateData(this.ClientData, this.tableData)
+    parentHandleclick(e) {
+      e === 1 ? this.getCreateData(this.ClientData, this.tableData) : this.getQueryData(this.ClientData, this.tableData)
     },
 
     // 新建准出提交

+ 97 - 131
src/views/Platform/presentation/ClientAcceptance.vue

@@ -119,17 +119,21 @@
       <el-row>
         <el-col :span="24" style="margin:1% 0;">遗留问题<el-input v-model="ClientData.bugInfo" type="textarea" size="small" placeholder="请填写内容" style="margin-top:1%;" /></el-col>
       </el-row>
-      <div v-show="showButton1" style="flex: 1;"><el-button type="primary" @click="getQueryData(ClientData, tableData)"> 更 新 </el-button></div>
     </el-form>
   </div>
 </template>
 
 <script>
 import { projectTestReportUpdate, projectTestReportCreate, bugFinishList } from '@/api/ResultPage'
-import { projectTestReport } from '@/api/testPresentetion'
 import E from 'wangeditor'
 export default {
   name: 'ClientAcceptance',
+  props: {
+    clienData: {
+      type: Object,
+      required: true
+    }
+  },
   data() {
     return {
       userData: '',
@@ -161,11 +165,7 @@ export default {
         tester: [{ required: true, message: '测试人员不能为空', trigger: 'change' }],
         testTimeEnd: [{ required: true, message: '测试周期不能为空', trigger: 'change' }]
       },
-      showButton1: '',
-      content: null,
-      editorContent: '',
       showDelay: false,
-      labelWidth: '60px',
       status: '',
       taskLateStatus: '',
       pftResult: '',
@@ -174,9 +174,6 @@ export default {
       ClientData: {},
       editorElem: [],
       editorElems: [],
-      bugDatas: [],
-      bizIdCode: '',
-      projectIdCode: '',
       bugNum: '',
       tableData: []
     }
@@ -216,120 +213,97 @@ export default {
   },
   methods: {
     getRouterData() {
-      this.showButton1 = false
-
-      if (this.$route.query.task) { // 任务页面新建
-        this.ClientData = {}
-        this.bizIdCode = this.$route.query.task.bizId
-        this.projectIdCode = this.$route.query.task.id
-        this.bugNum = { type: 2, taskId: this.projectIdCode }
-        this.getBugData()
+      console.log(this.clienData, '准出客户端')
+      this.ClientData = this.clienData
+      this.bugNum = { type: 2, taskIds: this.ClientData.taskIds }
+      this.getBugData()
+      if (this.ClientData.status === 1) {
+        this.tagBtn = 'success'
+        this.tagBtn1 = 'info'
+        this.status = 1
+      } else {
+        this.tagBtn1 = 'danger'
+        this.tagBtn = 'info'
+        this.status = 2
       }
-
-      if (this.$route.query.projectData) { // 主页面新建
-        this.ClientData = {}
-        this.bizIdCode = this.$route.query.projectData.bizId
-        this.projectIdCode = this.$route.query.projectData.id
-        this.$route.query.projectData.typeString === 1 ? this.ClientData.projectId = this.projectIdCode : this.ClientData.taskId = this.projectIdCode
-        this.bugNum = { type: 2, taskId: this.ClientData.taskId, projectId: this.ClientData.projectId }
-        this.getBugData()
+      if (this.ClientData.taskLateStatus === 1) {
+        this.tagChange = 'success'
+        this.tagChange1 = 'info'
+        this.taskLateStatus = 1
+        this.showDelay = false
+      } else {
+        this.tagChange1 = 'danger'
+        this.tagChange = 'info'
+        this.taskLateStatus = 2
+        this.showDelay = true
       }
-
-      if (this.$route.query.data) { // 准出主页面
-        this.showButton1 = true
-        projectTestReport({ id: this.$route.query.id }).then((res) => {
-          this.ClientData = res.data
-          this.bugNum = { type: 2, taskId: this.$route.query.taskId, projectId: this.$route.query.projectId }
-          this.getBugData()
-          if (this.ClientData.status === 1) {
-            this.tagBtn = 'success'
-            this.tagBtn1 = 'info'
-            this.status = 1
-          } else {
-            this.tagBtn1 = 'danger'
-            this.tagBtn = 'info'
-            this.status = 2
-          }
-          if (this.ClientData.taskLateStatus === 1) {
-            this.tagChange = 'success'
-            this.tagChange1 = 'info'
-            this.taskLateStatus = 1
-            this.showDelay = false
-          } else {
-            this.tagChange1 = 'danger'
-            this.tagChange = 'info'
-            this.taskLateStatus = 2
-            this.showDelay = true
-          }
-          if (this.ClientData.sctResult) {
-            switch (this.ClientData.sctResult) {
-              case 1:
-                this.sctChange = 'info'
-                this.sctChange1 = 'success'
-                this.sctChange2 = 'info'
-                this.sctResult = 1
-                break
-              case 2:
-                this.sctChange = 'info'
-                this.sctChange1 = 'info'
-                this.sctChange2 = 'danger'
-                this.sctResult = 2
-                break
-              case 3:
-                this.sctChange = 'warning'
-                this.sctChange1 = 'info'
-                this.sctChange2 = 'info'
-                this.sctResult = 3
-            }
-          }
-          if (this.ClientData.pftResult) {
-            switch (this.ClientData.pftResult) {
-              case 1:
-                this.pftChange = 'info'
-                this.pftChange1 = 'success'
-                this.pftChange2 = 'info'
-                this.pftResult = 1
-                break
-              case 2:
-                this.pftChange = 'info'
-                this.pftChange1 = 'info'
-                this.pftChange2 = 'danger'
-                this.pftResult = 2
-                break
-              case 3:
-                this.pftChange = 'warning'
-                this.pftChange1 = 'info'
-                this.pftChange2 = 'info'
-                this.pftResult = 3
-            }
-          }
-          if (this.ClientData.acceptanceResult) {
-            switch (this.ClientData.acceptanceResult) {
-              case 1:
-                this.acceptanceResultChange = 'info'
-                this.acceptanceResultChange1 = 'success'
-                this.acceptanceResultChange2 = 'info'
-                this.acceptanceResult = 1
-                break
-              case 2:
-                this.acceptanceResultChange = 'info'
-                this.acceptanceResultChange1 = 'info'
-                this.acceptanceResultChange2 = 'danger'
-                this.acceptanceResult = 2
-                break
-              case 3:
-                this.acceptanceResultChange = 'warning'
-                this.acceptanceResultChange1 = 'info'
-                this.acceptanceResultChange2 = 'info'
-                this.acceptanceResult = 3
-            }
-          }
-          this.editorElem.txt.html(this.ClientData.projectBackground)
-          this.editorElems.txt.html(this.ClientData.fctInfo)
-          this.editorFrom.txt.html(this.ClientData.sctInfo)
-          this.editorFro.txt.html(this.ClientData.acceptanceResultInfo)
-        })
+      if (this.ClientData.sctResult) {
+        switch (this.ClientData.sctResult) {
+          case 1:
+            this.sctChange = 'info'
+            this.sctChange1 = 'success'
+            this.sctChange2 = 'info'
+            this.sctResult = 1
+            break
+          case 2:
+            this.sctChange = 'info'
+            this.sctChange1 = 'info'
+            this.sctChange2 = 'danger'
+            this.sctResult = 2
+            break
+          case 3:
+            this.sctChange = 'warning'
+            this.sctChange1 = 'info'
+            this.sctChange2 = 'info'
+            this.sctResult = 3
+        }
+      }
+      if (this.ClientData.pftResult) {
+        switch (this.ClientData.pftResult) {
+          case 1:
+            this.pftChange = 'info'
+            this.pftChange1 = 'success'
+            this.pftChange2 = 'info'
+            this.pftResult = 1
+            break
+          case 2:
+            this.pftChange = 'info'
+            this.pftChange1 = 'info'
+            this.pftChange2 = 'danger'
+            this.pftResult = 2
+            break
+          case 3:
+            this.pftChange = 'warning'
+            this.pftChange1 = 'info'
+            this.pftChange2 = 'info'
+            this.pftResult = 3
+        }
+      }
+      if (this.ClientData.acceptanceResult) {
+        switch (this.ClientData.acceptanceResult) {
+          case 1:
+            this.acceptanceResultChange = 'info'
+            this.acceptanceResultChange1 = 'success'
+            this.acceptanceResultChange2 = 'info'
+            this.acceptanceResult = 1
+            break
+          case 2:
+            this.acceptanceResultChange = 'info'
+            this.acceptanceResultChange1 = 'info'
+            this.acceptanceResultChange2 = 'danger'
+            this.acceptanceResult = 2
+            break
+          case 3:
+            this.acceptanceResultChange = 'warning'
+            this.acceptanceResultChange1 = 'info'
+            this.acceptanceResultChange2 = 'info'
+            this.acceptanceResult = 3
+        }
       }
+      this.editorElem.txt.html(this.ClientData.projectBackground)
+      this.editorElems.txt.html(this.ClientData.fctInfo)
+      this.editorFrom.txt.html(this.ClientData.sctInfo)
+      this.editorFro.txt.html(this.ClientData.acceptanceResultInfo)
     },
     getBugData() {
       bugFinishList(this.bugNum).then(res => {
@@ -338,8 +312,8 @@ export default {
         this.formatData()
       })
     },
-    parentHandleclick() {
-      this.getCreateData(this.ClientData, this.tableData)
+    parentHandleclick(e) {
+      e === 1 ? this.getCreateData(this.ClientData, this.tableData) : this.getQueryData(this.ClientData, this.tableData)
     },
     getCreateData(ele, vel) {
       this.$refs['ClientData'].validate((valid) => {
@@ -390,7 +364,7 @@ export default {
       projectTestReportUpdate(this.objData).then(res => {
         if (res.code === 200) {
           this.$message({ type: 'success', message: '更新成功' })
-          this.$router.go(-1)
+          this.$emit('QuasiReport', res.data)
         } else {
           this.$message.error('更新失败')
         }
@@ -407,14 +381,6 @@ export default {
         }
       })
     },
-    // celledit(row, column, cell, event) {
-    //   if (row[column.property]) {
-    //     row[column.property].edit = true
-    //     setTimeout(() => {
-    //       this.$refs[column.property].focus()
-    //     }, 20)
-    //   }
-    // },
 
     // 准出延期
     lateStatusChange(e) {

+ 0 - 24
src/views/Platform/presentation/ResultPageyL.vue

@@ -194,8 +194,6 @@
 
 <script>
 import { bugFinishList } from '@/api/ResultPage'
-// import { projectTestReportSendmail, bugFinishList } from '@/api/ResultPage'
-// import { projectTestReport } from '@/api/testPresentetion'
 
 export default {
   name: 'ResultPageyL',
@@ -256,7 +254,6 @@ export default {
   },
   methods: {
     idGet() {
-      // projectTestReport({ id: this.message.id }).then((res) => {
       this.ClientDatayl = this.message
       console.log(this.ClientDatayl, 'ddddddd')
       this.editorElems1 = this.ClientDatayl.fctInfo
@@ -364,27 +361,6 @@ export default {
         }
       })
     }
-    // download() {
-    //   this.getPdf('resumeId', this.name)
-    // },
-    // download1() {
-    //   this.getPdf('resumeId1', this.name)
-    // },
-    // sendReport(e) {
-    //   var ele = this.ClientDatayl
-    //   setTimeout(() => {
-    //     var that = this
-    //     html2canvas(document.getElementById('resumeId'), { useCORS: true }).then(function(canvas) {
-    //       var imgData = canvas.toDataURL('image/png')
-    //       var sendImgData = imgData.substring(imgData.indexOf(',') + 1)
-    //       var postData = { 'reportId': ele.id, 'imgStr': sendImgData, 'url': window.location.href, 'emailUser': e.name, 'copyTo': e.names }
-    //       projectTestReportSendmail(postData).then(res => {
-    //         that.dialogFormVisible_one = false
-    //         res.code === 200 ? that.$message.success('发送测试报告成功') : that.$message.error('发送测试报告失败,请联系管理员!')
-    //       })
-    //     })
-    //   }, 500)
-    // },
   }
 }
 </script>

+ 31 - 10
src/views/Platform/presentation/Templates/ClientReport.vue

@@ -1,6 +1,6 @@
 <template>
-  <el-dialog :visible.sync="dialogDaliy" width="80%" :close-on-click-modal="false">
-    <div class="flex_start titFont">
+  <el-dialog :visible.sync="dialogDaliy" width="80%" :close-on-click-modal="false" :before-close="handleClose">
+    <div style="display: flex; align-items: center; justify-content: flex-start;  font-size: 18px; font-weight: 450;">
       <div class="titIcon" />
       <span style="margin-left: 1%; width: 100px;">准出报告</span>
     </div>
@@ -11,7 +11,7 @@
         <el-step style="font-size: 16pt; color: #333B4A;" title="发送报告" />
       </el-steps>
     </div>
-    <div v-show="showOne" style="margin: 0 4% 2%;">
+    <div v-if="showOne" style="margin: 0 4% 2%;">
       <div style="margin: 0% 14%;  height: 440px;" class="Layout">
         <div style="margin-right:2%;">
           <el-radio v-model="radio" class="_radio" label="1">客户端模版</el-radio>
@@ -26,10 +26,10 @@
         <el-button size="small" type="primary" @click="NextStep()">下一步</el-button>
       </div>
     </div>
-    <div v-show="showTow">
+    <div v-if="showTow">
       <div class="descr" style=" margin-bottom: 2%; height: 480px; overflow:scroll; overflow-x: hidden">
-        <ClientAcceptance v-if="ClientAcceptance1" ref="ClientAcceptance" @QuasiReport="QuasiReport" />
-        <Acceptance v-if="Acceptance1" ref="Acceptance" @QuasiReport="QuasiReport" />
+        <ClientAcceptance v-if="ClientAcceptance1" ref="ClientAcceptance" :clien-data="clienData" @QuasiReport="QuasiReport" />
+        <Acceptance v-if="Acceptance1" ref="Acceptance" :clien-data="clienData" @QuasiReport="QuasiReport" />
       </div>
       <div align="center">
         <el-button size="small" type="primary" @click="handleClose1()">上一步</el-button>
@@ -82,6 +82,7 @@ export default {
       Client: false,
       showOne: true,
       radio: '3',
+      newNum: '',
       form: {},
       report: {},
       active: 1,
@@ -90,7 +91,7 @@ export default {
   },
   methods: {
     init(index, newData) {
-      console.log(newData, 'nckdnc')
+      console.log(newData, '准出dialog')
       this.dialogDaliy = true
       switch (index) {
         case 1: // 新建
@@ -101,21 +102,40 @@ export default {
           this.radio = '3'
           break
         case 2: // 编辑
+          this.clienData = newData
           this.showOne = false
           this.showThree = false
           this.showTow = true
           this.active = 2
-          newData.type === 1 ? this.radio = '1' : this.radio = '2'
+          this.newNum = 2
+          if (newData.type === 1) {
+            this.radio = '1'
+            this.ClientAcceptance1 = true
+            this.Acceptance1 = false
+          }
+          if (newData.type === 2) {
+            this.radio = '2'
+            this.ClientAcceptance1 = false
+            this.Acceptance1 = true
+          }
           break
         case 3: // 详情
           this.showOne = false
           this.showThree = true
           this.showTow = false
+          this.report = newData
           this.active = 3
           newData.type === 1 ? this.radio = '1' : this.radio = '2'
           break
       }
     },
+    handleClose() {
+      this.dialogDaliy = false
+      this.radio = '3'
+      this.showOne = false
+      this.showThree = false
+      this.showTow = false
+    },
     handleClose1() {
       this.showOne = true
       this.showTow = false
@@ -123,10 +143,10 @@ export default {
     },
     created_out() {
       if (this.radio === '1') {
-        this.$refs.ClientAcceptance.parentHandleclick()
+        this.$refs.ClientAcceptance.parentHandleclick(this.newNum)
       }
       if (this.radio === '2') {
-        this.$refs.Acceptance.parentHandleclick()
+        this.$refs.Acceptance.parentHandleclick(this.newNum)
       }
     },
     QuasiReport(e) {
@@ -140,6 +160,7 @@ export default {
       this.showThree = false
       this.showTow = true
       this.active = 2
+      this.newNum = 1
     },
     NextStep() {
       switch (Number(this.radio)) {

+ 10 - 11
src/views/Platform/presentation/testPresentation.vue

@@ -43,7 +43,7 @@
             <el-table :data="tableData1" size="mini" :header-cell-style="{ background: '#F2F3F6' }" fit border style="width: 100%">
               <el-table-column label="报告名称" min-width="150" align="center">
                 <template slot-scope="scope">
-                  <a href="javascript:void(0)" style="color:#20a0ff" @click="toReportView(scope.row.id, 1)">{{ scope.row.reportName }}</a>
+                  <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="150" align="center">
@@ -77,7 +77,7 @@
             <el-table :data="tableData2" size="mini" :header-cell-style="{ background: '#F2F3F6' }" fit border style="width: 100%">
               <el-table-column label="报告名称" min-width="230" align="center">
                 <template slot-scope="scope">
-                  <a href="javascript:void(0)" style="color:#20a0ff" @click="toReportView(scope.row.id, 2)">{{ scope.row.name }}</a>
+                  <a href="javascript:void(0)" style="color:#20a0ff" @click="toReportView(scope.row, 2)">{{ scope.row.name }}</a>
                 </template>
               </el-table-column>
               <el-table-column label="报告人" min-width="150" align="center">
@@ -319,14 +319,10 @@ export default {
       })
     },
     queryPresentation1(data) {
-      switch (data.type) {
-        case 1:// 客户端
-          this.$router.push({ path: '/Platform/presentation/ClientAcceptance', query: { data: data, taskId: data.taskId, projectId: data.projectId, id: data.id }})
-          break
-        case 2:// 服务端
-          this.$router.push({ path: '/Platform/presentation/Acceptance', query: { data: data, taskId: data.taskId, projectId: data.projectId, id: data.id }})
-          break
-      }
+      this.dialogClient = true
+      this.$nextTick(() => {
+        this.$refs.ClientReport.init(2, data)
+      })
     },
     queryPresentation2(data) { // 提测编辑
       switch (data.type) {
@@ -524,7 +520,10 @@ export default {
           })
           break
         case 1:
-          this.$router.push({ path: '/Platform/presentation/ResultPageyL', query: { id: ele }})
+          this.dialogClient = true
+          this.$nextTick(() => {
+            this.$refs.ClientReport.init(3, ele)
+          })
           break
         case 2:
           this.$router.push({ path: '/Platform/presentation/acceptTheReport', query: { id: ele }})