Преглед изворни кода

数据总览、学生信息管理和访客信息管理调整

hzj18279462576@163.com пре 10 месеци
родитељ
комит
f37296c08b

+ 2 - 2
src/utils/request.js

@@ -70,8 +70,8 @@ export const request = (
   });
 };
 
-const api = "/welcome/welcome_api"; // 代理地址
-// const api = "/welcome/api"; // 代理地址
+// const api = "/welcome/welcome_api"; // 代理地址
+const api = "/welcome/api"; // 代理地址
 // 请求封装
 export const https = {
   get(url, flag, params = {}) {

+ 22 - 6
src/views/caller/caller.vue

@@ -45,17 +45,26 @@
               />
             </el-select>
           </div>
+          <div class="condition">
+            <span>到访时间 :</span>
+            <el-date-picker
+              v-model="searchInput.date"
+              type="date"
+              placeholder="请输入到访时间"
+              format="YYYY-MM-DD"
+              value-format="YYYY-MM-DD"
+            />
+          </div>
           <el-button
             style="margin-left: 20px"
             color="rgba(38, 151, 255, 1)"
             type="primary"
             class="search"
             @click="searchBtn"
-            ><span>查询</span></el-button
-          >
-          <el-button @click="resetBtn" plain color="rgba(43, 153, 255, 1)"
-            >重置</el-button
-          >
+            ><span>查询</span>
+          </el-button>
+          <el-button @click="resetBtn" plain color="rgba(43, 153, 255, 1)">
+            重置</el-button>
         </div>
         <!-- 按钮列表 -->
         <div class="gongneng">
@@ -351,6 +360,7 @@ const searchInput = reactive({
   name: "",
   carNumber: "",
   school: "",
+  date: "",
 }); // 搜索按钮数据
 
 const currentPage = ref(1); // 当前页
@@ -410,7 +420,7 @@ const rules = reactive({
 const defaultTime = [
   new Date(2000, 1, 1, 0, 0, 0),
   new Date(2000, 2, 1, 23, 59, 59),
-] // '12:00:00', '08:00:00'
+]; // '12:00:00', '08:00:00'
 const disabledDate = (time) => {
   const today = new Date();
   // 获取当前日期的开始时间
@@ -431,6 +441,8 @@ const getList = async () => {
     name: searchInput.name,
     carNumber: searchInput.carNumber,
     school: searchInput.school,
+    startTime: searchInput.date ? searchInput.date + " 00:00:00" : "",
+    endTime: searchInput.date ? searchInput.date + " 23:59:59" : "",
   };
 
   let res = await https.get(
@@ -467,6 +479,7 @@ const schoolList = async () => {
     });
   }
 };
+
 // 搜索功能
 const searchBtn = lodash.debounce(async () => {
   getList();
@@ -475,6 +488,7 @@ const resetBtn = lodash.debounce(async () => {
   searchInput.name = null;
   searchInput.carNumber = null;
   searchInput.school = null;
+  searchInput.date=null;
   getList();
 }, 300);
 
@@ -656,6 +670,8 @@ const buildExportbtn = async () => {
     name: searchInput.name,
     carNumber: searchInput.carNumber,
     school: searchInput.school,
+    startTime: searchInput.date ? searchInput.date + " 00:00:00" : "",
+    endTime: searchInput.date ? searchInput.date + " 23:59:59" : "",
   };
   let res = await https.getBlob(
     "/welcome/api/visitor/admin/export",

+ 7 - 19
src/views/dataOverview/dataOverview.vue

@@ -358,6 +358,7 @@ const studentOverview = async () => {
     });
   }
 };
+
 // 跳转到访客信息管理
 const callerClick = () => {
   router.push({
@@ -469,6 +470,7 @@ const register = async () => {
     });
   }
 };
+
 const collegeChange = () => {
   register();
 };
@@ -783,6 +785,10 @@ const gender = async () => {
         axisTick: {
           show: false,
         },
+        axisLabel: {
+          interval: 0, // 0 = 一个都不省略
+          // rotate: 45
+        },
       },
       yAxis: {
         name: "人",
@@ -1147,12 +1153,6 @@ onBeforeUnmount(() => {
       li {
         width: 98%;
         margin: 10px 0 0;
-        .el-icon {
-        }
-        .dispose_content {
-        }
-        .yuyue {
-        }
       }
     }
   }
@@ -1162,12 +1162,6 @@ onBeforeUnmount(() => {
       li {
         width: 49%;
         margin: 10px 0 0;
-        .el-icon {
-        }
-        .dispose_content {
-        }
-        .yuyue {
-        }
       }
     }
   }
@@ -1178,17 +1172,11 @@ onBeforeUnmount(() => {
       li {
         width: 32%;
         margin: 10px 0 0;
-        .el-icon {
-        }
-        .dispose_content {
-        }
-        .yuyue {
-        }
       }
     }
   }
 
-  @media(max-width: 1650px){
+  @media (max-width: 1650px) {
     .echarts {
       flex-wrap: wrap;
       .echarts_register {

+ 15 - 0
src/views/studentInfo/studentInfo.vue

@@ -80,6 +80,17 @@
             </el-select>
           </div>
           <div class="condition">
+            <span>是否达到缴费标准 :</span>
+            <el-select
+              clearable
+              v-model="searchInput.isPay"
+              placeholder="请选择"
+            >
+              <el-option label="是" value="1" />
+              <el-option label="否" value="0" />
+            </el-select>
+          </div>
+          <div class="condition">
             <span>现场报到 :</span>
             <el-select
               clearable
@@ -1416,6 +1427,7 @@ const searchInput = reactive({
   classstr: "",
   trafficMethod: "",
   fillStatus: "",
+  isPay:"",
   name: "",
   isRegistered:"",
 }); // 搜索按钮数据
@@ -2012,6 +2024,7 @@ const getList = async () => {
     trafficMethod: searchInput.trafficMethod,
     name: searchInput.name,
     fillStatus: searchInput.fillStatus,
+    isPay:searchInput.isPay,
     isRegistered: searchInput.isRegistered,
   };
   console.log(params);
@@ -2051,6 +2064,7 @@ const resetBtn = lodash.debounce(async () => {
   searchInput.trafficMethod = null;
   searchInput.name = null;
   searchInput.fillStatus = null;
+  searchInput.isPay=null;
   searchInput.isRegistered = null;
   getList();
 }, 300);
@@ -2738,6 +2752,7 @@ const buildExportbtn = async () => {
     trafficMethod: searchInput.trafficMethod,
     name: searchInput.name,
     fillStatus: searchInput.fillStatus,
+    isPay:searchInput.isPay,
     isRegistered: searchInput.isRegistered,
   };
   let res = await https.getBlob(

+ 11 - 10
vite.config.js

@@ -30,20 +30,21 @@ export default defineConfig({
     port: 8585,
     // 是否开启 https
     // https: false,
-    proxy: {
-      "/welcome/welcome_api": {
-        target: "https://chtech.ncjti.edu.cn/welcome/welcome_api", // 线上环境
-        changeOrigin: true,
-        rewrite: (path) => path.replace(/^\/welcome\/welcome_api/, ""),
-      },
-    },
     // proxy: {
-    //   "/welcome/api": {
-    //     target: "http://192.168.161.190:8080", // 线上环境
+    //   "/welcome/welcome_api": {
+    //     target: "https://chtech.ncjti.edu.cn/welcome/welcome_api", // 线上环境
     //     changeOrigin: true,
-    //     rewrite: (path) => path.replace(/^\/welcome\/api/, ""),
+    //     rewrite: (path) => path.replace(/^\/welcome\/welcome_api/, ""),
     //   },
     // },
+    
+    proxy: {
+      "/welcome/api": {
+        target: "http://192.168.161.190:8080", // 线上环境
+        changeOrigin: true,
+        rewrite: (path) => path.replace(/^\/welcome\/api/, ""),
+      },
+    },
   },
   publicDir: "public",
   base: "./",