47 před 4 měsíci
rodič
revize
7a391c3d7f

+ 5 - 5
src/views/system/supervisorSelectionSetting/index.vue

@@ -184,7 +184,7 @@
           <el-button
             link
             type="primary"
-            @click="openForm('update', scope.row.supervisorId,scope.row.userType)"
+            @click="openForm('update', scope.row.supervisorId,scope.row.userType,scope.row.studentAchievementRequirement)"
             v-hasPermi="['system:supervisor-selection-setting:update']"
             v-if="userInfo?.userType === '4'"
           >
@@ -348,7 +348,7 @@ const userInfo = ref({} as ProfileVO)
 const getUserInfo = async () => {
   const users = await getUserProfile()
   userInfo.value = users
-  console.log("userInfo",userInfo.value);
+  // console.log("userInfo",userInfo.value);
 }
 
 /** 搜索按钮操作 */
@@ -365,8 +365,8 @@ const resetQuery = () => {
 
 /** 添加/修改操作 */
 const formRef = ref()
-const openForm = (type: string, id?: number, userType?: string) => {
-  formRef.value.open(type, id, userType)
+const openForm = (type: string, id?: number, userType?: string, studentAchievementRequirement?: string) => {
+  formRef.value.open(type, id, userType, studentAchievementRequirement)
 }
 
 /** 删除按钮操作 */
@@ -418,7 +418,7 @@ const selectStatus = ref()
 const getUser = async () => {
   const result = await UserApi.getUser(userInfo.value.id)
   selectStatus.value = result.selectStatus
-  console.log("selectStatus",selectStatus.value);
+  // console.log("selectStatus",selectStatus.value);
 }
 //志愿填报弹窗
 const studentSelectSupervisorPop= ref()

+ 9 - 9
src/views/system/supervisorSelectionSetting/supervisorSelectionSettingForm.vue

@@ -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)

+ 1 - 5
src/views/system/userDetail/teacher.vue

@@ -121,7 +121,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' })
 
@@ -191,10 +191,6 @@ const open = async (type: string, supervisorId: number, userType?: string) => {
           const user = await UserApi.getUser(userInfo.value.id)
           // console.log(user,'11');
           formData.value = user
-          // const res = await supervisorSelectionSettingApi.getSupervisorSelectionSetting(userInfo.value.supervisorId)
-          // console.log(res,'22');
-          // formData.value.academicSlots = res.academicSlots
-          // formData.value.professionalSlots = res.professionalSlots
         } catch (error) {
           console.error('请求失败:', error); // 捕获并打印错误信息
         } finally {