筛选优化
This commit is contained in:
1 parent
ccdfe977ba
commit
0ce758191e
7 files changed
+119
-6
No files matched your search
@@ -36,6 +36,8 @@ const returnDialog = ref(false)
|
||||
const termId = ref<string | undefined>()
|
||||
const status = ref<string | undefined>()
|
||||
const taskKeyword = ref('')
|
||||
const teacherKeyword = ref('')
|
||||
const classKeyword = ref('')
|
||||
const taskPage = ref(1)
|
||||
const taskPageSize = 12
|
||||
const taskTotal = ref(0)
|
||||
@@ -149,6 +151,8 @@ async function load(resetPage = false) {
|
||||
academicTermId: termId.value,
|
||||
status: status.value,
|
||||
keyword: taskKeyword.value.trim() || undefined,
|
||||
teacherKeyword: teacherKeyword.value.trim() || undefined,
|
||||
classKeyword: classKeyword.value.trim() || undefined,
|
||||
page: taskPage.value,
|
||||
pageSize: taskPageSize,
|
||||
},
|
||||
@@ -212,6 +216,15 @@ async function changeTaskPage(page: number) {
|
||||
await load()
|
||||
}
|
||||
|
||||
function resetTaskFilters() {
|
||||
taskKeyword.value = ''
|
||||
teacherKeyword.value = ''
|
||||
classKeyword.value = ''
|
||||
status.value = undefined
|
||||
termId.value = defaultAcademicTermId(terms.value)
|
||||
load(true)
|
||||
}
|
||||
|
||||
async function searchRecords() {
|
||||
recordPage.value = 1
|
||||
await loadDetail()
|
||||
@@ -522,7 +535,10 @@ onMounted(async () => {
|
||||
<el-select v-model="status" clearable placeholder="全部状态" @change="load(true)">
|
||||
<el-option v-for="(label, value) in statusLabels" :key="value" :label="label" :value="value" />
|
||||
</el-select>
|
||||
<el-input v-model="teacherKeyword" clearable :prefix-icon="Search" placeholder="任课教师姓名或工号" @keyup.enter="load(true)" @clear="load(true)" />
|
||||
<el-input v-model="classKeyword" clearable :prefix-icon="Search" placeholder="行政班、专业或班级代码" @keyup.enter="load(true)" @clear="load(true)" />
|
||||
<el-button :icon="Search" @click="load(true)">查询</el-button>
|
||||
<el-button :icon="Refresh" @click="resetTaskFilters">重置</el-button>
|
||||
<span>共 {{ taskTotal }} 个可管理教学班</span>
|
||||
</section>
|
||||
|
||||
@@ -880,7 +896,8 @@ onMounted(async () => {
|
||||
.experiment-import .el-select { width: 165px; }
|
||||
.item-score-readonly { display: inline-flex; flex-direction: column; align-items: center; line-height: 1.1; }
|
||||
.item-score-readonly small { margin-top: 3px; color: #2d8975; font-size: 10px; font-weight: 650; }
|
||||
.grade-toolbar > .el-input { width: min(320px, 100%); }
|
||||
.grade-toolbar { flex-wrap: wrap; }
|
||||
.grade-toolbar > .el-input { width: min(260px, 100%); }
|
||||
.grade-task-pagination { justify-content: center; padding: 14px 8px; border-top: 1px solid var(--line); }
|
||||
.grade-record-toolbar {
|
||||
display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
|
||||
|
||||
Reference in new issue
Block a user