From ffdcfaa350559b54c078ea08c93fa6e286523b39 Mon Sep 17 00:00:00 2001 From: zhaichao Date: Thu, 27 Aug 2026 10:42:49 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=99=E7=A0=94=E5=AE=A4=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/src/api/teachBusiness/syllabus.js | 9 +++--- .../views/teachBusiness/syllabus/index.vue | 30 +++++++------------ 2 files changed, 14 insertions(+), 25 deletions(-) diff --git a/frontend/src/api/teachBusiness/syllabus.js b/frontend/src/api/teachBusiness/syllabus.js index e7d96cce..b0855c4c 100644 --- a/frontend/src/api/teachBusiness/syllabus.js +++ b/frontend/src/api/teachBusiness/syllabus.js @@ -48,11 +48,10 @@ export function getSyllabus(bh) { }) } -// 列表查询(支持 zydh、ty 及分页参数) -export function listSyllabus(query) { +// 列表查询(返回全部,前端本地过滤+分页) +export function listSyllabus() { return request({ - url: '/zyjxjhb/listByZydhAndTy', - method: 'get', - params: query + url: '/zyjxjhb/list', + method: 'get' }) } diff --git a/frontend/src/views/teachBusiness/syllabus/index.vue b/frontend/src/views/teachBusiness/syllabus/index.vue index a773c308..6187c69f 100644 --- a/frontend/src/views/teachBusiness/syllabus/index.vue +++ b/frontend/src/views/teachBusiness/syllabus/index.vue @@ -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