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

修改bug

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