3
0

3 Commitit c44b1f257d ... b5d6150bf4

Tekijä SHA1 Viesti Päivämäärä
  47 b5d6150bf4 1 3 kuukautta sitten
  47 d1e5c72431 Merge branch 'master' of http://gogs.gisvg.com/YDM/graduate-ui 3 kuukautta sitten
  47 d19c7bc5e9 ;; 3 kuukautta sitten

+ 10 - 0
src/api/system/user/index.ts

@@ -227,4 +227,14 @@ export const getInnerSupervisor = () => {
 export const getExternalSupervisor = () => {
   return request.get({ url: '/system/user/getExternalSupervisor'})
 }
+
+// 获取今年通过的学生名单
+export const exportStudentPassedExcel = (params) => {
+  return request.download({ url: '/system/user/exportStudentPassedExcel', params })
+}
+
+// 获取今年未通过的学生名单
+export const exportStudentUnPassedExcel = (params) => {
+  return request.download({ url: '/system/user/exportStudentUnPassedExcel', params })
+}
   

+ 24 - 0
src/views/system/studentSelection/studentSelectionNo/index.vue

@@ -69,6 +69,14 @@
     <el-form-item>
       <el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
       <el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
+      <el-button
+        type="primary"
+        @click="exportExcel"
+        :loading="exportLoading"
+        v-hasPermi="['system:user:exportStudentUnPassedExcel']"
+      >
+        批量导出
+      </el-button>
     </el-form-item>
     </el-form>
   </ContentWrap>
@@ -143,6 +151,7 @@ import {studentSelectSupervisorRecordApi, studentSelectSupervisorRecordVO} from
 import {studentSelectionProjectApi, studentSelectionProjectVO} from "@/api/system/studentSelectionProject"
 import * as UserApi from '@/api/system/user'
 import studentSelectSupervisorRecordForm from '../studentSelectSupervisorRecord/studentSelectSupervisorRecordForm.vue'
+import  download  from '@/utils/download'
 
 defineOptions({ name: 'StudentSelectionWait' })
 
@@ -245,6 +254,21 @@ const handleDownload = (row) => {
     }
 };
 
+const exportLoading = ref(false) // 导出的加载中
+const exportExcel = async () => {
+  try {
+    // 导出的二次确认
+    await message.exportConfirm()
+    // 发起导出
+    exportLoading.value = true
+    const data = await UserApi.exportStudentUnPassedExcel(queryForm)
+    download.excel(data, '未分配学生名单.xls')
+  } catch {
+  } finally {
+    exportLoading.value = false
+  }
+}
+
 onMounted(() => {
   getUnPassList()
   getSupervisor()

+ 4 - 2
src/views/system/studentSelection/studentSelectionProject/index.vue

@@ -263,6 +263,8 @@ import { ref } from 'vue'
 import { getUserProfile, ProfileVO } from '@/api/system/user/profile'
 import { getPopData, updateIsPop,PopDo } from '@/api/system/user/pop'
 import openCampusSupervisorForm from './openCampusSupervisorForm.vue'
+import { supervisorSelectionSettingApi, supervisorSelectionSettingVO } from '@/api/system/supervisorSelectionSetting'
+import teacherRequireForm from '@/views/system/userDetail/teacher.vue'
 
 /** 师生互选项目 列表 */
 defineOptions({ name: 'StudentSelectionProject' })
@@ -430,8 +432,8 @@ const getPopDataFunction = async () => {
 }
 
 const teacherRequireFormRef = ref()
-const openTeacherRequireForm = ( supervisorId?: number, userType?: string) => {
-  teacherRequireFormRef.value.open("update",supervisorId,userType)
+const openTeacherRequireForm = (type: string, supervisorId?: number, userType?: string) => {
+  teacherRequireFormRef.value.open(type,supervisorId,userType)
 }
 
 /** 初始化 **/

+ 24 - 0
src/views/system/studentSelection/studentSelectionYes/index.vue

@@ -73,6 +73,14 @@
     <el-form-item>
       <el-button @click="handleQuery"><Icon icon="ep:search" class="mr-5px" /> 搜索</el-button>
       <el-button @click="resetQuery"><Icon icon="ep:refresh" class="mr-5px" /> 重置</el-button>
+      <el-button
+        type="primary"
+        @click="exportExcel"
+        :loading="exportLoading"
+        v-hasPermi="['system:user:exportStudentPassedExcel']"
+      >
+        批量导出
+      </el-button>
     </el-form-item>
     </el-form>
   </ContentWrap>
@@ -136,6 +144,7 @@ import { dateFormatter } from '@/utils/formatTime'
 import {studentSelectionProjectApi, studentSelectionProjectVO} from "@/api/system/studentSelectionProject"
 import * as UserApi from '@/api/system/user'
 import studentSelectSupervisorRecordForm from '../studentSelectSupervisorRecord/studentSelectSupervisorRecordForm.vue'
+import  download  from '@/utils/download'
 
 defineOptions({ name: 'StudentSelectionWait' })
 
@@ -239,6 +248,21 @@ const handleDownload = (row) => {
     }
 };
 
+const exportLoading = ref(false) // 导出的加载中
+const exportExcel = async () => {
+  try {
+    // 导出的二次确认
+    await message.exportConfirm()
+    // 发起导出
+    exportLoading.value = true
+    const data = await UserApi.exportStudentPassedExcel(queryForm)
+    download.excel(data, '分配成功学生名单.xls')
+  } catch {
+  } finally {
+    exportLoading.value = false
+  }
+}
+
 onMounted(() => {
   getPassList()
   getSupervisor()