Browse Source

修改显示往返校区的乘车人数和报备人数布局

hzj18279462576@163.com 3 years ago
parent
commit
6918d21f89

+ 3 - 3
package-lock.json

@@ -477,9 +477,9 @@
       "integrity": "sha512-Z1PhmomIfypOpoMjRQB70jfvy/wxT50qW08YXO5lMIJkrdq4yOTR+AW7FqutScmB9NkLwxo+jU+kZLbofZZq/w=="
     },
     "dayjs": {
-      "version": "1.11.7",
-      "resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.7.tgz",
-      "integrity": "sha512-+Yw9U6YO5TQohxLcIkrXBeY73WP3ejHWVvx8XCk3gxvQDCTEmS48ZrSZCKciI7Bhl/uCMyxYtE9UqRILmFphkQ=="
+      "version": "1.11.8",
+      "resolved": "https://registry.npmmirror.com/dayjs/-/dayjs-1.11.8.tgz",
+      "integrity": "sha512-LcgxzFoWMEPO7ggRv1Y2N31hUf2R0Vj7fuy/m+Bg1K8rr+KAs1AEy4y9jd5DXe8pbHgX+srkHNS7TH6Q6ZhYeQ=="
     },
     "deepmerge": {
       "version": "4.3.0",

+ 1 - 1
package.json

@@ -13,7 +13,7 @@
     "@element-plus/icons-vue": "^2.0.10",
     "@liveqing/liveplayer-v3": "^3.7.10",
     "axios": "^1.3.2",
-    "dayjs": "^1.11.7",
+    "dayjs": "^1.11.8",
     "element-plus": "^2.2.29",
     "hls.js": "^1.3.4",
     "jsencrypt": "^3.3.1",

+ 2 - 2
src/router/index.js

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

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

@@ -5,11 +5,11 @@ import axios from "axios";
 // 声明变量
 const state = {
   collapse: false,
-  activeIndex: 9,
+  activeIndex: 0,
   username: "",
   password: "",
-  // api: "/carstop/carbook", // 线上
-  api: "/testingServertomcat/carbook", // 测试
+  api: "/carstop/carbook", // 线上
+  // api: "/testingServertomcat/carbook", // 测试
   newsNum: "",
 };
 

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

@@ -565,7 +565,7 @@
             class="m-2"
             placeholder="请选择发车日期"
           >
-            <el-option
+            <!-- <el-option
               :label="
                 dayjs(dayjs().format('YYYY-MM-DD'))
                   .subtract(8, 'day')
@@ -660,7 +660,7 @@
                   .subtract(1, 'day')
                   .format('YYYY-MM-DD')
               "
-            />
+            /> -->
             <el-option
               :label="dayjs().format('YYYY-MM-DD')"
               :value="dayjs().format('YYYY-MM-DD')"
@@ -843,7 +843,7 @@
                 @click="sendBus(scope.row)"
                 ><div class="look">调度</div></el-button
               >
-              <el-button
+              <!-- <el-button
                 v-if="scope.row.state == 2"
                 color="#909399"
                 plain
@@ -856,7 +856,7 @@
                 plain
                 @click="mergeBus(scope.row)"
                 ><div class="lookcar">合车</div></el-button
-              >
+              > -->
               <el-button type="danger" plain @click="del(scope.row)"
                 ><div class="lookdel">删除</div></el-button
               >

+ 7 - 7
src/views/report/report.vue

@@ -134,11 +134,7 @@
               clearable
             />
           </el-form-item>
-          <el-form-item
-            label="卡号 :"
-            prop="cardnumber"
-            v-if="dialongTitle == '新增报备人员'"
-          >
+          <el-form-item label="卡号 :" prop="cardnumber">
             <!-- <el-tooltip
               :visible="cardVisible"
               placement="right-start"
@@ -387,7 +383,12 @@ const edit = (row) => {
   ruleForm.id = row.id;
   ruleForm.cardnumber = row.card_number;
   let data = [row.start_time, row.end_time];
-  ruleForm.startTime = data;
+  console.log(row.start_time == "");
+  if (row.start_time != "") {
+    ruleForm.startTime = data;
+  } else {
+    ruleForm.startTime = "";
+  }
 };
 // 取消添加员工
 const cancelAdd = () => {
@@ -445,7 +446,6 @@ const submitAdd = async (formEl) => {
           start_time: ruleForm.startTime[0],
           end_time: ruleForm.startTime[1],
         };
-        // let res = await admin.adminAdd(data);
         let res = await axios({
           method: "post",
           url: api.value + "/ubbupdate.action",

+ 85 - 24
src/views/statement/statement.vue

@@ -386,27 +386,73 @@
         <!-- 往返校区预约和乘车人数 -->
         <div
           class="nowday"
-          style="position: relative; width: 1200px; color: #000; top: -47px"
+          style="
+            position: relative;
+            width: 1200px;
+            color: #000;
+            top: -47px;
+            font-size: 18px;
+          "
         >
-          <div style="display: inline-block; margin-left: 30px">
-            {{ gobacknum.list1.s_date }}
-            <span style="font-size: 18px; font-weight: 800">{{
-              gobacknum.list2.route
-            }}</span>
-            预约人数:<span style="color: red">{{ gobacknum.list2.yy_num }}</span
-            >,乘车人数:<span style="color: red">{{
-              gobacknum.list2.by_num
-            }}</span>
+          <div>
+            <div style="display: inline-block; margin-left: 30px">
+              <span style="padding-right: 10px">{{
+                gobacknum.list1.s_date
+              }}</span>
+              <span style="font-size: 18px; font-weight: 800">{{
+                gobacknum.list1.route
+              }}</span>
+              <div
+                style="display: inline-block; width: 320px; margin-left: 20px"
+              >
+                <span style="font-size: 16px; font-weight: 800">教职工</span
+                >&nbsp; 预约人数:<span style="color: red">{{
+                  gobacknum.list1.yy_num
+                }}</span>
+                , 乘车人数:<span style="color: red">{{
+                  gobacknum.list1.by_num
+                }}</span>
+              </div>
+            </div>
+            <div style="display: inline-block">
+              <span style="font-size: 16px; font-weight: 800">报备人员</span
+              >&nbsp;&nbsp; 预约人数:<span style="color: red">{{
+                gobacknum.list2.yy_num
+              }}</span>
+              , 乘车人数:<span style="color: red">{{
+                gobacknum.list2.by_num
+              }}</span>
+            </div>
           </div>
-          <div style="display: inline-block">
-            &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
-            <span style="font-size: 18px; font-weight: 800">{{
-              gobacknum.list1.route
-            }}</span>
-            预约人数:<span style="color: red">{{ gobacknum.list1.yy_num }}</span
-            >,乘车人数:<span style="color: red">{{
-              gobacknum.list1.by_num
-            }}</span>
+          <div>
+            <div style="display: inline-block; margin-left: 30px">
+              <span style="color: transparent; padding-right: 10px">{{
+                gobacknum.list3.s_date
+              }}</span>
+              <span style="font-size: 18px; font-weight: 800">{{
+                gobacknum.list3.route
+              }}</span>
+              <div
+                style="display: inline-block; width: 320px; margin-left: 20px"
+              >
+                <span style="font-size: 16px; font-weight: 800">教职工</span
+                >&nbsp; 预约人数:<span style="color: red">{{
+                  gobacknum.list3.yy_num
+                }}</span>
+                , 乘车人数:<span style="color: red">{{
+                  gobacknum.list3.by_num
+                }}</span>
+              </div>
+            </div>
+            <div style="display: inline-block">
+              <span style="font-size: 16px; font-weight: 800">报备人员</span
+              >&nbsp;&nbsp; 预约人数:<span style="color: red">{{
+                gobacknum.list4.yy_num
+              }}</span>
+              , 乘车人数:<span style="color: red">{{
+                gobacknum.list4.by_num
+              }}</span>
+            </div>
           </div>
         </div>
       </div>
@@ -537,7 +583,7 @@ const searchInputHZ = reactive({
   date: dayjs().format("YYYY-MM-DD"),
   car_number: "",
 });
-const gobacknum = reactive({ list1: {}, list2: {} }); // 当日黄家湖-墨轩湖人数
+const gobacknum = reactive({ list1: {}, list2: {}, list3: {}, list4: {} }); // 当日黄家湖-墨轩湖人数
 
 const api = ref("");
 // 明细列表搜索框数据
@@ -773,7 +819,7 @@ const getList = async (message) => {
 // 获取往返黄家湖-墨轩湖的预约人数乘车人数
 const goBackNum = async () => {
   let data = new FormData();
-  data.set("date", searchInputHZ.date); //前面的key记得对应!
+  data.set("date", searchInputHZ.date); //日期参数
   let res = await axios({
     method: "post",
     url: api.value + "/carBook/scheroutetj.action",
@@ -782,9 +828,24 @@ const goBackNum = async () => {
     },
     data: data,
   });
-  gobacknum.list1 = res.data.data[0];
-  gobacknum.list2 = res.data.data[1];
-  console.log(res);
+  console.log(res, "往返校区的人数");
+
+  // 墨轩湖 到 黄家湖
+  res.data.data.forEach((item) => {
+    if (item.route == "墨轩湖校区-黄家湖校区") {
+      if (item.user_zz == "教职工") {
+        gobacknum.list1 = res.data.data[0]; // 教职工
+      } else if (item.user_zz == "报备人员") {
+        gobacknum.list2 = res.data.data[1]; // 报备人员
+      }
+    } else if (item.route == "黄家湖校区-墨轩湖校区") {
+      if (item.user_zz == "教职工") {
+        gobacknum.list3 = res.data.data[2]; // 教职工
+      } else if (item.user_zz == "报备人员") {
+        gobacknum.list4 = res.data.data[3]; // 报备人员
+      }
+    }
+  });
 };
 // 汇总搜索按钮
 const searchHZ = lodash.debounce(() => {

+ 11 - 11
vite.config.js

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