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