全站添加筛选功能缓存

dev_202412 V2.3.5
yujialong 11 months ago
parent 1b38df77d2
commit 354c2f8ca2
  1. 52
      src/components/breadcrumb/index.vue
  2. 17
      src/pages/activity/details/index.vue
  3. 79
      src/pages/activity/list/index.vue
  4. 23
      src/pages/activity/manage/add/index.vue
  5. 40
      src/pages/activity/manage/list/index.vue
  6. 20
      src/pages/activity/manage/manage/index.vue
  7. 29
      src/pages/activity/manage/manage/notice.vue
  8. 1
      src/pages/activity/manage/manage/noticeDetail.vue
  9. 36
      src/pages/ass/list/index.vue
  10. 26
      src/pages/course/details/index.vue
  11. 28
      src/pages/course/list/index.vue
  12. 26
      src/pages/info/details/index.vue
  13. 460
      src/pages/info/list/index.vue
  14. 16
      src/pages/match/details/index.vue
  15. 26
      src/pages/match/list/index.vue
  16. 254
      src/pages/record/details/index.vue
  17. 15
      src/pages/record/list/ass.vue
  18. 27
      src/pages/record/list/index.vue
  19. 15
      src/pages/record/list/practice.vue
  20. 53
      src/pages/record/show/index.vue
  21. 24
      src/pages/station/preview/index.vue
  22. 10
      src/store/modules/activity.js
  23. 2
      src/store/modules/course.js
  24. 12
      src/store/modules/match.js
  25. 31
      src/store/modules/project.js

