소스 검색

Merge branch 'http_mock' into http_test

qinzhipeng_v@didiglobal.com 4 년 전
부모
커밋
cf0b893afd
2개의 변경된 파일35개의 추가작업 그리고 8개의 파일을 삭제
  1. 21 7
      src/views/reportManagement/Testing/components/deliverDetails.vue
  2. 14 1
      src/views/reportManagement/components/TestingReport.vue

+ 21 - 7
src/views/reportManagement/Testing/components/deliverDetails.vue

@@ -12,7 +12,7 @@
           <span v-if="details.status === 0 ? true : false" class="didi-hover" @click="report_click(3,details)">发送</span>
           <span v-if="details.status === 0 ? true : false" style="margin: 0 30px;" class="didi-hover" @click="report_click(2,details)">编辑</span>
           <span v-if="details.status === 0 ? true : false" class="didi-hover" @click="dialog_testData = true, AsTp = '删除'">删除</span>
-          <span v-if="details.status === 2 ? true : false" class="didi-hover" @click="report_click(2,details)">重新提测</span>
+          <span v-if="details.status === 2 ? true : false" class="didi-hover" @click="report_click(1, details)">重新提测</span>
         </div>
       </div>
     </el-header>
@@ -168,7 +168,7 @@
 import { EncryptId, analysisBizId_id } from '@/utils/crypto-js.js'
 import { mapGetters } from 'vuex'
 import '@/styles/PublicStyle/index.scss'
-import { reportdelivertestGetReportById, reportreleaseDelete, reportdelivertestGetRequiresByTaskIds, reportdelivertestUpdate } from '@/api/reportTemplate'
+import { reportdelivertestGetReportById, reportreleaseDelete, reportdelivertestGetRequiresByTaskIds, reportdelivertestUpdate, reportdelivertestCheckStatus } from '@/api/reportTemplate'
 import TestingReport from '@/views/reportManagement/components/TestingReport' // 提测
 export default {
   components: {
@@ -219,11 +219,25 @@ export default {
     },
 
     report_click(e, data) { // 提测报告
-      this.report_data = data
-      this.dialogDaily = true
-      this.$nextTick(() => {
-        this.$refs.DailyReport.init(e, data)
-      })
+      if (e === 1) {
+        reportdelivertestCheckStatus(data.taskIds).then(response => {
+          if (response.code === 200) {
+            this.report_data = data
+            this.dialogDaily = true
+            this.$nextTick(() => {
+              this.$refs.DailyReport.init(e, data)
+            })
+          } else {
+            return false
+          }
+        })
+      } else {
+        this.report_data = data
+        this.dialogDaily = true
+        this.$nextTick(() => {
+          this.$refs.DailyReport.init(e, data)
+        })
+      }
     },
     async deleteDaily() { // 删除提测报告
       if (this.AsTp === '打回' || this.AsTp === '通过') {

+ 14 - 1
src/views/reportManagement/components/TestingReport.vue

@@ -129,6 +129,20 @@ export default {
     init(index, newData) {
       this.dialogDaliy = true
       switch (index) {
+        case 1: // 编辑
+          reportdelivertestGetReportById(newData.id).then(res => {
+            if (res.code === 200) {
+              this.fromData.radio = res.data // 选择的模块
+              this.daily_taskIds = null// 关联任务
+              this.reportHome = true // 步骤条
+              this.active = 2 // 步骤条状态第三步
+              this.showOne = false // 隐藏第一步
+              this.newDailyTemplate = true // 隐藏第二步
+              this.dailyPreview = false // 展示第三部
+              this.updateDaily = false // 编辑
+            }
+          })
+          break
         case 2: // 编辑
           reportdelivertestGetReportById(newData.id).then(res => {
             if (res.code === 200) {
@@ -142,7 +156,6 @@ export default {
               this.updateDaily = true // 编辑
             }
           })
-
           break
         case 4: // 重新提测
           reportdelivertestGetReportById(newData.id).then(res => {