Compare commits
2 Commits
616d806c2d
...
57df5fe220
Author | SHA1 | Date |
---|---|---|
851673013@qq.com | 57df5fe220 | |
851673013@qq.com | f593a97854 |
|
@ -192,6 +192,7 @@
|
|||
],
|
||||
},
|
||||
])
|
||||
let shiyongshouce = ref({})
|
||||
const navList = ref([])
|
||||
const navList2 = ref([])
|
||||
const fileList = ref({})
|
||||
|
@ -315,6 +316,9 @@
|
|||
}
|
||||
init()
|
||||
mybus.on('chageDataFrom', (obj) => {
|
||||
if (obj.attrType == '技术文档' && obj.attrValue != null) {
|
||||
shiyongshouce.value = obj
|
||||
}
|
||||
dataFrom.value.infoList = dataFrom.value.infoList.filter(
|
||||
(item) => item.attrType !== obj.attrType
|
||||
)
|
||||
|
@ -322,6 +326,13 @@
|
|||
obj.attrValue = ''
|
||||
}
|
||||
dataFrom.value.infoList.push(obj)
|
||||
if (shiyongshouce.value.attrValue) {
|
||||
dataFrom.value.infoList.map((syscitem, syscindex) => {
|
||||
if (syscitem.attrType == '技术文档') {
|
||||
dataFrom.value.infoList[syscindex] = shiyongshouce.value
|
||||
}
|
||||
})
|
||||
}
|
||||
console.log('数据变更=================》', obj, dataFrom.value.infoList)
|
||||
})
|
||||
mybus.on('chageFileList', (obj) => {
|
||||
|
|
|
@ -286,7 +286,7 @@
|
|||
}
|
||||
init()
|
||||
mybus.on('chageDataFrom', (obj) => {
|
||||
if (obj.attrType == '使用手册' && obj.attrValue != null) {
|
||||
if (obj.attrType == '技术文档' && obj.attrValue != null) {
|
||||
shiyongshouce.value = obj
|
||||
}
|
||||
dataFrom.value.infoList = dataFrom.value.infoList.filter(
|
||||
|
@ -298,7 +298,7 @@
|
|||
dataFrom.value.infoList.push(obj)
|
||||
if (shiyongshouce.value.attrValue) {
|
||||
dataFrom.value.infoList.map((syscitem, syscindex) => {
|
||||
if (syscitem.attrType == '使用手册') {
|
||||
if (syscitem.attrType == '技术文档') {
|
||||
dataFrom.value.infoList[syscindex] = shiyongshouce.value
|
||||
}
|
||||
})
|
||||
|
|
|
@ -298,7 +298,7 @@
|
|||
}
|
||||
init()
|
||||
mybus.on('chageDataFrom', (obj) => {
|
||||
if (obj.attrType == '使用手册' && obj.attrValue != null) {
|
||||
if (obj.attrType == '技术文档' && obj.attrValue != null) {
|
||||
shiyongshouce.value = obj
|
||||
}
|
||||
dataFrom.value.infoList = dataFrom.value.infoList.filter(
|
||||
|
@ -310,7 +310,7 @@
|
|||
dataFrom.value.infoList.push(obj)
|
||||
if (shiyongshouce.value.attrValue) {
|
||||
dataFrom.value.infoList.map((syscitem, syscindex) => {
|
||||
if (syscitem.attrType == '使用手册') {
|
||||
if (syscitem.attrType == '技术文档') {
|
||||
dataFrom.value.infoList[syscindex] = shiyongshouce.value
|
||||
}
|
||||
})
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
import * as fontJs from '/public/static/js/font.js'
|
||||
import { filesUpload } from '@/api/personalCenter'
|
||||
import mybus from '@/myplugins/mybus'
|
||||
let text = ''
|
||||
let text = ref('')
|
||||
let iconfontJs = fontJs
|
||||
const props = defineProps({
|
||||
data: { type: Array, default: null },
|
||||
|
@ -44,11 +44,12 @@
|
|||
// formData.append('name', this.route.currentRoute.query.id + '.md')
|
||||
// FileSaver.saveAs(blob, '开发指南.md')
|
||||
filesUpload(formData).then((resData) => {
|
||||
const res = resData
|
||||
const res = resData.data.data
|
||||
text.value = res
|
||||
mybus.emit('showTextFunctionEmit', false)
|
||||
let infoList = ref({
|
||||
attrType: '使用手册',
|
||||
attrValue: res.data.data,
|
||||
attrType: '技术文档',
|
||||
attrValue: res,
|
||||
delFlag: 0,
|
||||
})
|
||||
mybus.emit('chageDataFrom', infoList.value)
|
||||
|
|
|
@ -246,7 +246,7 @@
|
|||
}
|
||||
init()
|
||||
mybus.on('chageDataFrom', (obj) => {
|
||||
if (obj.attrType == '使用手册' && obj.attrValue != null) {
|
||||
if (obj.attrType == '技术文档' && obj.attrValue != null) {
|
||||
shiyongshouce.value = obj
|
||||
}
|
||||
dataFrom.value.infoList = dataFrom.value.infoList.filter(
|
||||
|
@ -258,7 +258,7 @@
|
|||
dataFrom.value.infoList.push(obj)
|
||||
if (shiyongshouce.value.attrValue) {
|
||||
dataFrom.value.infoList.map((syscitem, syscindex) => {
|
||||
if (syscitem.attrType == '使用手册') {
|
||||
if (syscitem.attrType == '技术文档') {
|
||||
dataFrom.value.infoList[syscindex] = shiyongshouce.value
|
||||
}
|
||||
})
|
||||
|
|
|
@ -146,8 +146,18 @@
|
|||
:list="props.fileList"
|
||||
tip="支持文件类型,大小不超过100M"
|
||||
></upload>
|
||||
<div
|
||||
<upload
|
||||
v-else-if="item.name == '使用手册'"
|
||||
type="文件"
|
||||
btnName="上传附件"
|
||||
:maxCount="1"
|
||||
:data="item"
|
||||
:busType="2"
|
||||
:list="props.fileList2"
|
||||
tip="支持文件类型,大小不超过100M"
|
||||
></upload>
|
||||
<div
|
||||
v-else-if="item.type == 'richText'"
|
||||
@click="showTextFunction()"
|
||||
>
|
||||
上传附件
|
||||
|
|
|
@ -138,6 +138,7 @@
|
|||
let obj = props.dataList.infoList.filter(
|
||||
(item) => item.attrType === '技术文档'
|
||||
)[0]
|
||||
debugger
|
||||
console.log('dataFrom.value.link', obj.attrValue)
|
||||
window.open(
|
||||
window.SITE_CONFIG.previewUrl +
|
||||
|
@ -149,6 +150,7 @@
|
|||
let obj = props.dataList.infoList.filter(
|
||||
(item) => item.attrType === '使用手册'
|
||||
)[0]
|
||||
debugger
|
||||
console.log('dataFrom.value.link', obj.attrValue)
|
||||
window.open(
|
||||
window.SITE_CONFIG.previewUrl +
|
||||
|
|
Loading…
Reference in New Issue