|
@@ -140,8 +140,8 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
|
|
|
- <!-- 学生志愿填报-->
|
|
|
- <el-table-column label="志愿填报" align="center" min-width="120px" v-if=" userInfo?.userType === '1'">
|
|
|
+ <!-- 学生志愿填报 -->
|
|
|
+ <el-table-column label="志愿填报" align="center" min-width="120px" v-if=" userInfo?.userType === '1' && selectStatus.value === 0">
|
|
|
<template #default="scope">
|
|
|
<el-button
|
|
|
type="primary"
|
|
@@ -155,6 +155,20 @@
|
|
|
</el-button>
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
+ <!-- 学生志愿填报后直接跳转记录页面 -->
|
|
|
+ <el-table-column label="详情" align="center" min-width="120px" v-if=" userInfo?.userType === '1' && selectStatus.value !== 0">
|
|
|
+ <template #default="scope">
|
|
|
+ <el-button
|
|
|
+ type="primary"
|
|
|
+ link
|
|
|
+ @click="openRecord()"
|
|
|
+ v-if="scope.row.selectType"
|
|
|
+ >
|
|
|
+ <Icon icon="ep:bell" />
|
|
|
+ 详情
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
|
|
|
|
|
|
<el-table-column label="操作" align="center" min-width="120px" v-if="userInfo?.userType === '4'" >
|
|
@@ -317,6 +331,10 @@ const router = useRouter();
|
|
|
const openStudentSelectSupervisorRecord = (projectId,supervisorId) => {
|
|
|
router.push({ name: 'studentSelectSupervisorRecord', query: { projectId: projectId ,supervisorId :supervisorId} });
|
|
|
}
|
|
|
+const openRecord = () => {
|
|
|
+ router.push({ name: 'studentSelectSupervisorRecord2' });
|
|
|
+}
|
|
|
+
|
|
|
|
|
|
//导师类型
|
|
|
const userTypeFormatter = (row, column, cellValue, index) => {
|
|
@@ -351,6 +369,17 @@ const getUserInfo = async () => {
|
|
|
// console.log("userInfo",userInfo.value);
|
|
|
}
|
|
|
|
|
|
+const selectStatus = ref()
|
|
|
+const getUser = async () => {
|
|
|
+ if (!userInfo.value || !userInfo.value.id) {
|
|
|
+ console.error('用户信息未加载,无法获取用户');
|
|
|
+ return; // 提前返回,避免后续错误
|
|
|
+ }
|
|
|
+ const result = await UserApi.getUser(userInfo.value.id)
|
|
|
+ selectStatus.value = result.selectStatus
|
|
|
+ // console.log("selectStatus",selectStatus.value);
|
|
|
+}
|
|
|
+
|
|
|
/** 搜索按钮操作 */
|
|
|
const handleQuery = () => {
|
|
|
queryParams.pageNo = 1
|
|
@@ -414,12 +443,6 @@ const openTeacherRequireForm = (supervisorId?: number, userType?: string) => {
|
|
|
teacherRequireFormRef.value.open("detail",supervisorId,userType)
|
|
|
}
|
|
|
|
|
|
-const selectStatus = ref()
|
|
|
-const getUser = async () => {
|
|
|
- const result = await UserApi.getUser(userInfo.value.id)
|
|
|
- selectStatus.value = result.selectStatus
|
|
|
- // console.log("selectStatus",selectStatus.value);
|
|
|
-}
|
|
|
//志愿填报弹窗
|
|
|
const studentSelectSupervisorPop= ref()
|
|
|
const openStudentSelectSupervisorPop = async (type: string,id:number,studentId:number,projectId?: number,supervisorId? :number) => {
|
|
@@ -431,50 +454,50 @@ const openStudentSelectSupervisorPop = async (type: string,id:number,studentId:n
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-const recordData = ref({
|
|
|
- id: undefined,
|
|
|
- projectId: undefined,
|
|
|
- studentId: undefined,
|
|
|
- supervisorId: undefined,
|
|
|
- selectType: undefined,
|
|
|
- studentSignature: "",
|
|
|
- supervisorApproveTime: undefined,
|
|
|
- supervisorSignature: "",
|
|
|
- externalSupervisorId: undefined,
|
|
|
- masterType:undefined,
|
|
|
- studentSignDate:[],
|
|
|
- supervisorSignDate:[],
|
|
|
-})
|
|
|
-const handelWithdraw = async (projectId:number,supervisorId:number) => {
|
|
|
- try {
|
|
|
- await message.confirm('是否确定撤回申请?')
|
|
|
- recordData.value.supervisorId=supervisorId
|
|
|
- recordData.value.projectId=projectId
|
|
|
- const data =recordData.value as unknown as studentSelectSupervisorRecordVO
|
|
|
- await studentSelectSupervisorRecordApi.withdrawStudentSelectSupervisorRecord(data)
|
|
|
- message.success("撤回了申请")
|
|
|
- await getList()
|
|
|
- } catch {}
|
|
|
-}
|
|
|
-
|
|
|
-const selectionList = ref<studentSelectSupervisorRecordVO[]>([]) //下面的选择记录列表
|
|
|
-/** 查询互选记录列表 */
|
|
|
-const getRecordList = async () => {
|
|
|
- loading.value = true
|
|
|
- try {
|
|
|
- const data = await studentSelectSupervisorRecordApi.getSelectSupervisorRecordList()
|
|
|
- selectionList.value = data
|
|
|
- } finally {
|
|
|
- loading.value = false
|
|
|
- }
|
|
|
-}
|
|
|
+// const recordData = ref({
|
|
|
+// id: undefined,
|
|
|
+// projectId: undefined,
|
|
|
+// studentId: undefined,
|
|
|
+// supervisorId: undefined,
|
|
|
+// selectType: undefined,
|
|
|
+// studentSignature: "",
|
|
|
+// supervisorApproveTime: undefined,
|
|
|
+// supervisorSignature: "",
|
|
|
+// externalSupervisorId: undefined,
|
|
|
+// masterType:undefined,
|
|
|
+// studentSignDate:[],
|
|
|
+// supervisorSignDate:[],
|
|
|
+// })
|
|
|
+// const handelWithdraw = async (projectId:number,supervisorId:number) => {
|
|
|
+// try {
|
|
|
+// await message.confirm('是否确定撤回申请?')
|
|
|
+// recordData.value.supervisorId=supervisorId
|
|
|
+// recordData.value.projectId=projectId
|
|
|
+// const data =recordData.value as unknown as studentSelectSupervisorRecordVO
|
|
|
+// await studentSelectSupervisorRecordApi.withdrawStudentSelectSupervisorRecord(data)
|
|
|
+// message.success("撤回了申请")
|
|
|
+// await getList()
|
|
|
+// } catch {}
|
|
|
+// }
|
|
|
+
|
|
|
+// const selectionList = ref<studentSelectSupervisorRecordVO[]>([]) //下面的选择记录列表
|
|
|
+// /** 查询互选记录列表 */
|
|
|
+// const getRecordList = async () => {
|
|
|
+// loading.value = true
|
|
|
+// try {
|
|
|
+// const data = await studentSelectSupervisorRecordApi.getSelectSupervisorRecordList()
|
|
|
+// selectionList.value = data
|
|
|
+// } finally {
|
|
|
+// loading.value = false
|
|
|
+// }
|
|
|
+// }
|
|
|
|
|
|
/** 初始化 **/
|
|
|
onMounted(async () => {
|
|
|
getList()
|
|
|
await getUserInfo()
|
|
|
getSupervisor()
|
|
|
- await getRecordList()
|
|
|
+ // await getRecordList()
|
|
|
getUser()
|
|
|
})
|
|
|
</script>
|