diff --git a/src/views/dormitory/new/stuDom/index.vue b/src/views/dormitory/new/stuDom/index.vue
index 222e738..acc3c6e 100644
--- a/src/views/dormitory/new/stuDom/index.vue
+++ b/src/views/dormitory/new/stuDom/index.vue
@@ -64,7 +64,7 @@
-
+
@@ -260,6 +260,7 @@ import { listMajors } from '@/api/stuCQS/basedata/majors'
import { listGrade } from '@/api/stuCQS/basedata/grade'
import { listInSchoolClass as listClass } from '@/api/stuCQS/basedata/class'
import { getTokenKeySessionStorage } from '@/utils/auth'
+import { getUserProfile } from '@/api/system/user' // 获取当前登录用户
let id, campusId, buildingId, parkId, floorId
@@ -363,7 +364,8 @@ export default {
sendForm: {
gradeId: null,
endDate: null
- }
+ },
+ roleGroup: ""
}
},
created() {
@@ -639,11 +641,25 @@ export default {
/** 查询宿舍学生关联列表 */
getList() {
this.loading = true
- listStudent(this.queryParams).then(response => {
- this.studentList = response.rows
- this.total = response.total
- this.loading = false
- })
+ getUserProfile().then((response) => {
+ this.roleGroup = response.roleGroup
+ if (response.roleGroup.includes('辅导员')) {
+ this.queryParams.teacherName = response.data.nickName
+ } else if (response.roleGroup.includes('学务')) {
+ // this.queryParams.deptId = response.data.deptId
+ this.deptList.forEach(element => {
+ if (element.label == response.data.dept.deptName) {
+ this.queryParams.deptId = element.value
+ }
+ });
+ this.changeDept()
+ }
+ listStudent(this.queryParams).then(response => {
+ this.studentList = response.rows
+ this.total = response.total
+ this.loading = false
+ })
+ })
},
// 取消按钮
cancel() {