提交 460c89e8 authored 作者: matian's avatar matian

updates

上级 86ffa6ca
......@@ -14,7 +14,7 @@ const levelList = $computed(() => {
return store.getMapValuesByKey('teacher_level')
})
const imgDefault = $ref('https://cube.elemecdn.com/9/c2/f0ee8a3c7c9638a54940382568c9dpng.png')
const courseList = ref([])
const id = route.query.id as string
const title = route.query.title as string
const isEdit = route.query.isEdit as string
......@@ -33,30 +33,34 @@ const rules = reactive<FormRules>({
name: [{ required: true, message: '请输入讲师姓名', trigger: 'blur' }],
title: [{ required: true, message: ' 请输入职位', trigger: 'blur' }]
})
const listOptions = {
remote: {
params: { type: '' }
},
columns: [
{ label: '#', type: 'index', align: 'center' },
{ label: '课程图片', slots: 'table-cover', align: 'center' },
{ label: '课程名称', prop: 'id', align: 'center' },
{ label: '分类名称', prop: 'course_name', align: 'center' },
{ label: '线上类型', prop: 'type_name', align: 'center' },
{ label: '选课类型', prop: 'pv', align: 'center' },
{ label: '课程学分', prop: 'pv', align: 'center' },
{ label: '是否可用', prop: 'pv', align: 'center' },
{ label: '创建时间', prop: 'created_time', align: 'center' },
{ label: '编辑', prop: 'created_time', align: 'center' },
{ label: '操作', slots: 'table-operate', width: 300, align: 'center' }
]
}
const listOptions = computed(() => {
return {
remote: {
params: { type: '' }
},
columns: [
{ label: '#', type: 'index', align: 'center' },
{ label: '课程图片', slots: 'table-img', align: 'center' },
{ label: '课程名称', prop: 'name', align: 'center' },
{ label: '分类名称', prop: 'classification_name', align: 'center' },
{ label: '线上类型', prop: 'online_type_name', align: 'center' },
{ label: '选课类型', prop: 'elective_type_name', align: 'center' },
{ label: '课程学分', prop: 'credit', align: 'center' },
{ label: '是否可用', prop: 'status_name', align: 'center' },
{ label: '创建时间', prop: 'created_time', align: 'center' },
{ label: '编辑', prop: 'created_operator_name', align: 'center' },
{ label: '操作', slots: 'table-operate', width: 300, align: 'center' }
],
data: courseList.value
}
})
const handleDelete = (row: any) => {
console.log('删除', row)
}
const getTeacherInfo = () => {
getTeacherDetail({ id: id }).then(res => {
courseList.value = res.data.course_list
Object.keys(ruleForm).forEach(key => {
ruleForm[key] = res.data[key]
})
......@@ -148,7 +152,9 @@ onMounted(() => {
<el-card>
<div class="form_title">讲授课程:</div>
<AppList v-bind="listOptions" ref="appList" border stripe>
<template #header-aside> </template>
<template #table-img="{ row }">
<img :src="row.cover" style="width: 100px; display: block" />
</template>
<template #table-operate="{ row }">
<el-space>
<router-link to="/admin/teacher/detail">
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论