@ -2,15 +2,14 @@
<!-- 面包屑 -->
<div class="breadcrumb">
<el-breadcrumb separator=">">
<template v-for="(item, index) in pages">
<el-breadcrumb-item v-if="index != pages.length - 1"
:key="index"
:to="{ path: route, query }">
{{item}}
<template v-for="(item, i) in routes">
<el-breadcrumb-item v-if="i != routes.length - 1"
:key="i">
<span @click="to(item)">{{ item.name }}</span>
</el-breadcrumb-item>
<el-breadcrumb-item v-else
:key="index">
{{item}}
:key="i">
{{ item.name }}
</el-breadcrumb-item>
</template>
</el-breadcrumb>
@ -20,50 +19,41 @@
<script>
export default {
props: {
data: {
type: String,
routes: {
type: Array,
required: true
},
route: {
type: String,
default: 'list'
},
query: {
type: Object
}
},
data () {
return {
pages: this.data.split('/')
};
return {};
},
methods: {
update (data) {
this.pages = data.split('/')
to (item) {
if (item) {
this.$router.push(item.path)
} else {
this.$router.back()
}
}
}
};
</script>
<style lang="scss" scoped>
.breadcrumb {
display: flex;
align-items: center;
/deep/.el-breadcrumb {
margin: 4px 0 16px;
}
margin: 4px 0 16px;
/deep/.el-breadcrumb__item {
.el-breadcrumb__inner,
.el-breadcrumb__separator {
font-size: 16px;
font-weight: 400;
}
.is-link,
.el-breadcrumb__separator {
color: $main-color;
}
.el-breadcrumb__inner {
cursor: pointer;
}
&:last-child {
.is-link {
.el-breadcrumb__inner {
color: #0b1d30;
cursor: default;
}
}
}

@ -4,8 +4,7 @@
:style="{backgroundImage: 'url(' + (form.carouselUrl || 'https://huoran.oss-cn-shenzhen.aliyuncs.com/20230515/jpg/1658017103770836992.jpg') + ')'}">创业活动详情</div>
<div class="center-con">
<div class="center-wrap">
<breadcrumb ref="breadcrumb"
:data="'全部项目/' + form.projectName"></breadcrumb>
<breadcrumb :routes.sync="routes" />
<div class="content">
<div class="tool flex-between">
<el-tabs v-model="curType"
@ -137,15 +136,14 @@
</template>
<script>
import { mapState, mapMutations } from "vuex";
import breadcrumb from '@/components/breadcrumb'
import util from '@/libs/util'
import Setting from "@/setting"
import Const from '@/const/match'
export default {
name: 'matchdetail',
data () {
return {
routes: [],
token: util.local.get(Setting.tokenKey),
id: +this.$route.query.id,
end: '',
@ -218,7 +216,16 @@ export default {
}
this.form = data
this.$refs.breadcrumb.update('全部项目/' + data.projectName)
this.routes = [
{
name: '全部项目',
path: this.$store.state.activity.referrer
},
{
name: data.projectName
}
]
this.handleStatus()
}).catch(err => { })
},

@ -34,7 +34,7 @@
</dl>
</div>
<el-button type="primary"
@click="$router.push('manage')">我的项目</el-button>
@click="toManage">我的项目</el-button>
</div>
<div class="list">
@ -95,7 +95,8 @@
layout="total, prev, pager, next"
:total="totals"
@current-change="handleCurrentChange"
:current-page="page">
:current-page="page"
:page-size="pageSize">
</el-pagination>
</div>
</template>
@ -137,11 +138,10 @@
</template>
<script>
import { mapState, mapMutations } from "vuex";
import { Loading } from "element-ui";
import Setting from "@/setting"
import util from "@/libs/util"
import Bus from '@/libs/bus'
import qs from 'qs'
export default {
data () {
return {
@ -164,8 +164,8 @@ export default {
}
],
form: {
filterSort: 0,
whetherToSignUp: ''
filterSort: this.$route.query.filterSort ? +this.$route.query.filterSort : 0,
whetherToSignUp: this.$route.query.whetherToSignUp ? +this.$route.query.whetherToSignUp : ''
},
sorts: [
{
@ -178,9 +178,9 @@ export default {
}
],
sort: 1,
keyword: "",
keyword: this.$route.query.keyword || '',
searchTimer: null,
page: 1,
page: +this.$route.query.page || 1,
pageSize: 10,
totals: 0,
listData: [],
@ -200,6 +200,11 @@ export default {
}
},
mounted () {
const { query } = this.$route
if (query.page) {
this.$router.push('list').catch(() => { })
}
// websocket
Bus.$on('activitySocket', () => {
this.getData()
@ -211,9 +216,6 @@ export default {
})
},
methods: {
...mapMutations('match', [
'SET_TYPE'
]),
getData () {
this.clearTimer()
const { form } = this
@ -303,7 +305,18 @@ export default {
this.form.filterSort = type
this.initData()
},
// url
setReferrer () {
this.$store.commit('activity/setReferrer', `${this.$route.path}?${qs.stringify(this.form)}&keyword=${this.keyword}&page=${this.page}`)
},
//
toManage () {
this.setReferrer()
this.$router.push('manage')
},
//
toDetail (item) {
this.setReferrer()
this.$router.push(`/activity/details?id=${item.id}`);
},
handleCurrentChange (val) {
@ -358,50 +371,6 @@ export default {
}).catch(() => { })
}
},
// python
toPython () {
const form = this.curItem.curStage
let token = util.local.get(Setting.tokenKey);
util.cookies.set('assessmentId', '', -1)
util.cookies.set('startTime', '', -1)
util.cookies.set('stopTime', '', -1)
util.cookies.set('projectId', form.projectId)
util.cookies.set('token', token)
util.cookies.set('courseId', form.cid)
util.cookies.set('curriculumName', escape(form.systemName))
util.cookies.set('systemId', form.systemId)
util.cookies.set('competitionId', this.curItem.id)
util.cookies.set('stageId', form.stageId)
util.cookies.set('teamId', this.curItem.teamId)
util.cookies.set('stopTime', form.endTime)
util.cookies.set('resultsDetails', form.resultsDetails)
util.cookies.set('resultAnnouncementTime', form.resultAnnouncementTime)
util.cookies.set('fromManager', '', -1)
// 8pythoncookiesystemId
location.href = process.env.NODE_ENV === 'development' ?
`http://${location.hostname}:8085/#/` :
Setting.isPro ?
`https://${location.hostname}/pyTrials` :
`${location.origin}/pyTrials`
},
//
toSub () {
const form = this.curItem
const { systemId, projectId, cid, stageId } = form.curStage
const competitionId = form.id
const teamId = form.teamId
let token = util.local.get(Setting.tokenKey);
if (systemId == 11) {
//
location.href = `${Setting.systemPath}/#/index/list?curriculumName=${this.curriculumName}&token=${token}&cid=${cid}&systemId=${systemId}&projectId=${projectId}&competitionId=${competitionId}&stageId=${stageId}&teamId=${teamId}&assessmentId=&classId=&stopTime=&test=true`
} else if (systemId == 12) {
//
window.open(`http://120.78.139.126:8879?systemId=${systemId}&courseId=${cid}&projectId=${projectId}&token=${token}&userId=${this.userId}&classId=1&competitionId=${competitionId}&stageId=${stageId}&teamId=${teamId}`);
} else {
// python
this.toPython()
}
}
}
};
</script>

@ -1,13 +1,7 @@
<template>
<div>
<el-card v-if="!id"
shadow="hover"
class="m-b-20">
<div class="flex-between">
<el-page-header @back="back"
:content="'创建项目'"></el-page-header>
</div>
</el-card>
<breadcrumb v-if="!id"
:routes.sync="routes" />
<div class="page">
<div class="page-content">
<el-form label-width="170px"
@ -177,9 +171,19 @@ import quill from "@/components/quill";
import Setting from "@/setting";
import Upload from '@/components/upload';
import Oss from '@/components/upload/upload.js'
import breadcrumb from '@/components/breadcrumb'
export default {
data () {
return {
routes: [
{
name: '我的项目',
path: this.$store.state.activity.mgReferrer
},
{
name: '创建项目'
},
],
id: this.$route.query.id || '',
headers: {
token: util.local.get(Setting.tokenKey)
@ -222,7 +226,8 @@ export default {
},
components: {
quill,
Upload
Upload,
breadcrumb,
},
watch: {
// ,

@ -1,7 +1,6 @@
<template>
<div class="wrap">
<breadcrumb ref="breadcrumb"
data="创业活动/我的项目"></breadcrumb>
<breadcrumb :routes.sync="routes" />
<div class="page">
<h6 class="p-title">筛选</h6>
<div class="tool mul">
@ -151,17 +150,24 @@
<script>
import util from "@/libs/util";
import Setting from "@/setting";
import { mapMutations } from "vuex";
import { Loading } from 'element-ui'
import breadcrumb from '@/components/breadcrumb'
import Bus from '@/libs/bus'
import qs from 'qs'
export default {
components: { breadcrumb },
data () {
return {
routes: [
{
name: '创业活动',
path: this.$store.state.activity.referrer
},
{
name: '我的项目'
},
],
timer: null,
keyword: "",
keyword: this.$route.query.keyword || '',
activityData: [],
statuses: [
{
@ -178,15 +184,15 @@ export default {
}
],
form: {
month: "",
publishStatus: "",
startTime: "",
endTime: "",
month: +this.$route.query.month || '',
publishStatus: this.$route.query.publishStatus ? +this.$route.query.publishStatus : '',
startTime: this.$route.query.startTime || '',
endTime: this.$route.query.endTime || '',
},
multipleSelection: [],
dateList: [
{
id: "",
id: '',
name: "不限"
},
{
@ -202,7 +208,7 @@ export default {
name: "近六个月"
}
],
date: [],
date: this.$route.query.startTime ? [this.$route.query.startTime, this.$route.query.endTime] : [],
page: +this.$route.query.page || 1,
pageSize: 10,
total: 0,
@ -260,9 +266,6 @@ export default {
})
},
methods: {
...mapMutations('activity', [
'setPage'
]),
getData () {
const { form } = this
this.$post(this.api.myActivities, {
@ -317,10 +320,16 @@ export default {
this.page = 1;
this.getData();
},
// url
setReferrer () {
this.$store.commit('activity/setMgReferrer', `${this.$route.path}?${qs.stringify(this.form)}&keyword=${this.keyword}&page=${this.page}`)
},
add () {
this.setReferrer()
this.$router.push("add");
},
manage (row) {
this.setReferrer()
this.$router.push(`manageDetail?id=${row.id}&name=${row.projectName}`)
},
@ -367,7 +376,6 @@ export default {
this.page = val;
this.$router.push(`manage?page=${val}`)
this.getData()
this.setPage(val)
},
transferTime (date, type) {
if (date == "0000-00-00 00:00:00") return "---";

@ -1,12 +1,13 @@
<template>
<div>
<el-card shadow="hover"
<breadcrumb :routes.sync="routes" />
<!-- <el-card shadow="hover"
class="m-b-20">
<div class="flex-between">
<el-page-header @back="back"
:content="name + '/管理'"></el-page-header>
</div>
</el-card>
</el-card> -->
<div class="page"
style="margin-bottom: 24px">
<div class="tabs">
@ -27,16 +28,24 @@
</template>
<script>
import Setting from "@/setting";
import MatchDetail from "../add";
import MatchProgress from "./matchProgress";
import notice from "./notice";
import MatchSignup from "./matchSignup";
import { mapState } from "vuex";
import breadcrumb from '@/components/breadcrumb'
export default {
name: "matchManage",
data () {
return {
routes: [
{
name: this.$route.query.name,
path: this.$store.state.activity.mgReferrer
},
{
name: '管理'
},
],
name: this.$route.query.name,
active: this.$route.query.tab || "tab1",
tabs: {
@ -51,7 +60,8 @@ export default {
MatchDetail,
MatchProgress,
notice,
MatchSignup
MatchSignup,
breadcrumb,
},
beforeRouteLeave (to, from, next) {
const detail = this.$refs.detail

@ -1,5 +1,4 @@
<template>
<!-- 报名人员 -->
<div class="page-content"
style="padding: 24px">
<div class="tool"
@ -21,7 +20,7 @@
label="序号"
align="center">
<template slot-scope="scope">
{{ scope.$index + (pageNo - 1) * pageSize + 1 }}
{{ scope.$index + (page - 1) * pageSize + 1 }}
</template>
</el-table-column>
<el-table-column prop="announcementTitle"
@ -61,7 +60,7 @@
layout="total, prev, pager, next"
:total="totals"
@current-change="handleCurrentChange"
:current-page="pageNo">
:current-page="page">
</el-pagination>
</div>
</div>
@ -70,35 +69,24 @@
<script>
import util from "@/libs/util";
import Setting from "@/setting";
export default {
name: "matchSignup",
data () {
return {
token: util.local.get(Setting.tokenKey),
id: this.$route.query.id,
keyword: "",
listData: [],
multipleSelection: [],
pageNo: 1,
page: +this.$route.query.page || 1,
pageSize: 10,
totals: 0
};
},
watch: {
keyword: function (val) {
clearTimeout(this.searchTimer);
this.searchTimer = setTimeout(() => {
this.getData();
}, 500);
}
},
mounted () {
this.getData()
},
methods: {
getData () {
this.$post(`${this.api.listActivityAnnouncement}?pageNum=${this.pageNo}&pageSize=${this.pageSize}&competitionId=${this.id}`).then(({ data }) => {
this.$post(`${this.api.listActivityAnnouncement}?pageNum=${this.page}&pageSize=${this.pageSize}&competitionId=${this.id}`).then(({ data }) => {
this.listData = data.records
this.totals = data.total
this.$refs.table.clearSelection()
@ -108,7 +96,14 @@ export default {
this.multipleSelection = val;
},
handleCurrentChange (val) {
this.pageNo = val;
this.$router.push({
path: 'manageDetail',
query: {
...this.$route.query,
page: val
}
})
this.page = val;
this.getData();
},
del (row) {

@ -1,5 +1,4 @@
<template>
<!-- 大赛详情 -->
<div>
<el-card shadow="hover"
style="margin-bottom: 20px">

@ -194,11 +194,11 @@
</template>
<script>
import { mapState, mapActions } from "vuex";
import { mapState } from "vuex";
import Setting from "@/setting";
import util from "@/libs/util";
import Bus from '@/libs/bus'
import qs from 'qs'
export default {
name: "ass",
data () {
@ -210,7 +210,7 @@ export default {
status: ["待开始", "进行中", "已结束"],
statusList: [{
name: "不限",
value: ""
value: ''
}, {
name: "待开始",
value: 0
@ -225,17 +225,17 @@ export default {
listData: [],
date: [],
form: {
keyWord: '',
month: "",
startTime: "",
endTime: "",
status: "",
mallId: "",
classId: ""
keyWord: this.$route.query.keyWord || '',
month: +this.$route.query.month || '',
startTime: this.$route.query.startTime || '',
endTime: this.$route.query.endTime || '',
status: this.$route.query.status ? +this.$route.query.status : '',
mallId: +this.$route.query.mallId || '',
classId: +this.$route.query.classId || ''
},
dateList: [
{
id: "",
id: '',
name: "不限"
},
{
@ -251,7 +251,7 @@ export default {
name: "近六个月"
}
],
page: 1,
page: +this.$route.query.page || 1,
pageSize: 10,
totals: 0,
listLoading: false,//
@ -304,6 +304,11 @@ export default {
}
},
mounted () {
const { query } = this.$route
if (query.page) {
this.$router.push('list').catch(() => { })
}
// websocket
Bus.$on('assSocket', () => {
this.getData()
@ -396,14 +401,12 @@ export default {
getCourseData () {
this.$get(this.api.getPythonSysByStuAccountId).then(res => {
this.courseList = res.list;
}).catch(err => {
});
}).catch(err => { });
},
getClassData () {
this.$post(this.api.myClassByStudent).then(({ data }) => {
this.classList = data.filter(e => e)
}).catch(err => {
});
}).catch(err => { });
},
handleCurrentChange (val) { //
this.page = val;
@ -439,6 +442,7 @@ export default {
}
},
show (row) { //
this.$store.commit('project/setReferrer', `${this.$route.path}?${qs.stringify(this.form)}&page=${this.page}`)
this.$router.push(`/record/show?reportId=${row.reportId}`);
},
saveIc () {

@ -1,8 +1,6 @@
<template>
<div class="wrap pb">
<breadcrumb ref="breadcrumb"
:data="'课程学习/' + courseName"
:query="breadcrumbQuery"></breadcrumb>
<breadcrumb :routes.sync="routes" />
<div class="flex">
<div class="cover"
:class="{'is-word': showMask1}">
@ -139,12 +137,10 @@ import util from "@/libs/util"
export default {
data () {
return {
breadcrumbQuery: {
source: this.$route.query.source
},
routes: [],
startTime: Date.now(), //
id: this.$route.query.id,
video: 'http://liuwanr.oss-cn-shenzhen.aliyuncs.com/mp4/20200519/1589871025648.mp4',
video: '',
chapterList: [],
courseName: '',
description: '',
@ -201,7 +197,21 @@ export default {
this.description = data.courseIntroduction
this.coverUrl = data.coverUrl || 'https://huoran.oss-cn-shenzhen.aliyuncs.com/20220224/png/1496735335294984192.png'
this.getChapter()
this.$refs.breadcrumb.update('课程学习/' + (this.$route.query.source == 1 ? '本校课程' : '共享课程') + '/' + this.courseName)
const path = this.$store.state.course.referrer
this.routes = [
{
name: '课程学习',
path
},
{
name: this.$route.query.source == 1 ? '本校课程' : '共享课程',
path
},
{
name: this.courseName
}
]
}).catch(res => { })
},
async getChapter () {

@ -76,7 +76,8 @@
layout="total, prev, pager, next"
:total="total"
@current-change="handleCurrentChange"
:current-page="page">
:current-page="page"
:page-size="pageSize">
</el-pagination>
</div>
</template>
@ -105,7 +106,7 @@ export default {
timer: null,
token: util.local.get(Setting.tokenKey),
isTourist: !!Setting.whiteList.find(e => e === this.$route.path),
active: +this.$route.query.source || 0,
active: +this.$route.query.active || 0,
tabs: [
{
id: 0,
@ -113,8 +114,8 @@ export default {
},
],
form: {
categoryId: '',
courseType: ''
categoryId: +this.$route.query.categoryId || '',
courseType: this.$route.query.courseType ? +this.$route.query.courseType : ''
},
classificationList: [],
types: [
@ -132,15 +133,20 @@ export default {
}
],
list: [],
keyword: '',
keyword: this.$route.query.keyword || '',
total: 0,
page: 1,
page: +this.$route.query.page || 1,
pageSize: window.innerWidth > 1700 ? 10 : 8,
searchTimer: null,
loadIns: null
};
},
mounted () {
const { query } = this.$route
if (query.page) {
this.$router.push('list').catch(() => { })
}
//
this.token && this.tabs.push({
id: 2,
@ -152,7 +158,7 @@ export default {
id: 1,
name: '本校课程'
})
this.getClassification(0)
this.getClassification(this.active)
this.getData()
this.$once('hook:beforeDestroy', function () {
clearInterval(this.timer)
@ -186,12 +192,6 @@ export default {
this.loadIns.close()
})
},
// redis
getRedis () {
this.$post(this.api.getRedisCache).then(({ data }) => {
data && this.getList()
}).catch(res => { })
},
getData () {
this.loadIns = Loading.service()
this.getList()
@ -241,7 +241,7 @@ export default {
}).catch(res => { })
},
toDetail (id) {
this.$store.commit('course/setReferrer', `${this.$route.path}?${qs.stringify(this.form)}&keyword=${this.keyword}&page=${this.page}`)
this.$store.commit('course/setReferrer', `${this.$route.path}?${qs.stringify(this.form)}&keyword=${this.keyword}&page=${this.page}&active=${this.active}`)
this.$router.push(`/${this.isTourist ? 'preCourse' : 'course'}/details?id=${id}&source=${this.active}`);
}
}

@ -1,5 +1,6 @@
<template>
<div class="wrap">
<breadcrumb :routes.sync="routes" />
<breadcrumb ref="breadcrumb"
data="资讯"
:query="breadcrumbQuery"></breadcrumb>
@ -31,6 +32,7 @@ import breadcrumb from '@/components/breadcrumb'
export default {
data () {
return {
routes: [],
columnNames: this.$route.query.columnNames,
breadcrumbQuery: {
parentId: this.$route.query.parentId,
@ -64,8 +66,28 @@ export default {
this.title = data.title
this.content = data.content
this.viewCount = data.viewCount
this.$forceUpdate()
this.$refs.breadcrumb.update(`最新资讯/${this.$route.query.name}/${this.columnNames.split(',').join('/')}/${this.title}`)
const { query } = this.$route
const path = `list?parentId=${query.parentId}&name=${query.name}&page=${query.page}`
this.routes = [
{
name: '最新资讯',
path
},
{
name: query.name,
path
},
{
name: this.columnNames.split(',').join('/'),
path
},
{
name: this.title
}
]
this.loadIns.close()
})
.catch(err => {

@ -1,56 +1,66 @@
<template>
<div class="wrap index">
<div class="banner"></div>
<div class="main">
<div class="center-wrap">
<div class="nav">
<p class="column-name">{{ $route.query.name }}</p>
<el-menu
v-if="menuList.length"
unique-opened
:default-active="defaultIndex"
@select="initData">
<menuTree v-if="menuRefresh" :menuList="menuList"></menuTree>
</el-menu>
</div>
<div class="list-wrap">
<div class="list">
<template v-if="listData.length">
<ul>
<li v-for="(item,index) in listData" :key="index" @click="toArticle(item.id)">
<img :src="item.coverUrl" alt="">
<div class="text">
<div class="title">{{item.title}}</div>
<div class="metas">
<span>作者{{item.author}}</span>
<i class="spe">|</i>
<span>{{item.date.replace(' 00:00:00','')}}</span>
<i class="spe">|</i>
<span>浏览量{{item.viewCount}}</span>
</div>
<div class="desc" :class="{ie: core.isIE() || core.isEdge(),firefox: core.isFirefox() || core.isEdge()}" v-html="item.content"></div>
<a class="detail">查看详情 ></a>
</div>
</li>
</ul>
<div class="pagination">
<el-pagination background layout="total, prev, pager, next" :total="totals" @current-change="handleCurrentChange" :current-page="page">
</el-pagination>
</div>
</template>
<template v-else>
<div class="empty">
<div>
<img src="@/assets/img/none.png" alt="">
<p>暂无资讯</p>
</div>
</div>
</template>
<div class="wrap index">
<div class="banner"></div>
<div class="main">
<div class="center-wrap">
<div class="nav">
<p class="column-name">{{ $route.query.name }}</p>
<el-menu v-if="menuList.length"
unique-opened
:default-active="defaultIndex"
@select="initData">
<menuTree v-if="menuRefresh"
:menuList="menuList"></menuTree>
</el-menu>
</div>
<div class="list-wrap">
<div class="list">
<template v-if="listData.length">
<ul>
<li v-for="(item,index) in listData"
:key="index"
@click="toArticle(item.id)">
<img :src="item.coverUrl"
alt="">
<div class="text">
<div class="title">{{item.title}}</div>
<div class="metas">
<span>作者{{item.author}}</span>
<i class="spe">|</i>
<span>{{item.date.replace(' 00:00:00','')}}</span>
<i class="spe">|</i>
<span>浏览量{{item.viewCount}}</span>
</div>
<div class="desc"
:class="{ie: core.isIE() || core.isEdge(),firefox: core.isFirefox() || core.isEdge()}"
v-html="item.content"></div>
<a class="detail">查看详情 ></a>
</div>
</li>
</ul>
<div class="pagination">
<el-pagination background
layout="total, prev, pager, next"
:total="totals"
@current-change="handleCurrentChange"
:current-page="page">
</el-pagination>
</div>
</template>
<template v-else>
<div class="empty">
<div>
<img src="@/assets/img/none.png"
alt="">
<p>暂无资讯</p>
</div>
</div>
</div>
</template>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
@ -58,156 +68,147 @@ import { Loading } from 'element-ui';
import menuTree from '@/components/menuTree'
import { mapActions } from "vuex";
export default {
name: 'information',
data() {
return {
keyword: '',
historyId: this.$store.state.info.columnId,
defaultIndex: '',
menuList: [],
page: 1,
pageSize: 10,
totals: 0,
listData: [],
loadIns: null,
columnId: '',
menuRefresh: false,
deepId: '',
columnNames: []
};
},
components: {
menuTree
name: 'information',
data () {
return {
historyId: this.$store.state.info.columnId,
defaultIndex: '',
menuList: [],
page: +this.$route.query.page || 1,
pageSize: 10,
totals: 0,
listData: [],
loadIns: null,
columnId: '',
menuRefresh: false,
deepId: '',
columnNames: []
};
},
components: {
menuTree
},
watch: {
$route () {
this.getData()
}
},
mounted () {
this.getData()
},
methods: {
...mapActions("info", [
"setColumnId"
]),
async getData () {
this.deepId = ''
const { parentId } = this.$route.query
this.setColumnId('')
this.loadIns = Loading.service()
let res = null
let data = null
// parentId
if (parentId) {
//
res = await this.$get(this.api.queryAllColumns)
data = res.columnTree
data = res.columnTree.find(e => e.id == parentId).children
} else {
//
res = await this.$get(this.api.queryAllColumns, {
school: 0
})
data = res.columnTree
}
if (data.length) {
this.menuRefresh = false
this.menuList = data
// ,
const historyId = this.historyId
if (historyId) {
this.setColumnId('')
this.defaultIndex = historyId + ''
this.getContent(historyId)
} else {
//
data.length && this.getDeepId(data)
const id = this.deepId
if (id) {
this.getContent(id)
this.defaultIndex = id + ''
}
}
this.$nextTick(() => {
this.menuRefresh = true
})
} else {
this.menuList = []
parentId ?
this.getContent(parentId) :
(this.listData = [])
this.loadIns.close()
}
},
watch: {
keyword: function(val) {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
this.getData()
},500)
},
$route() {
this.getData()
// id
getDeepId (data) {
data.map(e => {
if (e.children.length) {
this.getDeepId(e.children)
} else if (!this.deepId) {
this.deepId = e.id
return false
}
})
},
mounted() {
this.getData()
initData (index, indexPath) {
this.page = 1
this.getContent(index, indexPath)
},
methods: {
...mapActions("info", [
"setColumnId"
]),
async getData() {
this.deepId = ''
const { parentId } = this.$route.query
this.setColumnId('')
this.loadIns = Loading.service()
let res = null
let data = null
// parentId
if (parentId) {
//
res = await this.$get(this.api.queryAllColumns)
data = res.columnTree
data = res.columnTree.find(e => e.id == parentId).children
} else {
//
res = await this.$get(this.api.queryAllColumns, {
school: 0
})
data = res.columnTree
}
if (data.length) {
this.menuRefresh = false
this.menuList = data
// ,
const historyId = this.historyId
if (historyId) {
this.setColumnId('')
this.defaultIndex = historyId + ''
this.getContent(historyId)
} else {
//
data.length && this.getDeepId(data)
const id = this.deepId
if (id) {
this.getContent(id)
this.defaultIndex = id + ''
}
}
this.$nextTick(() => {
this.menuRefresh = true
})
} else {
this.menuList = []
parentId ?
this.getContent(parentId) :
(this.listData = [])
this.loadIns.close()
}
},
// id
getDeepId(data) {
data.map(e => {
if (e.children.length) {
this.getDeepId(e.children)
} else if (!this.deepId) {
this.deepId = e.id
return false
}
})
},
initData(index,indexPath){
this.page = 1
this.getContent(index,indexPath)
},
getContent(index,indexPath){
if(indexPath) this.loadIns = Loading.service()
this.columnId = index
this.$get(`${this.api.queryArticleByCondition}/${this.page}/${this.pageSize}`, {
name: this.keyword,
columnId: index,
port: 0,
school: this.$route.query.parentId ? '' : 0
}).then(res => {
this.listData = res.articleList
this.totals = res.total
this.listData.map(n => {
n.content = n.content.replace(/<img.*?(?:>|\/>)/gi,'')
})
this.loadIns.close()
}).catch(res => {
this.loadIns.close()
});
},
handleCurrentChange(val) {
this.page = val;
this.getContent(this.columnId);
},
//
getColumnName(data, names = []) {
for (let i = 0; i < data.length; i++) {
const e = data[i]
names.push(e.name)
if (e.id == this.columnId) {
console.log("🚀 ~ file: index.vue ~ line 188 ~ getColumnName ~ this.defaultIndex", this.defaultIndex)
this.columnNames = JSON.parse(JSON.stringify(names))
break
} else {
this.getColumnName(e.children, names)
}
names = []
}
},
toArticle(id) {
const columnId = this.columnId
this.setColumnId(columnId)
this.getColumnName(this.menuList, [])
console.log("🚀 ~ file: index.vue ~ line 199 ~ toArticle ~ menuList", this.columnNames)
this.$router.push(`/${this.$route.path === '/info/list' ? 'info' : 'preInfo'}/details?parentId=${this.$route.query.parentId}&name=${this.$route.query.name}&id=${id}&columnNames=${this.columnNames}`)
getContent (index, indexPath) {
if (indexPath) this.loadIns = Loading.service()
this.columnId = index
this.$get(`${this.api.queryArticleByCondition}/${this.page}/${this.pageSize}`, {
name: '',
columnId: index,
port: 0,
school: this.$route.query.parentId ? '' : 0
}).then(res => {
this.listData = res.articleList
this.totals = res.total
this.listData.map(n => {
n.content = n.content.replace(/<img.*?(?:>|\/>)/gi, '')
})
this.loadIns.close()
}).catch(res => {
this.loadIns.close()
});
},
handleCurrentChange (val) {
this.page = val;
this.getContent(this.columnId);
},
//
getColumnName (data, names = []) {
for (let i = 0; i < data.length; i++) {
const e = data[i]
names.push(e.name)
if (e.id == this.columnId) {
this.columnNames = JSON.parse(JSON.stringify(names))
break
} else {
this.getColumnName(e.children, names)
}
names = []
}
},
toArticle (id) {
const columnId = this.columnId
this.setColumnId(columnId)
this.getColumnName(this.menuList, [])
this.$router.push(`/${this.$route.path === '/info/list' ? 'info' : 'preInfo'}/details?parentId=${this.$route.query.parentId}&name=${this.$route.query.name}&id=${id}&columnNames=${this.columnNames}&page=${this.page}`)
}
}
};
</script>
@ -216,46 +217,45 @@ export default {
.banner {
height: 350px;
padding: 100px 0 0 180px;
background: url(../../../assets/img/info-bg6.png) (0 0)/auto no-repeat,
url(../../../assets/img/info-bg7.png) (25% 110px)/400px auto no-repeat,
url(../../../assets/img/info-bg4.png) (top right)/auto no-repeat,
url(../../../assets/img/info-bg5.png) (80% 20px)/auto no-repeat,
url(../../../assets/img/info-bg3.png) 0 0/100% 100% no-repeat;
background: url(../../../assets/img/info-bg6.png) (0 0) / auto no-repeat,
url(../../../assets/img/info-bg7.png) (25% 110px)/400px auto no-repeat,
url(../../../assets/img/info-bg4.png) (top right) / auto no-repeat,
url(../../../assets/img/info-bg5.png) (80% 20px) / auto no-repeat, url(../../../assets/img/info-bg3.png) 0 0/100% 100% no-repeat;
}
}
.main{
.main {
min-height: calc(100vh - 524px);
background: url(../../../assets/img/info-bg1.png) (0px 179px)/(190px 171px) no-repeat,
url(../../../assets/img/info-bg2.png) (bottom right)/(407px 273px) no-repeat;
background: url(../../../assets/img/info-bg1.png) (0px 179px)/ (190px 171px) no-repeat,
url(../../../assets/img/info-bg2.png) (bottom right)/ (407px 273px) no-repeat;
.center-wrap {
display: flex;
justify-content: center;
align-items:flex-start;
align-items: flex-start;
}
.column-name {
padding: 14px 0;
margin-bottom: 10px;
font-size: 16px;
text-align: center;
color: #fff;
background-color: #007eff;
border-radius: 8px;
padding: 14px 0;
margin-bottom: 10px;
font-size: 16px;
text-align: center;
color: #fff;
background-color: #007eff;
border-radius: 8px;
}
.nav{
.nav {
width: 156px;
overflow: hidden;
.el-menu {
border-right: 0;
.el-submenu__icon-arrow {
display: none;
display: none;
}
.el-submenu__title {
padding-right: 40px;
color: #1182f5;
background-color: #c6e7ff;
.el-submenu__title {
padding-right: 60px;
}
padding-right: 40px;
color: #1182f5;
background-color: #c6e7ff;
.el-submenu__title {
padding-right: 60px;
}
}
.el-menu-item {
min-width: auto;
@ -284,11 +284,11 @@ export default {
}
}
}
.list-wrap{
.list-wrap {
width: calc(100% - 180px);
margin-left: 24px;
.list{
li{
.list {
li {
display: flex;
margin-bottom: 12px;
cursor: pointer;
@ -297,52 +297,52 @@ export default {
border-radius: 6px;
overflow: hidden;
img{
img {
width: 260px;
height: 195px;
border: 0;
}
.text{
.text {
position: relative;
width: calc(100% - 260px);
padding: 20px 24px;
.title{
.title {
font-size: 20px;
color: #0B1D30;
color: #0b1d30;
font-weight: 500;
overflow: hidden;
text-overflow:ellipsis;
text-overflow: ellipsis;
white-space: nowrap;
}
.metas{
.metas {
display: inline-flex;
align-items: center;
width: 100%;
margin: 10px 0;
font-size: 12px;
color: rgba(0,0,0,.45);
color: rgba(0, 0, 0, 0.45);
.spe {
margin: 0 10px;
}
}
.desc{
.desc {
font-size: 14px;
color: #333;
line-height: 24px;
display: -webkit-box;
display:-moz-box;
display: -moz-box;
-webkit-box-orient: vertical;
-moz-box-orient: vertical;
-webkit-line-clamp: 2;
-moz-line-clamp: 2;
overflow: hidden;
text-overflow: ellipsis;
&.ie{
&.ie {
height: 80px;
text-overflow: ellipsis;
white-space: nowrap;
}
&.firefox{
&.firefox {
height: 76px;
}
}

@ -5,8 +5,7 @@
:style="{backgroundImage: 'url(' + (form.carouselUrl || 'https://huoran.oss-cn-shenzhen.aliyuncs.com/20220613/png/1536269450851409920.png') + ')'}"></div>
<div class="center-con">
<div class="center-wrap">
<breadcrumb ref="breadcrumb"
:data="'全部赛事/' + form.name"></breadcrumb>
<breadcrumb :routes.sync="routes" />
<div class="content">
<div :class="['tool flex-between', {logView: !logView}]">
<el-tabs v-model="curType"
@ -712,6 +711,7 @@ export default {
name: 'matchdetail',
data () {
return {
routes: [],
headers: {
token: Util.local.get(Setting.tokenKey)
},
@ -903,7 +903,16 @@ export default {
} else {
this.typeList = this.typeList.slice(0, 3)
}
this.$refs.breadcrumb.update('全部赛事/' + competition.name)
this.routes = [
{
name: '全部赛事',
path: this.$store.state.match.referrer
},
{
name: competition.name
}
]
this.now = await Util.getNow()
this.handleStatus()
@ -1393,6 +1402,7 @@ export default {
},
//
toReport (row) {
this.$store.commit('project/setReferrer', this.$route.fullPath)
this.$router.push(`/record/show?reportId=${row.reportId}&matchId=${this.id}&matchName=${this.form.name}`)
},

@ -339,13 +339,13 @@
<script>
import { mapState, mapMutations } from "vuex";
import { Loading } from "element-ui";
import Setting from "@/setting"
import Util from "@/libs/util"
import Bus from '@/libs/bus'
import OSS from 'ali-oss'
import OssConfig from '@/components/upload/config.js'
import Oss from '@/components/upload/upload.js'
import qs from 'qs'
export default {
name: "match",
data () {
@ -374,11 +374,11 @@ export default {
provinces: [],
cities: [],
form: {
provinceId: '',
cityId: '',
sequence: 2, // (1: 2.)
competitionScope: 3, // (0: 1: 2.)
eventType: 2 // (1./2.广/3.)
provinceId: +this.$route.query.provinceId || '',
cityId: +this.$route.query.cityId || '',
sequence: +this.$route.query.sequence || 2, // (1: 2.)
competitionScope: this.$route.query.competitionScope ? +this.$route.query.competitionScope : 3, // (0: 1: 2.)
eventType: +this.$route.query.eventType || 2 // (1./2.广/3.)
},
squareScopes: [
{
@ -422,10 +422,9 @@ export default {
name: '近期报名'
}
],
sort: 1,
keyword: "",
keyword: this.$route.query.keyword || '',
searchTimer: null,
page: 1,
page: +this.$route.query.page || 1,
pageSize: 10,
totals: 0,
listData: [],
@ -479,9 +478,6 @@ export default {
computed: {
...mapState("user", [
"userId", 'account',
]),
...mapState('match', [
'eventType'
])
},
watch: {
@ -498,8 +494,6 @@ export default {
this.getData()
})
this.form.eventType = this.eventType
this.SET_TYPE(2)
this.getProvince()
this.getData()
this.$once('hook:beforeDestroy', function () {
@ -510,7 +504,7 @@ export default {
},
methods: {
...mapMutations('match', [
'SET_TYPE'
'setReferrer'
]),
async getData () {
this.clearTimer()
@ -686,7 +680,7 @@ export default {
this.initData()
},
toDetail (item) {
this.SET_TYPE(this.form.eventType)
this.$store.commit('match/setReferrer', `${this.$route.path}?${qs.stringify(this.form)}&keyword=${this.keyword}&page=${this.page}`)
this.$router.push(`/match/details?id=${item.id}`);
},
handleCurrentChange (val) {

@ -1,54 +1,76 @@
<template>
<!--实验情况-->
<div class="wrap">
<breadcrumb data="实验记录/实验情况"></breadcrumb>
<div class="page">
<div class="flex-between m-b-20">
<h6 class="l-title">
<img src="@/assets/img/record7.png" alt="">
实验报告列表
</h6>
<div>
<el-button type="primary" @click="exportData">导出数据</el-button>
</div>
</div>
<el-table
ref="table"
<!--实验情况-->
<div class="wrap">
<breadcrumb :routes.sync="routes" />
<div class="page">
<div class="flex-between m-b-20">
<h6 class="l-title">
<img src="@/assets/img/record7.png"
alt="">
实验报告列表
</h6>
<div>
<el-button type="primary"
@click="exportData">导出数据</el-button>
</div>
</div>
<el-table ref="table"
class="table"
stripe
header-align="center"
:data="listData"
@selection-change="handleSelectionChange"
row-key="reportId"
>
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
<el-table-column prop="id" label="次序" width="80" align="center" type="index"></el-table-column>
<el-table-column prop="projectName" label="实验项目名称" align="center"></el-table-column>
<el-table-column prop="score" width="100" label="得分" align="center"></el-table-column>
<el-table-column prop="timeSum" width="100" label="耗时" align="center">
<template slot-scope="scope">
{{ scope.row.timeSum }}min
</template>
</el-table-column>
<el-table-column prop="startTime" width="160" label="起始时间" align="center"></el-table-column>
<el-table-column prop="submitTime" width="160" label="结束时间" align="center"></el-table-column>
<el-table-column width="100" label="操作" align="center">
<template slot-scope="scope">
<el-button type="text" @click="toReport(scope.row)">实验报告</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination
background
layout="total, prev, pager, next"
:total="total"
:current-page="page"
@current-change="handleCurrentChange"
></el-pagination>
</div>
</div>
row-key="reportId">
<el-table-column type="selection"
width="55"
align="center"
:reserve-selection="true"></el-table-column>
<el-table-column prop="id"
label="次序"
width="80"
align="center"
type="index"></el-table-column>
<el-table-column prop="projectName"
label="实验项目名称"
align="center"></el-table-column>
<el-table-column prop="score"
width="100"
label="得分"
align="center"></el-table-column>
<el-table-column prop="timeSum"
width="100"
label="耗时"
align="center">
<template slot-scope="scope">
{{ scope.row.timeSum }}min
</template>
</el-table-column>
<el-table-column prop="startTime"
width="160"
label="起始时间"
align="center"></el-table-column>
<el-table-column prop="submitTime"
width="160"
label="结束时间"
align="center"></el-table-column>
<el-table-column width="100"
label="操作"
align="center">
<template slot-scope="scope">
<el-button type="text"
@click="toReport(scope.row)">实验报告</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background
layout="total, prev, pager, next"
:total="total"
:current-page="page"
@current-change="handleCurrentChange"></el-pagination>
</div>
</div>
</div>
</template>
<script>
@ -57,79 +79,87 @@ import Setting from "@/setting";
import util from "@/libs/util";
import breadcrumb from '@/components/breadcrumb'
export default {
data() {
return {
curriculumId: this.$route.query.curriculumId,
projectId: this.$route.query.projectId,
listData: [],
total: 0,
page: 1,
pageSize: 10,
multipleSelection: [],
token:util.local.get(Setting.tokenKey),
}
data () {
return {
routes: [
{
name: '实验记录',
path: this.$store.state.project.referrer
},
{
name: '实验情况'
},
],
curriculumId: this.$route.query.curriculumId,
projectId: this.$route.query.projectId,
listData: [],
total: 0,
page: +this.$route.query.page || 1,
pageSize: 10,
multipleSelection: [],
token: util.local.get(Setting.tokenKey),
}
},
components: {
breadcrumb
},
mounted () {
this.getData();
},
methods: {
goBack () {
this.$router.back();
},
components: {
breadcrumb
getData () {
this.$post(`${this.api.practiceByStudentDetail}?curriculumId=${this.curriculumId}&projectId=${this.projectId}&pageNum=${this.page}&pageSize=${this.pageSize}`).then(res => {
this.listData = res.data.records;
this.total = res.data.total;
}).catch(err => { });
},
mounted() {
this.getData();
handleCurrentChange (val) { //
this.page = val;
this.getData();
},
methods: {
goBack() {
this.$router.back();
},
getData() {
this.$post(`${this.api.practiceByStudentDetail}?curriculumId=${this.curriculumId}&projectId=${this.projectId}&pageNum=${this.page}&pageSize=${this.pageSize}`).then(res => {
this.listData = res.data.records;
this.total = res.data.total;
}).catch(err => {});
},
handleCurrentChange(val) { //
this.page = val;
this.getData();
},
handleSelectionChange(val) { //
this.multipleSelection = val;
},
exportData() { //
if (this.multipleSelection.length) {
let ids = this.multipleSelection.map(item => {
return item.reportId;
});
axios.get(`${this.api.exportPracticeByStudentDetail}?projectId=${this.projectId}&ids=${ids.toString()}`,{
headers: {
token: this.token
},
responseType: 'blob'
}).then((res) => {
util.downloadFileDirect(`学生练习实验情况.xls`,new Blob([res.data]))
}).catch(res => {})
// location.href = this.$get(`${this.api.exportPracticeByStudentDetail}?projectId=${this.projectId}&token=${this.token}&ids=${ids.toString()}`);
} else {
axios.get(`${this.api.exportPracticeByStudentDetail}?projectId=${this.projectId}&ids=`,{
headers: {
token: this.token
},
responseType: 'blob'
}).then((res) => {
util.downloadFileDirect(`学生练习实验情况.xls`,new Blob([res.data]))
}).catch(res => {})
// location.href = `${this.api.exportPracticeByStudentDetail}?projectId=${this.projectId}&token=${this.token}&ids=`;
}
handleSelectionChange (val) { //
this.multipleSelection = val;
},
exportData () { //
if (this.multipleSelection.length) {
let ids = this.multipleSelection.map(item => {
return item.reportId;
});
axios.get(`${this.api.exportPracticeByStudentDetail}?projectId=${this.projectId}&ids=${ids.toString()}`, {
headers: {
token: this.token
},
responseType: 'blob'
}).then((res) => {
util.downloadFileDirect(`学生练习实验情况.xls`, new Blob([res.data]))
}).catch(res => { })
} else {
axios.get(`${this.api.exportPracticeByStudentDetail}?projectId=${this.projectId}&ids=`, {
headers: {
token: this.token
},
responseType: 'blob'
}).then((res) => {
util.downloadFileDirect(`学生练习实验情况.xls`, new Blob([res.data]))
}).catch(res => { })
}
},
tableRowStyle({ row, column, rowIndex, columnIndex }) {
if (rowIndex % 2 === 0) {
return "background-color: #FFF";
} else {
return "background-color: #F5F2FF";
}
},
toReport(row) {
this.$router.push(`/record/show?reportId=${row.reportId}&curriculumId=${this.curriculumId}&projectId=${this.projectId}`);
}
},
tableRowStyle ({ row, column, rowIndex, columnIndex }) {
if (rowIndex % 2 === 0) {
return "background-color: #FFF";
} else {
return "background-color: #F5F2FF";
}
},
toReport (row) {
this.$store.commit('project/setListReferrer', `${this.$route.path}?curriculumId=${this.curriculumId}&projectId=${this.projectId}&page=${this.page}`)
this.$router.push(`/record/show?reportId=${row.reportId}`);
}
}
};
</script>

@ -63,13 +63,12 @@
</template>
<script>
import { mapActions } from "vuex";
export default {
props: ['mallId', 'curriculumId'],
data () {
return {
listData: [],
page: 1,
page: +this.$route.query.page || 1,
pageSize: 10,
total: 0,
loading: false
@ -77,16 +76,18 @@ export default {
},
watch: {
mallId: function (val) {
this.initData()
if (this.$route.query.page) {
this.getData()
this.$router.push('list').catch(() => { })
} else {
this.initData()
}
},
},
mounted () {
},
methods: {
...mapActions({
setCurriculum: "project/setCurriculum"
}),
tableRowStyle ({ row, column, rowIndex, columnIndex }) {
if (rowIndex % 2 === 0) {
return "background-color: #FFF";
@ -118,7 +119,7 @@ export default {
this.getData()
},
toReport (row) {
this.setCurriculum(this.curriculumId)
this.$store.commit('project/setReferrer', `${this.$route.path}?mallId=${this.mallId}&curriculumId=${this.curriculumId}&active=${this.$parent.active}&page=${this.page}`)
this.$router.push(`show?reportId=${row.reportId}`);
}
}

@ -78,7 +78,6 @@
</template>
<script>
import { mapState, mapActions, mapMutations } from "vuex";
import practice from "./practice";
import ass from "./ass";
import axios from 'axios';
@ -94,7 +93,7 @@ export default {
mallIds: [],
curs: [],
mallId: '',
curriculumId: "",
curriculumId: '',
curriculumList: [
{
cid: '',
@ -102,7 +101,7 @@ export default {
}
],
overview: {},
active: 0,
active: +this.$route.query.active || 0,
tabs: [
{
id: 0,
@ -116,29 +115,28 @@ export default {
token: util.local.get(Setting.tokenKey),
};
},
computed: {
...mapState("project", [
'lastRecordType', 'currId'
])
},
created () {
this.active = this.lastRecordType ? this.lastRecordType : 0;
// this.active = this.lastRecordType ? this.lastRecordType : 0;
},
mounted () {
// const { query } = this.$route
// if (query.page) {
// this.$store.commit('project/setReferrer', '')
// this.$router.push('list').catch(() => { })
// }
this.getData()
this.getCourse()
},
methods: {
...mapActions({
setRecord: "project/setRecord"
}),
//
async getCourse () {
const { data } = await this.$get(this.api.getSchoolEffectiveCourse)
if (data.length) {
this.curs = data
this.mallId = data[0].mallId
this.curriculumId = data[0].cid
const { mallId, curriculumId } = this.$route.query
this.mallId = mallId ? +mallId : data[0].mallId
this.curriculumId = curriculumId ? +curriculumId : data[0].cid
}
},
//
@ -176,7 +174,6 @@ export default {
},
tabChange (id) {
this.active = id
this.setRecord(id)
this.$nextTick(() => {
this.$refs['list' + id].initData()
})

@ -51,13 +51,12 @@
</template>
<script>
import { mapActions } from "vuex";
export default {
props: ['mallId', 'curriculumId'],
data () {
return {
listData: [],
page: 1,
page: +this.$route.query.page || 1,
pageSize: 10,
total: 0,
loading: false
@ -65,16 +64,18 @@ export default {
},
watch: {
mallId: function (val) {
this.initData()
if (this.$route.query.page) {
this.getData()
this.$router.push('list').catch(() => { })
} else {
this.initData()
}
},
},
mounted () {
},
methods: {
...mapActions({
setCurriculum: "project/setCurriculum"
}),
tableRowStyle ({ row, column, rowIndex, columnIndex }) {
if (rowIndex % 2 === 0) {
return "background-color: #FFF";
@ -106,7 +107,7 @@ export default {
this.getData()
},
toDetails (row) {
this.setCurriculum(this.curriculumId)
this.$store.commit('project/setReferrer', `${this.$route.path}?mallId=${this.mallId}&curriculumId=${this.curriculumId}&active=${this.$parent.active}&page=${this.page}`)
this.$router.push(`/record/details?curriculumId=${row.curriculumId}&projectId=${row.projectId}`);
}
}

@ -2,26 +2,7 @@
<!-- 实验报告 -->
<div class="wrap">
<div class="top">
<div class="breadcrumb">
<el-breadcrumb separator=">">
<template v-for="(item, i) in breadPath">
<el-breadcrumb-item v-if="!i"
:key="i"
:to="{ path: matchId ? '/match' : 'list' }">
{{item}}
</el-breadcrumb-item>
<el-breadcrumb-item v-else-if="breadPath.length > 2 && i === 1"
:to="{ path: matchId ? '/match/details' : 'details', query: matchId ? { id: matchId } : { curriculumId, projectId } }"
:key="i">
{{item}}
</el-breadcrumb-item>
<el-breadcrumb-item v-else
:key="i">
{{item}}
</el-breadcrumb-item>
</template>
</el-breadcrumb>
</div>
<breadcrumb :routes.sync="routes" />
<span v-if="fromPython"
class="back"
@click="back">返回实验</span>
@ -256,14 +237,11 @@ import editorConfig from '@/components/editor'
export default {
data () {
return {
routes: [],
editorConfig,
fromPython: this.$route.query.python, // python
reportId: this.$route.query.reportId,
curriculumId: this.$route.query.curriculumId,
projectId: this.$route.query.projectId,
matchId: this.$route.query.matchId, //
matchName: this.$route.query.matchName, //
breadPath: ['实验记录', '实验情况', '实验报告'],
title: "实验报告",
form: {},
infoData: {},
@ -309,9 +287,30 @@ export default {
summarize: form.summarize
}
//
form.assessmentId ?
(this.breadPath = ['实验记录', '实验报告']) :
this.matchName && (this.breadPath = ['全部赛事', this.matchName, '实验报告'])
const { referrer, listReferrer } = this.$store.state.project
const routes = [{
name: '实验报告'
}]
if (form.assessmentId) {
routes.unshift({
name: '实验记录',
path: referrer
})
} else if (this.matchName) {
routes.unshift({
name: '全部赛事',
path: referrer
})
} else {
routes.unshift({
name: '实验记录',
path: referrer
}, {
name: '实验情况',
path: listReferrer
})
}
this.routes = routes
const { data } = report
this.userScores = userScores

@ -1,11 +1,6 @@
<template>
<div class="wrap">
<breadcrumb ref="breadcrumb"
:data="'实验台/' + (curriculumName || courseName)"
:query="{
keyword: this.$route.query.keyword || '',
active: this.$route.query.active || 0,
}"></breadcrumb>
<breadcrumb :routes.sync="routes" />
<div class="flex">
<div class="cover"
:class="{'is-word': showMask1}">
@ -453,6 +448,7 @@ export default {
components: { pdf, breadcrumb, pdfDia, quill, Editor },
data () {
return {
routes: [],
mallId: '',
courseId: '',
curriculumName: '',
@ -462,7 +458,7 @@ export default {
startTime: Date.now(), //
systemIds: '',
type: 1,
video: "http://liuwanr.oss-cn-shenzhen.aliyuncs.com/mp4/20200519/1589871025648.mp4",
video: "",
chapterList: [], //
progressList: [],
coverUrl: "", //
@ -581,10 +577,18 @@ export default {
this.addRecord()
},
async getData () {
let { data } = await this.$post(`${this.api.curriculumDetail}?cid=${this.courseId}&mallId=${this.mallId}`);
const { data } = await this.$post(`${this.api.curriculumDetail}?cid=${this.courseId}&mallId=${this.mallId}`);
this.routes = [
{
name: '实验台',
path: `list?keyword=${this.$route.query.keyword || ''}&active=${this.$route.query.active || 0}`
},
{
name: data.curriculumName
}
]
this.courseName = data.curriculumName;
// this.$refs.breadcrumb.update('/' + data.curriculumName)
// this.coverUrl = data.coverUrl;
this.briefIntroduction = data.briefIntroduction;
this.teachingObjectives = data.teachingObjectives;
this.assessmentList = data.assessmentConfig;

@ -4,12 +4,16 @@
export default {
namespaced: true,
state: {
page: 1,
referrer: 'list',
mgReferrer: 'manage',
cache: null
},
mutations: {
setPage: (state, page) => {
state.page = page
setReferrer: (state, val) => {
state.referrer = val
},
setMgReferrer: (state, val) => {
state.mgReferrer = val
},
setCache: (state, cache) => {
state.cache = cache

@ -4,7 +4,7 @@
export default {
namespaced: true,
state: {
referrer: '',
referrer: 'list',
},
mutations: {
setReferrer: (state, val) => {

@ -5,19 +5,19 @@ export default {
namespaced: true,
state: {
toMatch: '',
eventType: 2, // 赛事类型
noticed: 0 // 登录后会调一个接口提示是否有取消的赛事,提示完后置为1
noticed: 0, // 登录后会调一个接口提示是否有取消的赛事,提示完后置为1
referrer: 'list',
},
mutations: {
SET_SOURCE: (state, id) => {
state.toMatch = id
},
SET_TYPE: (state, eventType) => {
state.eventType = eventType
},
SET_NOTICE: (state) => {
state.noticed = 1
}
},
setReferrer: (state, val) => {
state.referrer = val
},
},
actions: {

@ -4,27 +4,22 @@
export default {
namespaced: true,
state: {
currId: '',
lastRecordType: 0,
courseId: ''
referrer: 'list',
listReferrer: 'list',
courseId: ''
},
mutations: {
SET_CURRICULUM: (state, currId) => {
state.currId = currId
},
SET_RECORD: (state, type) => {
state.lastRecordType = type;
},
SET_COURSE: (state, courseId) => {
state.courseId = courseId
}
setReferrer: (state, val) => {
state.referrer = val
},
setListReferrer: (state, val) => {
state.listReferrer = val
},
SET_COURSE: (state, courseId) => {
state.courseId = courseId
}
},
actions: {
setCurriculum({ state, commit }, currId) {
commit("SET_CURRICULUM", currId);
},
setRecord({ state, commit }, active) {
commit('SET_RECORD', active)
}
}
};
Loading…
Cancel
Save