|
@@ -31,9 +31,9 @@
|
|
|
<div>点评量</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
- <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 class="button-group" v-if="detailDataBase.actionFlag.indexOf('edit')>-1">
|
|
|
+ <a-button style="background:#406CC4;color:#fff;margin-right: 1.14583vw;" @click="changeEdite">编辑</a-button>
|
|
|
+ <a-button @click="$router.back()" style="color: #406CC4;border-color: #406CC4;display: none;">取消</a-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="userEnd">
|
|
@@ -48,7 +48,7 @@
|
|
|
<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>
|
|
|
+ <a-button @click="goBack" style="color: #406CC4;border-color: #406CC4;">取消</a-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
<a-form-model labelAlign="right" ref="knowledgeRef" :rules="knowledgeRules" :model="knowledgeForm" layout="inline" >
|
|
@@ -115,7 +115,7 @@
|
|
|
</div>
|
|
|
<div class="searchBoxContent" v-show="(tapAction==0)">
|
|
|
<div class="DataBoxContent" style="position: relative;">
|
|
|
- <a-input :disabled="!(isAdd)" @change='detailChange' class="detailBox" v-model="detailData" type="textarea" :autosize="{minRows: 10, maxRows: 26}" placeholder="请输入" >
|
|
|
+ <a-input maxLength="500" :disabled="!(isAdd)" @change='detailChange' class="detailBox" v-model="detailData" type="textarea" :autosize="{minRows: 10, maxRows: 26}" placeholder="请输入" >
|
|
|
</a-input>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -125,7 +125,7 @@
|
|
|
<div class="albumBoxLeft">
|
|
|
<a-button class="creatBtn" @click="addOpen" v-if="isAdd">创建目录</a-button>
|
|
|
<div class="albumList" v-if="isAdd">
|
|
|
- <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 v-dragging="{item: item, list:albumArr}" :key="index" :draggable= "true" @click="changeCatalogue(index)" :class="albumPkId==item.pkId?'albumitem actionAlbum':'albumitem'" v-for="(item, index) in albumArr">
|
|
|
<div class="leftPoint"></div>
|
|
|
<div class="pointText">{{item.name}}</div>
|
|
|
<div class="albumitemBtn">
|
|
@@ -135,7 +135,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="albumList" v-else>
|
|
|
- <div :key="index" @click="changeCatalogue(index)" :class="albumIndex==index?'albumitem actionAlbum':'albumitem'" v-for="(item, index) in albumArr">
|
|
|
+ <div :key="index" @click="changeCatalogue(index)" :class="albumPkId==item.pkId?'albumitem actionAlbum':'albumitem'" v-for="(item, index) in albumArr">
|
|
|
<div class="leftPoint0"></div>
|
|
|
<div class="pointText">{{item.name}}</div>
|
|
|
</div>
|
|
@@ -218,7 +218,7 @@
|
|
|
:confirmLoading="saveLoading">
|
|
|
<a-form :model="catalogueForm" layout="inline" :label-col="{ span: 5 }">
|
|
|
<a-form-item prop="name" style="margin-top:10px;" label="目录名称">
|
|
|
- <a-input v-model="catalogueForm.name" placeholder="请输入" />
|
|
|
+ <a-input v-model="catalogueForm.name" placeholder="请输入" maxLength="20"/>
|
|
|
</a-form-item>
|
|
|
<a-form-item prop="solt" style="margin-top:10px;" label="排序">
|
|
|
<a-input-number :min="1" v-model="catalogueForm.solt" placeholder="请输入" />
|
|
@@ -395,8 +395,8 @@ export default {
|
|
|
{}
|
|
|
],
|
|
|
albumArr:[
|
|
|
-
|
|
|
],
|
|
|
+ albumPkId:'',
|
|
|
albumIndex:0,
|
|
|
dataList:[],
|
|
|
yelpPageNum:1,
|
|
@@ -432,6 +432,7 @@ export default {
|
|
|
this.albumArr.forEach((item,index) => {
|
|
|
item.solt=soltArr[index]
|
|
|
})
|
|
|
+ //this.dataList = this.albumArr[this.albumIndex].dataList
|
|
|
// 将排序后的结果重新赋值
|
|
|
//this.albumArr = result.value.list;
|
|
|
});
|
|
@@ -560,7 +561,7 @@ export default {
|
|
|
this.approverData = res.data.flows
|
|
|
})
|
|
|
album.catalogue(getData).then((res) => {
|
|
|
- res.data.forEach(item => {
|
|
|
+ res.data.forEach((item,index) => {
|
|
|
item.contents.forEach(item => {
|
|
|
item.categoryArr = item.category.split("|")
|
|
|
item.titles = item.title
|
|
@@ -571,13 +572,25 @@ export default {
|
|
|
}
|
|
|
})
|
|
|
item.dataList=item.contents
|
|
|
+ item.solt=index+1
|
|
|
})
|
|
|
this.albumArr = res.data
|
|
|
+ this.albumPkId = this.albumArr[this.albumIndex].pkId
|
|
|
this.dataList = this.albumArr[this.albumIndex].dataList
|
|
|
this.showDelete = this.albumArr[this.albumIndex].actionFlag.indexOf('delete')>-1
|
|
|
//this.showDelete = true
|
|
|
})
|
|
|
},
|
|
|
+ changeEdite(){
|
|
|
+ this.isAdd = true
|
|
|
+ },
|
|
|
+ goBack(){
|
|
|
+ if(this.$route.query.isAdd==1){
|
|
|
+ this.$router.back()
|
|
|
+ }else{
|
|
|
+ this.isAdd = false
|
|
|
+ }
|
|
|
+ },
|
|
|
//上传图片
|
|
|
handleSaveClick(){
|
|
|
//const hide = this.$message.loading('验证码发送中..', 0)
|
|
@@ -666,6 +679,7 @@ export default {
|
|
|
},
|
|
|
changeCatalogue(num){
|
|
|
this.albumIndex = num
|
|
|
+ this.albumPkId = this.albumArr[this.albumIndex].pkId
|
|
|
this.dataList = this.albumArr[this.albumIndex].dataList
|
|
|
},
|
|
|
titlesChange(){
|
|
@@ -725,6 +739,11 @@ export default {
|
|
|
this.delVisible = true
|
|
|
},
|
|
|
addOpen(){
|
|
|
+ if(this.albumArr.length==0){
|
|
|
+ this.catalogueForm.solt = 1
|
|
|
+ }else{
|
|
|
+ this.catalogueForm.solt = Number(this.albumArr[this.albumArr.length-1].solt)+1
|
|
|
+ }
|
|
|
this.catalogueShow = true
|
|
|
},
|
|
|
addDataOpen(){
|
|
@@ -759,9 +778,10 @@ export default {
|
|
|
let pushEnd = false
|
|
|
that.catalogueForm.dataList = []
|
|
|
let catalogueForm = JSON.parse(JSON.stringify(that.catalogueForm))
|
|
|
+ catalogueForm.pkId = Date.parse(new Date())
|
|
|
for (let index = 0; index < that.albumArr.length; index++) {
|
|
|
let element = that.albumArr[index]
|
|
|
- if(element.solt>catalogueForm.solt||element.solt==catalogueForm.solt){
|
|
|
+ if(element.solt>catalogueForm.solt){
|
|
|
pushEnd = true
|
|
|
that.albumArr.splice(index,0,catalogueForm)
|
|
|
break;
|
|
@@ -771,6 +791,9 @@ export default {
|
|
|
if(!pushEnd){
|
|
|
that.albumArr.push(catalogueForm)
|
|
|
}
|
|
|
+ if(that.albumArr.length==1){
|
|
|
+ that.albumPkId = that.albumArr[0].pkId
|
|
|
+ }
|
|
|
that.catalogueShow=false
|
|
|
},
|
|
|
//知识分类转化
|
|
@@ -1115,7 +1138,7 @@ export default {
|
|
|
margin-bottom: 2vw;
|
|
|
}
|
|
|
.tableBoxAlbum /deep/.ant-table-thead{
|
|
|
- height: 3.69791vw;
|
|
|
+ height: 4.69791vw;
|
|
|
font-size: 0.9375vw;
|
|
|
color: #202124;
|
|
|
background: #F9F9FA;
|