文档拆分--查看--图片上传

This commit is contained in:
范强强
2024-03-10 13:18:09 +08:00
parent 46bcf687a3
commit a4464e58c3
5 changed files with 34 additions and 14 deletions
@@ -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 {
'<': '&lt;',
'>': '&gt;',
}[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)