|
@@ -36,7 +36,7 @@ export const JGPrintTag = function (html, width, height, data) {
|
|
|
LODOP.PRINT()
|
|
|
}
|
|
|
// 导出文件
|
|
|
-export const exportExcel = function(url,params,fileName,callback){
|
|
|
+export const exportExcel = function(url,params,fileName,callback,noShowTime){
|
|
|
url(params).then(res => {
|
|
|
if (res.type == 'application/json') {
|
|
|
var reader = new FileReader()
|
|
@@ -49,16 +49,16 @@ export const exportExcel = function(url,params,fileName,callback){
|
|
|
})
|
|
|
reader.readAsText(res)
|
|
|
} else {
|
|
|
- downloadExcel(res,fileName)
|
|
|
+ downloadExcel(res,fileName,noShowTime)
|
|
|
}
|
|
|
callback()
|
|
|
})
|
|
|
}
|
|
|
// 下载excel
|
|
|
-export const downloadExcel = function (data, fileName) {
|
|
|
+export const downloadExcel = function (data, fileName, noShowTime) {
|
|
|
if (!data) { return }
|
|
|
const a = moment().format('YYYYMMDDHHmmss')
|
|
|
- const fname = fileName + a
|
|
|
+ const fname = noShowTime ? fileName : (fileName + a)
|
|
|
const blob = new Blob([data], { type: 'application/vnd.ms-excel' })
|
|
|
if (window.navigator && window.navigator.msSaveOrOpenBlob) {
|
|
|
navigator.msSaveBlob(blob, fname + '.xlsx')
|