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