提交 dbf21160 authored 作者: 翟畅's avatar 翟畅

zc纸质书编辑

上级 1a11017d
...@@ -638,42 +638,42 @@ export default { ...@@ -638,42 +638,42 @@ export default {
this.getPDFList() this.getPDFList()
}, },
// 自定义标签 // 自定义标签
getLabel() { getLabel() {
labelListAPI(this.labelQuery).then(res => { labelListAPI(this.labelQuery).then(res => {
if(res.data.code == 0) { if(res.data.code == 0) {
if(this.dataForm.labelContentDiyTypeIds && this.dataForm.labelContentDiyTypeIds.length>0){//查看或者修改 if(this.dataForm.labelContentDiyTypeIds && this.dataForm.labelContentDiyTypeIds.length>0){//查看或者修改
res.data.data.list.map(el =>{ res.data.data.list.map(el =>{
el.list.map(item =>{ el.list.map(item =>{
this.dataForm.labelContentDiyTypeIds.map(info => { this.dataForm.labelContentDiyTypeIds.map(info => {
if(item.id == info){ if(item.id == info){
if(el.selectId && el.selectId.length>0){ if(el.selectId && el.selectId.length>0){
el.selectId.push(info) el.selectId.push(info)
} else{
el.selectId = []
el.selectId.push(info)
}
} else{ } else{
if(!el.selectId){ el.selectId = []
el.selectId = [] el.selectId.push(info)
}
} }
}) } else{
if(!el.selectId){
el.selectId = []
}
}
}) })
}) })
if(this.$route.query.detailsId){//查看 })
res.data.data.list = res.data.data.list.filter(item => (item.selectId && item.selectId.length>0)) if(this.$route.query.detailsId){//查看
} res.data.data.list = res.data.data.list.filter(item => (item.selectId && item.selectId.length>0))
} else{
res.data.data.list.map(el =>{
if(!el.selectId){
el.selectId = []
}
})
} }
this.labelList = res.data.data.list } else{
res.data.data.list.map(el =>{
if(!el.selectId){
el.selectId = []
}
})
} }
}) this.labelList = res.data.data.list
}, }
})
},
}, },
} }
</script> </script>
......
...@@ -180,7 +180,6 @@ ...@@ -180,7 +180,6 @@
<div> <div>
<el-form-item label="商品图片:" class="clear img_list"> <el-form-item label="商品图片:" class="clear img_list">
<el-upload <el-upload
:class="{hidePlay:dataForm.imgList.length>3}"
:action="`${fileUrl}upload`" :action="`${fileUrl}upload`"
list-type="picture-card" list-type="picture-card"
:file-list="playFileList" :file-list="playFileList"
...@@ -258,7 +257,6 @@ export default { ...@@ -258,7 +257,6 @@ export default {
diyTypeCode: [], diyTypeCode: [],
id: null, id: null,
author: null, author: null,
authorList: [],
bookCatalog: null, bookCatalog: null,
realPrice: '', realPrice: '',
translator: null, translator: null,
...@@ -357,14 +355,6 @@ export default { ...@@ -357,14 +355,6 @@ export default {
translatorList: [], translatorList: [],
labelWidth: '140px', labelWidth: '140px',
authors: [], authors: [],
authorForm: {
authorList: [
{
author: null,
authorId: null
}
]
},
} }
}, },
created() { created() {
...@@ -399,7 +389,7 @@ export default { ...@@ -399,7 +389,7 @@ export default {
} }
isbnGetBookAPI(this.book_isbn).then(res => { isbnGetBookAPI(this.book_isbn).then(res => {
if(res.data.code == 0){ if(res.data.code == 0){
let {id,name,isbn,publisher,publishTime,keywords,cover,authorList,translator,executiveEditor,bookSeries,revision,fontCount,synopsis,productRecommendation,editRecommendation,digest,bookCatalog} = res.data.data let {id,name,isbn,publisher,publishTime,keywords,cover,author,translator,executiveEditor,bookSeries,revision,fontCount,synopsis,productRecommendation,editRecommendation,digest,bookCatalog} = res.data.data
this.dataForm.ebookId = id this.dataForm.ebookId = id
this.dataForm.name = name this.dataForm.name = name
this.dataForm.isbn = isbn this.dataForm.isbn = isbn
...@@ -408,10 +398,7 @@ export default { ...@@ -408,10 +398,7 @@ export default {
this.dataForm.publishTime = publishTime this.dataForm.publishTime = publishTime
this.dataForm.keywords = keywords this.dataForm.keywords = keywords
this.dataForm.cover = cover this.dataForm.cover = cover
this.dataForm.authorList = authorList this.dataForm.author = author
if(authorList && authorList.length > 0) {
this.authorForm.authorList = authorList
}
this.dataForm.translator = translator this.dataForm.translator = translator
this.dataForm.executiveEditor = executiveEditor this.dataForm.executiveEditor = executiveEditor
this.dataForm.bookSeries = bookSeries this.dataForm.bookSeries = bookSeries
...@@ -446,10 +433,6 @@ export default { ...@@ -446,10 +433,6 @@ export default {
}) })
this.dataForm.diyTypeCode = arr this.dataForm.diyTypeCode = arr
} }
if(this.dataForm.authorList.length > 0) {
this.authorForm.authorList = res.data.data.authorList
this.dataForm.author = res.data.data.authorList[0].author
}
let imgList = [] let imgList = []
this.playFileList = [] this.playFileList = []
let arrImg = [1,2,3,4,5] let arrImg = [1,2,3,4,5]
...@@ -486,14 +469,14 @@ export default { ...@@ -486,14 +469,14 @@ export default {
}) })
}, },
choiceAuthor(authorList) { //选择作者 // choiceAuthor(authorList) { //选择作者
this.authors = [] // this.authors = []
authorList.forEach(item => { // authorList.forEach(item => {
if(item.author){ // if(item.author){
this.authors.push(item) // this.authors.push(item)
} // }
}) // })
}, // },
tabClick(key,value) { //tab切换 tabClick(key,value) { //tab切换
this.tabId = value this.tabId = value
}, },
...@@ -512,15 +495,6 @@ export default { ...@@ -512,15 +495,6 @@ export default {
return return
} }
} }
if(this.dataForm.author){
let author = {
author:this.dataForm.author,
}
this.dataForm.authorList = [author]
}else{
this.dataForm.authorList = []
}
if(this.createdFlag){ //新建 if(this.createdFlag){ //新建
bookSaveAPI(this.dataForm).then(res =>{ bookSaveAPI(this.dataForm).then(res =>{
if (res.data.code === 0) { if (res.data.code === 0) {
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论