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

master
Romesum 5 years ago
parent a0e8675db3
commit bef24e86ab

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

@ -1,62 +1,60 @@
<template>
<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-column :label="tableLabel" align="center ">
<el-table-column prop="daytime" label="" fixed align="center" width="60"></el-table-column>
<el-table-column prop="time" label="" fixed align="center" width="100"></el-table-column>
<el-table-column :index="1" prop="Monday" label="星期一" align="center">
<template slot-scope="scope">
{{scope.row.Monday.name}} &nbsp;<br>
{{scope.row.Monday.classes}} &nbsp; {{scope.row.Monday.population}}<br>
{{scope.row.Monday.software}}
</template>
</el-table-column>
<el-table-column :index="2" prop="Tuesday" label="星期二" align="center">
<template slot-scope="scope">
{{scope.row.Tuesday.name}} &nbsp;<br>
{{scope.row.Tuesday.classes}} &nbsp; {{scope.row.Tuesday.population}}<br>
{{scope.row.Tuesday.software}}
</template>
</el-table-column>
<el-table-column :index="3" prop="Wednesday" label="星期三" align="center">
<template slot-scope="scope">
{{scope.row.Wednesday.name}} &nbsp;<br>
{{scope.row.Wednesday.classes}} &nbsp; {{scope.row.Wednesday.population}}<br>
{{scope.row.Wednesday.software}}
</template>
</el-table-column>
<el-table-column :index="4" prop="Thursday" label="星期四" align="center">
<template slot-scope="scope">
{{scope.row.Thursday.name}} &nbsp;<br>
{{scope.row.Thursday.classes}} &nbsp; {{scope.row.Thursday.population}}<br>
{{scope.row.Thursday.software}}
</template>
</el-table-column>
<el-table-column :index="5" prop="Friday" label="星期五" align="center">
<template slot-scope="scope">
{{scope.row.Friday.name}} &nbsp;<br>
{{scope.row.Friday.classes}} &nbsp; {{scope.row.Friday.population}}<br>
{{scope.row.Friday.software}}
</template>
</el-table-column>
<el-table-column :index="6" prop="Saturday" label="星期六" align="center">
<template slot-scope="scope">
{{scope.row.Saturday.name}} &nbsp;<br>
{{scope.row.Saturday.classes}} &nbsp; {{scope.row.Saturday.population}}<br>
{{scope.row.Saturday.software}}
</template>
</el-table-column>
<el-table-column :index="7" prop="Sunday" label="星期日" align="center">
<template slot-scope="scope">
{{scope.row.Sunday.name}} &nbsp;<br>
{{scope.row.Sunday.classes}} &nbsp; {{scope.row.Sunday.population}}<br>
{{scope.row.Sunday.software}}
</template>
</el-table-column>
<el-table :data="tableData" :span-method="objectSpanMethod" @cell-click="cClick" :cell-style="cStyle">
<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="time" label="" fixed align="center" width="100"></el-table-column>
<el-table-column :index="1" prop="Monday" label="星期一" align="center">
<template slot-scope="scope">
{{scope.row.Monday.name}} &nbsp;<br>
{{scope.row.Monday.classes}} &nbsp; {{scope.row.Monday.population}}<br>
{{scope.row.Monday.software}}
</template>
</el-table-column>
</el-table>
</el-dialog>
<el-table-column :index="2" prop="Tuesday" label="星期二" align="center">
<template slot-scope="scope">
{{scope.row.Tuesday.name}} &nbsp;<br>
{{scope.row.Tuesday.classes}} &nbsp; {{scope.row.Tuesday.population}}<br>
{{scope.row.Tuesday.software}}
</template>
</el-table-column>
<el-table-column :index="3" prop="Wednesday" label="星期三" align="center">
<template slot-scope="scope">
{{scope.row.Wednesday.name}} &nbsp;<br>
{{scope.row.Wednesday.classes}} &nbsp; {{scope.row.Wednesday.population}}<br>
{{scope.row.Wednesday.software}}
</template>
</el-table-column>
<el-table-column :index="4" prop="Thursday" label="星期四" align="center">
<template slot-scope="scope">
{{scope.row.Thursday.name}} &nbsp;<br>
{{scope.row.Thursday.classes}} &nbsp; {{scope.row.Thursday.population}}<br>
{{scope.row.Thursday.software}}
</template>
</el-table-column>
<el-table-column :index="5" prop="Friday" label="星期五" align="center">
<template slot-scope="scope">
{{scope.row.Friday.name}} &nbsp;<br>
{{scope.row.Friday.classes}} &nbsp; {{scope.row.Friday.population}}<br>
{{scope.row.Friday.software}}
</template>
</el-table-column>
<el-table-column :index="6" prop="Saturday" label="星期六" align="center">
<template slot-scope="scope">
{{scope.row.Saturday.name}} &nbsp;<br>
{{scope.row.Saturday.classes}} &nbsp; {{scope.row.Saturday.population}}<br>
{{scope.row.Saturday.software}}
</template>
</el-table-column>
<el-table-column :index="7" prop="Sunday" label="星期日" align="center">
<template slot-scope="scope">
{{scope.row.Sunday.name}} &nbsp;<br>
{{scope.row.Sunday.classes}} &nbsp; {{scope.row.Sunday.population}}<br>
{{scope.row.Sunday.software}}
</template>
</el-table-column>
</el-table-column>
</el-table>
</div>
</template>
@ -71,11 +69,7 @@
data() {
return {
item: '',
lab: {
name: '',
position: ''
},
courseDialog:false,
courseDialog: false,
data: [],
tableData: [
{

Loading…
Cancel
Save