3 Commits 93444c0d4d ... 7474ca7a64

Author SHA1 Message Date
  47 7474ca7a64 55555 1 month ago
  47 e29867381e Merge branch 'master' of http://gogs.gisvg.com/YDM/graduate-ui 1 month ago
  47 9bd547b2d7 555 1 month ago

+ 1 - 1
src/api/system/userAchievement/index.ts

@@ -53,7 +53,7 @@ export const UserAchievementApi = {
     return await request.delete({ url: `/system/user-achievement/delete?id=` + id })
   },
 
-  // 导出成果 Excel
+  // 导出成果 Excel 
   exportUserAchievement: async (params) => {
     return await request.download({ url: `/system/user-achievement/export-excel`, params })
   },

+ 4 - 1
src/router/modules/remaining.ts

@@ -102,7 +102,10 @@ const remainingRouter: AppRouteRecordRaw[] = [
         path: '/system/Home/index',
         name: 'SystemHome',
         component: () => import('@/views/system/Home/Index.vue'),
-        meta: {}
+        meta: {
+          icon: 'ep:apple',
+          title: '首页',
+        }
       }
     ]
   },

+ 13 - 17
src/views/Login/components/LoginForm.vue

@@ -264,23 +264,19 @@ const handleLogin = async (params) => {
       authUtil.removeLoginForm()
     }
     authUtil.setToken(res)
