提交 30348525 authored 作者: matian's avatar matian

bug fixes

上级 f11222ef
...@@ -34,27 +34,38 @@ const listOptions = $computed(() => { ...@@ -34,27 +34,38 @@ const listOptions = $computed(() => {
title: '', title: '',
name: '' name: ''
}, },
beforeRequest(params: any) { beforeRequest(params: any, isReset: boolean) {
params.organ_id = organ_id.value params.organ_id = organ_id.value
params.semester_id = semester_id.value params.semester_id = semester_id.value
params.course_id = course_id.value params.course_id = course_id.value
params.chapter_id = chapter_id.value params.chapter_id = chapter_id.value
params.class_id = class_id.value params.class_id = class_id.value
if (isReset) {
organ_id.value = ''
semester_id.value = ''
course_id.value = ''
chapter_id.value = ''
class_id.value = ''
semesterList.value = []
classList.value = []
courseList.value = []
chapterList.value = []
}
return params return params
}, },
httpRequest: getPostsList httpRequest: getPostsList
}, },
filters: [ filters: [
{ type: 'select', label: '所属部门/学校:', prop: 'organ_id', slots: 'filter-department' }, { type: 'select', prop: 'organ_id', slots: 'filter-department' },
{ type: 'select', label: '所属学期:', prop: 'semester_id', slots: 'filter-semester' }, { type: 'select', prop: 'semester_id', slots: 'filter-semester' },
{ type: 'select', label: '所属班级:', prop: 'class_id', slots: 'filter-class' }, { type: 'select', prop: 'class_id', slots: 'filter-class' },
{ type: 'select', label: '所属课程:', prop: 'course_id', slots: 'filter-course' }, { type: 'select', prop: 'course_id', slots: 'filter-course' },
{ type: 'select', label: '所属章节:', prop: 'chapter_id', slots: 'filter-chapter' }, { type: 'select', prop: 'chapter_id', slots: 'filter-chapter' },
{ {
type: 'select', type: 'select',
prop: 'type', prop: 'type',
label: '帖子类型:', label: '帖子类型',
placeholder: '帖子类型', placeholder: '帖子类型',
options: store.getMapValuesByKey('learning_discussion_type'), options: store.getMapValuesByKey('learning_discussion_type'),
labelKey: 'label', labelKey: 'label',
...@@ -63,7 +74,7 @@ const listOptions = $computed(() => { ...@@ -63,7 +74,7 @@ const listOptions = $computed(() => {
{ {
type: 'select', type: 'select',
prop: 'is_top', prop: 'is_top',
label: '是否置顶:', label: '是否置顶',
placeholder: '是否置顶', placeholder: '是否置顶',
options: [ options: [
{ label: '是', value: '1' }, { label: '是', value: '1' },
...@@ -251,11 +262,13 @@ const handleReply = (row: any) => { ...@@ -251,11 +262,13 @@ const handleReply = (row: any) => {
>新建帖子</el-button >新建帖子</el-button
> >
<template #filter-department> <template #filter-department>
<div class="name" style="font-size: 14px; color: #606266; padding-right: 12px">所属部门/学校:</div>
<el-select @change="handleChangeOrgan" clearable v-model="organ_id" placeholder="请选择所属部门/学校"> <el-select @change="handleChangeOrgan" clearable v-model="organ_id" placeholder="请选择所属部门/学校">
<el-option v-for="item in departmentList" :key="item.id" :label="item.name" :value="item.id" /> <el-option v-for="item in departmentList" :key="item.id" :label="item.name" :value="item.id" />
</el-select> </el-select>
</template> </template>
<template #filter-semester> <template #filter-semester>
<div class="name" style="font-size: 14px; color: #606266; padding-right: 12px">所属学期:</div>
<el-select <el-select
@change="handleChangeSemester" @change="handleChangeSemester"
clearable clearable
...@@ -267,6 +280,7 @@ const handleReply = (row: any) => { ...@@ -267,6 +280,7 @@ const handleReply = (row: any) => {
</el-select> </el-select>
</template> </template>
<template #filter-class> <template #filter-class>
<div class="name" style="font-size: 14px; color: #606266; padding-right: 12px">所属班级:</div>
<el-select <el-select
@change="handleChangeClass" @change="handleChangeClass"
clearable clearable
...@@ -278,6 +292,7 @@ const handleReply = (row: any) => { ...@@ -278,6 +292,7 @@ const handleReply = (row: any) => {
</el-select> </el-select>
</template> </template>
<template #filter-course> <template #filter-course>
<div class="name" style="font-size: 14px; color: #606266; padding-right: 12px">所属课程:</div>
<el-select <el-select
@change="handleChangeCourse" @change="handleChangeCourse"
clearable clearable
...@@ -289,6 +304,7 @@ const handleReply = (row: any) => { ...@@ -289,6 +304,7 @@ const handleReply = (row: any) => {
</el-select> </el-select>
</template> </template>
<template #filter-chapter> <template #filter-chapter>
<div class="name" style="font-size: 14px; color: #606266; padding-right: 12px">所属章节:</div>
<el-select <el-select
@change="handleRefresh" @change="handleRefresh"
clearable clearable
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论