diff --git a/src/views/portal/case/Index.vue b/src/views/portal/case/Index.vue
index 5254ea50..27d92215 100644
--- a/src/views/portal/case/Index.vue
+++ b/src/views/portal/case/Index.vue
@@ -7,10 +7,10 @@
-
+
搜索条件
- {{ tag.value }}
+ {{ tag.name }}
@@ -21,10 +21,14 @@
-
- 全部
- {{ item.name}}
-
+
+
@@ -38,12 +42,16 @@
@@ -278,8 +286,8 @@ export default {
orderField: "views",
// breCommend:null,
keyWord: "",
- majorType:null, //专业分类
- orgDomain: null, // 组织领域
+ majorType:'', //专业分类
+ orgDomain: '', // 组织领域
orderAsc: false,
excellent:false
},
@@ -292,10 +300,20 @@ export default {
isFind: false,
searchTags: [],
orgData: [],
+ fieldData:[],
+ fielclass:true,
+ orgDomainData:'',
+ orgsto:[],
+ majorTypeData:'',
+ majsto:[],
+ Domarr:[],
+ majarr:[],
};
},
mounted() {
+
+
if(this.searchTags.length == 0){
this.queryCondition.majorType = null;
this.queryCondition.orgDomain = null;
@@ -337,6 +355,39 @@ export default {
window.removeEventListener("scroll", this.handleScroll);
},
methods: {
+ 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;
+ this.getCaseData();
+ // this.lmj();
+ },
+ fieldswich(item){//组织领域
+ this.Domarr.push(item);//搜索条件
+ this.fieldData = Array.from(new Set(this.Domarr))//过滤重复的数据
+ this.orgsto.push(item.code);
+ this.orgDomainData = this.orgsto.toString()//传给后端
+ this.queryCondition.orgDomain = this.orgDomainData;
+ item.fielclass = !item.fielclass;
+ this.getCaseData();
+ this.lmj();
+ },
+ lmj(){
+ this.fieldData.forEach((item,idx) =>{
+ if(item.fielclass == false){
+ console.log(item,'lll')
+ let index = this.fieldData.indexOf(item);
+ console.log(index,'index')
+ // 删除这个为false的item
+ this.fieldData.splice(index,1)
+ // console.log(this.fieldData)
+ this.fieldData.splice(item,1)
+ }
+ })
+ },
banJump() {
if(this.resonimg.JumpUrl) {
window.open(this.resonimg.JumpUrl);
@@ -353,6 +404,12 @@ export default {
let $this=this;
apiCase.majorTypes().then(res =>{
if(res.status == 200){
+ if (res.status == 200) {
+ res.result.forEach(item =>{
+ item.fielclass = false;
+
+ })
+ }
this.speciData = res.result;
this.$nextTick(function() {
$this.initHeight = document.getElementById("searchBox").offsetHeight;
@@ -432,6 +489,9 @@ export default {
let key = "org_domain";
apiDict.items(key).then(res => {
if (res.status == 200) {
+ res.result.forEach(item =>{
+ item.fielclass = false;
+ })
this.domain = res.result;
if(res.result.length > 0) {
this.orgDomainLevel(res.result)
@@ -567,6 +627,7 @@ export default {
this.getCaseData();
},
async getCaseData() {
+ // this.fieldData
this.getTags();
if (this.queryCondition.pageIndex == 1) {
this.caseList.list = [];
@@ -637,9 +698,7 @@ export default {
}
},
tagsClose(tag, index) {
-
for (let i in this.queryCondition) {
-
if (tag.type === i) {
if (i == "majorType") {
this.queryCondition.majorType = '';
@@ -659,7 +718,6 @@ export default {
if (i == "orgDomain") {
this.queryCondition.orgDomain = null;
}
-
this.getCaseData();
}
}
@@ -734,6 +792,31 @@ export default {