Bläddra i källkod

发送报告-发送按钮添加loading

qinzhipeng_v@didiglobal.com 4 år sedan
förälder
incheckning
af003ba0d1

+ 4 - 1
src/views/reportManagement/components/DailyReport.vue

@@ -71,7 +71,7 @@
       <el-button v-if="newDailyTemplate" size="small" type="primary" @click="getCreateData">保存, 下一步</el-button>
       <!-- 第三步 -->
       <el-button v-if="dailyPreview" size="small" type="primary" @click="sendReportReturn">上一步</el-button>
-      <el-button v-if="dailyPreview" size="small" type="primary" @click="sendReport">发送</el-button>
+      <el-button v-if="dailyPreview" size="small" type="primary" :loading="loading" @click="sendReport">发送</el-button>
     </div>
 
   </el-dialog>
@@ -100,6 +100,7 @@ export default {
       fromData: {
         radio: 0
       },
+      loading: false,
       newDailyTemplate: false, // 新建日报模版
       reportTamplate: false, // new模版
       dailyPreview: false, // 日报预览
@@ -278,10 +279,12 @@ export default {
     },
 
     sendReport() { // 截图
+      this.loading = true
       this.$refs.dailyPreview.sendReport()
     },
 
     handleClose() {
+      this.loading = false
       this.dialogDaliy = false
       this.updateDaily = false
       this.showOne = false // 隐藏第一步

+ 4 - 1
src/views/reportManagement/components/ReleaseReport.vue

@@ -69,7 +69,7 @@
       <el-button v-if="newDailyTemplate" size="small" type="primary" @click="getCreateData">保存, 下一步</el-button>
       <!-- 第三步 -->
       <el-button v-if="dailyPreview" size="small" type="primary" @click="sendReportReturn">上一步</el-button>
-      <el-button v-if="dailyPreview" size="small" type="primary" @click="sendReport">发送</el-button>
+      <el-button v-if="dailyPreview" size="small" type="primary" :loading="loading" @click="sendReport">发送</el-button>
     </div>
 
   </el-dialog>
@@ -95,6 +95,7 @@ export default {
       modelId: '', // 下一步选择的模版id
       selectTemplate: [],
       tipName: '创建',
+      loading: false,
       fromData: {
         radio: 0
       },
@@ -260,10 +261,12 @@ export default {
     },
 
     sendReport() { // 截图
+      this.loading = true
       this.$refs.dailyPreview.sendReport()
     },
 
     handleClose() {
+      this.loading = false
       this.dialogDaliy = false
       this.updateDaily = false
       this.showOne = false // 隐藏第一步

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

@@ -69,7 +69,7 @@
       <el-button v-if="newDailyTemplate" size="small" type="primary" @click="getCreateData">保存, 下一步</el-button>
       <!-- 第三步 -->
       <el-button v-if="dailyPreview" size="small" type="primary" @click="sendReportReturn">上一步</el-button>
-      <el-button v-if="dailyPreview" size="small" type="primary" @click="sendReport">发送</el-button>
+      <el-button v-if="dailyPreview" size="small" type="primary" :loading="loading" @click="sendReport">发送</el-button>
     </div>
 
   </el-dialog>
@@ -94,6 +94,7 @@ export default {
       modelId: '', // 下一步选择的模版id
       selectTemplate: [], // 模版option
       tipName: '创建',
+      loading: false,
       fromData: {
         radio: 1
       },
@@ -278,10 +279,12 @@ export default {
     },
 
     sendReport() { // 截图
+      this.loading = true
       this.$refs.dailyPreview.sendReport()
     },
 
     handleClose() {
+      this.loading = false
       this.dialogDaliy = false
       this.updateDaily = false
       this.reportTamplate = false