fix:维保页面调整,文件下载文件名格式调整
parent
778f855ee9
commit
f7516a9ffe
Binary file not shown.
|
After Width: | Height: | Size: 17 KiB |
|
|
@ -2,8 +2,7 @@
|
||||||
<div class="service-page">
|
<div class="service-page">
|
||||||
<header class="service-header">
|
<header class="service-header">
|
||||||
<div class="service-header__inner">
|
<div class="service-header__inner">
|
||||||
<img :src="h3cLogoSrc" alt="H3C" class="service-logo">
|
<img :src="logoSrc" alt="H3C&紫光汇智" class="service-logo">
|
||||||
<img :src="logoSrc" alt="紫光汇智" class="service-logo">
|
|
||||||
</div>
|
</div>
|
||||||
</header>
|
</header>
|
||||||
|
|
||||||
|
|
@ -227,8 +226,7 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { getProductInfo, getOrderInfo, getWarrantyInfo } from '@/api/manage/service'
|
import { getProductInfo, getOrderInfo, getWarrantyInfo } from '@/api/manage/service'
|
||||||
import logoImage from '@/assets/images/companyLogoHD.png'
|
import logoImage from '@/assets/images/wbLogo.png'
|
||||||
import h3cLogoImage from '@/assets/images/h3cLogo.png'
|
|
||||||
import companyQrCodeImage from '@/assets/images/company-QR-code.png'
|
import companyQrCodeImage from '@/assets/images/company-QR-code.png'
|
||||||
import companyH3cQrCodeImage from '@/assets/images/H3C-QR-code.png'
|
import companyH3cQrCodeImage from '@/assets/images/H3C-QR-code.png'
|
||||||
|
|
||||||
|
|
@ -272,7 +270,6 @@ export default {
|
||||||
name: 'ServiceQuery',
|
name: 'ServiceQuery',
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
h3cLogoSrc: h3cLogoImage,
|
|
||||||
logoSrc: logoImage,
|
logoSrc: logoImage,
|
||||||
qrCodeSrc: companyQrCodeImage,
|
qrCodeSrc: companyQrCodeImage,
|
||||||
h3cQrCodeSrc: companyH3cQrCodeImage,
|
h3cQrCodeSrc: companyH3cQrCodeImage,
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,7 @@
|
||||||
package com.ruoyi.web.controller.common;
|
package com.ruoyi.web.controller.common;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import javax.servlet.http.HttpServletRequest;
|
import javax.servlet.http.HttpServletRequest;
|
||||||
|
|
@ -57,7 +59,8 @@ public class CommonController
|
||||||
{
|
{
|
||||||
throw new Exception(StringUtils.format("文件名称({})非法,不允许下载。 ", fileName));
|
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;
|
String filePath = RuoYiConfig.getDownloadPath() + fileName;
|
||||||
|
|
||||||
response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
|
response.setContentType(MediaType.APPLICATION_OCTET_STREAM_VALUE);
|
||||||
|
|
|
||||||
|
|
@ -12,6 +12,7 @@ import java.math.BigDecimal;
|
||||||
import java.text.DecimalFormat;
|
import java.text.DecimalFormat;
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
import java.time.format.DateTimeFormatter;
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Collection;
|
import java.util.Collection;
|
||||||
|
|
@ -21,7 +22,6 @@ import java.util.HashMap;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
import java.util.UUID;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
import javax.servlet.http.HttpServletResponse;
|
import javax.servlet.http.HttpServletResponse;
|
||||||
import org.apache.commons.lang3.ArrayUtils;
|
import org.apache.commons.lang3.ArrayUtils;
|
||||||
|
|
@ -1452,7 +1452,8 @@ public class ExcelUtil<T>
|
||||||
*/
|
*/
|
||||||
public String encodingFilename(String filename)
|
public String encodingFilename(String filename)
|
||||||
{
|
{
|
||||||
return UUID.randomUUID() + "_" + filename + ".xlsx";
|
String timestamp = LocalDateTime.now().format(DateTimeFormatter.ofPattern("yyyyMMddHHmmss"));
|
||||||
|
return filename + "_" + timestamp + ".xlsx";
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue