From 5d3e0be26b31f7d6d29b3281adcb201ec494a1c6 Mon Sep 17 00:00:00 2001
From: Tcsm <1377977403@qq.com>
Date: 星期二, 22 八月 2023 12:51:12 +0800
Subject: [PATCH] 新增不同时显示“正在上传”

---
 ruoyi-ui/src/views/pet/index.vue |   41 ++++++-----------------------------------
 1 files changed, 6 insertions(+), 35 deletions(-)

diff --git a/ruoyi-ui/src/views/pet/index.vue b/ruoyi-ui/src/views/pet/index.vue
index 94ecec1..9b5ea7e 100644
--- a/ruoyi-ui/src/views/pet/index.vue
+++ b/ruoyi-ui/src/views/pet/index.vue
@@ -78,40 +78,7 @@
           v-hasPermi="['system:role:remove']"
         >鍒犻櫎</el-button>
       </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="warning"
-          plain
-          icon="el-icon-download"
-          size="mini"
-          @click="handleExport"
-          v-hasPermi="['family:note:export']"
-        >瀵煎嚭</el-button>
-      </el-col>
 
-      <el-col :span="1.5">
-        <el-button
-          type="warning"
-          plain
-          icon="el-icon-download"
-          size="mini"
-          @click="handleExport"
-          v-hasPermi="['family:note:export']"
-        >瀵煎叆妯℃澘涓嬭浇</el-button>
-      </el-col>
-      <el-col :span="1.2">
-        <el-upload
-          action=""
-          class="upload-demo"
-          :show-file-list="false"
-          :http-request="handleEnport"
-        >
-          <el-button size="mini"   type="primary"
-                     plain
-                     icon="el-icon-plus" >瀵煎叆</el-button>
-
-        </el-upload>
-      </el-col>
 
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
@@ -260,6 +227,7 @@
           :http-request="requestUpload"
           :file-list="fileList"
         >
+<!--          <div v-if="uploading" class="upload-status">姝e湪涓婁紶...</div>-->
           <i slot="default" class="el-icon-plus"></i>
           <div slot="file" slot-scope="{file}">
             <img
@@ -298,6 +266,7 @@
           :http-request="requestUpload"
           :file-list="fileListOther"
         >
+<!--          <div v-if="uploading" class="upload-status">姝e湪涓婁紶...</div>-->
           <i slot="default" class="el-icon-plus"></i>
           <div slot="file" slot-scope="{file}">
             <img
@@ -397,6 +366,7 @@
       ],
       dsb:true,
       btn:false,
+      uploading: false,
       formDat: {
         type: undefined,
         name: undefined,
@@ -728,10 +698,11 @@
       var formData = new FormData();
       formData.append('uploadFile', file);
       let _this = this
-
+      this.uploading = true;
       uploadPic(formData).then(response => {
         let pth = response.data.originalFilename.substr(response.data.originalFilename.length-4, response.data.originalFilename.length)
-
+        this.uploading = false;
+        this.$modal.msgSuccess("涓婁紶鎴愬姛");
         if(_this.fot.includes(pth) === true)
         {
           _this.fileList.push({name:response.data.fileName, "url":response.data.url})

--
Gitblit v1.9.1