Merge remote-tracking branch 'origin/master'

dev_1.0.0
chenhao 2025-11-20 10:28:01 +08:00
commit 8a0329fb4b
7 changed files with 11 additions and 11 deletions

View File

@ -58,7 +58,7 @@ spring:
time-zone: GMT+8
date-format: yyyy-MM-dd HH:mm:ss
profiles:
active: dev
active: prod
# 文件上传
servlet:
multipart:

View File

@ -386,7 +386,7 @@ var table = {
$.modal.loading("正在导出数据,请稍候...");
$.post(table.options.exportUrl, dataParam, function (result) {
if (result.code == web_status.SUCCESS) {
window.location.href = ctx + "common/download?fileName=" + encodeURI(result.msg) + "&delete=" + true;
window.location.href = ctx + "common/download?fileName=" + encodeURIComponent(result.msg) + "&delete=" + true;
} else if (result.code == web_status.WARNING) {
$.modal.alertWarning(result.msg)
} else {
@ -400,7 +400,7 @@ var table = {
importTemplate: function () {
$.get(activeWindow().table.options.importTemplateUrl, function (result) {
if (result.code == web_status.SUCCESS) {
window.location.href = ctx + "common/download?fileName=" + encodeURI(result.msg) + "&delete=" + true;
window.location.href = ctx + "common/download?fileName=" + encodeURIComponent(result.msg) + "&delete=" + true;
} else if (result.code == web_status.WARNING) {
$.modal.alertWarning(result.msg)
} else {

View File

@ -108,7 +108,7 @@
$.modal.confirm(tipMsg, function() {
$.post(prefix + "/exportData", dataParam, function(result) {
if (result.code == web_status.SUCCESS) {
window.location.href = ctx + "common/download?fileName=" + encodeURI(result.msg) + "&delete=" + true;
window.location.href = ctx + "common/download?fileName=" + encodeURIComponent(result.msg) + "&delete=" + true;
} else {
$.modal.alertError(result.msg);
}

View File

@ -104,7 +104,7 @@ url: prefix + "/list",
$.modal.loading("正在下载,请稍候...");
$.post( prefix + "/export", {deliveryId:-1,productCode:'',serialNumber:''}, function(result) {
if (result.code == web_status.SUCCESS) {
window.location.href = ctx + "common/download?fileName=" +encodeURI(result.msg) + "&delete=" + true;
window.location.href = ctx + "common/download?fileName=" +encodeURIComponent(result.msg) + "&delete=" + true;
} else if (result.code == web_status.WARNING) {
$.modal.alertWarning(result.msg)
} else {

View File

@ -982,12 +982,12 @@ ${
}
function downFile(filePath, fileName) {
window.location.href = prefix + `/file/download?filePath=` + encodeURI(filePath) + '&fileName=' + encodeURI(fileName);
window.location.href = prefix + `/file/download?filePath=` + encodeURIComponent(filePath) + '&fileName=' + encodeURIComponent(fileName);
}
function preview(filePath, fileName) {
let iframe = window.open('', 'iframe')
let url = ctx + prefix + `/file/download?filePath=` + encodeURI(filePath) + '&fileName=' + encodeURI(fileName)
let url = ctx + prefix + `/file/download?filePath=` + encodeURIComponent(filePath) + '&fileName=' + encodeURIComponent(fileName)
iframe.document.write(`<iframe src='${url}' style="width: 100%;height
:100%">`)
}

View File

@ -1315,12 +1315,12 @@ ${
}
function downFile(filePath, fileName) {
window.location.href = prefix + `/file/download?filePath=` + encodeURI(filePath) + '&fileName=' + encodeURI(fileName);
window.location.href = prefix + `/file/download?filePath=` + encodeURIComponent(filePath) + '&fileName=' + encodeURIComponent(fileName);
}
function preview(filePath, fileName) {
if (filePath.endsWith(".png") || filePath.endsWith(".jpg") || filePath.endsWith(".jpeg") || filePath.endsWith(".pdf")) {
let url = prefix + `/file/view?filePath=` + encodeURI(filePath) + '&fileName=' + encodeURI(fileName)
let url = prefix + `/file/view?filePath=` + encodeURIComponent(filePath) + '&fileName=' + encodeURIComponent(fileName)
window.open(url)
} else {
downFile(filePath, fileName)

View File

@ -1325,13 +1325,13 @@
}
function downFile(filePath, fileName) {
window.location.href = prefix + `/file/download?filePath=` + encodeURI(filePath) + '&fileName=' + encodeURI(fileName);
window.location.href = prefix + `/file/download?filePath=` + encodeURIComponent(filePath) + '&fileName=' + encodeURIComponent(fileName);
}
function preview(filePath, fileName) {
if (filePath.endsWith(".png")||filePath.endsWith(".jpg")||filePath.endsWith(".jpeg")||filePath.endsWith(".pdf")){
let url = prefix + `/file/view?filePath=` + encodeURI(filePath) + '&fileName=' + encodeURI(fileName)
let url = prefix + `/file/view?filePath=` + encodeURIComponent(filePath) + '&fileName=' + encodeURIComponent(fileName)
window.open(url)
}else{
downFile(filePath,fileName)