add 列表
This commit is contained in:
+28
-19
@@ -19,6 +19,8 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted () {
|
||||
this.connectEditor()
|
||||
// 从主系统跳过来需要调这个方法,目前系统内跳不触发
|
||||
if (window.addEventListener) {
|
||||
window.addEventListener('load', this.connectEditor)
|
||||
window.addEventListener('resize', this.fixSize)
|
||||
@@ -32,12 +34,20 @@ export default {
|
||||
if (console && console.log) console.log(message)
|
||||
},
|
||||
onAppReady () {
|
||||
console.log(123);
|
||||
console.log(123)
|
||||
this.innerAlert('Document editor ready')
|
||||
},
|
||||
onDocumentStateChange (event) {
|
||||
const title = document.title.replace(/\*$/g, '')
|
||||
document.title = title + (event.data ? '*' : '')
|
||||
// console.log('尝试获取dom')
|
||||
// console.log(document.getElementsByTagName('iframe'))
|
||||
// console.log(document.getElementsByTagName('iframe')[0])
|
||||
// console.log(document.getElementsByTagName('iframe')[0].contentDocument)
|
||||
// console.log(document.getElementsByTagName('iframe')[0].contentWindow)
|
||||
// console.log(document.getElementsByTagName('iframe')[0].contentWindow.document)
|
||||
// console.log(document.getElementsByTagName('iframe')[0].contentWindow.document.getElementById('id_main_view'))
|
||||
// console.log(document.getElementsByTagName('iframe')[0].contentDocument.getElementById('id_main_view'))
|
||||
},
|
||||
onRequestEditRights () {
|
||||
location.href = location.href.replace(RegExp('mode=view', 'i'), '')
|
||||
@@ -60,7 +70,7 @@ export default {
|
||||
})
|
||||
},
|
||||
onRequestHistoryData (data) {
|
||||
console.log(data);
|
||||
console.log(data)
|
||||
const version = data.data
|
||||
const historyData =
|
||||
[
|
||||
@@ -76,7 +86,7 @@ export default {
|
||||
document.location.reload()
|
||||
},
|
||||
onError (event) {
|
||||
console.log(event);
|
||||
console.log(event)
|
||||
if (event) this.innerAlert(event.data)
|
||||
},
|
||||
onOutdatedVersion (event) {
|
||||
@@ -122,7 +132,8 @@ export default {
|
||||
console.log(12)
|
||||
},
|
||||
connectEditor () {
|
||||
console.log(this.documentUrl)
|
||||
console.log(`${this.documentUrl}${this.$route.query.filePath}`)
|
||||
console.log(window._CONFIG.configUrl + 'page1/config.json')
|
||||
const nowTime = new Date().getTime()
|
||||
this.docEditor = new DocsAPI.DocEditor('iframeEditor', {
|
||||
width: '100%',
|
||||
@@ -135,10 +146,8 @@ export default {
|
||||
documentType: 'word',
|
||||
token: 'secret',
|
||||
document: {
|
||||
// title: this.$route.query.oldFileName + '.' + this.$route.query.fileType,
|
||||
title: '文档.docx',
|
||||
// url: this.documentUrl + this.$route.query.filePath + this.$route.query.fileName,
|
||||
url: this.documentUrl,
|
||||
title: this.$route.query.fileName,
|
||||
url: `${this.documentUrl}${this.$route.query.filePath}`,
|
||||
fileType: this.$route.query.fileType,
|
||||
key: this.$route.query.key,
|
||||
info: {
|
||||
@@ -153,16 +162,16 @@ export default {
|
||||
modifyFilter: true, // 定义过滤器是否可以全局应用(true)影响所有其他用户,或局部应用(false),即仅适用于当前用户。如果将mode参数设置为edit,则过滤器修改仅对电子表格编辑器可用。默认值为true。
|
||||
modifyContentControl: true, // 定义是否可以更改内容控件设置。仅当mode参数设置为edit时,内容控件修改才可用于文档编辑器。默认值为true。
|
||||
review: true, // 第一是否显示审阅文档菜单
|
||||
"commentGroups": {
|
||||
"edit": ["Group2", ""],
|
||||
"remove": [""],
|
||||
"view": ""
|
||||
'commentGroups': {
|
||||
'edit': ['Group2', ''],
|
||||
'remove': [''],
|
||||
'view': ''
|
||||
},
|
||||
"copy": true,
|
||||
"deleteCommentAuthorOnly": false,
|
||||
"editCommentAuthorOnly": false,
|
||||
"print": true,
|
||||
"reviewGroups": ["Group1", "Group2", ""]
|
||||
'copy': true,
|
||||
'deleteCommentAuthorOnly': false,
|
||||
'editCommentAuthorOnly': false,
|
||||
'print': true,
|
||||
'reviewGroups': ['Group1', 'Group2', '']
|
||||
}
|
||||
},
|
||||
editorConfig: {
|
||||
@@ -172,7 +181,7 @@ export default {
|
||||
query: {
|
||||
id: 123456
|
||||
},
|
||||
callbackUrl: `${this.callbackUrl}/bat-wkflow/busProcessModel/recieveFile?fileNm=${this.$route.query.fileName}&key=${this.$route.query.key}&standNo=${this.$route.query.filePath}&fileId=${this.$route.query.attId}&standName=${this.$route.query.standName}&standEnName=${this.$route.query.standEnName}&standCode=${this.$route.query.standCode}&putTime=${this.$route.query.putTime}&issueTime=${this.$route.query.issueTime}&dtqbbhbuss=${this.$route.query.dtqbbhbuss}`,
|
||||
callbackUrl: `${this.callbackUrl}laws-sinotruk/onlyoffice/recieveFile?fileId=${this.$route.query.key}&fileNm=${this.$route.query.fileName}&key=${this.$route.query.key}`,
|
||||
user: {
|
||||
id: this.$route.query.userId,
|
||||
name: this.$route.query.userName
|
||||
@@ -181,7 +190,7 @@ export default {
|
||||
embedded: {
|
||||
// saveUrl: this.documentUrl + this.$route.query.filePath + this.$route.query.fileName, // 定义允许将文档保存到用户个人计算机上的绝对URL。
|
||||
// embedUrl: this.documentUrl + this.$route.query.filePath + this.$route.query.fileName, // 定义文档的绝对URL,以作为嵌入到网页中的文档的源文件
|
||||
// shareUrl: this.documentUrl + this.$route.query.filePath + this.$route.query.fileName, // 定义允许其他用户共享此文档的绝对URL。
|
||||
// shareUrl: this.documentUrl + this.$route.query.filePath + this.fileName, // 定义允许其他用户共享此文档的绝对URL。
|
||||
saveUrl: this.documentUrl, // 定义允许将文档保存到用户个人计算机上的绝对URL。
|
||||
embedUrl: this.documentUrl, // 定义文档的绝对URL,以作为嵌入到网页中的文档的源文件
|
||||
shareUrl: this.documentUrl, // 定义允许其他用户共享此文档的绝对URL。
|
||||
|
||||
Reference in New Issue
Block a user