From 0ecbc30a8d0ff83d171f26672b76da01337533f8 Mon Sep 17 00:00:00 2001 From: Tcsm <1377977403@qq.com> Date: 星期三, 03 五月 2023 17:48:22 +0800 Subject: [PATCH] 增加家根网页面 --- ruoyi-ui/src/views/bignote/familyeventInfo.vue | 72 +++++++++++++++++++++++++++++++---- 1 files changed, 63 insertions(+), 9 deletions(-) diff --git a/ruoyi-ui/src/views/bignote/familyeventInfo.vue b/ruoyi-ui/src/views/bignote/familyeventInfo.vue index 5b3fae8..70e548e 100644 --- a/ruoyi-ui/src/views/bignote/familyeventInfo.vue +++ b/ruoyi-ui/src/views/bignote/familyeventInfo.vue @@ -91,17 +91,48 @@ :file-list="fileListOther" class="upload-demo" multiple - :on-preview="handlePreview" - + list-type="picture-card" + :on-preview="handleFileCardPreview" :on-remove="handleRemove" :http-request="requestUpload" :show-file-list="true" > - <el-button type="primary">Click to upload</el-button> - <template #tip> - <div class="el-upload__tip"> + + <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 + class="el-upload-list__item-preview" + @click="handleFileCardPreview(file)" + > + <i class="el-icon-zoom-in"></i> + </span> + <span +v-if="!disabled" + @click="handleRemove(file)" + class="el-upload-list__item-delete" + + > + <i class="el-icon-download"></i> + </span> + <span + v-if="!disabled" + class="el-upload-list__item-delete" + @click="handleRemove(file)" + > + <i class="el-icon-delete"></i> + </span> + </span> + + </div> - </template> </el-upload> @@ -114,8 +145,14 @@ <el-dialog :visible.sync="dialogVisible"> <img w-full :src="dialogImageUrl" alt="Preview Image" /> </el-dialog> + + <el-dialog :visible.sync="dialogFileVisible"> + <a :href="desurl">鏄剧ず</a> + <iframe :src="desurl"</iframe> + </el-dialog> </div> </template> + <script> import {getFamilyeventInfo, updateFamilyevent, uploadPic, download} from "@/api/bignote/index"; import {addRole, updateRole} from "@/api/system/role"; @@ -130,7 +167,7 @@ return { cdi:"瀹跺涵澶т簨璁颁俊鎭�", udi:"瀹跺涵澶т簨璁颁慨鏀�", - fot:[".jpg",".jif"], + fot:[".jpg",".jif",".png"], fileList:[ ], fileListOther:[ @@ -148,7 +185,10 @@ remark: undefined, url: undefined, }, + desurl:'', dialogImageUrl: '', + dialogFileUrl: '', + dialogFileVisible:false, dialogVisible: false, disabled: false, rules: { @@ -298,10 +338,24 @@ }) }, handleRemoveFile(file) { - alert(23) + for(let i = 0; i < this.fileListOther.length; i++) + { + if(this.fileListOther[i].url==file.url) + this.$delete(this.fileListOther,i); + } }, handleRemove(file) { - alert(323) + for(let i = 0; i < this.fileList.length; i++) + { + if(this.fileList[i].url==file.url) + this.$delete(this.fileList,i); + } + }, + 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; -- Gitblit v1.9.1