mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-10 03:16:42 +08:00
Merge branch 'dev' of https://codeup.aliyun.com/6265f483e4166464dc2f9c14/boeu/portal into dev
This commit is contained in:
@@ -3,7 +3,7 @@ import ajax from '@/utils/xajax.js'
|
||||
|
||||
/**首页查询
|
||||
* pageSize
|
||||
* orderField
|
||||
* orderField
|
||||
* orderAsc
|
||||
*/
|
||||
const indexList = function(query) {
|
||||
@@ -12,7 +12,7 @@ const indexList = function(query) {
|
||||
/*
|
||||
*案例分页搜索查询 是否推荐
|
||||
*@param(String) keyWord 关键词
|
||||
*@param(String) orderField 需要排序的字段 不传默认是最新
|
||||
*@param(String) orderField 需要排序的字段 不传默认是最新
|
||||
*@param (boolean) orderAsc 升序还是倒叙
|
||||
*@param(Boolean) breCommend 是否推荐 true或者false
|
||||
*@param(String) orgDomain 组织机构
|
||||
@@ -80,19 +80,26 @@ const usernameList= function(pageSize){
|
||||
}
|
||||
/*
|
||||
人气榜
|
||||
@param pageSize 长度
|
||||
@param pageSize 长度
|
||||
*/
|
||||
const queryPraises=function(pageSize){
|
||||
return ajax.get(`/xboe/m/boe/cases/query-praises?pageSize=${pageSize}`);
|
||||
}
|
||||
/*
|
||||
好评榜
|
||||
@param pageSize 长度
|
||||
@param pageSize 长度
|
||||
*/
|
||||
const queryComments=function(pageSize){
|
||||
return ajax.get(`/xboe/m/boe/cases/query-comments?pageSize=${pageSize}`);
|
||||
}
|
||||
|
||||
/**
|
||||
* 专业分类
|
||||
* */
|
||||
const majorTypes=function (){
|
||||
return ajax.get('/xboe/m/boe/cases/majorTypes');
|
||||
}
|
||||
|
||||
export default {
|
||||
indexList,
|
||||
queryList,
|
||||
@@ -104,5 +111,6 @@ export default {
|
||||
query,
|
||||
usernameList,
|
||||
queryPraises,
|
||||
queryComments
|
||||
queryComments,
|
||||
majorTypes
|
||||
}
|
||||
|
||||
@@ -126,9 +126,12 @@
|
||||
{{ca.sysCreateTime.substring(0,10)}}
|
||||
</div> -->
|
||||
<a :href="'case/detail?id='+ca.id" >
|
||||
<span class="case-title one-line-ellipsis">
|
||||
<el-tooltip class="item" :content="ca.title" placement="bottom" effect="light" :visible-arrow="false" popper-class="text-tooltip">
|
||||
<span class="case-title one-line-ellipsis">
|
||||
{{ca.title}}
|
||||
</span>
|
||||
</el-tooltip>
|
||||
|
||||
<div class="case-text three-line-ellipsis">
|
||||
{{ca.summary}}
|
||||
</div>
|
||||
|
||||
@@ -89,15 +89,13 @@
|
||||
<div style="width: 245px;margin-left: 5px;" :class="zoomShow?'':'fixd-box-show'">
|
||||
<div>
|
||||
<div id="fixd-box">
|
||||
<el-card class="ranking-card" >
|
||||
<!-- <el-card class="ranking-card" >
|
||||
<div slot="header">
|
||||
<span style="font-size: 14px;font-weight: 600;color: #333333;">贡献榜</span>
|
||||
</div>
|
||||
<div style="padding-bottom:10px">
|
||||
<el-row class="ranking-title">
|
||||
<!-- <el-col :span="15" style="color: #333333;font-size: 14px;">名称</el-col> -->
|
||||
<!-- <el-col :offset="4" :span="5" class="center" style="color: #333333;font-size: 14px;">分数</el-col> -->
|
||||
</el-row>
|
||||
</el-row>
|
||||
<el-row class="ranking-title bacolor" v-for="(item, index) in ankingList" :key="index" >
|
||||
<el-col :span="6" style="height:34px">
|
||||
<img v-if="index===0" :src="`${webBaseUrl}/images/first.png`"/>
|
||||
@@ -105,14 +103,11 @@
|
||||
<img v-if="index===2" :src="`${webBaseUrl}/images/third.png`"/>
|
||||
<span style="margin-left: 10px" v-if="index!=2&&index!=0&&index!=1">{{index+1}}</span>
|
||||
</el-col>
|
||||
<!-- <el-tooltip :enterable="false" effect="light" :content="item.sysCreateUname" placement="bottom" :visible-arrow="false" popper-class="text-tooltip"> -->
|
||||
<el-col :span="15" class="title-line-ellipsis"> {{ item.sysCreateUname }}</el-col>
|
||||
<!-- </el-tooltip> -->
|
||||
<!-- <el-col class="center" style="color: #FF8E00;" :span="5">{{ item.score }}</el-col> -->
|
||||
</el-row>
|
||||
</div>
|
||||
</el-card>
|
||||
<div style="height: 10px;"></div>
|
||||
</el-card> -->
|
||||
<!-- <div style="height: 10px;"></div> -->
|
||||
<el-card class="ranking-card" >
|
||||
<div slot="header">
|
||||
<span style="font-size: 14px;font-weight: 600;color: #333333;">人气榜</span>
|
||||
@@ -226,7 +221,7 @@ export default {
|
||||
xmlhttp.abort();
|
||||
}, 5000);
|
||||
xmlhttp.open("HEAD", "http://10.251.132.75/web",true);
|
||||
//xmlhttp.open("HEAD", "https://u-pre.boe.com/web",true);
|
||||
// xmlhttp.open("HEAD", "https://u-pre.boe.com/web",true);
|
||||
xmlhttp.send();
|
||||
xmlhttp.onreadystatechange=function() {
|
||||
// console.log(xmlhttp.readyState,"xmlhttp.readyState");
|
||||
@@ -383,7 +378,7 @@ export default {
|
||||
}
|
||||
if(scrollTop > 630) {
|
||||
this.isTopBoxShow = true;
|
||||
document.querySelector('#fixd-box').style.cssText = "position: fixed;top: -500px;width:245.5px";
|
||||
document.querySelector('#fixd-box').style.cssText = "position: fixed;top: -250px;width:245.5px";
|
||||
} else {
|
||||
document.querySelector('#fixd-box').style.cssText = "position: static";
|
||||
}
|
||||
|
||||
@@ -49,14 +49,14 @@
|
||||
<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.code" > {{ item.name }} </el-radio-button>
|
||||
<el-radio-button v-for="item in speciData" :key="item.code" :label="item.code" > {{ item.name }} </el-radio-button>
|
||||
</el-radio-group>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</div>
|
||||
<div class="searBox" v-if="searchwd">
|
||||
<div class="searBox" v-if="speciData.length > 15">
|
||||
<el-button type="text" id="closeSearchBtn" @click="closeSearch">
|
||||
{{word}}
|
||||
<i :class="showAll ? 'el-icon-arrow-up ': 'el-icon-arrow-down'"></i>
|
||||
@@ -131,15 +131,12 @@
|
||||
<div style="width: 245px;margin-left: 5px;">
|
||||
<div>
|
||||
<div id="fixd-box">
|
||||
<el-card class="ranking-card" >
|
||||
<!-- <el-card class="ranking-card" >
|
||||
<div slot="header">
|
||||
<span style="font-size: 14px;font-weight: 600;color: #333333;">贡献榜</span>
|
||||
</div>
|
||||
<div style="padding-bottom:10px">
|
||||
<el-row class="ranking-title">
|
||||
<!-- <el-col :span="15" style="color: #333333;font-size: 14px;">名称</el-col> -->
|
||||
<!-- <el-col :offset="4" :span="5" class="center" style="color: #333333;font-size: 14px;">分数</el-col> -->
|
||||
</el-row>
|
||||
<el-row class="ranking-title"> </el-row>
|
||||
<el-row class="ranking-title bacolor" v-for="(item, index) in ankingList" :key="index" >
|
||||
<el-col :span="6" style="height:34px">
|
||||
<img v-if="index===0" :src="`${webBaseUrl}/images/first.png`"/>
|
||||
@@ -147,14 +144,11 @@
|
||||
<img v-if="index===2" :src="`${webBaseUrl}/images/third.png`"/>
|
||||
<span style="margin-left: 10px" v-if="index!=2&&index!=0&&index!=1">{{index+1}}</span>
|
||||
</el-col>
|
||||
<!-- <el-tooltip :enterable="false" effect="light" :content="item.sysCreateUname" :visible-arrow="false" popper-class="text-tooltip" placement="bottom"> -->
|
||||
<el-col :span="15" class="title-line-ellipsis"> {{ item.sysCreateUname }}</el-col>
|
||||
<!-- </el-tooltip> -->
|
||||
<!-- <el-col class="center" style="color: #FF8E00;" :span="5">{{ item.score }}</el-col> -->
|
||||
</el-row>
|
||||
</div>
|
||||
</el-card>
|
||||
<div style="height: 10px;"></div>
|
||||
</el-card> -->
|
||||
<!-- <div style="height: 10px;"></div> -->
|
||||
<el-card class="ranking-card" >
|
||||
<div slot="header">
|
||||
<span style="font-size: 14px;font-weight: 600;color: #333333;">人气榜</span>
|
||||
@@ -272,6 +266,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
speciData:[],
|
||||
moreState: 1, // 1 加载更多 2 加载中 3无数据
|
||||
isSeach: false,
|
||||
searchwd: true,
|
||||
@@ -296,8 +291,8 @@ export default {
|
||||
orderField: "comments",
|
||||
// breCommend:null,
|
||||
keyWord: "",
|
||||
majorType:'', //专业分类
|
||||
orgDomain: '', // 组织领域
|
||||
majorType:null, //专业分类
|
||||
orgDomain: null, // 组织领域
|
||||
orderAsc: false
|
||||
},
|
||||
keyWord: "",
|
||||
@@ -313,6 +308,12 @@ export default {
|
||||
},
|
||||
|
||||
mounted() {
|
||||
if(this.searchTags.length == 0){
|
||||
console.log('gyigyu')
|
||||
this.queryCondition.majorType = null;
|
||||
this.queryCondition.orgDomain = null;
|
||||
};
|
||||
this.specialized();
|
||||
this.$nextTick(function() {
|
||||
this.closeSearch();
|
||||
});
|
||||
@@ -332,6 +333,7 @@ export default {
|
||||
// this.getCaseData();
|
||||
this.search();
|
||||
window.addEventListener("scroll", this.handleScroll);
|
||||
|
||||
},
|
||||
|
||||
watch: {
|
||||
@@ -347,6 +349,15 @@ export default {
|
||||
window.removeEventListener("scroll", this.handleScroll);
|
||||
},
|
||||
methods: {
|
||||
specialized(){
|
||||
apiCase.majorTypes().then(res =>{
|
||||
if(res.status == 200){
|
||||
this.speciData = res.result
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
|
||||
jumcasedet(item) {
|
||||
this.$router.push({path:'/case/detail',query:{id:item.id}});
|
||||
|
||||
@@ -487,7 +498,7 @@ export default {
|
||||
}
|
||||
if (scrollTop > 630) {
|
||||
document.querySelector("#fixd-box").style.cssText =
|
||||
"position: fixed;top: -500px;width:245.5px";
|
||||
"position: fixed;top: -250px;width:245.5px";
|
||||
} else {
|
||||
document.querySelector("#fixd-box").style.cssText = "position: static";
|
||||
}
|
||||
@@ -609,13 +620,15 @@ export default {
|
||||
}
|
||||
},
|
||||
tagsClose(tag, index) {
|
||||
|
||||
for (let i in this.queryCondition) {
|
||||
|
||||
if (tag.type === i) {
|
||||
if (i == "majorType") {
|
||||
this.queryCondition.majorType = 0;
|
||||
this.queryCondition.majorType = '';
|
||||
}
|
||||
if (i == "orgDomain") {
|
||||
this.queryCondition.orgDomain = 0;
|
||||
this.queryCondition.orgDomain = '';
|
||||
}
|
||||
if (i == "keyWord") {
|
||||
this.queryCondition.keyWord = "";
|
||||
@@ -623,9 +636,17 @@ export default {
|
||||
}
|
||||
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) {
|
||||
let ids = caseList.map((item, index) => {
|
||||
@@ -674,6 +695,9 @@ export default {
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
::v-deep .el-radio-button{
|
||||
margin-right:0px;
|
||||
}
|
||||
::v-deep .el-button {
|
||||
border-radius: 0px;
|
||||
}
|
||||
|
||||
@@ -434,7 +434,23 @@ export default {
|
||||
this.category = "";
|
||||
this.categorySub = "";
|
||||
}
|
||||
|
||||
|
||||
this.searchTags.splice(index, 1);
|
||||
if(i === 'type') {
|
||||
this.category = null;
|
||||
this.categorySub = null;
|
||||
}
|
||||
if (i === "sysType1") {
|
||||
this.types.sysTypes = null;
|
||||
}
|
||||
if (i === "sysType2") {
|
||||
this.types.subOne = null;
|
||||
}
|
||||
if (i === "sysType3") {
|
||||
this.types.subTow = null;
|
||||
}
|
||||
|
||||
this.searchData();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user