Browse Source

修改bug

hzj18279462576@163.com 1 năm trước cách đây
mục cha
commit
95a4a34b7c

+ 55 - 6
src/router/index.js

@@ -28,11 +28,18 @@ const routes = [
         meta: { isAuth: true, title: "系统首页" },
         component: () => import("@/views/home/home.vue"),
       },
+
       // {
-      //   path: "statement",
-      //   name: "statement",
-      //   meta: { isAuth: true, title: "统计报表" },
-      //   component: () => import("@/views/statement/statement.vue"),
+      //   path: "systemHome",
+      //   name: "systemHome",
+      //   meta: { isAuth: true, title: "系统首页" },
+      //   component: () => import("@/views/systemHome/systemHome.vue"),
+      // },
+      // {
+      //   path: "user",
+      //   name: "user",
+      //   meta: { isAuth: true, title: "用户管理" },
+      //   component: () => import("@/views/user/user.vue"),
       // },
       // {
       //   path: "identity",
@@ -41,6 +48,12 @@ const routes = [
       //   component: () => import("@/views/identity/identity.vue"),
       // },
       // {
+      //   path: "statement",
+      //   name: "statement",
+      //   meta: { isAuth: true, title: "统计报表" },
+      //   component: () => import("@/views/statement/statement.vue"),
+      // },
+      // {
       //   path: "class",
       //   name: "class",
       //   meta: { isAuth: true, title: "班级管理" },
@@ -89,6 +102,36 @@ const routes = [
       //   component: () => import("@/views/energy/energy.vue"),
       // },
       // {
+      //   path: "leave",
+      //   name: "leave",
+      //   meta: { isAuth: true, title: "请假管理" },
+      //   component: () => import("@/views/leave/leave.vue"),
+      // },
+      // {
+      //   path: "trackSearch",
+      //   name: "trackSearch",
+      //   meta: { isAuth: true, title: "轨迹查询" },
+      //   component: () => import("@/views/trackSearch/trackSearch.vue"),
+      // },
+      // {
+      //   path: "trafficRecord",
+      //   name: "trafficRecord",
+      //   meta: { isAuth: true, title: "通行记录" },
+      //   component: () => import("@/views/trafficRecord/trafficRecord.vue"),
+      // },
+      // {
+      //   path: "attendanceRecord",
+      //   name: "attendanceRecord",
+      //   meta: { isAuth: true, title: "考勤记录" },
+      //   component: () => import("@/views/attendanceRecord/attendanceRecord.vue"),
+      // },
+      // {
+      //   path: "faceRecord",
+      //   name: "faceRecord",
+      //   meta: { isAuth: true, title: "监控抓拍" },
+      //   component: () => import("@/views/faceRecord/faceRecord.vue"),
+      // },
+      // {
       //   path: "safety",
       //   name: "safety",
       //   meta: { isAuth: true, title: "校园安全" },
@@ -113,6 +156,12 @@ const routes = [
       //   component: () => import("@/views/leave/leave.vue"),
       // },
       // {
+      //   path: "statistic",
+      //   name: "statistic",
+      //   meta: { isAuth: true, title: "在校统计" },
+      //   component: () => import("@/views/statistic/statistic.vue"),
+      // },
+      // {
       //   path: "teacher",
       //   name: "teacher",
       //   meta: { isAuth: true, title: "教师" },
@@ -172,9 +221,9 @@ const router = createRouter({
 router.beforeEach(async (to, from, next) => {
   NProgress.start(); // 进度条开始
 
-  // let userhead = "1B0430E15102ADC65C43E475AC697D9A";
+  // let userhead = "91D2C53618A3C04DCC7F72367DC03582";
   // let token =
-  //   "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE3MTMyMzQ2NDQsImNhcmRObyI6IjAwMDAwMSIsImlhdCI6MTcxMzE0ODI0NH0.jxuGCqDkqzRa3poVNQq5aoSrKGDCZauXFLVKrB4M87s";
+  //   "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJleHAiOjE3NDE4Mjg1NjMsImNhcmRObyI6IjIwMjIwMjAzNjMiLCJpYXQiOjE3NDE3NDIxNjN9.DlcwDZp01jEdGN_SeKrFUy99w3tZFML6kgLP8TQ8NTE";
   // sessionStorage.setItem("token", token);
   // sessionStorage.setItem("userhead", userhead);
 

+ 122 - 121
src/store/modules/user.js

@@ -9,7 +9,7 @@ const state = {
   activeIndex: 1,
   username: "",
   password: "",
-  // api: "/carstop/carbook", //
+  // api: "/test", //
   api: "/smartApi", // 线上
   islogin: 1,
   hasRoutes: false,
@@ -167,132 +167,133 @@ const state = {
         meta: { isAuth: true, title: "系统首页" },
         component: () => import("@/views/home/home.vue"),
       },
-      {
-        path: "user",
-        name: "user",
-        meta: { isAuth: true, title: "用户管理" },
-        component: () => import("@/views/user/user.vue"),
-      },
+
+      // {
+      //   path: "user",
+      //   name: "user",
+      //   meta: { isAuth: true, title: "用户管理" },
+      //   component: () => import("@/views/user/user.vue"),
+      // },
       // {
       //   path: "identity",
       //   name: "identity",
       //   meta: { isAuth: true, title: "身份管理" },
       //   component: () => import("@/views/identity/identity.vue"),
       // },
-      {
-        path: "class",
-        name: "class",
-        meta: { isAuth: true, title: "班级管理" },
-        component: () => import("@/views/class/class.vue"),
-      },
-      {
-        path: "grades",
-        name: "grades",
-        meta: { isAuth: true, title: "年级管理" },
-        component: () => import("@/views/grades/grades.vue"),
-      },
-      {
-        path: "post",
-        name: "post",
-        meta: { isAuth: true, title: "职务管理" },
-        component: () => import("@/views/post/post.vue"),
-      },
-      {
-        path: "subject",
-        name: "subject",
-        meta: { isAuth: true, title: "学科管理" },
-        component: () => import("@/views/subject/subject.vue"),
-      },
-      {
-        path: "semester",
-        name: "semester",
-        meta: { isAuth: true, title: "学期管理" },
-        component: () => import("@/views/semester/semester.vue"),
-      },
-      {
-        path: "exam",
-        name: "exam",
-        meta: { isAuth: true, title: "考试类型管理" },
-        component: () => import("@/views/exam/exam.vue"),
-      },
-      {
-        path: "apply",
-        name: "apply",
-        meta: { isAuth: true, title: "应用管理" },
-        component: () => import("@/views/apply/apply.vue"),
-      },
-      {
-        path: "energy",
-        name: "energy",
-        meta: { isAuth: true, title: "能耗管理" },
-        component: () => import("@/views/energy/energy.vue"),
-      },
-      {
-        path: "safety",
-        name: "safety",
-        meta: { isAuth: true, title: "校园安全" },
-        component: () => import("@/views/safety/safety.vue"),
-      },
-      {
-        path: "caller",
-        name: "caller",
-        meta: { isAuth: true, title: "访客预约" },
-        component: () => import("@/views/caller/caller.vue"),
-      },
-      {
-        path: "grade",
-        name: "grade",
-        meta: { isAuth: true, title: "成绩管理" },
-        component: () => import("@/views/grade/grade.vue"),
-      },
-      {
-        path: "teacher",
-        name: "teacher",
-        meta: { isAuth: true, title: "教师" },
-        component: () => import("@/views/teacher/teacher.vue"),
-      },
-      {
-        path: "student",
-        name: "student",
-        meta: { isAuth: true, title: "学生" },
-        component: () => import("@/views/student/student.vue"),
-      },
-      {
-        path: "info",
-        name: "info",
-        meta: { isAuth: true, title: "基本信息" },
-        component: () => import("@/views/info/info.vue"),
-      },
-      {
-        path: "screenShot",
-        name: "screenShot",
-        meta: { isAuth: true, title: "截屏风险" },
-        component: () => import("@/views/screenShot/screenShot.vue"),
-      },
-      {
-        path: "roles",
-        name: "roles",
-        meta: { isAuth: true, title: "权限管理" },
-        component: () => import("@/views/roles/roles.vue"),
-      },
-      {
-        path: "source",
-        name: "source",
-        meta: { isAuth: true, title: "我的数据源" },
-        component: () => import("@/views/source/source.vue"),
-      },
-      {
-        path: "task",
-        name: "task",
-        meta: { isAuth: true, title: "任务管理" },
-        component: () => import("@/views/task/task.vue"),
-      },
-      {
-        path: "log",
-        name: "log",
-        meta: { isAuth: true, title: "业务日志" },
-        component: () => import("@/views/log/log.vue"),
-      },
+      // {
+      //   path: "class",
+      //   name: "class",
+      //   meta: { isAuth: true, title: "班级管理" },
+      //   component: () => import("@/views/class/class.vue"),
+      // },
+      // {
+      //   path: "grades",
+      //   name: "grades",
+      //   meta: { isAuth: true, title: "年级管理" },
+      //   component: () => import("@/views/grades/grades.vue"),
+      // },
+      // {
+      //   path: "post",
+      //   name: "post",
+      //   meta: { isAuth: true, title: "职务管理" },
+      //   component: () => import("@/views/post/post.vue"),
+      // },
+      // {
+      //   path: "subject",
+      //   name: "subject",
+      //   meta: { isAuth: true, title: "学科管理" },
+      //   component: () => import("@/views/subject/subject.vue"),
+      // },
+      // {
+      //   path: "semester",
+      //   name: "semester",
+      //   meta: { isAuth: true, title: "学期管理" },
+      //   component: () => import("@/views/semester/semester.vue"),
+      // },
+      // {
+      //   path: "exam",
+      //   name: "exam",
+      //   meta: { isAuth: true, title: "考试类型管理" },
+      //   component: () => import("@/views/exam/exam.vue"),
+      // },
+      // {
+      //   path: "apply",
+      //   name: "apply",
+      //   meta: { isAuth: true, title: "应用管理" },
+      //   component: () => import("@/views/apply/apply.vue"),
+      // },
+      // {
+      //   path: "energy",
+      //   name: "energy",
+      //   meta: { isAuth: true, title: "能耗管理" },
+      //   component: () => import("@/views/energy/energy.vue"),
+      // },
+      // {
+      //   path: "safety",
+      //   name: "safety",
+      //   meta: { isAuth: true, title: "校园安全" },
+      //   component: () => import("@/views/safety/safety.vue"),
+      // },
+      // {
+      //   path: "caller",
+      //   name: "caller",
+      //   meta: { isAuth: true, title: "访客预约" },
+      //   component: () => import("@/views/caller/caller.vue"),
+      // },
+      // {
+      //   path: "grade",
+      //   name: "grade",
+      //   meta: { isAuth: true, title: "成绩管理" },
+      //   component: () => import("@/views/grade/grade.vue"),
+      // },
+      // {
+      //   path: "teacher",
+      //   name: "teacher",
+      //   meta: { isAuth: true, title: "教师" },
+      //   component: () => import("@/views/teacher/teacher.vue"),
+      // },
+      // {
+      //   path: "student",
+      //   name: "student",
+      //   meta: { isAuth: true, title: "学生" },
+      //   component: () => import("@/views/student/student.vue"),
+      // },
+      // {
+      //   path: "info",
+      //   name: "info",
+      //   meta: { isAuth: true, title: "基本信息" },
+      //   component: () => import("@/views/info/info.vue"),
+      // },
+      // {
+      //   path: "screenShot",
+      //   name: "screenShot",
+      //   meta: { isAuth: true, title: "截屏风险" },
+      //   component: () => import("@/views/screenShot/screenShot.vue"),
+      // },
+      // {
+      //   path: "roles",
+      //   name: "roles",
+      //   meta: { isAuth: true, title: "权限管理" },
+      //   component: () => import("@/views/roles/roles.vue"),
+      // },
+      // {
+      //   path: "source",
+      //   name: "source",
+      //   meta: { isAuth: true, title: "我的数据源" },
+      //   component: () => import("@/views/source/source.vue"),
+      // },
+      // {
+      //   path: "task",
+      //   name: "task",
+      //   meta: { isAuth: true, title: "任务管理" },
+      //   component: () => import("@/views/task/task.vue"),
+      // },
+      // {
+      //   path: "log",
+      //   name: "log",
+      //   meta: { isAuth: true, title: "业务日志" },
+      //   component: () => import("@/views/log/log.vue"),
+      // },
     ],
   },
 

+ 52 - 3
src/views/info/info.vue

@@ -182,6 +182,19 @@
               @change="graduateHandleChange"
             />
           </div>
+          <div class="setting">
+            新生班级数:
+            <span v-if="!showClass">{{ classCount }}</span>
+            <el-input
+              v-if="showClass"
+              :clearable="false"
+              @change="classCountChange"
+              v-model.trim="classCount"
+              class="sel"
+              style="width: 214px"
+              placeholder="请输入班级数"
+            />
+          </div>
         </div>
         <!-- 迟到设置 -->
         <div class="timeSys">
@@ -222,7 +235,7 @@
                     @cancel="cancelEvent"
                   >
                     <template #reference>
-                      <div class="del">删除</div>
+                      <span class="del">删除</span>
                     </template>
                   </el-popconfirm>
                 </template>
@@ -420,6 +433,7 @@ const upgradeProps = {
 // 毕业时间设置
 const graduateTime = ref();
 const graduateTimeInput = ref();
+const classCount = ref();
 // -------------------------------------------------------------
 
 // 迟到设置 ============================================================
@@ -751,6 +765,7 @@ const schoolList = async () => {
     progressingTime.value = datas.progressingTime;
     graduateTime.value = datas.graduateTime;
     showClassId.value = datas.id;
+    classCount.value = datas.classCount;
 
     progressingTimeInput.value = datas.progressingTime.split("-").map((i) => {
       return (i = Number(i));
@@ -769,10 +784,32 @@ const schoolList = async () => {
   }
 };
 const saveClass = async () => {
+  if (classCount.value) {
+    let reg = /^\d+$/;
+    let flag = reg.test(classCount.value);
+    if (!flag) {
+      ElMessage({
+        type: "warning",
+        showClose: true,
+        message: "请输入正确的新生班级人数",
+        center: true,
+      });
+      return;
+    }
+  } else {
+    ElMessage({
+      type: "warning",
+      showClose: true,
+      message: "新生班级人数不能为空",
+      center: true,
+    });
+    return;
+  }
   let data = {
     id: showClassId.value, //有是编辑,没有就是添加
     progressingTime: progressingTimeInput.value.join("-"), //升班时间
     graduateTime: graduateTimeInput.value.join("-"), //毕业时间
+    classCount: classCount.value, //毕业时间
   };
   let res = await axios({
     method: "post",
@@ -783,10 +820,16 @@ const saveClass = async () => {
     },
     data: data,
   });
-  console.log(res.data.data, "保存学校设置");
+  console.log(res, "保存学校设置");
   if (res.data.code == 200) {
     schoolList();
     showClass.value = false;
+    ElMessage({
+      type: "success",
+      showClose: true,
+      message: res.data.message,
+      center: true,
+    });
   } else {
     ElMessage({
       type: "error",
@@ -798,6 +841,7 @@ const saveClass = async () => {
 };
 const cancelClass = () => {
   showClass.value = false;
+  schoolList();
 };
 const editClass = () => {
   showClass.value = true;
@@ -808,6 +852,10 @@ const upgradeHandleChange = (value) => {
 const graduateHandleChange = (value) => {
   console.log(value);
 };
+const classCountChange = (val) => {
+  console.log(val);
+};
+
 // 迟到设置 =======================================================
 const lateList = async () => {
   let data = {
@@ -1227,11 +1275,12 @@ onBeforeMount(async () => {
           cursor: pointer;
         }
         .edit {
-          padding: 0 10px;
+          padding: 0 7px 0 0;
           color: rgb(30, 125, 251);
           cursor: pointer;
         }
         .del {
+          padding: 0 0 0 7px;
           color: rgba(212, 48, 48, 1);
           cursor: pointer;
         }

+ 1 - 1
src/views/statement/statement.vue

@@ -305,7 +305,7 @@ const handleCurrentChange = (value) => {
 
 onBeforeMount(async () => {
   api.value = store.state.user.api;
-  searchInput.createTime = dayjs().format("YYYY-MM-DD HH:mm:ss");
+  searchInput.createTime = dayjs().format("YYYY-MM-DD 00:00:00");
   getList();
 });
 onUnmounted(() => {

+ 1 - 0
src/views/systemHome/systemHome.vue

@@ -143,6 +143,7 @@
               placeholder="请输入日期"
               :size="size"
               :clearable="false"
+              @change="classClick"
             />
           </div>
           <div id="class"></div>

+ 2 - 2
src/views/trackSearch/trackSearch.vue

@@ -446,8 +446,8 @@ const xy = (event) => {
 
 onBeforeMount(async () => {
   api.value = store.state.user.api;
-  let dateEnd = dayjs().format("YYYY-MM-DD");
-  let dateStart = dayjs(dateEnd).subtract(7, "day").format("YYYY-MM-DD");
+  let dateEnd = dayjs().add(1, "day").format("YYYY-MM-DD");
+  let dateStart = dayjs().subtract(6, "day").format("YYYY-MM-DD");
   searchInput.createTime = [dateStart, dateEnd];
   console.log(dateStart, dateEnd);
   getAdminId();

+ 10 - 6
src/views/user/user.vue

@@ -184,7 +184,7 @@
                 @click="exportSettingsClick"
                 :disabled="isManage != 1"
                 plain
-                style="margin-right: 0"
+                style="margin-right: 10px"
                 >导出用户</el-button
               >
             </el-tooltip>
@@ -198,7 +198,7 @@
               @click="DelRecordClick"
               :disabled="isManage != 1"
               plain
-              style="margin-right: 0"
+              style="margin-right: 8px"
               >删除异常记录</el-button
             >
 
@@ -1422,9 +1422,9 @@
         <div class="condition">
             <el-input
               :clearable="true"
-              @blur="searchBtn"
-              @clear="searchBtn"
-              v-model.trim="searchInput.keyWord"
+              @blur="searchEnrollment"
+              @clear="searchEnrollment"
+              v-model.trim="enrollmentInput.keyWord"
               class="sel"
               placeholder="请输入姓名"
             />
@@ -1485,7 +1485,7 @@
               v-model="enrollmentInput.status"
               placeholder="请选择状态"
               style="width: 160px"
-              @change="enrollmentList"
+              @change="searchEnrollment"
               :clearable="true"
             >
               <el-option label="待审核" value="0"></el-option>
@@ -3171,6 +3171,10 @@ const enrollmentClick = () => {
   enrollmentInput.keyWord=""
   enrollmentList()
 };
+// 搜索功能
+const searchEnrollment = lodash.debounce(async () => {
+  enrollmentList();
+}, 300);
 // 关闭入学登记审核列表页面
 const enrollmentClose = () => {
   enrollmentShow.value = false;

+ 5 - 5
vite.config.js

@@ -33,15 +33,15 @@ export default defineConfig({
     // https: false,
     // 线上地址 https://chtech.ncjti.edu.cn/hotelReservation/pc3/
     // proxy: {
-    //   "/api": {
+    //   "/test": {
     //     // target: "https://chtech.ncjti.edu.cn/hotelReservation",
-    //     target: "http://101.42.162.31:8088/",
+    //     target: "https://www.campussmartlife.com/test",
     //     changeOrigin: true,
-    //     rewrite: (path) => path.replace(/^\/api/, ""),
+    //     rewrite: (path) => path.replace(/^\/test/, ""),
     //   },
-    // }, // https://chtech.ncjti.edu.cn/hotelReservation/pc2
+    // }, 
 
-    // // 测试地址
+    // 线上地址
     proxy: {
       "/smartApi": {
         // target: "https://www.campussmartlife.com/smartManage", // 测试环境