mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-09 10:56:44 +08:00
案例多选
This commit is contained in:
@@ -22,8 +22,8 @@
|
||||
</div>
|
||||
<div style="flex:1;">
|
||||
<div class="field">
|
||||
<div :class="fielclass ? 'fieldactive' :'' ">全部</div>
|
||||
<div :class="item.fielclass ? 'fieldactive' :'' " @click="fieldswich(item)" v-for="item in domain" :key="item.code">{{item.name}}</div>
|
||||
<div :class="fielclass ? 'fieldactive' :'' " @click="domainall()">全部</div>
|
||||
<div :class="item.fielclass ? 'fieldactive' :'' " @click="fieldswich(item)" v-for="(item,idx) in domain" :key="'t'+ idx">{{item.name}}</div>
|
||||
</div>
|
||||
<!-- <el-checkbox-group v-model="queryCondition.orgDomain" size="mini" @change="search()">
|
||||
<el-checkbox-button :label="null">全部</el-checkbox-button>
|
||||
@@ -43,8 +43,8 @@
|
||||
</div>
|
||||
<div style="flex:1" id="searchBox">
|
||||
<div class="field">
|
||||
<div :class="fielclass ? 'fieldactive' :'' ">全部</div>
|
||||
<div :class="item.fielclass ? 'fieldactive' :'' " @click="fieldmajor(item)" v-for="item in speciData" :key="item.code">{{item.name}}</div>
|
||||
<div :class="fielclassjor ? 'fieldactive' :'' " @click="majorall()">全部</div>
|
||||
<div :class="item.fielclass ? 'fieldactive' :'' " @click="fieldmajor(item)" v-for="(item,idx) in speciData" :key="'d'+idx">{{item.name}}</div>
|
||||
</div>
|
||||
<!-- <el-radio-group style="display:flex;" v-model="queryCondition.majorType" size="mini" @change="search()">
|
||||
<el-radio-button :label="null">全部</el-radio-button>
|
||||
@@ -302,6 +302,7 @@ export default {
|
||||
orgData: [],
|
||||
fieldData:[],
|
||||
fielclass:true,
|
||||
fielclassjor:true,
|
||||
orgDomainData:'',
|
||||
orgsto:[],
|
||||
majorTypeData:'',
|
||||
@@ -312,8 +313,6 @@ export default {
|
||||
},
|
||||
|
||||
mounted() {
|
||||
|
||||
|
||||
if(this.searchTags.length == 0){
|
||||
this.queryCondition.majorType = null;
|
||||
this.queryCondition.orgDomain = null;
|
||||
@@ -352,7 +351,39 @@ export default {
|
||||
window.removeEventListener("scroll", this.handleScroll);
|
||||
},
|
||||
methods: {
|
||||
majorall(){
|
||||
this.fielclassjor=true;
|
||||
if(this.fielclassjor){
|
||||
let narr = this.fieldData;
|
||||
this.fieldData = narr.filter(item => {
|
||||
if(item.type == 'major_type') {
|
||||
console.log(item);
|
||||
item.fielclass = false;
|
||||
return false;
|
||||
}else{
|
||||
return true;
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
domainall(){
|
||||
this.fielclass=true;
|
||||
if(this.fielclass){
|
||||
var newArr = this.fieldData;
|
||||
this.fieldData = newArr.filter(item => {
|
||||
if(item.type == 'org_domain') {
|
||||
console.log(item);
|
||||
item.fielclass = false;
|
||||
return false;
|
||||
console.log(this.fieldData)
|
||||
}else{
|
||||
return true;
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
fieldmajor(item){//专业分类
|
||||
this.fielclassjor = false;
|
||||
item.fielclass = !item.fielclass;
|
||||
if(item.fielclass){
|
||||
let has=this.fieldData.some(fd=>{
|
||||
@@ -384,7 +415,7 @@ export default {
|
||||
this.getCaseData();
|
||||
},
|
||||
fieldswich(item){//组织领域
|
||||
console.log(item,'item')
|
||||
this.fielclass=false;
|
||||
item.fielclass = !item.fielclass;
|
||||
if(item.fielclass){
|
||||
let has=this.fieldData.some(fd=>{
|
||||
@@ -761,30 +792,8 @@ export default {
|
||||
this.keyWord = "";
|
||||
}
|
||||
this.fieldData.splice(index,1);
|
||||
this.caseData();
|
||||
// for (let i in this.queryCondition) {
|
||||
// if (tag.type === i) {
|
||||
// if (i == "majorType") {
|
||||
// this.queryCondition.majorType = '';
|
||||
// }
|
||||
// if (i == "orgDomain") {
|
||||
// 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();
|
||||
// }
|
||||
// }
|
||||
this.getCaseData();
|
||||
|
||||
|
||||
},
|
||||
getCaseUserData(caseList) {
|
||||
|
||||
Reference in New Issue
Block a user