提交 e64f5d47 authored 作者: 王鹏飞's avatar 王鹏飞

修改课程考核和我的学分页面

上级 1451c851
......@@ -15,12 +15,14 @@
"axios": "^0.21.1",
"core-js": "^3.9.0",
"cross-env": "^7.0.3",
"echarts": "^5.0.2",
"element-ui": "^2.15.1",
"js-cookie": "^2.2.1",
"lodash": "^4.17.21",
"qrcode.vue": "^1.7.0",
"qs": "^6.9.6",
"vue": "^2.6.12",
"vue-echarts": "^6.0.0-rc.3",
"vue-i18n": "^8.22.2",
"vue-loader": "^15.9.5",
"vue-meta": "^2.4.0",
......@@ -36,6 +38,7 @@
"@babel/plugin-transform-runtime": "^7.11.5",
"@babel/preset-env": "^7.11.5",
"@babel/runtime-corejs3": "^7.11.2",
"@vue/composition-api": "^1.0.0-rc.5",
"acorn": "^7.1.1",
"ali-oss": "^6.11.2",
"autoprefixer": "^9.8.6",
......@@ -1912,6 +1915,24 @@
"node": ">=0.10.0"
}
},
"node_modules/@vue/composition-api": {
"version": "1.0.0-rc.5",
"resolved": "https://registry.npmjs.org/@vue/composition-api/-/composition-api-1.0.0-rc.5.tgz",
"integrity": "sha512-sFBUDZxwi5YOQqH//VSGenO6WH0JuW94+CWo1eUsGSTRue8POfwD4oeduVqi/c6QcwXg2tJL/m6aOD2t/IR6zg==",
"devOptional": true,
"dependencies": {
"tslib": "^2.1.0"
},
"peerDependencies": {
"vue": ">= 2.5 < 3"
}
},
"node_modules/@vue/composition-api/node_modules/tslib": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz",
"integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A==",
"devOptional": true
},
"node_modules/@webassemblyjs/ast": {
"version": "1.9.0",
"resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.9.0.tgz",
......@@ -4678,6 +4699,20 @@
"safer-buffer": "^2.1.0"
}
},
"node_modules/echarts": {
"version": "5.0.2",
"resolved": "https://registry.npmjs.org/echarts/-/echarts-5.0.2.tgz",
"integrity": "sha512-En0VYpc96nw2/2AZoBWPHsGi471zMublttj50kfFpYAeR4geup0Tj9iVgEXh7QYZFPnRiruDJEjcB5PXZ+BYzQ==",
"dependencies": {
"tslib": "2.0.3",
"zrender": "5.0.4"
}
},
"node_modules/echarts/node_modules/tslib": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz",
"integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ=="
},
"node_modules/ee-first": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
......@@ -10347,6 +10382,11 @@
"integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=",
"dev": true
},
"node_modules/resize-detector": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/resize-detector/-/resize-detector-0.3.0.tgz",
"integrity": "sha512-R/tCuvuOHQ8o2boRP6vgx8hXCCy87H1eY9V5imBYeVNyNVpuL9ciReSccLj2gDcax9+2weXy3bc8Vv+NRXeEvQ=="
},
"node_modules/resize-observer-polyfill": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz",
......@@ -12530,6 +12570,48 @@
"resolved": "https://registry.npmjs.org/vue/-/vue-2.6.12.tgz",
"integrity": "sha512-uhmLFETqPPNyuLLbsKz6ioJ4q7AZHzD8ZVFNATNyICSZouqP2Sz0rotWQC8UNBF6VGSCs5abnKJoStA6JbCbfg=="
},
"node_modules/vue-demi": {
"version": "0.7.3",
"resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.7.3.tgz",
"integrity": "sha512-vrzM26H4CZCXBf/eu4T8nks6o7qgziYM52myk8bg+atw4qYqpeWJf5c82W8VdmgGfSIdh9ulOOe9+GeLc3Z/8A==",
"hasInstallScript": true,
"bin": {
"vue-demi-fix": "bin/vue-demi-fix.js",
"vue-demi-switch": "bin/vue-demi-switch.js"
},
"funding": {
"url": "https://github.com/sponsors/antfu"
},
"peerDependencies": {
"@vue/composition-api": "^1.0.0-beta.1",
"vue": "^2.6.0 || >=3.0.0-rc.1"
},
"peerDependenciesMeta": {
"@vue/composition-api": {
"optional": true
}
}
},
"node_modules/vue-echarts": {
"version": "6.0.0-rc.3",
"resolved": "https://registry.npmjs.org/vue-echarts/-/vue-echarts-6.0.0-rc.3.tgz",
"integrity": "sha512-B7xfwpHaOeM9+cjallrK3AW893oaeqT9Sjx7tHgwoyGdfPTq6cwDc2Hcdmjgrs/KEp+ZZXMIajXky30Wu4/TDw==",
"hasInstallScript": true,
"dependencies": {
"resize-detector": "^0.3.0",
"vue-demi": "^0.7.1"
},
"peerDependencies": {
"@vue/composition-api": "^1.0.0-rc.2",
"echarts": "^5.0.2",
"vue": "^2.6.12 || ^3.0.0"
},
"peerDependenciesMeta": {
"@vue/composition-api": {
"optional": true
}
}
},
"node_modules/vue-eslint-parser": {
"version": "7.1.1",
"resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-7.1.1.tgz",
......@@ -13656,6 +13738,19 @@
"engines": {
"node": ">=6"
}
},
"node_modules/zrender": {
"version": "5.0.4",
"resolved": "https://registry.npmjs.org/zrender/-/zrender-5.0.4.tgz",
"integrity": "sha512-DJpy0yrHYY5CuH6vhb9IINWbjvBUe/56J8aH86Jb7O8rRPAYZ3M2E469Qf5B3EOIfM3o3aUrO5edRQfLJ+l1Qw==",
"dependencies": {
"tslib": "2.0.3"
}
},
"node_modules/zrender/node_modules/tslib": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz",
"integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ=="
}
},
"dependencies": {
......@@ -15338,6 +15433,23 @@
}
}
},
"@vue/composition-api": {
"version": "1.0.0-rc.5",
"resolved": "https://registry.npmjs.org/@vue/composition-api/-/composition-api-1.0.0-rc.5.tgz",
"integrity": "sha512-sFBUDZxwi5YOQqH//VSGenO6WH0JuW94+CWo1eUsGSTRue8POfwD4oeduVqi/c6QcwXg2tJL/m6aOD2t/IR6zg==",
"devOptional": true,
"requires": {
"tslib": "^2.1.0"
},
"dependencies": {
"tslib": {
"version": "2.1.0",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.1.0.tgz",
"integrity": "sha512-hcVC3wYEziELGGmEEXue7D75zbwIIVUMWAVbHItGPx0ziyXxrOMQx4rQEVEV45Ut/1IotuEvwqPopzIOkDMf0A==",
"devOptional": true
}
}
},
"@webassemblyjs/ast": {
"version": "1.9.0",
"resolved": "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.9.0.tgz",
......@@ -17715,6 +17827,22 @@
"safer-buffer": "^2.1.0"
}
},
"echarts": {
"version": "5.0.2",
"resolved": "https://registry.npmjs.org/echarts/-/echarts-5.0.2.tgz",
"integrity": "sha512-En0VYpc96nw2/2AZoBWPHsGi471zMublttj50kfFpYAeR4geup0Tj9iVgEXh7QYZFPnRiruDJEjcB5PXZ+BYzQ==",
"requires": {
"tslib": "2.0.3",
"zrender": "5.0.4"
},
"dependencies": {
"tslib": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz",
"integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ=="
}
}
},
"ee-first": {
"version": "1.1.1",
"resolved": "https://registry.npmjs.org/ee-first/-/ee-first-1.1.1.tgz",
......@@ -22402,6 +22530,11 @@
"integrity": "sha1-kl0mAdOaxIXgkc8NpcbmlNw9yv8=",
"dev": true
},
"resize-detector": {
"version": "0.3.0",
"resolved": "https://registry.npmjs.org/resize-detector/-/resize-detector-0.3.0.tgz",
"integrity": "sha512-R/tCuvuOHQ8o2boRP6vgx8hXCCy87H1eY9V5imBYeVNyNVpuL9ciReSccLj2gDcax9+2weXy3bc8Vv+NRXeEvQ=="
},
"resize-observer-polyfill": {
"version": "1.5.1",
"resolved": "https://registry.npmjs.org/resize-observer-polyfill/-/resize-observer-polyfill-1.5.1.tgz",
......@@ -24242,6 +24375,21 @@
"resolved": "https://registry.npmjs.org/vue/-/vue-2.6.12.tgz",
"integrity": "sha512-uhmLFETqPPNyuLLbsKz6ioJ4q7AZHzD8ZVFNATNyICSZouqP2Sz0rotWQC8UNBF6VGSCs5abnKJoStA6JbCbfg=="
},
"vue-demi": {
"version": "0.7.3",
"resolved": "https://registry.npmjs.org/vue-demi/-/vue-demi-0.7.3.tgz",
"integrity": "sha512-vrzM26H4CZCXBf/eu4T8nks6o7qgziYM52myk8bg+atw4qYqpeWJf5c82W8VdmgGfSIdh9ulOOe9+GeLc3Z/8A==",
"requires": {}
},
"vue-echarts": {
"version": "6.0.0-rc.3",
"resolved": "https://registry.npmjs.org/vue-echarts/-/vue-echarts-6.0.0-rc.3.tgz",
"integrity": "sha512-B7xfwpHaOeM9+cjallrK3AW893oaeqT9Sjx7tHgwoyGdfPTq6cwDc2Hcdmjgrs/KEp+ZZXMIajXky30Wu4/TDw==",
"requires": {
"resize-detector": "^0.3.0",
"vue-demi": "^0.7.1"
}
},
"vue-eslint-parser": {
"version": "7.1.1",
"resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-7.1.1.tgz",
......@@ -25167,6 +25315,21 @@
"camelcase": "^5.0.0",
"decamelize": "^1.2.0"
}
},
"zrender": {
"version": "5.0.4",
"resolved": "https://registry.npmjs.org/zrender/-/zrender-5.0.4.tgz",
"integrity": "sha512-DJpy0yrHYY5CuH6vhb9IINWbjvBUe/56J8aH86Jb7O8rRPAYZ3M2E469Qf5B3EOIfM3o3aUrO5edRQfLJ+l1Qw==",
"requires": {
"tslib": "2.0.3"
},
"dependencies": {
"tslib": {
"version": "2.0.3",
"resolved": "https://registry.npmjs.org/tslib/-/tslib-2.0.3.tgz",
"integrity": "sha512-uZtkfKblCEQtZKBF6EBXVZeQNl82yqtDQdv+eck8u7tdPxjLu2/lp5/uPW+um2tpuxINHWy3GhiccY7QgEaVHQ=="
}
}
}
}
}
......@@ -36,6 +36,7 @@
"@babel/plugin-transform-runtime": "^7.11.5",
"@babel/preset-env": "^7.11.5",
"@babel/runtime-corejs3": "^7.11.2",
"@vue/composition-api": "^1.0.0-rc.5",
"acorn": "^7.1.1",
"ali-oss": "^6.11.2",
"autoprefixer": "^9.8.6",
......@@ -78,12 +79,14 @@
"axios": "^0.21.1",
"core-js": "^3.9.0",
"cross-env": "^7.0.3",
"echarts": "^5.0.2",
"element-ui": "^2.15.1",
"js-cookie": "^2.2.1",
"lodash": "^4.17.21",
"qrcode.vue": "^1.7.0",
"qs": "^6.9.6",
"vue": "^2.6.12",
"vue-echarts": "^6.0.0-rc.3",
"vue-i18n": "^8.22.2",
"vue-loader": "^15.9.5",
"vue-meta": "^2.4.0",
......
......@@ -74,6 +74,7 @@ export default class CourseAction extends BaseACTION {
: (_type === 2 ? _vIn.$t('action.courseAction.changeLearn')
: (_type === 3 ? _vIn.$t('action.courseAction.repeatLearn') : ''))
const json = {
course_type: cur.course_type,
headerInfo: {
isStart: !!cur.selected, // 是否为开始学习按钮 或者 选课按钮
id: cur.course_id,
......@@ -287,6 +288,7 @@ export default class CourseAction extends BaseACTION {
})
}
const json = {
raw: cur,
score: cur.course_score,
duration: tool.convertTime.durationToTimeString(cur.course_duration || 0),
progress: cur.course_progress,
......
......@@ -9,26 +9,7 @@ import { Grade } from '@api'
export default class GradeAction extends BaseACTION {
/* 获取我的学分信息 */
getCredit () {
return Grade.getCredit().then(res => {
const _data = res
const json = {
total: _data.total_credits,
myTotal: _data.my_total_credits,
myTotalStr: (_data.total_credits && ((_data.my_total_credits * 1.0 / _data.total_credits * 100).toFixed(1) + '%')) || '0%',
must: _data.required_credits,
myMust: _data.my_required_credits,
myMustStr: (_data.required_credits && ((_data.my_required_credits * 1.0 / _data.required_credits * 100).toFixed(1) + '%')) || '0%',
unmust: _data.optional_credits,
myUnmust: _data.my_optional_credits,
myUnmustStr: (_data.optional_credits && ((_data.my_optional_credits * 1.0 / _data.optional_credits * 100).toFixed(1) + '%')) || '0%',
list: _data.lists
}
// callback(json) // 可以不使用callback 因为使用then
return json
})
}
getCredit () { return Grade.getCredit() }
/* 提交重修 */
rebuildSubmit (obj) { return Grade.submitRebuild(obj).then(res => res) }
/* 意见反馈列表 */
......
<template>
<div>
<div v-loading="loading">
<div class="con-title">{{ $t('pages.grade.credit.title') }}</div>
<div class="con-box">
<div>
<p>注:</p>
<p>1. 每一门课程达到77分及格通过,低于77分需要重修,重修费用按照每学分1000元进行缴纳。</p>
<p>2. 所有课程全部通过,且16门必修课平均分达到{{ detail.degree_score }}分,符合申请学位要求。</p>
</div>
<div class="total-core">
<div class="title">{{ $t('pages.grade.credit.totalCredits') }}</div>
<div class="core">{{ score.total }}</div>
<div class="core">{{ detail.total_credits }}(分)</div>
<el-progress
ref="credit_total"
:text-inside="true"
:stroke-width="30"
:percentage="percent1"
:percentage="totalPercentage"
:format="progressFormatTotal"
color="#df9d75"
></el-progress>
</div>
<el-row :gutter="20">
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
<div class="compulsory-core">
<div class="title">{{ $t('pages.grade.credit.compCredits') }}</div>
<div class="core">{{ score.must }}</div>
<el-progress
ref="credit_must"
:text-inside="true"
:stroke-width="30"
:percentage="percent2"
color="#8ca4cf"
></el-progress>
</div>
</el-col>
<el-col :xs="24" :sm="12" :md="12" :lg="12" :xl="12">
<div class="elective-core">
<div class="title">{{ $t('pages.grade.credit.eleCredits') }}</div>
<div class="core">{{ score.unmust }}</div>
<el-progress
ref="credit_unmust"
:text-inside="true"
:stroke-width="30"
:percentage="percent3"
color="#66c6bd"
></el-progress>
<div class="total-core">
<div class="title">综合必修平均分</div>
<div class="core">100(分)</div>
<div class="progress">
<div class="progress-baseline" :style="progressBasseLineStyle">
<span>{{ detail.degree_score }}(分)</span>
</div>
</el-col>
</el-row>
<el-progress
:text-inside="true"
:stroke-width="30"
:percentage="detail.average_score"
:format="progressFormat"
color="#8ca4cf"
>
</el-progress>
</div>
</div>
<div class="color-box">
<div class="color" style="background: #8ca4cf"></div>
<div class="txt">{{ $t('pages.grade.credit.compCredits') }}</div>
<div class="color" style="background: #66c6bd"></div>
<div class="txt">{{ $t('pages.grade.credit.eleCredits') }}</div>
<div class="txt">综合必修平均分</div>
<div class="color" style="background: #df9d75"></div>
<div class="txt">{{ $t('pages.grade.credit.allCredits') }}</div>
</div>
<m-page
:tableHead="tableHead"
:tableData="tableData"
:params="params"
:objFn="objFn"
:tableConfig="tableConfig"
/>
<div style="height: 0.3rem"></div>
<table-list v-bind="tableOptions"></table-list>
</div>
</div>
</template>
<script>
import mPage from '@/components/comTable/mPage.vue'
import cAction from '@action'
import TableList from '@/components/comTable/tableList'
export default {
components: { mPage },
components: { mPage, TableList },
data() {
return {
percent1: 0,
percent2: 0,
percent3: 0,
score: {
total: 0,
myTotal: 0,
myTotalStr: '0%',
must: 0,
myMust: 0,
myMustStr: '0%',
unmust: 0,
myUnmust: 0,
myUnmustStr: '0%'
},
tableConfig: { border: '', size: '', selection: { has: false, sels: [], width: '50px', fix: 'left', align: '' } }, // 增加选择框,has设置为true
tableHead: [
{ prop: 'index', label: this.$t('pages.grade.credit.serialNumber'), width: '60px' },
{ prop: 'semester_name', label: this.$t('pages.grade.credit.semester') },
{ prop: 'class_name', label: this.$t('pages.grade.credit.class'), width: '200px' },
{ prop: 'course_name', label: this.$t('pages.grade.credit.course') },
{ prop: 'course_credit', label: this.$t('pages.grade.credit.courseCredits'), width: '100px' },
{ prop: 'passed', label: this.$t('pages.grade.credit.status'), width: '100px' },
{ prop: 'credit', label: this.$t('pages.grade.credit.credit'), width: '100px' },
{ prop: 'score', label: this.$t('pages.grade.credit.grade'), width: '100px' },
// { prop: '', label: this.$t('pages.grade.credit')'', minWidth: '', fix: false, goObj: { routerName: '', params: {} } }, // 点击跳转页面并传参数
{
prop: 'operate-x',
label: this.$t('pages.grade.credit.operate'),
width: '80px',
fix: false,
commandArr: [
{ command: 're-start', name: '重修' },
{ command: 're-start', name: '已申请' }
]
}
],
tableData: [],
params: { keywords: '', curPage: 1, pageSize: 100, total: '' },
objFn: {
paramsFn: _this => {
return {}
},
nameAPI: 'getCredit',
actionClass: 'Grade',
// nameExcel: 'getStatSummaryExcel',
nameExcel: 'getExportExcel3_4_14',
callback: (_this, data) => {
this.score = data
this.percent1 = Math.floor((this.score.myTotal / this.score.total) * 100) || 0
this.percent2 = Math.floor((this.score.myMust / this.score.must) * 100) || 0
this.percent3 = Math.floor((this.score.myUnmust / (this.score.unmust ? this.score.unmust : 1)) * 100) || 0
// console.log(111, this.score, this.percent1, this.percent2, this.percent3)
this.$refs.credit_total.$el.children[0].children[0].children[0].children[0].innerHTML =
this.score.myTotal + '(分)'
this.$refs.credit_must.$el.children[0].children[0].children[0].children[0].innerHTML =
this.score.myMust + '(分)'
this.$refs.credit_unmust.$el.children[0].children[0].children[0].children[0].innerHTML =
this.score.myUnmust + '(分)'
_this.params.total = 100
data = data.list
data.forEach((elem, i) => {
elem.index = i + 1 + (_this.params.curPage - 1) * _this.params.pageSize
elem.passed =
elem.passed !== 0
? elem.passed === 2
? this.$t('pages.grade.credit.unpublished')
: this.$t('pages.grade.credit.passed')
: this.$t('pages.grade.credit.failed')
_this.tableData.push(elem)
})
}
loading: false,
detail: {}
}
},
computed: {
tableOptions() {
return {
columns: [
{ prop: 'semester_name', label: this.$t('pages.grade.credit.semester'), attrs: { width: '160px' } },
{ prop: 'class_name', label: this.$t('pages.grade.credit.class'), attrs: { width: '120px' } },
{ prop: 'course_name', label: this.$t('pages.grade.credit.course') },
{ prop: 'course_credit', label: this.$t('pages.grade.credit.courseCredits'), attrs: { width: '100px' } },
{
prop: 'passed',
label: this.$t('pages.grade.credit.status'),
attrs: { width: '100px' },
computed: value => {
const map = {
0: this.$t('pages.grade.credit.failed'),
1: this.$t('pages.grade.credit.passed'),
2: this.$t('pages.grade.credit.unpublished')
}
return map[value]
}
},
{ prop: 'credit', label: this.$t('pages.grade.credit.credit'), attrs: { width: '100px' } },
{ prop: 'score', label: this.$t('pages.grade.credit.grade'), attrs: { width: '100px' } },
{
label: this.$t('pages.grade.credit.operate'),
attrs: { width: '100px' },
buttons: [
{
label: '申请重修',
isShow(row) {
return row.passed === 0
},
onClick: row => {
this.$router.push({ path: '/app/offices', query: { channel: 'retake' } })
}
}
]
}
],
data: this.detail.lists
}
},
totalPercentage() {
return (this.detail.my_total_credits / this.detail.total_credits) * 100 || 0
},
progressBasseLineStyle() {
return { left: `${this.detail.degree_score}%` }
}
},
methods: {
getDetail() {
this.loading = true
cAction.Grade.getCredit()
.then(response => {
this.detail = response
})
.finally(() => {
this.loading = false
})
},
progressFormatTotal(percentage) {
percentage = this.detail.my_total_credits || 0
return `${percentage}(分)`
},
progressFormat(percentage) {
return `${percentage}(分)`
}
},
beforeMount() {
this.getDetail()
},
mounted() {
this.VueEvent.$off('command-tablelist-x').$on('command-tablelist-x', data => {
if (data.command.command === 're-start') {
const _data = data.tableData[data.index - 1]
window.localStorage.setItem('rebuild', JSON.stringify(_data))
this.$router.push({ path: '/app/grade/rebuild' })
}
})
// this.VueEvent.$off('command-tablelist-x').$on('command-tablelist-x', data => {
// if (data.command.command === 're-start') {
// const _data = data.tableData[data.index - 1]
// window.localStorage.setItem('rebuild', JSON.stringify(_data))
// this.$router.push({ path: '/app/grade/rebuild' })
// }
// })
}
}
</script>
......@@ -173,8 +159,10 @@ export default {
}
}
.color-box {
padding: 0.1rem 0 0.2rem 0;
text-align: right;
display: flex;
justify-content: flex-end;
align-items: center;
padding: 10px 0;
.color {
display: inline-block;
vertical-align: text-bottom;
......@@ -183,9 +171,33 @@ export default {
}
.txt {
display: inline-block;
padding: 0 0.2rem 0 0.1rem;
padding: 0 10px;
font-size: 14px;
line-height: 36px;
}
}
.progress {
position: relative;
.progress-baseline {
position: absolute;
bottom: 30px;
display: inline-block;
span {
font-size: 12px;
display: block;
transform: translateX(-50%);
}
&::after {
position: absolute;
bottom: -30px;
content: '';
display: block;
width: 4px;
height: 30px;
background-color: #f56c6c;
margin-left: -2px;
z-index: 999;
}
}
}
</style>
<template></template>
<script>
export default {}
</script>
<template>
<div class="detail">
<div class="detail-rich">
<div class="h1">一、最终成绩计算</div>
<div class="p">
<template v-for="(item, index) in checkList">
<span :key="index">{{ index ? '+' : '' }}{{ item.name }}得分*{{ item.percent }}%</span>
</template>
= 该门课程总得分,满分100分,低于{{ data.course_check_pass_score }}分为不及格,需重修此门课程。
</div>
<v-chart class="chart" :option="option" />
</div>
<div class="detail-rich">
<div class="h1">二、具体细则</div>
<template v-for="(item, index) in checkList">
<div :key="index">
<div class="h2">{{ `${item.name} 总分${item.score}分(占科目总成绩的${item.percent}%)` }}</div>
<template v-if="item.key === 'video'">
<div class="p">课程视频观看完成度:以后台数据统计为准,全部看完视频满分100分。</div>
<div class="em">
注:视频观看考核的是实际播放时长,不是进度条的显示状态,进度条满格并不一定表示观看完这个视频。以下方每日学习时长为准。
</div>
</template>
<template v-if="item.key === 'week_report'">
<div class="p">报告作业总分{{ item.score }}分,报告得分以老师批改的分数为准。</div>
<div class="p">课程反馈建设性问题老师可酌情加分,每周的课程提问加分以老师批改的分数为准。</div>
</template>
<div class="p" v-if="item.key === 'week_test'">
本课程所有测试的平均正确率*{{ item.score }}*占总成绩{{ item.percent }}%=此项得分
</div>
<div class="p" v-if="item.key === 'essay'">结业大作业满分为{{ item.score }}分,以老师批改的分数为准。</div>
</div>
</template>
</div>
</div>
</template>
<script>
import { use } from 'echarts/core'
import { CanvasRenderer } from 'echarts/renderers'
import { PieChart } from 'echarts/charts'
import { TitleComponent, TooltipComponent, LegendComponent } from 'echarts/components'
import VChart from 'vue-echarts'
use([CanvasRenderer, PieChart, TitleComponent, TooltipComponent, LegendComponent])
export default {
props: { data: { type: Object, default: () => {} } },
components: { VChart },
data() {
return {}
},
computed: {
checkList() {
return this.data.course_check.filter(item => item.percent)
},
option() {
const data = this.checkList.map(item => {
return { name: item.name, value: item.percent }
})
return {
tooltip: { trigger: 'item', formatter: '{a} <br/>{b} 占比{c}%' },
series: [{ name: '课程考核', type: 'pie', data }]
}
}
}
}
</script>
<style scoped>
.chart {
height: 300px;
}
</style>
<template>
<div class="detail">
<div class="detail-rich">
<div class="h1">一、最终成绩计算</div>
<div class="p">美方课程最终成绩请参考每学期初教务邮箱老师发到大家邮箱中的课程考核大纲进行计算。</div>
<v-chart class="chart" :option="option" />
</div>
<div class="detail-rich">
<div class="h1">二、具体细则</div>
<template v-for="(item, index) in checkList">
<div :key="index">
<div class="h2">{{ `${item.name} 总分${item.score}分(占科目总成绩的${item.percent}%)` }}</div>
<template v-if="item.key === 'video'">
<div class="p">
课程视频观看完成度:以后台数据统计为准,全部看完视频满分100分。(实际视频观看分数以课程考核大纲为准)
</div>
<div class="em">
注:视频观看考核的是实际播放时长,不是进度条的显示状态,进度条满格并不一定表示观看完这个视频。以下方每日学习时长为准。
</div>
</template>
<template v-if="item.key === 'week_report'">
<div class="p">报告作业总分{{ item.score }}分,报告得分以老师批改的分数为准。</div>
<div class="p">课程反馈建设性问题老师可酌情加分,每周的课程提问加分以老师批改的分数为准。</div>
</template>
<div class="p" v-if="item.key === 'week_test'">
本课程所有测试的平均正确率*{{ item.score }}*占总成绩{{ item.percent }}%=此项得分。
(实际章节测试占比以课程考核大纲为准)。
</div>
<div class="p" v-if="item.key === 'essay'">结业大作业满分为{{ item.score }}分,以老师批改的分数为准。</div>
</div>
</template>
</div>
</div>
</template>
<script>
import { use } from 'echarts/core'
import { CanvasRenderer } from 'echarts/renderers'
import { PieChart } from 'echarts/charts'
import { TitleComponent, TooltipComponent, LegendComponent } from 'echarts/components'
import VChart from 'vue-echarts'
use([CanvasRenderer, PieChart, TitleComponent, TooltipComponent, LegendComponent])
export default {
props: { data: { type: Object, default: () => {} } },
components: { VChart },
data() {
return {}
},
computed: {
checkList() {
return this.data.course_check.filter(item => item.percent)
},
option() {
const data = this.checkList.map(item => {
return { name: item.name, value: item.percent }
})
return {
tooltip: { trigger: 'item', formatter: '{a} <br/>{b} 占比{c}%' },
series: [{ name: '课程考核', type: 'pie', data }]
}
}
}
}
</script>
<style scoped>
.chart {
height: 300px;
}
</style>
......@@ -164,7 +164,7 @@
</div>
</template>
</el-tab-pane>
<el-tab-pane :label="$t('pages.learn.courseDetail.Courseassessment')" name="3">
<el-tab-pane :label="$t('pages.learn.courseDetail.Courseassessment')" name="3" :lazy="true">
<div class="course-assess">
<div class="title">
{{ $t('pages.learn.courseDetail.Finalresult') }}
......@@ -179,9 +179,11 @@
{{ $t('pages.learn.courseDetail.Courseassessmentstandard') }}
</div>
</div>
<div class="detail">
<course-assessment-cn :data="courseAssessment" v-if="courseType === 1"></course-assessment-cn>
<course-assessment-en :data="courseAssessment" v-else></course-assessment-en>
<!-- <div class="detail">
<div class="detail-rich" v-html="tabs[3].richText"></div>
</div>
</div> -->
<div class="topic">
<div class="line"></div>
<div class="tit">
......@@ -315,9 +317,10 @@ import cAction from '@action'
import cTool from '@tool'
import VEditor from '@/components/ckeditor'
import CourseAssessmentCn from './components/course_assessment_cn'
import CourseAssessmentEn from './components/course_assessment_en'
export default {
components: { VEditor },
components: { VEditor, CourseAssessmentCn, CourseAssessmentEn },
props: {
sid: {
type: String,
......@@ -445,7 +448,9 @@ export default {
arrFn: [],
cloudClassUrls: {},
timeHeart: null,
firstVideo: {}
firstVideo: {},
courseType: 2,
courseAssessment: {}
}
},
mounted() {
......@@ -471,6 +476,7 @@ export default {
}
cAction.Course.getCourseDetail(this.cid, this.sid)
.then(json => {
this.courseType = json.course_type
this.headerInfo = json.headerInfo
this.tabs[0].content = json.tabs0Content
this.tabs[1].chapterList = json.tabs1ChapterList
......@@ -493,6 +499,7 @@ export default {
cAction.Course.getCourseAssess(this.cid, this.sid)
.then(json1 => {
this.courseAssessment = json1.raw
// const _courseArr = json.tabs1ChapterList.course
// /* 进行一次 对照,将 视频 vid 赋值 */
// /* BUG: 如果有某一章 都没有视频时,对照失败,从没有的那一章开始,后面全部没有vid */
......
......@@ -71,6 +71,7 @@ body {
font-weight: 700;
color: #313131;
line-height: 0.3rem;
margin-top: 10px;
}
.course-assess .detail .p {
font-size: 0.14rem;
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论