Crazy 1 month ago
parent
commit
0691ecccc4

+ 26 - 0
src/api/system/studentSelectSupervisorRecord/selectionBook.ts

@@ -0,0 +1,26 @@
+import request from '@/config/axios'
+import {UserProfileUpdateReqVO} from "@/api/system/user/profile";
+import {studentSelectSupervisorRecordVO} from "@/api/system/studentSelectSupervisorRecord/index";
+
+// 师生互选记录 VO
+export interface selectionBookVO {
+  studentName: string; // 学生姓名
+  studentNumber: string; // 学生学号
+  major: string; // 学生专业
+  supervisorMajor: string; // 导师研究方向
+  studentMobile: string; // 学生联系电话
+  supervisor: string; // 导师名称
+  studentAchievementRequirement: string; // 学生成果要求
+  introduction: string; // 简介
+  academicSlots: number; // 学硕名额
+  professionalSlots: number; // 专硕名额
+}
+
+export const selectionBookApi = {
+
+  //更新互选信息表消息
+  updateSelectionBook: async (data: selectionBookVO) => {
+    return await request.put({ url: `/system/student-select-supervisor-record/updateSelectionBook`, data })
+  },
+
+}

+ 2 - 0
src/api/system/user/index.ts

@@ -21,6 +21,8 @@ export interface UserVO {
   photoUrl: string// 学生照片
   userNumber: string// 学号
   photoExist: number// 照片是否存在
+  title:string//职称
+  studentAchievementRequirement:string//学生成果要求
 }
 
 // 查询用户管理列表

+ 4 - 0
src/api/system/user/pop.ts

