mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-08 18:36:43 +08:00
案例搜索条件
This commit is contained in:
@@ -78,10 +78,10 @@
|
||||
<svg-icon icon-class="teather"></svg-icon>
|
||||
<span slot="title">教师管理</span>
|
||||
</el-menu-item>
|
||||
<!-- <el-menu-item index="/case/manage" v-show="curIdentity == 3">
|
||||
<el-menu-item index="/case/manage" v-show="curIdentity == 3">
|
||||
<svg-icon icon-class="case"></svg-icon>
|
||||
<span slot="title">案例管理</span>
|
||||
</el-menu-item> -->
|
||||
</el-menu-item>
|
||||
<el-menu-item index="/manage/ugroups" v-show="curIdentity == 3">
|
||||
<svg-icon icon-class="audience" style="font-size:16px"></svg-icon>
|
||||
<span slot="title">受众管理</span>
|
||||
@@ -427,7 +427,7 @@ export default {
|
||||
height: 36px;
|
||||
}
|
||||
.oneheight{
|
||||
|
||||
|
||||
height: 36px;
|
||||
line-height: 36px;
|
||||
}
|
||||
|
||||
@@ -7,44 +7,37 @@
|
||||
<el-col :span="24">
|
||||
<el-card :body-style="{ padding: '0px' }" class="left-div">
|
||||
<el-row class="search-div">
|
||||
<el-row>
|
||||
<!-- <el-row>
|
||||
<el-col :span="10" class="search-keyword">
|
||||
<!-- <el-input placeholder="请输入关键词搜索" v-model="keyWord" clearable><el-button slot="append" icon="el-icon-search" @click="search"></el-button></el-input> -->
|
||||
<!-- <div class="tip">热门搜索词:物联网 教师 辅导 绩效</div> -->
|
||||
<!-- <div class="tip" style="font-size: 14px;">
|
||||
<el-input placeholder="请输入关键词搜索" v-model="keyWord" clearable><el-button slot="append" icon="el-icon-search" @click="search"></el-button></el-input>
|
||||
<div class="tip">热门搜索词:物联网 教师 辅导 绩效</div>
|
||||
<div class="tip" style="font-size: 14px;">
|
||||
热门搜索词:<span style="cursor:pointer;font-size:15px;margin-left: 10px;" v-for="(item,index) in searchRecords" :key="index" @click="useHotword(item)">{{item.keyword}}</span>
|
||||
</div> -->
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-row> -->
|
||||
<div class="searchbar" v-if="searchTags.length > 0">
|
||||
<div style="line-height: 30px;">
|
||||
<span class="item-title">搜索条件</span>
|
||||
<el-tag closable>显示事业</el-tag>
|
||||
<el-tag closable>经营</el-tag>
|
||||
<el-tag closable>业绩提升</el-tag>
|
||||
<el-tag closable v-for="(tag, tagIdx) in searchTags" :key="tagIdx" @close="tagsClose(tag,tagIdx)">{{ tag.words }}</el-tag>
|
||||
<el-tag closable v-for="(tag, tagIdx) in searchTags" :key="tagIdx" @close="tagsClose(tag,tagIdx)">{{ tag }}</el-tag>
|
||||
</div>
|
||||
</div>
|
||||
<el-row class="search-item">
|
||||
<el-col :span="24">
|
||||
<!-- <div class="item-title">组织领域</div> -->
|
||||
<div style="margin-top:10px; display: flex;">
|
||||
<div style="line-height: 25px;width:11.5%">
|
||||
<span class="item-title" style="padding-right: 5px;">组织领域</span>
|
||||
<span class="item-line"></span>
|
||||
</div>
|
||||
<div style="flex:1;">
|
||||
<el-radio-group v-model="category" size="mini" @change="search()">
|
||||
<el-radio-button label="0">全部</el-radio-button>
|
||||
<el-radio-button v-for="item in domain" :key="item.code" :label="item.code"> {{ item.name}}</el-radio-button>
|
||||
<!-- <el-radio-button label="1">显示事业</el-radio-button>
|
||||
<el-radio-button label="2">传感器事业</el-radio-button>
|
||||
<el-radio-button label="3">智慧医工事业</el-radio-button> -->
|
||||
<el-radio-group v-model="queryCondition.orgDomain" size="mini" @change="search()">
|
||||
<el-radio-button :label="null">全部</el-radio-button>
|
||||
<el-radio-button v-for="item in domain" :key="item.code" :label="item.name"> {{ item.name}}</el-radio-button>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</el-col>
|
||||
</el-row>
|
||||
<div class="search-div-collapse">
|
||||
@@ -56,45 +49,17 @@
|
||||
<span class="item-title" style="padding-right: 5px;">专业分类</span>
|
||||
<span class="item-line"></span>
|
||||
</div>
|
||||
<div style="flex:1;" id="searchBox" >
|
||||
<el-radio-group v-model="type2" size="mini" @change="search()">
|
||||
<el-radio-button label="0">全部</el-radio-button>
|
||||
<el-radio-button v-for="item in Profess" :key="item.code" :label="item.code" > {{ item.name }} </el-radio-button>
|
||||
|
||||
<!-- <el-radio-button label="1">经营</el-radio-button>
|
||||
<el-radio-button label="2">领用</el-radio-button>
|
||||
<el-radio-button label="3">研发</el-radio-button>
|
||||
<el-radio-button label="4">营销</el-radio-button>
|
||||
<el-radio-button label="5">生产技术</el-radio-button>
|
||||
<el-radio-button label="6">信息技术</el-radio-button>
|
||||
<el-radio-button label="7">质量</el-radio-button> -->
|
||||
<div style="flex:1" id="searchBox">
|
||||
<el-radio-group v-model="queryCondition.majorType" size="mini" @change="search()">
|
||||
<el-radio-button :label="null">全部</el-radio-button>
|
||||
<el-radio-button v-for="item in Profess" :key="item.code" :label="item.name" > {{ item.name }} </el-radio-button>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</el-col>
|
||||
</el-row>
|
||||
<!-- <el-row class="search-item">
|
||||
<el-col :span="24">
|
||||
<div class="item-title">应用场景</div>
|
||||
<div style="margin-top:10px; display: flex;">
|
||||
<div style="line-height: 25px;">
|
||||
<span class="item-title" style="padding-right: 5px;">专业领域</span>
|
||||
<span class="item-line"></span>
|
||||
</div>
|
||||
<div>
|
||||
<el-radio-group v-model="type3" size="mini" @click="search()">
|
||||
<el-radio-button label="0">全部</el-radio-button>
|
||||
<el-radio-button label="1">业绩提升</el-radio-button>
|
||||
<el-radio-button label="2">人才培养</el-radio-button>
|
||||
<el-radio-button label="3">知识管理</el-radio-button>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</el-col>
|
||||
</el-row> -->
|
||||
</div>
|
||||
<div class="searBox" v-if="searchwd">
|
||||
<el-button type="text" id="closeSearchBtn" @click="closeSearch">
|
||||
@@ -102,15 +67,8 @@
|
||||
<i :class="showAll ? 'el-icon-arrow-up ': 'el-icon-arrow-down'"></i>
|
||||
</el-button>
|
||||
</div>
|
||||
|
||||
<!-- <el-row class="search-div-more">
|
||||
<el-col :span="24">
|
||||
<el-button type="text" @click="queryExpand = true" v-if="!queryExpand">收起</el-button>
|
||||
<el-button type="text" v-else @click="queryExpand = false">更多</el-button>
|
||||
</el-col>
|
||||
</el-row> -->
|
||||
</el-row>
|
||||
|
||||
|
||||
<el-row class="order-div">
|
||||
<span class="quyer-tag">
|
||||
<el-button type="text" class="order-class" @click="searchData('')" :class="{ actice: queryCondition.orderField == '' }">最热</el-button>
|
||||
@@ -118,8 +76,6 @@
|
||||
|
||||
<!-- <el-button type="text" class="order-class" @click="queryCondition.breCommend = queryCondition.breCommend == ture ? true : null" :class="{ actice: queryCondition.breCommend == true }">组织推荐</el-button> -->
|
||||
</span>
|
||||
<!-- <span v-if="isFind" style="padding-left:10px;">本次搜索出 {{caseList.count}} 条结果</span> -->
|
||||
<!-- <span class="more"></span> -->
|
||||
</el-row>
|
||||
<el-row class="data-content">
|
||||
<el-col :span="24" v-for="item in caseList.list" :key="item.id" class="case-list">
|
||||
@@ -137,9 +93,7 @@
|
||||
</div>
|
||||
<router-link :to="'/case/detail?id='+item.id">
|
||||
<div class="case-info-summary" >
|
||||
|
||||
{{item.summary}}
|
||||
|
||||
</div>
|
||||
</router-link>
|
||||
<div style="display: flex;justify-content: space-between;">
|
||||
@@ -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{
|
||||
|
||||
Reference in New Issue
Block a user