47 1 kuukausi sitten
vanhempi
commit
ad3cadb313

+ 6 - 1
src/views/system/graduateStudent/UserForm.vue

@@ -305,7 +305,12 @@ const handleSupervisorChange = (value: number) => {
 /** 打开弹窗 */
 const open = async (type: string, id?: number) => {
   dialogVisible.value = true
-  dialogTitle.value = t('action.' + type)
+  // dialogTitle.value = t('action.' + type)
+  if (type === 'create') {
+    dialogTitle.value = '创建毕业生'
+  } else {
+    dialogTitle.value = '修改'
+  }
   formType.value = type
   resetForm()
   // 修改时,设置数据

+ 1 - 1
src/views/system/graduateStudent/UserImportForm.vue

@@ -1,5 +1,5 @@
 <template>
-  <Dialog v-model="dialogVisible" title="用户导入" width="400">
+  <Dialog v-model="dialogVisible" title="批量导入" width="400">
     <el-upload
       ref="uploadRef"
       v-model:file-list="fileList"

+ 6 - 1
src/views/system/selfAchievement/UserAchievementForm.vue

@@ -115,7 +115,12 @@ const sorts = ref([
 /** 打开弹窗 */
 const open = async (type: string, id?: number) => {
   dialogVisible.value = true
-  dialogTitle.value = t('action.' + type)
+  // dialogTitle.value = t('action.' + type)
+  if (type === 'create') {
+    dialogTitle.value = '创建成果'
+  } else {
+    dialogTitle.value = '修改'
+  }
   formType.value = type
   resetForm()
   // 修改时,设置数据

+ 1 - 1
src/views/system/selfAchievement/index.vue

@@ -177,7 +177,7 @@
             v-hasPermi="['system:user-achievement:update']"
           >
             <Icon icon="ep:edit"/>
-            编辑
+            修改
           </el-button>
           <el-button
             link

+ 1 - 1
src/views/system/studentAttendanceManage/studentAttendanceExcused/StudentAttendanceForm.vue

@@ -1,5 +1,5 @@
 <template>
-  <Dialog :title="dialogTitle" v-model="dialogVisible">
+  <Dialog title='创建请假' v-model="dialogVisible">
     <el-form
       ref="formRef"
       :model="formData"

+ 1 - 1
src/views/system/studentAttendanceManage/studentFaceManage/StudentFaceImport.vue

@@ -1,5 +1,5 @@
 <template>
-  <Dialog v-model="dialogVisible" title="用户批量导入" width="400">
+  <Dialog v-model="dialogVisible" title="批量导入" width="400">
     <el-upload
       ref="uploadRef"
       v-model:file-list="fileList"

+ 15 - 8
src/views/system/studentSelf/SForm.vue

@@ -1,5 +1,5 @@
 <template>
-  <Dialog v-model="dialogVisible" :title="dialogTitle">
+  <Dialog v-model="dialogVisible" title='修改个人信息'>
     <el-form
       ref="formRef"
       v-loading="formLoading"
@@ -41,12 +41,12 @@
       </el-row>
       <el-row>
         <el-col :span="12">
-          <el-form-item label="用户类型" prop="userType">
-            <el-select v-model="formData.userType" placeholder="请选择用户类型" disabled="true">
+          <el-form-item label="用户类型" prop="major">
+            <el-select v-model="formData.major" placeholder="请选择专业">
              <el-option
-                v-for="option in userTypes"
+                v-for="option in majors"
                 :key="option.value"
-                :label="option.label"
+                :label="option.value"
                 :value="option.value"
                 />
             </el-select>
@@ -106,7 +106,7 @@ const formData = ref({
   password: '',
   sex: undefined,
   remark: '',
-  userType: undefined,
+  major: undefined,
   userNumber: '',
   dept: undefined,
   deptId: undefined,
@@ -143,6 +143,12 @@ const userTypes = [
   { value: '1', label: '学生' },
 ]
 
+const majors = [
+  { value: '测绘工程' },
+  { value: '测绘科学与技术' },
+  { value: '资源与环境' },
+]
+
 /** 打开弹窗 */
 const open = async (id?: number) => {
   dialogVisible.value = true
@@ -192,8 +198,9 @@ const submitForm = async () => {
     } as unknown as UserProfileUpdateReqVO
     await updateUserProfile(data)
     message.success(t('common.updateSuccess'));
-    dialogVisible.value = false
+    await getUserProfile();
     emit('success' , imageUrls.value)
+    dialogVisible.value = false
   } finally {
     formLoading.value = false
   }
@@ -220,7 +227,7 @@ const resetForm = () => {
     password: '',
     sex: undefined,
     remark: '',
-    userType: undefined,
+    major: undefined,
     userNumber: '',
     dept: undefined,
     deptId: undefined,

+ 4 - 3
src/views/system/studentSelf/index.vue

@@ -39,8 +39,8 @@
           <div class="info-row">
             <li class="info-item">
               <Icon class="mr-5px" icon="ep:user" />
-              <span class="info-label">用户类型:</span>
-              <span class="pull-right"> {{ userTypeMapping[userInfo.userType] || '未知用户类型' }}</span>
+              <span class="info-label">专业:</span>
+              <span class="pull-right"> {{ userInfo.major }}</span>
             </li>
             <li class="info-item">
               <Icon class="mr-5px" icon="ep:bell" />
@@ -121,10 +121,11 @@ const openDialog = () => {
 };
 
 const extractedImageUrls = ref<string[]>([]);
-const handleSuccess = (urls) => {
+const handleSuccess = async (urls) => {
   extractedImageUrls.value = urls;
   console.log('提取到的图片URL:', extractedImageUrls);
   dialogVisible.value = false;
+  await getUserInfo();
 };
 const fetchImageUrls = async () => {
   try {

+ 6 - 1
src/views/system/workroomCollege/dept/DeptForm.vue

@@ -132,7 +132,12 @@ const userList = ref<UserApi.UserVO[]>([]) // 用户列表
 /** 打开弹窗 */
 const open = async (type: string, id?: number) => {
   dialogVisible.value = true
-  dialogTitle.value = t('action.' + type)
+  // dialogTitle.value = t('action.' + type)
+  if (type === 'create') {
+  dialogTitle.value = '创建工作间'
+  } else {
+    dialogTitle.value = '修改'
+  }
   formType.value = type
   resetForm()
   // 修改时,设置数据

+ 8 - 4
src/views/system/workroomCollege/user/UserForm.vue

@@ -373,10 +373,14 @@ const handleSupervisorChange = (value: number) => {
 /** 打开弹窗 */
 const open = async (type: string, id?: number) => {
   dialogVisible.value = true
-  if (type === 'create-S' || type === 'create-T') {
-    dialogTitle.value = '新增'
-  } else if (type === 'update-T' || type === 'update-S') {
-    dialogTitle.value = '编辑'
+  if (type === 'create-S') {
+    dialogTitle.value = '创建学生'
+  }
+  if (type === 'create-T'){
+    dialogTitle.value = '创建教师'
+  }
+  else if (type === 'update-T' || type === 'update-S') {
+    dialogTitle.value = '修改'
   }
   formType.value = type
   resetForm()

+ 1 - 1
src/views/system/workroomCollege/user/UserImportFormzip.vue

@@ -1,5 +1,5 @@
 <template>
-  <Dialog v-model="dialogVisible" title="用户批量导入" width="400">
+  <Dialog v-model="dialogVisible" title="批量导入" width="400">
     <el-upload
       ref="uploadRef"
       v-model:file-list="fileList"

+ 1 - 1
src/views/system/workroomCollege/user/studentImportForm.vue

@@ -1,5 +1,5 @@
 <template>
-  <Dialog v-model="dialogVisible" title="用户导入" width="400">
+  <Dialog v-model="dialogVisible" title="批量导入" width="400">
     <el-upload
       ref="uploadRef"
       v-model:file-list="fileList"

+ 1 - 1
src/views/system/workroomCollege/user/teacherImportForm .vue

@@ -1,5 +1,5 @@
 <template>
-  <Dialog v-model="dialogVisible" title="用户导入" width="400">
+  <Dialog v-model="dialogVisible" title="批量导入" width="400">
     <el-upload
       ref="uploadRef"
       v-model:file-list="fileList"

+ 2 - 2
src/views/system/workroomTeacher/TeacherSelf/TForm.vue

@@ -1,5 +1,5 @@
 <template>
-  <Dialog v-model="dialogVisible" :title="dialogTitle">
+  <Dialog v-model="dialogVisible" title='修改个人信息'>
     <el-form
       ref="formRef"
       v-loading="formLoading"
@@ -97,7 +97,7 @@ const message = useMessage() // 消息弹窗
 const userTypeSt = ref('1')
 
 const dialogVisible = ref(false) // 弹窗的是否展示
-const dialogTitle = ref('') // 弹窗的标题
+// const dialogTitle = ref('') // 弹窗的标题
 const formLoading = ref(false) // 表单的加载中:1)修改时的数据加载;2)提交的按钮禁用
 const formData = ref({
   mobile: '',

+ 1 - 0
src/views/system/workroomTeacher/TeacherSelf/index.vue

@@ -138,6 +138,7 @@ const handleSuccess = (urls) => {
   extractedImageUrls.value = urls;
   console.log('提取到的图片URL:', extractedImageUrls);
   dialogVisible.value = false;
+  getUserInfo(); // 更新用户信息
 };
 const fetchImageUrls = async () => {
   try {

+ 2 - 1
src/views/system/workroomTeacher/dept/index.vue

@@ -218,10 +218,11 @@ const openDialog = () => {
 };
 
 const extractedImageUrls = ref<string[]>([]);
-const handleSuccess = (urls) => {
+const handleSuccess = async (urls) => {
   extractedImageUrls.value = urls;
   console.log('提取到的图片URL:', extractedImageUrls);
   dialogVisible.value = false;
+  await fetchUserInfo(); // 更新用户信息
 };
 const fetchImageUrls = async () => {
   try {

+ 8 - 4
src/views/system/workroomTeacher/user/UserForm.vue

@@ -333,10 +333,14 @@ const masterTypeOptions = [
 /** 打开弹窗 */
 const open = async (type: string, id?: number) => {
   dialogVisible.value = true;
-  if (type === 'create-S' || type === 'create-T') {
-    dialogTitle.value = '新增'
-  } else if (type === 'update-T' || type === 'update-S') {
-    dialogTitle.value = '编辑'
+  if (type === 'create-S') {
+    dialogTitle.value = '创建学生'
+  }
+  if (type === 'create-T'){
+    dialogTitle.value = '创建教师'
+  }
+  else if (type === 'update-T' || type === 'update-S') {
+    dialogTitle.value = '修改'
   }
   formType.value = type;
   resetForm();