完善申请实验室页面

master
aiyadc 5 years ago
parent 9dde8ed89b
commit 48a7b16e2c

@ -55,7 +55,7 @@
// var weeks=[6,7,8]
// for (let i=0;i<weeks.length;i++){
// console.log(weeks[i])
// this.$refs.checkBox.$children[weeks[i]-1].disabled=true
// thisgi.$refs.checkBox.$children[weeks[i]-1].disabled=true
// }
}

@ -43,7 +43,7 @@
<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-select v-model="form.course_name">
<el-select v-model="form.course_name" @change="selectChange">
<el-option v-for="item in courseOption" :key="item.uc_id" :label="item.name" :value="item.uc_id"></el-option>
</el-select>
</el-form-item>
@ -73,18 +73,17 @@
<el-form-item label="备注" prop="remind"><el-input v-model="form.remind" placeholder="请输入备注"></el-input></el-form-item>
</el-form>
<div slot="footer">
<el-button type="primary" @click="sendApply"></el-button>
<el-button type="primary" @click="setTime"></el-button>
<el-button @click="cancelAppy"></el-button>
</div>
</el-dialog>
<!-- 表格节数选择-->
<el-dialog :visible.sync="courseDialog" append-to-body :close-on-click-modal="false">
<el-dialog :visible.sync="courseDialog" append-to-body :close-on-click-modal="false" v-if="tableAlive" >
<tb_course :cClick="cellClick" :cStyle="cellStyle" table-label="" ref="times"></tb_course>
<span slot="footer" class="dialog-footer">
<el-button @click="cancelSetWeeks"> </el-button>
<el-button type="primary" @click="setWeeks"> </el-button>
</span>
<div><p style="color: deeppink" v-html="tips"></p></div>
</el-dialog>
<!-- checkbox:周次选择-->
<el-dialog :visible.sync="weekDialog" title="请选择周数" width="400px" :close-on-click-modal="false" >
@ -117,6 +116,7 @@
user:{},
lab:{},
tableAlive:false, //
tableData:[{}],
checkOption :[],
@ -128,7 +128,6 @@
aWeekValue:[],
allWeeksValue:[],
tips:"已添加时间段:",
form:{
position:'',
name:'',
@ -151,8 +150,6 @@
if (column.label!=''){
return 'cursor:pointer'
}
//绿
//isFull,forisFull绿
},
//
cellClick(row, column, cell, event) {
@ -173,7 +170,6 @@
// console.log(column.index)
if (column.label!='') {
this.tips=""
this.weekDialog=true
this.perTargetValue=event.target //targettarget
}
@ -181,6 +177,18 @@
//
clickLabApply(row){
this.lab=row
this.form={
position:'',
name:'',
date: '',
nickname:'',
tel:'',
course_name:'',
class:'',
population:'',
schedule:'',
remind:'无'
}
this.formDialog=true
},
@ -190,8 +198,8 @@
},
//
selectChange(){
console.log('aaaaaa')
var d=new Date()
// this.form.position= this.lab.position //
// this.form.name= this.lab.name //
this.form.date=d.getFullYear()+'/'+(d.getMonth()+1)+'/'+d.getDate() //
@ -217,14 +225,8 @@
}
}
}
for (let k=0;k<this.allWeeksValue.length;k++){
// console.log(this.allWeeksValue[k][2])
if (this.allWeeksValue[k][2]!==[]){
this.tips+='星期'+this.allWeeksValue[k][1]+'、第'+this.allWeeksValue[k][0]+'节、所选周数'+this.allWeeksValue[k][2]+";"+'</br>'
}
}
}
}
this.aWeekValue=[]
this.$refs.weekSelection.checkedValue=[] //
// console.log(this.allWeeksValue)
@ -239,17 +241,6 @@
}
}
this.aWeekValue=[]
//
if(this.allWeeksValue.length!==0){
for (let k=0;k<this.allWeeksValue.length;k++){
if (this.allWeeksValue[k][2]!==[]){
this.tips='星期'+this.allWeeksValue[k][1]+'、第'+this.allWeeksValue[k][0]+'节、所选周数'+this.allWeeksValue[k][2]+';'+'</br>'
}
}
}else {
this.tips='已添加周数:无'
}
this.perTargetValue.style.backgroundColor=''
this.perTargetValue.textContent=''
//allWeeksValue
@ -259,13 +250,13 @@
this.weekDialog=false
},
//
setWeeks:function () {
async setWeeks () {
console.log(this.allWeeksValue)
post('/lb_teacher_applyLab',{
await post('/lb_teacher_applyLab',{
weeks:this.allWeeksValue,
year:this.$refs.timeSelection.year,
semester:this.$refs.timeSelection.semester,
position:this.from.position,
position:this.form.position,
name:this.form.name,
date: this.form.date,
nickname:this.form.nickname,
@ -277,20 +268,21 @@
})
// this.form.schedule=this.allWeeksValue.toString()
this.courseDialog=false
this.tips='已添加时间段'
// console.log(this.$refs.times)
this.tableAlive=false
},
//
cancelSetWeeks:function () {
this.allWeeksValue=[]
this.form.schedule=""
this.tips='已添加时间段'
this.courseDialog=false
this.formDialog=true
console.log(this.allWeeksValue)
this.tableAlive=false //
},
sendApply:function () {
setTime:function () {
this.tableAlive=true
alert('这里本来要验证的,为了方便查看表格,暂无设置,需要验证请把代码行注释解除掉')
this.courseDialog=true
// this.$refs.courseForm.validate(()=>{

Loading…
Cancel
Save