|
@@ -38,6 +38,13 @@
|
|
</el-form-item>
|
|
</el-form-item>
|
|
</el-col>
|
|
</el-col>
|
|
</el-row>
|
|
</el-row>
|
|
|
|
+ <el-row>
|
|
|
|
+ <el-col :span="24">
|
|
|
|
+ <el-form-item label="学生简历">
|
|
|
|
+ <el-button v-model="studentData.introduction" type="text" @click="handleDownload" style="text-align: right;">预览 PDF</el-button>
|
|
|
|
+ </el-form-item>
|
|
|
|
+ </el-col>
|
|
|
|
+ </el-row>
|
|
</div>
|
|
</div>
|
|
|
|
|
|
<!-- 学生志愿 -->
|
|
<!-- 学生志愿 -->
|
|
@@ -237,6 +244,7 @@ const studentData = ref({
|
|
userNumber:"",
|
|
userNumber:"",
|
|
major:"",
|
|
major:"",
|
|
mobile:"",
|
|
mobile:"",
|
|
|
|
+ introduction:"",
|
|
})
|
|
})
|
|
const formRules = reactive({
|
|
const formRules = reactive({
|
|
// projectId: [{ required: true, message: '项目id不能为空', trigger: 'blur' }],
|
|
// projectId: [{ required: true, message: '项目id不能为空', trigger: 'blur' }],
|
|
@@ -339,6 +347,7 @@ const open = async (type: string, projectId?: number, supervisorId?:number, id?:
|
|
studentData.value.userNumber=result.userNumber
|
|
studentData.value.userNumber=result.userNumber
|
|
studentData.value.major=result.major
|
|
studentData.value.major=result.major
|
|
studentData.value.mobile=result.mobile
|
|
studentData.value.mobile=result.mobile
|
|
|
|
+ studentData.value.introduction=result.introduction
|
|
const supervisor = await supervisorSelectionSettingApi.getSupervisorInfo(supervisorId,projectId);
|
|
const supervisor = await supervisorSelectionSettingApi.getSupervisorInfo(supervisorId,projectId);
|
|
//显示的
|
|
//显示的
|
|
supervisorData.value.nickname = supervisor.supervisorName;
|
|
supervisorData.value.nickname = supervisor.supervisorName;
|
|
@@ -364,6 +373,7 @@ const open = async (type: string, projectId?: number, supervisorId?:number, id?:
|
|
if (id) {
|
|
if (id) {
|
|
formLoading.value = true
|
|
formLoading.value = true
|
|
try {
|
|
try {
|
|
|
|
+ formData.value.id = id
|
|
formData.value = await studentSelectSupervisorRecordApi.getStudentSelectSupervisorRecord(id)
|
|
formData.value = await studentSelectSupervisorRecordApi.getStudentSelectSupervisorRecord(id)
|
|
formData.value.selectType = selectType
|
|
formData.value.selectType = selectType
|
|
console.log(formData.value,'formData.value');
|
|
console.log(formData.value,'formData.value');
|
|
@@ -397,7 +407,7 @@ const open = async (type: string, projectId?: number, supervisorId?:number, id?:
|
|
studentData.value.userNumber=result.userNumber
|
|
studentData.value.userNumber=result.userNumber
|
|
studentData.value.major=result.major
|
|
studentData.value.major=result.major
|
|
studentData.value.mobile=result.mobile
|
|
studentData.value.mobile=result.mobile
|
|
-
|
|
|
|
|
|
+ studentData.value.introduction=result.introduction
|
|
// const supervisor = await supervisorSelectionSettingApi.getSupervisorInfo(supervisorId,projectId);
|
|
// const supervisor = await supervisorSelectionSettingApi.getSupervisorInfo(supervisorId,projectId);
|
|
// //显示的
|
|
// //显示的
|
|
// supervisorData.value.nickname = supervisor.supervisorName;
|
|
// supervisorData.value.nickname = supervisor.supervisorName;
|
|
@@ -417,6 +427,7 @@ const open = async (type: string, projectId?: number, supervisorId?:number, id?:
|
|
submitFormText.value = '编辑'
|
|
submitFormText.value = '编辑'
|
|
formType.value = type
|
|
formType.value = type
|
|
resetForm()
|
|
resetForm()
|
|
|
|
+ console.log(id);
|
|
if (studentId) {
|
|
if (studentId) {
|
|
formLoading.value = true
|
|
formLoading.value = true
|
|
try {
|
|
try {
|
|
@@ -426,6 +437,7 @@ const open = async (type: string, projectId?: number, supervisorId?:number, id?:
|
|
studentData.value.userNumber=result.userNumber
|
|
studentData.value.userNumber=result.userNumber
|
|
studentData.value.major=result.major
|
|
studentData.value.major=result.major
|
|
studentData.value.mobile=result.mobile
|
|
studentData.value.mobile=result.mobile
|
|
|
|
+ studentData.value.introduction=result.introduction
|
|
// formData.value.supervisorId = result.supervisorId
|
|
// formData.value.supervisorId = result.supervisorId
|
|
} finally {
|
|
} finally {
|
|
formLoading.value = false
|
|
formLoading.value = false
|
|
@@ -434,9 +446,8 @@ const open = async (type: string, projectId?: number, supervisorId?:number, id?:
|
|
if(id) {
|
|
if(id) {
|
|
formLoading.value = true
|
|
formLoading.value = true
|
|
try {
|
|
try {
|
|
- formData.value = await studentSelectSupervisorRecordApi.getStudentSelectSupervisorRecord(id)
|
|
|
|
formData.value.id = id
|
|
formData.value.id = id
|
|
- // formData.value.selectType = selectType
|
|
|
|
|
|
+ formData.value = await studentSelectSupervisorRecordApi.getStudentSelectSupervisorRecord(id)
|
|
console.log(formData.value,'formData.value');
|
|
console.log(formData.value,'formData.value');
|
|
} finally {
|
|
} finally {
|
|
formLoading.value = false
|
|
formLoading.value = false
|
|
@@ -459,6 +470,7 @@ const open = async (type: string, projectId?: number, supervisorId?:number, id?:
|
|
studentData.value.userNumber=result.userNumber
|
|
studentData.value.userNumber=result.userNumber
|
|
studentData.value.major=result.major
|
|
studentData.value.major=result.major
|
|
studentData.value.mobile=result.mobile
|
|
studentData.value.mobile=result.mobile
|
|
|
|
+ studentData.value.introduction=result.introduction
|
|
} finally {
|
|
} finally {
|
|
formLoading.value = false
|
|
formLoading.value = false
|
|
}
|
|
}
|
|
@@ -466,7 +478,6 @@ const open = async (type: string, projectId?: number, supervisorId?:number, id?:
|
|
if(id) {
|
|
if(id) {
|
|
formLoading.value = true
|
|
formLoading.value = true
|
|
try {
|
|
try {
|
|
- // formData.value.selectType = selectType
|
|
|
|
formData.value = await studentSelectSupervisorRecordApi.getStudentSelectSupervisorRecord(id)
|
|
formData.value = await studentSelectSupervisorRecordApi.getStudentSelectSupervisorRecord(id)
|
|
console.log(formData.value,'formData.value');
|
|
console.log(formData.value,'formData.value');
|
|
} finally {
|
|
} finally {
|
|
@@ -496,6 +507,7 @@ const open = async (type: string, projectId?: number, supervisorId?:number, id?:
|
|
studentData.value.userNumber=result.userNumber
|
|
studentData.value.userNumber=result.userNumber
|
|
studentData.value.major=result.major
|
|
studentData.value.major=result.major
|
|
studentData.value.mobile=result.mobile
|
|
studentData.value.mobile=result.mobile
|
|
|
|
+ studentData.value.introduction=result.introduction
|
|
const supervisor = await supervisorSelectionSettingApi.getSupervisorInfo(supervisorId,projectId);
|
|
const supervisor = await supervisorSelectionSettingApi.getSupervisorInfo(supervisorId,projectId);
|
|
//显示的
|
|
//显示的
|
|
supervisorData.value.nickname = supervisor.supervisorName;
|
|
supervisorData.value.nickname = supervisor.supervisorName;
|
|
@@ -644,6 +656,20 @@ const handleSupervisorSignatureSave = () => {
|
|
console.warn('Canvas element is not initialized yet');
|
|
console.warn('Canvas element is not initialized yet');
|
|
}
|
|
}
|
|
};
|
|
};
|
|
|
|
+const handleDownload = () => {
|
|
|
|
+ const url = studentData.value.introduction;
|
|
|
|
+ if (url) {
|
|
|
|
+ const link = document.createElement('a');
|
|
|
|
+ link.href = url;
|
|
|
|
+ link.download = '学生简历';
|
|
|
|
+ link.target = '_blank';
|
|
|
|
+ document.body.appendChild(link);
|
|
|
|
+ link.click();
|
|
|
|
+ document.body.removeChild(link);
|
|
|
|
+ } else {
|
|
|
|
+ console.error('地址无效');
|
|
|
|
+ }
|
|
|
|
+};
|
|
|
|
|
|
// defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
|
// defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
|
/** 提交表单 */
|
|
/** 提交表单 */
|