Browse Source

改了一点点

yzx 1 month ago
parent
commit
a69140b0b1

+ 2 - 2
src/views/Home/Index.vue

@@ -379,8 +379,8 @@ let pieOptionsData = reactive<EChartsOption>(pieOptions) as EChartsOption
 const getGraduateCount = async () => {
   const data = await UserApi.getGraduateCount()
   console.log("毕业达成统计", data);
-  const studentNum = data[0].studentNum; 
-  const graduateNum = data[1].graduateNum; 
+  const studentNum = data.studentNum;
+  const graduateNum = data.graduateNum;
   const options = {
     title: {
       text: null,

+ 5 - 4
src/views/system/workroomCollege/dept/index.vue

@@ -61,7 +61,7 @@
           class="!w-240px"
         />
       </el-form-item>
-    
+
       <!-- <el-form-item label="负责人" prop="leaderUserId">
         <el-select
           v-model="queryParams.leaderUserId"
@@ -265,9 +265,9 @@ const handleFormSuccess = (urls) => {
 
 const router = useRouter()
 const openUserAchievement = (id) => {
-  router.push({ 
-    name: 'DeptInfo', 
-    query: { id: id }, 
+  router.push({
+    name: 'DeptInfo',
+    query: { id: id },
   });
 }
 
@@ -332,3 +332,4 @@ onMounted(async () => {
   getSupervisor()
 })
 </script>
+

+ 12 - 12
src/views/system/workroomCollege/user/UserForm.vue

@@ -82,7 +82,7 @@
         </el-col>
         <el-col :span="12" v-if="formType === 'create-S'">
           <el-form-item label="用户类型" prop="userType">
-            <el-input  v-model="userTypeSt" value="在校生" placeholder="在校生" :disabled="true"/> 
+            <el-input  v-model="userTypeSt" value="在校生" placeholder="在校生" :disabled="true"/>
           </el-form-item>
         </el-col>
         <el-col :span="12" v-if="formType === 'create-T' || formType === 'update-T'">
@@ -97,7 +97,7 @@
             </el-select>
           </el-form-item>
           <!-- <el-form-item label="用户类型" prop="userType">
-            <span style="margin-left: 10px;">导师</span> 
+            <span style="margin-left: 10px;">导师</span>
             <input type="hidden" v-model="formData.userType" value="3" />
           </el-form-item> -->
         </el-col>
@@ -130,7 +130,7 @@
           </el-form-item>
         </el-col>
       </el-row>
-  
+
       <el-row>
         <el-col :span="12">
           <el-form-item label="学号" prop="userNumber" v-if="formType === 'create-S' || formType === 'update-S'">
@@ -166,19 +166,19 @@
       <!-- <el-row>
         <el-col :span="24" v-if="formType === 'update-S'">
           <el-form-item label="毕业条件" >
-            <el-select 
-              v-model="formData.isGraduate" 
-              prop="isGraduate" 
-              placeholder="是否达成毕业条件" 
+            <el-select
+              v-model="formData.isGraduate"
+              prop="isGraduate"
+              placeholder="是否达成毕业条件"
               clearable
             >
               <el-option
                 label='已达成'
-                :value="0" 
+                :value="0"
               />
               <el-option
-                label='未达成' 
-                :value="1"  
+                label='未达成'
+                :value="1"
               />
             </el-select>
           </el-form-item>
@@ -299,7 +299,7 @@ const users = ref()
 const getSupervisor= async () => {
   try {
     const response = await UserApi.getSupervisor()
-    users.value = response
+    users.value = response || []
   } catch (error) {
     console.error('Error fetching user data:', error)
   }
@@ -349,7 +349,7 @@ const submitForm = async () => {
     formData.value.userType = userTypeSt.value
   }
   console.log(formData.value,'提交的表单');
-  if (!formRef) return
+  if (!formRef.value) return
   const valid = await formRef.value.validate()
   if (!valid) return
   // 提交请求

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

@@ -139,3 +139,4 @@ const importTemplate = async () => {
   download.excel(res, '导师导入模版.xls')
 }
 </script>
+

+ 1 - 1
src/views/system/workroomTeacher/dept/DeptForm.vue

@@ -148,4 +148,4 @@ const getSupervisor = async () => {
 onMounted(() => {
   getSupervisor();
 });
-</script>
+</script>

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

@@ -404,4 +404,4 @@ const fetchImageUrls = async () => {
   height: auto; /* 保持高度自动 */
 }
 
-</style>
+</style>