|
@@ -88,7 +88,7 @@ import { FormRules } from 'element-plus'
|
|
|
import { getUserProfile, ProfileVO } from '@/api/system/user/profile'
|
|
|
import {selectionBookVO,selectionBookApi} from '@/api/system/studentSelectSupervisorRecord/selectionBook'
|
|
|
import download from '@/utils/download'
|
|
|
-// import { supervisorSelectionSettingApi, supervisorSelectionSettingVO } from '@/api/system/supervisorSelectionSetting'
|
|
|
+import { supervisorSelectionSettingApi, supervisorSelectionSettingVO } from '@/api/system/supervisorSelectionSetting'
|
|
|
|
|
|
defineOptions({ name: 'TeacherRequireForm' })
|
|
|
|
|
@@ -126,7 +126,7 @@ const getUserInfo = async () => {
|
|
|
// console.log(userInfo.value);
|
|
|
}
|
|
|
const TUsertype = ref<string | undefined>(undefined);
|
|
|
-const open = async (type: string, supervisorId: number, userType?: string) => {
|
|
|
+const open = async (type: string, supervisorId: number, userType?: string, studentAchievementRequirement?: string) => {
|
|
|
// console.log(supervisorId,'supervisorId');
|
|
|
dialogVisible.value = true
|
|
|
formType.value=type
|
|
@@ -138,12 +138,12 @@ const open = async (type: string, supervisorId: number, userType?: string) => {
|
|
|
formLoading.value = true
|
|
|
try {
|
|
|
const user = await UserApi.getUser(supervisorId)
|
|
|
- // console.log(user,'11');
|
|
|
+ console.log(user,'11');
|
|
|
formData.value = user
|
|
|
- formData.value.supervisorId = supervisorId
|
|
|
- // console.log(formData.value.supervisorId);
|
|
|
+ formData.value.supervisorId = supervisorId
|
|
|
+ formData.value.studentAchievementRequirement = studentAchievementRequirement;
|
|
|
} catch (error) {
|
|
|
- console.error('请求失败:', error); // 捕获并打印错误信息
|
|
|
+ console.error('请求失败:', error);
|
|
|
} finally {
|
|
|
formLoading.value = false;
|
|
|
}
|
|
@@ -158,9 +158,9 @@ const submitForm = async () => {
|
|
|
formLoading.value = true
|
|
|
try {
|
|
|
const data = formData.value as unknown as selectionBookVO
|
|
|
- if (Array.isArray(data.introduction) && data.introduction.length > 0) {
|
|
|
- data.introduction = data.introduction[0]; // 只取数组的第一个元素
|
|
|
- }
|
|
|
+ // if (Array.isArray(data.introduction) && data.introduction.length > 0) {
|
|
|
+ // data.introduction = data.introduction[0]; // 只取数组的第一个元素
|
|
|
+ // }
|
|
|
if (formType.value === 'update') {
|
|
|
await selectionBookApi.updateSelectionBook(data)
|
|
|
console.log(data)
|