-    try {
-      const userType = await LoginApi.getInfo();
-      console.log(userType,"我在这里");
-      console.log(userType);  // 查看 userType 的结构  
-      if (userType && Array.isArray(userType.roles)) {
-          if (userType.roles.indexOf("student") !== -1) {
-              console.log("我是学生");
-              window.location.href = '/system/studentSelf/index';
-          } else {
-              console.log("我不是学生");
-              window.location.href = '/system/Home/index';
-          }
-      } else {
-          console.error("userType 或 roles 格式错误");
-      }
-    } catch (error) {
-      console.error("获取用户信息时发生错误:", error);
+    const userType = await LoginApi.getInfo()
+    console.log(userType,"我在这里")
+    console.log(userType);  // 查看 userType 的结构
+    if (userType && Array.isArray(userType.roles)) {
+        if (userType.roles.indexOf("student") !== -1) {
+            console.log("我是学生");
+            window.location.href = '/system/studentSelf/index';
+        } else {
+            console.log("我不是学生");
+            window.location.href = '/system/Home/index';
+        }
+    } else {
+        console.error("userType 或 roles 格式错误");
     }
   } finally {
     loginLoading.value = false

+ 3 - 4
src/views/system/Home/Index.vue

@@ -141,7 +141,7 @@
                     暂无预测记录
                   </div> -->
                 </vue3ScrollSeamless>
-                <div v-if="list2.length == 0" style="width: 100%; height: 100px; display: flex; justify-content: center; align-items: center; margin-top: -230px;">
+                <div v-if="list.length == 0" style="width: 100%; height: 100px; display: flex; justify-content: center; align-items: center; margin-top: -230px;">
                   <el-empty description="暂无数据"/>
                 </div>
               </div>
@@ -230,7 +230,7 @@
                   <el-col :span="12" class="center text-18px" style="border: none;padding: 8px;margin-left: 5px; margin-top: -5px;">
                     <div>工作间</div>
                   </el-col>
-                  <el-col :span="12" class="center text-18px" style="border: none;padding: 8px;margin-left: -35px; margin-top: -5px;">
+                  <el-col :span="12" class="center text-18px" style="border: none;padding: 8px;margin-left: -15px; margin-top: -5px;">
                     <div>达成率</div>
                   </el-col>
                 </el-row>
@@ -464,8 +464,7 @@ const getStudentAttendance = async () => {
 const classOptions = reactive({
   step: 0.5,//滚动速度值越大越快,但是值太小会卡顿
   limitMoveNum: list.length,//无缝滚动列表元素的长度,一般设置为列表的长度
-  direction: 1,//方向: 0 往下 1 往上 2 向左 3 向右。
-                                                  
+  direction: 1,//方向: 0 往下 1 往上 2 向左 3 向右。                                          
 });
 
 /** 学生毕业条件达成率 */

+ 17 - 17
src/views/system/graduateStudent/UserForm.vue

@@ -104,7 +104,7 @@
         <el-col :span="12">
         <el-form-item label="用户类型" prop="userType">
             <!-- <span style="margin-left: 10px;">毕业生</span>
-            <input v-model="formData.userType" value="2" hidden />           -->
+            <input v-model="formData.userType" value="2" hidden /> -->
             <el-input v-model="userTypeG" value="毕业生" disabled />
           </el-form-item>
         </el-col>
@@ -121,22 +121,22 @@
           </el-form-item>
         </el-col> -->
         <el-col :span="12">
-              <el-form-item label="导师名称" prop="supervisorId" v-if="userInfo.userType === '4'">
-                  <el-select
-                    v-model="formData.supervisor"
-                    @change="handleSupervisorChange"
-                    placeholder="请选择导师名称"
-                    clearable
-                    filterable
-                    class="!w-full"
-                  >
-                    <el-option
-                      v-for="user in users"
-                      :key="user.id"
-                      :label="user.nickname"
-                      :value="user.id"
-                    />
-                  </el-select>
+          <el-form-item label="导师名称" prop="supervisorId" v-if="userInfo.userType === '4'">
+            <el-select
+              v-model="formData.supervisor"
+              @change="handleSupervisorChange"
+              placeholder="请选择导师名称"
+              clearable
+              filterable
+              class="!w-full"
+            >
+              <el-option
+                v-for="user in users"
+                :key="user.id"
+                :label="user.nickname"
+                :value="user.id"
+              />
+            </el-select>
           </el-form-item>
         </el-col>
         

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

@@ -231,7 +231,6 @@ const queryParams = reactive({
   createTime: [],
   detail: undefined,
   isGraduate: undefined,
-  
 })
 const queryFormRef = ref() // 搜索的表单
 const exportLoading = ref(false) // 导出的加载中

+ 2 - 2
src/views/system/studentAttendanceManage/studentFaceManage/index.vue

@@ -93,7 +93,7 @@
         >
           <Icon icon="ep:upload" class="mr-5px" /> 批量导入
         </el-button>
-        <el-button
+        <!-- <el-button
           type="success"
           plain
           @click="handleExport"
@@ -101,7 +101,7 @@
           v-hasPermi="['system:student-attendance:query']"
         >
           <Icon icon="ep:download" class="mr-5px" /> 导出
-        </el-button>
+        </el-button> -->
         
       </el-form-item>
     </el-form>

+ 16 - 2
src/views/system/workroomCollege/userAchievement/index.vue

@@ -159,11 +159,25 @@
         :formatter="dateFormatter"
         width="180px"
       />
-      <el-table-column label="图片材料" align="center">
-        <!-- #default获取当前·行数据 -->
+      <!-- <el-table-column label="图片材料" align="center">
         <template #default="{ row }">
           <a :href="row.detail" target="_blank" v-if="row.detail">{{ row.detail }}</a>
         </template>
+      </el-table-column> -->
+      <el-table-column label="图片材料" align="center" prop="detail" >
+        <template #default="{ row }">
+          <div class="demo-image__preview" v-if="queryParams" >
+              <el-image
+                style="width: 40px; height:40px;margin-right: 5px"
+                class="h-80px w-80px"
+                lazy
+                :src="row.detail"
+                :preview-src-list="[row.detail]"
+                preview-teleported
+                fit="cover"
+              />
+          </div>
+        </template>
       </el-table-column>
       <!-- <el-table-column label="操作" align="center" min-width="120px">
         <template #default="rowData">

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

@@ -159,11 +159,25 @@
         :formatter="dateFormatter"
         width="180px"
       />
-      <el-table-column label="图片材料" align="center">
-        <!-- #default获取当前·行数据 -->
+      <!-- <el-table-column label="图片材料" align="center">
         <template #default="{ row }">
           <a :href="row.detail" target="_blank" v-if="row.detail">{{ row.detail }}</a>
         </template>
+      </el-table-column> -->
+      <el-table-column label="图片材料" align="center" prop="detail" >
+        <template #default="{ row }">
+          <div class="demo-image__preview" v-if="queryParams" >
+              <el-image
+                style="width: 40px; height:40px;margin-right: 5px"
+                class="h-80px w-80px"
+                lazy
+                :src="row.detail"
+                :preview-src-list="[row.detail]"
+                preview-teleported
+                fit="cover"
+              />
+          </div>
+        </template>
       </el-table-column>
       <!-- <el-table-column label="操作" align="center" min-width="120px">
         <template #default="rowData">