2023-08-04
This commit is contained in:
@@ -4,11 +4,11 @@
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<head runat="server">
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
|
||||
<link rel="icon" href="/favicon.ico" type="image/x-icon" />
|
||||
<title>
|
||||
|
||||
Spire.Office
|
||||
</title>
|
||||
|
||||
<style>
|
||||
@@ -49,9 +49,9 @@
|
||||
var lang = "zh";
|
||||
var fileType = "";
|
||||
var token = null;
|
||||
var appid = "40a7173618064b5d32cbd941de2d75de";
|
||||
var appkey = "7rtntDrw5aqYYwsJ3qsIDSis2ZbJuXeO";
|
||||
|
||||
var appid ='<%=Appid%>';
|
||||
var appkey ='<%=Appkey%>';
|
||||
//console.log(Appid + "---" + appkey);
|
||||
var innerAlert = function (message) {
|
||||
if (console && console.log)
|
||||
console.log(message);
|
||||
@@ -102,7 +102,7 @@
|
||||
xhr.open(method, url, true);
|
||||
if (method === "POST")
|
||||
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
|
||||
xhr.setRequestHeader("token", "<%=UserId%>");
|
||||
xhr.setRequestHeader("token", "<%=this.CurrUser.PersonId%>");
|
||||
xhr.send(queryString);
|
||||
xhr.onreadystatechange = function () {
|
||||
if (xhr.readyState === 4) {
|
||||
@@ -127,26 +127,23 @@
|
||||
fileName = fileName.split('=')[1];
|
||||
var host = location.hostname;
|
||||
ajax({
|
||||
url: 'https://sggl.sedin.com.cn/sgglapi/api/FileUpload/DownloadDocument',
|
||||
type: 'post',
|
||||
|
||||
url: '<%=CallBackUrl%>',
|
||||
type: 'post',
|
||||
data: {
|
||||
'UrlStr': url,
|
||||
'PCUrl': '<%=PCUrl%>',
|
||||
},
|
||||
|
||||
dataType: 'json',
|
||||
async: false,
|
||||
success: function (json) {
|
||||
console.log(json)
|
||||
if (json.code == 1 || json.code == '1') {
|
||||
alert('保存成功');
|
||||
} else {
|
||||
this.error(json);
|
||||
this.error(json, '保存失败');
|
||||
}
|
||||
},
|
||||
error: function (json) {
|
||||
alert(json.message);
|
||||
error: function (json, msg) {
|
||||
alert(+msg);
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -161,8 +158,9 @@
|
||||
type = "mobile";
|
||||
}
|
||||
};
|
||||
/*var urlString = "https://cloud.e-iceblue.cn/demo/sample.docx";*/
|
||||
var urlString = "<%=BLL.Funs.SGGLUrl%>"+"<%=PCUrl%>";
|
||||
// var urlString = "https://cloud.e-iceblue.cn/demo/sample.docx";
|
||||
var urlString = "<%=BLL.Funs.SGGLUrl%>" + "<%=PCUrl%>";
|
||||
|
||||
var arrfn = urlString.split(".");
|
||||
var strp = arrfn[arrfn.length - 1];
|
||||
var documentTypeValue = null;
|
||||
@@ -217,59 +215,59 @@
|
||||
whiteLabel:true,
|
||||
user: {
|
||||
primary: '',
|
||||
name: '<%=UserName%>',
|
||||
canSave: true,
|
||||
customization: {
|
||||
public: {
|
||||
common: {
|
||||
whiteLabel: true,
|
||||
defaultZoom: 1,
|
||||
openReviewChanges: false,
|
||||
permGroups: ['everyone'], //限制编辑分组
|
||||
viewVersion: false,
|
||||
header: {
|
||||
hideTitle: false,
|
||||
defaultView: 'full'
|
||||
}
|
||||
},
|
||||
word: null, //doc定制
|
||||
powerpoint: null, //ppt定制
|
||||
excel: null //xls定制
|
||||
name: '<%=this.CurrUser.PersonName%>',
|
||||
canSave: true,
|
||||
customization: {
|
||||
public: {
|
||||
common: {
|
||||
whiteLabel: true,
|
||||
defaultZoom: 1,
|
||||
openReviewChanges: false,
|
||||
permGroups: ['everyone'], //限制编辑分组
|
||||
viewVersion: false,
|
||||
header: {
|
||||
hideTitle: false,
|
||||
defaultView: 'full'
|
||||
}
|
||||
},
|
||||
"private": {
|
||||
"token": null,
|
||||
"appid": null,
|
||||
"appkey": null
|
||||
}
|
||||
}
|
||||
},
|
||||
editorAttrs: { //编辑器配置
|
||||
editorWidth: '100%',
|
||||
editorHeight: '100%',
|
||||
editorMode: 'edit',
|
||||
editorType: 'document', //编辑器类型,可不配置,程序根据文件类型获取,结果为 document,presentation,spreadsheet
|
||||
platform: 'windows', //编辑器平台类型,可选windows, mobile, embedded
|
||||
viewLanguage: 'zh', //平台界面展示语言可选en/zh
|
||||
canChat: true, //是否可聊天
|
||||
canComment: true, //是否可批注
|
||||
canReview: true,
|
||||
canDownload: true,
|
||||
canForcesave: true,
|
||||
embedded: {
|
||||
saveUrl: '',
|
||||
embedUrl: '',
|
||||
shareUrl: ''
|
||||
word: null, //doc定制
|
||||
powerpoint: null, //ppt定制
|
||||
excel: null //xls定制
|
||||
},
|
||||
events: {
|
||||
'onReady': onReady,
|
||||
'onDocumentStateChange': onDocumentStateChange,
|
||||
'onError': onError,
|
||||
'onRequestEditRights': onRequestEditRights,
|
||||
'onOutdatedVersion': onOutdatedVersion,
|
||||
'onSave': callbackfn
|
||||
"private": {
|
||||
"token": null,
|
||||
"appid": null,
|
||||
"appkey": null
|
||||
}
|
||||
}
|
||||
},
|
||||
editorAttrs: { //编辑器配置
|
||||
editorWidth: '100%',
|
||||
editorHeight: '100%',
|
||||
editorMode: 'edit',
|
||||
editorType: 'document', //编辑器类型,可不配置,程序根据文件类型获取,结果为 document,presentation,spreadsheet
|
||||
platform: 'windows', //编辑器平台类型,可选windows, mobile, embedded
|
||||
viewLanguage: 'zh', //平台界面展示语言可选en/zh
|
||||
canChat: true, //是否可聊天
|
||||
canComment: true, //是否可批注
|
||||
canReview: true,
|
||||
canDownload: true,
|
||||
canForcesave: true,
|
||||
embedded: {
|
||||
saveUrl: '',
|
||||
embedUrl: '',
|
||||
shareUrl: ''
|
||||
},
|
||||
events: {
|
||||
'onReady': onReady,
|
||||
'onDocumentStateChange': onDocumentStateChange,
|
||||
'onError': onError,
|
||||
'onRequestEditRights': onRequestEditRights,
|
||||
'onOutdatedVersion': onOutdatedVersion,
|
||||
'onSave': callbackfn
|
||||
}
|
||||
}
|
||||
},
|
||||
appid,
|
||||
appkey
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user