提交 faf66964 authored 作者: GOD_ZYX's avatar GOD_ZYX

v1.5.1

上级 3bef51cf
PC-1.5.1 / 2019-08-27
==================
* 新增 判断先做教学评估,再做课程大作业。
* 新增 学分重修功能。
* 修改 H5播放,视频播放异常问题。
PC-1.5.0 / 2019-08-26
==================
......
......@@ -111,7 +111,7 @@ export default {
window._player403Stop = function (e) {
/* 过期 重新刷新 */
if (e.paramData.error_code === 4006) {
that.$message.error('视频播放错误,请刷新重试!')
that.$message.error('视频播放错误,请刷新页面重试!')
} else if (e.paramData.error_code === 4016) {
/* 当视频过期时,重新 获取接口 更改播放地址 重新播放 */
const loading = that.$loading({ lock: true, text: '', spinner: '', background: 'rgba(255, 255, 255, 0.9)' })
......
......@@ -46,6 +46,10 @@ export default {
if (_course.chapters[i2].id === 'course_info') {
this.$router.push({ path: `/player/${sid}/${cid}/course-info/course_info` })
} else if (_course.chapters[i2].id === 'course_work') {
if (!this.list.survey) {
this.$message('请先填写教学评估,然后完成大作业。')
return
}
this.$router.push({ path: `/player/${sid}/${cid}/course-work/course_work` })
} else if (_course.chapters[i2].type === 3) {
if (_course.chapters[i2].work_type === 1) {
......
......@@ -5,6 +5,10 @@ export default class ScoreAPI extends BaseAPI {
* 获取我的学分信息
*/
getMyScore = () => this.get('/v2/education/credits', {})
/**
* 提交 重修课程
*/
submitRebuild = (obj = {}) => this.post('/v2/education/retake', obj, { headers: { 'Content-Type': 'multipart/form-data' } })
/**
* 意见反馈
*/
......
......@@ -52,6 +52,7 @@ export default class ChapterActon {
sid: _res.semester_id,
cid: _res.course_id,
currentChapterId: _id,
survey: _res.survey, // 判别教学评估,是否已经填写
course: _res.chapters.map((_, i) => {
return {
title: _.name,
......
......@@ -71,7 +71,8 @@ export default class CourseAction {
arrTab: [(((_cur && _cur.curriculum_credit) || 0) + '学分'), str1, cur.semester_name],
status: _cur.is_enabled ? '已发布' : '未发布',
time: cur.begin_date.split(' ')[0] + ' 至 ' + cur.end_date.split(' ')[0],
progress: cur.video_progress
progress: cur.video_progress,
survey: cur.survey // 判别教学评估,是否已经填写
},
tabs0Content: {},
tabs1ChapterList: {}
......
......@@ -27,6 +27,8 @@ export default class ScoreAction {
return json
})
}
/* 提交重修 */
rebuildSubmit (obj) { return scoreApi.submitRebuild(obj).then(res => res) }
/* 意见反馈 */
feedbackcommit (obj) { return scoreApi.feedbackcommit(obj).then(res => res) }
}
......@@ -52,14 +52,8 @@
</template>
<template v-else-if="(head.prop === 'operate-x')">
<template v-for="(_item, _index) in head.commandArr">
<template v-if="_index === 0 && scope.row['approve_status'] === '通过'">
<el-button v-bind:key="_index" type="text" @click="itemClick(scope.row.index, _item)">{{_item.name}}</el-button>
</template>
<template v-else-if="_index === 1 && scope.row['approve_status'] !== '通过'">
<el-button v-bind:key="_index" type="text" @click="itemClick(scope.row.index, _item)">{{_item.name}}</el-button>
</template>
<template v-else-if="_index === 2 && scope.row['approve_status'] !== '通过'">
<el-button v-bind:key="_index" type="text" @click="itemClick(scope.row.index, _item)">{{_item.name}}</el-button>
<template v-if="_index === 0 && scope.row['passed'] === '未通过'">
<el-button style="padding: 0;" v-bind:key="_index" type="text" @click="itemClick(scope.row.index, _item)">{{_item.name}}</el-button>
</template>
</template>
</template>
......
......@@ -21,7 +21,7 @@ Vue.use(VueRouter)
const router = createRouter()
/* 设置全局变量 */
window.G = Vue.prototype.$GlobalVariable = {
VERSION: 'PC-1.1.3'
VERSION: 'PC-1.5.1'
}
Vue.prototype.$md5 = md5
/* 导航守卫 */
......
......@@ -62,14 +62,16 @@ export default {
},
tableConfig: { border: '', size: '', selection: { has: false, sels: [], width: '50px', fix: 'left', align: '' } }, // 增加选择框,has设置为true
tableHead: [
{ prop: 'index', label: '序号', minWidth: '50', fix: false },
{ prop: 'semester_name', label: '学期', minWidth: '80', fix: false },
{ prop: 'course_name', label: '课程', minWidth: '300', fix: false },
{ prop: 'index', label: '序号', minWidth: '40', fix: false },
{ prop: 'semester_name', label: '学期', minWidth: '60', fix: false },
{ prop: 'class_name', label: '班级', minWidth: '120', fix: false },
{ prop: 'course_name', label: '课程', minWidth: '260', fix: false },
{ prop: 'course_credit', label: '课程学分', minWidth: '60', fix: false },
{ prop: 'passed', label: '状态', minWidth: '60', fix: false },
{ prop: 'credit', label: '学分', minWidth: '30', fix: false },
{ prop: 'score', label: '成绩', minWidth: '40', fix: false }
{ prop: 'credit', label: '学分', minWidth: '40', fix: false },
{ prop: 'score', label: '成绩', minWidth: '40', fix: false },
// { prop: '', label: '', minWidth: '', fix: false, goObj: { routerName: '', params: {} } }, // 点击跳转页面并传参数
// { prop: 'operate-x', label: '操作', width: '160px', fix: false, commandArr: [ { command: 'activelist-show', name: '查看报告' }, { command: 'activelist-edit', name: '编辑' }, { command: 'activelist-delete', name: '删除' } ] }
{ prop: 'operate-x', label: '操作', width: '80px', fix: false, commandArr: [ { command: 're-start', name: '重修' } ] }
],
tableData: [],
params: { keywords: '', curPage: 1, pageSize: 100, total: '' },
......@@ -84,7 +86,7 @@ export default {
data = data.list
data.forEach((elem, i) => {
elem.index = i + 1 + (_this.params.curPage - 1) * _this.params.pageSize
elem.passed = elem.passed ? '通过' : '未通过'
elem.passed = elem.passed !== 0 ? (elem.passed === 2 ? '未发布' : '通过') : '未通过'
_this.tableData.push(elem)
})
}
......@@ -108,6 +110,13 @@ export default {
this.$refs['credit_unmust'].$el.children[0].children[0].children[0].children[0].innerHTML = this.score.myUnmust + '(分)'
}
})
this.VueEvent.$on('command-tablelist-x', (data) => {
if (data.command.command === 're-start') {
const _data = data.tableData[data.index]
window.localStorage.setItem('rebuild', JSON.stringify(_data))
this.$router.push({ path: `/app/my-grade/rebuild` })
}
})
}
}
</script>
......
<template>
<div>
<div class="con-title">我的重修</div>
<template v-if="isNext">
<div class="con-box">
<el-button style="display: block; margin: 0 auto;" type="success" size="medium" @click="nextPage" plain>同意申请</el-button>
</div>
</template>
<template v-else>
<div class="con-box">
<el-row type="flex" justify="center">
<el-col :xs="24" :sm="24" :md="16" :lg="12" :xl="8">
<el-form ref="setSubmitForm" :label-width="labelWidth">
<el-form-item label="重修申请表" prop="file">
<el-upload
ref="upFile"
class="upload-demo"
action=""
:multiple="false"
:limit="1"
:show-file-list="false"
:on-change="handleChange1"
:http-request="uploadFile1"
:file-list="filesArr1">
<el-button size="mini" type="primary">点击上传</el-button>
<div slot="tip" class="el-upload__tip">(重修申请表,系统模板下载)<a href="http://zws-imgs-pub.oss-cn-beijing.aliyuncs.com/static/build/learn-mba/%E3%80%8AMBA%E5%AD%A6%E7%94%9F%E5%AD%A6%E6%9C%AF%E6%B4%BB%E5%8A%A8%E8%AE%B0%E5%BD%95%E6%8A%A5%E5%91%8A%E3%80%8B%E6%A8%A1%E6%9D%BFXXX%E5%AD%A6%E7%94%9F.docx">模板下载</a></div>
<template v-if="successFileUrl1">
{{successFileUrl1.replace(/.*\/([^\/]*\.[^.]+)$/gi, '$1')}}
</template>
</el-upload>
<template v-if="successFileUrl1">
下载已上传的 <a :href="successFileUrl1">文件附件</a>
</template>
</el-form-item>
<el-form-item label="缴费凭证" prop="file">
<el-upload
ref="upFile"
class="upload-demo"
action=""
:multiple="false"
:limit="1"
:show-file-list="false"
:on-change="handleChange2"
:http-request="uploadFile2"
:file-list="filesArr2">
<el-button size="mini" type="primary">点击上传</el-button>
<template v-if="successFileUrl2">
{{successFileUrl2.replace(/.*\/([^\/]*\.[^.]+)$/gi, '$1')}}
</template>
</el-upload>
<template v-if="successFileUrl2">
下载已上传的 <a :href="successFileUrl2">图片附件</a>
</template>
</el-form-item>
<el-form-item>
<el-button type="primary" @click="goSubmit">保存并提交</el-button>
</el-form-item>
</el-form>
</el-col>
</el-row>
</div>
</template>
</div>
</template>
<script>
import cAction from '@actions'
export default {
components: { },
data () {
const info = JSON.parse(window.localStorage.getItem('rebuild') || '{}')
if (!info.course_name) {
this.$message('禁止直接打开该页面。')
this.$router.push({ path: '/' })
}
return {
labelWidth: '110px',
isNext: true,
info: info,
successFileUrl1: '',
filesArr1: [],
file1: {},
successFileUrl2: '',
filesArr2: [],
file2: {}
}
},
mounted () {},
methods: {
nextPage () {
this.isNext = false
},
handleChange1 (file, filelist) {
this.file1.name = file.raw.name
this.file1.type = file.raw.type
this.file1.lastModifiedDate = file.raw.lastModifiedDate
this.file1.size = file.raw.size
this.file1.file = file.raw
},
uploadFile1 () {
const loading = this.$loading({ lock: true, text: '', spinner: '', background: 'rgba(255, 255, 255, 0.9)' })
cAction.chapterAction.uploadFile(this.file1).then(data => {
this.successFileUrl1 = data.url
this.filesArr1.pop()
}).catch(e => { this.filesArr1.pop(); this.$message.error(e.message) }).finally(() => { loading.close() })
},
handleChange2 (file, filelist) {
this.file2.name = file.raw.name
this.file2.type = file.raw.type
this.file2.lastModifiedDate = file.raw.lastModifiedDate
this.file2.size = file.raw.size
this.file2.file = file.raw
},
uploadFile2 () {
const loading = this.$loading({ lock: true, text: '', spinner: '', background: 'rgba(255, 255, 255, 0.9)' })
cAction.chapterAction.uploadFile(this.file2).then(data => {
this.successFileUrl2 = data.url
this.filesArr2.pop()
}).catch(e => { this.filesArr2.pop(); this.$message.error(e.message) }).finally(() => { loading.close() })
},
goSubmit () {
if (!this.successFileUrl1) {
this.$message.error('重修申请表未上传!')
return
}
if (!this.successFileUrl2) {
this.$message.error('缴费凭证未上传!')
return
}
const obj = {
course_id: this.info.course_id,
semester_id: this.info.semester_id,
apply: this.successFileUrl1,
payorder: this.successFileUrl2
}
const loading = this.$loading({ lock: true, text: '', spinner: '', background: 'rgba(255, 255, 255, 0.9)' })
cAction.scoreAction.rebuildSubmit(obj).then(data => {
if (data.success) {
// 提交 重修后,删除localstorage
window.localStorage.removeItem('rebuild')
this.$message.success('重修申请提交成功!')
this.$router.push({ path: `/app/my-grade/credit` })
}
}).catch(e => { this.$message.error(e.message) }).finally(() => { loading.close() })
}
}
}
</script>
<style lang="scss" scoped>
</style>
......@@ -240,7 +240,8 @@ export default {
// status: '已发布',
// arrTab: ['3学分', '必修课', '线上课程', '第一学期'],
// isStart: true, // 是否为开始学习按钮 或者 选课按钮
// progress: 50 // 改成整数
// progress: 50, // 改成整数
// survey: false // 判别教学评估,是否已经填写
},
tabs: [{
title: '课程简介',
......@@ -459,6 +460,10 @@ export default {
if (course.type === 'course_info') {
this.$router.push({ path: `/player/${sid}/${cid}/course-info/course_info` })
} else if (course.type === 'course_work') {
if (!this.headerInfo.survey) {
this.$message('请先填写教学评估,然后完成大作业。')
return false
}
this.$router.push({ path: `/player/${sid}/${cid}/course-work/course_work` })
} else if (course.type === 'teach_evaluation') {
/* 暂时 不增加 手机端 */
......
......@@ -59,6 +59,7 @@ export default [
component: container,
children: [
{ path: 'credit', component: () => import('../pages/myGrade/credit.vue') },
{ path: 'rebuild', component: () => import('../pages/myGrade/rebuild.vue') },
{ path: 'message', component: () => import('../pages/myGrade/message.vue') }
]
},
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论