mirror of
https://codeup.aliyun.com/67762337eccfc218f6110e0e/vue/learning-system-portal.git
synced 2025-12-07 01:46:42 +08:00
精品类型加标签
This commit is contained in:
@@ -2,48 +2,32 @@
|
|||||||
<div id="couser-list-content" class="couser-list-content">
|
<div id="couser-list-content" class="couser-list-content">
|
||||||
<div class="course-banner">
|
<div class="course-banner">
|
||||||
<portal-header current="course" textColor="#fff" :keywords="keyword" @emitInput="emitInput"
|
<portal-header current="course" textColor="#fff" :keywords="keyword" @emitInput="emitInput"
|
||||||
@showClass="showClass"></portal-header>
|
@showClass="showClass"></portal-header>
|
||||||
</div>
|
</div>
|
||||||
<div style="padding-top:30px">
|
<div style="padding-top:30px">
|
||||||
<div class="xcontent2">
|
<div class="xcontent2">
|
||||||
<!-- <div class="navTitle">
|
|
||||||
<a @click="handleClearTags">课程分类 </a>
|
|
||||||
<span v-if="navTitle.length">></span>
|
|
||||||
<template v-if="navTitle.length">
|
|
||||||
<div class="oneTitle" v-for="(item, index) in navTitle" :key="item.id"
|
|
||||||
@click="handleOptionClick(item, index)">
|
|
||||||
<span class="titleName"> {{ item.name }} </span>
|
|
||||||
<span v-if="index !== navTitle.length - 1">></span>
|
|
||||||
</div>
|
|
||||||
</template>
|
|
||||||
</div> -->
|
|
||||||
</div>
|
</div>
|
||||||
<div class="xcontent2">
|
<div class="xcontent2">
|
||||||
<!-- 左侧三级 -->
|
<!-- 左侧三级 -->
|
||||||
<div class="xcontent2-minor" style="margin-right:36px;">
|
<div class="xcontent2-minor" style="margin-right:36px;">
|
||||||
<!-- <router-link to="/courseRecommended" style="margin-bottom: 20px;" class="course-recommended-style">
|
|
||||||
<div class="imgTilte">
|
|
||||||
</div>
|
|
||||||
</router-link> -->
|
|
||||||
<div class="course-title-style">
|
<div class="course-title-style">
|
||||||
<div class="imgTilte">
|
<div class="imgTilte">
|
||||||
<div>精品课程</div>
|
<div>精品课程</div>
|
||||||
<!-- <div>COURSE</div> -->
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="course-list">
|
<div class="course-list">
|
||||||
<div class="course-one" v-for="one in oneList" :key="one.id" @click.stop="handleOptionClick(one, 1, oneList)">
|
<div class="course-one" v-for="one in oneList" :key="one.id" @click.stop="handleOptionClick(one, 1, oneList)">
|
||||||
<div class="course-one-content">{{ one.name }}</div>
|
<div class="course-one-content">{{ one.name }}</div>
|
||||||
<div class="course-two" v-for="(twoList, twoIndex) in one.children" :key="twoList.id"
|
<div class="course-two" v-for="(twoList, twoIndex) in one.children" :key="twoList.id"
|
||||||
@click.stop="handleOptionClick(twoList, 2, one.children)"
|
@click.stop="handleOptionClick(twoList, 2, one.children)"
|
||||||
:class="{ courseTwoActive: twoList.id == twoId || twoList.checked }" @mouseleave.stop="leaveIndex"
|
:class="{ courseTwoActive: twoList.id == twoId || twoList.checked }" @mouseleave.stop="leaveIndex"
|
||||||
@mouseenter.stop="changeIndex(twoList.id)">
|
@mouseenter.stop="changeIndex(twoList.id)">
|
||||||
<!-- 三级分类 -->
|
<!-- 三级分类 -->
|
||||||
<el-popover class="popover" popper-class='coursePopperClass' placement="right-start" width="536"
|
<el-popover class="popover" popper-class='coursePopperClass' placement="right-start" width="536"
|
||||||
:disabled="!twoList.children.length" :open-delay="0" :close-delay="0" trigger="hover"
|
:disabled="!twoList.children.length" :open-delay="0" :close-delay="0" trigger="hover"
|
||||||
:visible-arrow="false" @hide="leaveIndex" @show="changeIndex(twoList.id)" transition="none">
|
:visible-arrow="false" @hide="leaveIndex" @show="changeIndex(twoList.id)" transition="none">
|
||||||
<div class="course-two-content" slot="reference">{{
|
<div class="course-two-content" slot="reference">{{
|
||||||
twoList.name }}</div>
|
twoList.name }}</div>
|
||||||
<!-- 内容 -->
|
<!-- 内容 -->
|
||||||
<div class="course-three-box">
|
<div class="course-three-box">
|
||||||
<div class="course-three-box-title">
|
<div class="course-three-box-title">
|
||||||
@@ -51,8 +35,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div style="padding: 0 40px;display: flex;flex-wrap: wrap;">
|
<div style="padding: 0 40px;display: flex;flex-wrap: wrap;">
|
||||||
<div :class="threeList.checked ? 'threeActive' : ''" v-for="threeList in twoList.children"
|
<div :class="threeList.checked ? 'threeActive' : ''" v-for="threeList in twoList.children"
|
||||||
:key="threeList.id" @click.stop="handleOptionClick(threeList, 3, twoList.children)"
|
:key="threeList.id" @click.stop="handleOptionClick(threeList, 3, twoList.children)"
|
||||||
class="course-three">
|
class="course-three">
|
||||||
<span>{{ threeList.name }}</span>
|
<span>{{ threeList.name }}</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -70,31 +54,49 @@
|
|||||||
|
|
||||||
<!-- 内容导航 -->
|
<!-- 内容导航 -->
|
||||||
<div class="topNav" v-if="!newData" style="display: flex; flex-direction: row;background-color:#fff;">
|
<div class="topNav" v-if="!newData" style="display: flex; flex-direction: row;background-color:#fff;">
|
||||||
<div>
|
<!-- 修改后 -->
|
||||||
<div class="search-div nav" style="height: 100px;flex: 1;">
|
<div class="search-div nav" style="flex: 1;height: auto;">
|
||||||
<div @click="handleTypeClick(ctypeList[0], ctypeList)" class="option-item"
|
<div class="nav-primary" style="display: flex; justify-content: space-between; align-items: center;">
|
||||||
:class="{ 'option-active': ctypeList[0].checked }">
|
<div style="display: flex;">
|
||||||
<a>全部</a>
|
<div @click="handleTypeClick(ctypeList[0], ctypeList)" class="option-item"
|
||||||
<span :class="ctypeList[0].checked ? 'nav-bottbor' : ''"></span>
|
:class="{ 'option-active': ctypeList[0].checked }">
|
||||||
|
<a>全部</a>
|
||||||
|
<span :class="ctypeList[0].checked ? 'nav-bottbor' : ''"></span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div @click="handleTypeClick(ctypeList[1], ctypeList)" class="option-item"
|
||||||
|
:class="{ 'option-active': ctypeList[1].checked }" style="padding-left: 15px;">
|
||||||
|
<a>内部专享</a>
|
||||||
|
<span :class="ctypeList[1].checked ? 'nav-bottbor' : ''"></span>
|
||||||
|
</div>
|
||||||
|
<div @click="handleTypeClick(ctypeList[2], ctypeList)" class="option-item"
|
||||||
|
:class="{ 'option-active': ctypeList[2].checked }">
|
||||||
|
<a>外部精选</a>
|
||||||
|
<span :class="ctypeList[2].checked ? 'nav-bottbor' : ''"></span>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div @click="handleTypeClick(ctypeList[1], ctypeList)" class="option-item"
|
<div style="display: flex; align-items: center;">
|
||||||
:class="{ 'option-active': ctypeList[1].checked }">
|
<span style="margin-right: 10px;" class="option-item">请选择年份 </span>
|
||||||
<a>内部专享</a>
|
<el-select v-model="yearChosen" multiple style="width: 150px;">
|
||||||
<span :class="ctypeList[1].checked ? 'nav-bottbor' : ''"></span>
|
<el-option
|
||||||
</div>
|
v-for="year in years"
|
||||||
<div @click="handleTypeClick(ctypeList[2], ctypeList)" class="option-item"
|
v-if="year"
|
||||||
:class="{ 'option-active': ctypeList[2].checked }">
|
:key="year"
|
||||||
<a>外部精选</a>
|
:label="year"
|
||||||
<span :class="ctypeList[2].checked ? 'nav-bottbor' : ''"></span>
|
:value="year">
|
||||||
|
</el-option>
|
||||||
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="margin-top:10px;flex: 1;">
|
<div style="margin-top:10px;flex: 1;">
|
||||||
<!-- 修改热点标签容器,支持换行 -->
|
<!-- 修改热点标签容器,支持换行 -->
|
||||||
<div class="hot-tags-wrapper">
|
<div class="hot-tags-wrapper" style="display: flex;">
|
||||||
<div class="hot-tags-wrapper">
|
<div class="hot-tags-wrapper" style="display: flex; align-items: center;">
|
||||||
<div
|
<div
|
||||||
class="option-item" style="font-weight: bold; padding-top: 2px;"
|
class="option-item"
|
||||||
|
style="font-weight: bold; padding-top: 2px; margin-left: 15px;"
|
||||||
:class="{ 'option-active': isAllHotTagsSelected }"
|
:class="{ 'option-active': isAllHotTagsSelected }"
|
||||||
@click="handleClearHotTags"
|
@click="handleClearHotTags"
|
||||||
>
|
>
|
||||||
@@ -103,7 +105,8 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
class="option-item" style="font-weight: bold; padding-top: 2px;"
|
class="option-item"
|
||||||
|
style="font-weight: bold; padding-top: 2px;"
|
||||||
v-for="tag in hotTagsList"
|
v-for="tag in hotTagsList"
|
||||||
:key="tag.id"
|
:key="tag.id"
|
||||||
@click="handleTagClick(tag, hotTagsList,1)"
|
@click="handleTagClick(tag, hotTagsList,1)"
|
||||||
@@ -117,19 +120,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div style="display: flex;justify-content: space-between; align-items: center;">
|
|
||||||
<span style="margin-right: 10px;" class="option-item">请选择年份 </span>
|
|
||||||
<el-select v-model="yearChosen" multiple>
|
|
||||||
<el-option
|
|
||||||
v-for="year in years"
|
|
||||||
v-if="year"
|
|
||||||
:key="year"
|
|
||||||
:label="year"
|
|
||||||
:value="year">
|
|
||||||
</el-option>
|
|
||||||
</el-select>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<!-- 清除 -->
|
<!-- 清除 -->
|
||||||
@@ -138,7 +128,7 @@
|
|||||||
<div style="line-height: 30px;">
|
<div style="line-height: 30px;">
|
||||||
<span class="item-title"> 搜索条件</span>
|
<span class="item-title"> 搜索条件</span>
|
||||||
<el-tag closable v-for="(tag, tagIdx) in stagList" :key="'t' + tagIdx" @close="stagClose(tag, tagIdx)">{{
|
<el-tag closable v-for="(tag, tagIdx) in stagList" :key="'t' + tagIdx" @close="stagClose(tag, tagIdx)">{{
|
||||||
tag.name }}</el-tag>
|
tag.name }}</el-tag>
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
<el-button type="primary" size="mini" @click="handleClearTags">清除</el-button>
|
<el-button type="primary" size="mini" @click="handleClearTags">清除</el-button>
|
||||||
@@ -151,13 +141,13 @@
|
|||||||
<div class="order-div" v-if="!newData">
|
<div class="order-div" v-if="!newData">
|
||||||
<span class="quyer-tag">
|
<span class="quyer-tag">
|
||||||
<el-button type="text" class="order-class" @click="orderChange('DEFAULT')"
|
<el-button type="text" class="order-class" @click="orderChange('DEFAULT')"
|
||||||
:class="{ actice: course.orderField == 'DEFAULT' }">全部课程</el-button>
|
:class="{ actice: course.orderField == 'DEFAULT' }">全部课程</el-button>
|
||||||
<el-button type="text" class="order-class" @click="orderChange('HOT')"
|
<el-button type="text" class="order-class" @click="orderChange('HOT')"
|
||||||
:class="{ actice: course.orderField == 'HOT' }">最热</el-button>
|
:class="{ actice: course.orderField == 'HOT' }">最热</el-button>
|
||||||
<el-button type="text" class="order-class" @click="orderChange('NEW')"
|
<el-button type="text" class="order-class" @click="orderChange('NEW')"
|
||||||
:class="{ actice: course.orderField == 'NEW' }">最新</el-button>
|
:class="{ actice: course.orderField == 'NEW' }">最新</el-button>
|
||||||
<el-button type="text" class="order-class" @click="orderChange('GOOD')"
|
<el-button type="text" class="order-class" @click="orderChange('GOOD')"
|
||||||
:class="{ actice: course.orderField == 'GOOD' }">好评率</el-button>
|
:class="{ actice: course.orderField == 'GOOD' }">好评率</el-button>
|
||||||
</span>
|
</span>
|
||||||
<span class="order-count">
|
<span class="order-count">
|
||||||
共找到<span>{{ count }}</span>个结果
|
共找到<span>{{ count }}</span>个结果
|
||||||
@@ -190,7 +180,7 @@
|
|||||||
<div class="keywordInfo-every">
|
<div class="keywordInfo-every">
|
||||||
<div class="keywordInfo" v-for="(keyword, index) in cinfo.keywordsActive" :key="index">
|
<div class="keywordInfo" v-for="(keyword, index) in cinfo.keywordsActive" :key="index">
|
||||||
<el-tooltip popper-class="keywordInfo-class" :visible-arrow="false"
|
<el-tooltip popper-class="keywordInfo-class" :visible-arrow="false"
|
||||||
:disabled="!keyword.showTitle">
|
:disabled="!keyword.showTitle">
|
||||||
<template #content>
|
<template #content>
|
||||||
<span v-html="keyword.title"></span>
|
<span v-html="keyword.title"></span>
|
||||||
</template>
|
</template>
|
||||||
@@ -198,7 +188,7 @@
|
|||||||
</el-tooltip>
|
</el-tooltip>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- {{cinfo}}-->
|
<!-- {{cinfo}}-->
|
||||||
<div class="couresstartTime">
|
<div class="couresstartTime">
|
||||||
<span v-if="cinfo.type == 30 && cinfo.startTime">开课时间:{{ cinfo.startTime }}</span>
|
<span v-if="cinfo.type == 30 && cinfo.startTime">开课时间:{{ cinfo.startTime }}</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -214,7 +204,7 @@
|
|||||||
<div class="course-info-score">
|
<div class="course-info-score">
|
||||||
<div style="display: flex;">
|
<div style="display: flex;">
|
||||||
<interactBar :type="1" nodeWidth="20px" :data="cinfo" :courseExclusive="true" :comments="false"
|
<interactBar :type="1" nodeWidth="20px" :data="cinfo" :courseExclusive="true" :comments="false"
|
||||||
:praises="false" :shares="false" :views="false"></interactBar>
|
:praises="false" :shares="false" :views="false"></interactBar>
|
||||||
<div v-if="cinfo.courseScore">
|
<div v-if="cinfo.courseScore">
|
||||||
<span class="course-score-value">{{ toScore(cinfo.courseScore) }}分</span>
|
<span class="course-score-value">{{ toScore(cinfo.courseScore) }}分</span>
|
||||||
</div>
|
</div>
|
||||||
@@ -259,7 +249,7 @@
|
|||||||
</span>
|
</span>
|
||||||
<div v-if="courseList.length > 0">
|
<div v-if="courseList.length > 0">
|
||||||
<pagination :size="course.pageSize" :total="Number(count)" :page="course.pageIndex"
|
<pagination :size="course.pageSize" :total="Number(count)" :page="course.pageIndex"
|
||||||
layout="total, prev, pager, next, jumper" @change-page="currentChange"></pagination>
|
layout="total, prev, pager, next, jumper" @change-page="currentChange"></pagination>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -296,17 +286,6 @@
|
|||||||
<div class="text_msg">
|
<div class="text_msg">
|
||||||
创新力专区课程版权已到期!
|
创新力专区课程版权已到期!
|
||||||
</div>
|
</div>
|
||||||
<!-- <div class="cyl" @click="cylClick">
|
|
||||||
<div class="tyl_title">
|
|
||||||
<img src="../../../assets/images/cyl.png" alt="" class="tyl_title_img" />
|
|
||||||
<span class="tyl_title_msg">创新力专区</span>
|
|
||||||
</div>
|
|
||||||
<div class="tyl_jy">激发创新潜力,拓视野、促思考!</div>
|
|
||||||
<div class="tyl_msg">
|
|
||||||
内容涵盖:组合创新、单点破局、错位竞争、分形创新、第二曲线、数字化、元宇宙<br/>
|
|
||||||
创新力专区课程版权将于2024年4月16日到期,逾期将无法继续访问,请尽快完成学习
|
|
||||||
</div>
|
|
||||||
</div> -->
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -334,7 +313,7 @@ import {formatDate, formatUserNumber, toScore} from "@/utils/tools.js";
|
|||||||
import apiSearchterm from "@/api/modules/searchterm.js";
|
import apiSearchterm from "@/api/modules/searchterm.js";
|
||||||
import apiPlace from "@/api/phase2/place.js"
|
import apiPlace from "@/api/phase2/place.js"
|
||||||
import {qualityCourseTimeMark, qualityPageList} from "@/api/phase2"
|
import {qualityCourseTimeMark, qualityPageList} from "@/api/phase2"
|
||||||
|
import apiCourseTag from '@/api/modules/courseTag.js'
|
||||||
export default {
|
export default {
|
||||||
name: "index",
|
name: "index",
|
||||||
components: {
|
components: {
|
||||||
@@ -354,6 +333,41 @@ export default {
|
|||||||
let list = [];
|
let list = [];
|
||||||
|
|
||||||
},
|
},
|
||||||
|
// 取消搜索条件标签展示
|
||||||
|
/*stagList() { //计算出选择的内容
|
||||||
|
let list = [];
|
||||||
|
if (this.keyword) {
|
||||||
|
list.push({
|
||||||
|
type: 0,
|
||||||
|
id: 'keyword',
|
||||||
|
name: this.keyword,
|
||||||
|
checked: true
|
||||||
|
})
|
||||||
|
}
|
||||||
|
this.oneList.forEach(one => {
|
||||||
|
var twoChildChecked = false;//是否有下级
|
||||||
|
one.children.forEach(two => {
|
||||||
|
if (two.checked) {
|
||||||
|
twoChildChecked = true;
|
||||||
|
}
|
||||||
|
var threeChildChecked = false;
|
||||||
|
two.children.forEach(three => {
|
||||||
|
if (three.checked) {
|
||||||
|
list.push(three);
|
||||||
|
threeChildChecked = true;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (two.checked && !threeChildChecked) {
|
||||||
|
list.push(two);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (one.checked && !twoChildChecked) {
|
||||||
|
list.push(one);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
return list;
|
||||||
|
},*/
|
||||||
|
|
||||||
stagList() {
|
stagList() {
|
||||||
let list = [];
|
let list = [];
|
||||||
|
|
||||||
@@ -430,24 +444,6 @@ export default {
|
|||||||
});
|
});
|
||||||
return !flag;
|
return !flag;
|
||||||
},
|
},
|
||||||
// oneTagAll() {
|
|
||||||
// let flag = this.oneList.some(item => {
|
|
||||||
// return item.checked;
|
|
||||||
// });
|
|
||||||
// return !flag;
|
|
||||||
// },
|
|
||||||
// twoTagAll() {
|
|
||||||
// let flag = this.twoList.some(item => {
|
|
||||||
// return item.checked;
|
|
||||||
// });
|
|
||||||
// return !flag;
|
|
||||||
// },
|
|
||||||
// threeTagAll() {
|
|
||||||
// let flag = this.threeList.some(item => {
|
|
||||||
// return item.checked;
|
|
||||||
// });
|
|
||||||
// return !flag;
|
|
||||||
// }
|
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
@@ -515,7 +511,8 @@ export default {
|
|||||||
searchRecords: [],
|
searchRecords: [],
|
||||||
hotList: [],
|
hotList: [],
|
||||||
totalPages: 1,
|
totalPages: 1,
|
||||||
localSessionKey: this.$xpage.constants.localCourseFiltersKey
|
localSessionKey: this.$xpage.constants.localCourseFiltersKey,
|
||||||
|
hotTagsList: [],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
// 受众需要每次刷新
|
// 受众需要每次刷新
|
||||||
@@ -535,17 +532,6 @@ export default {
|
|||||||
qualityCourseTimeMark().then(response=>{
|
qualityCourseTimeMark().then(response=>{
|
||||||
this.years = response.data.result
|
this.years = response.data.result
|
||||||
})
|
})
|
||||||
// let screenWidth = window.screen.availWidth;
|
|
||||||
// if (screenWidth < 1280) {
|
|
||||||
// this.course.pageSize = 9;
|
|
||||||
// this.columns = 3;
|
|
||||||
// } else if (screenWidth < 1600) {
|
|
||||||
// this.course.pageSize = 12;
|
|
||||||
// this.columns = 3;
|
|
||||||
// } else if (screenWidth >= 1600) {
|
|
||||||
// this.course.pageSize = 15;
|
|
||||||
// this.columns = 3;
|
|
||||||
// }
|
|
||||||
|
|
||||||
let el_top = document.querySelector("#searchbar");
|
let el_top = document.querySelector("#searchbar");
|
||||||
let el_search = document.querySelector("#searchbar");
|
let el_search = document.querySelector("#searchbar");
|
||||||
@@ -571,8 +557,6 @@ export default {
|
|||||||
this.loadSysTypes();
|
this.loadSysTypes();
|
||||||
this.getScoreList();
|
this.getScoreList();
|
||||||
this.getHotList();
|
this.getHotList();
|
||||||
// this.toCourseDetail(item);
|
|
||||||
// this.orderChange(id);
|
|
||||||
//查询排行榜,页面打开只查询一次
|
//查询排行榜,页面打开只查询一次
|
||||||
let localKey = "user_" + this.userInfo.sysId + "_gids";
|
let localKey = "user_" + this.userInfo.sysId + "_gids";
|
||||||
if (this.audiences.length == 0) {
|
if (this.audiences.length == 0) {
|
||||||
@@ -591,30 +575,15 @@ export default {
|
|||||||
}
|
}
|
||||||
this.search();
|
this.search();
|
||||||
})
|
})
|
||||||
// Promise.all([apiOldCourse.audience(this.userInfo.sysId),apiUserGroup.userGroupIds()]).then(rs=>{
|
|
||||||
// //console.log(rs,'rs');
|
|
||||||
// let aids=[];
|
|
||||||
// if(rs[0].status==200){
|
|
||||||
// aids.push(rs[0].result);
|
|
||||||
// }
|
|
||||||
// if(rs[1].status==200){
|
|
||||||
// aids.push(rs[1].result);
|
|
||||||
// }
|
|
||||||
// this.audiences=aids;
|
|
||||||
// sessionStorage.setItem(localKey,this.audiences);
|
|
||||||
// this.search();
|
|
||||||
// })
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//this.searchterm();//搜索词已经没有了
|
|
||||||
this.couresreso();//广告位
|
this.couresreso();//广告位
|
||||||
|
|
||||||
},
|
},
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
// window.removeEventListener("scroll", this.handleScroll);
|
// window.removeEventListener("scroll", this.handleScroll);
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
|
||||||
isAllHotTagsSelected() {
|
isAllHotTagsSelected() {
|
||||||
return !this.hotTagsList.some(tag => tag.checked);
|
return !this.hotTagsList.some(tag => tag.checked);
|
||||||
},
|
},
|
||||||
@@ -630,6 +599,7 @@ export default {
|
|||||||
this.searchData();
|
this.searchData();
|
||||||
},
|
},
|
||||||
handleTagClick(item, list,type) {
|
handleTagClick(item, list,type) {
|
||||||
|
console.info('切换标签 item = ' + item)
|
||||||
item.checked = !item.checked;
|
item.checked = !item.checked;
|
||||||
|
|
||||||
// 更新course.tags
|
// 更新course.tags
|
||||||
@@ -727,15 +697,55 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
//搜索条件
|
//搜索条件
|
||||||
|
// 搜索条件
|
||||||
stagClose(tag, tagIndex) {
|
stagClose(tag, tagIndex) {
|
||||||
this.courseChosen = void 0;
|
this.courseChosen = void 0;
|
||||||
tag.checked = false;
|
tag.checked = false;
|
||||||
|
|
||||||
if (tag.type == 0) {
|
if (tag.type == 0) {
|
||||||
|
// 关键词类型
|
||||||
this.keyword = '';
|
this.keyword = '';
|
||||||
|
} else if (tag.type == 1) {
|
||||||
|
// 课程类型
|
||||||
|
this.ctypeList.forEach(item => {
|
||||||
|
if (item.id == tag.id) {
|
||||||
|
item.checked = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
} else if (tag.type == 14) {
|
||||||
|
// 热点标签类型
|
||||||
|
this.hotTagsList.forEach(item => {
|
||||||
|
if (item.id == tag.id) {
|
||||||
|
item.checked = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
// 更新course.tags
|
||||||
|
const checkedHotTags = this.hotTagsList.filter(tag => tag.checked);
|
||||||
|
let tagIds = checkedHotTags.map(tag => tag.id).join(',');
|
||||||
|
this.course.tags = tagIds;
|
||||||
|
} else if (tag.type == 11 || tag.type == 12 || tag.type == 13) {
|
||||||
|
// 三级分类标签
|
||||||
|
this.oneList.forEach(one => {
|
||||||
|
if (one.id == tag.id) {
|
||||||
|
one.checked = false;
|
||||||
|
}
|
||||||
|
one.children.forEach(two => {
|
||||||
|
if (two.id == tag.id) {
|
||||||
|
two.checked = false;
|
||||||
|
}
|
||||||
|
two.children.forEach(three => {
|
||||||
|
if (three.id == tag.id) {
|
||||||
|
three.checked = false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
this.navTitle = []
|
this.navTitle = []
|
||||||
this.searchData();
|
this.searchData();
|
||||||
},
|
},
|
||||||
|
|
||||||
isTagMatched(tag) {
|
isTagMatched(tag) {
|
||||||
// 检查stagList中是否有匹配的标签
|
// 检查stagList中是否有匹配的标签
|
||||||
return this.stagList.some(searchTag =>
|
return this.stagList.some(searchTag =>
|
||||||
@@ -779,10 +789,23 @@ export default {
|
|||||||
handleClearTags() {
|
handleClearTags() {
|
||||||
//清空所有的条件
|
//清空所有的条件
|
||||||
this.keyword = '';
|
this.keyword = '';
|
||||||
// 取消搜索条件标签展示
|
|
||||||
// this.ctypeList.forEach(item => {
|
// 清除课程类型
|
||||||
// item.checked = false;
|
this.ctypeList.forEach(item => {
|
||||||
// });
|
item.checked = false;
|
||||||
|
});
|
||||||
|
|
||||||
|
// 清除热点标签
|
||||||
|
this.hotTagsList.forEach(item => {
|
||||||
|
item.checked = false;
|
||||||
|
});
|
||||||
|
// 清空course.tags
|
||||||
|
this.course.tags = '';
|
||||||
|
|
||||||
|
// 清除年份选择
|
||||||
|
this.yearChosen = [];
|
||||||
|
|
||||||
|
// 清除三级分类
|
||||||
this.oneList.forEach(one => {
|
this.oneList.forEach(one => {
|
||||||
one.checked = false;
|
one.checked = false;
|
||||||
one.children.forEach(two => {
|
one.children.forEach(two => {
|
||||||
@@ -792,7 +815,8 @@ export default {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
});
|
});
|
||||||
// 清除左侧被选中的内容
|
|
||||||
|
// 清除左侧被选中的内容
|
||||||
this.courseChosen = void 0;
|
this.courseChosen = void 0;
|
||||||
this.twoList = [];
|
this.twoList = [];
|
||||||
this.threeList = [];
|
this.threeList = [];
|
||||||
@@ -801,6 +825,7 @@ export default {
|
|||||||
sessionStorage.removeItem(this.localSessionKey)
|
sessionStorage.removeItem(this.localSessionKey)
|
||||||
this.searchData();
|
this.searchData();
|
||||||
},
|
},
|
||||||
|
|
||||||
// 导航切换(录播课,线下课,学习项目)
|
// 导航切换(录播课,线下课,学习项目)
|
||||||
handleTypeClick(item, list) {
|
handleTypeClick(item, list) {
|
||||||
// item.checked = !item.checked;
|
// item.checked = !item.checked;
|
||||||
@@ -839,57 +864,6 @@ export default {
|
|||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
// item.checked = !item.checked;
|
|
||||||
//使用上面一行是可以多选,使用下面是单选
|
|
||||||
// list.forEach(row => {
|
|
||||||
// row.checked = false;
|
|
||||||
// })
|
|
||||||
// item.checked = true;
|
|
||||||
// //以下是新的规则的修改,
|
|
||||||
// if (!item.checked) {
|
|
||||||
// //清空它下面的所有的中的
|
|
||||||
// item.children.forEach(subItem => {
|
|
||||||
// subItem.checked = false;
|
|
||||||
// if (subItem.children) {
|
|
||||||
// subItem.children.forEach(sub => {
|
|
||||||
// sub.checked = false;
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// if (level == 1) {
|
|
||||||
// this.twoList = [];
|
|
||||||
// this.threeList = [];
|
|
||||||
// }
|
|
||||||
// if (level == 2) {
|
|
||||||
// this.threeList = [];
|
|
||||||
// }
|
|
||||||
// this.searchData();
|
|
||||||
// return;
|
|
||||||
// }
|
|
||||||
|
|
||||||
// let $this = this;
|
|
||||||
// if (level == 1) { //一级的情况
|
|
||||||
// this.twoList = [];
|
|
||||||
// this.threeList = [];
|
|
||||||
// let lastCheked = null;
|
|
||||||
// item.children.forEach(two => {
|
|
||||||
// $this.twoList.push(two);
|
|
||||||
// if (two.checked) {
|
|
||||||
// lastCheked = two;
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// if (lastCheked != null) {
|
|
||||||
// $this.threeList = lastCheked.children;
|
|
||||||
// item.children.forEach(three => {
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
// } else if (level == 2) { //二级的情况
|
|
||||||
// this.threeList = item.children;
|
|
||||||
// } else if (level == 3) { //三级的情况
|
|
||||||
|
|
||||||
// }
|
|
||||||
//this.handleChangeTypes(item);
|
|
||||||
this.searchData();
|
this.searchData();
|
||||||
},
|
},
|
||||||
// 无用
|
// 无用
|
||||||
@@ -899,18 +873,6 @@ export default {
|
|||||||
this.twoList = [];
|
this.twoList = [];
|
||||||
this.threeList = [];
|
this.threeList = [];
|
||||||
let $this = this;
|
let $this = this;
|
||||||
// this.oneList.forEach(one=>{
|
|
||||||
// if(one.checked){
|
|
||||||
// one.children.forEach(two=>{
|
|
||||||
// $this.twoList.push(two);
|
|
||||||
// if(two.checked){
|
|
||||||
// two.children.forEach(three=>{
|
|
||||||
// $this.threeList.push(three);
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
this.oneList.forEach(one => {
|
this.oneList.forEach(one => {
|
||||||
if (one.checked) {
|
if (one.checked) {
|
||||||
one.children.forEach(two => {
|
one.children.forEach(two => {
|
||||||
@@ -941,15 +903,6 @@ export default {
|
|||||||
checked: false
|
checked: false
|
||||||
}
|
}
|
||||||
if (item.children) {
|
if (item.children) {
|
||||||
//增加死数据
|
|
||||||
// item.children.push({
|
|
||||||
// type: 12,
|
|
||||||
// id: item.id * (index + 200),
|
|
||||||
// name: '线上品牌系列课程',
|
|
||||||
// children: [],
|
|
||||||
// checked: false,
|
|
||||||
// newData: true
|
|
||||||
// })
|
|
||||||
item.children.forEach(subItem => {
|
item.children.forEach(subItem => {
|
||||||
let newSubItem = {
|
let newSubItem = {
|
||||||
type: 12,
|
type: 12,
|
||||||
@@ -1016,47 +969,16 @@ export default {
|
|||||||
this.keyword = val;
|
this.keyword = val;
|
||||||
this.searchData();
|
this.searchData();
|
||||||
},
|
},
|
||||||
|
toNeedCourse() {
|
||||||
// 滚动
|
|
||||||
// handleScroll() {
|
|
||||||
// if (this.courseList.length > 6) {
|
|
||||||
|
|
||||||
// let innerHeight = document.querySelector("#couser-list-content").clientHeight;
|
|
||||||
// let outerHeight = document.documentElement.clientHeight;
|
|
||||||
// let scrollTop = document.documentElement.scrollTop;
|
|
||||||
// let outerWidth = document.querySelector(".xcontent2-minor").clientWidth;
|
|
||||||
// if (outerHeight + scrollTop + 350 >= innerHeight) {
|
|
||||||
// if (this.moreState == 1 && this.course.pageIndex < 4) {
|
|
||||||
// this.loadMore();
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// //console.log(this.course.pageIndex,'this.course.pageIndex');
|
|
||||||
// //加此判断,是为了没有数据时的闪动问题
|
|
||||||
// //if(this.course.pageIndex >1){
|
|
||||||
// if (scrollTop > 1176) {
|
|
||||||
// document.querySelector("#fixd-box").style.cssText =
|
|
||||||
// "position: fixed;top: -882px;width:" + outerWidth + "px";
|
|
||||||
// } else {
|
|
||||||
// document.querySelector("#fixd-box").style.cssText = "position: static";
|
|
||||||
// }
|
|
||||||
// //}
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
|
|
||||||
toNeedCourse() {// 上传
|
|
||||||
// 需要先切换标签
|
|
||||||
//this.$store.dispatch('SetCurIdentity',2);
|
|
||||||
//this.$router.push('/need/course?open=new');
|
|
||||||
this.$refs.floatTools.toNeedCourse();
|
this.$refs.floatTools.toNeedCourse();
|
||||||
|
|
||||||
},
|
},
|
||||||
searchData() {
|
searchData(type) {
|
||||||
this.course.pageIndex = 1;
|
this.course.pageIndex = 1;
|
||||||
this.noPageList = true; //判断接口是否还有数据
|
this.noPageList = true; //判断接口是否还有数据
|
||||||
this.noDataList = true; //判断接口是否还有数据
|
this.noDataList = true; //判断接口是否还有数据
|
||||||
this.courseList = [];
|
this.courseList = [];
|
||||||
this.totalPages = 4;
|
this.totalPages = 4;
|
||||||
this.search();
|
this.search(type);
|
||||||
},
|
},
|
||||||
inputOn() {
|
inputOn() {
|
||||||
this.$forceUpdate();
|
this.$forceUpdate();
|
||||||
@@ -1216,17 +1138,12 @@ export default {
|
|||||||
return list;
|
return list;
|
||||||
},
|
},
|
||||||
// 查询
|
// 查询
|
||||||
async search () {
|
async search (type) {
|
||||||
//
|
|
||||||
if (this.searching) {
|
if (this.searching) {
|
||||||
this.$message.warning("正在搜索中,请待搜索完成后再重新搜索");
|
this.$message.warning("正在搜索中,请待搜索完成后再重新搜索");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.searching = true;
|
this.searching = true;
|
||||||
//测试时间格式化
|
|
||||||
// let s=1650973801;
|
|
||||||
// var d = new Date(1650973801*1000);
|
|
||||||
// console.log(formatDateByFmt(d,'yyyy-MM-dd hh:mm'),'data');
|
|
||||||
this.saveLocalFilters();
|
this.saveLocalFilters();
|
||||||
let that = this;
|
let that = this;
|
||||||
if (this.keyword) {
|
if (this.keyword) {
|
||||||
@@ -1237,7 +1154,6 @@ export default {
|
|||||||
this.course.audiences = this.audiences.join(",");
|
this.course.audiences = this.audiences.join(",");
|
||||||
}
|
}
|
||||||
//console.log(this.userInfo)
|
//console.log(this.userInfo)
|
||||||
//this.course.companyId=this.userInfo.companyId;
|
|
||||||
this.course.type = "";//不使用单查询了
|
this.course.type = "";//不使用单查询了
|
||||||
this.course.types = "";
|
this.course.types = "";
|
||||||
this.course.sysType1 = "";
|
this.course.sysType1 = "";
|
||||||
@@ -1260,6 +1176,20 @@ export default {
|
|||||||
that.course.sysType3 += item.id;
|
that.course.sysType3 += item.id;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
if (!type && type !== 1){
|
||||||
|
apiCourseTag.getHotTagList(that.course).then(rs => {
|
||||||
|
if (rs.status == 200) {
|
||||||
|
// 保留已选中标签的状态
|
||||||
|
const currentCheckedTags = this.hotTagsList.filter(tag => tag.checked);
|
||||||
|
this.hotTagsList = rs.result.map(tag => ({
|
||||||
|
...tag,
|
||||||
|
checked: currentCheckedTags.some(checkedTag => checkedTag.id === tag.id)
|
||||||
|
}));
|
||||||
|
} else {
|
||||||
|
console.log(rs.message);
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
this.isFind = true;
|
this.isFind = true;
|
||||||
this.course.device = 1;
|
this.course.device = 1;
|
||||||
@@ -1279,6 +1209,9 @@ export default {
|
|||||||
params.pageNum = pageIndex
|
params.pageNum = pageIndex
|
||||||
params.orderByType = orderField
|
params.orderByType = orderField
|
||||||
params.courseSource = this.ctypeList.findIndex(e => e.checked)
|
params.courseSource = this.ctypeList.findIndex(e => e.checked)
|
||||||
|
if (params.courseSource === -1) {
|
||||||
|
params.courseSource = 0
|
||||||
|
}
|
||||||
this.yearChosen.length && (params.years = this.yearChosen)
|
this.yearChosen.length && (params.years = this.yearChosen)
|
||||||
params.courseName = this.keyword
|
params.courseName = this.keyword
|
||||||
delete params.userId
|
delete params.userId
|
||||||
@@ -1291,44 +1224,8 @@ export default {
|
|||||||
console.log(res.status)
|
console.log(res.status)
|
||||||
if (res.status === 200) {
|
if (res.status === 200) {
|
||||||
this.totalPages = res.data.result.pages;
|
this.totalPages = res.data.result.pages;
|
||||||
// res.result.list.forEach(item => {
|
|
||||||
// if (item.startTime != '') {
|
|
||||||
// item.startTime = formatDateByFmt(new Date(item.startTime * 1000), 'yyyy-MM-dd hh:mm')
|
|
||||||
// //let time = item.startTime.split('-');
|
|
||||||
// //item.startTime = `${time[0]}年${time[1]}月${time[2]}日`
|
|
||||||
// }
|
|
||||||
// //教师转化
|
|
||||||
// if (item.teacher) {
|
|
||||||
// item.teacher = item.teacher.split(',').filter(itemValue => itemValue !== 'BOE教师').join(',');
|
|
||||||
// // if (dotIdx > 0) {
|
|
||||||
// // item.teacher = item.teacher.substring(0, dotIdx);
|
|
||||||
// // }
|
|
||||||
// }
|
|
||||||
// if (item.teacher && item.teacher == 'BOE教师') {
|
|
||||||
// item.teacher = '';
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// //转化标红显示
|
|
||||||
// item.title = item.name;
|
|
||||||
// if (that.course.keyword) {
|
|
||||||
// item.name = that.brightenKeyword(item.name, that.course.keyword);
|
|
||||||
// item.keywordsActive = that.brightenKeywords(item.keywordsList, that.course.keyword)
|
|
||||||
// console.log(item.keywordsActive);
|
|
||||||
// } else {
|
|
||||||
// item.name = item.name;
|
|
||||||
// }
|
|
||||||
// });
|
|
||||||
|
|
||||||
const list = res.data.result.records ?? []
|
const list = res.data.result.records ?? []
|
||||||
// list.forEach(course=>{
|
|
||||||
// const id = course.courseId
|
|
||||||
//
|
|
||||||
// apiCourse.getTeacherByCourseIDs([id]).then(res=>{
|
|
||||||
// console.log(res, "ids res")
|
|
||||||
// course.teacher = res.result[0].names[0]
|
|
||||||
// console.log(`course.teacher`, course.teacher)
|
|
||||||
// })
|
|
||||||
// })
|
|
||||||
|
|
||||||
this.courseList = list
|
this.courseList = list
|
||||||
if (this.newData) {
|
if (this.newData) {
|
||||||
@@ -1389,18 +1286,7 @@ export default {
|
|||||||
this.moreState = 2;
|
this.moreState = 2;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
// showInApply() {
|
|
||||||
// this.inapply.show = true;
|
|
||||||
// },
|
|
||||||
// pushEnter(type) {
|
|
||||||
// this.type1.push(type);
|
|
||||||
// },
|
|
||||||
// deleteOut(type) {
|
|
||||||
// this.type1 = this.type.filter(item => item != type);
|
|
||||||
// },
|
|
||||||
// chooseShow(type) {
|
|
||||||
// return this.type1.some(item => item == type);
|
|
||||||
// },
|
|
||||||
getAnkingData() {
|
getAnkingData() {
|
||||||
apiCourse.ranking().then(res => {
|
apiCourse.ranking().then(res => {
|
||||||
if (res.status == 200) {
|
if (res.status == 200) {
|
||||||
@@ -2205,7 +2091,7 @@ export default {
|
|||||||
border-radius: 8px;
|
border-radius: 8px;
|
||||||
|
|
||||||
::v-deep .el-input {
|
::v-deep .el-input {
|
||||||
width: 420px;
|
//width: 420px;
|
||||||
height: 38px;
|
height: 38px;
|
||||||
//margin-bottom: 13px;
|
//margin-bottom: 13px;
|
||||||
|
|
||||||
@@ -2327,4 +2213,6 @@ export default {
|
|||||||
|
|
||||||
.option-active {
|
.option-active {
|
||||||
color: #387DF7;
|
color: #387DF7;
|
||||||
}</style>
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
|||||||
Reference in New Issue
Block a user