教研室管理

This commit is contained in:
2026-08-27 10:42:49 +08:00
parent 90e03e1faf
commit ffdcfaa350
2 changed files with 14 additions and 25 deletions
@@ -393,26 +393,16 @@ export default {
/* ---------- 列表加载 ---------- */
fetchList() {
this.loading = true
const query = {
pageNum: this.pageNum,
pageSize: this.pageSize,
ty: this.searchForm.ty
}
if (this.searchForm.zydh) {
query.zydh = this.searchForm.zydh
}
listSyllabus(query).then(response => {
const data = response.data
if (Array.isArray(data)) {
this.tableData = data
this.total = data.length
this.localPaging = true
} else {
const pageData = data || {}
this.tableData = pageData.records || []
this.total = pageData.total || 0
this.localPaging = false
}
listSyllabus().then(response => {
const data = response.data || []
const list = Array.isArray(data) ? data : (data.records || [])
this.tableData = list.filter(row => {
const matchZydh = !this.searchForm.zydh || row.zydh === this.searchForm.zydh
const matchTy = String(row.ty) === String(this.searchForm.ty)
return matchZydh && matchTy
})
this.total = this.tableData.length
this.localPaging = true
}).catch(() => {
this.tableData = []
this.total = 0