qinzhipeng_v 5 lat temu
rodzic
commit
7a5f12ace3

+ 2 - 2
src/apiConfig/api.js

@@ -1,6 +1,6 @@
 /*eslint-disable*/   //规避eslint的检查,如没有eslint可不写
-export const mockUrl = 'http://10.179.24.176:8980' // 线下
-// export const mockUrl = 'http://10.179.24.123:8980' // 线上
+// export const mockUrl = 'http://10.179.24.176:8980' // 线下
+export const mockUrl = 'http://10.179.24.123:8980' // 线上
 
 // export const mockUrl = 'http://172.23.162.226:8980' // 舒宁本地
 

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

@@ -130,12 +130,13 @@ export default {
         })
     },
     queryPresentation(data) {
+      console.log(data)
       switch (data.type) {
         case 1:// 客户端
-          this.$router.push({ path: '/Platform/presentation/PresentReport', query: { data: data }})
+          this.$router.push({ path: '/Platform/presentation/PresentReport', query: { data: data, taskId: data.taskId, projectId: data.projectId, id: data.id }})
           break
         case 2:// 服务端
-          this.$router.push({ path: '/Platform/presentation/presentationReport', query: { data: data }})
+          this.$router.push({ path: '/Platform/presentation/presentationReport', query: { data: data, taskId: data.taskId, projectId: data.projectId, id: data.id }})
           break
       }
     },
@@ -148,6 +149,7 @@ export default {
             this.data_type = ele
           }
         }
