|
|
@ -107,7 +107,7 @@
|
|
|
|
<!-- <el-button @click="deleteLab(scope.row.lab_id)" type="danger" size="mini" plain-->
|
|
|
|
<!-- <el-button @click="deleteLab(scope.row.lab_id)" type="danger" size="mini" plain-->
|
|
|
|
<!-- icon="el-icon-delete">删除-->
|
|
|
|
<!-- icon="el-icon-delete">删除-->
|
|
|
|
<!-- </el-button>-->
|
|
|
|
<!-- </el-button>-->
|
|
|
|
<el-button @click="schedulePreview(scope.row.lab_id)" size="mini" plain>查看课表</el-button>
|
|
|
|
<el-button @click="schedulePreview(scope.row)" size="mini" plain>查看课表</el-button>
|
|
|
|
<el-button @click="editSchedule(scope.row)" type="primary" size="mini" icon="el-icon-edit"
|
|
|
|
<el-button @click="editSchedule(scope.row)" type="primary" size="mini" icon="el-icon-edit"
|
|
|
|
plain>修改可预约时间段
|
|
|
|
plain>修改可预约时间段
|
|
|
|
</el-button>
|
|
|
|
</el-button>
|
|
|
@ -116,19 +116,22 @@
|
|
|
|
</el-table>
|
|
|
|
</el-table>
|
|
|
|
<add-lab ref="addLab" @confirm="submit"></add-lab>
|
|
|
|
<add-lab ref="addLab" @confirm="submit"></add-lab>
|
|
|
|
<set-lab-time ref="setLabTime"></set-lab-time>
|
|
|
|
<set-lab-time ref="setLabTime"></set-lab-time>
|
|
|
|
|
|
|
|
<tb_courseDialog :cClick="cellClick" :cStyle="tableStyle" table-label="实验室课表" ref="schedule" :custom="true" c-click=""></tb_courseDialog>
|
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</template>
|
|
|
|
</template>
|
|
|
|
|
|
|
|
|
|
|
|
<script>
|
|
|
|
<script>
|
|
|
|
|
|
|
|
|
|
|
|
import addLab from "~/components/supManager/addLab" ;
|
|
|
|
import addLab from "~/components/supManager/addLab" ;
|
|
|
|
|
|
|
|
import tb_courseDialog from "~/components/tb_courseDialog";
|
|
|
|
|
|
|
|
|
|
|
|
import {get, post} from "~/utils";
|
|
|
|
import {get, post} from "~/utils";
|
|
|
|
import {closeLoading, showDialog, showDialogWithReject, showFail, showLoading, showSuccess} from "~/utils/dialog";
|
|
|
|
import {closeLoading, showDialog, showDialogWithReject, showFail, showLoading, showSuccess} from "~/utils/dialog";
|
|
|
|
import setLabTime from "~/components/supManager/setLabTime";
|
|
|
|
import setLabTime from "~/components/supManager/setLabTime";
|
|
|
|
|
|
|
|
import {item2html} from "~/utils/converter";
|
|
|
|
|
|
|
|
|
|
|
|
export default {
|
|
|
|
export default {
|
|
|
|
components: {addLab, setLabTime},
|
|
|
|
components: {addLab, setLabTime, tb_courseDialog},
|
|
|
|
data() {
|
|
|
|
data() {
|
|
|
|
return {
|
|
|
|
return {
|
|
|
|
edit: false,
|
|
|
|
edit: false,
|
|
|
@ -211,14 +214,42 @@
|
|
|
|
// showFail('删除失败,实验室含有时间段时无法删除', this)
|
|
|
|
// showFail('删除失败,实验室含有时间段时无法删除', this)
|
|
|
|
// })
|
|
|
|
// })
|
|
|
|
// },
|
|
|
|
// },
|
|
|
|
async schedulePreview() {
|
|
|
|
async schedulePreview(event) {
|
|
|
|
await showFail('尚未开发', this)
|
|
|
|
await this.loadSchedule(event.lab_id)
|
|
|
|
|
|
|
|
this.$refs.schedule.lab = {
|
|
|
|
|
|
|
|
name: event.name,
|
|
|
|
|
|
|
|
position: event.position
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
this.$refs.schedule.courseDialog = true
|
|
|
|
},
|
|
|
|
},
|
|
|
|
async editSchedule(item) {
|
|
|
|
async editSchedule(item) {
|
|
|
|
this.$refs.setLabTime.lab = item
|
|
|
|
this.$refs.setLabTime.lab = item
|
|
|
|
this.$refs.setLabTime.form.labId = item.lab_id
|
|
|
|
this.$refs.setLabTime.form.labId = item.lab_id
|
|
|
|
this.$refs.setLabTime.setLabTimeDialog = true
|
|
|
|
this.$refs.setLabTime.setLabTimeDialog = true
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
async loadSchedule(labId) {
|
|
|
|
|
|
|
|
const schedule = await get('lb/labrecord/getLabSchedule', {
|
|
|
|
|
|
|
|
labId,
|
|
|
|
|
|
|
|
year: this.time.year,
|
|
|
|
|
|
|
|
semester: this.time.semester
|
|
|
|
|
|
|
|
}) //发送地址,请求该实验室地址的所有课程
|
|
|
|
|
|
|
|
for (let i = 0; i < schedule.length; i++) {
|
|
|
|
|
|
|
|
this.$refs.schedule.tableData[i].Monday = item2html(schedule[i][0])
|
|
|
|
|
|
|
|
this.$refs.schedule.tableData[i].Tuesday = item2html(schedule[i][1])
|
|
|
|
|
|
|
|
this.$refs.schedule.tableData[i].Wednesday = item2html(schedule[i][2])
|
|
|
|
|
|
|
|
this.$refs.schedule.tableData[i].Thursday = item2html(schedule[i][3])
|
|
|
|
|
|
|
|
this.$refs.schedule.tableData[i].Friday = item2html(schedule[i][4])
|
|
|
|
|
|
|
|
this.$refs.schedule.tableData[i].Saturday = item2html(schedule[i][5])
|
|
|
|
|
|
|
|
this.$refs.schedule.tableData[i].Sunday = item2html(schedule[i][6])
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
cellClick() {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
tableStyle() {
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
},
|
|
|
|
},
|
|
|
|
computed: {
|
|
|
|
computed: {
|
|
|
|
// tableDataComputed() {
|
|
|
|
// tableDataComputed() {
|
|
|
|