|
@@ -37,7 +37,7 @@
|
|
|
v-if="choose == 'single'"
|
|
|
>
|
|
|
<template v-for="item in poolDetailList[0]">
|
|
|
- <span class="hzx ellipsis" v-for="part in item.questionDetailList" :title="'[ '+item.name+' ]'" :key="part.id">{{part.name}}</span>
|
|
|
+ <!-- <span class="hzx ellipsis" v-for="part in item.questionDetailList" :title="'[ '+item.name+' ]'" :key="part.id">{{part.name}}</span> -->
|
|
|
</template>
|
|
|
</div>
|
|
|
<div
|
|
@@ -46,14 +46,14 @@
|
|
|
@click="selectPart(0)"
|
|
|
v-else
|
|
|
>
|
|
|
- <span class="hzx ellipsis" v-for="item in poolDetailList[0][0].questionDetailList" :title="'[ '+item.name+' ]'" v-show="choose == 'multiple'" :key="item.id">{{item.name}}</span>
|
|
|
+ <!-- <span class="hzx ellipsis" v-for="item in poolDetailList[0][0].questionDetailList" :title="'[ '+item.name+' ]'" v-show="choose == 'multiple'" :key="item.id">{{item.name}}</span> -->
|
|
|
</div>
|
|
|
<div class="onlyBottom pubList">
|
|
|
<ul class="clearfix">
|
|
|
<li v-for="n in 5"
|
|
|
:key="n + 'part'"
|
|
|
class="onlyBottomPart "
|
|
|
- :class="selectArr[n]?'activeBgc':null"
|
|
|
+ :class="selectArr[n]?'activeBgc':(n==1 && sign == 6?'activeBgcF5':'')"
|
|
|
:style="{borderRight:n==5?'0':''}"
|
|
|
@click="selectPart(n)"
|
|
|
>
|
|
@@ -89,7 +89,7 @@
|
|
|
<span v-if="item.type == section.val" :title="section.name" :key="section.val">{{section.name}}</span>
|
|
|
</template>
|
|
|
</p>
|
|
|
- <p class="partDetail tipsWrap" :title="item.join" :key="item.join+'--'" v-if="!!item.join">标签之间链接{{item.join}}</p>
|
|
|
+ <p class="partDetail tipsWrap" :title="item.join" :key="item.join+'--'" v-if="!!item.join">标签之间链接{{item.join}}</p>
|
|
|
<p class="partDetail tipsWrap" :title="item.name" :key="item.type+'--'" v-if="!!item.name">{{item.name}}</p>
|
|
|
</template>
|
|
|
</li>
|
|
@@ -134,10 +134,6 @@ export default {
|
|
|
type: Array
|
|
|
}
|
|
|
},
|
|
|
-
|
|
|
- destroyed:function(){
|
|
|
- this.searchVal = ''
|
|
|
- },
|
|
|
data() {
|
|
|
return {
|
|
|
poolDetailList: [[{questionDetailList:[]}],[{questionDetailList:[]}],[],[],[],[]], //默认6个部分
|
|
@@ -254,11 +250,6 @@ export default {
|
|
|
this.clearData()
|
|
|
}
|
|
|
},
|
|
|
- type(newVal, preVal) {
|
|
|
- if (JSON.stringify(newVal) != JSON.stringify(preVal) && this.tmpNum != 1) {
|
|
|
- // this.clearData()
|
|
|
- }
|
|
|
- },
|
|
|
searchVal(newVal, preVal){
|
|
|
if(newVal.trim() == ''){
|
|
|
this.searchTagList();
|
|
@@ -269,7 +260,7 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
clearData(){
|
|
|
- this.poolDetailList = [[],[],[],[],[],[]]
|
|
|
+ this.poolDetailList = [[{questionDetailList:[]}],[{questionDetailList:[]}],[],[],[],[]]
|
|
|
this.poolDetailListTips = [[],[],[],[],[],[]]
|
|
|
this.poolDetailListIds = [[],[],[],[],[],[]]
|
|
|
this.poolDetailListAll=[]
|
|
@@ -303,17 +294,14 @@ export default {
|
|
|
},
|
|
|
toRightPool(){
|
|
|
if(this.currentLis.length == 0){
|
|
|
- this.$message({
|
|
|
- showClose: true,
|
|
|
- message: '请选择标签池标签',
|
|
|
- type: 'warning'
|
|
|
- });
|
|
|
+ // this.$message({
|
|
|
+ // showClose: true,
|
|
|
+ // message: '请选择标签池标签',
|
|
|
+ // type: 'warning'
|
|
|
+ // });
|
|
|
return;
|
|
|
}
|
|
|
this.getRightListDes();
|
|
|
- if(this.choose == 'multiple'){
|
|
|
- // this.getRightListDes();
|
|
|
- }
|
|
|
},
|
|
|
toLeftPool(){ //往左返回数据
|
|
|
if(this.choose == 'single' && utils.filterArr(this.selectArr,true,2) && this.poolDetailList[this.activePart].length > 0){
|
|
@@ -454,7 +442,7 @@ export default {
|
|
|
++plus2
|
|
|
if(plus2 == 5){ //右侧数据填满了
|
|
|
// alert('请选择需要修改的模块')
|
|
|
- return;
|
|
|
+ // return;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -492,7 +480,7 @@ export default {
|
|
|
this.$message({
|
|
|
showClose: true,
|
|
|
message: '添加的数据有误',
|
|
|
- type: 'error'
|
|
|
+ type: 'warning'
|
|
|
});
|
|
|
return;
|
|
|
}
|
|
@@ -506,7 +494,7 @@ export default {
|
|
|
if(num == 6){
|
|
|
for(let i = 1;i < this.poolDetailList.length;i++){
|
|
|
let ids = [];
|
|
|
- if(this.poolDetailList[i].length == 0 || (this.poolDetailList[i].length > 0 && !this.poolDetailList[i].id)){ //判断part里面是不是有数据,没有直接添加
|
|
|
+ if(this.poolDetailList[i].length == 0 || (this.poolDetailList[i].length > 0 && !this.poolDetailList[i][0].id)){ //判断part里面是不是有数据,没有直接添加
|
|
|
this.poolDetailList[i] = tmpArr;
|
|
|
this.poolDetailListAll = Array.prototype.concat.apply([],this.poolDetailList);
|
|
|
this.searchTagList();
|
|
@@ -524,13 +512,40 @@ export default {
|
|
|
this.currentLis.map((id)=>{
|
|
|
tmpArr.push(res.data.data[id]);
|
|
|
})
|
|
|
- // console.log(tmpArr,'多选既往史')
|
|
|
+ console.log(tmpArr,'多选既往史')
|
|
|
this.selectArr.map((flg,idx)=>{ //判断右侧有没有选中
|
|
|
if(flg){ //有选中
|
|
|
if(idx == 0 || idx == 1){
|
|
|
- this.poolDetailList[idx] = tmpArr;
|
|
|
+ if(tmpArr.length > 1){
|
|
|
+ this.$message({
|
|
|
+ showClose: true,
|
|
|
+ message: '添加的数据有误',
|
|
|
+ type: 'warning'
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }else{
|
|
|
+ if((idx == 0 && (tmpArr[0].questionDetailList && tmpArr[0].questionDetailList.length > 1)) || (idx == 1 && (tmpArr[0].tagType != 1 && tmpArr[0].tagType != 2))){ //第一列
|
|
|
+ this.$message({
|
|
|
+ showClose: true,
|
|
|
+ message: '添加的数据有误',
|
|
|
+ type: 'warning'
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }else{
|
|
|
+ this.poolDetailList[idx] = tmpArr;
|
|
|
+ }
|
|
|
+ }
|
|
|
}else{
|
|
|
- this.poolDetailList[idx] = (this.poolDetailList[idx]).concat(tmpArr);
|
|
|
+ if(tmpArr[0].tagType == 1){
|
|
|
+ this.$message({
|
|
|
+ showClose: true,
|
|
|
+ message: '添加的数据有误',
|
|
|
+ type: 'warning'
|
|
|
+ });
|
|
|
+ return
|
|
|
+ }else{
|
|
|
+ this.poolDetailList[idx] = (this.poolDetailList[idx]).concat(tmpArr);
|
|
|
+ }
|
|
|
}
|
|
|
this.poolDetailListAll = Array.prototype.concat.apply([],this.poolDetailList); //二维转一维
|
|
|
this.searchTagList();
|
|
@@ -538,14 +553,23 @@ export default {
|
|
|
}else{
|
|
|
++num;
|
|
|
if(num == 6){
|
|
|
- for(let i = 2;i < this.poolDetailList.length;i++){
|
|
|
- let ids = [];
|
|
|
- if(this.poolDetailList[i].length == 0){ //判断part里面是不是有数据,没有直接添加
|
|
|
- this.poolDetailList[i] = tmpArr;
|
|
|
- this.poolDetailListAll = Array.prototype.concat.apply([],this.poolDetailList);
|
|
|
- this.searchTagList();
|
|
|
- this.getPoolDetailListTips();
|
|
|
- return;
|
|
|
+ if(tmpArr[0].tagType == 1){
|
|
|
+ this.$message({
|
|
|
+ showClose: true,
|
|
|
+ message: '添加的数据有误',
|
|
|
+ type: 'warning'
|
|
|
+ });
|
|
|
+ return
|
|
|
+ }else{
|
|
|
+ for(let i = 2;i < this.poolDetailList.length;i++){
|
|
|
+ let ids = [];
|
|
|
+ if(this.poolDetailList[i].length == 0){ //判断part里面是不是有数据,没有直接添加
|
|
|
+ this.poolDetailList[i] = tmpArr;
|
|
|
+ this.poolDetailListAll = Array.prototype.concat.apply([],this.poolDetailList);
|
|
|
+ this.searchTagList();
|
|
|
+ this.getPoolDetailListTips();
|
|
|
+ return;
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
}
|