|
@@ -93,7 +93,7 @@
|
|
|
</el-row>
|
|
|
</div>
|
|
|
<!-- 导师意见 -->
|
|
|
- <div class="section" v-if="userInfo.userType==='3'">
|
|
|
+ <div class="section" v-if="userInfo.userType==='3'&& formType !== 'end'">
|
|
|
<p style="margin-bottom: 10px;">导师意见:同意</p>
|
|
|
<p style="margin-bottom: 10px;">导师签字</p>
|
|
|
<div v-show="lastSupervisorSignature">
|
|
@@ -271,7 +271,7 @@ const getSupervisorSignature = async() => {
|
|
|
|
|
|
const showPrintButton = ref(false); // 控制打印按钮的显示
|
|
|
/** 打开弹窗 */
|
|
|
-const open = async (type: string, projectId?: number, supervisorId?:number, id?:number, studentId?:number) => {
|
|
|
+const open = async (type: string, projectId?: number, supervisorId?:number, id?:number, studentId?:number, recordId?:number) => {
|
|
|
dialogVisible.value = true;
|
|
|
await nextTick(() => {
|
|
|
if (canvas.value) {
|
|
@@ -348,7 +348,6 @@ const open = async (type: string, projectId?: number, supervisorId?:number, id?:
|
|
|
try {
|
|
|
formData.value = await studentSelectSupervisorRecordApi.getStudentSelectSupervisorRecord(id)
|
|
|
// console.log(formData.value,'formData.value');
|
|
|
-
|
|
|
} finally {
|
|
|
formLoading.value = false
|
|
|
}
|
|
@@ -392,9 +391,7 @@ const open = async (type: string, projectId?: number, supervisorId?:number, id?:
|
|
|
formLoading.value = false
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
await getProjectSupervisors()
|
|
|
-
|
|
|
}
|
|
|
if (type === 'updateone'){
|
|
|
dialogTitle.value = '志愿编辑'
|
|
@@ -409,13 +406,14 @@ const open = async (type: string, projectId?: number, supervisorId?:number, id?:
|
|
|
studentData.value.userNumber=result.userNumber
|
|
|
studentData.value.major=result.major
|
|
|
studentData.value.mobile=result.mobile
|
|
|
- const supervisor = await supervisorSelectionSettingApi.getSupervisorInfo(supervisorId,projectId);
|
|
|
- formData.value = await studentSelectSupervisorRecordApi.getStudentSelectSupervisorRecord(id)
|
|
|
} finally {
|
|
|
formLoading.value = false
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+ if (recordId){
|
|
|
+ formData.value = await studentSelectSupervisorRecordApi.getStudentSelectSupervisorRecord(recordId)
|
|
|
+ // console.log(formData.value,'formData.value');
|
|
|
+ }
|
|
|
await getProjectSupervisors()
|
|
|
|
|
|
}
|
|
@@ -424,15 +422,6 @@ const open = async (type: string, projectId?: number, supervisorId?:number, id?:
|
|
|
submitFormText.value = '编辑'
|
|
|
formType.value = type
|
|
|
resetForm()
|
|
|
- if (id) {
|
|
|
- formLoading.value = true
|
|
|
- try {
|
|
|
- formData.value = await studentSelectSupervisorRecordApi.getStudentSelectSupervisorRecord(id)
|
|
|
- // console.log(formData.value,'formData.value');
|
|
|
- } finally {
|
|
|
- formLoading.value = false
|
|
|
- }
|
|
|
- }
|
|
|
if (id) {
|
|
|
formLoading.value = true
|
|
|
try {
|
|
@@ -441,19 +430,10 @@ const open = async (type: string, projectId?: number, supervisorId?:number, id?:
|
|
|
studentData.value.userNumber=result.userNumber
|
|
|
studentData.value.major=result.major
|
|
|
studentData.value.mobile=result.mobile
|
|
|
- const supervisor = await supervisorSelectionSettingApi.getSupervisorInfo(supervisorId,projectId);
|
|
|
- //显示的
|
|
|
- supervisorData.value.nickname = supervisor.supervisorName;
|
|
|
- supervisorData.value.title =supervisor.title;
|
|
|
- supervisorData.value.studentAchievementRequirement = supervisor.studentAchievementRequirement;
|
|
|
- supervisorData.value.major = supervisor.major;
|
|
|
- supervisorData.value.workSupervisor = supervisor.workSupervisor;
|
|
|
- formData.value = await studentSelectSupervisorRecordApi.getStudentSelectSupervisorRecord(id)
|
|
|
} finally {
|
|
|
formLoading.value = false
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
await getProjectSupervisors()
|
|
|
}
|
|
|
if (type === 'end'){
|
|
@@ -498,7 +478,7 @@ const supervisorsin = ref()
|
|
|
const getProjectSupervisors = async () => {
|
|
|
// console.log('请求的项目ID:', projectId);
|
|
|
const result = await studentSelectionProjectApi.getProjectSupervisors();
|
|
|
- // console.log(result,'获取到的导师信息');
|
|
|
+ console.log(result,'获取到的导师信息');
|
|
|
supervisorsin.value = result
|
|
|
}
|
|
|
|
|
@@ -635,7 +615,12 @@ const submitForm = async () => {
|
|
|
} else if (formType.value === 'agree') {
|
|
|
await studentSelectSupervisorRecordApi.agreeStudentSelectSupervisorRecord(data);
|
|
|
message.success("已经同意申请");
|
|
|
+ }else if (formType.value === 'updateone') {
|
|
|
+ await studentSelectSupervisorRecordApi.updateStudentSelectSupervisorRecord(data);
|
|
|
+ message.success(t('common.updateSuccess'));
|
|
|
}else if (formType.value === 'updatetwo') {
|
|
|
+ // const id = data.studentId
|
|
|
+ // data.studentId = id
|
|
|
await studentSelectSupervisorRecordApi.collegeCreate(data);
|
|
|
message.success("common.createSuccess");
|
|
|
}
|