fix:维保页面调整,文件下载文件名格式调整

dev_1.0.2
jiangpeng 2026-04-20 15:36:20 +08:00
parent 778f855ee9
commit f7516a9ffe
4 changed files with 9 additions and 8 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

@ -2,8 +2,7 @@
<div class="service-page">
<header class="service-header">
<div class="service-header__inner">
<img :src="h3cLogoSrc" alt="H3C" class="service-logo">
<img :src="logoSrc" alt="紫光汇智" class="service-logo">
<img :src="logoSrc" alt="H3C&紫光汇智" class="service-logo">
</div>
</header>
@ -227,8 +226,7 @@
<script>
import { getProductInfo, getOrderInfo, getWarrantyInfo } from '@/api/manage/service'
import logoImage from '@/assets/images/companyLogoHD.png'
import h3cLogoImage from '@/assets/images/h3cLogo.png'
import logoImage from '@/assets/images/wbLogo.png'
import companyQrCodeImage from '@/assets/images/company-QR-code.png'
import companyH3cQrCodeImage from '@/assets/images/H3C-QR-code.png'
@ -272,7 +270,6 @@ export default {
name: 'ServiceQuery',
data() {
return {
h3cLogoSrc: h3cLogoImage,
logoSrc: logoImage,
qrCodeSrc: companyQrCodeImage,
h3cQrCodeSrc: companyH3cQrCodeImage,

View File

@ -1,5 +1,7 @@
package com.ruoyi.web.controller.common;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
@ -57,7 +59,8 @@ public class CommonController
{
throw new Exception(StringUtils.format("文件名称({})非法,不允许下载。 ", fileName));
}
String realFileName = System.currentTimeMillis() + fileName.substring(fileName.indexOf("_") + 1);
String timestamp = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss"));
String realFileName = fileName.substring(0, fileName.indexOf("_")) + timestamp + "." + fileName.substring(fileName.lastIndexOf(".") + 1);
String filePath = RuoYiConfig.getDownloadPath() + fileName;
response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);

View File

@ -12,6 +12,7 @@ import java.math.BigDecimal;
import java.text.DecimalFormat;
import java.time.LocalDate;
import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
@ -21,7 +22,6 @@ import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.UUID;
import java.util.stream.Collectors;
import javax.servlet.http.HttpServletResponse;
import org.apache.commons.lang3.ArrayUtils;
@ -1452,7 +1452,8 @@ public class ExcelUtil<T>
*/
public String encodingFilename(String filename)
{
return UUID.randomUUID() + "_" + filename + ".xlsx";
String timestamp = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss"));
return filename + "_" + timestamp + ".xlsx";
}
/**