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