From b2f9340443b60b9f3912bdab6a1daa8f61471c02 Mon Sep 17 00:00:00 2001
From: linwenling <3256558519@qq.com>
Date: 星期二, 16 五月 2023 03:24:16 +0800
Subject: [PATCH] 修改家庭收支台账bug

---
 ruoyi-ui/src/views/collection/collectionInfo.vue |   75 +++++++++++++++++++++++++++++++++----
 1 files changed, 67 insertions(+), 8 deletions(-)

diff --git a/ruoyi-ui/src/views/collection/collectionInfo.vue b/ruoyi-ui/src/views/collection/collectionInfo.vue
index e5b1c68..db41a4d 100644
--- a/ruoyi-ui/src/views/collection/collectionInfo.vue
+++ b/ruoyi-ui/src/views/collection/collectionInfo.vue
@@ -2,7 +2,7 @@
   <div class="app-container">
     <div class="form-header mt">
       <h4 class="dt h4">鏀惰棌涓庤崳瑾夎缁嗕俊鎭� </h4>
-      <el-button v-if="isShow" type="primary" class="pt"  icon="el-icon-edit" @click="handleEdit()" >缂栬緫</el-button>
+<!--      <el-button v-if="isShow" type="primary" class="pt"  icon="el-icon-edit" @click="handleEdit()" >缂栬緫</el-button>-->
       <!--      <br>-->
       <!--      <el-button type="primary" class="pt"   @click="handleExport"-->
       <!--                 v-hasPermi="['self:user:export']" >瀵煎嚭</el-button>-->
@@ -14,7 +14,7 @@
       <!--                  clearable prefix-icon='el-icon-mobile' :style="{width: '100%'}"></el-input>-->
       <!--      </el-form-item>-->
       <el-form-item label="鑾峰緱鏃堕棿" prop="happenTime">
-        <el-input v-model="formData.type" placeholder="璇疯緭鍏ヨ幏寰楁椂闂�" clearable :style="{width: '100%'}" :disabled="dsb">
+        <el-input v-model="formData.happenTime" placeholder="璇疯緭鍏ヨ幏寰楁椂闂�" clearable :style="{width: '100%'}" :disabled="dsb">
         </el-input>
       </el-form-item>
       <el-form-item label="绫诲埆" prop="type">
@@ -64,22 +64,23 @@
             fit="cover"
             :preview-src-list="[file.url]"
           >
-          <span class="el-upload-list__item-actions">
+          <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="!disabled"
+          v-if="isShow"
           class="el-upload-list__item-delete"
           @click="handleDownload(file.url)"
         >
           <i class="el-icon-download"></i>
         </span>
         <span
-          v-if="!disabled"
+          v-if="isShow"
           class="el-upload-list__item-delete"
           @click="handleRemove(file)"
         >
@@ -91,7 +92,7 @@
         </div>
       </el-upload>
 
-      <h4 class="form-header">鍏朵粬闄勪欢 </h4>
+      <!--<h4 class="form-header">鍏朵粬闄勪欢 </h4>
       <el-upload
         action=""
         :file-list="fileListOther"
@@ -103,17 +104,68 @@
         :http-request="requestUpload"
         :show-file-list="true"
       >
-        <el-button type="primary">鐐瑰嚮涓婁紶</el-button>
+        <el-button v-if="isShow" type="primary" >鐐瑰嚮涓婁紶</el-button>
         <template #tip>
           <div class="el-upload__tip">
           </div>
         </template>
 
 
+      </el-upload>-->
+      <h4 class="form-header">鍏朵粬闄勪欢 </h4>
+      <el-upload
+        action=""
+        :file-list="fileListOther"
+        class="upload-demo"
+        multiple
+        list-type="picture-card"
+        :on-preview="handleFileCardPreview"
+        :on-remove="handleRemove"
+        :http-request="requestUpload"
+        :show-file-list="true"
+      >
+
+        <i slot="default" class="el-icon-plus"></i>
+        <div slot="file" slot-scope="{file}">
+          <img
+            class="el-upload-list__item-thumbnail"
+            src="../../assets/401_images/401.gif"
+            alt=""
+            style="width: 147px; height: 147px"
+            fit="cover"
+          >
+          <span class="el-upload-list__item-actions">
+                <span v-if="isShow"
+                  class="el-upload-list__item-preview"
+                  @click="handleFileCardPreview(file)"
+                >
+                  <i class="el-icon-zoom-in"></i>
+                </span>
+                <span
+                  v-if="isShow"
+                  @click="handleRemove(file)"
+                  class="el-upload-list__item-delete"
+
+                >
+                  <i class="el-icon-download"></i>
+                </span>
+                <span
+                  v-if="isShow"
+                  class="el-upload-list__item-delete"
+                  @click="handleRemoveFile(file)"
+                >
+                  <i class="el-icon-delete"></i>
+                </span>
+              </span>
+
+
+        </div>
+
+
       </el-upload>
 
       <el-form-item size="large">
-        <el-button type="primary" @click="submitForm" :disabled="dsb" >淇敼</el-button>
+        <el-button v-if="isShow" type="primary" @click="submitForm" :disabled="dsb" >淇敼</el-button>
       </el-form-item>
     </el-form>
 
@@ -228,6 +280,7 @@
     else{
       document.title = "鏌ョ湅鏀惰棌涓庤崳瑾夎缁嗕俊鎭�";
       this.$route.meta.title = "鏌ョ湅鏀惰棌涓庤崳瑾夎缁嗕俊鎭�";//鍒楄〃鐨勫悕绉�
+      this.isShow=false
     }
 
     let _this = this
@@ -319,6 +372,12 @@
     handleRemove(file) {
       alert(323)
     },
+    handleFileCardPreview(file){
+      this.dialogFileUrl = file.url;
+      const Base64 = require('js-base64').Base64
+      this.desurl = process.env.VUE_APP_BASE_OTHER_API+'onlinePreview?url='+encodeURIComponent(Base64.encode(this.dialogFileUrl));
+      myWindow=window.open(this.desurl,'','width=1200,height=800,top=150,left=300');
+    },
     handlePictureCardPreview(file) {
       this.dialogImageUrl = file.url;
       this.dialogVisible = true;

--
Gitblit v1.9.1