Crazy 1 ماه پیش
والد
کامیت
bac58cd064

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

@@ -94,7 +94,7 @@
   <!-- 列表 -->
   <ContentWrap>
     <el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
-      <el-table-column label="Id" align="center" prop="id" />
+      <el-table-column type="index" width="50" />
       <!-- <el-table-column label="用户 Id" align="center" prop="userId" v-if="false" /> -->
       <!-- <el-table-column label="账号" align="center" prop="userName" /> -->
       <el-table-column label="成果名称" align="center" prop="achievementName" />
@@ -288,4 +288,4 @@ const handleExport = async () => {
 onMounted(() => {
   getList()
 })
-</script>
+</script>

+ 7 - 10
src/views/system/workroomCollege/user/UserForm.vue

@@ -126,14 +126,7 @@
         </el-col>
         <el-col :span="12" v-if="formType === 'create-T' || formType === 'update-T'">
           <el-form-item label="用户类型" prop="userType">
-            <el-select v-model="formData.userType" placeholder="请选择用户类型">
-              <el-option
-                v-for="option in userTypes"
-                :key="option.value"
-                :label="option.label"
-                :value="option.value"
-                />
-            </el-select>
+            <el-input  v-model="userTypeT" value="导师" placeholder="导师" :disabled="true"/>
           </el-form-item>
           <!-- <el-form-item label="用户类型" prop="userType">
             <span style="margin-left: 10px;">导师</span>
@@ -247,6 +240,7 @@ defineOptions({ name: 'SystemUserForm' })
 const { t } = useI18n() // 国际化
 const message = useMessage() // 消息弹窗
 const userTypeSt = ref('1')
+const userTypeT = ref('3')
 
 const dialogVisible = ref(false) // 弹窗的是否展示
 const dialogTitle = ref('') // 弹窗的标题
@@ -278,7 +272,7 @@ const formData = ref({
 const formRules = reactive<FormRules>({
   username: [{ required: true, message: '账号不能为空', trigger: 'blur' }],
   nickname: [{ required: true, message: '姓名不能为空', trigger: 'blur' }],
-  // password: [{ required: true, message: '用户密码不能为空', trigger: 'blur' }],
+  password: [{ required: true, message: '用户密码不能为空', trigger: 'blur' }],
   email: [
     { required: true, message: '邮箱不能为空', trigger: 'blur' }, // 确保这是必填
     {
@@ -305,7 +299,7 @@ const formRules = reactive<FormRules>({
   ],
   // supervisor: [{ required: true, message: '导师不能为空', trigger: 'blur' }],
   userNumber: [{ required: true, message: '学号不能为空', trigger: 'blur' }],
-  userType: [{ required: true, message: '用户类型不能为空', trigger: 'blur' }],
+  // userType: [{ required: true, message: '用户类型不能为空', trigger: 'blur' }],
 })
 
 const formRef = ref() // 表单 Ref
@@ -414,6 +408,9 @@ 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()

+ 0 - 1
src/views/system/workroomCollege/userAchievement/index.vue

@@ -110,7 +110,6 @@
   <ContentWrap>
     <el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
       <el-table-column type="index" width="50" />
-      <el-table-column label="Id" align="center" prop="id" />
       <el-table-column label="用户 Id" align="center" prop="userId" v-if="false" />
       <!-- <el-table-column label="姓名" align="center" prop="userName" /> -->
       <el-table-column label="成果名称" align="center" prop="achievementName" />

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

@@ -110,7 +110,6 @@
   <ContentWrap>
     <el-table v-loading="loading" :data="list" :stripe="true" :show-overflow-tooltip="true">
       <el-table-column type="index" width="50" />
-      <el-table-column label="Id" align="center" prop="id" />
       <el-table-column label="用户 Id" align="center" prop="userId" v-if="false" />
       <!-- <el-table-column label="姓名" align="center" prop="userName" /> -->
       <el-table-column label="成果名称" align="center" prop="achievementName" />
@@ -314,4 +313,4 @@ onMounted(() => {
   getList()
   getDeptUser()
 })
-</script>
+</script>