|
@@ -566,29 +566,24 @@ var Feng = {
|
|
|
// layer.full(index);
|
|
|
},
|
|
|
showExcel: function (url, id, title) {
|
|
|
- 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 window.DocsAPI.DocEditor("placeholder", config);
|
|
|
+ if (Feng.isEmptyStr(id)) {
|
|
|
+ id = "id";
|
|
|
+ }
|
|
|
+ if (Feng.isEmptyStr(title)) {
|
|
|
+ title = "预览";
|
|
|
+ }
|
|
|
+ let origin = window.location.origin;
|
|
|
+ //let full_url = "https://fileview.jinjianghc.com/onlinePreview?url=" + encodeURIComponent(Base64.encode(url));
|
|
|
+ var index = layer.open({
|
|
|
+ id: id,
|
|
|
+ type: 2,
|
|
|
+ shade: 0,
|
|
|
+ title: title,
|
|
|
+ area: ['80%', '80%'], //宽高
|
|
|
+ fix: false, //不固定
|
|
|
+ maxmin: true,
|
|
|
+ content: Feng.ctxPath + "/common/api/filePreview?url=" + url + "&title=" + title,
|
|
|
+ });
|
|
|
//window.location.href = url;
|
|
|
},
|
|
|
showFile: function (url, id, title) {
|