|
@@ -144,6 +144,7 @@ export default {
|
|
|
poolDetailList: [[{questionDetailList:[]}],[{questionDetailList:[]}],[],[],[],[]], //默认6个部分
|
|
|
poolDetailListTips: [[],[],[],[],[],[]], //6个部分对应的提示
|
|
|
poolDetailListIds: [[],[],[],[],[],[]], //6个部分对应的id
|
|
|
+ poolDetailListIdsTmp: [[],[],[],[],[],[]], //6个部分对应有自动生成的id
|
|
|
poolDetailListAll:[], //默认6个部分转化为一维数组
|
|
|
activePart: '-1', //选中part第几个
|
|
|
activePartSon:'-1', //选中第几个part中的元素了
|
|
@@ -167,6 +168,7 @@ export default {
|
|
|
this.currentTipLis = this.tipLis
|
|
|
if(tagList.length > 0){
|
|
|
let tmpArr = [[],[],[],[],[],[]];
|
|
|
+ let tmpArrAdd = [[],[],[],[],[],[]];
|
|
|
this.tmpNum = 1
|
|
|
if(this.sign == 2){//杂音修改
|
|
|
if(tagList[0].formPosition == 1){
|
|
@@ -189,6 +191,11 @@ export default {
|
|
|
tmpArr[1].push(sticArr)
|
|
|
tmpArr[idx+1] = val.questionMapping
|
|
|
}
|
|
|
+ if(idx >1){
|
|
|
+ tmpArrAdd[idx].push(val.id)//既往史自动生成的id
|
|
|
+ }else{
|
|
|
+ tmpArrAdd[idx]=[]
|
|
|
+ }
|
|
|
})
|
|
|
}else if(tagList[0].formPosition == 1 && tagList[1].tagType == 1){ //第一条为互斥项,第二条是伴无 12...
|
|
|
tagList.map((val,idx)=>{
|
|
@@ -197,6 +204,11 @@ export default {
|
|
|
}else{
|
|
|
tmpArr[idx] = val.questionMapping
|
|
|
}
|
|
|
+ if(idx >1){
|
|
|
+ tmpArrAdd[idx].push(val.id)//既往史自动生成的id
|
|
|
+ }else{
|
|
|
+ tmpArrAdd[idx]=[]
|
|
|
+ }
|
|
|
})
|
|
|
}else if(tagList[0].formPosition != 1 && tagList[0].tagType == 1){ //第一条是伴无 2...
|
|
|
tagList.map((val,idx)=>{
|
|
@@ -206,12 +218,22 @@ export default {
|
|
|
}else if(idx > 0){
|
|
|
tmpArr[idx+1] = val.questionMapping
|
|
|
}
|
|
|
+ if(idx >1){
|
|
|
+ tmpArrAdd[idx].push(val.id)//既往史自动生成的id
|
|
|
+ }else{
|
|
|
+ tmpArrAdd[idx]=[]
|
|
|
+ }
|
|
|
})
|
|
|
}else{ //第一条不是互斥项,第二条不是伴无 3...
|
|
|
tmpArr[0].push({questionDetailList:[]})
|
|
|
tmpArr[1].push({questionDetailList:[]})
|
|
|
tagList.map((val,idx)=>{
|
|
|
tmpArr[idx+2] = val.questionMapping
|
|
|
+ if(idx >1){
|
|
|
+ tmpArrAdd[idx].push(val.id)//既往史自动生成的id
|
|
|
+ }else{
|
|
|
+ tmpArrAdd[idx]=[]
|
|
|
+ }
|
|
|
})
|
|
|
}
|
|
|
}else{ //有且只有一条
|
|
@@ -225,10 +247,12 @@ export default {
|
|
|
tmpArr[0].push(sticArr)
|
|
|
tmpArr[1].push(sticArr)
|
|
|
tmpArr[2] = tagList[0].questionMapping
|
|
|
+ tmpArrAdd[2].push(tagList[0].id)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
this.poolDetailList = tmpArr
|
|
|
+ this.poolDetailListIdsTmp = tmpArrAdd
|
|
|
this.poolDetailListAll = Array.prototype.concat.apply([],this.poolDetailList); //二维转一维
|
|
|
this.searchTagList()
|
|
|
this.getPoolDetailListTips();
|
|
@@ -281,6 +305,7 @@ export default {
|
|
|
this.poolDetailList = [[{questionDetailList:[]}],[{questionDetailList:[]}],[],[],[],[]]
|
|
|
this.poolDetailListTips = [[],[],[],[],[],[]]
|
|
|
this.poolDetailListIds = [[],[],[],[],[],[]]
|
|
|
+ this.poolDetailListIdsTmp =[[],[],[],[],[],[]]
|
|
|
this.poolDetailListAll=[]
|
|
|
this.activePart='-1'
|
|
|
this.activePartSon='-1'
|
|
@@ -333,23 +358,30 @@ export default {
|
|
|
}else if((this.choose == 'multiple') && (utils.filterArr(this.selectArr,true,2) && this.poolDetailList[this.activePart].length > 0) || (this.multipleItem.length > 0)){
|
|
|
if(this.activePart != -1){
|
|
|
let tmparr = this.poolDetailList;
|
|
|
+ let tmpAddIds = this.poolDetailListIdsTmp;
|
|
|
if(this.activePart == 0 || this.activePart == 1){
|
|
|
tmparr[this.activePart] = [{questionDetailList:[]}]
|
|
|
}else{
|
|
|
tmparr[this.activePart] = []
|
|
|
+ tmpAddIds[this.activePart] = []
|
|
|
}
|
|
|
this.poolDetailList = tmparr;
|
|
|
+ this.poolDetailListIdsTmp = tmpAddIds
|
|
|
this.poolDetailListAll = Array.prototype.concat.apply([],this.poolDetailList); //二维转一维
|
|
|
this.searchTagList();
|
|
|
this.currentLis = [];
|
|
|
this.getPoolDetailListTips();
|
|
|
}else{
|
|
|
let tmparr = [],tmpArr = this.poolDetailList[this.activePartSon],tmpArrR = [];
|
|
|
+ let tmpAddIds = this.poolDetailListIdsTmp;
|
|
|
this.multipleItem.map((id)=>{
|
|
|
this.poolDetailListAll = utils.filterArr(this.poolDetailListAll,id,1,1)
|
|
|
this.multipleItem = []
|
|
|
tmpArr = utils.filterArr(tmpArr,id,1,1)
|
|
|
})
|
|
|
+ if(tmpArr.length == 0){
|
|
|
+ tmpAddIds[this.activePartSon] = []
|
|
|
+ }
|
|
|
this.poolDetailList[this.activePartSon] = tmpArr
|
|
|
this.searchTagList();
|
|
|
this.currentLis = [];
|
|
@@ -381,7 +413,7 @@ export default {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- this.$emit('changeActionData',poolDetailListIds, false);
|
|
|
+ this.$emit('changeActionData',poolDetailListIds,this.poolDetailListIdsTmp, false);
|
|
|
if(this.choose == 'multiple'){
|
|
|
this.poolDetailListTips = [[],[],[],[],[],[]]
|
|
|
}else{
|