mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-12 12:26:44 +08:00
案例多选
This commit is contained in:
@@ -319,9 +319,6 @@ export default {
|
|||||||
this.queryCondition.orgDomain = null;
|
this.queryCondition.orgDomain = null;
|
||||||
};
|
};
|
||||||
this.specialized();
|
this.specialized();
|
||||||
// this.$nextTick(function() {
|
|
||||||
// this.closeSearch();
|
|
||||||
// });
|
|
||||||
if (!this.portalCase.readProtocol) {
|
if (!this.portalCase.readProtocol) {
|
||||||
this.protocolDialogVisible = true;
|
this.protocolDialogVisible = true;
|
||||||
}
|
}
|
||||||
@@ -333,7 +330,7 @@ export default {
|
|||||||
this.getPopularity();
|
this.getPopularity();
|
||||||
this.searchterm();
|
this.searchterm();
|
||||||
this.getPositive();
|
this.getPositive();
|
||||||
this.getProfess();
|
//this.getProfess();
|
||||||
this.getdomain();
|
this.getdomain();
|
||||||
// this.getCaseData();
|
// this.getCaseData();
|
||||||
this.search();
|
this.search();
|
||||||
@@ -356,26 +353,68 @@ export default {
|
|||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
fieldmajor(item){//专业分类
|
fieldmajor(item){//专业分类
|
||||||
this.majarr.push(item);//搜索条件
|
|
||||||
this.fieldData = Array.from(new Set(this.majarr))//过滤重复的数据
|
|
||||||
this.majsto.push(item.code);
|
|
||||||
this.majorTypeData = this.majsto.toString()//传给后端
|
|
||||||
this.queryCondition.majorType = this.majorTypeData
|
|
||||||
item.fielclass = !item.fielclass;
|
item.fielclass = !item.fielclass;
|
||||||
|
if(item.fielclass){
|
||||||
|
let has=this.fieldData.some(fd=>{
|
||||||
|
return fd.code==item.code;
|
||||||
|
});
|
||||||
|
//console.log(has,'has')
|
||||||
|
if(!has){
|
||||||
|
this.fieldData.push(item);
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
let delIdx=-1;
|
||||||
|
this.fieldData.some((fd,fdidx)=>{
|
||||||
|
if(fd.code==item.code){
|
||||||
|
delIdx=fdidx;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
if(delIdx>-1){
|
||||||
|
this.fieldData.splice(delIdx,1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// this.majarr.push(item);//搜索条件
|
||||||
|
// this.fieldData = Array.from(new Set(this.majarr))//过滤重复的数据
|
||||||
|
// this.majsto.push(item.code);
|
||||||
|
// this.majorTypeData = this.majsto.toString()//传给后端
|
||||||
|
// this.queryCondition.majorType = this.majorTypeData
|
||||||
|
|
||||||
this.getCaseData();
|
this.getCaseData();
|
||||||
// this.lmj();
|
|
||||||
},
|
},
|
||||||
fieldswich(item){//组织领域
|
fieldswich(item){//组织领域
|
||||||
this.Domarr.push(item);//搜索条件
|
console.log(item,'item')
|
||||||
this.fieldData = Array.from(new Set(this.Domarr))//过滤重复的数据
|
item.fielclass = !item.fielclass;
|
||||||
|
if(item.fielclass){
|
||||||
|
let has=this.fieldData.some(fd=>{
|
||||||
|
return fd.code==item.code;
|
||||||
|
});
|
||||||
|
//console.log(has,'has')
|
||||||
|
if(!has){
|
||||||
|
this.fieldData.push(item);
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
let delIdx=-1;
|
||||||
|
this.fieldData.some((fd,fdidx)=>{
|
||||||
|
if(fd.code==item.code){
|
||||||
|
delIdx=fdidx;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
});
|
||||||
|
if(delIdx>-1){
|
||||||
|
this.fieldData.splice(delIdx,1);
|
||||||
|
}
|
||||||
|
}
|
||||||
this.orgsto.push(item.code);
|
this.orgsto.push(item.code);
|
||||||
this.orgDomainData = this.orgsto.toString()//传给后端
|
this.orgDomainData = this.orgsto.toString()//传给后端
|
||||||
this.queryCondition.orgDomain = this.orgDomainData;
|
this.queryCondition.orgDomain = this.orgDomainData;
|
||||||
item.fielclass = !item.fielclass;
|
|
||||||
this.getCaseData();
|
this.getCaseData();
|
||||||
this.lmj();
|
//this.lmj();
|
||||||
},
|
},
|
||||||
lmj(){
|
lmj(){
|
||||||
|
let delindex = -1;
|
||||||
this.fieldData.forEach((item,idx) =>{
|
this.fieldData.forEach((item,idx) =>{
|
||||||
if(item.fielclass == false){
|
if(item.fielclass == false){
|
||||||
console.log(item,'lll')
|
console.log(item,'lll')
|
||||||
@@ -384,7 +423,7 @@ export default {
|
|||||||
// 删除这个为false的item
|
// 删除这个为false的item
|
||||||
this.fieldData.splice(index,1)
|
this.fieldData.splice(index,1)
|
||||||
// console.log(this.fieldData)
|
// console.log(this.fieldData)
|
||||||
this.fieldData.splice(item,1)
|
// this.fieldData.splice(item,1)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
@@ -407,10 +446,11 @@ export default {
|
|||||||
if (res.status == 200) {
|
if (res.status == 200) {
|
||||||
res.result.forEach(item =>{
|
res.result.forEach(item =>{
|
||||||
item.fielclass = false;
|
item.fielclass = false;
|
||||||
|
item.type='major_type';
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
this.speciData = res.result;
|
this.speciData = res.result;
|
||||||
|
this.Profess=res.result;
|
||||||
this.$nextTick(function() {
|
this.$nextTick(function() {
|
||||||
$this.initHeight = document.getElementById("searchBox").offsetHeight;
|
$this.initHeight = document.getElementById("searchBox").offsetHeight;
|
||||||
$this.closeSearch();
|
$this.closeSearch();
|
||||||
@@ -491,6 +531,7 @@ export default {
|
|||||||
if (res.status == 200) {
|
if (res.status == 200) {
|
||||||
res.result.forEach(item =>{
|
res.result.forEach(item =>{
|
||||||
item.fielclass = false;
|
item.fielclass = false;
|
||||||
|
item.type=key;
|
||||||
})
|
})
|
||||||
this.domain = res.result;
|
this.domain = res.result;
|
||||||
if(res.result.length > 0) {
|
if(res.result.length > 0) {
|
||||||
@@ -499,6 +540,7 @@ export default {
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
//删除,不再使用
|
||||||
getProfess() {
|
getProfess() {
|
||||||
let key = "major_type";
|
let key = "major_type";
|
||||||
apiDict.items(key).then(res => {
|
apiDict.items(key).then(res => {
|
||||||
@@ -698,29 +740,51 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
tagsClose(tag, index) {
|
tagsClose(tag, index) {
|
||||||
for (let i in this.queryCondition) {
|
if(tag.type=='org_domain'){
|
||||||
if (tag.type === i) {
|
this.domain.some((m,idx)=>{
|
||||||
if (i == "majorType") {
|
if(m.code=tag.code){
|
||||||
this.queryCondition.majorType = '';
|
m.fielclass=false;
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
if (i == "orgDomain") {
|
return false;
|
||||||
this.queryCondition.orgDomain = '';
|
})
|
||||||
|
}else if(tag.type=='major_type'){
|
||||||
|
this.speciData.some((m,idx)=>{
|
||||||
|
if(m.code=tag.code){
|
||||||
|
m.fielclass=false;
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
if (i == "keyWord") {
|
return false;
|
||||||
|
})
|
||||||
|
}else if(tag.type=='keyWord'){
|
||||||
this.queryCondition.keyWord = "";
|
this.queryCondition.keyWord = "";
|
||||||
this.keyWord = "";
|
this.keyWord = "";
|
||||||
}
|
}
|
||||||
this.queryCondition[i] = "";
|
this.fieldData.splice(index,1);
|
||||||
this.searchTags.splice(index, 1);
|
this.caseData();
|
||||||
if (i == "majorType") {
|
// for (let i in this.queryCondition) {
|
||||||
this.queryCondition.majorType = null;
|
// if (tag.type === i) {
|
||||||
}
|
// if (i == "majorType") {
|
||||||
if (i == "orgDomain") {
|
// this.queryCondition.majorType = '';
|
||||||
this.queryCondition.orgDomain = null;
|
// }
|
||||||
}
|
// if (i == "orgDomain") {
|
||||||
this.getCaseData();
|
// this.queryCondition.orgDomain = '';
|
||||||
}
|
// }
|
||||||
}
|
// if (i == "keyWord") {
|
||||||
|
// this.queryCondition.keyWord = "";
|
||||||
|
// this.keyWord = "";
|
||||||
|
// }
|
||||||
|
// this.queryCondition[i] = "";
|
||||||
|
// this.searchTags.splice(index, 1);
|
||||||
|
// if (i == "majorType") {
|
||||||
|
// this.queryCondition.majorType = null;
|
||||||
|
// }
|
||||||
|
// if (i == "orgDomain") {
|
||||||
|
// this.queryCondition.orgDomain = null;
|
||||||
|
// }
|
||||||
|
// this.getCaseData();
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
|
||||||
},
|
},
|
||||||
getCaseUserData(caseList) {
|
getCaseUserData(caseList) {
|
||||||
|
|||||||
Reference in New Issue
Block a user