update officeweb.ftl

This commit is contained in:
陈精华
2023-07-10 13:59:56 +08:00
parent 77f794831f
commit 2cfd692171

View File

@ -72,15 +72,14 @@
var test = window.location.href;
test = test.replace(new RegExp("&officePreviewType=xlsx",("gm")),"");
test = test+'&officePreviewType=html';
   window.location.href=test;
   }
window.location.href=test;
}
var url = '${finalUrl}';
var baseUrl = '${baseUrl}'.endsWith('/') ? '${baseUrl}' : '${baseUrl}' + '/';
if (!url.startsWith(baseUrl)) {
url = baseUrl + 'getCorsFile?urlPath=' + encodeURIComponent(Base64.encode(url));
}
let mask = document.getElementById("lucky-mask-demo");
function loadText() {
initWaterMark(); // 是否显示水印
var value = url;
@ -94,7 +93,6 @@
alert("读取excel文件内容失败!");
return;
}
// console.log(exportJson.sheets);
mask.style.display = "none";
window.luckysheet.destroy();
window.luckysheet.create({
@ -102,12 +100,8 @@
lang: "zh",
showtoolbarConfig:{
image: true,
print: false,
},
hook:{
onTogglePager:function(range){
// range.data = exportJson.sheets
},
print: false, //关闭打印按钮 启用也不能用 等以后看情况而定
exportXlsx: false, //关闭导出按钮 启用也不能用 等以后看情况而定
},
allowCopy: true, // 是否允许拷贝
@ -125,9 +119,15 @@
showColumnBar: false, // 是否显示列号区域
sheetFormulaBar: false, // 是否显示公式栏
enableAddBackTop: true,//返回头部按钮
forceCalculation: false, //下面是导出插件 默认关闭
enableAddRow: false, // 允许增加行
plugins: [{ name: 'chart' }, { name: 'exportXlsx', config: { url: 'luckyToXlsx' } }, {
name: 'print', config: {
license: ''
}
}],
data:exportJson.sheets,
title:exportJson.info.name,
plugins: ['chart'],
userInfo:exportJson.info.name.creator
});
});