@@ -15,3 +15,7 @@ export const getPopData = () => {
 export const updateIsPop = (data: PopDo) => {
   return request.put({ url: '/system/user/updateIsPop', data })
 }
+
+export const getIsPop = () => {
+  return request.get({ url: '/system/user/getIsPop' })
+}

+ 1 - 0
src/api/system/user/profile.ts

@@ -36,6 +36,7 @@ export interface ProfileVO {
   masterType: string
   userType: string
   photoUrl: string
+  isSelectionInformation:string
 }
 
 export interface UserProfileUpdateReqVO {

+ 16 - 0
src/router/modules/remaining.ts

@@ -5,6 +5,7 @@ import deptInfo from '@/views/system/workroomCollege/deptInfo/index.vue'
 import * as LoginApi from '@/api/login'
 import supervisorSelectionSetting from "@/views/system/supervisorSelectionSetting/index.vue";
 import studentSelectSupervisorRecord from "@/views/system/studentSelectSupervisorRecord/index.vue";
+import studentForm from "@/views/system/userDetail/student.vue";
 
 const { t } = useI18n()
 /**
@@ -59,6 +60,21 @@ const remainingRouter: AppRouteRecordRaw[] = [
     },
     children: [
 
+      {
+        path: 'userDetail/student',
+        component: studentForm,
+        name: 'studentForm',
+        meta: {
+          title: '互选信息填写',
+          icon: 'ep:user-filled',
+          noCache: false,
+          affix: false,
+          breadcrumb: false,
+          noTagsView: false,
+          hidden: true
+        }
+      },
+
       {
         path: 'studentSelectSupervisorRecord/index',
         component: studentSelectSupervisorRecord,

+ 1 - 1
src/views/Login/Login.vue

@@ -190,7 +190,7 @@ $prefix-cls: #{$namespace}-login;
   }
 }
 .background-image {
-  background-image: url('D:/coding/graduate-ui/src/assets/imgs/GLUT.png');
+  background-image: url('../../assets/imgs/GLUT.png');
   background-size: cover;
   background-position: center;
 }

+ 2 - 1
src/views/Login/components/LoginForm.vue

@@ -152,6 +152,7 @@ import * as authUtil from '@/utils/auth'
 import { usePermissionStore } from '@/store/modules/permission'
 import * as LoginApi from '@/api/login'
 import { LoginStateEnum, useFormValid, useLoginState } from './useLogin'
+import { getUserProfile, ProfileVO } from '@/api/system/user/profile'
 
 defineOptions({ name: 'LoginForm' })
 
@@ -268,7 +269,7 @@ const handleLogin = async (params) => {
     console.log(userType,"我在这里")
     console.log(userType);  // 查看 userType 的结构
     if (userType && Array.isArray(userType.roles)) {
-        if (userType.roles.indexOf("student") !== -1) {
+        if (userType.roles.indexOf("student") !== -1 ) {
             console.log("我是学生");
             window.location.href = '/system/studentSelf/index';
         } else {

+ 52 - 5
src/views/system/Home/Index.vue

@@ -277,24 +277,28 @@
       <!--        </el-row>-->
 
       <!-- 第二个el-row -->
-
     </el-row>
   </el-skeleton>
+  <teacher ref="teacherFormRef"/>
 </template>
 
 <script lang="ts" setup>
-import {EChartsOption, List} from 'echarts'
+// import {EChartsOption, List} from 'echarts'
 import {formatTime} from '@/utils'
 import {formatDate} from "@/utils/formatTime";
 import {useUserStore} from '@/store/modules/user'
 import {useWatermark} from '@/hooks/web/useWatermark'
 import type {WorkplaceTotal, Project, Notice, Shortcut} from './types'
 import {pieOptions, barOptions} from './echarts-data'
-import {reactive, onMounted, watchEffect} from "vue";
-import {vue3ScrollSeamless} from "vue3-scroll-seamless";
+import {reactive, onMounted, watchEffect, ref, nextTick} from "vue";
+// import {vue3ScrollSeamless} from "vue3-scroll-seamless";
 import * as UserApi from '@/api/system/user'
 import * as  DeptApi from '@/api/system/dept'
 import {StudentAttendanceApi} from '@/api/system/studentAttendance'
+import {getIsPop} from "@/api/system/user/pop";
+import {getUserProfile, ProfileVO} from "@/api/system/user/profile";
+
+import teacher from '../userDetail/teacher.vue';
 
 defineOptions({name: 'SystemHome'})
 
@@ -302,6 +306,9 @@ const {t} = useI18n()
 const userStore = useUserStore()
 const {setWatermark} = useWatermark()
 const loading = ref(true)
+
+const teacherFormRef = ref();
+
 const avatar = userStore.getUser.avatar
 const username = userStore.getUser.nickname
 
@@ -537,7 +544,40 @@ const list1Options = reactive({
   direction: 1,//方向: 0 往下 1 往上 2 向左 3 向右。
 });
 
-onMounted(() => {
+
+// LSQ
+const isPop  = ref();
+const userInfo = ref({} as ProfileVO);
+
+const getUserInfo = async () => {
+  try {
+    loading.value = true;
+    const users = await getUserProfile();
+    userInfo.value = users;
+  } catch (error) {
+    console.error('获取用户信息失败:', error);
+  } finally {
+    loading.value = false;
+  }
+};
+
+const getIsPopFunction =(async ()=>{
+  isPop.value = await  getIsPop();
+  console.log(isPop.value)
+})
+
+const teacherForm = () => {
+  console.log(teacherFormRef.value)
+  if (teacherFormRef.value) {
+    teacherFormRef.value.open("update",null);
+  } else {
+    console.error('teacher form component is not mounted yet!');
+  }
+};
+
+
+onMounted(async () => {
+  await getUserInfo()
   getDetail()
   getWeekend()
   getProject()
@@ -546,6 +586,13 @@ onMounted(() => {
   getStudentAttendance()
   getGraduationSource()
   getGraduateCount()
+  if(userInfo.value.userType ==='3') {
+    await getIsPopFunction();
+    if (isPop.value ) {
+      await nextTick();
+      teacherForm();
+    }
+  }
 })
 
 const getAllApi = async () => {

+ 2 - 2
src/views/system/studentSelectSupervisorRecord/index.vue

@@ -304,8 +304,8 @@ const resetQuery = () => {
 
 /** 添加/修改操作 */
 const formRef = ref()
-const openForm = (type: string, id?: number) => {
-  formRef.value.open(type, id)
+const openForm = (type: string, projectId?: number,supervisorId? :number,id?:number) => {
+  formRef.value.open(type, projectId,supervisorId,id)
 }
 
 /** 删除按钮操作 */

+ 182 - 34
src/views/system/studentSelectSupervisorRecord/record.vue

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

+ 85 - 26
src/views/system/studentSelectSupervisorRecord/studentSelectSupervisorRecordForm.vue

@@ -7,20 +7,20 @@
       label-width="100px"
       v-loading="formLoading"
     >
-      <el-row>
+      <el-row v-if="formType === 'create'">
         <el-col :span="12" >
           <el-form-item label="导师姓名" prop="nickname">
             <el-input v-model="formData.nickname" placeholder="请输入姓名" />
           </el-form-item>
         </el-col>
-        <el-col :span="12" v-if="formType === 'detail'">
+        <el-col :span="12" v-if="formType === 'create'">
           <el-form-item label="职称" prop="">
             <el-input model-value="导师"  />
           </el-form-item>
         </el-col>
       </el-row>
 
-      <el-row >
+      <el-row  v-if="formType === 'create'" >
         <el-col :span="12">
           <el-form-item label="" prop="major">
             <el-input v-model="formData.major" placeholder="导师暂未填写" />
@@ -28,14 +28,32 @@
         </el-col>
       </el-row>
 
-      <el-row>
+      <el-row v-if="formType === 'create'">
         <el-col :span="24">
-          <el-form-item label="对研究生毕业的成果要求" prop="studentAchievementRequirement">
+          <el-form-item label="对研究生毕业的成果要求" prop="studentAchievementRequirement" type="create">
             <Editor v-model="formData.studentAchievementRequirement" ref="editorRef"/>
           </el-form-item>
         </el-col>
       </el-row>
 
+      <el-form-item label="选择导师" prop="supervisorId" v-if="formType === 'update'">
+        <el-select
+          v-model="formData.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>
+
 <!--      &lt;!&ndash; 学生电子签名 &ndash;&gt;-->
 <!--      <el-form-item label="学生电子签名" prop="studentSignature">-->
 <!--        <vue-esign ref="studentSignaturePad" :width="400" :height="200" @save="handleStudentSignatureSave" />-->
@@ -50,7 +68,7 @@
     <template #footer>
       <el-button @click="submitForm" type="primary" :disabled="formLoading">确 定</el-button>
       <el-button @click="dialogVisible = false">取 消</el-button>
-      <button @click="saveSupervisorSignature">保存签名</button>
+<!--      <button @click="saveSupervisorSignature">保存签名</button>-->
     </template>
   </Dialog>
 </template>
@@ -83,7 +101,7 @@ const formData = ref({
   supervisorSignature: "",
   externalSupervisorId: undefined,
 
-  //导师的
+  //导师的信息
   nickname: '',
   remark: ' ',
   major:'',
@@ -98,26 +116,48 @@ const formRef = ref() // 表单 Ref
 
 /** 打开弹窗 */
 
-const open = async (type: string, projectId?: number ,supervisorId?:number) => {
+const open = async (type: string, projectId?: number ,supervisorId?:number,id?:number) => {
+  console.log(id)
   dialogVisible.value = true
-  dialogTitle.value = "志愿填报"
-  formType.value = type
-  resetForm()
-  // 修改时,设置数据
-  if (supervisorId) {
-    formLoading.value = true
-    try {
-      console.log(supervisorId)
-      const user = await UserApi.getUser(supervisorId);
-      // formData.value = await studentSelectSupervisorRecordApi.getstudentSelectSupervisorRecord(id)
-      console.log(user)
-      formData.value.supervisorId =supervisorId;
-      formData.value.projectId = projectId;
-      formData.value.nickname = user.nickname;
-      formData.value.studentAchievementRequirement = user.studentAchievementRequirement;
-      formData.value.major = user.major;
-    } finally {
-      formLoading.value = false
+  if (type === 'create'){
+    dialogTitle.value = '志愿填报'
+    formType.value = type
+    resetForm()
+    if (supervisorId) {
+      formLoading.value = true
+      try {
+        console.log(supervisorId)
+        const user = await UserApi.getUser(supervisorId);
+        // formData.value = await studentSelectSupervisorRecordApi.getstudentSelectSupervisorRecord(id)
+        console.log(user)
+        formData.value.supervisorId =supervisorId;
+        formData.value.projectId = projectId;
+        formData.value.nickname = user.nickname;
+        formData.value.studentAchievementRequirement = user.studentAchievementRequirement;
+        formData.value.major = user.major;
+      } finally {
+        formLoading.value = false
+      }
+    }
+  }
+  if (type === 'update'){
+    dialogTitle.value = '志愿编辑'
+    formType.value = type
+    resetForm()
+    if (id) {
+      formLoading.value = true
+      try {
+        // const user = await UserApi.getUser(supervisorId);
+        formData.value = await studentSelectSupervisorRecordApi.getStudentSelectSupervisorRecord(id)
+        console.log(formData.value)
+        // formData.value.supervisorId =supervisorId;
+        // formData.value.projectId = projectId;
+        // formData.value.nickname = user.nickname;
+        // formData.value.studentAchievementRequirement = user.studentAchievementRequirement;
+        // formData.value.major = user.major;
+      } finally {
+        formLoading.value = false
+      }
     }
   }
 }
@@ -161,6 +201,21 @@ const submitForm = async () => {
   }
 };
 
+//获取所有导师
+const supervisors = ref()
+const getSupervisor= async () => {
+  try {
+    const result = await UserApi.getSupervisor()
+    supervisors.value = result
+  } catch (error) {
+    console.error('未获取到导师', error)
+  }
+}
+
+const handleSupervisorChange = (values) => {
+  formData.value.supervisorIds = values;  // values 是选择的导师ID数组
+}
+
 
 /** 重置表单 */
 const resetForm = () => {
@@ -177,5 +232,9 @@ const resetForm = () => {
   }
   formRef.value?.resetFields()
 }
+/** 初始化 **/
+onMounted(() => {
+  getSupervisor()
+})
 </script>
 

+ 7 - 8
src/views/system/studentSelectionProject/index.vue

@@ -5,7 +5,7 @@
     :inline="true"
     label-width="200px"
   >
-    <el-form-item label="是否开启导师弹窗"  v-if="userInfo?.userType === '4' || userInfo?.userType ==null ">
+    <el-form-item label="是否开启导师弹窗"  v-if="userInfo?.userType === '4' ">
       <el-switch v-model="popData.isSupervisor" :active-value="1" :inactive-value="0" @change="(val) => handleSwitchChange(popData.id, 'isSupervisor', val)" />
     </el-form-item>
 
@@ -320,20 +320,19 @@ const getPopDataFunction = async () => {
   try {
     popData.value = await getPopData();
     isPopDataLoaded.value = true; // 更新标志
-    console.log(popData.value)
   } finally {
     loading.value = false;
   }
 }
 
 /** 初始化 **/
-onMounted(() => {
-  getList()
-  getUserInfo()
-  if (userInfo.value.userType==="4") {
-    getPopDataFunction()
+onMounted(async () => {
+  getList();
+  await getUserInfo(); // 等待用户信息加载完成
+  if (userInfo.value.userType === '4') {
+    getPopDataFunction();
   }
-})
+});
 </script>
 
 <style>

+ 52 - 88
src/views/system/studentSelf/index.vue

@@ -71,65 +71,66 @@
         @update:visible="dialogVisible = $event"
         @success="handleSuccess"
       />
+    />
   </div>
+  <student ref="studentFormRef" @success="getUserInfo"/>
  
 </template>
 
-<script lang="ts">
-import { defineComponent, reactive, ref, onMounted } from 'vue';
+<script setup lang="ts">
+import { ref, onMounted, nextTick, computed } from 'vue';
 import { useI18n } from 'vue-i18n';
 import { useMessage } from '@/hooks/web/useMessage';
 import SForm from './SForm.vue';
-import { getUserProfile, ProfileVO } from '@/api/system/user/profile'
+import student from '../userDetail/student.vue';
+import { getUserProfile, ProfileVO } from '@/api/system/user/profile';
+import { useRouter } from 'vue-router';
+import {PopDo,getIsPop} from '@/api/system/user/pop';
 
+const { t } = useI18n();
+const message = useMessage();
+const router = useRouter();
 
-export default defineComponent({
-  components: {
-    SForm,
-  },
-  setup() {
-    const { t } = useI18n();
-    const message = useMessage();
-    const dialogVisible = ref(false);
-    const loading = ref(true) // 列表的加载中
-    const formRef = ref();
+const dialogVisible = ref(false);
+const loading = ref(true);
+const formRef = ref();
+
+const studentFormRef = ref();
+const isPop  = ref();
+const userInfo = ref({} as ProfileVO);
+
+const extractedImageUrls = ref<string[]>([]);
+const cleanedremark = computed(() => {
+  return userInfo.value.remark ? userInfo.value.remark.replace(/<\/?[^>]+(>|$)/g, '') : '';
+});
 
-    // 将 userInfo 定义放入 setup 中
-const userInfo = ref({} as ProfileVO)
 const getUserInfo = async () => {
   try {
-    loading.value = true; 
+    loading.value = true;
     const users = await getUserProfile();
-    console.log(users, 'users');
     userInfo.value = users;
   } catch (error) {
     console.error('获取用户信息失败:', error);
   } finally {
-    loading.value = false; // 隐藏加载中
+    loading.value = false;
   }
-}
-
-const userTypeMapping = {
-  '1': '学生',
 };
 
 const openDialog = () => {
-  loading.value = true; // 显示加载中
   dialogVisible.value = true;
-  formRef.value.open(); // 打开弹窗
-  loading.value = false; // 隐藏加载中
+  formRef.value.open();
 };
 
-const extractedImageUrls = ref<string[]>([]);
 const handleSuccess = async (urls) => {
   extractedImageUrls.value = urls;
-  console.log('提取到的图片URL:', extractedImageUrls);
+  console.log('提取到的图片URL:', extractedImageUrls.value);
   dialogVisible.value = false;
   await getUserInfo();
 };
+
 const fetchImageUrls = async () => {
   try {
-    loading.value = true; // 开始加载
+    loading.value = true;
     const res = await getUserProfile();
     const urls = res.remark.match(/<img.*?src="(.*?)"/g);
     if (urls) {
@@ -143,74 +144,37 @@ const fetchImageUrls = async () => {
   } catch (error) {
     console.error('获取图片 URL 失败:', error);
   } finally {
-    loading.value = false; // 完成加载
+    loading.value = false;
   }
 };
-// 创建一个 computed 属性来处理并去掉 <p> 标签
-  const cleanedremark = computed(() => {
-  return userInfo.value.remark ? userInfo.value.remark.replace(/<\/?[^>]+(>|$)/g, '') : '';
-});
 
+const getPopDataFunction =(async ()=>{
+  isPop.value = await  getIsPop();
+  console.log(isPop.value)
+})
 
-    // 表单提交
-    // const submit = async () => {
-    //   try {
-    //     await formRef.value?.validate();
-    //     console.log('提交的数据:', form);
-    //     await updateDept(form).then((res) => {
-    //       console.log('更新成功:', res);
-    //     });
-    //     message.success('成功');
-    //   } catch (error) {
-    //     console.error('提交错误:', error);
-    //     message.error('错误');
-    //   }
-    // };
-
-
-    // 表单重置
-    // const init = async () => {
-    //   const res = await getUserProfile();
-    //   console.log('获取的数据:', res);
-    //   form.id = res.id;
-    //   form.address = res.address;
-    //   form.supervisor = res.user.nickname;
-    //   form.phone = res.phone;
-    //   form.email = res.email;
-    //   form.name = res.name;
-    //   form.leaderUserId = res.user.id;
-    //   form.remark = res.remark;
-    //   userInfo.value = res.user; 
-    // };
-
-    onMounted(async () => {
-      // await init();
-      await getUserInfo();
-      await fetchImageUrls(); // 这里 add 一個方法来加载图片
-    });
+const studentForm = () => {
+  if (studentFormRef.value) {
+    studentFormRef.value.open();
+  } else {
+    console.error('Student form component is not mounted yet!');
+  }
+};
 
-    return {
-      t,
-      // form,
-      userInfo,   
-      // init,
-      loading,
-      getUserInfo,
-      fetchImageUrls,
-      formRef,
-      dialogVisible,
-      openDialog,
-      handleSuccess,
-      extractedImageUrls,
-      cleanedremark,
-      userTypeMapping,
-    };
+onMounted(async () => {
+  await getUserInfo();
+  await fetchImageUrls();
+  if (userInfo.value.userType === '1') {
+    await getPopDataFunction();
+    if (isPop.value) {
+      await nextTick();
+      studentForm();
+    }
   }
 });
-
-
 </script>
 
+
 <style scoped>
 .user-info {
   margin-top: 10px;
@@ -297,4 +261,4 @@ const fetchImageUrls = async () => {
   height: auto; /* 保持高度自动 */
 }
 
-</style>
+</style>

+ 11 - 3
src/views/system/supervisorSelectionSetting/index.vue

@@ -120,9 +120,9 @@
         </template>
       </el-table-column>
       <el-table-column
-        label="创建时间"
+        label="更新时间"
         align="center"
-        prop="createTime"
+        prop="updateTime"
         :formatter="dateFormatter"
         width="180px"
       />
@@ -396,11 +396,19 @@ const getSupervisor= async () => {
     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;
+  }
+}
 
 
 const teacherRequireFormRef = ref()
 const openTeacherRequireForm = (supervisorId?: number) => {
-  teacherRequireFormRef.value.open(supervisorId)
+  teacherRequireFormRef.value.open("detail",supervisorId)
 }
 
 //志愿填报弹窗

+ 189 - 0
src/views/system/userDetail/student.vue

@@ -0,0 +1,189 @@
+
+<template>
+  <Dialog v-model="dialogVisible" :title="dialogTitle">
+    <el-form
+      ref="formRef"
+      v-loading="formLoading"
+      :model="formData"
+      :rules="formRules"
+      label-width="85px"
+      class="custom-form"
+    >
+    <el-row >
+      <el-col :span="12">
+        <el-form-item label="姓名" prop="nickname" >
+          <el-input v-model="formData.nickname" placeholder="自动链接"  />
+        </el-form-item>
+      </el-col>
+      <el-col :span="12">
+        <el-form-item label="学号" prop="userNumber">
+          <el-input v-model="formData.userNumber" placeholder="" />
+        </el-form-item>
+      </el-col>
+    </el-row>
+
+    <el-row >
+      <el-col :span="12">
+        <el-form-item label="专业" prop="major">
+          <el-input v-model="formData.major" placeholder="" />
+        </el-form-item>
+      </el-col>
+      <el-col :span="12">
+        <el-form-item label="联系电话" prop="mobile">
+          <el-input v-model="formData.mobile" placeholder="" />
+        </el-form-item>
+      </el-col>
+    </el-row>
+
+    <el-row  v-if="isStudent">
+      <el-col :span="24">
+        <el-form-item label="个人简历上传(PDF)" prop="introduction">
+          <upload-file v-model="formData.introduction" />
+        </el-form-item>
+      </el-col>
+    </el-row>
+
+    </el-form>
+    <template #footer>
+      <el-button :disabled="formLoading" type="primary" @click="submitForm" v-if="userInfo.userType==='1'">确 定</el-button>
+      <el-button @click="dialogVisible = false" v-if="userInfo.userType==='1'" >取 消</el-button>
+    </template>
+  </Dialog>
+</template>
+
+<script lang="ts" setup>
+import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
+import { CommonStatusEnum } from '@/utils/constants'
+import * as UserApi from '@/api/system/user'
+import { FormRules } from 'element-plus'
+import { getUserProfile, ProfileVO } from '@/api/system/user/profile'
+import {ref} from "vue";
+
+import {selectionBookVO,selectionBookApi} from '@/api/system/studentSelectSupervisorRecord/selectionBook'
+
+defineOptions({ name: 'studentForm' })
+
+const { t } = useI18n() // 国际化
+const message = useMessage() // 消息弹窗
+
+const dialogVisible = ref(false) // 弹窗的是否展示
+const dialogTitle = ref('') // 弹窗的标题
+const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
+const formType = ref('') // 表单的类型:create - 新增;update - 修改
+const formData = ref({
+  id: undefined,
+  sex: undefined,
+  nickname: '',
+  userNumber: '',//学号
+  major:'',//专业
+  mobile:"",
+  introduction:"",//简介PDF
+})
+const formRules = reactive<FormRules>({
+})
+const formRef = ref() // 表单 Ref
+const deptList = ref<Tree[]>([]) // 树形结构
+
+//获取登录人员信息
+const userInfo = ref({} as ProfileVO)
+const getUserInfo = async () => {
+  const users = await getUserProfile()
+  userInfo.value = users
+}
+const isStudent = computed(() => userInfo.value.userType === "1");
+  const open = async () => {
+  dialogVisible.value = true
+  dialogTitle.value = '信息填写'
+  formType.value = '' //
+  resetForm()
+  // 获取导师信息
+    formLoading.value = true
+    try {
+      const user = await UserApi.getUser(userInfo.value.id)
+      formData.value = user;
+    } finally {
+      formLoading.value = false
+    }
+
+}
+
+  defineExpose({ open }) // 提供 open 方法,用于打开弹窗
+
+/** 提交表单 */
+const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
+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]; // 只取数组的第一个元素
+      }
+      await selectionBookApi.updateSelectionBook(data)
+      console.log(data)
+      message.success("填写互选数据成功")
+      dialogVisible.value = false
+    // 发送操作成功的事件
+    emit('success')
+  } finally {
+    formLoading.value = false
+  }
+}
+
+/** 重置表单 */
+const resetForm = () => {
+  formData.value = {
+    id: undefined,
+    sex: undefined,
+    nickname: '',
+    userNumber: '',//学号
+    major:'',//专业
+    mobile:"",
+    introduction:"",//简介PDF
+  }
+  formRef.value?.resetFields()
+}
+onMounted(() => {
+   getUserInfo()
+
+})
+
+</script>
+
+<style scoped>
+.custom-form {
+  background-color: #f0f4f8; /* 浅灰色背景 */
+  padding: 20px;
+  border-radius: 8px;
+  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* 轻微阴影 */
+}
+.custom-form .el-form-item {
+  margin-bottom: 20px;
+}
+.custom-form .el-input,
+.custom-form .el-textarea {
+  width: 100%;
+  border-color: #d9d9d9; /* 输入框边框颜色 */
+}
+.custom-form .el-form-item__label {
+  color: #333; /* 标签文字颜色 */
+}
+.custom-form .el-input__inner,
+.custom-form .el-textarea__inner {
+  background-color: #fff; /* 输入框背景颜色 */
+  color: #333; /* 输入框文字颜色 */
+}
+.custom-form .el-button {
+  background-color: #6a1b9a; /* 按钮背景颜色 */
+  border-color: #6a1b9a;
+  color: #fff; /* 按钮文字颜色 */
+}
+.custom-form .el-button--primary {
+  background-color: #4a148c; /* 主要按钮背景颜色 */
+  border-color: #4a148c;
+}
+.custom-form .el-button:hover,
+.custom-form .el-button--primary:hover {
+  background-color: #5a0073; /* 按钮悬浮背景颜色 */
+  border-color: #5a0073;
+}
+</style>

+ 136 - 96
src/views/system/userDetail/teacher.vue

@@ -1,3 +1,4 @@
+
 <template>
   <Dialog v-model="dialogVisible" :title="dialogTitle">
     <el-form
@@ -5,78 +6,71 @@
       v-loading="formLoading"
       :model="formData"
       :rules="formRules"
-      label-width="85px"
+      label-width="120px"
+      class="custom-form"
     >
-      <el-row>
-        <el-col :span="12" v-if="formType === 'detail'">
-          <el-form-item label="姓名" prop="nickname">
-            <el-input v-model="formData.nickname" placeholder="请输入姓名" />
-          </el-form-item>
-        </el-col>
-        <el-col :span="12" v-if="formType === 'detail'">
-          <el-form-item label="职称" prop="">
-            <el-input model-value="导师"  />
-          </el-form-item>
-        </el-col>
-      </el-row>
+    <el-row>
+      <el-col :span="12">
+        <el-form-item label="姓名" prop="nickname" >
+          <el-input v-model="formData.nickname" placeholder="自动链接" :disabled="isStudent" />
+        </el-form-item>
+      </el-col>
+      <el-col :span="12">
+        <el-form-item label="职称" prop="title">
+          <el-input v-model="formData.title" placeholder="" :disabled="isStudent"/>
+        </el-form-item>
+      </el-col>
+    </el-row>
+    <el-row>
+      <el-col :span="24" >
+        <el-form-item label="外聘导师工作单位" prop="externalSupervisorWorkPlace">
+          <el-input v-model="formData.externalSupervisorWorkPlace" placeholder="填写区" :disabled="isStudent"/>
+        </el-form-item>
+      </el-col>
+    </el-row>
+    <el-row  >
+      <el-col :span="24">
+        <el-form-item label="合作的校内导师" prop="supervisor">
+          <el-input v-model="formData.supervisor" placeholder="自动链接" :disabled="isStudent"/>
+        </el-form-item>
+      </el-col>
+    </el-row>
+    <el-row  >
+      <el-col :span="12">
+        <el-form-item label="研究方向" prop="major">
+          <el-input v-model="formData.major" placeholder="" :disabled="isStudent" />
+        </el-form-item>
+      </el-col>
+    </el-row>
       <el-row >
-        <el-col :span="12" v-if="formType === 'detail'">
-          <el-form-item label="" prop="major">
-             <el-input v-model="formData.major" placeholder="请输入研究方向" />
-          </el-form-item>
-        </el-col>
-      </el-row>
-
-      <el-row>
-        <el-col :span="12" v-if="formType === 'detail'">
-          <el-form-item label="用户性别" prop="sex">
-            <el-select v-model="formData.sex" placeholder="请选择">
-              <el-option
-                v-for="dict in getIntDictOptions(DICT_TYPE.SYSTEM_USER_SEX)"
-                :key="dict.value"
-                :label="dict.label"
-                :value="dict.value"
-              />
-            </el-select>
-          </el-form-item>
-        </el-col>
-
-        <el-col :span="12" v-if="formType === 'detail'">
-          <el-form-item label="工号" prop="userNumber">
-            <el-input v-model="formData.userNumber" placeholder="请输入工号" />
-          </el-form-item>
-        </el-col>
-      </el-row>
-
-      <el-row>
-        <el-col :span="24" v-if="formType === 'detail'">
-          <el-form-item label="个人简介" prop="remark" >
-            <Editor v-model="formData.remark" ref="editorRef"/>
-          </el-form-item>
-        </el-col>
-      </el-row>
-
-      <el-row>
-        <el-col :span="24" v-if="formType === 'detail'">
-          <el-form-item label="对研究生毕业的成果要求" prop="studentAchievementRequirement">
-            <Editor v-model="formData.studentAchievementRequirement" ref="editorRef"/>
+        <el-col :span="24">
+          <el-form-item label="个人简历上传(PDF)" prop="introduction">
+            <upload-file v-model="formData.introduction" />
           </el-form-item>
         </el-col>
       </el-row>
-
+    <el-row  >
+      <el-col :span="24">
+        <el-form-item label="对研究生毕业时学术成果的要求" prop="studentAchievementRequirement">
+          <el-input type="textarea" v-model="formData.studentAchievementRequirement" placeholder="未填写时,默认为按学校及学院发表学术成果的要求执行" :disabled="isStudent" />
+        </el-form-item>
+      </el-col>
+    </el-row>
     </el-form>
     <template #footer>
-      <el-button :disabled="formLoading" type="primary" @click="submitForm">确 定</el-button>
-      <el-button @click="dialogVisible = false">取 消</el-button>
+      <el-button :disabled="formLoading" type="primary" @click="submitForm" v-if="userInfo.userType==='3'">确 定</el-button>
+      <el-button @click="dialogVisible = false" v-if="userInfo.userType==='3'" >取 消</el-button>
     </template>
   </Dialog>
 </template>
+
 <script lang="ts" setup>
 import { DICT_TYPE, getIntDictOptions } from '@/utils/dict'
 import { CommonStatusEnum } from '@/utils/constants'
 import * as UserApi from '@/api/system/user'
 import { FormRules } from 'element-plus'
 import { getUserProfile, ProfileVO } from '@/api/system/user/profile'
+import {selectionBookVO,selectionBookApi} from '@/api/system/studentSelectSupervisorRecord/selectionBook'
 
 defineOptions({ name: 'teacherRequireForm' })
 
@@ -90,15 +84,17 @@ const dialogTitle = ref('') // 弹窗的标题
 const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
 const formType = ref('') // 表单的类型:create - 新增;update - 修改
 const formData = ref({
-  supervisorId:undefined,
-  nickname: '',
   id: undefined,
   sex: undefined,
-  remark: '',
+  supervisorId:undefined,
+  nickname: '',
+  title: '',//职称
   status: CommonStatusEnum.ENABLE,
-  userNumber: '',
-  major:'',
+  userNumber: '',//工号
+  major:'',//研究方向
   studentAchievementRequirement:"",
+  introduction:"",//简介
+  externalSupervisorWorkPlace:""
 })
 const formRules = reactive<FormRules>({
 })
@@ -111,50 +107,53 @@ const getUserInfo = async () => {
   const users = await getUserProfile()
   userInfo.value = users
 }
-  const open = async (supervisorId: number) => {
+const isStudent = computed(() => userInfo.value.userType === "1");
+
+  const open = async (type:string,supervisorId: number) => {
   dialogVisible.value = true
-  dialogTitle.value = '查看详情'
-  formType.value = 'detail' // 假设你是要查看和编辑导师信息
-  resetForm()
-  // 获取导师信息
-  if (supervisorId) {
-    formLoading.value = true
-    try {
-      const user = await UserApi.getUser(supervisorId)
-      formData.value = {
-        ...user,
-        supervisorId: supervisorId, // 确保 supervisorId 也被设置
+    formType.value=type
+  if (formType.value == 'detail'){
+    dialogTitle.value = '查看详情'
+    resetForm()
+    if (supervisorId) {
+      formLoading.value = true
+      try {
+        const user = await UserApi.getUser(supervisorId)
+        formData.value = {
+          ...user,
+          supervisorId: supervisorId, // 确保 supervisorId 也被设置
+        }
+      } finally {
+        formLoading.value = false
       }
-    } finally {
-      formLoading.value = false
     }
-  }
+  } else if (formType.value == 'update'){
+      dialogTitle.value = '填写互选表信息'
+      resetForm()
+      // 获取导师信息
+        formLoading.value = true
+        try {
+          const user = await UserApi.getUser(userInfo.value.id)
+          formData.value =user
+        } finally {
+          formLoading.value = false
+        }
+      }
 }
   defineExpose({ open }) // 提供 open 方法,用于打开弹窗
 
 /** 提交表单 */
 const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
 const submitForm = async () => {
-  // 校验表单
-  if(formType.value === 'create-S'){
-    formData.value.userType = userTypeSt.value
-  }
-  if(formType.value === 'create-T'){
-    formData.value.userType = userTypeT.value
-  }
-  console.log(formData.value,'提交的表单');
-  if (!formRef.value) return
-  const valid = await formRef.value.validate()
-  if (!valid) return
   // 提交请求
   formLoading.value = true
   try {
-    const data = formData.value as unknown as UserApi.UserVO
-    if (formType.value === 'create-S'|| formType.value === 'create-T') {
-      await UserApi.createUser(data)
-      message.success(t('common.createSuccess'))
-    } else {
-      await UserApi.updateUser(data)
+    const data = formData.value as unknown as selectionBookVO
+    if (Array.isArray(data.introduction) && data.introduction.length > 0) {
+      data.introduction = data.introduction[0]; // 只取数组的第一个元素
+    }
+    if (formType.value === 'update') {
+      await selectionBookApi.updateSelectionBook(data)
       message.success(t('common.updateSuccess'))
     }
     dialogVisible.value = false
@@ -171,11 +170,13 @@ const resetForm = () => {
     nickname: '',
     id: undefined,
     sex: undefined,
-    remark: '',
+    title: '',//职称
     status: CommonStatusEnum.ENABLE,
-    userNumber: '',
-    major:'',
+    userNumber: '',//工号
+    major:'',//研究方向
     studentAchievementRequirement:"",
+    introduction:"",//简介
+    externalSupervisorWorkPlace:""
   }
   formRef.value?.resetFields()
 }
@@ -184,3 +185,42 @@ onMounted(() => {
 })
 
 </script>
+
+<style scoped>
+.custom-form {
+  background-color: #f0f4f8; /* 浅灰色背景 */
+  padding: 20px;
+  border-radius: 8px;
+  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* 轻微阴影 */
+}
+.custom-form .el-form-item {
+  margin-bottom: 20px;
+}
+.custom-form .el-input,
+.custom-form .el-textarea {
+  width: 100%;
+  border-color: #d9d9d9; /* 输入框边框颜色 */
+}
+.custom-form .el-form-item__label {
+  color: #333; /* 标签文字颜色 */
+}
+.custom-form .el-input__inner,
+.custom-form .el-textarea__inner {
+  background-color: #fff; /* 输入框背景颜色 */
+  color: #333; /* 输入框文字颜色 */
+}
+.custom-form .el-button {
+  background-color: #6a1b9a; /* 按钮背景颜色 */
+  border-color: #6a1b9a;
+  color: #fff; /* 按钮文字颜色 */
+}
+.custom-form .el-button--primary {
+  background-color: #4a148c; /* 主要按钮背景颜色 */
+  border-color: #4a148c;
+}
+.custom-form .el-button:hover,
+.custom-form .el-button--primary:hover {
+  background-color: #5a0073; /* 按钮悬浮背景颜色 */
+  border-color: #5a0073;
+}
+</style>