|
@@ -1,19 +1,18 @@
|
|
|
<template>
|
|
|
<!-- 搜索工作栏 -->
|
|
|
- <ContentWrap>
|
|
|
+ <ContentWrap v-if="userInfo.userType==='4'">
|
|
|
<el-form
|
|
|
class="-mb-15px"
|
|
|
:model="queryParams"
|
|
|
ref="queryFormRef"
|
|
|
:inline="true"
|
|
|
- label-width="68px"
|
|
|
+ label-width="100px"
|
|
|
>
|
|
|
|
|
|
-
|
|
|
<el-form-item label="参与导师" prop="supervisorIds">
|
|
|
<el-select
|
|
|
v-model="queryParams.supervisorId"
|
|
|
- @change="handleSupervisorChange"
|
|
|
+ @change="getRecordList"
|
|
|
placeholder="请选择参与导师"
|
|
|
clearable
|
|
|
filterable
|
|
@@ -27,104 +26,84 @@
|
|
|
/>
|
|
|
</el-select>
|
|
|
</el-form-item>
|
|
|
- <!-- <el-form-item label="项目id" prop="projectId">-->
|
|
|
- <!-- <el-input-->
|
|
|
- <!-- v-model="queryParams.projectId"-->
|
|
|
- <!-- placeholder="请输入项目id"-->
|
|
|
- <!-- clearable-->
|
|
|
- <!-- @keyup.enter="handleQuery"-->
|
|
|
- <!-- class="!w-240px"-->
|
|
|
- <!-- />-->
|
|
|
- <!-- </el-form-item>-->
|
|
|
- <!-- <el-form-item label="学生id" prop="studentId">-->
|
|
|
- <!-- <el-input-->
|
|
|
- <!-- v-model="queryParams.studentId"-->
|
|
|
- <!-- placeholder="请输入学生id"-->
|
|
|
- <!-- clearable-->
|
|
|
- <!-- @keyup.enter="handleQuery"-->
|
|
|
- <!-- class="!w-240px"-->
|
|
|
- <!-- />-->
|
|
|
- <!-- </el-form-item>-->
|
|
|
- <!-- <el-form-item label="校内导师id" prop="supervisorId">-->
|
|
|
- <!-- <el-input-->
|
|
|
- <!-- v-model="queryParams.supervisorId"-->
|
|
|
- <!-- placeholder="请输入校内导师id"-->
|
|
|
- <!-- clearable-->
|
|
|
- <!-- @keyup.enter="handleQuery"-->
|
|
|
- <!-- class="!w-240px"-->
|
|
|
- <!-- />-->
|
|
|
- <!-- </el-form-item>-->
|
|
|
|
|
|
- <!-- <el-form-item label="选择状态(0编辑(撤回),1待处理,2同意,3退回)" prop="selectType">-->
|
|
|
- <!-- <el-select-->
|
|
|
- <!-- v-model="queryParams.selectType"-->
|
|
|
- <!-- placeholder="请选择选择状态(0编辑(撤回),1待处理,2同意,3退回)"-->
|
|
|
- <!-- clearable-->
|
|
|
- <!-- class="!w-240px"-->
|
|
|
- <!-- >-->
|
|
|
- <!-- <el-option label="请选择字典生成" value="" />-->
|
|
|
- <!-- </el-select>-->
|
|
|
- <!-- </el-form-item>-->
|
|
|
- <!-- <el-form-item label="学生电子签名" prop="studnetSignature">-->
|
|
|
- <!-- <el-input-->
|
|
|
- <!-- v-model="queryParams.studnetSignature"-->
|
|
|
- <!-- placeholder="请输入学生电子签名"-->
|
|
|
- <!-- clearable-->
|
|
|
- <!-- @keyup.enter="handleQuery"-->
|
|
|
- <!-- class="!w-240px"-->
|
|
|
- <!-- />-->
|
|
|
- <!-- </el-form-item>-->
|
|
|
- <!-- <el-form-item label="创建时间" prop="createTime">-->
|
|
|
- <!-- <el-date-picker-->
|
|
|
- <!-- v-model="queryParams.createTime"-->
|
|
|
- <!-- value-format="YYYY-MM-DD HH:mm:ss"-->
|
|
|
- <!-- type="daterange"-->
|
|
|
- <!-- start-placeholder="开始日期"-->
|
|
|
- <!-- end-placeholder="结束日期"-->
|
|
|
- <!-- :default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"-->
|
|
|
- <!-- class="!w-220px"-->
|
|
|
- <!-- />-->
|
|
|
- <!-- </el-form-item>-->
|
|
|
- <!-- <el-form-item label="导师审批时间" prop="supervisorApproveTime">-->
|
|
|
- <!-- <el-date-picker-->
|
|
|
- <!-- v-model="queryParams.supervisorApproveTime"-->
|
|
|
- <!-- value-format="YYYY-MM-DD HH:mm:ss"-->
|
|
|
- <!-- type="daterange"-->
|
|
|
- <!-- start-placeholder="开始日期"-->
|
|
|
- <!-- end-placeholder="结束日期"-->
|
|
|
- <!-- :default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"-->
|
|
|
- <!-- class="!w-220px"-->
|
|
|
- <!-- />-->
|
|
|
- <!-- </el-form-item>-->
|
|
|
- <!-- <el-form-item label="导师电子签名" prop="supervisorSignature">-->
|
|
|
- <!-- <el-input-->
|
|
|
- <!-- v-model="queryParams.supervisorSignature"-->
|
|
|
- <!-- placeholder="请输入导师电子签名"-->
|
|
|
- <!-- clearable-->
|
|
|
- <!-- @keyup.enter="handleQuery"-->
|
|
|
- <!-- class="!w-240px"-->
|
|
|
- <!-- />-->
|
|
|
- <!-- </el-form-item>-->
|
|
|
- <!-- <el-form-item label="校外导师id" prop="externalSupervisorId">-->
|
|
|
- <!-- <el-input-->
|
|
|
- <!-- v-model="queryParams.externalSupervisorId"-->
|
|
|
- <!-- placeholder="请输入校外导师id"-->
|
|
|
- <!-- clearable-->
|
|
|
- <!-- @keyup.enter="handleQuery"-->
|
|
|
- <!-- class="!w-240px"-->
|
|
|
- <!-- />-->
|
|
|
- <!-- </el-form-item>-->
|
|
|
+ <el-form-item label="请选择项目" prop="projectId">
|
|
|
+ <el-select
|
|
|
+ v-model="queryParams.projectId"
|
|
|
+ @change="getRecordList"
|
|
|
+ placeholder="请选择项目"
|
|
|
+ clearable
|
|
|
+ filterable
|
|
|
+ class="!w-240px"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="project in projects"
|
|
|
+ :key="project.id"
|
|
|
+ :label="project.projectName"
|
|
|
+ :value="project.id"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="参与学生年级" prop="studentGrade">
|
|
|
+ <el-select
|
|
|
+ v-model="queryParams.studentGrade"
|
|
|
+ placeholder="请选择参与学生年级"
|
|
|
+ clearable
|
|
|
+ @change="handleQuery"
|
|
|
+ class="!w-240px"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="year in gradeOptions"
|
|
|
+ :key="year"
|
|
|
+ :label="year"
|
|
|
+ :value="year"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="学生姓名" v-if="userInfo.userType==='4'">
|
|
|
+ <el-input
|
|
|
+ v-model="queryParams.studentName"
|
|
|
+ placeholder="请输入学生名称"
|
|
|
+ clearable
|
|
|
+ @keyup.enter="handleQuery"
|
|
|
+ class="!w-240px"
|
|
|
+ />
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+ <el-form-item label="选择状态" prop="selectType">
|
|
|
+ <el-select
|
|
|
+ v-model="queryParams.selectType"
|
|
|
+ @change="getRecordList"
|
|
|
+ placeholder="请选择选择状态"
|
|
|
+ clearable
|
|
|
+ class="!w-240px"
|
|
|
+ >
|
|
|
+ <el-option label="撤回" value="0" />
|
|
|
+ <el-option label="待处理" value="1" />
|
|
|
+ <el-option label="同意" value="2" />
|
|
|
+ <el-option label="退回" value="3" />
|
|
|
+ <el-option label="志愿编辑" value="4" />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+
|
|
|
+<!-- <el-form-item label="创建时间" prop="createTime">-->
|
|
|
+<!-- <el-date-picker-->
|
|
|
+<!-- v-model="queryParams.createTime"-->
|
|
|
+<!-- value-format="YYYY-MM-DD HH:mm:ss"-->
|
|
|
+<!-- type="daterange"-->
|
|
|
+<!-- start-placeholder="开始日期"-->
|
|
|
+<!-- end-placeholder="结束日期"-->
|
|
|
+<!-- :default-time="[new Date('1 00:00:00'), new Date('1 23:59:59')]"-->
|
|
|
+<!-- class="!w-220px"-->
|
|
|
+<!-- />-->
|
|
|
+<!-- </el-form-item>-->
|
|
|
+
|
|
|
<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"-->
|
|
|
- <!-- plain-->
|
|
|
- <!-- @click="openForm('create')"-->
|
|
|
- <!-- v-hasPermi="['system:student-select-supervisor-record:create']"-->
|
|
|
- <!-- >-->
|
|
|
- <!-- <Icon icon="ep:plus" class="mr-5px" /> 新增-->
|
|
|
- <!-- </el-button>-->
|
|
|
+
|
|
|
<el-button
|
|
|
type="success"
|
|
|
plain
|
|
@@ -137,7 +116,8 @@
|
|
|
</el-form-item>
|
|
|
</el-form>
|
|
|
</ContentWrap>
|
|
|
- <!-- 是学生-->
|
|
|
+
|
|
|
+ <!---->
|
|
|
<ContentWrap v-if="userInfo.userType==='1' ||userInfo.userType==='4'" >
|
|
|
<el-table
|
|
|
v-loading="loading"
|
|
@@ -145,6 +125,7 @@
|
|
|
row-key="id"
|
|
|
>
|
|
|
<el-table-column type="index" width="50" />
|
|
|
+ <el-table-column label="项目名称" align="center" prop="projectName" />
|
|
|
<el-table-column label="学生姓名" align="center" prop="studentName" />
|
|
|
<el-table-column label="硕士类型" align="center" prop="masterType" >
|
|
|
<template #default="scope">
|
|
@@ -188,7 +169,7 @@
|
|
|
<el-button
|
|
|
link
|
|
|
type="primary"
|
|
|
- @click="openForm('update', scope.row.projectId,scope.row.supervisorId,scope.row.id)"
|
|
|
+ @click="openForm('update', scope.row.projectId,scope.row.supervisorId,scope.row.id,scope.row.studentId)"
|
|
|
v-hasPermi="['system:student-select-supervisor-record:update']"
|
|
|
>
|
|
|
志愿编辑
|
|
@@ -197,6 +178,12 @@
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
|
|
|
+ <Pagination
|
|
|
+ :total="total"
|
|
|
+ v-model:page="queryParams.pageNo"
|
|
|
+ v-model:limit="queryParams.pageSize"
|
|
|
+ @pagination="getRecordList"
|
|
|
+ />
|
|
|
</ContentWrap>
|
|
|
<!-- 表单弹窗:添加/修改 -->
|
|
|
<studentSelectSupervisorRecordForm ref="formRef" @success="getRecordList" />
|
|
@@ -210,12 +197,10 @@ import download from '@/utils/download'
|
|
|
import { supervisorSelectionSettingApi, supervisorSelectionSettingVO } from '@/api/system/supervisorSelectionSetting'
|
|
|
import * as UserApi from '@/api/system/user'
|
|
|
import { getUserProfile, ProfileVO } from '@/api/system/user/profile'
|
|
|
-import {
|
|
|
- studentSelectSupervisorRecordApi,
|
|
|
- studentSelectSupervisorRecordVO
|
|
|
-} from "@/api/system/studentSelectSupervisorRecord";
|
|
|
+import {studentSelectSupervisorRecordApi, studentSelectSupervisorRecordVO} from "@/api/system/studentSelectSupervisorRecord";
|
|
|
import {DICT_TYPE} from "@/utils/dict";
|
|
|
import studentSelectSupervisorRecordForm from './studentSelectSupervisorRecordForm.vue'
|
|
|
+import {studentSelectionProjectApi} from "@/api/system/studentSelectionProject"
|
|
|
|
|
|
/** 导师学硕专硕名额设置 列表 */
|
|
|
defineOptions({ name: 'recordList' })
|
|
@@ -230,11 +215,13 @@ const queryParams = reactive({
|
|
|
pageSize: 10,
|
|
|
projectId: undefined,
|
|
|
supervisorId: undefined,
|
|
|
- academicSlots: undefined,
|
|
|
- professionalSlots: undefined,
|
|
|
- supervisorName:undefined,
|
|
|
+ externalSupervisorId:undefined,
|
|
|
+ supervisor:undefined,
|
|
|
userType:undefined,
|
|
|
+ studentName:"",
|
|
|
createTime: [],
|
|
|
+ projectName:"",
|
|
|
+ studentGrade:""
|
|
|
})
|
|
|
const queryFormRef = ref() // 搜索的表单
|
|
|
const exportLoading = ref(false) // 导出的加载中
|
|
@@ -271,8 +258,8 @@ const resetQuery = () => {
|
|
|
|
|
|
/** 添加/修改操作 */
|
|
|
const formRef = ref()
|
|
|
-const openForm = (type: string, projectId?: number,supervisorId? :number,id?:number) => {
|
|
|
- formRef.value.open(type, projectId,supervisorId,id)
|
|
|
+const openForm = (type: string, projectId?: number,supervisorId? :number,id?:number,studentId?:number) => {
|
|
|
+ formRef.value.open(type, projectId,supervisorId,id,studentId)
|
|
|
}
|
|
|
|
|
|
const recordData = ref({
|
|
@@ -286,7 +273,8 @@ const recordData = ref({
|
|
|
supervisorSignature: "",
|
|
|
externalSupervisorId: undefined,
|
|
|
masterType:undefined,
|
|
|
- agreeDate:[]//同意日期
|
|
|
+ studentSignDate:[],
|
|
|
+ supervisorSignDate:[],
|
|
|
})
|
|
|
|
|
|
const selectionList = ref<studentSelectSupervisorRecordVO[]>([]) //下面的选择记录列表
|
|
@@ -294,8 +282,10 @@ const selectionList = ref<studentSelectSupervisorRecordVO[]>([]) //下面的选
|
|
|
const getRecordList = async () => {
|
|
|
loading.value = true
|
|
|
try {
|
|
|
- const data = await studentSelectSupervisorRecordApi.getSelectSupervisorRecordList(queryParams)
|
|
|
+ const data = await studentSelectSupervisorRecordApi.getStudentSelectSupervisorRecordPage(queryParams)
|
|
|
selectionList.value = data
|
|
|
+ selectionList.value = data.list
|
|
|
+ total.value = data.total
|
|
|
} finally {
|
|
|
loading.value = false
|
|
|
}
|
|
@@ -310,19 +300,36 @@ const getSupervisor= async () => {
|
|
|
console.error('未获取到导师', error)
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
//传supervisorId给formData.supervisorId
|
|
|
-const handleSupervisorChange = (value: number) => {
|
|
|
- const selectedUser = users.value.find(user => user.id === value);
|
|
|
- if (selectedUser) {
|
|
|
- formData.value.supervisorId = selectedUser.id;
|
|
|
- formData.value.supervisor = selectedUser.nickname;
|
|
|
- }
|
|
|
+const handleSupervisorChange = () => {
|
|
|
+
|
|
|
}
|
|
|
|
|
|
+const currentYear = new Date().getFullYear(); // 获取当前年份
|
|
|
+const gradeOptions = computed(() => {
|
|
|
+ return [
|
|
|
+ currentYear + '级', // 今年
|
|
|
+ currentYear - 1 + '级', // 去年
|
|
|
+ currentYear - 2 + '级', // 前年
|
|
|
+ currentYear - 3 + '级', // 大前年
|
|
|
+ currentYear - 4 + '级', // 大大前年
|
|
|
+ ];
|
|
|
+});
|
|
|
+
|
|
|
+const projects = ref()
|
|
|
+const getAllProject= async () => {
|
|
|
+ try {
|
|
|
+ projects.value = await studentSelectionProjectApi.getAllProject()
|
|
|
+ } catch (error) {
|
|
|
+ console.error('未获取到项目', error)
|
|
|
+ }
|
|
|
+}
|
|
|
/** 初始化 **/
|
|
|
onMounted(() => {
|
|
|
getUserInfo()
|
|
|
getRecordList()
|
|
|
+ getAllProject()
|
|
|
getSupervisor()
|
|
|
})
|
|
|
</script>
|