Bläddra i källkod

学生列表-获取机构列表

Xiao_123 3 månader sedan
förälder
incheckning
63dc57624b
2 ändrade filer med 17 tillägg och 52 borttagningar
  1. 8 40
      src/api/school.js
  2. 9 12
      src/views/recruit/teacher/studentList/index.vue

+ 8 - 40
src/api/school.js

@@ -15,46 +15,6 @@ export const schoolRegister = async (data) => {
 	})
 }
 
-// 学校认证信息被拒绝后修改
-export const schoolUpdate = async (data) => {
-	return await request.post({
-		url: '/app-api/flames/school/update',
-		data
-	})
-}
-
-// 根据学校id获取审核拒绝信息
-export const getSchoolAuditById = async (data) => {
-	return await request.post({
-		url: '/app-api/flames/user/auth/record/get',
-		data
-	})
-}
-
-// 学校信息编辑
-export const schoolBaseInfoEdit = async (data) => {
-	return await request.post({
-		url: '/app-api/flames/school/basic/update',
-		data
-	})
-}
-
-// 院系信息编辑
-export const schoolDepartmentEdit = async (data) => {
-	return await request.post({
-		url: '/app-api/flames/school/department/saves',
-		data
-	})
-}
-
-// 学校组织查询
-export const schoolOrganization = async (data) => {
-	return await request.post({
-		url: '/app-api/flames/school/organization',
-		data
-	})
-}
-
 // 学生列表
 export const studentList = async (data) => {
 	return await request.post({
@@ -126,3 +86,11 @@ export const updateSchoolInfo = async (data) => {
 		data
 	})
 }
+
+// 获取学校机构列表
+export const getSchoolOrganizationList = async (params) => {
+	return await request.get({
+		url: '/app-api/menduner/system/teacher/school/organization/list',
+		params
+	})
+}

+ 9 - 12
src/views/recruit/teacher/studentList/index.vue

@@ -49,7 +49,7 @@ import { ref } from 'vue'
 import Snackbar from '@/plugins/snackbar'
 import { formatName } from '@/utils/getText'
 import { getUserAvatar } from '@/utils/avatar'
-import { schoolOrganization, studentList } from '@/api/school'
+import { studentList, getSchoolOrganizationList } from '@/api/school'
 // import { useRouter } from 'vue-router'; const router = useRouter()
 import { previewFile } from '@/utils'
 
@@ -66,8 +66,7 @@ const studentNameItem = ref({
   width: 300,
   label: '请输入学生姓名搜索',
   clearable: true,
-  hideDetails: true,
-  // appendInnerIcon: 'mdi-magnify'
+  hideDetails: true
 })
 
 const headers = [
@@ -106,22 +105,20 @@ const handleSearch = (refresh = false) => {
 }
 
 const schoolInfo = ref(localStorage.getItem('schoolInfo') ? JSON.parse(localStorage.getItem('schoolInfo')) : {})
-const schoolDepartmentItem = ref({ width: 300, items: [], clearable: false, hideDetails: true, label: '请选择院系' })
+const schoolDepartmentItem = ref({ width: 300, items: [], clearable: false, hideDetails: true, label: '请选择院系', itemText: 'name', itemValue: 'id' })
 
 // 列表
 const getYuanXiItem = async () => {
   const schoolId = schoolInfo.value?.schoolId || null
   if (!schoolId) return Snackbar.warning('获取学校信息失败!')
   
-  const { data } = await schoolOrganization({ schoolId })
-  schoolDepartmentItem.value.items = data?.length && data.map(item=> {
-    return item?.title ? { label: item.title, value: item.title } : null
-  }).filter(Boolean)
+  const data = await getSchoolOrganizationList({ schoolId, type: 0 })
+  schoolDepartmentItem.value.items = data || []
 
-  if (schoolDepartmentItem.value.items?.length) {
-    query.value.schoolDepartmentName = schoolDepartmentItem.value.items[0].value
-    getData()
-  }
+  // if (schoolDepartmentItem.value.items?.length) {
+  //   query.value.schoolDepartmentName = schoolDepartmentItem.value.items[0].value
+  //   getData()
+  // }
 }
 getYuanXiItem()