|
@@ -566,7 +566,30 @@ var Feng = {
|
|
|
// layer.full(index);
|
|
|
},
|
|
|
showExcel: function (url, id, title) {
|
|
|
- window.location.href = url;
|
|
|
+ const index = title.lastIndexOf('.');
|
|
|
+ const fileType = title.substr(index + 1);
|
|
|
+ const config = {
|
|
|
+ "document": {
|
|
|
+ "permissions": {
|
|
|
+ comment: false,
|
|
|
+ fillForms: false,
|
|
|
+ "edit": false,
|
|
|
+ },
|
|
|
+ "fileType": fileType,
|
|
|
+ "title": title,
|
|
|
+ "url": url,
|
|
|
+ // "key": this.md5,
|
|
|
+ "lang": "zh-CN"
|
|
|
+ },
|
|
|
+ "width": '100%',
|
|
|
+ "editorConfig": {
|
|
|
+ mode: 'view',
|
|
|
+ "lang": "zh-CN"
|
|
|
+ }
|
|
|
+ };
|
|
|
+ document.title = title;
|
|
|
+ const docEditor = new DocsAPI.DocEditor("placeholder", config);
|
|
|
+ //window.location.href = url;
|
|
|
},
|
|
|
showFile: function (url, id, title) {
|
|
|
if (Feng.isEmptyStr(id)) {
|