Browse Source

数据总览页面调整

hzj18279462576@163.com 9 months atrás
parent
commit
87b06951aa

+ 214 - 212
src/stores/index.js

@@ -53,203 +53,221 @@ export const useCounterStore = defineStore("user", {
     async ROLEAdd() {
       // 获取菜单权限列表
       this.roleList = [];
-      let datas = {
-        accountId: sessionStorage.getItem("accountId"),
-      };
-      const res = await https.get(
-        "/welcome/api/welcomeAccount/getAccountAuthority",
-        "params",
-        datas
-      ); // 使用封装的 get 方法
-      console.log(res, "获取菜单权限列表");
-      if (res.code == 200) {
-        this.collegeRole = res.data.welcomeOrgList;
-        let roles = res.data.welcomeRole;
-        this.roleId = res.data.welcomeRole.id;
-        let btn = [];
-        // 数据总览
-        if (roles.dataManagementSetting) {
-          let arr = roles.dataManagementSetting.split(",");
-          arr.forEach((i) => {
-            btn.push(`dataOverview${i}`);
-            if (i == 1) {
-              this.roleList.push({
-                name: "数据总览",
-                path: "/dataOverview",
-                icon: "dataOverview",
-              });
-            }
-          });
-        }
-        // 学生信息设置
-        if (roles.studentManagementSetting) {
-          let arr = roles.studentManagementSetting.split(",");
-          arr.forEach((i) => {
-            btn.push(`studentManagementSetting${i}`);
-            if (i == 7) {
-              this.roleList.push({
-                name: "学生信息管理",
-                path: "/studentInfo",
-                icon: "studentInfo",
-              });
-            }
-          });
-        }
-        // 楼栋管理设置
-        if (roles.buildingManagementSetting) {
-          let arr = roles.buildingManagementSetting.split(",");
-          arr.forEach((i) => {
-            btn.push(`buildingManagementSetting${i}`);
-            if (i == 6) {
-              this.roleList.push({
-                name: "楼栋信息管理",
-                path: "/building",
-                icon: "building",
-              });
-            }
-          });
-        }
-        // 宿舍管理设置
-        if (roles.dormitoryManagementSetting) {
-          let arr = roles.dormitoryManagementSetting.split(",");
-          arr.forEach((i) => {
-            btn.push(`dormitoryManagementSetting${i}`);
-            if (i == 10) {
-              this.roleList.push({
-                name: "寝室信息管理",
-                path: "/dormitory",
-                icon: "dormitory",
-              });
-            }
-          });
-        }
-        // 床位管理设置
-        if (roles.bedManagementSetting) {
-          let arr = roles.bedManagementSetting.split(",");
-          arr.forEach((i) => {
-            btn.push(`bedManagementSetting${i}`);
-            if (i == 13) {
-              this.roleList.push({
-                name: "床位信息管理",
-                path: "/bed",
-                icon: "bed",
-              });
-            }
-          });
-        }
-        // 学生住宿设置
-        if (roles.studentAccommodationSetting) {
-          let arr = roles.studentAccommodationSetting.split(",");
-          arr.forEach((i) => {
-            btn.push(`studentAccommodationSetting${i}`);
-            if (i == 2) {
-              this.roleList.push({
-                name: "学生住宿信息",
-                path: "/student",
-                icon: "student",
-              });
-            }
-          });
-        }
-        // 住宿信息统计
-        if (roles.accommodationStatisticsSetting) {
-          let arr = roles.accommodationStatisticsSetting.split(",");
-          arr.forEach((i) => {
-            btn.push(`accommodationStatisticsSetting${i}`);
-            if (i == 2) {
-              this.roleList.push({
-                name: "住宿信息统计",
-                path: "/quarterage",
-                icon: "quarterage",
-              });
-            }
-          });
-        }
-        // 访客信息管理
-        if (roles.visitorManagementSetting) {
-          let arr = roles.visitorManagementSetting.split(",");
-          arr.forEach((i) => {
-            btn.push(`visitorManagementSetting${i}`);
-            if (i == 5) {
-              this.roleList.push({
-                name: "访客信息管理 ",
-                path: "/caller",
-                icon: "caller",
-              });
-            }
-          });
-        }
-        // 选宿舍金额设置
-        if (roles.dormitoryMoneySetting) {
-          let arr = roles.dormitoryMoneySetting.split(",");
-          arr.forEach((i) => {
-            btn.push(`dormitoryMoneySetting${i}`);
-            if (i == 6) {
-              this.roleList.push({
-                name: "选宿舍金额设置 ",
-                path: "/moneySetting",
-                icon: "moneySetting",
-              });
-            }
-          });
-        }
-        // 用户管理
-        if (roles.accountManagementSetting) {
-          let arr = roles.accountManagementSetting.split(",");
-          arr.forEach((i) => {
-            btn.push(`accountManagementSetting${i}`);
-            if (i == 4) {
-              this.roleList.push({
-                name: "用户管理 ",
-                path: "/user",
-                icon: "user",
-              });
-            }
-          });
-        }
-        // 角色管理
-        if (roles.roleManagementSetting) {
-          let arr = roles.roleManagementSetting.split(",");
-          arr.forEach((i) => {
-            btn.push(`roleManagementSetting${i}`);
-            if (i == 4) {
-              this.roleList.push({
-                name: "角色管理 ",
-                path: "/role",
-                icon: "role",
-              });
-            }
-          });
-        }
-        
-        // 系统设置
-        if (roles.settingManagementSetting) {
-          let arr = roles.settingManagementSetting.split(",");
-          arr.forEach((i) => {
-            btn.push(`settingManagementSetting${i}`);
-            if (i == 2) {
-              this.roleList.push({
-                name: "系统设置 ",
-                path: "/system",
-                icon: "system",
-              });
-            }
-          });
-        }
-        // sessionStorage.setItem("btnRole", btn.toString());
-        this.btnRole = btn;
-        const modules = import.meta.glob("../views/**/*.vue");
-        let roleList = this.roleList;
-        if (roleList) {
-          roleList.forEach((item) => {
-            let arr = {
-              path: item.path,
-              name: item.path,
-              meta: { isAuth: true, title: item.name, showHeader: true },
-              component: modules[`../views${item.path}${item.path}.vue`],
-            };
-            router.addRoute(arr);
+      if (sessionStorage.getItem("accountId")) {
+        let datas = {
+          accountId: sessionStorage.getItem("accountId"),
+        };
+        const res = await https.get(
+          "/welcome/api/welcomeAccount/getAccountAuthority",
+          "params",
+          datas
+        ); // 使用封装的 get 方法
+        console.log(res, "获取菜单权限列表");
+        if (res.code == 200) {
+          this.collegeRole = res.data.welcomeOrgList;
+          let roles = res.data.welcomeRole;
+          this.roleId = res.data.welcomeRole.id;
+          let btn = [];
+          // 数据总览
+          if (roles.dataManagementSetting) {
+            let arr = roles.dataManagementSetting.split(",");
+            arr.forEach((i) => {
+              btn.push(`dataOverview${i}`);
+              if (i == 1) {
+                this.roleList.push({
+                  name: "数据总览",
+                  path: "/dataOverview",
+                  icon: "dataOverview",
+                });
+              }
+            });
+          }
+          // 学生信息设置
+          if (roles.studentManagementSetting) {
+            let arr = roles.studentManagementSetting.split(",");
+            arr.forEach((i) => {
+              btn.push(`studentManagementSetting${i}`);
+              if (i == 7) {
+                this.roleList.push({
+                  name: "学生信息管理",
+                  path: "/studentInfo",
+                  icon: "studentInfo",
+                });
+              }
+            });
+          }
+          // 楼栋管理设置
+          if (roles.buildingManagementSetting) {
+            let arr = roles.buildingManagementSetting.split(",");
+            arr.forEach((i) => {
+              btn.push(`buildingManagementSetting${i}`);
+              if (i == 6) {
+                this.roleList.push({
+                  name: "楼栋信息管理",
+                  path: "/building",
+                  icon: "building",
+                });
+              }
+            });
+          }
+          // 宿舍管理设置
+          if (roles.dormitoryManagementSetting) {
+            let arr = roles.dormitoryManagementSetting.split(",");
+            arr.forEach((i) => {
+              btn.push(`dormitoryManagementSetting${i}`);
+              if (i == 10) {
+                this.roleList.push({
+                  name: "寝室信息管理",
+                  path: "/dormitory",
+                  icon: "dormitory",
+                });
+              }
+            });
+          }
+          // 床位管理设置
+          if (roles.bedManagementSetting) {
+            let arr = roles.bedManagementSetting.split(",");
+            arr.forEach((i) => {
+              btn.push(`bedManagementSetting${i}`);
+              if (i == 13) {
+                this.roleList.push({
+                  name: "床位信息管理",
+                  path: "/bed",
+                  icon: "bed",
+                });
+              }
+            });
+          }
+          // 学生住宿设置
+          if (roles.studentAccommodationSetting) {
+            let arr = roles.studentAccommodationSetting.split(",");
+            arr.forEach((i) => {
+              btn.push(`studentAccommodationSetting${i}`);
+              if (i == 2) {
+                this.roleList.push({
+                  name: "学生住宿信息",
+                  path: "/student",
+                  icon: "student",
+                });
+              }
+            });
+          }
+          // 住宿信息统计
+          if (roles.accommodationStatisticsSetting) {
+            let arr = roles.accommodationStatisticsSetting.split(",");
+            arr.forEach((i) => {
+              btn.push(`accommodationStatisticsSetting${i}`);
+              if (i == 2) {
+                this.roleList.push({
+                  name: "住宿信息统计",
+                  path: "/quarterage",
+                  icon: "quarterage",
+                });
+              }
+            });
+          }
+          // 访客信息管理
+          if (roles.visitorManagementSetting) {
+            let arr = roles.visitorManagementSetting.split(",");
+            arr.forEach((i) => {
+              btn.push(`visitorManagementSetting${i}`);
+              if (i == 5) {
+                this.roleList.push({
+                  name: "访客信息管理 ",
+                  path: "/caller",
+                  icon: "caller",
+                });
+              }
+            });
+          }
+          // 选宿舍金额设置
+          if (roles.dormitoryMoneySetting) {
+            let arr = roles.dormitoryMoneySetting.split(",");
+            arr.forEach((i) => {
+              btn.push(`dormitoryMoneySetting${i}`);
+              if (i == 6) {
+                this.roleList.push({
+                  name: "选宿舍金额设置 ",
+                  path: "/moneySetting",
+                  icon: "moneySetting",
+                });
+              }
+            });
+          }
+          // 用户管理
+          if (roles.accountManagementSetting) {
+            let arr = roles.accountManagementSetting.split(",");
+            arr.forEach((i) => {
+              btn.push(`accountManagementSetting${i}`);
+              if (i == 4) {
+                this.roleList.push({
+                  name: "用户管理 ",
+                  path: "/user",
+                  icon: "user",
+                });
+              }
+            });
+          }
+          // 角色管理
+          if (roles.roleManagementSetting) {
+            let arr = roles.roleManagementSetting.split(",");
+            arr.forEach((i) => {
+              btn.push(`roleManagementSetting${i}`);
+              if (i == 4) {
+                this.roleList.push({
+                  name: "角色管理 ",
+                  path: "/role",
+                  icon: "role",
+                });
+              }
+            });
+          }
+
+          // 系统设置
+          if (roles.settingManagementSetting) {
+            let arr = roles.settingManagementSetting.split(",");
+            arr.forEach((i) => {
+              btn.push(`settingManagementSetting${i}`);
+              if (i == 2) {
+                this.roleList.push({
+                  name: "系统设置 ",
+                  path: "/system",
+                  icon: "system",
+                });
+              }
+            });
+          }
+          // sessionStorage.setItem("btnRole", btn.toString());
+          this.btnRole = btn;
+          const modules = import.meta.glob("../views/**/*.vue");
+          let roleList = this.roleList;
+          if (roleList) {
+            roleList.forEach((item) => {
+              let arr = {
+                path: item.path,
+                name: item.path,
+                meta: { isAuth: true, title: item.name, showHeader: true },
+                component: modules[`../views${item.path}${item.path}.vue`],
+              };
+              router.addRoute(arr);
+            });
+            router.addRoute({
+              path: "/404",
+              name: "NotFound",
+              component: () => import("@/views/404/404.vue"),
+            });
+            router.addRoute({
+              path: "/:pathMatch(.*)*",
+              redirect: "/404",
+            });
+            console.log("动态添加路由");
+          }
+
+          router.push({
+            path: roleList[0].path,
           });
+        } else {
+          console.log("动态添加路由失败");
           router.addRoute({
             path: "/404",
             name: "NotFound",
@@ -259,23 +277,7 @@ export const useCounterStore = defineStore("user", {
             path: "/:pathMatch(.*)*",
             redirect: "/404",
           });
-          console.log("动态添加路由");
         }
-
-        router.push({
-          path: roleList[0].path,
-        });
-      } else {
-        console.log("动态添加路由失败");
-        router.addRoute({
-          path: "/404",
-          name: "NotFound",
-          component: () => import("@/views/404/404.vue"),
-        });
-        router.addRoute({
-          path: "/:pathMatch(.*)*",
-          redirect: "/404",
-        });
       }
     },
     BtnRole(flag) {

+ 31 - 16
src/utils/request.js

@@ -4,7 +4,7 @@ import router from "../router"; // 确保路径正确
 
 const instance = axios.create({
   baseURL: import.meta.env.VITE_API_BASE_URL,
-  timeout: 5000,
+  timeout: 10000,
 });
 // 请求拦截器
 instance.interceptors.request.use(
@@ -90,19 +90,34 @@ export const https = {
     return request(api + url, flag, params, "DELETE");
   },
 };
-// // 封装 POST 请求
-// export const post = (url: string, data: any = {}) => {
-//   return request(api+url, data, 'POST');
-// };
-// // 封装 GET 请求
-// export const get = (url: string, params: any = {}) => {
-//   return request(api+url, params, 'GET');
-// };
-// // 封装 POST 请求
-// export const put = (url: string, data: any = {}) => {
-//   return request(api+url, data, 'PUT');
-// };
-// // 封装 POST 请求
-// export const delete = (url: string, params: any = {}) => {
-//   return request(api+url, params, 'DELETE');
+// 优化后的方法 (推荐这种,上门那种因为接口在优化前已写完没办法改)
+// export const https = (method, url, flag, data = {}, responseType = null) => {
+//   const config = {
+//     url: `/welcome/welcome_api${url}`, // 代理地址
+//     method,
+//     responseType,
+//   };
+
+//   if (flag === "params") {
+//     config.params = data;
+//   } else if (flag === "data") {
+//     config.data = data;
+//   }
+
+//   return instance(config);
 // };
+
+// GET 请求
+// https("GET", "/example", "params", { id: 1 }).then((res) => {
+//   console.log(res);
+// });
+
+// // POST 请求
+// https("POST", "/example", "data", { name: "test" }).then((res) => {
+//   console.log(res);
+// });
+
+// // GET Blob 请求
+// https("GET", "/example", "params", { id: 1 }, "blob").then((res) => {
+//   console.log(res);
+// });

+ 68 - 24
src/views/dataOverview/dataOverview.vue

@@ -2,7 +2,23 @@
   <div class="content-box">
     <div class="left">
       <!-- <el-icon :size="23" class="camera"><VideoCameraFilled /></el-icon> -->
-      <div class="cameratxt">数据总览</div>
+      <div class="cameratxt">
+        数据总览
+        <el-select
+          @change="collegeChange"
+          v-model="searchInput.college"
+          placeholder="请选择院系"
+          clearable
+          style="width: 250px; margin-left: 20px"
+        >
+          <el-option
+            v-for="i in collegeData"
+            :key="i.id"
+            :label="i.name"
+            :value="i.id"
+          />
+        </el-select>
+      </div>
     </div>
     <!-- 处置情况 -->
     <!-- <div class="system_title">
@@ -102,20 +118,6 @@
               <span style="font-size: 20px">{{ studentTotalP }}%</span></span
             >
           </span>
-          <el-select
-            @change="collegeChange"
-            v-model="searchInput.college"
-            placeholder="请选择院系"
-            clearable
-            style="width: 250px"
-          >
-            <el-option
-              v-for="i in collegeData"
-              :key="i.id"
-              :label="i.name"
-              :value="i.id"
-            />
-          </el-select>
         </div>
         <div id="echarts_register"></div>
       </div>
@@ -131,7 +133,7 @@
             <span
               >本科现场报到率 :
               <span style="font-size: 20px; margin-right: 20px"
-                >{{ levelRate[2] }}%</span
+                >{{ levelRate[0] }}%</span
               ></span
             >
             <span
@@ -142,7 +144,7 @@
             >
             <span
               >专科现场报到率 :
-              <span style="font-size: 20px">{{ levelRate[0] }}%</span></span
+              <span style="font-size: 20px">{{ levelRate[2] }}%</span></span
             >
           </span>
           <!-- <el-select
@@ -311,9 +313,14 @@ let genderEcharts = null;
 
 // 处置情况
 const studentOverview = async () => {
+  let params = {
+    // accountId: sessionStorage.getItem("accountId"),
+    collegeId: searchInput.college,
+  };
   let res = await https.get(
     "/welcome/api/welcomeStudent/studentOverview",
-    "params"
+    "params",
+    params
   );
   console.log(res, "处置情况");
   if (res.code == 200) {
@@ -371,6 +378,7 @@ const register = async () => {
   registerEcharts = echarts.init(dom);
   let params = {
     collegeId: searchInput.college,
+    // accountId: sessionStorage.getItem("accountId"),
   };
   let res = await https.get(
     "/welcome/api/welcomeStudent/studentRegister",
@@ -472,16 +480,25 @@ const register = async () => {
 };
 
 const collegeChange = () => {
+  studentOverview();
   register();
+  levelRegister();
+  traffic();
+  gender();
 };
 
 // 新生报到层次统计
 const levelRegister = async () => {
   let dom = document.getElementById("echarts_levelRegister");
   levelRegisterEcharts = echarts.init(dom);
+  let params = {
+    // accountId: sessionStorage.getItem("accountId"),
+    collegeId: searchInput.college,
+  };
   let res = await https.get(
     "/welcome/api/welcomeStudent/levelRegister",
-    "params"
+    "params",
+    params
   );
   console.log(res, "新生报到层次统计");
   if (res.code == 200) {
@@ -491,7 +508,18 @@ const levelRegister = async () => {
       totalCount: [],
     };
     levelRate.value = [];
-    let arr = res.data.slice(0, -1).reverse();
+    // let arr = res.data.slice(0, -1).reverse();
+    let sortedData = res.data.slice(0, -1);
+
+    // 定义自定义排序顺序
+    const customOrder = ["本科", "专升本", "专科"];
+
+    // 对数据进行排序
+    const arr = sortedData.sort((a, b) => {
+      return customOrder.indexOf(a.name) - customOrder.indexOf(b.name);
+    });
+    console.log(sortedData,"整合数据");
+
     let manTotal = 0;
     arr.forEach((i) => {
       manTotal += i.count;
@@ -648,10 +676,14 @@ const traffic = async () => {
   var chartDom = document.getElementById("echarts_traffic");
   trafficEcharts = echarts.init(chartDom);
   var option;
-
+  let params = {
+    // accountId: sessionStorage.getItem("accountId"),
+    collegeId: searchInput.college,
+  };
   let res = await https.get(
     "/welcome/api/welcomeStudent/studentTraffic",
-    "params"
+    "params",
+    params
   );
   console.log(res, "学生交通方式");
   if (res.code == 200) {
@@ -736,9 +768,14 @@ const traffic = async () => {
 const gender = async () => {
   var chartDom = document.getElementById("gender");
   genderEcharts = echarts.init(chartDom);
+  let params = {
+    // accountId: sessionStorage.getItem("accountId"),
+    collegeId: searchInput.college,
+  };
   let res = await https.get(
     "/welcome/api/welcomeStudent/studentSexRatio",
-    "params"
+    "params",
+    params
   );
   console.log(res, "学生性别比例");
   if (res.code == 200) {
@@ -836,9 +873,14 @@ const gender = async () => {
 
 // 学生住宿情况
 const studentStay = async () => {
+  let params = {
+    // accountId: sessionStorage.getItem("accountId"),
+    collegeId: searchInput.college,
+  };
   let res = await https.get(
     "/welcome/api/welcomeStudent/studentStay",
-    "params"
+    "params",
+    params
   );
   console.log(res, "学生住宿情况");
   if (res.code == 200) {
@@ -1000,6 +1042,7 @@ onBeforeUnmount(() => {
         margin: 0 auto;
       }
       .total {
+        display: inline-block;
         position: relative;
         top: 0;
         left: 50px;
@@ -1015,6 +1058,7 @@ onBeforeUnmount(() => {
         margin: 0 auto;
       }
       .total {
+        display: inline-block;
         position: relative;
         top: 0;
         left: 50px;

+ 384 - 0
src/views/login/login copy.vue

@@ -0,0 +1,384 @@
+<template>
+  <div class="box">
+    <!-- <div class="middle"></div> -->
+    <div class="left">
+      <div class="loginForm">
+        <div
+          style="
+            display: flex;
+            flex-direction: column;
+            align-items: center;
+            justify-content: center;
+            margin-top: 104px;
+            margin-bottom: 61px;
+          "
+        >
+          <img
+            src="@/assets/img/logo.png"
+            alt=""
+            style="width: 95px; height: 95px; margin-bottom: 15px"
+          />
+          <div
+            style="
+              font-size: 30px;
+              font-weight: 600;
+              letter-spacing: 0px;
+              color: rgba(0, 0, 0, 1);
+            "
+          >
+            迎新系统管理平台
+          </div>
+        </div>
+        <el-form
+          ref="ruleFormRef"
+          :model="ruleForm"
+          status-icon
+          :rules="rules"
+          label-width="120px"
+          class="demo-ruleForm"
+        >
+          <el-form-item label="" prop="user">
+            <el-input
+              :prefix-icon="User"
+              v-model="ruleForm.user"
+              placeholder="请输入登录名"
+              autocomplete="off"
+            />
+          </el-form-item>
+          <el-form-item label="" prop="pass">
+            <el-input
+              :prefix-icon="Lock"
+              show-password
+              v-model="ruleForm.pass"
+              type="password"
+              autocomplete="off"
+              placeholder="请输入登录密码"
+            />
+          </el-form-item>
+          <el-checkbox v-model="checked" class="remeberPwd el-form-item"
+            >记住密码</el-checkbox
+          >
+          <el-form-item>
+            <el-button
+              :loading="loading"
+              type="primary"
+              @click="submitForm(ruleFormRef)"
+              >登录</el-button
+            >
+          </el-form-item>
+        </el-form>
+      </div>
+      <div class="rLogin">
+        <img src="@/assets/img/login3.png" alt="" />
+      </div>
+    </div>
+  </div>
+</template>
+
+<script setup>
+import { ref, reactive, onMounted, onUnmounted } from "vue";
+import { User, Lock } from "@element-plus/icons-vue";
+import { useRouter } from "vue-router";
+import { ElMessage } from "element-plus";
+import { JSEncrypt } from "jsencrypt"; // 加密密码
+import { https } from "@/utils/request"; // 接口请求封装
+import { useCounterStore } from "@/stores/index";
+
+const store = useCounterStore();
+
+const router = useRouter();
+const loading = ref(false);
+const ruleFormRef = ref();
+const ruleForm = reactive({
+  user: "",
+  pass: "",
+});
+const checked = ref(false); // 记住密码
+
+const rules = reactive({
+  user: [{ required: true, message: "请填写用户名", trigger: "blur" }],
+  pass: [{ required: true, message: "请填写密码", trigger: "blur" }],
+});
+
+const submitForm = (formEl) => {
+  if (!formEl) return;
+  formEl.validate(async (valid) => {
+    if (valid) {
+      loading.value = true;
+      // let publicKey =
+      //   "MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQDMOcPB06u5yKyQsPjfVWiWgbEIrd14kiXNNihciaVKb6HnkQvq7zpQuZ80WEX94spnUMI3iOAl/GmIvHrpGwcbB4hJbznm+PajiwnUSPuCCXA68YJF640cJKb/8KeM7WVz69OFkIEPHhVxOy4FFF5QWe/kt6zOZ19HmE+ak+5x/QIDAQAB";
+      // let encryptor = new JSEncrypt(); // 新建JSEncrypt对象
+      // encryptor.setPublicKey(publicKey); // 设置公钥
+      // let rsaPassWord = encryptor.encrypt(ruleForm.pass); // 对密码进行加密
+      // console.log(rsaPassWord);
+      let data = {
+        account: ruleForm.user,
+        password: ruleForm.pass,
+      };
+      // let data = new FormData();
+      // data.set("number", ruleForm.user);
+      // data.set("password", ruleForm.pass); //前面的key记得对应!
+      const res = await https.post("/welcome/api/home/login", "data", data); // 使用封装的 get 方法
+      console.log(res, "登录获取数据");
+      if (res.code == 200) {
+        sessionStorage.setItem("accountId", res.data.accountId);
+        if (checked.value) {
+          localStorage.setItem("user", ruleForm.user);
+          localStorage.setItem("pass", ruleForm.pass);
+        } else {
+          localStorage.removeItem("user", ruleForm.user);
+          localStorage.removeItem("pass", ruleForm.pass);
+        }
+        localStorage.setItem("token", res.data.token);
+        localStorage.setItem("userName", res.data.userName);
+        store.ROLEAdd();
+
+        ElMessage({
+          type: "success",
+          showClose: true,
+          message: "登录成功",
+          center: true,
+        });
+      } else {
+        ElMessage({
+          type: "error",
+          showClose: true,
+          message: "登录失败",
+          center: true,
+        });
+        loading.value = false;
+      }
+    } else {
+      return false;
+    }
+  });
+};
+const Enters = (e) => {
+  // console.log("按键:", e.key);
+  if (e.key == "Enter") {
+    submitForm(ruleFormRef.value);
+  }
+};
+onMounted(() => {
+  if (localStorage.getItem("pass") && localStorage.getItem("user")) {
+    ruleForm.user = localStorage.getItem("user");
+    ruleForm.pass = localStorage.getItem("pass");
+    checked.value = true;
+  }
+  if (localStorage.getItem("user")) {
+    ruleForm.user = localStorage.getItem("user");
+  }
+  document.addEventListener("keyup", Enters);
+});
+onUnmounted(() => {
+  document.removeEventListener("keyup", Enters);
+});
+</script>
+
+<style lang="scss" scoped>
+.box {
+  width: 100%;
+  height: 100vh;
+  min-width: 1200px;
+  // width: 1920px;
+  // height: 1080px;
+  background: url(@/assets/img/bg.png) 100% 100%;
+  background-size: cover;
+  display: flex;
+  align-items: center;
+  justify-content: center;
+  // .middle {
+  //   width: 1180px;
+  //   height: 740px;
+  //   position: absolute;
+
+  // }
+  .left {
+    box-shadow: 39px 30px 58px 0px rgba(8, 53, 115, 0.55);
+
+    width: 1180px;
+    height: 740px;
+    border-radius: 18px;
+    display: flex;
+    align-items: center;
+    background-size: 110% 116%;
+    background-position: -19px -28px;
+    .loginForm {
+      width: 497px;
+      height: 740px;
+      background-color: #fff;
+      border-radius: 18px 0 0 18px;
+
+      .el-form {
+        width: 500px;
+        display: flex;
+        flex-direction: column;
+        justify-content: center;
+        align-items: center;
+        .el-form-item {
+          width: 420px;
+          height: 60px;
+          // margin-bottom: 40px;
+
+          :deep(.el-form-item__content) {
+            margin-left: 0 !important;
+
+            .el-input {
+              height: 60px;
+
+              .el-input__wrapper {
+                border-radius: 12px;
+                .el-input__prefix {
+                  margin: 0 10px 0 12px;
+                }
+              }
+
+              .el-icon {
+                width: 24px;
+                height: 24px;
+                svg {
+                  width: 24px;
+                  height: 24px;
+                }
+              }
+              .el-input__inner {
+                height: 100%;
+                font-size: 24px;
+              }
+            }
+            .el-form-item__error {
+              font-size: 16px;
+            }
+            .el-button {
+              width: 100%;
+              height: 60px;
+              font-size: 24px;
+              border-radius: 12px;
+            }
+          }
+
+          .el-button--primary {
+            width: 380px;
+          }
+        }
+        .remeberPwd {
+          height: 30px;
+          margin-bottom: 30px;
+          :deep(.el-checkbox__input) {
+            .el-checkbox__inner {
+              width: 18px;
+              height: 18px;
+            }
+            .el-checkbox__inner::after {
+              width: 6px;
+              height: 12px;
+              top: -1px;
+            }
+          }
+          :deep(.el-checkbox__label) {
+            font-size: 18px;
+          }
+        }
+      }
+    }
+    .rLogin {
+      width: 683px;
+      height: 740px;
+      border-radius: 0 18px 18px 0;
+      display: flex;
+      background: rgba(41, 142, 243, 1);
+      img {
+        width: 683px;
+        align-self: flex-end;
+      }
+    }
+  }
+  // @media (max-width: 500px) {
+  //   .left {
+  //     width: 100%;
+  //     height:100%;
+  //     .loginForm {
+  //       width:100%;
+  //       height:100%;
+  //       background-color: #fff;
+  //       border-radius: 18px 0 0 18px;
+
+  //       .el-form {
+  //         width: 100%;
+  //         display: flex;
+  //         flex-direction: column;
+  //         justify-content: center;
+  //         align-items: center;
+  //         .el-form-item {
+  //           width: 90%;
+  //           height: 40px;
+  //           // margin-bottom: 40px;
+
+  //           :deep(.el-form-item__content) {
+  //             margin-left: 0 !important;
+
+  //             .el-input {
+  //               height: 50px;
+
+  //               .el-input__wrapper {
+  //                 border-radius: 12px;
+  //                 .el-input__prefix {
+  //                   margin: 0 10px 0 12px;
+  //                 }
+  //               }
+
+  //               .el-icon {
+  //                 width: 24px;
+  //                 height: 24px;
+  //                 svg {
+  //                   width: 24px;
+  //                   height: 24px;
+  //                 }
+  //               }
+  //               .el-input__inner {
+  //                 height: 100%;
+  //                 font-size: 24px;
+  //               }
+  //             }
+  //             .el-form-item__error {
+  //               font-size: 16px;
+  //             }
+  //             .el-button {
+  //               width: 100%;
+  //               height: 50px;
+  //               font-size: 24px;
+  //               border-radius: 12px;
+  //             }
+  //           }
+
+  //           .el-button--primary {
+  //             width: 90%;
+  //           }
+  //         }
+  //         .remeberPwd {
+  //           height: 30px;
+  //           margin-bottom: 30px;
+  //           :deep(.el-checkbox__input) {
+  //             .el-checkbox__inner {
+  //               width: 18px;
+  //               height: 18px;
+  //             }
+  //             .el-checkbox__inner::after {
+  //               width: 6px;
+  //               height: 12px;
+  //               top: -1px;
+  //             }
+  //           }
+  //           :deep(.el-checkbox__label) {
+  //             font-size: 18px;
+  //           }
+  //         }
+  //       }
+  //     }
+  //     .rLogin {
+  //       display: none;
+  //     }
+  //   }
+  // }
+}
+</style>

+ 93 - 3
src/views/login/login.vue

@@ -121,7 +121,7 @@ const submitForm = (formEl) => {
       const res = await https.post("/welcome/api/home/login", "data", data); // 使用封装的 get 方法
       console.log(res, "登录获取数据");
       if (res.code == 200) {
-        sessionStorage.setItem("accountId",res.data.accountId)
+        sessionStorage.setItem("accountId", res.data.accountId);
         if (checked.value) {
           localStorage.setItem("user", ruleForm.user);
           localStorage.setItem("pass", ruleForm.pass);
@@ -131,8 +131,8 @@ const submitForm = (formEl) => {
         }
         localStorage.setItem("token", res.data.token);
         localStorage.setItem("userName", res.data.userName);
-        store.ROLEAdd() 
-        
+        store.ROLEAdd();
+
         ElMessage({
           type: "success",
           showClose: true,
@@ -179,6 +179,9 @@ onUnmounted(() => {
 .box {
   width: 100%;
   height: 100vh;
+  min-width: 1200px;
+  // width: 1920px;
+  // height: 1080px;
   background: url(@/assets/img/bg.png) 100% 100%;
   background-size: cover;
   display: flex;
@@ -290,5 +293,92 @@ onUnmounted(() => {
       }
     }
   }
+  // @media (max-width: 500px) {
+  //   .left {
+  //     width: 100%;
+  //     height:100%;
+  //     .loginForm {
+  //       width:100%;
+  //       height:100%;
+  //       background-color: #fff;
+  //       border-radius: 18px 0 0 18px;
+
+  //       .el-form {
+  //         width: 100%;
+  //         display: flex;
+  //         flex-direction: column;
+  //         justify-content: center;
+  //         align-items: center;
+  //         .el-form-item {
+  //           width: 90%;
+  //           height: 40px;
+  //           // margin-bottom: 40px;
+
+  //           :deep(.el-form-item__content) {
+  //             margin-left: 0 !important;
+
+  //             .el-input {
+  //               height: 50px;
+
+  //               .el-input__wrapper {
+  //                 border-radius: 12px;
+  //                 .el-input__prefix {
+  //                   margin: 0 10px 0 12px;
+  //                 }
+  //               }
+
+  //               .el-icon {
+  //                 width: 24px;
+  //                 height: 24px;
+  //                 svg {
+  //                   width: 24px;
+  //                   height: 24px;
+  //                 }
+  //               }
+  //               .el-input__inner {
+  //                 height: 100%;
+  //                 font-size: 24px;
+  //               }
+  //             }
+  //             .el-form-item__error {
+  //               font-size: 16px;
+  //             }
+  //             .el-button {
+  //               width: 100%;
+  //               height: 50px;
+  //               font-size: 24px;
+  //               border-radius: 12px;
+  //             }
+  //           }
+
+  //           .el-button--primary {
+  //             width: 90%;
+  //           }
+  //         }
+  //         .remeberPwd {
+  //           height: 30px;
+  //           margin-bottom: 30px;
+  //           :deep(.el-checkbox__input) {
+  //             .el-checkbox__inner {
+  //               width: 18px;
+  //               height: 18px;
+  //             }
+  //             .el-checkbox__inner::after {
+  //               width: 6px;
+  //               height: 12px;
+  //               top: -1px;
+  //             }
+  //           }
+  //           :deep(.el-checkbox__label) {
+  //             font-size: 18px;
+  //           }
+  //         }
+  //       }
+  //     }
+  //     .rLogin {
+  //       display: none;
+  //     }
+  //   }
+  // }
 }
 </style>

+ 58 - 10
src/views/studentInfo/studentInfo.vue

@@ -8,6 +8,17 @@
       <div class="middle">
         <div class="filter">
           <div class="condition">
+            <span>校区 :</span>
+            <el-select
+              clearable
+              v-model="searchInput.schoolId"
+              placeholder="请选择校区"
+            >
+            <el-option label="墨轩湖校区" value="墨轩湖校区" />
+            <el-option label="黄家湖校区" value="黄家湖校区" />
+            </el-select>
+          </div>
+          <div class="condition">
             <span>院系 :</span>
             <el-select
               @change="collegeChange"
@@ -102,6 +113,17 @@
             </el-select>
           </div>
           <div class="condition">
+            <span>车牌信息 :</span>
+            <el-select
+              clearable
+              v-model="searchInput.carNumber"
+              placeholder="请选择"
+            >
+              <el-option label="有" value="1" />
+              <el-option label="无" value="0" />
+            </el-select>
+          </div>
+          <div class="condition">
             <span>现场报到 :</span>
             <el-select
               clearable
@@ -113,6 +135,18 @@
             </el-select>
           </div>
           <div class="condition">
+            <span>层次 :</span>
+            <el-select
+              clearable
+              v-model="searchInput.batchValue"
+              placeholder="请选择层次"
+            >
+              <el-option label="本科" value="本科" />
+              <el-option label="专升本" value="专升本" />
+              <el-option label="专科" value="专科" />
+            </el-select>
+          </div>
+          <div class="condition">
             <span>姓名 :</span>
             <el-input
               clearable
@@ -311,7 +345,9 @@
             label="现场报到"
           >
             <template #default="{ row }">
-              <span v-if="row.isRegistered == 1" style="color: #2279ec">已报到</span>
+              <span v-if="row.isRegistered == 1" style="color: #2279ec"
+                >已报到</span
+              >
               <span v-else>未报到</span>
             </template>
           </el-table-column>
@@ -1433,15 +1469,18 @@ const activeIndex = ref(); // 默认跳转路由
 const dialongTitle = ref("新增账号"); // 弹窗标题
 
 const searchInput = reactive({
+  schoolId:"",
   college: "",
   major: "",
   classstr: "",
   trafficMethod: "",
   fillStatus: "",
-  isPay:"",
-  isCheck:"",
+  isPay: "",
+  isCheck: "",
   name: "",
-  isRegistered:"",
+  batchValue:"",
+  carNumber:"",
+  isRegistered: "",
 }); // 搜索按钮数据
 
 const currentPage = ref(1); // 当前页
@@ -2036,9 +2075,12 @@ const getList = async () => {
     trafficMethod: searchInput.trafficMethod,
     name: searchInput.name,
     fillStatus: searchInput.fillStatus,
-    isPay:searchInput.isPay,
-    isCheck:searchInput.isCheck,
+    isPay: searchInput.isPay,
+    isCheck: searchInput.isCheck,
     isRegistered: searchInput.isRegistered,
+    school: searchInput.schoolId,
+    batchValue: searchInput.batchValue,
+    carNumber: searchInput.carNumber,
   };
   console.log(params);
 
@@ -2077,9 +2119,12 @@ const resetBtn = lodash.debounce(async () => {
   searchInput.trafficMethod = null;
   searchInput.name = null;
   searchInput.fillStatus = null;
-  searchInput.isPay=null;
-  searchInput.isCheck=null;
+  searchInput.isPay = null;
+  searchInput.isCheck = null;
   searchInput.isRegistered = null;
+  searchInput.schoolId=null
+  searchInput.batchValue=null
+  searchInput.carNumber=null
   getList();
 }, 300);
 
@@ -2766,9 +2811,12 @@ const buildExportbtn = async () => {
     trafficMethod: searchInput.trafficMethod,
     name: searchInput.name,
     fillStatus: searchInput.fillStatus,
-    isPay:searchInput.isPay,
-    isCheck:searchInput.isCheck,
+    isPay: searchInput.isPay,
+    isCheck: searchInput.isCheck,
     isRegistered: searchInput.isRegistered,
+    school: searchInput.schoolId,
+    batchValue: searchInput.batchValue,
+    carNumber: searchInput.carNumber,
   };
   let res = await https.getBlob(
     "/welcome/api/welcomeStudent/welcomeStudentExport",