|
@@ -12,7 +12,7 @@
|
|
|
<a-divider v-if="index!=(detailDataBase.categoryArr.length-1)" class="lineBox" type="vertical" />
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div :class="'approvalBox stateBox'+detailDataBase.versionState" v-if="detailDataBase.versionStateName!=''&&detailDataBase.versionStateName!=null">
|
|
|
+ <div :class="'approvalBox stateBox'+detailDataBase.versionState" v-if="detailDataBase.versionStateName!=''&&detailDataBase.versionStateName!=null&&detailDataBase.versionState!=2">
|
|
|
{{ detailDataBase.versionStateName }}
|
|
|
</div>
|
|
|
</div>
|
|
@@ -31,7 +31,7 @@
|
|
|
<div>点评量</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <div class="button-group" v-if="detailDataBase.actionFlag.indexOf('edit')>-1">
|
|
|
+ <div class="button-group" v-if="false">
|
|
|
<a-button style="background:#406CC4;color:#fff;margin-right: 1.14583vw;" @click="handleSaveClick">提交</a-button>
|
|
|
<a-button @click="$router.back()" style="color: #406CC4;border-color: #406CC4;">取消</a-button>
|
|
|
</div>
|
|
@@ -45,7 +45,7 @@
|
|
|
</div>
|
|
|
<div class="userTopAdd" v-else>
|
|
|
<div class="addTitle">
|
|
|
- <div class="addTitleText">新增专辑</div>
|
|
|
+ <div class="addTitleText">{{ titleData }}</div>
|
|
|
<div class="button-groupAdd">
|
|
|
<a-button style="background:#406CC4;color:#fff;margin-right: 1.25vw;" @click="handleSaveClick">提交</a-button>
|
|
|
<a-button @click="$router.back()" style="color: #406CC4;border-color: #406CC4;">取消</a-button>
|
|
@@ -115,7 +115,7 @@
|
|
|
</div>
|
|
|
<div class="searchBoxContent" v-show="(tapAction==0)">
|
|
|
<div class="DataBoxContent" style="position: relative;">
|
|
|
- <a-input :disabled="!(isAdd||detailDataBase.actionFlag.indexOf('edit')>-1)" @change='detailChange' class="detailBox" v-model="detailData" type="textarea" :autosize="{minRows: 10, maxRows: 26}" placeholder="请输入" >
|
|
|
+ <a-input :disabled="!(isAdd)" @change='detailChange' class="detailBox" v-model="detailData" type="textarea" :autosize="{minRows: 10, maxRows: 26}" placeholder="请输入" >
|
|
|
</a-input>
|
|
|
<div class="rightText">
|
|
|
{{detailNum}}
|
|
@@ -126,14 +126,14 @@
|
|
|
<div class="DataBoxContent">
|
|
|
<div class="albumBox">
|
|
|
<div class="albumBoxLeft">
|
|
|
- <a-button class="creatBtn" @click="addOpen" v-if="showDelete||isAdd">创建目录</a-button>
|
|
|
+ <a-button class="creatBtn" @click="addOpen" v-if="isAdd">创建目录</a-button>
|
|
|
<div class="albumList">
|
|
|
<div v-dragging="{item: item, list:albumArr}" :key="index" :draggable= "true" @click="changeCatalogue(index)" :class="albumIndex==index?'albumitem actionAlbum':'albumitem'" v-for="(item, index) in albumArr">
|
|
|
<div class="leftPoint"></div>
|
|
|
<div class="pointText">{{item.name}}</div>
|
|
|
<div class="albumitemBtn">
|
|
|
- <img src="../../../../image/add.png" v-if="item.actionFlag.indexOf('edit')>-1" class="btnsty" @click="addDataOpen"/>
|
|
|
- <img src="../../../../image/del.png" v-if="item.actionFlag.indexOf('delete')>-1" class="btnstydel" @click.stop="deleteData(index)"/>
|
|
|
+ <img src="../../../../image/add.png" v-if="isAdd" class="btnsty" @click="addDataOpen"/>
|
|
|
+ <img src="../../../../image/del.png" v-if="isAdd" class="btnstydel" @click.stop="deleteData(index)"/>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -296,6 +296,8 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ pkId:'',
|
|
|
+ titleData:'新增专辑',
|
|
|
loading:false,
|
|
|
yelpContent:'',
|
|
|
showDelete:true,//专辑内容是否加移除
|
|
@@ -402,6 +404,7 @@ export default {
|
|
|
}
|
|
|
if(this.$route.query.pkId) {
|
|
|
this.pkId = this.$route.query.pkId
|
|
|
+ this.titleData = '编辑专辑'
|
|
|
this.getInfo()
|
|
|
this.getYelp()
|
|
|
}
|
|
@@ -446,11 +449,16 @@ export default {
|
|
|
},
|
|
|
//回复专辑
|
|
|
replyAlbum(){
|
|
|
+ if(this.yelpContent==''){
|
|
|
+ this.$message.error('未填写点评或回复的内容')
|
|
|
+ return false
|
|
|
+ }
|
|
|
this.reportYelp(this.yelpContent,1,null)
|
|
|
},
|
|
|
//修改评论类型
|
|
|
changeType(){
|
|
|
this.yelpDataList=[]
|
|
|
+ this.yelpPageNum=1
|
|
|
this.getYelp()
|
|
|
},
|
|
|
//评论列表
|
|
@@ -464,168 +472,6 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
album.yelpQuery(getData).then((res) => {
|
|
|
- /*res.result.data = [
|
|
|
- {
|
|
|
- "pkId": "1607226213988474881",
|
|
|
- "state": 1,
|
|
|
- "createName": "夏诗意",
|
|
|
- "createPhoto": "1607226213988474881",
|
|
|
- "content": "评论内容",
|
|
|
- "createTime": "2020-12-01 00:00:00",
|
|
|
- "replyCount": 13,
|
|
|
- open:0,
|
|
|
- replyComment:'',
|
|
|
- "replies": [
|
|
|
- {
|
|
|
- "pkId": "1607226213988475555",
|
|
|
- "state": 1,
|
|
|
- "createName": "夏诗意",
|
|
|
- "createPhoto": "1607226213988474881",
|
|
|
- "content": "评论内容",
|
|
|
- replyComment:'',
|
|
|
- "createTime": "2020-12-01 00:00:00"
|
|
|
- },{
|
|
|
- "pkId": "16072262139888888",
|
|
|
- "state": 1,
|
|
|
- "createName": "夏诗意1",
|
|
|
- "createPhoto": "1607226213988474881",
|
|
|
- "content": "评论内容111",
|
|
|
- replyComment:'',
|
|
|
- "createTime": "2020-12-01 00:00:00"
|
|
|
- },{
|
|
|
- "pkId": "160712338888881",
|
|
|
- "state": 1,
|
|
|
- "createName": "夏诗意1",
|
|
|
- "createPhoto": "1607226213988474881",
|
|
|
- "content": "评论内容111",
|
|
|
- replyComment:'',
|
|
|
- "createTime": "2020-12-01 00:00:00"
|
|
|
- },{
|
|
|
- "pkId": "16072262132452888",
|
|
|
- "state": 1,
|
|
|
- "createName": "夏诗意1",
|
|
|
- "createPhoto": "1607226213988474881",
|
|
|
- "content": "评论内容111",
|
|
|
- replyComment:'',
|
|
|
- "createTime": "2020-12-01 00:00:00"
|
|
|
- },{
|
|
|
- "pkId": "160722624356238888",
|
|
|
- "state": 1,
|
|
|
- "createName": "夏诗意1",
|
|
|
- "createPhoto": "1607226213988474881",
|
|
|
- "content": "评论内容111",
|
|
|
- replyComment:'',
|
|
|
- "createTime": "2020-12-01 00:00:00"
|
|
|
- }
|
|
|
- ]
|
|
|
- },{
|
|
|
- "pkId": "1607226213988474881",
|
|
|
- "state": 1,
|
|
|
- "createName": "夏诗意",
|
|
|
- "createPhoto": "1607226213988474881",
|
|
|
- "content": "评论内容",
|
|
|
- "createTime": "2020-12-01 00:00:00",
|
|
|
- "replyCount": 13,
|
|
|
- open:0,
|
|
|
- replyComment:'',
|
|
|
- "replies": [
|
|
|
- {
|
|
|
- "pkId": "1607226213988475555",
|
|
|
- "state": 1,
|
|
|
- "createName": "夏诗意",
|
|
|
- "createPhoto": "1607226213988474881",
|
|
|
- "content": "评论内容",
|
|
|
- replyComment:'',
|
|
|
- "createTime": "2020-12-01 00:00:00"
|
|
|
- },{
|
|
|
- "pkId": "160722621396234788",
|
|
|
- "state": 1,
|
|
|
- "createName": "夏诗意1",
|
|
|
- "createPhoto": "1607226213988474881",
|
|
|
- "content": "评论内容111",
|
|
|
- replyComment:'',
|
|
|
- "createTime": "2020-12-01 00:00:00"
|
|
|
- },{
|
|
|
- "pkId": "16072262133423788",
|
|
|
- "state": 1,
|
|
|
- "createName": "夏诗意1",
|
|
|
- "createPhoto": "1607226213988474881",
|
|
|
- "content": "评论内容111",
|
|
|
- replyComment:'',
|
|
|
- "createTime": "2020-12-01 00:00:00"
|
|
|
- },{
|
|
|
- "pkId": "160722621334782888",
|
|
|
- "state": 1,
|
|
|
- "createName": "夏诗意1",
|
|
|
- "createPhoto": "1607226213988474881",
|
|
|
- "content": "评论内容111",
|
|
|
- replyComment:'',
|
|
|
- "createTime": "2020-12-01 00:00:00"
|
|
|
- },{
|
|
|
- "pkId": "1607226218907588",
|
|
|
- "state": 1,
|
|
|
- "createName": "夏诗意1",
|
|
|
- "createPhoto": "1607226213988474881",
|
|
|
- "content": "评论内容111",
|
|
|
- replyComment:'',
|
|
|
- "createTime": "2020-12-01 00:00:00"
|
|
|
- }
|
|
|
- ]
|
|
|
- },{
|
|
|
- "pkId": "1607226213988474881",
|
|
|
- "state": 1,
|
|
|
- "createName": "夏诗意",
|
|
|
- "createPhoto": "1607226213988474881",
|
|
|
- "content": "评论内容",
|
|
|
- "createTime": "2020-12-01 00:00:00",
|
|
|
- "replyCount": 13,
|
|
|
- open:0,
|
|
|
- replyComment:'',
|
|
|
- "replies": [
|
|
|
- {
|
|
|
- "pkId": "1607226213988475555",
|
|
|
- "state": 1,
|
|
|
- "createName": "夏诗意",
|
|
|
- "createPhoto": "1607226213988474881",
|
|
|
- "content": "评论内容",
|
|
|
- replyComment:'',
|
|
|
- "createTime": "2020-12-01 00:00:00"
|
|
|
- },{
|
|
|
- "pkId": "1607226278443538",
|
|
|
- "state": 1,
|
|
|
- "createName": "夏诗意1",
|
|
|
- "createPhoto": "1607226213988474881",
|
|
|
- "content": "评论内容111",
|
|
|
- replyComment:'',
|
|
|
- "createTime": "2020-12-01 00:00:00"
|
|
|
- },{
|
|
|
- "pkId": "160722645793488",
|
|
|
- "state": 1,
|
|
|
- "createName": "夏诗意1",
|
|
|
- "createPhoto": "1607226213988474881",
|
|
|
- "content": "评论内容111",
|
|
|
- replyComment:'',
|
|
|
- "createTime": "2020-12-01 00:00:00"
|
|
|
- },{
|
|
|
- "pkId": "160722621233468288",
|
|
|
- "state": 1,
|
|
|
- "createName": "夏诗意1",
|
|
|
- "createPhoto": "1607226213988474881",
|
|
|
- "content": "评论内容111",
|
|
|
- replyComment:'',
|
|
|
- "createTime": "2020-12-01 00:00:00"
|
|
|
- },{
|
|
|
- "pkId": "1607226344647428",
|
|
|
- "state": 1,
|
|
|
- "createName": "夏诗意1",
|
|
|
- "createPhoto": "1607226213988474881",
|
|
|
- "content": "评论内容111",
|
|
|
- replyComment:'',
|
|
|
- "createTime": "2020-12-01 00:00:00"
|
|
|
- }
|
|
|
- ]
|
|
|
- }
|
|
|
- ]*/
|
|
|
res.result.data.forEach(item => {
|
|
|
item.open = 0
|
|
|
item.replyComment = ''
|
|
@@ -634,7 +480,7 @@ export default {
|
|
|
}else{
|
|
|
item.replies.forEach(item0 => {
|
|
|
item0.replyComment = ''
|
|
|
- item0.replyLeft = '【@'+item0.createName+'】'
|
|
|
+ item0.replyLeft = '@'+item0.createName+' '
|
|
|
})
|
|
|
}
|
|
|
})
|
|
@@ -653,13 +499,24 @@ export default {
|
|
|
postData.yelpId = yelpId
|
|
|
}
|
|
|
album.yelp(postData).then((res) => {
|
|
|
- this.getYelp()
|
|
|
+ //this.yelpDataList=[]
|
|
|
+ //this.getYelp()
|
|
|
})
|
|
|
},
|
|
|
//获取详情
|
|
|
getInfo(){
|
|
|
let getData = {pkId:this.pkId}
|
|
|
album.info(getData).then((res) => {
|
|
|
+ this.knowledgeForm.name = res.data.name
|
|
|
+ this.knowledgeForm.cover = res.data.cover
|
|
|
+ this.knowledgeForm.categoryId = []
|
|
|
+ if(res.data.categoryLevel1Id!=null){
|
|
|
+ this.knowledgeForm.categoryId.push(res.data.categoryLevel1Id)
|
|
|
+ }
|
|
|
+ if(res.data.categoryLevel2Id!=null){
|
|
|
+ this.knowledgeForm.categoryId.push(res.data.categoryLevel2Id)
|
|
|
+ }
|
|
|
+ //this.knowledgeForm.cover = res.data.cover
|
|
|
this.detailData = res.data.summary
|
|
|
this.detailDataBase = res.data
|
|
|
this.detailDataBase.categoryArr = this.detailDataBase.categoryName.split('|')
|
|
@@ -669,8 +526,14 @@ export default {
|
|
|
this.tapArr.push({id:2,name:'专辑点评'})
|
|
|
}
|
|
|
if(this.user.userId==this.detailDataBase.ownerId){
|
|
|
- this.tapArr.push({id:3,name:'审批流程'})
|
|
|
+ let testArr = this.tapArr.filter(item=>{return item.id==3})
|
|
|
+ if(testArr.length == 0){
|
|
|
+ this.tapArr.push({id:3,name:'审批流程'})
|
|
|
+ }
|
|
|
}
|
|
|
+ this.tapArr.sort((val0,val1)=>{
|
|
|
+ return (val0.id-val1.id);
|
|
|
+ })
|
|
|
})
|
|
|
},
|
|
|
//获取详情和编辑审批
|
|
@@ -730,7 +593,7 @@ export default {
|
|
|
});
|
|
|
knowledgeForm.catalogues = catalogues
|
|
|
knowledgeForm.categoryId = knowledgeForm.categoryId[(knowledgeForm.categoryId.length-1)]
|
|
|
- if(this.isAdd){
|
|
|
+ if(this.pkId==''){
|
|
|
album.create(knowledgeForm).then((res) => {
|
|
|
if(res.code == 200) {
|
|
|
this.$message.success("保存成功!");
|
|
@@ -739,9 +602,10 @@ export default {
|
|
|
})
|
|
|
}else{
|
|
|
|
|
|
- knowledgeForm.cover = this.detailDataBase.cover
|
|
|
- knowledgeForm.categoryId = this.detailDataBase.categoryLevel2Id
|
|
|
- knowledgeForm.name = this.detailDataBase.name
|
|
|
+ knowledgeForm.cover = this.knowledgeForm.cover
|
|
|
+ //knowledgeForm.categoryId = this.detailDataBase.categoryLevel2Id
|
|
|
+ //knowledgeForm.categoryId = knowledgeForm.categoryId[(knowledgeForm.categoryId.length-1)]
|
|
|
+ knowledgeForm.name = this.knowledgeForm.name
|
|
|
knowledgeForm.pkId = this.detailDataBase.pkId
|
|
|
knowledgeForm.versionId = this.detailDataBase.versionId
|
|
|
album.edit(knowledgeForm).then((res) => {
|
|
@@ -861,6 +725,11 @@ export default {
|
|
|
},
|
|
|
//增加知识
|
|
|
handleOkAdd(){
|
|
|
+ let isHaveArr = this.albumArr[this.albumIndex].dataList.filter(item=>{return item.pkId==this.addDataForm.pkId;})
|
|
|
+ if(isHaveArr.length>0){
|
|
|
+ this.$message.error('当前目录里已经存在这条知识。');
|
|
|
+ return false
|
|
|
+ }
|
|
|
let selectData = this.addDataSelect.filter(item=>{return item.pkId==this.addDataForm.pkId;})[0]
|
|
|
selectData.documentName = selectData.attachmentName
|
|
|
selectData.documentRemark = selectData.summary
|
|
@@ -869,6 +738,7 @@ export default {
|
|
|
selectData.categoryArr = []
|
|
|
this.getCategory(selectData.categoryArr,selectData.knowledgeCategoryAdminVo)
|
|
|
this.albumArr[this.albumIndex].dataList.push(selectData)
|
|
|
+ this.addDataShow = false
|
|
|
},
|
|
|
//新增目录
|
|
|
catalogueHandleOk(){
|