|
@@ -78,13 +78,16 @@
|
|
|
<div class="partWaring">
|
|
|
<ul>
|
|
|
<li v-for="i in 5" :key="i">
|
|
|
- <p v-for="item in poolDetailListTips[i]" class="partDetail tipsWrap ellipsis" v-show="poolDetailListTips[i].length > 0" :key="item">
|
|
|
- <template v-for="section in currentTipLis">
|
|
|
- <span class="tips" v-if="item == section.val" :title="section.name" :key="section.val">{{section.name}}</span>
|
|
|
- </template>
|
|
|
- </p>
|
|
|
+ <template v-for="item in poolDetailListTips[i]" v-show="poolDetailListTips[i].length > 0">
|
|
|
+ <p class="partDetail tipsWrap" :key="item.type">
|
|
|
+ <template v-for="section in currentTipLis">
|
|
|
+ <span v-if="item.type == section.val" :title="section.name" :key="section.val">{{section.name}}</span>
|
|
|
+ </template>
|
|
|
+ </p>
|
|
|
+ <p class="partDetail tipsWrap" :title="item.name" :key="item.type+'--'">{{item.name}}</p>
|
|
|
+ </template>
|
|
|
</li>
|
|
|
- </ul>
|
|
|
+ </ul>
|
|
|
</div>
|
|
|
</div>
|
|
|
<span class="mutex">互斥项</span>
|
|
@@ -153,39 +156,30 @@ export default {
|
|
|
sexType(newVal, preVal) {
|
|
|
if (newVal != preVal) {
|
|
|
if (JSON.stringify(newVal) != JSON.stringify(preVal)) {
|
|
|
- this.poolDetailList = [[],[],[],[],[],[]]
|
|
|
- this.poolDetailListTips = [[],[],[],[],[],[]]
|
|
|
- this.poolDetailListIds = [[],[],[],[],[],[]]
|
|
|
- this.poolDetailListAll=[]
|
|
|
- this.activePart='-1'
|
|
|
- this.activePartSon='-1'
|
|
|
- this.selectArr = [false, false, false, false, false, false]
|
|
|
- this.searchVal= ''
|
|
|
- this.currentPool= []
|
|
|
- this.currentLis=[]
|
|
|
- this.notIds=[]
|
|
|
- this.multipleItem=[]
|
|
|
+ this.clearData()
|
|
|
}
|
|
|
}
|
|
|
},
|
|
|
sign(newVal, preVal) {
|
|
|
if (JSON.stringify(newVal) != JSON.stringify(preVal)) {
|
|
|
- this.poolDetailList = [[],[],[],[],[],[]]
|
|
|
- this.poolDetailListTips = [[],[],[],[],[],[]]
|
|
|
- this.poolDetailListIds = [[],[],[],[],[],[]]
|
|
|
- this.poolDetailListAll=[]
|
|
|
- this.activePart='-1'
|
|
|
- this.activePartSon='-1'
|
|
|
- this.selectArr = [false, false, false, false, false, false]
|
|
|
- this.searchVal= ''
|
|
|
- this.currentPool= []
|
|
|
- this.currentLis=[]
|
|
|
- this.notIds=[]
|
|
|
- this.multipleItem=[]
|
|
|
+ this.clearData()
|
|
|
}
|
|
|
},
|
|
|
type(newVal, preVal) {
|
|
|
if (JSON.stringify(newVal) != JSON.stringify(preVal)) {
|
|
|
+ this.clearData()
|
|
|
+ }
|
|
|
+ },
|
|
|
+ searchVal(newVal, preVal){
|
|
|
+ if(newVal.trim() == ''){
|
|
|
+ this.searchTagList();
|
|
|
+ }else if(newVal.trim() != preVal.trim()){
|
|
|
+ this.searchTagList();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ clearData(){
|
|
|
this.poolDetailList = [[],[],[],[],[],[]]
|
|
|
this.poolDetailListTips = [[],[],[],[],[],[]]
|
|
|
this.poolDetailListIds = [[],[],[],[],[],[]]
|
|
@@ -198,17 +192,7 @@ export default {
|
|
|
this.currentLis=[]
|
|
|
this.notIds=[]
|
|
|
this.multipleItem=[]
|
|
|
- }
|
|
|
},
|
|
|
- searchVal(newVal, preVal){
|
|
|
- if(newVal.trim() == ''){
|
|
|
- this.searchTagList();
|
|
|
- }else if(newVal.trim() != preVal.trim()){
|
|
|
- this.searchTagList();
|
|
|
- }
|
|
|
- }
|
|
|
- },
|
|
|
- methods: {
|
|
|
selectTagOne(e,id,n){
|
|
|
e.stopPropagation()
|
|
|
this.activePartSon = n
|
|
@@ -279,9 +263,11 @@ export default {
|
|
|
let tmpLis = list[i];
|
|
|
if(tmpLis.length > 0){
|
|
|
for(let j = 0;j < tmpLis.length;j++){
|
|
|
- let tmpLi = list[i][j];
|
|
|
+ let tmpLi = list[i][j],objTmp={};
|
|
|
if(!utils.filterArr(poolDetailListTips[i],tmpLi.controlType,2)){
|
|
|
- poolDetailListTips[i].push(tmpLi.controlType)
|
|
|
+ objTmp.type = tmpLi.controlType
|
|
|
+ objTmp.name = tmpLi.name
|
|
|
+ poolDetailListTips[i].push(objTmp)
|
|
|
}
|
|
|
poolDetailListIds[i].push(tmpLi.id)
|
|
|
}
|
|
@@ -401,6 +387,14 @@ export default {
|
|
|
tmpArr.push(res.data.data[idStr]);
|
|
|
this.selectArr.map((flg,idx)=>{ //判断右侧有没有选中
|
|
|
if(flg){ //有选中
|
|
|
+ if(idx == 0 && res.data.data[idStr].questionDetailList && res.data.data[idStr].questionDetailList.length > 1){
|
|
|
+ this.$message({
|
|
|
+ showClose: true,
|
|
|
+ message: '添加的数据有误',
|
|
|
+ type: 'error'
|
|
|
+ });
|
|
|
+ return;
|
|
|
+ }
|
|
|
let ids = [];
|
|
|
this.poolDetailList[idx] = tmpArr;
|
|
|
this.poolDetailListAll = Array.prototype.concat.apply([],this.poolDetailList); //二维转一维
|
|
@@ -416,7 +410,7 @@ export default {
|
|
|
this.poolDetailListAll = Array.prototype.concat.apply([],this.poolDetailList);
|
|
|
this.searchTagList();
|
|
|
this.getPoolDetailListTips();
|
|
|
- return
|
|
|
+ return;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -430,7 +424,7 @@ export default {
|
|
|
})
|
|
|
this.selectArr.map((flg,idx)=>{ //判断右侧有没有选中
|
|
|
if(flg){ //有选中
|
|
|
- this.poolDetailList[idx] = tmpArr;
|
|
|
+ this.poolDetailList[idx] = (this.poolDetailList[idx]).concat(tmpArr);
|
|
|
this.poolDetailListAll = Array.prototype.concat.apply([],this.poolDetailList); //二维转一维
|
|
|
this.searchTagList();
|
|
|
this.getPoolDetailListTips();
|