Browse Source

改了一点点

yzx 1 tháng trước cách đây
mục cha
commit
df4a90f82a

+ 6 - 1
src/api/system/user/index.ts

@@ -32,11 +32,16 @@ export const getUserPage = (params: PageParam) => {
 export const getTeacherPage = (params: PageParam) => {
   return request.get({ url: '/system/user/page0', params })
 }
+export const getTeacherPageForTeacher = (params: PageParam) => {
+  return request.get({ url: '/system/user/getTeacherPageForTeacher', params })
+}
 // 查询学生管理列表
 export const getStudentPage = (params: PageParam) => {
   return request.get({ url: '/system/user/page1', params })
 }
-
+export const getUserPageForTeacher = (params: PageParam) => {
+  return request.get({ url: '/system/user/pageForTeacher', params })
+}
 // 查询毕业生列表
 export const getGraduateStudentPage = (params: PageParam) => {
   return request.get({ url: '/system/user/graduateStudentPage', params })

+ 4 - 4
src/views/system/user/index.vue

@@ -168,12 +168,12 @@
                       >
                         <Icon icon="ep:key" />重置密码
                       </el-dropdown-item>
-                      <!-- <el-dropdown-item
+                      <el-dropdown-item
                         command="handleRole"
-                        v-if="checkPermi(['system:permission:assign-user-role'])"
+                        v-if="checkRole(['super_admin'])"
                       >
                         <Icon icon="ep:circle-check" />分配角色
-                      </el-dropdown-item> -->
+                      </el-dropdown-item>
                     </el-dropdown-menu>
                   </template>
                 </el-dropdown>
@@ -200,7 +200,7 @@
 </template>
 <script lang="ts" setup>
 import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
-import { checkPermi } from '@/utils/permission'
+import {checkPermi, checkRole} from '@/utils/permission'
 import { dateFormatter } from '@/utils/formatTime'
 import download from '@/utils/download'
 import { CommonStatusEnum } from '@/utils/constants'

+ 2 - 1
src/views/system/workroomTeacher/dept/student.vue

@@ -87,6 +87,7 @@ import { dateFormatter } from '@/utils/formatTime'
 import * as UserApi from '@/api/system/user'
 import { defineProps } from 'vue';
 import { useRouter } from 'vue-router';
+import {getUserPageForTeacher} from "@/api/system/user";
 
 defineOptions({ name: 'SystemUser' })
 
@@ -117,7 +118,7 @@ const getList = async () => {
   loading.value = true
   try {
     queryParams.deptId = props.id
-    const data = await UserApi.getStudentPage(queryParams)
+    const data = await UserApi.getUserPageForTeacher(queryParams)
     list.value = data.list
     total.value = data.total
   } finally {

+ 2 - 1
src/views/system/workroomTeacher/dept/teacher.vue

@@ -46,6 +46,7 @@
 <script lang="ts" setup>
 import { dateFormatter } from '@/utils/formatTime'
 import * as UserApi from '@/api/system/user'
+import {getTeacherPageForTeacher} from "@/api/system/user";
 
 defineOptions({ name: 'SystemUser' })
 
@@ -73,7 +74,7 @@ const getList = async () => {
   loading.value = true
   try {
     queryParams.deptId = props.id
-    const data = await UserApi.getTeacherPage(queryParams)
+    const data = await UserApi.getTeacherPageForTeacher(queryParams)
     console.log(data, 'data');
     list.value = data.list
     total.value = data.total

+ 1 - 1
src/views/system/workroomTeacher/user/student.vue

@@ -373,7 +373,7 @@ const queryFormRef = ref() // 搜索的表单
 const getList = async () => {
   loading.value = true
   try {
-    const data = await UserApi.getStudentPage(queryParams)
+    const data = await UserApi.getUserPageForTeacher(queryParams)
     console.log(data)
     list.value = data.list
     total.value = data.total