|
@@ -1,4 +1,142 @@
|
|
|
<template>
|
|
|
+ <!-- 搜索工作栏 -->
|
|
|
+ <ContentWrap>
|
|
|
+ <el-form
|
|
|
+ class="-mb-15px"
|
|
|
+ :model="queryParams"
|
|
|
+ ref="queryFormRef"
|
|
|
+ :inline="true"
|
|
|
+ label-width="68px"
|
|
|
+ >
|
|
|
+
|
|
|
+
|
|
|
+ <el-form-item label="参与导师" prop="supervisorIds">
|
|
|
+ <el-select
|
|
|
+ v-model="queryParams.supervisorId"
|
|
|
+ @change="handleSupervisorChange"
|
|
|
+ placeholder="请选择参与导师"
|
|
|
+ clearable
|
|
|
+ filterable
|
|
|
+ class="!w-240px"
|
|
|
+ >
|
|
|
+ <el-option
|
|
|
+ v-for="supervisor in supervisors"
|
|
|
+ :key="supervisor.id"
|
|
|
+ :label="supervisor.nickname"
|
|
|
+ :value="supervisor.id"
|
|
|
+ />
|
|
|
+ </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>
|
|
|
+ <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
|
|
|
+ @click="handleExport"
|
|
|
+ :loading="exportLoading"
|
|
|
+ v-hasPermi="['system:student-select-supervisor-record:export']"
|
|
|
+ >
|
|
|
+ <Icon icon="ep:download" class="mr-5px" /> 导出
|
|
|
+ </el-button>
|
|
|
+ </el-form-item>
|
|
|
+ </el-form>
|
|
|
+ </ContentWrap>
|
|
|
<!-- 是学生-->
|
|
|
<ContentWrap v-if="userInfo.userType==='1' ||userInfo.userType==='4'" >
|
|
|
<el-table
|
|
@@ -22,15 +160,14 @@
|
|
|
:formatter="userTypeFormatter"
|
|
|
/>
|
|
|
|
|
|
-<!-- <el-table-column label="简历" align="center" prop="introduction" />-->
|
|
|
|
|
|
<el-table-column label="申请状态" align="center" prop="selectType" >
|
|
|
<template #default="scope">
|
|
|
<dict-tag :type="DICT_TYPE.SYSTEM_STUDENT_SELECT_RECORD_SELECT_TYPE" :value="scope.row.selectType" />
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
-<!-- <el-table-column label="学生电子签名" align="center" prop="studentSignature" />-->
|
|
|
-<!-- <el-table-column label="导师电子签名" align="center" prop="supervisorSignature" />-->
|
|
|
+ <el-table-column label="学生电子签名" align="center" prop="studentSignature" />
|
|
|
+ <el-table-column label="导师电子签名" align="center" prop="supervisorSignature" />
|
|
|
<el-table-column
|
|
|
label="提交时间"
|
|
|
align="center"
|
|
@@ -45,8 +182,25 @@
|
|
|
:formatter="dateFormatter"
|
|
|
width="180px"
|
|
|
/>
|
|
|
+ <el-table-column label="操作" align="center" min-width="120px" v-if="userInfo.userType==='4'">
|
|
|
+<!-- //学院-->
|
|
|
+ <template #default="scope">
|
|
|
+ <el-button
|
|
|
+ link
|
|
|
+ type="primary"
|
|
|
+ @click="openForm('update', scope.row.projectId,scope.row.supervisorId,scope.row.id)"
|
|
|
+ v-hasPermi="['system:student-select-supervisor-record:update']"
|
|
|
+ >
|
|
|
+ 志愿编辑
|
|
|
+ </el-button>
|
|
|
+ </template>
|
|
|
+ </el-table-column>
|
|
|
</el-table>
|
|
|
+
|
|
|
</ContentWrap>
|
|
|
+ <!-- 表单弹窗:添加/修改 -->
|
|
|
+ <studentSelectSupervisorRecordForm ref="formRef" @success="getRecordList" />
|
|
|
+
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="ts">
|
|
@@ -61,6 +215,7 @@ import {
|
|
|
studentSelectSupervisorRecordVO
|
|
|
} from "@/api/system/studentSelectSupervisorRecord";
|
|
|
import {DICT_TYPE} from "@/utils/dict";
|
|
|
+import studentSelectSupervisorRecordForm from './studentSelectSupervisorRecordForm.vue'
|
|
|
|
|
|
/** 导师学硕专硕名额设置 列表 */
|
|
|
defineOptions({ name: 'recordList' })
|
|
@@ -69,8 +224,6 @@ const message = useMessage() // 消息弹窗
|
|
|
const { t } = useI18n() // 国际化
|
|
|
|
|
|
const loading = ref(true) // 列表的加载中
|
|
|
-const list = ref<supervisorSelectionSettingVO[]>([]) // 列表的数据
|
|
|
-
|
|
|
const total = ref(0) // 列表的总页数
|
|
|
const queryParams = reactive({
|
|
|
pageNo: 1,
|
|
@@ -85,13 +238,6 @@ const queryParams = reactive({
|
|
|
})
|
|
|
const queryFormRef = ref() // 搜索的表单
|
|
|
const exportLoading = ref(false) // 导出的加载中
|
|
|
-
|
|
|
-//记录页面
|
|
|
-const router = useRouter()
|
|
|
-const openStudentSelectSupervisorRecord = (projectId,supervisorId) => {
|
|
|
- router.push({ name: 'studentSelectSupervisorRecord', query: { projectId: projectId ,supervisorId :supervisorId} });
|
|
|
-}
|
|
|
-
|
|
|
//导师类型
|
|
|
const userTypeFormatter = (row, column, cellValue, index) => {
|
|
|
switch (cellValue) {
|
|
@@ -114,7 +260,7 @@ const getUserInfo = async () => {
|
|
|
/** 搜索按钮操作 */
|
|
|
const handleQuery = () => {
|
|
|
queryParams.pageNo = 1
|
|
|
- getList()
|
|
|
+ getRecordList()
|
|
|
}
|
|
|
|
|
|
/** 重置按钮操作 */
|
|
@@ -123,15 +269,10 @@ const resetQuery = () => {
|
|
|
handleQuery()
|
|
|
}
|
|
|
|
|
|
-//获取所有导师
|
|
|
-const supervisors = ref()
|
|
|
-const getSupervisor= async () => {
|
|
|
- try {
|
|
|
- const result = await UserApi.getSupervisor()
|
|
|
- supervisors.value = result
|
|
|
- } catch (error) {
|
|
|
- console.error('未获取到导师', error)
|
|
|
- }
|
|
|
+/** 添加/修改操作 */
|
|
|
+const formRef = ref()
|
|
|
+const openForm = (type: string, projectId?: number,supervisorId? :number,id?:number) => {
|
|
|
+ formRef.value.open(type, projectId,supervisorId,id)
|
|
|
}
|
|
|
|
|
|
const recordData = ref({
|
|
@@ -147,16 +288,6 @@ const recordData = ref({
|
|
|
masterType:undefined,
|
|
|
agreeDate:[]//同意日期
|
|
|
})
|
|
|
-const handelWithdraw = async (supervisorId:number) => {
|
|
|
- try {
|
|
|
- await message.confirm()
|
|
|
- recordData.value.supervisorId=supervisorId
|
|
|
- const data =recordData.value as unknown as studentSelectSupervisorRecordVO
|
|
|
- await studentSelectSupervisorRecordApi.withdrawStudentSelectSupervisorRecord(data)
|
|
|
- message.success("撤回了申请")
|
|
|
- await getList()
|
|
|
- } catch {}
|
|
|
-}
|
|
|
|
|
|
const selectionList = ref<studentSelectSupervisorRecordVO[]>([]) //下面的选择记录列表
|
|
|
/** 查询互选记录列表 */
|
|
@@ -170,11 +301,28 @@ const getRecordList = async () => {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+const supervisors = ref()
|
|
|
+const getSupervisor= async () => {
|
|
|
+ try {
|
|
|
+ const result = await UserApi.getSupervisor()
|
|
|
+ supervisors.value = result
|
|
|
+ } catch (error) {
|
|
|
+ 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;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|
|
|
/** 初始化 **/
|
|
|
onMounted(() => {
|
|
|
- getList()
|
|
|
getUserInfo()
|
|
|
- getSupervisor()
|
|
|
getRecordList()
|
|
|
+ getSupervisor()
|
|
|
})
|
|
|
</script>
|