提交 9434982c authored 作者: matian's avatar matian

feat:页面优化

上级 831a8d15
......@@ -48,13 +48,13 @@ function genNavClassName(data: IMenuItem) {
<div class="app-header-right">
<el-dropdown v-if="userInfo">
<div class="avatar">
<img :src="userInfo.avatar || 'https://webapp-pub.ezijing.com/website/base/images/avatar.svg'" />
<img :src="userInfo.avatar || 'https://webapp-pub.ezijing.com/center_resource/avatar.png'" />
</div>
<template #dropdown>
<el-dropdown-menu style="width: 280px">
<div class="app-header-user">
<div class="app-header-user-avatar">
<img :src="userInfo.avatar || 'https://webapp-pub.ezijing.com/website/base/images/avatar.svg'" />
<img :src="userInfo.avatar || 'https://webapp-pub.ezijing.com/center_resource/avatar.png'" />
</div>
<div class="app-header-user-main">
<h3>{{ userInfo.name }}</h3>
......
<script setup lang="ts">
import VEditor from '@/components/tinymce/Index.vue'
// import VEditor from '@/components/tinymce/Index.vue'
const props: any = defineProps({
data: {
type: Object
......@@ -128,16 +128,16 @@ const liveOptions = computed(() => {
</div>
<el-form ref="ruleFormRef" label-position="top" :model="form" style="width: 100%; margin-top: 30px">
<el-form-item label="课程简介与描述:">
<v-editor disabled v-model="form.represent" class="editor" :height="200"></v-editor>
<div class="editor" v-html="form.represent || '暂无'"></div>
</el-form-item>
<el-form-item label="课程小论文:">
<v-editor disabled v-model="form.essay" class="editor" :height="200"></v-editor>
<div v-html="form.essay || '暂无'" class="editor"></div>
</el-form-item>
<el-form-item label="前期准备与预备知识:">
<v-editor disabled v-model="form.previous_preparation" class="editor" :height="200"></v-editor>
<div v-html="form.previous_preparation || '暂无'" class="editor"></div>
</el-form-item>
<el-form-item label="授课目标:">
<v-editor disabled v-model="form.target" class="editor" :height="200"></v-editor>
<div v-html="form.target || '暂无'" class="editor"></div>
</el-form-item>
<el-form-item label="课程考试:">
<AppList v-bind="listOptions" style="width: 100%"> </AppList>
......@@ -234,4 +234,15 @@ const liveOptions = computed(() => {
}
}
}
.editor {
width: 100%;
min-height: 200px;
max-height: 200px;
background: rgb(239, 239, 239);
overflow-y: auto;
text-indent: 2em;
line-height: 1.5;
padding: 20px 20px;
color: #333;
}
</style>
......@@ -88,6 +88,10 @@ const basicInfo = computed((): IBasicInfo[] => {
}
]
basicList.map((item: any) => {
if (item.key === 'specialty') {
item.value = props?.data.specialty?.map((item: any) => item.name).toString()
return item
}
item.value = props?.data[item.key] || '-'
return item
})
......@@ -159,7 +163,7 @@ const basicInfo = computed((): IBasicInfo[] => {
align-items: center;
height: fit-content;
margin-left: 2%;
margin-bottom: 21px;
margin-bottom: 10px;
.item-right {
margin-left: 15px;
.label {
......@@ -180,16 +184,13 @@ const basicInfo = computed((): IBasicInfo[] => {
.lecturer-list {
width: 230px;
display: flex;
justify-content: center;
align-items: center;
margin-left: 25px;
.list-name {
margin-left: 25px;
width: 18px;
height: 40px;
font-size: 18px;
font-weight: 500;
line-height: 26px;
color: #333333;
opacity: 1;
}
......
......@@ -7,6 +7,7 @@ export const routes: Array<RouteRecordRaw> = [
component: AppLayout,
children: [
{ path: '/teach/exam', component: () => import('./views/List.vue') },
{ path: '/teach/stuList', component: () => import('./views/StudentList.vue') },
{ path: '/teach/view', component: () => import('./views/View.vue') }
]
}
......
......@@ -9,26 +9,21 @@ const listOptions = $computed(() => {
// remote: { httpRequest: getProList, params: { name: '' } },
filters: [
{ type: 'select', prop: 'course', label: '所属课程:', placeholder: '所属课程' },
{ type: 'select', prop: 'class', label: '所属班级:', placeholder: '所属班级' },
{ type: 'select', prop: 'name', label: '所属学生:', placeholder: '所属学生' },
{ type: 'input', prop: 'exam_name', label: '考试名称:', placeholder: '考试名称' },
{ type: 'input', prop: 'paper_name', label: '试卷名称:', placeholder: '试卷名称' }
],
columns: [
{ label: '序号', type: 'index', align: 'center' },
{ label: '所属课程', prop: 'course', align: 'center' },
{ label: '所属班级', prop: 'class', align: 'center' },
{ label: '学生姓名', prop: 'name', align: 'center' },
{ label: '考试名称', prop: 'exam_name', align: 'center' },
{ label: '试卷用途', prop: 'use', align: 'center' },
{ label: '组卷模式', prop: 'class', align: 'center' },
{ label: '试卷名称', prop: 'paper_name', align: 'center' },
{ label: '得分', prop: 'score', align: 'center' },
{ label: '是否批改', prop: 'correct', align: 'center' },
{ label: '更新时间', prop: 'update_time', align: 'center' },
{ label: '总分', prop: 'score', align: 'center' },
{ label: '及格分数', prop: 'correct', align: 'center' },
{ label: '操作', slots: 'table-operate', align: 'center' }
],
data: [
{
name: 111,
course: 111,
exam_id: '6952903190949920768',
student_id: '6953256575158976512'
}
......@@ -37,7 +32,7 @@ const listOptions = $computed(() => {
})
const handleCheckPaper = (row: any) => {
console.log(row)
router.push({ path: '/teach/view', query: { eid: row.exam_id, sid: row.student_id } })
router.push({ path: '/teach/stuList', query: { eid: row.exam_id } })
}
</script>
......
<script setup lang="ts">
// import { getProList } from '../api'
// import { useMapStore } from '@/stores/map'
// const store = useMapStore()
const router = useRouter()
const appList = ref()
const listOptions = $computed(() => {
return {
// remote: { httpRequest: getProList, params: { name: '' } },
filters: [
{ type: 'input', prop: 'class', label: '所属班级:', placeholder: '所属班级' },
{ type: 'input', prop: 'name', label: '所属学生:', placeholder: '所属学生' }
],
columns: [
{ label: '序号', type: 'index', align: 'center' },
{ label: '所属课程', prop: 'course', align: 'center' },
{ label: '所属班级', prop: 'class', align: 'center' },
{ label: '学生姓名', prop: 'name', align: 'center' },
{ label: '试卷名称', prop: 'paper_name', align: 'center' },
{ label: '得分', prop: 'score', align: 'center' },
{ label: '是否批改', prop: 'correct', align: 'center' },
{ label: '更新时间', prop: 'update_time', align: 'center' },
{ label: '操作', slots: 'table-operate', align: 'center' }
],
data: [
{
name: 111,
exam_id: '6952903190949920768',
student_id: '6953256575158976512'
}
]
}
})
const handleCheckPaper = (row: any) => {
console.log(row)
router.push({ path: '/teach/view', query: { eid: row.exam_id, sid: row.student_id } })
}
</script>
<template>
<AppCard title="批改试卷">
<AppList v-bind="listOptions" ref="appList" border stripe>
<template #table-operate="{ row }">
<el-space>
<el-link type="primary" plain @click="handleCheckPaper(row)">批改试卷</el-link>
</el-space>
</template>
</AppList>
</AppCard>
</template>
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论