文档拆分--查看--图片上传
This commit is contained in:
@@ -197,6 +197,9 @@ export default {
|
||||
if (res.success) {
|
||||
this.contentList = [...res.result]
|
||||
this.contentList.forEach(item => {
|
||||
if (item.type === this.TypeOfClauseItem.TABLE.value) {
|
||||
item.itemContent = window.getHtml(item.itemContent)
|
||||
}
|
||||
const imgData = item.itemContent.split('fileName=')[1]
|
||||
item.thumbUrl = window._CONFIG.domianURL + '/sys/split/file/getImage?fileName=' + imgData
|
||||
})
|
||||
|
||||
@@ -26,7 +26,8 @@ export default {
|
||||
methods: {
|
||||
open (val) {
|
||||
this.contentVisible = true
|
||||
this.contentValue = val
|
||||
console.log(val)
|
||||
this.contentValue = window.getHtml(val)
|
||||
},
|
||||
handleCancel () {
|
||||
this.contentVisible = false
|
||||
|
||||
@@ -15,6 +15,7 @@
|
||||
|
||||
<script>
|
||||
import UEditor from '../../../../components/uEditor/UEditor.vue'
|
||||
import { getHtml } from '../../../../../public/ueditor/ueditor.all'
|
||||
export default {
|
||||
name: 'SplitDetailAddTable',
|
||||
components: { UEditor },
|
||||
@@ -121,9 +122,17 @@ export default {
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
unhtml (str) {
|
||||
return str ? str.replace(/[<>]/g, (a) => {
|
||||
return {
|
||||
'<': '<',
|
||||
'>': '>',
|
||||
}[a]
|
||||
}) : ''
|
||||
},
|
||||
open (tableStr) {
|
||||
console.log('$$$$$$$$$$$$', tableStr)
|
||||
this.tableVisible = true
|
||||
// console.log(window.getHtml(tableStr))
|
||||
this.ueContent = tableStr
|
||||
this.$nextTick(() => {
|
||||
this.$refs.ueditor.setContent(this.ueContent)
|
||||
|
||||
Reference in New Issue
Block a user