@@ -137,9 +93,7 @@
-
{{item.summary}}
-
@@ -270,6 +224,7 @@ import author from '@/components/Portal/authorInfo.vue';
import apiCase from '@/api/modules/cases.js';
import apiUser from '@/api/system/user.js';
import apiSearchterm from "@/api/modules/searchterm.js";
+import { deepClone } from "../../../utils";
import apiDict from "@/api/modules/dict.js"
export default {
name: 'index',
@@ -313,8 +268,10 @@ export default {
pageIndex:1,
pageSize:10,
orderField:'',
- breCommend:null,
- keyWord:''
+ // breCommend:null,
+ keyWord:'',
+ majorType:null,//专业分类
+ orgDomain:null,// 组织领域
},
keyWord:'',
anking: 2,
@@ -326,7 +283,7 @@ export default {
searchTags: []
};
},
-
+
mounted() {
this.$nextTick(function() {
this.closeSearch();
@@ -361,7 +318,7 @@ export default {
window.removeEventListener("scroll",this.handleScroll);
},
methods: {
-
+
tagsClose(tag, index){
},
@@ -489,6 +446,7 @@ export default {
this.getCaseData();
},
async getCaseData(){
+ this.getTags();
let isTopList = [];
let caseList = [];
await apiCase.queryList(this.queryCondition).then(res=>{
@@ -504,7 +462,7 @@ export default {
})
if(this.queryCondition.pageIndex == 1) {
this.caseList.list =[];
- }
+ }
this.caseList.list.push(...isTopList,...caseList);
this.caseList.count=res.result.count;
this.getCaseUserData(res.result.list)
@@ -515,6 +473,42 @@ export default {
}).catch(err=>{
console.log(err)
})
+ },
+ getTags() {
+ this.searchTags = [];
+ let caseData = deepClone(this.queryCondition);
+ for (let i in caseData) {
+ if (
+ caseData[i] !== "" &&
+ i !== "pageIndex" &&
+ i !== "pageSize" &&
+ i !== "orderField" &&
+ caseData[i] !== null &&
+ caseData[i] !== undefined
+ ) {
+ if(caseData[i] !== '0') {
+ this.searchTags.push(
+ caseData[i]
+ );
+ }
+ }
+ }
+ },
+ tagsClose(tag, index) {
+ for (let i in this.queryCondition) {
+ if (tag === this.queryCondition[i]) {
+ if(i == 'majorType'){
+ this.queryCondition.majorType = null;
+ }
+ if(i == 'orgDomain'){
+ this.queryCondition.orgDomain = null;
+ }
+ this.queryCondition[i] = "";
+
+ this.searchTags.splice(index, 1);
+ this.getCaseData();
+ }
+ }
},
getCaseUserData(caseList){
let ids=caseList.map((item,index)=>{
@@ -545,13 +539,13 @@ export default {
}
})
-
+
},
getPopularity(){
apiCase.queryPraises(5).then(res=>{
if(res.status==200){
this.Popularity=res.result
-
+
}
})
},
@@ -559,7 +553,7 @@ export default {
apiCase.queryComments(5).then(res=>{
if(res.status==200){
this.Positive=res.result
-
+
}
})
},
@@ -645,7 +639,7 @@ export default {
.item-line{
padding-left: 2px;
height: 20px;
-
+
background: #ddd;
}
@@ -819,15 +813,15 @@ export default {
.ranking-card {
-
-
+
+
.center{
text-align: center;
}
}
.right-box {
line-height: 25px;
-
+
.ranking-title {
}
.aligh-title{