提交 75c9be7d authored 作者: matian's avatar matian

update:项目优化

上级 e5d10beb
...@@ -6605,8 +6605,7 @@ ...@@ -6605,8 +6605,7 @@
"global": "^4.4.0", "global": "^4.4.0",
"m3u8-parser": "4.7.0", "m3u8-parser": "4.7.0",
"mpd-parser": "0.19.2", "mpd-parser": "0.19.2",
"mux.js": "5.14.1", "mux.js": "5.14.1"
"video.js": "^6 || ^7"
} }
}, },
"@videojs/vhs-utils": { "@videojs/vhs-utils": {
......
...@@ -24,3 +24,9 @@ export function exportStudentList(params) { ...@@ -24,3 +24,9 @@ export function exportStudentList(params) {
responseType: 'blob' responseType: 'blob'
}) })
} }
/**
* 获取控制台数据
*/
export function getCard(data) {
return httpRequest.post('/api/zy-admin/school/student/create-certificate', data)
}
...@@ -65,13 +65,32 @@ ...@@ -65,13 +65,32 @@
<template v-slot:table-img="{ row }"> <template v-slot:table-img="{ row }">
<img :src="row.url" width="120" height="70" /> <img :src="row.url" width="120" height="70" />
</template> </template>
<template v-slot:expiration_time="{ params }">
<el-date-picker v-model="params.expiration_time_start" type="datetime" placeholder="选择日期时间">
</el-date-picker>
<p class="separator">-</p>
</template>
<template v-slot:expiration_time_max="{ params }">
<el-date-picker v-model="params.expiration_time_end" type="datetime" placeholder="选择日期时间">
</el-date-picker>
</template>
<template v-slot:table-x="{ row }">
<el-button
type="primary"
size="mini"
plain
@click="handleGiven(row)"
v-if="row.create_certificate_flag === false"
>颁发证书</el-button
>
</template>
</app-list> </app-list>
</app-card> </app-card>
</div> </div>
</template> </template>
<script> <script>
import { getDashboardList, getStudentList, exportStudentList } from '../api' import { getDashboardList, getStudentList, exportStudentList, getCard } from '../api'
import { funDownload } from '@/utils/util' import { funDownload } from '@/utils/util'
export default { export default {
data() { data() {
...@@ -101,7 +120,10 @@ export default { ...@@ -101,7 +120,10 @@ export default {
filters: [ filters: [
{ type: 'input', label: '学员姓名', placeholder: '学员姓名', prop: 'personal_name' }, { type: 'input', label: '学员姓名', placeholder: '学员姓名', prop: 'personal_name' },
{ type: 'input', label: '手机号', placeholder: '手机号', prop: 'telephone' }, { type: 'input', label: '手机号', placeholder: '手机号', prop: 'telephone' },
{ type: 'input', label: '邮箱', placeholder: '邮箱', prop: 'email' }, { type: 'input', label: '课程有效期', slots: 'expiration_time', prop: 'expiration_time_start' },
{ slots: 'expiration_time_max', prop: 'expiration_time_end' },
// { type: 'input', label: '邮箱', placeholder: '邮箱', prop: 'email' },
{ type: 'input', label: '所属班级', placeholder: '所属班级', prop: 'class_name' }, { type: 'input', label: '所属班级', placeholder: '所属班级', prop: 'class_name' },
{ type: 'input', label: '重修次数', placeholder: '重修次数', prop: 'study_times' }, { type: 'input', label: '重修次数', placeholder: '重修次数', prop: 'study_times' },
{ label: '当前学习进度', slots: 'filter-progress_min', prop: 'progress_min' }, { label: '当前学习进度', slots: 'filter-progress_min', prop: 'progress_min' },
...@@ -115,6 +137,11 @@ export default { ...@@ -115,6 +137,11 @@ export default {
{ label: '姓名', align: 'center', prop: 'personal_name' }, { label: '姓名', align: 'center', prop: 'personal_name' },
{ label: '所属班级', align: 'center', prop: 'class_name' }, { label: '所属班级', align: 'center', prop: 'class_name' },
{ label: '电话', align: 'center', prop: 'telephone' }, { label: '电话', align: 'center', prop: 'telephone' },
{
label: '课程有效期',
align: 'center',
prop: 'expiration_time'
},
{ label: '邮箱', align: 'center', prop: 'email' }, { label: '邮箱', align: 'center', prop: 'email' },
{ label: '重修次数', align: 'center', prop: 'study_times' }, { label: '重修次数', align: 'center', prop: 'study_times' },
{ label: '当前学习进度', align: 'center', prop: 'progress' }, { label: '当前学习进度', align: 'center', prop: 'progress' },
...@@ -125,7 +152,8 @@ export default { ...@@ -125,7 +152,8 @@ export default {
computed({ row }) { computed({ row }) {
return row.has_certificate ? '已获得' : '未获得' return row.has_certificate ? '已获得' : '未获得'
} }
} },
{ label: '操作', slots: 'table-x', align: 'center', width: '300', fixed: 'right' }
] ]
} }
} }
...@@ -134,6 +162,11 @@ export default { ...@@ -134,6 +162,11 @@ export default {
this.fetchList() this.fetchList()
}, },
methods: { methods: {
handleGiven(row) {
getCard({ student_id: row.id }).then(res => {
this.$refs.list.refetch()
})
},
exportAll() { exportAll() {
const params = Object.assign({}, this.tableOptions.remote.params) const params = Object.assign({}, this.tableOptions.remote.params)
delete params.page delete params.page
......
...@@ -20,6 +20,15 @@ ...@@ -20,6 +20,15 @@
<el-form-item label="邮箱" prop="email"> <el-form-item label="邮箱" prop="email">
<el-input v-model="form.email" disabled></el-input> <el-input v-model="form.email" disabled></el-input>
</el-form-item> </el-form-item>
<el-form-item label="身份证号" prop="id_number">
<el-input v-model="form.id_number" disabled></el-input>
</el-form-item>
<el-form-item label="公司" prop="school">
<el-input v-model="form.email" disabled></el-input>
</el-form-item>
<el-form-item label="课程有效期" prop="expiration_time">
<el-date-picker v-model="form.expiration_time" type="datetime" disabled> </el-date-picker>
</el-form-item>
</el-form> </el-form>
</app-card> </app-card>
</template> </template>
......
...@@ -23,6 +23,15 @@ ...@@ -23,6 +23,15 @@
<!-- <el-button type="primary" icon="el-icon-download" style="margin-left: 20px" @click="downLoad" size="mini">下载</el-button> --> <!-- <el-button type="primary" icon="el-icon-download" style="margin-left: 20px" @click="downLoad" size="mini">下载</el-button> -->
</el-row> </el-row>
</template> </template>
<template v-slot:expiration_time="{ params }">
<el-date-picker v-model="params.expiration_time_start" type="datetime" placeholder="选择日期时间">
</el-date-picker>
<p class="separator">-</p>
</template>
<template v-slot:expiration_time_max="{ params }">
<el-date-picker v-model="params.expiration_time_end" type="datetime" placeholder="选择日期时间">
</el-date-picker>
</template>
<template v-slot:table-x="{ row }"> <template v-slot:table-x="{ row }">
<router-link :to="{ path: 'student/process', query: { id: row.id } }"> <router-link :to="{ path: 'student/process', query: { id: row.id } }">
<el-button type="warning" size="mini" plain>学习进度</el-button> <el-button type="warning" size="mini" plain>学习进度</el-button>
...@@ -73,30 +82,16 @@ export default { ...@@ -73,30 +82,16 @@ export default {
} }
}, },
filters: [ filters: [
{ { type: 'input', placeholder: '姓名' },
type: 'input', { type: 'input', prop: 'telephone', placeholder: '手机号' },
width: '300', { type: 'input', label: '课程有效期', slots: 'expiration_time', prop: 'expiration_time_start' },
prop: 'personal_name', { slots: 'expiration_time_max', prop: 'expiration_time_end' }
placeholder: '姓名'
},
{
type: 'input',
width: '300',
prop: 'telephone',
placeholder: '手机号'
},
{
type: 'input',
width: '300',
prop: 'email',
placeholder: '邮箱'
}
], ],
columns: [ columns: [
{ label: '姓名', prop: 'personal_name', align: 'center' }, { label: '姓名', prop: 'personal_name', align: 'center' },
{ label: '所属班级', prop: 'class_name', align: 'center' }, { label: '所属班级', prop: 'class_name', align: 'center' },
{ label: '手机号', prop: 'telephone', align: 'center' }, { label: '手机号', prop: 'telephone', align: 'center' },
{ label: '邮箱', prop: 'email', align: 'center' }, { label: '课程有效期', prop: 'expiration_time', align: 'center' },
{ label: '操作', slots: 'table-x', align: 'center', width: '300', fixed: 'right' } { label: '操作', slots: 'table-x', align: 'center', width: '300', fixed: 'right' }
] ]
} }
...@@ -137,3 +132,21 @@ export default { ...@@ -137,3 +132,21 @@ export default {
} }
} }
</script> </script>
<style lang="scss" scoped>
::v-deep .table-list-filter {
.filter-buttons {
margin-left: 110px;
}
.el-input {
width: 194px;
}
.percent-sign,
.separator {
display: inline-block;
width: 16px;
}
.separator {
text-align: center;
}
}
</style>
...@@ -28,6 +28,15 @@ ...@@ -28,6 +28,15 @@
<el-form-item label="邮箱" prop="email"> <el-form-item label="邮箱" prop="email">
<el-input v-model="form.email"></el-input> <el-input v-model="form.email"></el-input>
</el-form-item> </el-form-item>
<el-form-item label="身份证号" prop="id_number">
<el-input v-model="form.id_number" disabled></el-input>
</el-form-item>
<el-form-item label="公司" prop="school">
<el-input v-model="form.email" disabled></el-input>
</el-form-item>
<el-form-item label="课程有效期" prop="expiration_time">
<el-date-picker v-model="form.expiration_time" type="datetime" placeholder="选择日期时间"> </el-date-picker>
</el-form-item>
<el-form-item> <el-form-item>
<el-button @click="cancel">取消</el-button> <el-button @click="cancel">取消</el-button>
<el-button type="primary" @click="submit">提交</el-button> <el-button type="primary" @click="submit">提交</el-button>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论