From d6ed1287fa23fa25eacf57c0d83d533cb2f2bc45 Mon Sep 17 00:00:00 2001
From: feige <feige@qq.com>
Date: 星期日, 10 九月 2023 10:04:34 +0800
Subject: [PATCH] 修改了家庭设备详情,增加了打印
---
ruoyi-ui/src/views/healthy/healthyInfo.vue | 39 +++++++++++++++++++++------------------
1 files changed, 21 insertions(+), 18 deletions(-)
diff --git a/ruoyi-ui/src/views/healthy/healthyInfo.vue b/ruoyi-ui/src/views/healthy/healthyInfo.vue
index 232c9cb..7a634b1 100644
--- a/ruoyi-ui/src/views/healthy/healthyInfo.vue
+++ b/ruoyi-ui/src/views/healthy/healthyInfo.vue
@@ -1,7 +1,7 @@
<template>
<div class="app-container">
<div class="form-header mt">
- <h4 class="dt h4">闅愮璇︾粏淇℃伅 </h4>
+ <h4 class="dt h4">鍋ュ悍璇︾粏淇℃伅 </h4>
</div>
@@ -39,7 +39,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"
@@ -51,14 +52,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)"
>
@@ -89,8 +90,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"
@@ -101,14 +102,14 @@
>
<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"
+
class="el-upload-list__item-delete"
@click="handleDownload(file.url)"
>
@@ -141,7 +142,7 @@
</div>
</template>
<script>
-import {getSecretInfo, uploadPic, download, updateSecret} from "@/api/secret/index";
+import {getHealthInfo, uploadPic, download, updateSecret} from "@/api/healthy/index";
import {addRole, updateRole} from "@/api/system/role";
import {blobValidate} from "@/utils/ruoyi";
import errorCode from "@/utils/errorCode";
@@ -152,8 +153,8 @@
props: [],
data() {
return {
- cdi:"闅愮璇︾粏淇℃伅",
- udi:"闅愮淇℃伅淇敼",
+ cdi:"鍋ュ悍璇︾粏淇℃伅",
+ udi:"鍋ュ悍淇℃伅淇敼",
fot:[".jpg",".jif"],
fileList:[
],
@@ -163,6 +164,7 @@
dsb:true,
btn:false,
isShow:true,
+ uploading: false,
formData: {
type: undefined,
happenTime: undefined,
@@ -246,12 +248,12 @@
this.btn= jd
this.dsb = !jd
this.isShow=true
- document.title = "淇敼闅愮璇︾粏淇℃伅";
- this.$route.meta.title = "淇敼闅愮璇︾粏淇℃伅";//鍒楄〃鐨勫悕绉�
+ document.title = "淇敼鍋ュ悍璇︾粏淇℃伅";
+ this.$route.meta.title = "淇敼鍋ュ悍璇︾粏淇℃伅";//鍒楄〃鐨勫悕绉�
}
else{
- document.title = "鏌ョ湅闅愮璇︾粏淇℃伅";
- this.$route.meta.title = "鏌ョ湅闅愮璇︾粏淇℃伅";//鍒楄〃鐨勫悕绉�
+ document.title = "鏌ョ湅鍋ュ悍璇︾粏淇℃伅";
+ this.$route.meta.title = "鏌ョ湅鍋ュ悍璇︾粏淇℃伅";//鍒楄〃鐨勫悕绉�
this.isShow=false
}
@@ -259,7 +261,7 @@
if (id) {
this.loading = true;
- getSecretInfo(query).then((response) => {
+ getHealthInfo({id}).then((response) => {
this.formData = response.data;
let paths = response.data.url.split(",");
for(let i = 0; i < paths.length; i++)
@@ -394,10 +396,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