|
|
@ -17,7 +17,7 @@
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
<el-table :data="tableDataComputed" border>
|
|
|
|
<el-table :data="tableDataComputed" border>
|
|
|
|
<el-table-column type="selection" width="55"></el-table-column>
|
|
|
|
<el-table-column type="selection" width="55"></el-table-column>
|
|
|
|
<el-table-column label="课程编号" prop="uc_id"></el-table-column>
|
|
|
|
<el-table-column label="课程编号" prop="ucId"></el-table-column>
|
|
|
|
<el-table-column label="课程名称" prop="name"></el-table-column>
|
|
|
|
<el-table-column label="课程名称" prop="name"></el-table-column>
|
|
|
|
<el-table-column label="软件名称" prop="software"></el-table-column>
|
|
|
|
<el-table-column label="软件名称" prop="software"></el-table-column>
|
|
|
|
<el-table-column label="授课班级" prop="classes"></el-table-column>
|
|
|
|
<el-table-column label="授课班级" prop="classes"></el-table-column>
|
|
|
@ -135,25 +135,25 @@
|
|
|
|
},
|
|
|
|
},
|
|
|
|
selectOptions1: [
|
|
|
|
selectOptions1: [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
value: '1718',
|
|
|
|
value: '2017',
|
|
|
|
label: '2017-2018年'
|
|
|
|
label: '2017-2018年'
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
value: '1819',
|
|
|
|
value: '2018',
|
|
|
|
label: '2018-2019年'
|
|
|
|
label: '2018-2019年'
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
value: '1920',
|
|
|
|
value: '2019',
|
|
|
|
label: '2019-2020年'
|
|
|
|
label: '2019-2020年'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
],
|
|
|
|
selectOptions2: [
|
|
|
|
selectOptions2: [
|
|
|
|
{
|
|
|
|
{
|
|
|
|
value: '1',
|
|
|
|
value: 1,
|
|
|
|
label: '第一学期'
|
|
|
|
label: '第一学期'
|
|
|
|
},
|
|
|
|
},
|
|
|
|
{
|
|
|
|
{
|
|
|
|
value: '2',
|
|
|
|
value: 2,
|
|
|
|
label: '第二学期'
|
|
|
|
label: '第二学期'
|
|
|
|
}
|
|
|
|
}
|
|
|
|
],
|
|
|
|
],
|
|
|
@ -162,7 +162,7 @@
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
//加载表格数据
|
|
|
|
//加载表格数据
|
|
|
|
async load() {
|
|
|
|
async load() {
|
|
|
|
this.tableData = await get('lb/course/courseManagement')
|
|
|
|
this.tableData = await get('lb/usercourse/findbyyearandsemester/'+this.$refs.timeSelect.year+'/'+this.$refs.timeSelect.semester)
|
|
|
|
},
|
|
|
|
},
|
|
|
|
//添加课程
|
|
|
|
//添加课程
|
|
|
|
addCourse() {
|
|
|
|
addCourse() {
|
|
|
@ -178,11 +178,9 @@
|
|
|
|
this.courseForm = rowData
|
|
|
|
this.courseForm = rowData
|
|
|
|
},
|
|
|
|
},
|
|
|
|
//删除课程
|
|
|
|
//删除课程
|
|
|
|
deleteCourse(rowData) {
|
|
|
|
async deleteCourse(rowData) {
|
|
|
|
showDialog("确认要删除吗?", this)
|
|
|
|
await showDialog("确认要删除吗?", this)
|
|
|
|
post('lb/user/deleteCourse', {
|
|
|
|
post('lb/usercourse/deleteusercourse/'+rowData.ucId).then(() => {
|
|
|
|
uid: rowData.uc_id
|
|
|
|
|
|
|
|
}).then(() => {
|
|
|
|
|
|
|
|
showSuccess("删除成功", this)
|
|
|
|
showSuccess("删除成功", this)
|
|
|
|
this.load()
|
|
|
|
this.load()
|
|
|
|
}).catch(e => {
|
|
|
|
}).catch(e => {
|
|
|
@ -198,14 +196,14 @@
|
|
|
|
await showDialog("确定要" + (this.edit ? '编辑' : '新增') + '吗?', this)
|
|
|
|
await showDialog("确定要" + (this.edit ? '编辑' : '新增') + '吗?', this)
|
|
|
|
//编辑提交
|
|
|
|
//编辑提交
|
|
|
|
if (this.edit) {
|
|
|
|
if (this.edit) {
|
|
|
|
await post('lb/usercourse/updatecourse', {
|
|
|
|
await post('lb/usercourse/updateusercourse', {
|
|
|
|
year: this.courseForm.year,
|
|
|
|
year: this.courseForm.year,
|
|
|
|
semester: this.courseForm.semester,
|
|
|
|
semester: this.courseForm.semester,
|
|
|
|
uc_id: this.courseForm.uc_id,
|
|
|
|
ucId: this.courseForm.ucId,
|
|
|
|
name: this.courseForm.name,
|
|
|
|
name: this.courseForm.name,
|
|
|
|
software: this.courseForm.software,
|
|
|
|
software: this.courseForm.software,
|
|
|
|
classes: this.courseForm.classes,
|
|
|
|
classes: this.courseForm.classes,
|
|
|
|
population: this.courseForm.population,
|
|
|
|
population: parseInt(this.courseForm.population),
|
|
|
|
remind: this.courseForm.remind,
|
|
|
|
remind: this.courseForm.remind,
|
|
|
|
isHaveDocuments: this.courseForm.isHaveDocuments
|
|
|
|
isHaveDocuments: this.courseForm.isHaveDocuments
|
|
|
|
}).catch(async e => {
|
|
|
|
}).catch(async e => {
|
|
|
@ -224,7 +222,7 @@
|
|
|
|
name: this.courseForm.name,
|
|
|
|
name: this.courseForm.name,
|
|
|
|
software: this.courseForm.software,
|
|
|
|
software: this.courseForm.software,
|
|
|
|
classes: this.courseForm.classes,
|
|
|
|
classes: this.courseForm.classes,
|
|
|
|
population: this.courseForm.population,
|
|
|
|
population: parseInt(this.courseForm.population),
|
|
|
|
remind: this.courseForm.remind,
|
|
|
|
remind: this.courseForm.remind,
|
|
|
|
isHaveDocuments: this.courseForm.isHaveDocuments
|
|
|
|
isHaveDocuments: this.courseForm.isHaveDocuments
|
|
|
|
}).catch(async e => {
|
|
|
|
}).catch(async e => {
|
|
|
@ -249,14 +247,9 @@
|
|
|
|
computed: {
|
|
|
|
computed: {
|
|
|
|
tableDataComputed() {
|
|
|
|
tableDataComputed() {
|
|
|
|
return this.tableData.filter(data => !this.search
|
|
|
|
return this.tableData.filter(data => !this.search
|
|
|
|
|| data.uc_id.toLowerCase().includes(this.search.toLowerCase())
|
|
|
|
|
|
|
|
|| data.u_id.toLowerCase().includes(this.search.toLowerCase())
|
|
|
|
|
|
|
|
|| data.name.toLowerCase().includes(this.search.toLowerCase())
|
|
|
|
|| data.name.toLowerCase().includes(this.search.toLowerCase())
|
|
|
|
|| data.software.toLowerCase().includes(this.search.toLowerCase())
|
|
|
|
|| data.software.toLowerCase().includes(this.search.toLowerCase())
|
|
|
|
|| data.classes.toLowerCase().includes(this.search.toLowerCase())
|
|
|
|
|| data.classes.toLowerCase().includes(this.search.toLowerCase())
|
|
|
|
|| data.population.toLowerCase().includes(this.search.toLowerCase())
|
|
|
|
|
|
|
|
|| data.remind.toLowerCase().includes(this.search.toLowerCase())
|
|
|
|
|
|
|
|
|| data.isHaveDocuments.toLowerCase().includes(this.search.toLowerCase())
|
|
|
|
|
|
|
|
)
|
|
|
|
)
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},
|
|
|
|
},
|
|
|
|