From 0edf2cc107cd03e8e007f97f38387d66f480cd3d Mon Sep 17 00:00:00 2001 From: linwenling <3256558519@qq.com> Date: 星期二, 26 九月 2023 16:54:53 +0800 Subject: [PATCH] 修改家大事记 的图片文件上传 直调接口 --- ruoyi-ui/src/views/healthy/healthyInfo.vue | 40 +++++++++++++++++++++++++--------------- 1 files changed, 25 insertions(+), 15 deletions(-) diff --git a/ruoyi-ui/src/views/healthy/healthyInfo.vue b/ruoyi-ui/src/views/healthy/healthyInfo.vue index 7a634b1..23bcdbc 100644 --- a/ruoyi-ui/src/views/healthy/healthyInfo.vue +++ b/ruoyi-ui/src/views/healthy/healthyInfo.vue @@ -1,8 +1,15 @@ <template> - <div class="app-container"> + <div class="app-container" id="printable-content"> <div class="form-header mt"> - <h4 class="dt h4">鍋ュ悍璇︾粏淇℃伅 </h4> - + <h1 style="font-size:21px;padding-top:30px;display: flex;justify-content: space-between;align-items: center;" > + <span>鍋ュ悍璁板綍璇︾粏淇℃伅</span> + <div style="display: flex; align-items: center;"> + <el-button size="mini" type="text" v-print="'#printable-content'" v-hasPermi="['person:information:memo']"> + <div class="form" ><el-icon style="padding-right:100px;"></el-icon> + <span class="text" style="width: 69px;height: 26px;font-size: 16px; + font-family: Microsoft YaHei-Regular, Microsoft YaHei; color: #EBA4AA;">鎵撳嵃</span></div> + </el-button></div> + </h1> </div> <el-form ref="elForm" :model="formData" :rules="rules" size="medium" label-width="120px"> @@ -38,6 +45,8 @@ multiple :http-request="requestUpload" :file-list="fileList" + :disabled="!btn" + :class="{ hide: !btn }" > <div v-if="uploading" class="upload-status">姝e湪涓婁紶...</div> <i v-if="!uploading" slot="default" class="el-icon-plus"></i> @@ -89,6 +98,8 @@ :on-remove="handleRemoveFile" :http-request="requestUpload" :show-file-list="true" + :disabled="!btn" + :class="{ hide: !btn }" > <div v-if="uploading" class="upload-status">姝e湪涓婁紶...</div> <i v-if="!uploading" slot="default" class="el-icon-plus"></i> @@ -142,7 +153,7 @@ </div> </template> <script> -import {getHealthInfo, uploadPic, download, updateSecret} from "@/api/healthy/index"; +import {getHealthInfo, uploadPic, download, updateHealth} from "@/api/healthy/index"; import {addRole, updateRole} from "@/api/system/role"; import {blobValidate} from "@/utils/ruoyi"; import errorCode from "@/utils/errorCode"; @@ -169,7 +180,6 @@ type: undefined, happenTime: undefined, accNo:undefined, - validityDate:undefined, password:undefined, validityDate:undefined, isFinger:undefined, @@ -255,6 +265,7 @@ document.title = "鏌ョ湅鍋ュ悍璇︾粏淇℃伅"; this.$route.meta.title = "鏌ョ湅鍋ュ悍璇︾粏淇℃伅";//鍒楄〃鐨勫悕绉� this.isShow=false + this.btn = false; } let _this = this @@ -319,7 +330,7 @@ if (valid) { if (this.formData.id != undefined) { - updateSecret(this.formData).then(response => { + updateHealth(this.formData).then(response => { this.$modal.msgSuccess("淇敼鎴愬姛"); // this.open = false; this.btn=false @@ -379,7 +390,7 @@ download(formData).then(async (response) => { const isLogin = await blobValidate(response); let nt = new Date().getTime() - let filename = 'familyevent_'+nt+'.'+suffix + let filename = 'healthyInfo'+nt+'.'+suffix const blob = new Blob([response]) saveAs(blob, filename) }) @@ -387,7 +398,7 @@ handleEdit() { this.dsb = false - // this.btn = true + this.btn = true this.isShow=false }, requestUpload(params) @@ -415,13 +426,6 @@ }, - /** 瀵煎嚭鎸夐挳鎿嶄綔 */ - handleExport() { - this.download('/zfEconomy/export', { - ...this.queryParams - }, `zfEconomy_${new Date().getTime()}.xlsx`) - } - } } @@ -441,4 +445,10 @@ display: block; position: absolute; } +.hide .el-upload--picture-card { + display: none; +} +.form{ + background:center/11% no-repeat url('../../assets/icons/form.png') ; +} </style> -- Gitblit v1.9.1