qinzhipeng_v 5 سال پیش
والد
کامیت
9679338221

+ 1 - 1
src/apiConfig/virtualDevices.js

@@ -1,3 +1,3 @@
 /*eslint-disable*/ //规避eslint的检查,如没有eslint可不写
 export const mockUrl = 'http:// 10.179.181.103:9999/virtual-devices' // 线上
-// export const mockUrl = 'http://10.96.113.197:9999/virtual-devices' // 线下
+// export const mockUrl = 'http://10.96.113.197:9999/virtual-devices' // 线下

+ 4 - 1
src/views/Platform/presentation/PresentReport.vue

@@ -231,6 +231,9 @@ export default {
         }
       })
     },
+    parentHandleclick() {
+      this.getCreateData(this.dataChange)
+    },
     getCreateData(ele) {
       this.$refs['dataChange'].validate((valid) => {
         if (valid) {
@@ -248,7 +251,7 @@ export default {
           launchTestCreate(this.objData).then(res => {
             if (res.code === 200) {
               this.$message.success(res.msg)
-              this.$router.go(-1)
+              this.$emit('keHu', this.dataChange)
             } else {
               this.$message.error(res.msg)
             }

+ 12 - 14
src/views/Platform/presentation/Templates/TestReport.vue

@@ -26,7 +26,7 @@
         <el-button size="small" type="primary" @click="NextStep()">下一步</el-button>
       </div>
     </div>
-    <el-dialog :visible.sync="showClient" width="80%" top="4vh" :close-on-click-modal="false" append-to-body :before-close="handleClose1()">
+    <el-dialog :visible.sync="showClient" width="80%" top="4vh" :close-on-click-modal="false" append-to-body :before-close="handleClose1">
       <div class="flex_start titFont">
         <div class="titIcon" />
         <span style="margin-left: 1%; width: 100px;">提测报告</span>
@@ -39,7 +39,7 @@
         </el-steps>
       </div>
       <div class="descr" style=" margin-bottom: 2%; height: 440px; overflow:scroll; overflow-x: hidden">
-        <Present v-if="Present1" ref="Present" />
+        <Present v-if="Present1" ref="Present" :ke-hu="getKeHu" />
         <presentation v-if="presentation1" ref="presentationRef" />
       </div>
       <div align="center">
@@ -109,7 +109,7 @@ export default {
     }
   },
   methods: {
-    init(e, id) {
+    init() {
       this.dialogVisible1 = true
     },
     handleClose1(e) {
@@ -129,12 +129,16 @@ export default {
       this.showClientYL = false
     },
     created_out() {
-      this.$refs.presentationRef.parentHandleclick()
+      if (this.radio === '2') {
+        this.$refs.presentationRef.parentHandleclick()
+      }
+      if (this.radio === '1') {
+        this.$refs.Present.parentHandleclick()
+      }
+    },
+    getKeHu(data) {
       this.showClientYL = true
-      // this.$nextTick(() => {
-      //   this.$refs.acceptthe.int()
-      // })
-      console.log(this.$refs)
+      console.log(data)
     },
     NextStep() {
       switch (Number(this.radio)) {
@@ -142,17 +146,11 @@ export default {
           this.showClient = true
           this.Present1 = true
           this.presentation1 = false
-          // this.$nextTick(() => {
-          //   this.$refs.Present.init()
-          // })
           break
         case 2:
           this.showClient = true
           this.Present1 = false
           this.presentation1 = true
-          // this.$nextTick(() => {
-          //   this.$refs.Present.init()
-          // })
           break
         case 3:
           this.$message({ message: '请选择要创建的‘模版’', type: 'error', duration: 1000, offset: 150 })

+ 21 - 17
src/views/projectManage/taskList/taskViewDetails.vue

@@ -1263,7 +1263,7 @@ export default {
           case 1:
             this.dialogVisible1 = true
             this.$nextTick(() => {
-              this.$refs.TestReport.init(1)
+              this.$refs.TestReport.init()
             })
             // if (this.task_form.statusString === '开发中') {
             //   this.$router.push({
@@ -1280,9 +1280,9 @@ export default {
             // }
             break
           case 2:
-            this.dialogDaily = true
+            // this.dialogDaily = true
             this.$nextTick(() => {
-              this.$refs.DailyReport.init(1)
+              this.$refs.DailyReport.init()
             })
             // this.$router.push({
             //   path: '/Platform/presentation/DailyNewsAdded',
@@ -1292,7 +1292,7 @@ export default {
           case 3:
             this.dialogClient = true
             this.$nextTick(() => {
-              this.$refs.ClientReport.init(1)
+              this.$refs.ClientReport.init()
             })
             // if (this.task_form.statusString === '测试中') {
             //   this.$router.push({
@@ -1318,19 +1318,23 @@ export default {
       } else {
         switch (e) {
           case 1:
-            if (this.task_form.statusString === '开发中') {
-              this.$router.push({
-                path: '/Platform/presentation/presentationReport',
-                query: { task: ele }
-              }) // 服务端提测
-            } else {
-              this.$message({
-                message: '该状态下不支持提测,请先将状态更改为【开发中】',
-                type: 'success',
-                duration: 1000,
-                offset: 150
-              })
-            }
+            this.dialogVisible1 = true
+            this.$nextTick(() => {
+              this.$refs.TestReport.init()
+            })
+            // if (this.task_form.statusString === '开发中') {
+            //   this.$router.push({
+            //     path: '/Platform/presentation/presentationReport',
+            //     query: { task: ele }
+            //   }) // 服务端提测
+            // } else {
+            //   this.$message({
+            //     message: '该状态下不支持提测,请先将状态更改为【开发中】',
+            //     type: 'success',
+            //     duration: 1000,
+            //     offset: 150
+            //   })
+            // }
             break
           case 2:
             this.$router.push({