From 6afb98b81fa4b4b3223d53d42a891fb89862d38b Mon Sep 17 00:00:00 2001
From: Tcsm <1377977403@qq.com>
Date: 星期一, 14 八月 2023 16:36:29 +0800
Subject: [PATCH] 新增家谱图,完善各模块新增时的电子文件上传功能,在上传期间显示正在上传

---
 ruoyi-ui/src/views/wish/wishInfo.vue |   25 ++++++++++++++-----------
 1 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/ruoyi-ui/src/views/wish/wishInfo.vue b/ruoyi-ui/src/views/wish/wishInfo.vue
index db76db6..9cbd3f8 100644
--- a/ruoyi-ui/src/views/wish/wishInfo.vue
+++ b/ruoyi-ui/src/views/wish/wishInfo.vue
@@ -58,7 +58,7 @@
             </el-cow>
             <el-cow >
               <el-form-item label="鏄惁渚濇棫鏈夋晥" prop="isEffective" label-width="100px" style="background: #FAD1E0;border-radius: 7px 7px 7px 7px;opacity: 1;">
-                <el-select v-model="formData.isEffective" placeholder="璇烽�夋嫨鏄惁渚濇棫鏈夋晥" clearable :style="{width: '100%'}"  >
+                <el-select v-model="formData.isEffective" placeholder="璇烽�夋嫨鏄惁渚濇棫鏈夋晥" clearable :style="{width: '100%'}"  :disabled="dsb">
                   <el-option v-for="(item, index) in typeOptions" :key="index" :label="item.label" :value="item.value"
                   ></el-option>
                 </el-select>
@@ -79,7 +79,8 @@
           :http-request="requestUpload"
           :file-list="fileList"
         >
-          <i slot="default" class="el-icon-plus"></i>
+          <div v-if="uploading" class="upload-status">姝e湪涓婁紶...</div>
+          <i v-if="!uploading" slot="default" class="el-icon-plus"></i>
           <div slot="file" slot-scope="{file}">
             <img
               class="el-upload-list__item-thumbnail"
@@ -91,14 +92,14 @@
             >
             <span class="el-upload-list__item-actions" >
             <span
-              v-if="isShow"
+
               class="el-upload-list__item-preview"
               @click="handlePictureCardPreview(file)"
             >
               <i class="el-icon-zoom-in"></i>
             </span>
             <span
-              v-if="isShow"
+
               class="el-upload-list__item-delete"
               @click="handleDownload(file.url)"
             >
@@ -129,8 +130,8 @@
           :http-request="requestUpload"
           :show-file-list="true"
         >
-
-          <i slot="default" class="el-icon-plus"></i>
+          <div v-if="uploading" class="upload-status">姝e湪涓婁紶...</div>
+          <i v-if="!uploading" slot="default" class="el-icon-plus"></i>
           <div slot="file" slot-scope="{file}">
             <img
               class="el-upload-list__item-thumbnail"
@@ -140,14 +141,14 @@
               fit="cover"
             >
             <span class="el-upload-list__item-actions">
-                    <span v-if="isShow"
+                    <span
                           class="el-upload-list__item-preview"
                           @click="handleFileCardPreview(file)"
                     >
                       <i class="el-icon-zoom-in"></i>
                     </span>
                     <span
-                      v-if="isShow"
+
                       class="el-upload-list__item-delete"
                       @click="handleDownload(file.url)"
                     >
@@ -205,6 +206,7 @@
       dsb:true,
       btn:false,
       isShow:true,
+      uploading: false,
       // 鐧惧勾蹇冩効琛ㄦ牸鏁版嵁
       wishList: [],
 
@@ -288,7 +290,7 @@
     else{
       document.title = "鐧惧勾蹇冩効璇︾粏淇℃伅";
       this.$route.meta.title = "鐧惧勾蹇冩効璇︾粏淇℃伅";//鍒楄〃鐨勫悕绉�
-      this.isShow=true
+      this.isShow=false
     }
 
     let _this = this
@@ -427,10 +429,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