master
lion 3 months ago
parent 0258d29d07
commit 78b1363942

@ -41,8 +41,18 @@
</el-option> </el-option>
</el-select> </el-select>
</div> </div>
<div> <div style="width: 200px;">
<el-input v-model="select.course_name" placeholder="请输入课程名称"></el-input> <el-select filterable allow-create clearable
v-model="select.course_name"
placeholder="请输入或选择课程名称"
style="width: 100%;">
<el-option
v-for="item in courseOptions"
:key="item.id"
:label="item.name"
:value="item.name">
</el-option>
</el-select>
</div> </div>
<div> <div>
@ -395,6 +405,9 @@
import { import {
index as indexTypes index as indexTypes
} from "@/api/course/courseType.js" } from "@/api/course/courseType.js"
import {
index as courseIndex
} from "@/api/course/index.js"
import { import {
download download
} from "@/utils/downloadRequest"; } from "@/utils/downloadRequest";
@ -501,6 +514,7 @@
// //
batchUpdateVisible: false, batchUpdateVisible: false,
courseTypeList: [], courseTypeList: [],
courseOptions: [],
list: [], list: [],
total: 0, total: 0,
year_total: 0, year_total: 0,
@ -656,6 +670,7 @@
} }
this.getList() this.getList()
this.getCourseType() this.getCourseType()
this.getCourseList()
}, },
methods: { methods: {
changeSelectType(e, selectName) { changeSelectType(e, selectName) {
@ -829,6 +844,7 @@
this.select.is_rencai = '' this.select.is_rencai = ''
this.select.address = '' this.select.address = ''
this.select.page = 1 this.select.page = 1
this.getCourseList()
this.getList() this.getList()
}, },
async getList() { async getList() {
@ -1010,6 +1026,27 @@
}) })
this.courseTypeList = res.data this.courseTypeList = res.data
}, },
async getCourseList() {
try {
const res = await courseIndex({
page: 1,
page_size: 999,
filter: [{
key: 'type',
op: 'eq',
value: this.select.course_type || ''
}]
})
if (res && res.data) {
this.courseOptions = res.data
} else {
this.courseOptions = []
}
} catch (error) {
console.error('获取课程列表失败:', error)
this.courseOptions = []
}
},
// //
openBatchUpdateModal() { openBatchUpdateModal() {
if (this.seleSchoolmates.length > 0) { if (this.seleSchoolmates.length > 0) {
@ -1037,6 +1074,10 @@
this.training_total = 0 this.training_total = 0
this.searyear = '' this.searyear = ''
} }
},
'select.course_type'() {
this.getCourseList()
this.select.course_name = ''
} }
} }
} }

@ -28,9 +28,9 @@ module.exports = {
*/ */
publicPath: process.env.ENV === 'staging' ? '/admin' : '/admin', publicPath: process.env.ENV === 'staging' ? '/admin' : '/admin',
// 测试 // 测试
outputDir: '/Users/mac/Documents/朗业/2025/s-苏州科技商学院/wx.sstbc.com/public/admin', // outputDir: '/Users/mac/Documents/朗业/2025/s-苏州科技商学院/wx.sstbc.com/public/admin',
// 正式 // 正式
// outputDir: '/Users/mac/Documents/朗业/2024/s-苏州科技商学院/wx.sstbc.com/public/admin', outputDir: '/Users/mac/Documents/朗业/2024/s-苏州科技商学院/wx.sstbc.com/public/admin',
assetsDir: 'static', assetsDir: 'static',
css: { css: {
loaderOptions: { // 向 CSS 相关的 loader 传递选项 loaderOptions: { // 向 CSS 相关的 loader 传递选项

Loading…
Cancel
Save