提交 072651f8 authored 作者: pengxiaohui's avatar pengxiaohui

修改bug

上级 4b2ccb52
......@@ -16,10 +16,11 @@ export function getStudentList(params) {
* 导出学员列表
* @params.key 课程ID、课程名称
*/
export function exportStudentList() {
export function exportStudentList(params) {
return httpRequest({
url: '/api/lms-financial/school/student/download',
method: 'get',
params,
responseType: 'blob'
})
}
......@@ -38,8 +38,8 @@
</template>
<template v-slot:filter-cert="{ params }">
<el-select v-model="params.has_certificate" placeholder="请选择">
<el-option label="已获得" value="1" />
<el-option label="未获得" value="0" />
<el-option label="已获得" :value="true" />
<el-option label="未获得" :value="false" />
</el-select>
</template>
<template v-slot:table-img="{ row }">
......@@ -110,7 +110,10 @@ export default {
},
methods: {
exportAll() {
exportStudentList().then(res => {
const params = Object.assign({}, this.tableOptions.remote.params)
delete params.page
delete params['per-page']
exportStudentList(params).then(res => {
if (res) {
const url = URL.createObjectURL(res)
funDownload(url, `${Date.now()}.xlsx`)
......
<template>
<div>
<app-card class="base-info" title="证书信息">
<app-card class="base-info" :title="$route.query.name">
<p v-if="list.length === 0">还未取得证书</p>
<template v-else>
<div style="margin:20px;" v-for="item in list" :key="item.id">
......
......@@ -17,7 +17,7 @@
<img :src="row.url" width="120" height="70">
</template>
<template v-slot:table-x="{ row }">
<router-link v-if="btnView" :to="{ path: '/school/cert/details', query: { id: row.student_id } }">
<router-link v-if="btnView" :to="{ path: '/school/cert/details', query: { id: row.student_id, name: row.personal_name } }">
<el-button type="primary" size="mini" plain>查看</el-button>
</router-link>
</template>
......
......@@ -2,9 +2,9 @@
<app-card>
<app-list v-bind="tableOptions" ref="list">
<template>
<router-link :to="{ path: 'class/update' }" v-if="btnCreate">
<el-button type="primary" icon="el-icon-plus">新建</el-button>
</router-link>
<el-row style="margin-bottom: 20px">
<el-button type="primary" icon="el-icon-plus" @click="onCreate">新建</el-button>
</el-row>
</template>
<template v-slot:table-x="{ row }">
<router-link v-if="btnManage" :to="{ path: 'class/view', query: { id: row.id } }">
......@@ -79,6 +79,9 @@ export default {
}
},
methods: {
onCreate() {
this.$router.push({ path: 'class/update' })
},
// 删除
onRemove(row) {
this.$confirm('你确定要删除此项吗', '确认提示', {
......
......@@ -17,7 +17,7 @@
</template>
<div class="item" v-for="(it, idx) in item.children" :key="idx">
<i v-if="btnView && it.type === 2" class="el-icon-video-play" @click="fetchVideoUrl(it)"></i>
<p>{{it.name}}</p>
<p><span @click="fetchVideoUrl(it)">{{it.name}}</span></p>
<div class="time" v-if="it.type === 2">
<span class="text">时长</span>
<el-tag size="mini">{{it.video.video_length | formatSeconds}}</el-tag>
......@@ -93,6 +93,9 @@ export default {
this.videoInfo = val
},
fetchVideoUrl(val) {
if (!this.btnView || val.type !== 2) {
return
}
getVideoUrl({ vid: val.resource_id }).then(res => {
if (res.video) {
const url = res.video.HD || res.video.fD || res.video.SD || res.video.LD
......
......@@ -6,8 +6,8 @@
</div>
<el-descriptions class="margin-top" :column="4" direction="vertical">
<el-descriptions-item label="考试名称">{{$route.query.title}}</el-descriptions-item>
<el-descriptions-item label="考试有效期">-</el-descriptions-item>
<el-descriptions-item label="考试时间" :span="2">--</el-descriptions-item>
<el-descriptions-item label="考试有效期">进行中</el-descriptions-item>
<!-- <el-descriptions-item label="考试时间" :span="2">--</el-descriptions-item> -->
</el-descriptions>
</app-card>
<app-card class="content" title="考生信息">
......
......@@ -43,10 +43,11 @@ export default {
label: '考试有效期',
align: 'center',
computed({ row }) {
return statusMap[row.status]
// return statusMap[row.status]
return '进行中'
}
},
{ label: '考试日期', align: 'center', slots: 'table-time' },
// { label: '考试日期', align: 'center', slots: 'table-time' },
{ label: '操作', slots: 'table-x', align: 'center', width: '220', fixed: 'right' }
]
}
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论