[update] 企标制修订在线编辑
This commit is contained in:
+4
-3
@@ -82,7 +82,8 @@ export default {
|
||||
}
|
||||
},
|
||||
index: undefined, // 编辑的表格的下标
|
||||
iframeSrc: '' // 左侧预览的路径
|
||||
iframeSrc: '', // 左侧预览的路径
|
||||
documentUrl: window._CONFIG.documentUrl
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -118,9 +119,9 @@ export default {
|
||||
})
|
||||
},
|
||||
handlePreview (file) {
|
||||
const filePaths = file.filePath.split('/')
|
||||
const filePaths = file.editFilePath.split('/')
|
||||
const fileName = filePaths[filePaths.length - 1]
|
||||
const url = `${window._CONFIG.onlinePreviewDomainURL}?url=${encodeURIComponent(Base64.encode(this.documentUrl + file.filePath + '&fullfilename=' + fileName))}`
|
||||
const url = `${window._CONFIG.onlinePreviewDomainURL}?url=${encodeURIComponent(Base64.encode(this.documentUrl + file.editFilePath + '&fullfilename=' + fileName))}`
|
||||
this.iframeSrc = url
|
||||
},
|
||||
close () {
|
||||
|
||||
@@ -121,7 +121,8 @@ export default {
|
||||
},
|
||||
index: undefined, // 编辑的表格的下标
|
||||
iframeSrc: '', // 左侧预览的路径
|
||||
isAdd: false // 是否是新增,新增才有提交并新增按钮
|
||||
isAdd: false, // 是否是新增,新增才有提交并新增按钮
|
||||
documentUrl: window._CONFIG.documentUrl
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
@@ -158,9 +159,9 @@ export default {
|
||||
})
|
||||
},
|
||||
handlePreview (file) {
|
||||
const filePaths = file.filePath.split('/')
|
||||
const filePaths = file.editFilePath.split('/')
|
||||
const fileName = filePaths[filePaths.length - 1]
|
||||
const url = `${window._CONFIG.onlinePreviewDomainURL}?url=${encodeURIComponent(Base64.encode(this.documentUrl + file.filePath + '&fullfilename=' + fileName))}`
|
||||
const url = `${window._CONFIG.onlinePreviewDomainURL}?url=${encodeURIComponent(Base64.encode(this.documentUrl + file.editFilePath + '&fullfilename=' + fileName))}`
|
||||
this.iframeSrc = url
|
||||
},
|
||||
close () {
|
||||
|
||||
+1
-9
@@ -210,15 +210,7 @@ export default {
|
||||
},
|
||||
// 在线编辑的查看
|
||||
onlineEditView () {
|
||||
queryFileInfoByEditId({ id: this.onEditFile }).then(res => {
|
||||
if (res.success) {
|
||||
const file = res.result
|
||||
const filePaths = file.filePath.split('/')
|
||||
const fileName = filePaths[filePaths.length - 1]
|
||||
const url = `${window._CONFIG.onlinePreviewDomainURL}?url=${encodeURIComponent(Base64.encode(this.documentUrl + file.filePath + '&fullfilename=' + fileName))}`
|
||||
window.open(url, '_blank')
|
||||
}
|
||||
})
|
||||
this.$emit('onlineEditView', this.onEditFile)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-9
@@ -130,15 +130,7 @@ export default {
|
||||
},
|
||||
// 在线编辑的查看
|
||||
onlineEditView () {
|
||||
queryFileInfoByEditId({ id: this.onEditFile }).then(res => {
|
||||
if (res.success) {
|
||||
const file = res.result
|
||||
const filePaths = file.filePath.split('/')
|
||||
const fileName = filePaths[filePaths.length - 1]
|
||||
const url = `${window._CONFIG.onlinePreviewDomainURL}?url=${encodeURIComponent(Base64.encode(this.documentUrl + file.filePath + '&fullfilename=' + fileName))}`
|
||||
window.open(url, '_blank')
|
||||
}
|
||||
})
|
||||
this.$emit('onlineEditView', this.onEditFile)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-9
@@ -238,15 +238,7 @@ export default {
|
||||
},
|
||||
// 在线编辑的查看
|
||||
onlineEditView () {
|
||||
queryFileInfoByEditId({ id: this.onEditFile }).then(res => {
|
||||
if (res.success) {
|
||||
const file = res.result
|
||||
const filePaths = file.filePath.split('/')
|
||||
const fileName = filePaths[filePaths.length - 1]
|
||||
const url = `${window._CONFIG.onlinePreviewDomainURL}?url=${encodeURIComponent(Base64.encode(this.documentUrl + file.filePath + '&fullfilename=' + fileName))}`
|
||||
window.open(url, '_blank')
|
||||
}
|
||||
})
|
||||
this.$emit('onlineEditView', this.onEditFile)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-9
@@ -149,15 +149,7 @@ export default {
|
||||
},
|
||||
// 在线编辑的查看
|
||||
onlineEditView () {
|
||||
queryFileInfoByEditId({ id: this.onEditFile }).then(res => {
|
||||
if (res.success) {
|
||||
const file = res.result
|
||||
const filePaths = file.filePath.split('/')
|
||||
const fileName = filePaths[filePaths.length - 1]
|
||||
const url = `${window._CONFIG.onlinePreviewDomainURL}?url=${encodeURIComponent(Base64.encode(this.documentUrl + file.filePath + '&fullfilename=' + fileName))}`
|
||||
window.open(url, '_blank')
|
||||
}
|
||||
})
|
||||
this.$emit('onlineEditView', this.onEditFile)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-9
@@ -219,15 +219,7 @@ export default {
|
||||
},
|
||||
// 在线编辑的查看
|
||||
onlineEditView () {
|
||||
queryFileInfoByEditId({ id: this.onEditFile }).then(res => {
|
||||
if (res.success) {
|
||||
const file = res.result
|
||||
const filePaths = file.filePath.split('/')
|
||||
const fileName = filePaths[filePaths.length - 1]
|
||||
const url = `${window._CONFIG.onlinePreviewDomainURL}?url=${encodeURIComponent(Base64.encode(this.documentUrl + file.filePath + '&fullfilename=' + fileName))}`
|
||||
window.open(url, '_blank')
|
||||
}
|
||||
})
|
||||
this.$emit('onlineEditView', this.onEditFile)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+1
-9
@@ -50,15 +50,7 @@ export default {
|
||||
},
|
||||
// 在线编辑的查看
|
||||
onlineEditView () {
|
||||
queryFileInfoByEditId({ id: this.onEditFile }).then(res => {
|
||||
if (res.success) {
|
||||
const file = res.result
|
||||
const filePaths = file.filePath.split('/')
|
||||
const fileName = filePaths[filePaths.length - 1]
|
||||
const url = `${window._CONFIG.onlinePreviewDomainURL}?url=${encodeURIComponent(Base64.encode(this.documentUrl + file.filePath + '&fullfilename=' + fileName))}`
|
||||
window.open(url, '_blank')
|
||||
}
|
||||
})
|
||||
this.$emit('onlineEditView', this.onEditFile)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+14
-1
@@ -219,6 +219,19 @@ export default {
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
<style scoped lang="less">
|
||||
|
||||
.online-edit-wrapper {
|
||||
height: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
p {
|
||||
margin-bottom: 0;
|
||||
height: 100%;
|
||||
}
|
||||
.ant-btn {
|
||||
margin-right: 20px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
||||
@@ -398,15 +398,7 @@ export default {
|
||||
},
|
||||
// 在线编辑的查看
|
||||
onlineEditView () {
|
||||
queryFileInfoByEditId({ id: this.onEditFile }).then(res => {
|
||||
if (res.success) {
|
||||
const file = res.result
|
||||
const filePaths = file.filePath.split('/')
|
||||
const fileName = filePaths[filePaths.length - 1]
|
||||
const url = `${window._CONFIG.onlinePreviewDomainURL}?url=${encodeURIComponent(Base64.encode(this.documentUrl + file.filePath + '&fullfilename=' + fileName))}`
|
||||
window.open(url, '_blank')
|
||||
}
|
||||
})
|
||||
this.$emit('onlineEditView', this.onEditFile)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+3
-9
@@ -120,6 +120,7 @@ import { kkFilePreview } from '@/utils/kkFilePreview'
|
||||
import { ACCESS_TOKEN } from '@/store/mutation-types'
|
||||
import { queryFileInfoByEditId } from '../../../../api/workCenter'
|
||||
import { Base64 } from 'js-base64'
|
||||
import { onlineEditor } from '../../../../utils/onlyOfficeUtils'
|
||||
|
||||
export default {
|
||||
name: 'StandardizationAuditBaseInfo',
|
||||
@@ -168,6 +169,7 @@ export default {
|
||||
}
|
||||
]
|
||||
},
|
||||
documentUrl: window._CONFIG.documentUrl,
|
||||
onEditFile: '' // 在线编辑的文件id
|
||||
}
|
||||
},
|
||||
@@ -221,15 +223,7 @@ export default {
|
||||
},
|
||||
// 在线编辑的查看
|
||||
onlineEditView () {
|
||||
queryFileInfoByEditId({ id: this.onEditFile }).then(res => {
|
||||
if (res.success) {
|
||||
const file = res.result
|
||||
const filePaths = file.filePath.split('/')
|
||||
const fileName = filePaths[filePaths.length - 1]
|
||||
const url = `${window._CONFIG.onlinePreviewDomainURL}?url=${encodeURIComponent(Base64.encode(this.documentUrl + file.filePath + '&fullfilename=' + fileName))}`
|
||||
window.open(url, '_blank')
|
||||
}
|
||||
})
|
||||
this.$emit('onlineEditView', this.onEditFile)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user