From 251cc3290959d2085aa3359d6f74d97db914d182 Mon Sep 17 00:00:00 2001
From: Tcsm <1377977403@qq.com>
Date: 星期日, 22 十月 2023 00:44:22 +0800
Subject: [PATCH] 修改了表格的行高,以及数据过长的部分用省略号表示

---
 ruoyi-ui/src/views/bignote/index.vue |  145 +++++++++++++++++++++++++++++------------------
 1 files changed, 89 insertions(+), 56 deletions(-)

diff --git a/ruoyi-ui/src/views/bignote/index.vue b/ruoyi-ui/src/views/bignote/index.vue
index 42ae195..e86cf8a 100644
--- a/ruoyi-ui/src/views/bignote/index.vue
+++ b/ruoyi-ui/src/views/bignote/index.vue
@@ -147,14 +147,16 @@
     <el-table v-loading="loading"  :data="familyList" :row-key="getRowId" ref="multipleTable" @selection-change="handleSelectionChange"  :row-class-name="tableRowClassName">
       <el-table-column type="selection"  :reserve-selection="true" width="55"  align="center" />
 
-      <el-table-column  label="搴忓彿" sortable type="index" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" width="80px"/>
+      <el-table-column fixed label="搴忓彿" sortable type="index" :index="(queryParams.pageNum-1)*queryParams.pageSize+1" width="80px"/>
       <el-table-column label="鍙戠敓鏃堕棿" prop="happenTime" sortable width="200px" align="center">
         <template slot-scope="scope">{{scope.row.happenTime? scope.row.happenTime: '鈥斺�斺�斺��'}}</template>
       </el-table-column>
       <el-table-column label="浜虹墿" prop="people" sortable width="150px" />
       <el-table-column label="鍦扮偣" prop="address" sortable width="150px" />
       <el-table-column label="澶т簨鏍囬" prop="title" sortable :show-overflow-tooltip="true" width="150px" />
-
+      <el-table-column label="鏄惁鏄湰瀹跺涵璁板綍" prop="ownData" sortable width="150px" >
+        <template slot-scope="scope">{{scope.row.ownData === 0 ? '鍚�': '鏄�'}}</template>
+      </el-table-column>
       <el-table-column label="澶囨敞" prop="remark" sortable width="150px" >
         <template slot-scope="scope">{{scope.row.remark? scope.row.remark: '鈥斺�斺�斺��'}}</template>
       </el-table-column>
@@ -235,11 +237,9 @@
         </el-form-item>
 
         <el-form-item label="鍙戠敓鏃堕棿" prop="happenTime">
-          <el-input
-            v-model='formDat.happenTime'
-            type='date'
-            placeholder='閫夋嫨鏃ユ湡'
-          ></el-input>
+          <el-date-picker v-model="formData.happenTime" type="date" placeholder="璇烽�夋嫨鏃ユ湡"
+                          :editable="false" :clearable="false" :style="{width: '100%'}"  value-format="yyyy-MM-dd"
+          ></el-date-picker>
         </el-form-item>
         <el-form-item label="澶囨敞" prop="remark">
           <el-input v-model="formDat.remark" placeholder="璇疯緭鍏ュ娉�" clearable :style="{width: '100%'}" ></el-input>
@@ -248,40 +248,39 @@
         <h4 class="form-header">鐩稿叧鍥剧墖 </h4>
         <el-upload
           action="#"
+          accept="image/jpeg, image/png,image/jpg, image/WMF,image/gif"
           list-type="picture-card"
           multiple
           :http-request="requestUpload"
           :file-list="fileList"
         >
-
-          <i  slot="default" class="el-icon-plus"></i>
-          <div slot="file" slot-scope="{file}">
-            <img
-              class="el-upload-list__item-thumbnail"
-              :src="file.url"
-              alt=""
-              style="width: 126px; height: 126px"
-              fit="cover"
-              :preview-src-list="[file.url]"
-            >
+          <i slot="default" class="el-icon-plus"></i>
+          <div slot="file" slot-scope="{ file }">
+            <template v-if="fileList">
+              <img
+                class="el-upload-list__item-thumbnail"
+                :src="file.url"
+                alt=""
+                style="width: 100%; height: 100%; object-fit: cover;"
+                fit="cover"
+                :preview-src-list="[file.url]"
+              >
+            </template>
             <span class="el-upload-list__item-actions">
