产品中心学科筛选、考核等

Branch_d40a2540
yujialong 2 years ago
parent 71bc842ecd
commit 108372bbd1
  1. BIN
      src/assets/img/product/bg1.png
  2. BIN
      src/assets/img/product/bg2.png
  3. 414
      src/layouts/home/index.vue
  4. 52
      src/pages/achievement/list/index.vue
  5. 3
      src/pages/achievement/show/index.vue
  6. 53
      src/pages/assessment/list/index.vue
  7. 435
      src/pages/product/list/index.vue
  8. 9
      src/pages/product/show/index.vue
  9. 10
      src/pages/station/preview/index.vue

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

@ -1,42 +1,61 @@
<template>
<div class="main">
<v-head></v-head>
<div class="layout">
<navbar></navbar>
<div class="content">
<transition name="move" mode="out-in">
<router-view class="view"></router-view>
</transition>
<el-backtop target=".content"></el-backtop>
</div>
<v-footer ref="footer"></v-footer>
<div class="log-mask" v-if="logVisible"></div>
<div class="log-dia" v-if="logVisible">
<img class="bg1" src="@/assets/img/log-bg.png" alt="">
<img class="bg2" src="@/assets/img/log-bg1.png" alt="">
<p class="log-title">更新日志</p>
<div class="log-wrap">
<div class="logs">
<div class="item" v-for="(item, i) in list" :key="i" v-show="!i || (i && logAll)">
<h6>{{ item.versionName }}</h6>
<img v-if="item.coverUrl" :src="item.coverUrl" alt="" class="cover">
<ul class="detail">
<li v-for="(item, i) in item.logContents" :key="i">
<p class="name"><img :src="require('@/assets/img/' + funcList.find(e => e.id === item.type).icon + '.png')" alt=""> {{ funcList.find(e => e.id === item.type).name }}</p>
<div class="val">
<p v-for="(item, i) in item.content" :key="i">{{ i + 1 }}{{ item }}</p>
</div>
</li>
</ul>
<div class="main">
<v-head></v-head>
<div class="layout">
<navbar></navbar>
<div class="content">
<transition name="move"
mode="out-in">
<router-view class="view"></router-view>
</transition>
<el-backtop target=".content"></el-backtop>
</div>
<v-footer ref="footer"></v-footer>
<div class="log-mask"
v-if="logVisible"></div>
<div class="log-dia"
v-if="logVisible">
<img class="bg1"
src="@/assets/img/log-bg.png"
alt="">
<img class="bg2"
src="@/assets/img/log-bg1.png"
alt="">
<p class="log-title">更新日志</p>
<div class="log-wrap">
<div class="logs">
<div class="item"
v-for="(item, i) in list"
:key="i"
v-show="!i || (i && logAll)">
<h6>{{ item.versionName }}</h6>
<img v-if="item.coverUrl"
:src="item.coverUrl"
alt=""
class="cover">
<ul class="detail">
<li v-for="(item, i) in item.logContents"
:key="i">
<p class="name"><img :src="require('@/assets/img/' + funcList.find(e => e.id === item.type).icon + '.png')"
alt=""> {{ funcList.find(e => e.id === item.type).name }}</p>
<div class="val">
<p v-for="(item, i) in item.content"
:key="i">{{ i + 1 }}{{ item }}</p>
</div>
</div>
<div class="more-wrap">
<el-button class="know" type="primary" size="small" @click="logVisible = false">知道了</el-button>
</div>
</div>
</li>
</ul>
</div>
</div>
<div class="more-wrap">
<el-button class="know"
type="primary"
size="small"
@click="logVisible = false">知道了</el-button>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
@ -48,89 +67,89 @@ import util from "@/libs/util";
import Setting from "@/setting";
export default {
data() {
return {
logVisible: false,
list: [],
logAll: false,
funcList: [
{
id: 0,
name: '新功能',
icon: 'func'
},
{
id: 1,
name: '修复',
icon: 'bug'
},
{
id: 2,
name: '优化',
icon: 'optimize'
}
]
};
},
components: {
vHead,
navbar,
vFooter
},
computed: {
...mapState("user", [
'logView'
])
},
mounted() {
this.autoLogout();
this.logView || this.getLogStatus() // logViewfalse
},
methods: {
...mapMutations("user", [
'SET_LOG'
]),
...mapActions("user", [
"logout"
]),
//
getLog() {
this.$get(`${this.api.platformLogList}?platformId=${Setting.platformId}&port=1&versionName=`).then(({ logList }) => {
logList.map((e, i) => {
e.logContents.map(n => {
n.content = n.content.split('\n')
})
})
this.list = logList
}).catch(res => {})
data () {
return {
logVisible: false,
list: [],
logAll: false,
funcList: [
{
id: 0,
name: '新功能',
icon: 'func'
},
//
getLogStatus() {
util.local.get(Setting.tokenKey) && this.$get(this.api.logNotification, {
platformId: Setting.platformId
}).then(({ notification }) => {
this.SET_LOG() // true
if (notification) {
this.logVisible = true // true
this.getLog()
}
}).catch(res => {})
{
id: 1,
name: '修复',
icon: 'bug'
},
// ,退
autoLogout() {
let lastTime = new Date().getTime();
document.onmousedown = () => {
lastTime = new Date().getTime();
};
{
id: 2,
name: '优化',
icon: 'optimize'
}
]
};
},
components: {
vHead,
navbar,
vFooter
},
computed: {
...mapState("user", [
'logView'
])
},
mounted () {
this.autoLogout();
this.logView || this.getLogStatus() // logViewfalse
},
methods: {
...mapMutations("user", [
'SET_LOG'
]),
...mapActions("user", [
"logout"
]),
//
getLog () {
this.$get(`${this.api.platformLogList}?platformId=${Setting.platformId}&port=1&versionName=`).then(({ logList }) => {
logList.map((e, i) => {
e.logContents.map(n => {
n.content = n.content.split('\n')
})
})
this.list = logList
}).catch(res => { })
},
//
getLogStatus () {
util.local.get(Setting.tokenKey) && this.$get(this.api.logNotification, {
platformId: Setting.platformId
}).then(({ notification }) => {
this.SET_LOG() // true
if (notification) {
this.logVisible = true // true
this.getLog()
}
}).catch(res => { })
},
// ,退
autoLogout () {
let lastTime = new Date().getTime();
document.onmousedown = () => {
lastTime = new Date().getTime();
};
setInterval(() => {
if (util.local.get(Setting.tokenKey) && (new Date().getTime() - lastTime) > Setting.autoLogoutTime) {
util.errorMsg("用户登录过期,请重新登录");
setTimeout(this.logout, 1500);
}
}, 1000);
setInterval(() => {
if (util.local.get(Setting.tokenKey) && (new Date().getTime() - lastTime) > Setting.autoLogoutTime) {
util.errorMsg("用户登录过期,请重新登录");
setTimeout(this.logout, 1500);
}
}, 1000);
}
}
};
</script>
<style lang="scss" scoped>
@ -139,99 +158,100 @@ export default {
.content {
min-height: calc(100vh - 176px);
padding: 24px 24px;
padding: 24px;
}
}.log-mask {
position: fixed;
top: 0;
left: 0;
bottom: 0;
right: 0;
background-color: rgba(0, 0, 0, .4);
}
.log-mask {
position: fixed;
top: 0;
left: 0;
bottom: 0;
right: 0;
background-color: rgba(0, 0, 0, 0.4);
}
/deep/.log-dia {
z-index: 11;
position: absolute;
top: 250px;
left: 50%;
width: 550px;
transform: translateX(-50%);
background-color: #fff;
border-radius: 6px;
.bg1 {
width: 100%;
height: 140px;
}
.bg2 {
z-index: 11;
position: absolute;
top: -130px;
left: 48px;
max-width: 100%;
height: 250px;
}
.log-title {
position: absolute;
top: 65px;
left: 0;
width: 100%;
text-align: center;
font-size: 22px;
color: #fff;
font-weight: 600;
}
.log-wrap {
padding-bottom: 30px;
}
.logs {
max-height: 250px;
padding: 0 100px;
margin: 30px 0;
overflow: auto;
}
h6 {
margin-bottom: 15px;
font-size: 16px;
color: #333;
line-height: 1;
}
.more-wrap {
padding: 0 60px;
font-size: 14px;
color: #333;
text-align: center;
}
.know {
margin-top: 15px;
}
.cover {
max-width: 250px;
max-height: 160px;
margin: 10px 0 20px;
}
.detail {
li {
margin-bottom: 20px;
top: 250px;
left: 50%;
width: 550px;
transform: translateX(-50%);
background-color: #fff;
border-radius: 6px;
.bg1 {
width: 100%;
height: 140px;
}
.bg2 {
position: absolute;
top: -130px;
left: 48px;
max-width: 100%;
height: 250px;
}
.log-title {
position: absolute;
top: 65px;
left: 0;
width: 100%;
text-align: center;
font-size: 22px;
color: #fff;
font-weight: 600;
}
.log-wrap {
padding-bottom: 30px;
}
.name {
display: flex;
align-items: center;
margin-bottom: 5px;
.logs {
max-height: 250px;
padding: 0 100px;
margin: 30px 0;
overflow: auto;
}
h6 {
margin-bottom: 15px;
font-size: 16px;
color: #333;
line-height: 1;
}
.more-wrap {
padding: 0 60px;
font-size: 14px;
img {
width: 20px;
margin-right: 8px;
}
color: #333;
text-align: center;
}
.know {
margin-top: 15px;
}
.val {
font-size: 15px;
line-height: 1.8;
white-space: pre-wrap;
p {
position: relative;
font-size: 13px;
color: #727272;
.cover {
max-width: 250px;
max-height: 160px;
margin: 10px 0 20px;
}
.detail {
li {
margin-bottom: 20px;
}
.name {
display: flex;
align-items: center;
margin-bottom: 5px;
font-size: 14px;
img {
width: 20px;
margin-right: 8px;
}
}
.val {
font-size: 15px;
line-height: 1.8;
white-space: pre-wrap;
p {
position: relative;
font-size: 13px;
color: #727272;
}
}
}
}
}
</style>

@ -48,12 +48,14 @@
</li>
<li>
<label>课程</label>
<el-cascader v-model="mallIds"
:options="curs"
:props="{ checkStrictly: true, value: 'id' }"
popper-class="course-cas"
@expand-change="curChange"
@change="curChange"></el-cascader>
<el-select v-model="mallId"
@change="initData">
<el-option v-for="(item, i) in curs"
:key="i"
:label="item.curriculumName"
:value="item.mallId"
@change="curChange"></el-option>
</el-select>
</li>
<li>
<el-input placeholder="请输入考核或项目名称"
@ -162,7 +164,6 @@ export default {
classId: this.$route.query.class ? +this.$route.query.class : '',
classList: [],
mallId: this.$route.query.mallId ? +this.$route.query.mallId : '',
systemId: this.$route.query.systemId ? +this.$route.query.systemId : '',
curriculumList: [],
projectPermissions: this.$route.query.per ? +this.$route.query.per : 0,
mallIds: [],
@ -240,36 +241,21 @@ export default {
//
async getCourse () {
const { data } = await this.$get(this.api.getSystemIdBySchool)
const res = await this.$get(this.api.getSchoolEffectiveCourse)
if (res.data.length) {
res.data.map(e => {
e.id = e.mallId
e.label = e.curriculumName
e.children = data.filter(n => e.systemId.split(',').includes(n.id + '')) //
})
this.curs = res.data
this.mallIds = [this.mallId || res.data[0].mallId, this.systemId || data[0].id]
this.getData();
console.log("🚀 ~ file: index.vue:431 ~ getSystemData ~ res.data:", this.mallIds)
}
const { data } = await this.$get(this.api.getSchoolEffectiveCourse)
this.curs = data
this.mallId = this.mallId || data[0].mallId
this.initData();
},
//
curChange (val) {
const id = val[0]
if (val.length === 1) {
//
this.mallIds = [id, this.curs.find(e => e.id == id).children[0].id]
}
curChange (id) {
this.$router.push({
path: 'list',
query: {
...this.$route.query,
mallId: this.mallIds[0],
systemId: this.mallIds[1],
mallId: id
}
})
this.getData()
this.initData()
},
getClassData () { //
@ -283,20 +269,20 @@ export default {
background: "rgba(255,255,255,.6)"
});
const per = this.projectPermissions
const { mallIds } = this
const cur = this.curs.find(e => e.mallId == mallIds[0])
const { mallId } = this
const cur = this.curs.find(e => e.mallId == mallId) || {}
let data = {
classId: this.classId,
permissions: per,
curriculumId: cur.cid,
mallId: mallIds[0],
mallId,
keyWord: this.keyword,
startTime: this.startingtime,
endTime: this.endTime,
month: this.month,
pageNum: this.page,
pageSize: this.pageSize,
systemId: mallIds[1]
systemId: cur.systemId
};
this.$post(this.api.getAchievementInfo, data).then(res => {
let list = []

@ -251,7 +251,8 @@ export default {
laboratory: form.laboratory,
submitTime: form.submitTime,
score: form.score,
userName: form.userName
userName: form.userName,
className: form.className
}
const data = report.data
this.userScores = userScores

@ -50,12 +50,20 @@
</li>
<li>
<label>课程</label>
<el-cascader v-model="mallIds"
<el-select v-model="mallId"
@change="initData">
<el-option v-for="(item, i) in curs"
:key="i"
:label="item.curriculumName"
:value="item.mallId"></el-option>
</el-select>
<!-- <el-cascader v-model="mallIds"
:options="curs"
:props="{ checkStrictly: true, value: 'id' }"
popper-class="course-cas"
@expand-change="curChange"
@change="curChange"></el-cascader>
@change="curChange"></el-cascader> -->
</li>
</ul>
</div>
@ -269,7 +277,12 @@ export default {
keyWord: "", //
searchTimer: null,
mallIds: [],
curs: [],
curs: [
{
id: '',
curriculumName: '不限'
}
],
form: {
type: "",
status: "",
@ -367,15 +380,15 @@ export default {
getData (counddown) {
this.listLoading = true;
const { mallIds } = this
const cur = this.curs.find(e => e.mallId == mallIds[0])
// const cur = this.curs.find(e => e.mallId == mallIds[0])
let data = {
...this.form,
keyWord: this.keyWord,
pageNum: this.pageNum,
pageSize: this.pageSize,
cid: cur.cid,
mallId: mallIds[0],
systemId: mallIds[1]
// cid: cur.cid,
mallId: this.mallId,
// systemId: mallIds[1]
};
this.$post(this.api.pageByCondition, data).then(res => {
this.listData = res.list;
@ -417,27 +430,21 @@ export default {
//
async getCourse () {
const { data } = await this.$get(this.api.getSystemIdBySchool)
const res = await this.$get(this.api.getSchoolEffectiveCourse)
if (res.data.length) {
res.data.map(e => {
e.id = e.mallId
e.label = e.curriculumName
e.children = data.filter(n => e.systemId.split(',').includes(n.id + '')) //
})
this.curs = res.data
this.mallIds = [res.data[0].mallId, data[0].id]
this.pageNum = 1
this.getData(1)
console.log("🚀 ~ file: index.vue:431 ~ getSystemData ~ res.data:", this.mallIds)
}
const { data } = await this.$get(this.api.getSchoolEffectiveCourse)
this.curs.push(...data)
this.pageNum = 1
this.getData(1)
},
//
curChange (val) {
const id = val[0]
if (val.length === 1) {
if (id) {
//
this.mallIds = [id, this.curs.find(e => e.id == id).children[0].id]
if (val.length === 1) this.mallIds = [id, this.curs.find(e => e.id == id).children[0].id]
} else {
this.mallId = ''
this.cid = ''
this.systemId = ''
}
this.initData()
},

@ -18,142 +18,183 @@
</template>
</el-carousel>
<div class="inner">
<div class="typw-wrap">
<div>
<img src="@/assets/img/hot.png"
alt="">
<img class="m-l-5 m-r-10"
src="@/assets/img/type.png"
alt="">
<ul class="tab">
<li v-for="(tab, i) in tabs"
:key="i"
:class="{active: curTab === tab.id}"
@click="tabChange(tab)">{{ tab.name }}</li>
</ul>
</div>
<div class="search">
<img class="icon"
src="@/assets/img/search.png"
alt="">
<input type="text"
placeholder="请输入产品名称"
v-model="form.productName">
</div>
</div>
<div class="filter">
<dl v-if="curTab == 1">
<dt>学科专业</dt>
<el-cascader style="width: 300px;padding: 0 15px"
v-model="category"
:props="props"
clearable
@change="initData"></el-cascader>
</dl>
<dl v-if="curTab == 3">
<dt>产品标签</dt>
<div class="vals">
<dd :class="{active: form.tagId === ''}"
@click="filterChange('', 'tagId')">全部</dd>
<dd v-for="(item, i) in labels"
:key="i"
:class="{active: form.tagId === item.tagsId}"
@click="filterChange(item.tagsId, 'tagId')">{{ item.tagsName }}</dd>
<div class="inner-wrap">
<div class="inner">
<div class="type-wrap">
<div>
<img src="@/assets/img/hot.png"
alt="">
<img class="m-l-5 m-r-10"
src="@/assets/img/type.png"
alt="">
<ul class="tab">
<li v-for="(tab, i) in tabs"
:key="i"
:class="{active: curTab === tab.id}"
@click="tabChange(tab)">{{ tab.name }}</li>
</ul>
</div>
</dl>
<dl>
<dt>产品类型</dt>
<div class="vals">
<dd :class="{active: form.productType === ''}"
@click="filterChange('', 'productType')">全部</dd>
<dd v-for="(item, i) in classifications"
:key="i"
:class="{active: form.productType === item.typeId}"
@click="filterChange(item.typeId, 'productType')">{{ item.typeName }}</dd>
<div class="search">
<img class="icon"
src="@/assets/img/search.png"
alt="">
<input type="text"
placeholder="请输入产品名称"
v-model="form.productName">
</div>
</dl>
<dl>
<dt>购买状态</dt>
<dd v-for="(item, i) in status"
:key="i"
:class="{active: form.purchaseStatus === item.id}"
@click="filterChange(item.id, 'purchaseStatus')">{{ item.name }}</dd>
</dl>
</div>
</div>
<div class="filter">
<dl v-if="curTab == 1">
<dt>学科专业</dt>
<dd :class="{active: categoryId === ''}"
@click="catetoryClick('')">全部</dd>
<dd :class="{active: categoryId === 1}"
@click="catetoryClick(1)">不限</dd>
<div class="filter m-t-20">
<dl>
<dd v-for="(item, i) in sorts"
:key="i"
:class="{active: form.sort === item.id}"
@click="filterChange(item.id, 'sort')">{{ item.name }}</dd>
<dd :class="{active: form.sort === 2 || form.sort === 5}"
@click="sort">发布时间</dd>
<span class="caret"
@click="sort">
<i :class="['asc', {active: form.sort === 2}]"></i>
<i :class="['desc', {active: form.sort === 5}]"></i>
</span>
</dl>
</div>
<el-dropdown class="category"
@command="id => categoryDropdown(id, 'categoryId')">
<span class="el-dropdown-link">
{{ categoryName }}<i class="el-icon-arrow-down el-icon--right"></i>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item v-for="(item, i) in subjectList"
:key="i"
:command="item.disciplineId">{{ item.disciplineName }}</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<el-dropdown class="category"
@command="id => categoryDropdown(id, 'professionalCategoryId')">
<span class="el-dropdown-link">
{{ professionalCategoryName }}<i class="el-icon-arrow-down el-icon--right"></i>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item v-for="(item, i) in professionalClassList"
:key="i"
:command="item.professionalClassId">{{ item.professionalClassName }}</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<el-dropdown class="category"
@command="id => categoryDropdown(id, 'professionalId')">
<span class="el-dropdown-link">
{{ professionalName }}<i class="el-icon-arrow-down el-icon--right"></i>
</span>
<el-dropdown-menu slot="dropdown">
<el-dropdown-item v-for="(item, i) in professionalList"
:key="i"
:command="item.professionalId">{{ item.professionalName }}</el-dropdown-item>
</el-dropdown-menu>
</el-dropdown>
<!-- <el-cascader style="width: 300px;padding: 0 15px"
v-model="category"
:props="props"
clearable
@change="initData"></el-cascader> -->
</dl>
<dl v-if="curTab == 3">
<dt>产品标签</dt>
<div class="vals">
<dd :class="{active: form.tagId === ''}"
@click="filterChange('', 'tagId')">全部</dd>
<dd v-for="(item, i) in labels"
:key="i"
:class="{active: form.tagId === item.tagsId}"
@click="filterChange(item.tagsId, 'tagId')">{{ item.tagsName }}</dd>
</div>
</dl>
<dl>
<dt>产品类型</dt>
<div class="vals">
<dd :class="{active: form.productType === ''}"
@click="filterChange('', 'productType')">全部</dd>
<dd v-for="(item, i) in classifications"
:key="i"
:class="{active: form.productType === item.typeId}"
@click="filterChange(item.typeId, 'productType')">{{ item.typeName }}</dd>
</div>
</dl>
<dl>
<dt>购买状态</dt>
<dd v-for="(item, i) in status"
:key="i"
:class="{active: form.purchaseStatus === item.id}"
@click="filterChange(item.id, 'purchaseStatus')">{{ item.name }}</dd>
</dl>
</div>
<div class="courses">
<template v-if="list.length">
<ul>
<li v-for="(item, i) in list"
<div class="filter m-t-20">
<dl>
<dd v-for="(item, i) in sorts"
:key="i"
@click="toDetail(item.mallId)">
<img :src="item.coverDrawing"
alt="" />
<img v-if="item.logoOfOurSchool"
class="my-school"
src="@/assets/img/my-school.png"
alt="">
<div class="texts">
<el-tooltip effect="dark"
:visible-arrow="false"
:content="item.productName"
placement="bottom">
<div class="title">{{ item.productName }}</div>
</el-tooltip>
<div class="desc"
v-html="item.productIntroduction"></div>
<div class="tags">
<el-tooltip v-if="item.tagsName"
class="item"
effect="dark"
:class="{active: form.sort === item.id}"
@click="filterChange(item.id, 'sort')">{{ item.name }}</dd>
<dd :class="{active: form.sort === 2 || form.sort === 5}"
@click="sort">发布时间</dd>
<span class="caret"
@click="sort">
<i :class="['asc', {active: form.sort === 2}]"></i>
<i :class="['desc', {active: form.sort === 5}]"></i>
</span>
</dl>
</div>
<div class="courses">
<template v-if="list.length">
<ul>
<li v-for="(item, i) in list"
:key="i"
@click="toDetail(item.mallId)">
<img :src="item.coverDrawing"
alt="" />
<img v-if="item.logoOfOurSchool"
class="my-school"
src="@/assets/img/my-school.png"
alt="">
<div class="texts">
<el-tooltip effect="dark"
:visible-arrow="false"
:content="item.tagsName"
:content="item.productName"
placement="bottom">
<div>
<el-tag v-for="(tag, i) in item.tagsName.split(',')"
:key="i"
class="tag">{{ tag }}</el-tag>
</div>
<div class="title">{{ item.productName }}</div>
</el-tooltip>
<div class="desc"
v-html="item.productIntroduction"></div>
<div class="tags">
<el-tooltip v-if="item.tagsName"
class="item"
effect="dark"
:visible-arrow="false"
:content="item.tagsName"
placement="bottom">
<div>
<el-tag v-for="(tag, i) in item.tagsName.split(',')"
:key="i"
class="tag">{{ tag }}</el-tag>
</div>
</el-tooltip>
</div>
<div :class="['metas', {'not-selected': !item.selected}]">
<el-tag v-if="item.selected"
type="danger"
effect="dark">
官方精选
</el-tag>
<div v-if="item.isCourse"
class="meta">{{ item.learningCount }}人学过</div>
</div>
</div>
<div :class="['metas', {'not-selected': !item.selected}]">
<el-tag v-if="item.selected"
type="danger"
effect="dark">
官方精选
</el-tag>
<div v-if="item.isCourse"
class="meta">{{ item.learningCount }}人学过</div>
</div>
</div>
</li>
</ul>
<div class="pagination">
<el-pagination background
layout="total, prev, pager, next"
:page-size="pageSize"
:total="total"
@current-change="handleCurrentChange"
:current-page="page"></el-pagination>
</div>
</template>
</li>
</ul>
<div class="pagination">
<el-pagination background
layout="total, prev, pager, next"
:page-size="pageSize"
:total="total"
@current-change="handleCurrentChange"
:current-page="page"></el-pagination>
</div>
</template>
</div>
</div>
</div>
</div>
@ -191,15 +232,15 @@ export default {
form: {
isShelves: 0,
hotTag: 1,
// categoryId: '',
// professionalCategoryId: '',
// professionalId: '',
productType: '',
productName: '',
purchaseStatus: '',
sort: 0,
tagId: ''
},
categoryId: '',
professionalCategoryId: '',
professionalId: '',
category: [],
//
props: {
@ -251,6 +292,9 @@ export default {
subjectList: [], //
professionalClassList: [], //
professionalList: [], //
categoryName: '',
professionalCategoryName: '',
professionalName: '',
classifications: [],
status: [
{
@ -312,7 +356,7 @@ export default {
this.getSubject()
this.getLabel()
this.getClass()
this.initData()
// this.initData()
},
methods: {
// banner
@ -327,15 +371,14 @@ export default {
},
//
getData () {
const { category } = this
this.loadIns = Loading.service()
this.$post(this.api.listOfGoods, {
...this.form,
categoryId: category[0] || '',
professionalCategoryId: category[1] || '',
professionalId: category[2] || '',
pageNum: this.page,
pageSize: this.pageSize,
categoryId: this.categoryId,
professionalCategoryId: this.categoryId ? this.professionalCategoryId : '',
professionalId: this.categoryId ? this.professionalId : '',
}).then(({ page }) => {
const list = page.records
list && list.forEach(e => {
@ -366,50 +409,99 @@ export default {
},
//
getSubject () {
this.$get(this.api.courseDiscipline).then(res => {
this.subjectList = res.list;
this.$get(this.api.courseDiscipline).then(({ list }) => {
this.subjectList = list.slice(1)
this.getProfessionalClassData(list[1].disciplineId)
}).catch(err => {
});
},
//
clearClass () {
this.form.professionalCategoryId = "";
this.form.professionalId = "";
},
//
getProfessionalClass () {
this.clearClass();
this.getProfessionalClassData();
this.initData();
},
getProfessionalClassData () {
getProfessionalClassData (id) {
let data = {
disciplineId: this.form.categoryId
disciplineId: id || this.categoryId
};
this.$get(this.api.courseProfessionalClass, data).then(res => {
this.professionalClassList = res.list;
const i = id === 1 ? 1 : 0
this.$get(this.api.courseProfessionalClass, data).then(({ list }) => {
this.professionalClassList = list.slice(i)
if (id) this.professionalCategoryId = list[i].professionalClassId
this.getProfessionalData(list[i].professionalClassId)
}).catch(err => {
});
},
//
clearProfess () {
this.form.professionalId = "";
},
//
getProfessional () {
this.clearProfess();
this.getProfessionalData();
this.initData();
},
getProfessionalData () {
getProfessionalData (id) {
let data = {
professionalClassId: this.form.professionalCategoryId
professionalClassId: id || this.professionalCategoryId
};
this.$get(this.api.courseProfessional, data).then(res => {
this.professionalList = res.list;
const i = id === 1 ? 1 : 0
this.$get(this.api.courseProfessional, data).then(({ list }) => {
this.professionalList = list.slice(i)
if (id) this.professionalId = list[i].professionalId
this.handleCategoryName()
this.initData()
}).catch(err => {
});
},
// name
handleCategoryName () {
if (this.subjectList.length) {
const id = this.categoryId
const list = this.subjectList
if (list.length) {
if (id === '' || id === 1) {
this.categoryName = list[0].disciplineName
} else {
const item = list.find(e => e.disciplineId == id)
this.categoryName = item ? item.disciplineName : ''
}
}
}
if (this.professionalClassList.length) {
const id = this.professionalCategoryId
const list = this.professionalClassList
if (list.length) {
if (id === '' || id === 1) {
this.professionalCategoryName = list[0].professionalClassName
} else {
const item = list.find(e => e.professionalClassId == id)
this.professionalCategoryName = item ? item.professionalClassName : ''
}
}
}
if (this.professionalList.length) {
const id = this.professionalId
const list = this.professionalList
if (list.length) {
if (id === '' || id === 1) {
this.professionalName = list[0].professionalName
} else {
const item = list.find(e => e.professionalId == id)
this.professionalName = item ? item.professionalName : ''
}
}
}
},
//
catetoryClick (id) {
this.categoryId = id
this.professionalCategoryId = id
this.professionalId = id
this.initData()
},
//
categoryDropdown (id, prop) {
this[prop] = id
if (prop === 'categoryId') {
this.getProfessionalClassData(id)
}
if (prop === 'professionalCategoryId') {
this.getProfessionalData(id)
}
if (prop === 'professionalId') {
this.handleCategoryName()
this.initData()
}
},
//
getClass () {
this.$get(this.api.productTypeList).then(res => {
@ -483,11 +575,17 @@ export default {
color: #2e2d31;
}
}
.inner-wrap {
padding: 18px 0;
background: url(../../../assets/img/product/bg1.png) 0 159px no-repeat,
url(../../../assets/img/product/bg2.png) bottom right no-repeat;
background-color: #f3f6fa;
}
.inner {
width: 1146px;
margin: 18px auto;
margin: 0 auto;
}
.typw-wrap {
.type-wrap {
display: flex;
justify-content: space-between;
margin-bottom: 18px;
@ -565,6 +663,9 @@ export default {
color: #9278ff;
}
}
.category {
margin: 5px 10px 0;
}
}
.vals {
display: inline-flex;

@ -311,7 +311,7 @@ export default {
//
toPreview (i, j) {
this.form.goodsRes.logoOfOurSchool ?
this.$router.push(`/station/preview?courseId=${this.form.mall.associatedProduct}&curriculumName=${this.form.mall.associatedProductName}&mallId=${this.id}&chapter=${i}&section=${j}&admin=1`) :
this.$router.push(`/station/preview?courseId=${this.form.mall.associatedProduct}&curriculumName=${this.form.mall.productName}&mallId=${this.id}&chapter=${i}&section=${j}&admin=1`) :
this.toTrail()
},
// /
@ -335,7 +335,7 @@ export default {
toStation () {
if (this.isCourse) { //
this.$post(`${this.api.addLearningRecord}?mallId=${this.id}`).then(res => {
this.$router.push('/station/preview?courseId=' + this.form.mall.associatedProduct + '&curriculumName=' + this.form.mall.associatedProductName + '&mallId=' + this.id)
this.$router.push('/station/preview?courseId=' + this.form.mall.associatedProduct + '&curriculumName=' + this.form.mall.productName + '&mallId=' + this.id)
}).catch(res => { })
} else if (this.withLink) { //
this.linkVisible = true
@ -377,7 +377,10 @@ export default {
<style lang="scss" scoped>
.wrap {
background: #f3f6fa;
padding: 24px;
margin: -24px;
background: url(../../../assets/img/product/bg1.png) 0 373px no-repeat, url(../../../assets/img/product/bg2.png) bottom right no-repeat;
background-color: #f3f6fa;
.inner {
width: 1146px;
margin: 0 auto;

@ -4,7 +4,7 @@
class="m-b-20">
<div class="flex-between">
<el-page-header @back="goBack"
:content="courseName"></el-page-header>
:content="curriculumName || courseName"></el-page-header>
</div>
</el-card>
<el-card shadow="hover"
@ -86,7 +86,7 @@
@click="entry"> </el-button>
</div>
<div class="list">
<h4 class="title">{{ courseName }}</h4>
<h4 class="title">{{ curriculumName || courseName }}</h4>
<div>
<h6 class="pro-title">当前教学进度</h6>
<el-progress :stroke-width="12"
@ -522,7 +522,7 @@ export default {
watch: {
'$route': {
handler () {
this.mallId = this.$route.query.mallId || ''
this.mallId = +this.$route.query.mallId || ''
this.courseId = +this.$route.query.courseId
this.curriculumName = this.$route.query.curriculumName
this.commentId = this.$route.query.commentId //
@ -667,7 +667,7 @@ export default {
//
getComment () {
this.$get(this.api.commentTreeList, {
cid: this.courseId,
mallId: this.mallId,
}).then(res => {
this.deleteIdentity = res.deleteIdentity
const list = res.rootComments
@ -723,7 +723,7 @@ export default {
const content = reply ? reply.replyContent : row ? row.replyContent : this.comment
if (!content) return util.errorMsg('请输入内容!')
this.$post(this.api.addCommentStation, {
cid: this.courseId,
mallId: this.mallId,
content,
// pid: reply ? reply.commentId : row ? row.commentId : 0,
pid: row ? row.commentId : 0,

Loading…
Cancel
Save