qinzhipeng_v 5 years ago
parent
commit
a308945fde

+ 4 - 8
src/views/Platform/presentation/Templates/ClientReport.vue

@@ -52,7 +52,7 @@
       </div>
       <div align="center">
         <el-button size="small" type="primary" @click="gou_out()">上一步</el-button>
-        <el-button size="small" type="primary" @click="sendReport(form)">发送</el-button>
+        <el-button :disabled="send" :loading="send" size="small" type="primary" @click="sendReport(form)">发送</el-button>
       </div>
     </div>
   </el-dialog>
@@ -80,6 +80,7 @@ export default {
       Acceptance1: false,
       ClientAcceptance1: false,
       showTow: false,
+      send: false,
       showThree: false,
       Client: false,
       clienData: {},
@@ -224,13 +225,8 @@ export default {
     },
     sendReport(e) {
       if (e.name !== undefined) {
-        const loading = this.$loading({
-          lock: true,
-          text: '正在发送中...',
-          spinner: 'el-icon-loading',
-          background: 'rgba(0, 0, 0, 0.7)'
-        })
         const ele = this.report
+        this.send = true
         const targetDom = document.getElementById('resumeId1')
         const copyDom = targetDom.cloneNode(true)
         document.querySelector('body').appendChild(copyDom)
@@ -243,7 +239,7 @@ export default {
               res.code === 200 ? this.$message.success('发送测试报告成功') : this.$message.error('发送测试报告失败,请联系管理员!')
               this.handleClose()
               document.querySelector('body').removeChild(copyDom)
-              loading.close()
+              this.send = false
             })
           })
         }, 500)

+ 1 - 8
src/views/Platform/presentation/Templates/DailyReport.vue

@@ -45,7 +45,7 @@
       </div>
       <div align="center">
         <el-button size="small" type="primary" @click="gou_out()">上一步</el-button>
-        <el-button :disabled="send" size="small" type="primary" @click="sendReport(form)">发送</el-button>
+        <el-button :disabled="send" :loading="send" size="small" type="primary" @click="sendReport(form)">发送</el-button>
       </div>
     </div>
   </el-dialog>
@@ -170,12 +170,6 @@ export default {
     sendReport(e) {
       if (e.name !== undefined) {
         this.send = true
-        const loading = this.$loading({
-          lock: true,
-          text: '正在发送中...',
-          spinner: 'el-icon-loading',
-          background: 'rgba(0, 0, 0, 0.7)'
-        })
         var ele = this.preview
         setTimeout(() => {
           // const targetDom = document.getElementById('Gambol')
@@ -190,7 +184,6 @@ export default {
               this.send = false
               this.handleClose()
               // document.querySelector('body').removeChild(copyDom)
-              loading.close()
             })
           })
         }, 500)

+ 1 - 8
src/views/Platform/presentation/Templates/TestReport.vue

@@ -54,7 +54,7 @@
       </div>
       <div align="center">
         <el-button size="small" type="primary" @click="gou_out()">上一步</el-button>
-        <el-button size="small" :disabled="send" type="primary" @click="sendReport(form)">发送</el-button>
+        <el-button size="small" :disabled="send" :loading="send" type="primary" @click="sendReport(form)">发送</el-button>
       </div>
     </div>
   </el-dialog>
@@ -218,12 +218,6 @@ export default {
     sendReport(e) {
       if (e.name !== undefined) {
         this.send = true
-        const loading = this.$loading({
-          lock: true,
-          text: '正在发送中...',
-          spinner: 'el-icon-loading',
-          background: 'rgba(0, 0, 0, 0.7)'
-        })
         const ele = this.preview
         const targetDom = document.getElementById('resumeId')
         const copyDom = targetDom.cloneNode(true)
@@ -238,7 +232,6 @@ export default {
               this.handleClose1()
               this.send = false
               document.querySelector('body').removeChild(copyDom)
-              loading.close()
             })
           })
         }, 500)

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

@@ -316,7 +316,7 @@ export default {
         switch (this.ins) {
           case 1:
             if (taskData.status !== 3) {
-              this.$message({ message: '存在状态不是【测试中】的任务,请将任务状态为【测试中】才可准出,请检查!', type: 'warning' })
+              this.$message({ message: '存在状态不是【测试中】的任务,请将任务状态为【测试中】才可测试,请检查!', type: 'warning' })
             } else {
               this.dialogDaily = true
               this.$nextTick(() => {

+ 2 - 2
src/views/projectManage/taskList/taskViewDetails.vue

@@ -1070,7 +1070,7 @@ export default {
       switch (e) {
         case 1: // 提测
           if (this.task_form.statusString !== '开发中') {
-            this.$message({ message: '存在状态不是【开发中】的任务,请将任务状态为【开发中】才可测,请检查!', type: 'warning' })
+            this.$message({ message: '存在状态不是【开发中】的任务,请将任务状态为【开发中】才可测,请检查!', type: 'warning' })
           } else {
             this.dialogVisible1 = true
             this.$nextTick(() => { this.$refs.TestReport.init(1, ele) })
@@ -1078,7 +1078,7 @@ export default {
           break
         case 2: // 日报
           if (this.task_form.statusString !== '测试中') {
-            this.$message({ message: '存在状态不是【测试中】的任务,请将任务状态为【测试中】才可准出,请检查!', type: 'warning' })
+            this.$message({ message: '存在状态不是【测试中】的任务,请将任务状态为【测试中】才可测试,请检查!', type: 'warning' })
           } else {
             this.dialogDaily = true
             this.$nextTick(() => { this.$refs.DailyReport.init(1) })