From c1e972249f82596065afaf78934cefb567853c28 Mon Sep 17 00:00:00 2001 From: Romesum Date: Tue, 26 May 2020 21:03:35 +0800 Subject: [PATCH] =?UTF-8?q?[feat][V]:=E6=96=B0=E5=A2=9E=E7=94=A8=E6=88=B7?= =?UTF-8?q?=E8=AF=BE=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/supManager/userManage.vue | 61 +++++++++++++++++-- 1 file changed, 55 insertions(+), 6 deletions(-) diff --git a/element-vue/src/components/supManager/userManage.vue b/element-vue/src/components/supManager/userManage.vue index 7593ebd..9725639 100644 --- a/element-vue/src/components/supManager/userManage.vue +++ b/element-vue/src/components/supManager/userManage.vue @@ -1,5 +1,21 @@ @@ -54,6 +71,8 @@ @cancel="cancel" @confirm="confirm" > + @@ -62,9 +81,11 @@ import {get, post} from "~/utils"; import {showDialog, showFail, showSuccess} from "~/utils/dialog"; import userEditForm from "~/components/supManager/userEditForm"; + import tb_courseDialog from "~/components/tb_courseDialog"; + import {item2html} from "~/utils/converter"; export default { - components: {userEditForm}, + components: {userEditForm, tb_courseDialog}, data() { return { search: '', @@ -72,7 +93,11 @@ tableData: [], dialogFormVisible: false, edit: false, - userForm: {} + userForm: {}, + time: { + year: '2019', + semester: 2 + }, } } , @@ -80,9 +105,6 @@ async load() { this.tableData = await get('lb/user/getUserList') }, - handleClick(row) { - console.log(row); - }, handleSelectionChange(val) { this.items = val; }, @@ -116,6 +138,33 @@ } // 弹出编辑框 this.dialogFormVisible = true + }, + async schedulePreview(event) { + console.log(event) + await this.loadSchedule(event.uid) + this.$refs.schedule.courseDialog = true + }, + async loadSchedule(u_id) { + const schedule = await get('lb/labrecord/getUserSchedule', { + u_id, + 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() { + }, cancel() { this.load()