[fix][V]:完善超级管理员组件

master
Romesum 5 years ago
parent c320e7e2e4
commit ab93e1823f

@ -97,7 +97,7 @@
<el-table-column prop="name" label="实验室名称"></el-table-column> <el-table-column prop="name" label="实验室名称"></el-table-column>
<el-table-column prop="position" label="实验室地点"></el-table-column> <el-table-column prop="position" label="实验室地点"></el-table-column>
<el-table-column prop="name" label="实验室名称"></el-table-column> <el-table-column prop="name" label="实验室名称"></el-table-column>
<el-table-column prop="name" label="软件"></el-table-column> <el-table-column prop="software" label="软件"></el-table-column>
<el-table-column prop="nickname" label="管理员"></el-table-column> <el-table-column prop="nickname" label="管理员"></el-table-column>
<el-table-column prop="tel" label="管理员联系电话"></el-table-column> <el-table-column prop="tel" label="管理员联系电话"></el-table-column>
<el-table-column label="操作" width="370px"> <el-table-column label="操作" width="370px">

@ -10,7 +10,7 @@
router router
active-text-color="#ffd04b"> active-text-color="#ffd04b">
<el-menu-item index="1" route="../">首页</el-menu-item> <el-menu-item index="1" route="../">首页</el-menu-item>
<el-menu-item index="2" route="labManage">实验室管理</el-menu-item> <el-menu-item index="2" route="labManager">实验室管理</el-menu-item>
<el-menu-item index="3" route="userManage">用户管理</el-menu-item> <el-menu-item index="3" route="userManage">用户管理</el-menu-item>
<drop-down-user :user="nickname" @back="backLogin" @goPersonal="goPersonal"></drop-down-user> <drop-down-user :user="nickname" @back="backLogin" @goPersonal="goPersonal"></drop-down-user>
</el-menu> </el-menu>

@ -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])+'周':''
}
} }
} }
} }

Loading…
Cancel
Save