|
|
@ -32,11 +32,8 @@
|
|
|
|
</el-dialog>
|
|
|
|
</el-dialog>
|
|
|
|
|
|
|
|
|
|
|
|
<!-- 表格:节数选择-->
|
|
|
|
<!-- 表格:节数选择-->
|
|
|
|
|
|
|
|
<tb_course :cClick="cellClick" :cStyle="cellStyle" table-label="点击相应的位置选取时间段" ref="times"
|
|
|
|
<el-dialog :visible.sync="courseDialog" append-to-body :close-on-click-modal="false"
|
|
|
|
:custom="true"></tb_course>
|
|
|
|
:title="lab.position+' '+lab.name">
|
|
|
|
|
|
|
|
<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"
|
|
|
@ -48,9 +45,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
import weekSelection from "~/components/weekSelection";
|
|
|
|
import weekSelection from "~/components/weekSelection";
|
|
|
|
import tb_course from "~/components/tb_course";
|
|
|
|
import tb_course from "~/components/tb_courseDialog";
|
|
|
|
import {get, post, stop} from "~/utils";
|
|
|
|
import {get, post} from "~/utils";
|
|
|
|
import {showDialog, showFail, showSuccess} from "~/utils/dialog";
|
|
|
|
import {showDialog, showSuccess} from "~/utils/dialog";
|
|
|
|
|
|
|
|
import {arr2shortString} from "~/utils/converter";
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
components: {weekSelection, tb_course},
|
|
|
|
components: {weekSelection, tb_course},
|
|
|
@ -105,8 +103,10 @@
|
|
|
|
methods: {
|
|
|
|
methods: {
|
|
|
|
//设置周次与节次
|
|
|
|
//设置周次与节次
|
|
|
|
async showCourseDialog() {
|
|
|
|
async showCourseDialog() {
|
|
|
|
|
|
|
|
await this.getScheduleAll()
|
|
|
|
this.tableAlive = true
|
|
|
|
this.tableAlive = true
|
|
|
|
this.courseDialog = true
|
|
|
|
this.$refs.times.courseDialog = true
|
|
|
|
|
|
|
|
this.setLabTimeDialog = false
|
|
|
|
},
|
|
|
|
},
|
|
|
|
//表格中每个格子的风格
|
|
|
|
//表格中每个格子的风格
|
|
|
|
cellStyle: function ({row, column, rowIndex, columnIndex}) {
|
|
|
|
cellStyle: function ({row, column, rowIndex, columnIndex}) {
|
|
|
@ -146,6 +146,7 @@
|
|
|
|
}
|
|
|
|
}
|
|
|
|
console.log(this.form)
|
|
|
|
console.log(this.form)
|
|
|
|
await post('lb/labTime/updateLabTime', this.form)
|
|
|
|
await post('lb/labTime/updateLabTime', this.form)
|
|
|
|
|
|
|
|
await this.getScheduleAll()
|
|
|
|
await showSuccess("设置成功", this)
|
|
|
|
await showSuccess("设置成功", this)
|
|
|
|
// if (targetValue.length !== 0) {
|
|
|
|
// if (targetValue.length !== 0) {
|
|
|
|
// this.perTargetValue.textContent = '【' + targetValue + '】周'
|
|
|
|
// this.perTargetValue.textContent = '【' + targetValue + '】周'
|
|
|
@ -204,6 +205,22 @@
|
|
|
|
this.formDialog = true
|
|
|
|
this.formDialog = true
|
|
|
|
console.log(this.allWeeksValue)
|
|
|
|
console.log(this.allWeeksValue)
|
|
|
|
this.tableAlive = false //表格失活
|
|
|
|
this.tableAlive = false //表格失活
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
async getScheduleAll() {
|
|
|
|
|
|
|
|
const schedule = await get('lb/labTime/getLabScheduleAll', {
|
|
|
|
|
|
|
|
labId: this.form.labId,
|
|
|
|
|
|
|
|
year: this.form.year,
|
|
|
|
|
|
|
|
semester: this.form.semester
|
|
|
|
|
|
|
|
})
|
|
|
|
|
|
|
|
for (let i = 0; i < schedule.length; i++) {
|
|
|
|
|
|
|
|
this.$refs.times.tableData[i].Monday = arr2shortString(schedule[i][0])?arr2shortString(schedule[i][0])+'周':''
|
|
|
|
|
|
|
|
this.$refs.times.tableData[i].Tuesday = arr2shortString(schedule[i][1])?arr2shortString(schedule[i][1])+'周':''
|
|
|
|
|
|
|
|
this.$refs.times.tableData[i].Wednesday = arr2shortString(schedule[i][2])?arr2shortString(schedule[i][2])+'周':''
|
|
|
|
|
|
|
|
this.$refs.times.tableData[i].Thursday =arr2shortString(schedule[i][3])?arr2shortString(schedule[i][3])+'周':''
|
|
|
|
|
|
|
|
this.$refs.times.tableData[i].Friday = arr2shortString(schedule[i][4])?arr2shortString(schedule[i][4])+'周':''
|
|
|
|
|
|
|
|
this.$refs.times.tableData[i].Saturday = arr2shortString(schedule[i][5])?arr2shortString(schedule[i][5])+'周':''
|
|
|
|
|
|
|
|
this.$refs.times.tableData[i].Sunday = arr2shortString(schedule[i][6])?arr2shortString(schedule[i][6])+'周':''
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|