瀏覽代碼

修改月度报表bug

hzj18279462576@163.com 1 年之前
父節點
當前提交
3d895bdc86
共有 6 個文件被更改,包括 43 次插入35 次删除
  1. 2 2
      src/router/index.js
  2. 2 2
      src/store/modules/user.js
  3. 25 16
      src/views/blacklist/blacklist.vue
  4. 0 1
      src/views/buspath/buspath.vue
  5. 1 1
      src/views/busquery/busquery.vue
  6. 13 13
      vite.config.js

+ 2 - 2
src/router/index.js

@@ -5,8 +5,8 @@ import {
 } from "vue-router";
 } from "vue-router";
 import Layout from "@/layout/index.vue";
 import Layout from "@/layout/index.vue";
 const router = createRouter({
 const router = createRouter({
-  history: createWebHashHistory("/carstop/dist6"), // 线上地址
-  // history: createWebHashHistory("/testingServertomcat/dist6"), // 测试环境发布地址
+  // history: createWebHashHistory("/carstop/dist6"), // 线上地址
+  history: createWebHashHistory("/testingServertomcat/dist6"), // 测试环境发布地址
   routes: [
   routes: [
     {
     {
       path: "/login",
       path: "/login",

+ 2 - 2
src/store/modules/user.js

@@ -8,8 +8,8 @@ const state = {
   activeIndex: 0,
   activeIndex: 0,
   username: "",
   username: "",
   password: "",
   password: "",
-  api: "/carstop/carbook", // 线上
-  // api: "/testingServertomcat/carbook", // 测试
+  // api: "/carstop/carbook", // 线上
+  api: "/testingServertomcat/carbook", // 测试
   newsNum: "",
   newsNum: "",
 };
 };
 
 

+ 25 - 16
src/views/blacklist/blacklist.vue

@@ -479,14 +479,14 @@
             />
             />
           </div>
           </div>
           <div class="condition">
           <div class="condition">
-            <span>身份证 : </span>
+            <span>手机号码 : </span>
             <el-input
             <el-input
               @clear="searchBtn"
               @clear="searchBtn"
               @input="searchBtn"
               @input="searchBtn"
               clearable
               clearable
-              v-model="searchInput3.idCard"
+              v-model="searchInput3.phone"
               class="w-50 m-2"
               class="w-50 m-2"
-              placeholder="请输入身份证"
+              placeholder="请输入手机号码"
               style="width: 220px"
               style="width: 220px"
             />
             />
           </div>
           </div>
@@ -541,10 +541,16 @@
           />
           />
           <el-table-column
           <el-table-column
             align="center"
             align="center"
+            prop="phone"
+            label="手机号码"
+            width="220"
+          />
+          <!-- <el-table-column
+            align="center"
             prop="sfzh"
             prop="sfzh"
             label="身份证"
             label="身份证"
             width="220"
             width="220"
-          />
+          /> -->
 
 
           <!-- <el-table-column align="center" label="操作" width="150">
           <!-- <el-table-column align="center" label="操作" width="150">
             <template #default="scope">
             <template #default="scope">
@@ -829,7 +835,7 @@ const searchInput3 = reactive({
   college: "", // 部门学院
   college: "", // 部门学院
   name: "", // 姓名
   name: "", // 姓名
   schoolCard: "", // 微校卡号
   schoolCard: "", // 微校卡号
-  idCard: "", // 身份证
+  phone: "", // 手机号码
 }); // 搜索按钮数据
 }); // 搜索按钮数据
 const currentPage3 = ref(1); // 当前页
 const currentPage3 = ref(1); // 当前页
 const pageSize3 = ref(10);
 const pageSize3 = ref(10);
@@ -956,7 +962,7 @@ const getList = async (flag) => {
     data.set("user_name", searchInput3.name); // 名字
     data.set("user_name", searchInput3.name); // 名字
     data.set("college", searchInput3.college); // 部门学院
     data.set("college", searchInput3.college); // 部门学院
     data.set("card_number", searchInput3.schoolCard); // 微校卡号
     data.set("card_number", searchInput3.schoolCard); // 微校卡号
-    data.set("sfzh", searchInput3.idCard); // 身份证
+    data.set("phone", searchInput3.phone); // 身份证
     data.set("page", currentPage3.value);
     data.set("page", currentPage3.value);
     data.set("rows", pageSize3.value); //前面的key记得对应!
     data.set("rows", pageSize3.value); //前面的key记得对应!
     let res = await axios({
     let res = await axios({
@@ -1050,7 +1056,7 @@ const importExcel = async () => {
   data.set("user_name", searchInput3.name); // 名字
   data.set("user_name", searchInput3.name); // 名字
   data.set("college", searchInput3.college); // 部门学院
   data.set("college", searchInput3.college); // 部门学院
   data.set("card_number", searchInput3.schoolCard); // 微校卡号
   data.set("card_number", searchInput3.schoolCard); // 微校卡号
-  data.set("sfzh", searchInput3.idCard); // 身份证
+  data.set("phone", searchInput3.phone); // 身份证
   let res = await axios({
   let res = await axios({
     method: "post",
     method: "post",
     url: api.value + "/reporttoExcel.action",
     url: api.value + "/reporttoExcel.action",
@@ -1061,15 +1067,16 @@ const importExcel = async () => {
   });
   });
   if (res.data.code == 200) {
   if (res.data.code == 200) {
     console.log(res, "导出账号");
     console.log(res, "导出账号");
-    const elt = document.createElement("a");
-    elt.setAttribute(
-      "href",
-      "https://chtech.ncjti.edu.cn/carstop" + res.data.downurl
-    );
-    elt.setAttribute("download", "file.png");
-    elt.style.display = "none";
-    document.body.appendChild(elt);
-    elt.click();
+    // var downloadPath = "https://chtech.ncjti.edu.cn/carstop" + res.data.downurl;
+    var downloadPath = "https://chtech.ncjti.edu.cn/testingServertomcat" + res.data.downurl;
+    console.log("获得地址数据:", downloadPath);
+    var downloadLink = document.createElement("a");
+    downloadLink.style.display = "none"; // 使其隐藏
+    downloadLink.href = downloadPath;
+    downloadLink.download = "";
+    downloadLink.click();
+    document.body.appendChild(downloadLink);
+    document.body.removeChild(downloadLink);
     ElMessage({
     ElMessage({
       type: "success",
       type: "success",
       showClose: true,
       showClose: true,
@@ -1406,6 +1413,8 @@ const tableRowClassName = ({ row, rowIndex }) => {
 
 
 onBeforeMount(async () => {
 onBeforeMount(async () => {
   api.value = store.state.user.api;
   api.value = store.state.user.api;
+  console.log(window.location.href,'路由地址')
+
   busNum.list = JSON.parse(sessionStorage.getItem("busSelect"));
   busNum.list = JSON.parse(sessionStorage.getItem("busSelect"));
   let data = new FormData();
   let data = new FormData();
   data.set("page", 1);
   data.set("page", 1);

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

@@ -780,7 +780,6 @@ onUnmounted(() => {
       }
       }
     }
     }
   }
   }
-
   .gongneng {
   .gongneng {
     width: calc(100% - 60px);
     width: calc(100% - 60px);
     margin: 15px auto;
     margin: 15px auto;

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

@@ -1870,7 +1870,7 @@ onMounted(() => {
         color: #000;
         color: #000;
       }
       }
       :deep(.el-table__row td) {
       :deep(.el-table__row td) {
-        padding: 0;
+        padding: 3px 0;
         border: 0;
         border: 0;
       }
       }
 
 

+ 13 - 13
vite.config.js

@@ -23,23 +23,23 @@ export default defineConfig({
     // 是否开启 https
     // 是否开启 https
     // https: false,
     // https: false,
     // 线上地址
     // 线上地址
-    proxy: {
-      "/carstop/carbook": {
-        target: "https://chtech.ncjti.edu.cn/carstop/carbook",
-        changeOrigin: true,
-        rewrite: (path) => path.replace(/^\/carstop\/carbook/, ""),
-      },
-    },
-
-    // 测试地址
     // proxy: {
     // proxy: {
-    //   "/testingServertomcat/carbook": {
-    //     // target: "https://chtech.ncjti.edu.cn/testingServertomcat/carbook", // 测试环境
-    //     target: "https://jtishfw.ncjti.edu.cn/jxch-smartmp/carbook", // 测试环境
+    //   "/carstop/carbook": {
+    //     target: "https://chtech.ncjti.edu.cn/carstop/carbook",
     //     changeOrigin: true,
     //     changeOrigin: true,
-    //     rewrite: (path) => path.replace(/^\/testingServertomcat\/carbook/, ""),
+    //     rewrite: (path) => path.replace(/^\/carstop\/carbook/, ""),
     //   },
     //   },
     // },
     // },
+
+    // 测试地址
+    proxy: {
+      "/testingServertomcat/carbook": {
+        target: "https://chtech.ncjti.edu.cn/testingServertomcat/carbook", // 测试环境
+        // target: "https://jtishfw.ncjti.edu.cn/jxch-smartmp/carbook", // 测试环境
+        changeOrigin: true,
+        rewrite: (path) => path.replace(/^\/testingServertomcat\/carbook/, ""),
+      },
+    },
   },
   },
   publicDir: "public",
   publicDir: "public",
   base: "./",
   base: "./",