[fix][V]:完善课程表组件

master
Romesum 5 years ago
parent a0e8675db3
commit bef24e86ab

@ -33,7 +33,10 @@
<!-- 表格节数选择--> <!-- 表格节数选择-->
<el-dialog :visible.sync="courseDialog" append-to-body :close-on-click-modal="false"
:title="lab.position+' '+lab.name">
<tb_course :cClick="cellClick" :cStyle="cellStyle" table-label="" ref="times"></tb_course> <tb_course :cClick="cellClick" :cStyle="cellStyle" table-label="" ref="times"></tb_course>
</el-dialog>
<!-- checkbox:周次选择--> <!-- checkbox:周次选择-->
<el-dialog :visible.sync="weekDialog" title="请选择周数" width="400px" :close-on-click-modal="false" append-to-body> <el-dialog :visible.sync="weekDialog" title="请选择周数" width="400px" :close-on-click-modal="false" append-to-body>
<week-selection @add="addWeek" @cancel="cancelSelection" ref="weekSelection" <week-selection @add="addWeek" @cancel="cancelSelection" ref="weekSelection"
@ -102,9 +105,8 @@
methods: { methods: {
// //
async showCourseDialog() { async showCourseDialog() {
this.$refs.times.lab = this.lab
this.tableAlive = true this.tableAlive = true
this.$refs.times.courseDialog = true this.courseDialog = true
}, },
// //
cellStyle: function ({row, column, rowIndex, columnIndex}) { cellStyle: function ({row, column, rowIndex, columnIndex}) {
@ -186,7 +188,7 @@
console.log(this.$refs.times) console.log(this.$refs.times)
console.log(this.allWeeksValue) console.log(this.allWeeksValue)
// this.form.schedule=this.allWeeksValue.toString() // this.form.schedule=this.allWeeksValue.toString()
this.$refs.times.courseDialog = false this.courseDialog = false
// console.log(this.$refs.times) // console.log(this.$refs.times)
this.tableAlive = false this.tableAlive = false
if (this.allWeeksValue.length !== 0) { if (this.allWeeksValue.length !== 0) {
@ -198,7 +200,7 @@
cancelSetWeeks: function () { cancelSetWeeks: function () {
this.allWeeksValue = [] this.allWeeksValue = []
this.form.schedule = "" this.form.schedule = ""
this.$refs.times.courseDialog = false this.courseDialog = false
this.formDialog = true this.formDialog = true
console.log(this.allWeeksValue) console.log(this.allWeeksValue)
this.tableAlive = false // this.tableAlive = false //

@ -1,6 +1,5 @@
<template> <template>
<div> <div>
<el-dialog :visible.sync="courseDialog" append-to-body :close-on-click-modal="false" :title="lab.position+' '+lab.name">
<el-table :data="tableData" :span-method="objectSpanMethod" @cell-click="cClick" :cell-style="cStyle"> <el-table :data="tableData" :span-method="objectSpanMethod" @cell-click="cClick" :cell-style="cStyle">
<el-table-column :label="tableLabel" align="center "> <el-table-column :label="tableLabel" align="center ">
<el-table-column prop="daytime" label="" fixed align="center" width="60"></el-table-column> <el-table-column prop="daytime" label="" fixed align="center" width="60"></el-table-column>
@ -56,7 +55,6 @@
</el-table-column> </el-table-column>
</el-table-column> </el-table-column>
</el-table> </el-table>
</el-dialog>
</div> </div>
</template> </template>
@ -71,11 +69,7 @@
data() { data() {
return { return {
item: '', item: '',
lab: { courseDialog: false,
name: '',
position: ''
},
courseDialog:false,
data: [], data: [],
tableData: [ tableData: [
{ {

Loading…
Cancel
Save