|
|
|
@ -42,8 +42,8 @@
|
|
|
|
|
<el-dialog title="请填写以下申请信息" :visible.sync="formDialog" :close-on-click-modal="false">
|
|
|
|
|
|
|
|
|
|
<el-form :model="form" :inline="true" label-width="100px" ref="courseForm">
|
|
|
|
|
<el-form-item label="课程名称" prop="course_name"
|
|
|
|
|
:rules="[{ required: true, message: '请选择课程', trigger: 'blur' }]">
|
|
|
|
|
<el-form-item label="课程名称" prop="ucId"
|
|
|
|
|
:rules="[{ required: true, message: '请选择课程', trigger: 'change' }]">
|
|
|
|
|
<el-select v-model="form.ucId" @change="selectChange">
|
|
|
|
|
<el-option v-for="item in courseOption" :key="item.ucId" :label="item.name"
|
|
|
|
|
:value="item.ucId"></el-option>
|
|
|
|
@ -171,16 +171,16 @@
|
|
|
|
|
resolve('打开了weekDialog')
|
|
|
|
|
}).then((res) => {
|
|
|
|
|
// console.log(this.$refs.weekSelection)
|
|
|
|
|
var position = this.form.position
|
|
|
|
|
var rowIndex = row.index
|
|
|
|
|
var columnIndex = column.index
|
|
|
|
|
var selectedWeeks = get('', {position, rowIndex, columnIndex}) //发送给实验室的地址,rowIndex,columIndex返回该格子的周数信息:数组
|
|
|
|
|
selectedWeeks = [1, 2, 3]
|
|
|
|
|
this.$refs.weekSelection.disableList = selectedWeeks
|
|
|
|
|
this.$refs.weekSelection.singleVal = this.$refs.weekSelection.singleVal.filter(x => !selectedWeeks.includes(x))
|
|
|
|
|
this.$refs.weekSelection.doubleVal = this.$refs.weekSelection.doubleVal.filter(x => !selectedWeeks.includes(x))
|
|
|
|
|
this.$refs.weekSelection.allVal = this.$refs.weekSelection.allVal.filter(x => !selectedWeeks.includes(x))
|
|
|
|
|
console.log('aa', this.$refs.weekSelection.singleVal)
|
|
|
|
|
// var position = this.form.position
|
|
|
|
|
// var rowIndex = row.index
|
|
|
|
|
// var columnIndex = column.index
|
|
|
|
|
// var selectedWeeks = get('', {position, rowIndex, columnIndex}) //发送给实验室的地址,rowIndex,columIndex返回该格子的周数信息:数组
|
|
|
|
|
// selectedWeeks = [1, 2, 3]
|
|
|
|
|
// this.$refs.weekSelection.disableList = selectedWeeks
|
|
|
|
|
// this.$refs.weekSelection.singleVal = this.$refs.weekSelection.singleVal.filter(x => !selectedWeeks.includes(x))
|
|
|
|
|
// this.$refs.weekSelection.doubleVal = this.$refs.weekSelection.doubleVal.filter(x => !selectedWeeks.includes(x))
|
|
|
|
|
// this.$refs.weekSelection.allVal = this.$refs.weekSelection.allVal.filter(x => !selectedWeeks.includes(x))
|
|
|
|
|
// console.log('aa', this.$refs.weekSelection.singleVal)
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
},
|
|
|
|
@ -209,12 +209,19 @@
|
|
|
|
|
let course = await get("lb/usercourse/findusercourse/" + uc_id)
|
|
|
|
|
this.form.class = course.classes
|
|
|
|
|
this.form.population = course.population
|
|
|
|
|
this.form.uc_id = uc_id
|
|
|
|
|
},
|
|
|
|
|
//添加已选择的的周数
|
|
|
|
|
async addWeek() {
|
|
|
|
|
this.weekDialog = false
|
|
|
|
|
var targetValue = this.$refs.weekSelection.checkedValue
|
|
|
|
|
await showDialog("确认设置此时间段吗?", this)
|
|
|
|
|
const targetValue = this.$refs.weekSelection.checkedValue
|
|
|
|
|
this.form.weeks = targetValue
|
|
|
|
|
//提交
|
|
|
|
|
await showDialog("确认预约此时间段吗?", this)
|
|
|
|
|
await post('lb/labrecord/updateWeeks', this.form)
|
|
|
|
|
await showSuccess("预约成功,管理员正在审核",this)
|
|
|
|
|
this.form.weeks = []
|
|
|
|
|
|
|
|
|
|
if (targetValue.length !== 0) {
|
|
|
|
|
this.perTargetValue.textContent = '【' + targetValue + '】周'
|
|
|
|
|
this.aWeekValue.push(targetValue) //单个节数时间段添加完成,包括[rowIndex,column,targetValue]
|
|
|
|
@ -231,9 +238,6 @@
|
|
|
|
|
this.aWeekValue = []
|
|
|
|
|
this.$refs.weekSelection.checkedValue = [] //将周数选择器已选择选项置空
|
|
|
|
|
// console.log(this.allWeeksValue)
|
|
|
|
|
|
|
|
|
|
//提交
|
|
|
|
|
await post('lb/labRecord/updateWeeks', this.form);
|
|
|
|
|
},
|
|
|
|
|
//取消一个格子已选择这些周数
|
|
|
|
|
async cancelSelection() {
|
|
|
|
@ -253,28 +257,28 @@
|
|
|
|
|
this.weekDialog = false
|
|
|
|
|
},
|
|
|
|
|
//确定所有已选择的周数
|
|
|
|
|
async setWeeks() {
|
|
|
|
|
console.log(this.allWeeksValue)
|
|
|
|
|
await post('/lb_teacher_applyLab', {
|
|
|
|
|
weeks: this.allWeeksValue,
|
|
|
|
|
year: this.$refs.timeSelection.year,
|
|
|
|
|
semester: this.$refs.timeSelection.semester,
|
|
|
|
|
position: this.form.position,
|
|
|
|
|
name: this.form.name,
|
|
|
|
|
date: this.form.date,
|
|
|
|
|
nickname: this.form.nickname,
|
|
|
|
|
tel: this.form.tel,
|
|
|
|
|
course_name: this.form.course_name,
|
|
|
|
|
class: this.form.class,
|
|
|
|
|
population: this.form.population,
|
|
|
|
|
remind: this.form.remind
|
|
|
|
|
})
|
|
|
|
|
// this.form.schedule=this.allWeeksValue.toString()
|
|
|
|
|
this.courseDialog = false
|
|
|
|
|
// console.log(this.$refs.times)
|
|
|
|
|
this.tableAlive = false
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
// async setWeeks() {
|
|
|
|
|
// console.log(this.allWeeksValue)
|
|
|
|
|
// await post('/lb_teacher_applyLab', {
|
|
|
|
|
// weeks: this.allWeeksValue,
|
|
|
|
|
// year: this.$refs.timeSelection.year,
|
|
|
|
|
// semester: this.$refs.timeSelection.semester,
|
|
|
|
|
// position: this.form.position,
|
|
|
|
|
// name: this.form.name,
|
|
|
|
|
// date: this.form.date,
|
|
|
|
|
// nickname: this.form.nickname,
|
|
|
|
|
// tel: this.form.tel,
|
|
|
|
|
// course_name: this.form.course_name,
|
|
|
|
|
// class: this.form.class,
|
|
|
|
|
// population: this.form.population,
|
|
|
|
|
// remind: this.form.remind
|
|
|
|
|
// })
|
|
|
|
|
// // this.form.schedule=this.allWeeksValue.toString()
|
|
|
|
|
// this.courseDialog = false
|
|
|
|
|
// // console.log(this.$refs.times)
|
|
|
|
|
// this.tableAlive = false
|
|
|
|
|
//
|
|
|
|
|
// },
|
|
|
|
|
//取消所有已选择的周数
|
|
|
|
|
cancelSetWeeks: function () {
|
|
|
|
|
this.allWeeksValue = []
|
|
|
|
@ -286,14 +290,14 @@
|
|
|
|
|
},
|
|
|
|
|
setTime: function () {
|
|
|
|
|
this.tableAlive = true
|
|
|
|
|
alert('这里本来要验证的,为了方便查看表格,暂无设置,需要验证请把代码行注释解除掉')
|
|
|
|
|
this.courseDialog = true
|
|
|
|
|
// this.$refs.courseForm.validate(()=>{
|
|
|
|
|
// if (vailid){
|
|
|
|
|
// this.courseDialog=true
|
|
|
|
|
// }
|
|
|
|
|
// })
|
|
|
|
|
this.formDialog = false
|
|
|
|
|
// alert('这里本来要验证的,为了方便查看表格,暂无设置,需要验证请把代码行注释解除掉')
|
|
|
|
|
// this.courseDialog = true
|
|
|
|
|
this.$refs.courseForm.validate((valid)=>{
|
|
|
|
|
if (valid){
|
|
|
|
|
this.courseDialog=true
|
|
|
|
|
this.formDialog = false
|
|
|
|
|
}
|
|
|
|
|
})
|
|
|
|
|
},
|
|
|
|
|
cancelAppy: function () {
|
|
|
|
|
this.formDialog = false
|
|
|
|
|