大纲
This commit is contained in:
@@ -48,10 +48,11 @@ export function getSyllabus(bh) {
|
||||
})
|
||||
}
|
||||
|
||||
// 列表查询(返回全部,前端本地过滤+分页)
|
||||
export function listSyllabus() {
|
||||
// 根据专业代号和停用标识查询
|
||||
export function listByZydhAndTy(query) {
|
||||
return request({
|
||||
url: '/zyjxjhb/list',
|
||||
method: 'get'
|
||||
url: '/zyjxjhb/listByZydhAndTy',
|
||||
method: 'get',
|
||||
params: query
|
||||
})
|
||||
}
|
||||
|
||||
@@ -288,7 +288,7 @@ import {
|
||||
deleteSyllabus,
|
||||
batchDeleteSyllabus,
|
||||
updateSyllabus,
|
||||
listSyllabus
|
||||
listByZydhAndTy
|
||||
} from '@/api/teachBusiness/syllabus'
|
||||
import { listMajor } from '@/api/subjectMajor/major'
|
||||
import { listKb } from '@/api/teachOffice/kb'
|
||||
@@ -393,14 +393,9 @@ export default {
|
||||
/* ---------- 列表加载 ---------- */
|
||||
fetchList() {
|
||||
this.loading = true
|
||||
listSyllabus().then(response => {
|
||||
listByZydhAndTy({ zydh: this.searchForm.zydh, ty: this.searchForm.ty }).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.tableData = Array.isArray(data) ? data : (data.records || [])
|
||||
this.total = this.tableData.length
|
||||
this.localPaging = true
|
||||
}).catch(() => {
|
||||
|
||||
Reference in New Issue
Block a user