-          <span
-            class="el-upload-list__item-preview"
-            @click="handlePictureCardPreview(file)"
-          >
-            <i class="el-icon-zoom-in"></i>
-          </span>
-
-          <span
-            v-if="!disabled"
-            class="el-upload-list__item-delete"
-            @click="handleRemove(file)"
-          >
-            <i class="el-icon-delete"></i>
-          </span>
-        </span>
-
-
+      <span
+        class="el-upload-list__item-preview"
+        @click="handlePictureCardPreview(file)"
+      >
+        <i class="el-icon-zoom-in"></i>
+      </span>
+      <span
+        v-if="!disabled"
+        class="el-upload-list__item-delete"
+        @click="handleRemove(file)"
+      >
+        <i class="el-icon-delete"></i>
+      </span>
+    </span>
           </div>
         </el-upload>
         <h4 class="form-header">鍏朵粬闄勪欢 </h4>
@@ -292,7 +291,7 @@
           multiple
 
           :on-remove="handleRemoveFile"
-          :http-request="requestUpload"
+          :http-request="requestUpload1"
           :show-file-list="true"
         >
 
@@ -367,7 +366,8 @@
       // 鏃ユ湡鑼冨洿
       dateRange: [],
       // 鏁版嵁鑼冨洿閫夐」
-      fot:[".jpg",".jif"],
+      fot:['.bmp','.jpg','.jpeg','.png','.tif','.gif','.pcx','.tga','.exif','.fpx',
+        '.svg','.psd','.cdr','.pcd','.dxf','.ufo','.eps','.ai','.aw','.WMF','.webp','.apng'],
       fileList:[],
       fileListOther:[],
       dsb:true,
@@ -442,6 +442,13 @@
 
   },
   methods: {
+
+    isImage(fileType) {
+      return fileType.startsWith('image/');
+    },
+    isInFot(fileName) {
+      return this.fot.includes(fileName);
+    },
     // 鍙栨秷鎸夐挳
     cancelData() {
       this.open = false;
@@ -551,7 +558,7 @@
     /** 淇敼鎸夐挳鎿嶄綔 */
     handleUpdate(row) {
       const id = row.id;
-      let jd = true
+      let jd = true;
 
       this.$router.push({
         path:"/familymodel/bignote/familyeventInfo/" + id,
@@ -566,6 +573,7 @@
       {
         if(this.fileList[i].url==file.url)
           this.$delete(this.fileList,i);
+
       }
     },
     handleRemoveFile(file) {
@@ -595,23 +603,47 @@
           addFamilyevent(this.formDat).then(response => {
             this.$modal.msgSuccess("鏂板鎴愬姛");
             this.open = false;
+            // 娓呯┖formDat瀵硅薄鐨勬暟鎹�
+            Object.keys(this.formDat).forEach(key => {
+              this.formDat[key] = '';
+            });
+            for(let i = 0; i <= this.fileList.length; i++)
+            {
+              this.handleRemove(this.fileList[0]);
+            }
+            for(let i = 0; i < this.fileListOther.length; i++){
+              this.handleRemoveFile(this.fileListOther[0]);
+            }
             this.getList();
           });
         }
       });
-      // 娓呯┖formDat瀵硅薄鐨勬暟鎹�
-      Object.keys(this.formDat).forEach(key => {
-        this.formDat[key] = '';
-      });
-      for(let i = 0; i <= this.fileList.length; i++)
-      {
-        this.handleRemove(this.fileList[0]);
-      }
-      for(let i = 0; i < this.fileListOther.length; i++){
-        this.handleRemoveFile(this.fileListOther[0]);
-      }
+
     },
-    requestUpload(params)
+    requestUpload(params) {
+
+      var file = params.file;
+      var formData = new FormData();
+      formData.append('uploadFile', file);
+      let _this = this
+      this.uploading1 = true;
+      uploadPic(formData).then(response => {
+        let pth = response.data.originalFilename.substr(response.data.originalFilename.length-4, response.data.originalFilename.length)
+        this.uploading1 = false;
+        this.$modal.msgSuccess("涓婁紶鎴愬姛");
+        if(_this.fot.includes(pth) === true)
+        {
+          _this.fileList.push({name:response.data.fileName, "url":response.data.url})
+
+        }
+
+        else{
+          // _this.fileListOther.push({name:response.data.fileName, url:response.data.url})
+
+        }
+      })
+    },
+    requestUpload1(params)
     {
       var file = params.file;
       var formData = new FormData();
@@ -622,16 +654,17 @@
         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)
+        if(_this.fot.includes(pth) !== true)
         {
-          _this.fileList.push({name:response.data.fileName, "url":response.data.url})
-
-        }
-
-        else{
+          // _this.fileList.push({name:response.data.fileName, "url":response.data.url})
           _this.fileListOther.push({name:response.data.fileName, url:response.data.url})
 
         }
+
+        // else{
+        //   _this.fileListOther.push({name:response.data.fileName, url:response.data.url})
+        //
+        // }
       })
 
     },

--
Gitblit v1.9.1