|
@@ -45,6 +45,36 @@
|
|
|
</el-form-item>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
|
+
|
|
|
+ <el-row v-if="formType === 'create-S' || formType === 'update-S'">
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="专业" prop="major">
|
|
|
+ <!-- <el-input v-model="formData.major" placeholder="请输入专业" /> -->
|
|
|
+ <el-select v-model="formData.major" placeholder="请选择专业">
|
|
|
+ <el-option
|
|
|
+ v-for="option in majorOptions"
|
|
|
+ :key="option.value"
|
|
|
+ :label="option.value"
|
|
|
+ :value="option.value"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="12">
|
|
|
+ <el-form-item label="专硕" prop="masterType">
|
|
|
+ <!-- <el-input v-model="formData.masterType" placeholder="请输入学位类型" /> -->
|
|
|
+ <el-select v-model="formData.masterType" placeholder="请选择学位类型">
|
|
|
+ <el-option
|
|
|
+ v-for="option in masterTypeOptions"
|
|
|
+ :key="option.value"
|
|
|
+ :label="option.value"
|
|
|
+ :value="option.value"
|
|
|
+ />
|
|
|
+ </el-select>
|
|
|
+ </el-form-item>
|
|
|
+ </el-col>
|
|
|
+ </el-row>
|
|
|
+
|
|
|
<el-row>
|
|
|
<el-col :span="12">
|
|
|
<el-form-item label="手机号码" prop="mobile">
|
|
@@ -189,7 +219,9 @@ const formData = ref({
|
|
|
supervisor:'',
|
|
|
supervisorId:'',
|
|
|
supervisorMobile: '',
|
|
|
- workPlace:""
|
|
|
+ workPlace:"",
|
|
|
+ major: "",
|
|
|
+ masterType: "",
|
|
|
})
|
|
|
const formRules = reactive<FormRules>({
|
|
|
nickname: [{ required: true, message: '姓名不能为空', trigger: 'blur' }],
|
|
@@ -237,6 +269,19 @@ const gradeOptions = computed(() => {
|
|
|
];
|
|
|
});
|
|
|
|
|
|
+// 获取所有专业
|
|
|
+const majorOptions = [
|
|
|
+ { value: '测绘工程' },
|
|
|
+ { value: '地理信息系统' },
|
|
|
+ { value: '遥感科学' },
|
|
|
+]
|
|
|
+
|
|
|
+// 获取所有学位类型
|
|
|
+const masterTypeOptions = [
|
|
|
+ { value: '硕士' },
|
|
|
+ { value: '博士' },
|
|
|
+]
|
|
|
+
|
|
|
//获取所有导师
|
|
|
const users = ref()
|
|
|
const getSupervisor= async () => {
|
|
@@ -283,6 +328,8 @@ defineExpose({ open }) // 提供 open 方法,用于打开弹窗
|
|
|
const emit = defineEmits(['success']) // 定义 success 事件,用于操作成功后的回调
|
|
|
const submitForm = async () => {
|
|
|
formData.value.userType = userTypeG.value
|
|
|
+ formData.value.username = 'abc0123'
|
|
|
+ formData.value.password = 'abc0123'
|
|
|
// 校验表单
|
|
|
if (!formRef) return
|
|
|
const valid = await formRef.value.validate()
|
|
@@ -327,7 +374,9 @@ const resetForm = () => {
|
|
|
supervisor:'',
|
|
|
supervisorId:'',
|
|
|
supervisorMobile: '',
|
|
|
- workPlace:""
|
|
|
+ workPlace:"",
|
|
|
+ major: "",
|
|
|
+ masterType: "",
|
|
|
}
|
|
|
formRef.value?.resetFields()
|
|
|
}
|