+        console.log(e.radio)
         if (e.radio !== undefined) {
           if (e.radio) { // B端可以选择创建服务端或客户端
             if (e.radio === '1') {
@@ -180,6 +182,7 @@ export default {
           arr.push({ value: ele.name, id: ele.id, type: ele.type, bizId: ele.bizId, projectId: ele.projectId })
         }
         this.restaurants = arr
+        console.log(arr)
       })
     },
     createFilter(queryString) {

+ 4 - 5
src/views/Platform/presentation/DailyNewsAdded.vue

@@ -30,7 +30,7 @@
           </el-row>
         </div>
         <dir align="right" style="display: flex; margin: 5vw 0 0 50vw;">
-          <div style="flex: 1;"><el-button @click="clickPreview(fromCreateData)"> 预 览 </el-button></div>
+          <div style="flex: 1;"><el-button v-show="preview" @click="clickPreview(fromCreateData)"> 预 览 </el-button></div>
           <div v-show="showButton" style="flex: 1;"><el-button type="primary" @click="getCreateData(fromCreateData)"> 保 存 </el-button></div>
           <div v-show="showButton1" style="flex: 1;"><el-button type="primary" @click="getQueryData(fromCreateData)"> 更 新 </el-button></div>
           <div style="flex: 1;"><el-button @click="open(fromCreateData)"> 取 消 </el-button></div>
@@ -60,6 +60,7 @@ export default {
       showbut: '',
       showButton1: '',
       bugshow: '',
+      preview: false,
       showButton: true,
       fromCreateData: {
         id: '',
@@ -113,6 +114,7 @@ export default {
         this.fromCreateData = {}
         this.showButton1 = true
         this.showButton = false
+        this.preview = true
         dailyReport({ id: this.$route.query.id }).then((res) => {
           this.fromCreateData = res.data
           this.editor.value = this.fromCreateData.testExplain
@@ -226,8 +228,6 @@ export default {
 
     // 更新bug提交
     getQueryData(ele) {
-      debugger
-      console.log(ele)
       this.fromCreateData = ele
       this.fromCreateData.taskId === 0 ? this.fromCreateData.taskId = '' : ''
       this.fromCreateData.projectId === 0 ? this.fromCreateData.projectId = '' : ''
@@ -246,8 +246,7 @@ export default {
 
     // 预览跳转
     clickPreview(ele) {
-      console.log(ele)
-      this.$router.push({ path: '/Platform/presentation/testPresenyL', query: { id: ele }})
+      this.$router.push({ path: '/Platform/presentation/testPresenyL', query: { id: this.$route.query.id }})
     },
 
     deleteProject(e) {

+ 43 - 41
src/views/Platform/presentation/PresentReport.vue

@@ -102,7 +102,7 @@
         </div>
 
         <div class="double" align="right" style="margin: 5vw 0 3vw 60vw;">
-          <div><el-button @click="clickPreview(dataChange)"> 预 览 </el-button></div>
+          <div><el-button v-show="preview" @click="clickPreview(dataChange)"> 预 览 </el-button></div>
           <div v-show="showButton"><el-button type="primary" @click="getCreateData(dataChange)"> 保 存 </el-button></div>
           <div v-show="showButton1"><el-button type="primary" @click="getQueryData(dataChange)"> 更 新 </el-button></div>
           <div><el-button @click="open(dataChange)"> 取 消 </el-button></div>
@@ -115,6 +115,7 @@
 
 <script>
 import { launchTestUpdate, launchTestCreate } from '@/api/InterfaceReport'
+import { launchTest } from '@/api/testPresentetion'
 import E from 'wangeditor'
 
 export default {
@@ -147,6 +148,7 @@ export default {
       showApollo: false,
       showRelyOn: false,
       showButton: true,
+      preview: false,
       showButton1: '',
       userData: '',
       objData: '',
@@ -175,7 +177,6 @@ export default {
     this.DetailsOfProposal.customConfig.onchange = (html) => { this.DetailsOfProposal = html }
     this.DetailsOfProposal.create()
     this.DetailsOfProposal.txt.html(`<p></p><table width="100%"><colgroup><col width="30%"><col width="30%"><col width="30%"></colgroup><thead><tr><th>端类型</th><th>联调RD</th><th>联调结果</th></tr></thead><tbody><tr><td><br></td><td><br></td><td><br></td></tr><tr><td><br></td><td><br></td><td><br></td></tr></tbody></table><p></p>`)
-    this.getRouterData1()
   },
   methods: {
     getRouterData() {
@@ -186,43 +187,47 @@ export default {
         this.bizIdCode = this.$route.query.task.bizId
         this.projectIdCode = this.$route.query.task.id
       }
-      if (this.$route.query.data) {
+      if (this.$route.query.data) { // 提测编辑
         this.showButton1 = true
         this.showButton = false
-        this.dataChange = this.$route.query.data
-        if (this.dataChange.lateStatus === 1) {
-          this.lateStatusBtn1 = 'success'
-          this.lateStatusBtn = 'info'
-          this.lateStatus = 1
-          this.showDelay = false
-        } else {
-          this.lateStatusBtn1 = 'info'
-          this.lateStatusBtn = 'danger'
-          this.lateStatus = 2
-          this.showDelay = true
-        }
-        if (this.dataChange.configInfo !== '') {
-          this.configInBtn = 'success'
-          this.configInBtn1 = 'info'
-          this.configIn = 1
-          this.showApollo = true
-        } else {
-          this.configInBtn = 'info'
-          this.configInBtn1 = 'danger'
-          this.configIn = 2
-          this.showApollo = false
-        }
-        if (this.dataChange.dependentComponents !== '') {
-          this.dependentBtn = 'success'
-          this.dependentBtn1 = 'info'
-          this.dependent = 1
-          this.showRelyOn = true
-        } else {
-          this.dependentBtn = 'info'
-          this.dependentBtn1 = 'danger'
-          this.dependent = 2
-          this.showRelyOn = false
-        }
+        this.preview = true
+        launchTest({ id: this.$route.query.id }).then((res) => {
+          this.dataChange = res.data
+          this.DetailsOfProposal.txt.html(this.dataChange.joinTest)
+          if (this.dataChange.lateStatus === 1) {
+            this.lateStatusBtn1 = 'success'
+            this.lateStatusBtn = 'info'
+            this.lateStatus = 1
+            this.showDelay = false
+          } else {
+            this.lateStatusBtn1 = 'info'
+            this.lateStatusBtn = 'danger'
+            this.lateStatus = 2
+            this.showDelay = true
+          }
+          if (this.dataChange.configInfo !== '') {
+            this.configInBtn = 'success'
+            this.configInBtn1 = 'info'
+            this.configIn = 1
+            this.showApollo = true
+          } else {
+            this.configInBtn = 'info'
+            this.configInBtn1 = 'danger'
+            this.configIn = 2
+            this.showApollo = false
+          }
+          if (this.dataChange.dependentComponents !== '') {
+            this.dependentBtn = 'success'
+            this.dependentBtn1 = 'info'
+            this.dependent = 1
+            this.showRelyOn = true
+          } else {
+            this.dependentBtn = 'info'
+            this.dependentBtn1 = 'danger'
+            this.dependent = 2
+            this.showRelyOn = false
+          }
+        })
       }
     },
     getQueryData(ele) {
@@ -268,9 +273,6 @@ export default {
         }
       })
     },
-    getRouterData1() {
-      this.DetailsOfProposal.txt.html(this.dataChange.joinTest)
-    },
     open(ele) {
       this.$confirm('是否放弃修改,离开页面?', '确认信息', {
         distinguishCancelAndClose: true,
@@ -330,7 +332,7 @@ export default {
     },
 
     clickPreview(ele) {
-      this.$router.push({ path: '/Platform/presentation/acceptTheReport', query: { data: ele }})
+      this.$router.push({ path: '/Platform/presentation/acceptTheReport', query: { id: this.$route.query.id }})
     }
   }
 }

+ 30 - 31
src/views/Platform/presentation/presentationReport.vue

@@ -1,5 +1,4 @@
 <template>
-
   <!-- 提测报告,新增服务端报告 -->
   <div class="eleStyle">
     <div style="height:100%;width:94%; background:#ffffff; margin: 3%; border-radius: 8px; overflow: hidden;">
@@ -111,6 +110,7 @@
 <script>
 import { launchTestUpdate, launchTestCreate } from '@/api/InterfaceReport'
 import E from 'wangeditor'
+import { launchTest } from '@/api/testPresentetion'
 
 export default {
   name: 'PresentationReport',
@@ -177,7 +177,6 @@ export default {
 
     this.editorContent.txt.html(`<p></p><table width="100%"><colgroup><col width="30%"><col width="30%"><col width="30%"></colgroup><thead><tr><th>联调模块</th><th>联调RD</th><th>联调结果</th></tr></thead><tbody><tr><td><br></td><td><br></td><td><br></td></tr><tr><td><br></td><td><br></td><td><br></td></tr></tbody></table><p></p>`)
     this.DetailsOfProposal.txt.html(`<p></p><table width="100%"><colgroup><col width="30%"><col width="30%"><col width="30%"></colgroup><thead><tr><th>提测模块</th><th>提测分支</th><th>对应RD</th></tr></thead><tbody><tr><td><br></td><td><br></td><td><br></td></tr><tr><td><br></td><td><br></td><td><br></td></tr></tbody></table><p></p>`)
-    this.getRouterData1()
   },
   methods: {
     getRouterData() {
@@ -190,36 +189,36 @@ export default {
       if (this.$route.query.data) {
         this.showButton1 = true
         this.showButton = false
-        this.fromDev = this.$route.query.data
-        if (this.fromDev.lateReason !== '') {
-          this.lateStatusBtn1 = 'info'
-          this.lateStatusBtn = 'danger'
-          this.lateStatus = 2
-          this.showDelay = true
-        } else {
-          this.lateStatusBtn1 = 'success'
-          this.lateStatusBtn = 'info'
-          this.lateStatus = 1
-          this.showDelay = false
-        }
-        if (this.fromDev.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.fromDev, 'safeInfo', '')
-        }
+        launchTest({ id: this.$route.query.id }).then((res) => {
+          this.fromDev = res.data
+          if (this.fromDev.lateReason !== '') {
+            this.lateStatusBtn1 = 'info'
+            this.lateStatusBtn = 'danger'
+            this.lateStatus = 2
+            this.showDelay = true
+          } else {
+            this.lateStatusBtn1 = 'success'
+            this.lateStatusBtn = 'info'
+            this.lateStatus = 1
+            this.showDelay = false
+          }
+          if (this.fromDev.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.fromDev, 'safeInfo', '')
+          }
+          this.editorContent.txt.html(this.fromDev.joinTest)
+          this.DetailsOfProposal.txt.html(this.fromDev.moduleInfo)
+        })
       }
     },
-    getRouterData1() {
-      this.editorContent.txt.html(this.fromDev.joinTest)
-      this.DetailsOfProposal.txt.html(this.fromDev.moduleInfo)
-    },
     getQueryData(ele) {
       this.fromDev = ele
       typeof (this.editorContent) === 'string' ? this.fromDev.joinTest = this.editorContent : ''
@@ -302,7 +301,7 @@ export default {
     },
 
     clickPreview(ele) {
-      this.$router.push({ path: '/Platform/presentation/acceptTheReport', query: { data: ele }})
+      this.$router.push({ path: '/Platform/presentation/acceptTheReport', query: { id: this.$route.query.id }})
     }
   }
 }