Browse Source

完成轨迹添加起点和判断登录凭证已过期自动跳到登录页

hzj18279462576@163.com 1 year ago
parent
commit
3583b0d43f

BIN
src/assets/origin.png


+ 1 - 1
src/layout/sidebar/SidevarItem.vue

@@ -413,7 +413,7 @@ const roleListChange = async () => {
           // });
           arr.push({
             name: "classGrade",
-            meta: { isAuth: true, title: "年级管理" },
+            meta: { isAuth: true, title: "类型管理" },
             children: classArr,
           });
         }

+ 5 - 0
src/views/apply/apply.vue

@@ -407,6 +407,11 @@ const getList = async () => {
     // });
   } else {
     loading.value = false;
+    if(res.data.message=='登录凭证已过期,请重新登录'){
+      router.push({
+        path: `/login`,
+      });
+    }
     ElMessage({
       type: "error",
       showClose: true,

+ 5 - 0
src/views/attendanceRecord/attendanceRecord.vue

@@ -677,6 +677,11 @@ const getAdminId=async ()=>{
     classId.value = classIds
      adminClassDataList()
   }else{
+    if(res.data.message=='登录凭证已过期,请重新登录'){
+      router.push({
+        path: `/login`,
+      });
+    }
     ElMessage({
       type: "error",
       showClose: true,

+ 206 - 73
src/views/caller/caller.vue

@@ -607,7 +607,7 @@
       width="1100"
       :before-close="cancelSubsection"
     >
-      <div class="middle">
+      <div class="search">
         <div class="filter">
           <!-- 年级 -->
           <div class="condition" v-if="classId == 0">
@@ -617,7 +617,7 @@
               placeholder="请选择年级"
               style="width: 160px"
               @change="gradeChange"
-              :clearable="false"
+              :clearable="true"
             >
               <el-option v-for="i in gradeData" :label="i.name" :value="i.id">
               </el-option>
@@ -636,8 +636,8 @@
                 v-model="patriarchInput.class"
                 placeholder="请选择班级"
                 style="width: 160px"
-                @change="searchBtn"
-                :clearable="false"
+                @change="classChange"
+                :clearable="true"
               >
                 <el-option
                   v-for="i in classData"
@@ -673,15 +673,15 @@
             </el-select>
           </div>
         </div>
-      </div>
-      <div class="selObject">
-        <!-- <el-button
-          type="primary"
+        <el-button
           color="rgba(0, 97, 255, 1)"
-          plain
-          @click="patriarchClick"
-          >增加</el-button
-        > -->
+          type="primary"
+          class="search"
+          @click="morePatriarchClick"
+          v-if="classId==0"
+        >
+          批量编辑</el-button
+        >
       </div>
       <el-table
         :row-class-name="tableRowClassName"
@@ -733,7 +733,7 @@
       v-model="patriarchVisible"
       :close-on-click-modal="false"
       :close-on-press-escape="false"
-      title="家长访客配置修改"
+      :title="patriarchTitle"
       align-center
       width="650"
       :before-close="patriarchCancel"
@@ -742,38 +742,34 @@
         ref="patriarchRef"
         :model="patriarchRuleForm"
         :rules="patriarchRules"
-        label-width="90px"
+        label-width="100px"
         class="demo-ruleForm"
         :size="formSize"
         label-position="left"
         status-icon
       >
-        <el-form-item label="年级 :" prop="gradeName">
-          <!-- <el-select
-            v-model="patriarchRuleForm.grade"
-            placeholder="请选择年级"
-            style="width: 500px"
-            clearable
-          >
-            <el-option v-for="i in gradeData" :label="i.name" :value="i.id" />
-          </el-select> -->
+        <el-form-item label="年级 :" prop="gradeName" v-if="morePatriarchIndex==1">
           <span style="font-weight: 800">{{
             patriarchRuleForm.gradeName
           }}</span>
         </el-form-item>
-        <el-form-item label="班级 :" prop="className">
-          <!-- <el-select
-            v-model="patriarchRuleForm.class"
-            placeholder="请选择班级"
-            style="width: 500px"
-            clearable
-          >
-            <el-option v-for="i in classData" :label="i.name" :value="i.id" />
-          </el-select> -->
+        <el-form-item label="班级 :" prop="className" v-if="morePatriarchIndex==1">
           <span style="font-weight: 800">{{
             patriarchRuleForm.className
           }}</span>
         </el-form-item>
+        <el-form-item label="年级/班级 :" prop="classGradeId" v-if="morePatriarchIndex==2">
+          <el-cascader
+            style="width: 400px"
+            placeholder="请选择班级"
+            v-model="patriarchRuleForm.classGradeId"
+            :options="patriarchData"
+            :props="patriarchProps"
+            @change="patriarchClassChange"
+            clearable
+            ref="patriarchClassRef"
+          />
+        </el-form-item>
         <p class="title">访客预约小程序审批流程设置</p>
         <el-form-item label="" prop="appAuditConfig">
           <el-radio-group v-model="patriarchRuleForm.appAuditConfig">
@@ -820,7 +816,7 @@
           </el-radio-group>
         </el-form-item>
         <p class="title">是否和车闸联动</p>
-        <el-form-item label="" prop="accessConfig">
+        <el-form-item label="" prop="carConfig">
           <el-radio-group v-model="patriarchRuleForm.carConfig">
             <el-radio :value="0">是</el-radio>
             <el-radio :value="1">否</el-radio>
@@ -994,6 +990,7 @@ const subsectionTotal = ref(10);
 
 // 增加家长访客配置////////////////////////////////////
 const patriarchVisible = ref(false);
+const patriarchTitle=ref('')
 const patriarchInput = reactive({
   class: "",
   grade: "",
@@ -1006,6 +1003,7 @@ const patriarchRuleForm = reactive({
   appPushConfig: "", // 小程序推送配置 5:需要推送,3:不需要推送
   appCancelConfig: "", // 小程序核销配置 6:需要核销,,9:不需要核销
   classId: "", // smart class表的id
+  classGradeId:'',// 班级数组
   className: "", // 班级
   gradeName: "", // 年级
   id: "", // 家长访客预约配置
@@ -1016,6 +1014,7 @@ const patriarchRuleForm = reactive({
 const patriarchRules = reactive({
   gradeName: [{ required: true, message: "年级不能为空", trigger: "blur" }],
   className: [{ required: true, message: "班级不能为空", trigger: "blur" }],
+  classGradeId: [{ required: true, message: "班级不能为空", trigger: "blur" }],
   appAuditConfig: [
     { required: true, message: "当前选项不能为空", trigger: "blur" },
   ],
@@ -1041,6 +1040,16 @@ const patriarchRules = reactive({
     { required: true, message: "当前选择项不能为空", trigger: "blur" },
   ],
 });
+const morePatriarchIndex=ref()// 判断是批量编辑还是单个编辑
+const patriarchClassRef=ref()// 批量编辑年级班级ref
+const patriarchProps = {
+  multiple: true,
+  label: "name",
+  value: "id",
+  children: "children",
+}; // 任课班级
+const patriarchData=ref()// 批量编辑中的年级和班级数据
+
 const gradeData = ref(); // 年级数据
 const classData = ref(); // 班级数据
 
@@ -1161,7 +1170,7 @@ const getList = async () => {
       },
       params: data,
     });
-    console.log(res, JSON.parse(eds.decryptDes(res.data.data)), "其他访客预约");
+    // console.log(res, JSON.parse(eds.decryptDes(res.data.data)), "其他访客预约");
     if (res.data.code == 200) {
       loading.value = false;
       tableData2.list = JSON.parse(eds.decryptDes(res.data.data)).list;
@@ -1208,16 +1217,21 @@ const getAdminId = async () => {
       userHead: sessionStorage.getItem("userhead"),
     },
   });
-  // console.log(
-  //   res,
-  //   JSON.parse(eds.decryptDes(res.data.data)),
-  //   "获取所管理的班级的id(0是所有班级)"
-  // );
+  console.log(
+    res,
+    JSON.parse(eds.decryptDes(res.data.data)),
+    "获取所管理的班级的id(0是所有班级)"
+  );
   if (res.data.code == 200) {
     let classIds = JSON.parse(eds.decryptDes(res.data.data)).schoolClass;
     classId.value = classIds;
     adminClassDataList();
   } else {
+    if(res.data.message=='登录凭证已过期,请重新登录'){
+      router.push({
+        path: `/login`,
+      });
+    }
     ElMessage({
       type: "error",
       showClose: true,
@@ -1239,18 +1253,13 @@ const adminClassDataList = async () => {
       },
       // params: data,
     });
-    console.log(
-      grade,
-      JSON.parse(eds.decryptDes(grade.data.data)),
-      "年级下拉数据"
-    );
+    // console.log(
+    //   grade,
+    //   JSON.parse(eds.decryptDes(grade.data.data)),
+    //   "年级下拉数据"
+    // );
     let resData = JSON.parse(eds.decryptDes(grade.data.data));
     gradeData.value = resData;
-    patriarchInput.grade = resData[0].id;
-    adminClassInfoList(patriarchInput.grade).then(() => {
-      patriarchInput.class = classData.value[0].id;
-      getList();
-    });
   } else {
     let grade = await axios({
       method: "get",
@@ -1263,11 +1272,11 @@ const adminClassDataList = async () => {
         schoolClass: classId.value,
       },
     });
-    console.log(
-      grade,
-      JSON.parse(eds.decryptDes(grade.data.data)),
-      "年级下拉数据"
-    );
+    // console.log(
+    //   grade,
+    //   JSON.parse(eds.decryptDes(grade.data.data)),
+    //   "年级下拉数据"
+    // );
     let data = JSON.parse(eds.decryptDes(grade.data.data));
     gradeData.value = [
       {
@@ -1283,22 +1292,24 @@ const adminClassDataList = async () => {
     ];
     patriarchInput.grade = data.gradeId;
     patriarchInput.class = data.classId;
-    getList();
   }
 };
 // 管理员 改变年级选择
 const gradeChange = (value) => {
   console.log(value);
   if (value) {
-    adminClassInfoList(value).then(() => {
-      patriarchInput.class = classData.value[0].id;
-      getList();
+    adminClassInfoList(patriarchInput.grade).then(() => {
+      subsectionClick();
     });
   } else {
     classData.value = [];
     patriarchInput.class = "";
+    subsectionClick();
   }
 };
+const classChange = (value) => {
+  subsectionClick();
+};
 // 管理员 班级数据下拉
 const adminClassInfoList = async (value) => {
   let data = {
@@ -1315,11 +1326,11 @@ const adminClassInfoList = async (value) => {
   });
 
   if (classs.data.code == 200) {
-    console.log(
-      classs,
-      JSON.parse(eds.decryptDes(classs.data.data)),
-      "班级下拉数据"
-    );
+    // console.log(
+    //   classs,
+    //   JSON.parse(eds.decryptDes(classs.data.data)),
+    //   "班级下拉数据"
+    // );
     classData.value = JSON.parse(eds.decryptDes(classs.data.data));
   } else {
     classData.value = [];
@@ -1343,11 +1354,11 @@ const subsectionClick = async () => {
       gradeId: patriarchInput.grade,
     },
   });
-  // console.log(
-  //   ress,
-  //   JSON.parse(eds.decryptDes(ress.data.data)),
-  //   "家长访客配置展示"
-  // );
+  console.log(
+    ress,
+    JSON.parse(eds.decryptDes(ress.data.data)),
+    "家长访客配置展示"
+  );
   // console.log(ress, "家长访客配置展示");
   if (ress.data.code == 200) {
     let data = JSON.parse(eds.decryptDes(ress.data.data));
@@ -1369,14 +1380,38 @@ const subsectionCurrentChange = (value) => {
 };
 
 // 增加家长访客配置 (-------------------------------------------)
+// 批量编辑访客配置
+const morePatriarchClick=()=>{
+  classGradeList()
+  patriarchTitle.value='家长访客配置批量修改'
+  patriarchVisible.value = true;
+  morePatriarchIndex.value=2;// 判断是 批量编辑2 还是 单个编辑1
+  patriarchRuleForm.accessConfig = 1; // 门禁配置 0:推送到门禁,1:不推送到门禁
+  patriarchRuleForm.carConfig = 1; // 门禁配置 0:推送到门禁,1:不推送到门禁
+  patriarchRuleForm.appAuditConfig = ''; // 小程序审核配置 1:需要审核,4:不需要审核
+  patriarchRuleForm.appCancelConfig = ''; // 小程序核销配置 6:需要核销,,9:不需要核销
+  patriarchRuleForm.appPushConfig =''; // 小程序推送配置 5:需要推送,3:不需要推送
+  patriarchRuleForm.classGradeId = "";
+  patriarchRuleForm.classId = ''; // smart class表的id
+  patriarchRuleForm.className = ''; // 班级
+  patriarchRuleForm.gradeName = ''; // 年级
+  patriarchRuleForm.id = ''; // 家长访客预约配置
+  patriarchRuleForm.screenAuditConfig = ''; // 大屏序审核配置 1:需要审核, 4:不需要审核
+  patriarchRuleForm.screenCancelConfig =''; // 大屏核销配置 6:需要核销,9:不需要核销
+  patriarchRuleForm.screenPushConfig = ''; // 大屏序推送配置 5:需要推送,3:不需要推送
+}
 const patriarchClick = (row) => {
   console.log(row, "家长访客配置编辑");
+  patriarchTitle.value='家长访客配置修改'
   patriarchVisible.value = true;
+  morePatriarchIndex.value=1;// 判断是 批量编辑2 还是 单个编辑1
   patriarchRuleForm.accessConfig = row.accessConfig; // 门禁配置 0:推送到门禁,1:不推送到门禁
+  patriarchRuleForm.carConfig = row.carConfig; // 门禁配置 0:推送到门禁,1:不推送到门禁
   patriarchRuleForm.appAuditConfig = row.appAuditConfig; // 小程序审核配置 1:需要审核,4:不需要审核
   patriarchRuleForm.appCancelConfig = row.appCancelConfig; // 小程序核销配置 6:需要核销,,9:不需要核销
-  (patriarchRuleForm.appPushConfig = row.appPushConfig), // 小程序推送配置 5:需要推送,3:不需要推送
-    (patriarchRuleForm.classId = row.classId); // smart class表的id
+  
+  patriarchRuleForm.appPushConfig = row.appPushConfig // 小程序推送配置 5:需要推送,3:不需要推送
+  patriarchRuleForm.classId = row.classId; // smart class表的id
   patriarchRuleForm.className = row.className; // 班级
   patriarchRuleForm.gradeName = row.gradeName; // 年级
   patriarchRuleForm.id = row.id; // 家长访客预约配置
@@ -1384,10 +1419,39 @@ const patriarchClick = (row) => {
   patriarchRuleForm.screenCancelConfig = row.screenCancelConfig; // 大屏核销配置 6:需要核销,9:不需要核销
   patriarchRuleForm.screenPushConfig = row.screenPushConfig; // 大屏序推送配置 5:需要推送,3:不需要推送
 };
+// 批量编辑中的年级班级数据
+const classGradeList=async ()=>{
+  let res = await axios({
+    method: "get",
+    url: api.value + "/wanzai/api/smartGrade/getGradeAndClass",
+    headers: {
+      token: sessionStorage.getItem("token"),
+      user_head: sessionStorage.getItem("userhead"),
+    },
+  });
+  console.log(
+    res,
+    JSON.parse(eds.decryptDes(res.data.data)),
+    "年级班级数据"
+  );
+  if (res.data.code == 200) {
+    let data = JSON.parse(eds.decryptDes(res.data.data));
+    patriarchData.value=data;
+  }
+}
+// 班级年级改变
+const patriarchClassChange=(val)=>{
+  console.log(val);
+  console.log(patriarchClassRef.value.getCheckedNodes());
+  patriarchRuleForm.classGradeId=val
+}
+
 const patriarchConfirm = async (formEl) => {
   if (!formEl) return;
   await formEl.validate(async (valid, fields) => {
     if (valid) {
+      // 单个编辑
+     if(morePatriarchIndex.value==1){
       let data = {
         id: patriarchRuleForm.id,
         classId: patriarchRuleForm.classId,
@@ -1398,6 +1462,7 @@ const patriarchConfirm = async (formEl) => {
         screenPushConfig: patriarchRuleForm.screenPushConfig,
         screenCancelConfig: patriarchRuleForm.screenCancelConfig,
         accessConfig: patriarchRuleForm.accessConfig,
+        carConfig: patriarchRuleForm.carConfig,
       };
       let res = await axios({
         method: "post",
@@ -1426,6 +1491,52 @@ const patriarchConfirm = async (formEl) => {
           center: true,
         });
       }
+     }
+    //  批量编辑
+     else if(morePatriarchIndex.value==2){
+      let arr=[]
+      patriarchRuleForm.classGradeId.forEach(i=>{
+        arr.push(i[1])
+      })
+      let data = {
+        classIds: arr,
+        appAuditConfig: patriarchRuleForm.appAuditConfig,
+        appPushConfig: patriarchRuleForm.appPushConfig,
+        appCancelConfig: patriarchRuleForm.appCancelConfig,
+        screenAuditConfig: patriarchRuleForm.screenAuditConfig,
+        screenPushConfig: patriarchRuleForm.screenPushConfig,
+        screenCancelConfig: patriarchRuleForm.screenCancelConfig,
+        accessConfig: patriarchRuleForm.accessConfig,
+        carConfig: patriarchRuleForm.carConfig,
+      };
+      let res = await axios({
+        method: "post",
+        url: api.value + "/wanzai/api/smartVisitorParentsConfig/updates",
+        headers: {
+          token: sessionStorage.getItem("token"),
+          user_head: sessionStorage.getItem("userhead"),
+        },
+        data: data,
+      });
+      console.log(res, "确定家长访客配置修改");
+      if (res.data.code == 200) {
+        patriarchVisible.value = false;
+        subsectionClick();
+        ElMessage({
+          type: "success",
+          showClose: true,
+          message: res.data.message,
+          center: true,
+        });
+      } else {
+        ElMessage({
+          type: "error",
+          showClose: true,
+          message: res.data.message,
+          center: true,
+        });
+      }
+     }
     } else {
       console.log("error submit!", fields);
     }
@@ -1435,10 +1546,12 @@ const patriarchCancel = () => {
   patriarchVisible.value = false;
   patriarchRef.value.resetFields();
   patriarchRuleForm.accessConfig = ""; // 门禁配置 0:推送到门禁,1:不推送到门禁
+  patriarchRuleForm.carConfig = ""; // 门禁配置 0:推送到门禁,1:不推送到门禁
   patriarchRuleForm.appAuditConfig = ""; // 小程序审核配置 1:需要审核,4:不需要审核
   patriarchRuleForm.appCancelConfig = ""; // 小程序核销配置 6:需要核销,,9:不需要核销
   patriarchRuleForm.appPushConfig = ""; // 小程序推送配置 5:需要推送,3:不需要推送
   patriarchRuleForm.classId = ""; // smart class表的id
+  patriarchRuleForm.classGradeId = ""; // smart class表的id
   patriarchRuleForm.className = ""; // 班级
   patriarchRuleForm.gradeName = ""; // 年级
   patriarchRuleForm.id = ""; // 家长访客预约配置
@@ -1464,6 +1577,7 @@ const restsClick = async () => {
     restsRuleForm.id = data.id;
     restsRuleForm.appAuditConfig = data.auditConfig;
     restsRuleForm.accessConfig = data.accessConfig;
+    restsRuleForm.carConfig = data.carConfig;
   }
 };
 const restsConfirm = async (formEl) => {
@@ -1474,6 +1588,7 @@ const restsConfirm = async (formEl) => {
         id: restsRuleForm.id,
         auditConfig: restsRuleForm.appAuditConfig,
         accessConfig: restsRuleForm.accessConfig,
+        carConfig: restsRuleForm.carConfig,
       };
       let res = await axios({
         method: "post",
@@ -1791,6 +1906,7 @@ const handleCurrentChange2 = (value) => {
 onBeforeMount(async () => {
   api.value = store.state.user.api;
   getAdminId();
+  getList();
 });
 onUnmounted(() => {
   // document.removeEventListener("keyup", Enters);
@@ -2071,9 +2187,20 @@ onUnmounted(() => {
     }
     .el-dialog__body {
       padding: 0 30px;
-      .selObject {
-        padding: 10px 0;
+      .search {
+        display: flex;
+        align-items: center;
+        justify-content: space-between;
+        .filter {
+          display: flex;
+          align-items: center;
+          padding: 15px 0;
+          .condition{
+            margin-right: 15px;
+          }
+        }
       }
+
       .el-table--fit {
         height: 500px;
         .el-table__header-wrapper {
@@ -2142,10 +2269,16 @@ onUnmounted(() => {
         }
         .el-form-item__content {
           margin-left: 0 !important;
+          .el-cascader{
+            .el-cascader__tags{
+              max-height: 200px;
+              overflow: auto;
+            }
+          }
         }
       }
       .options {
-        margin: 30px 20px 20px 0;
+        margin: 10px 20px 10px 0;
         width: 100%;
         display: flex;
         flex-direction: row-reverse;

+ 5 - 0
src/views/class/class.vue

@@ -338,6 +338,11 @@ const getList = async () => {
     // });
   } else {
     loading.value = false;
+    if(res.data.message=='登录凭证已过期,请重新登录'){
+      router.push({
+        path: `/login`,
+      });
+    }
     ElMessage({
       type: "error",
       showClose: true,

+ 5 - 0
src/views/exam/exam.vue

@@ -355,6 +355,11 @@ const getList = async () => {
     // });
   } else {
     loading.value = false;
+    if(res.data.message=='登录凭证已过期,请重新登录'){
+      router.push({
+        path: `/login`,
+      });
+    }
     ElMessage({
       type: "error",
       showClose: true,

+ 5 - 0
src/views/faceRecord/faceRecord.vue

@@ -583,6 +583,11 @@ const getAdminId = async () => {
     classId.value = classIds;
     adminClassDataList();
   }else{
+    if(res.data.message=='登录凭证已过期,请重新登录'){
+      router.push({
+        path: `/login`,
+      });
+    }
     ElMessage({
       type: "error",
       showClose: true,

+ 5 - 0
src/views/grade/grade.vue

@@ -1136,6 +1136,11 @@ const getList = async () => {
     // });
   } else {
     loading.value = false;
+    if(res.data.message=='登录凭证已过期,请重新登录'){
+      router.push({
+        path: `/login`,
+      });
+    }
     ElMessage({
       type: "error",
       showClose: true,

+ 6 - 0
src/views/grades/grades.vue

@@ -377,6 +377,7 @@ const getList = async () => {
     // });
   } else {
     loading.value = false;
+    
     ElMessage({
       type: "error",
       showClose: true,
@@ -606,6 +607,11 @@ onBeforeMount(async () => {
     useSubjectData.value = JSON.parse(eds.decryptDes(res.data.data)).list;
     getList();
   }else{
+    if(res.data.message=='登录凭证已过期,请重新登录'){
+      router.push({
+        path: `/login`,
+      });
+    }
     ElMessage({
       type: "error",
       showClose: true,

+ 5 - 0
src/views/home/home.vue

@@ -375,6 +375,11 @@ const applyList = async () => {
       return item.category == "管理后台";
     });
   } else {
+    if(res.data.message=='登录凭证已过期,请重新登录'){
+      router.push({
+        path: `/login`,
+      });
+    }
     ElMessage({
       type: "error",
       showClose: true,

+ 5 - 0
src/views/identity/identity.vue

@@ -352,6 +352,11 @@ const getList = async () => {
     // });
   } else {
     loading.value = false;
+    if(res.data.message=='登录凭证已过期,请重新登录'){
+      router.push({
+        path: `/login`,
+      });
+    }
     ElMessage({
       type: "error",
       showClose: true,

+ 5 - 0
src/views/info/info.vue

@@ -217,6 +217,11 @@ const getList = async () => {
     infoId.value = JSON.parse(eds.decryptDes(res.data.data)).id;
   } else {
     // loading.value = false;
+    if(res.data.message=='登录凭证已过期,请重新登录'){
+      router.push({
+        path: `/login`,
+      });
+    }
     ElMessage({
       type: "error",
       showClose: true,

+ 5 - 0
src/views/leave/leave.vue

@@ -363,6 +363,11 @@ const userTypeChange = async (value) => {
     userType.value = JSON.parse(eds.decryptDes(res.data.data)).schoolClass;
     classList()
   }else{
+    if(res.data.message=='登录凭证已过期,请重新登录'){
+      router.push({
+        path: `/login`,
+      });
+    }
     ElMessage({
       type: "error",
       showClose: true,

+ 5 - 0
src/views/log/log.vue

@@ -463,6 +463,11 @@ const debugPage = reactive({
       });
     } else {
       debugPage.loading = false;
+      if(res.data.message=='登录凭证已过期,请重新登录'){
+      router.push({
+        path: `/login`,
+      });
+    }
       ElMessage({
         type: "error",
         showClose: true,

+ 5 - 0
src/views/post/post.vue

@@ -332,6 +332,11 @@ const getList = async () => {
     // });
   } else {
     loading.value = false;
+    if(res.data.message=='登录凭证已过期,请重新登录'){
+      router.push({
+        path: `/login`,
+      });
+    }
     ElMessage({
       type: "error",
       showClose: true,

+ 5 - 0
src/views/safety/safety.vue

@@ -462,6 +462,11 @@ const getList = async () => {
     // });
   } else {
     loading.value = false;
+    if(res.data.message=='登录凭证已过期,请重新登录'){
+      router.push({
+        path: `/login`,
+      });
+    }
     ElMessage({
       type: "error",
       showClose: true,

+ 5 - 0
src/views/screenShot/screenShot.vue

@@ -494,6 +494,11 @@ const getList = async () => {
       // });
     } else {
       loading.value = false;
+      if(res.data.message=='登录凭证已过期,请重新登录'){
+        router.push({
+          path: `/login`,
+        });
+      }
       ElMessage({
         type: "error",
         showClose: true,

+ 5 - 0
src/views/semester/semester.vue

@@ -294,6 +294,11 @@ const getList = async () => {
     // });
   } else {
     loading.value = false;
+    if(res.data.message=='登录凭证已过期,请重新登录'){
+      router.push({
+        path: `/login`,
+      });
+    }
     ElMessage({
       type: "error",
       showClose: true,

+ 5 - 0
src/views/source/source.vue

@@ -687,6 +687,11 @@ const getList = async () => {
     tableTotal.value = JSON.parse(eds.decryptDes(res.data.data)).total || 0;
   } else {
     loading.value = false;
+    if(res.data.message=='登录凭证已过期,请重新登录'){
+      router.push({
+        path: `/login`,
+      });
+    }
     ElMessage({
       type: "error",
       showClose: true,

+ 13 - 3
src/views/statistic/statistic.vue

@@ -133,8 +133,8 @@
       class="demo-tabs"
       @tab-change="statisticTypeClick"
     >
-      <el-tab-pane :label="`异常(${abnormalNum})`" :name="1">异常</el-tab-pane>
-      <el-tab-pane :label="`正常(${normalNum})`" :name="2">正常</el-tab-pane>
+      <el-tab-pane :label="`未监听(${abnormalNum})`" :name="1">异常</el-tab-pane>
+      <el-tab-pane :label="`监听(${normalNum})`" :name="2">正常</el-tab-pane>
       <el-tab-pane :label="`请假(${ackNum})`" :name="3">请假</el-tab-pane>
     </el-tabs>
     <div class="scrollId">
@@ -200,7 +200,9 @@
             <span class="studentInfo">学生信息</span>
           </div>
           <div class="infoCont">
-            <img :src="abnormalData.student.headImage" alt="" />
+            <div v-viewer>
+              <img :src="abnormalData.student.headImage" alt="" />
+            </div>
             <div class="phone">
               <p>{{ abnormalData.student.name }}</p>
               <span>学号:{{ abnormalData.student.cardNo }}</span>
@@ -691,6 +693,11 @@ const getAdminId = async () => {
     classId.value = classIds;
     adminClassDataList();
   } else {
+    if(res.data.message=='登录凭证已过期,请重新登录'){
+      router.push({
+        path: `/login`,
+      });
+    }
     ElMessage({
       type: "error",
       showClose: true,
@@ -1220,4 +1227,7 @@ onUnmounted(() => {
     text-align: center;
   }
 }
+.viewer-container{
+  z-index: 99999 !important;
+}
 </style>

+ 10 - 0
src/views/student/student.vue

@@ -661,6 +661,11 @@ const getList = async () => {
     // });
   } else {
     loading.value = false;
+    if(res.data.message=='登录凭证已过期,请重新登录'){
+      router.push({
+        path: `/login`,
+      });
+    }
     ElMessage({
       type: "error",
       showClose: true,
@@ -688,6 +693,11 @@ const semesterList = async () => {
   if (semester.data.code == 200) {
     semesterData.value = JSON.parse(eds.decryptDes(semester.data.data));
   } else {
+    if(res.data.message=='登录凭证已过期,请重新登录'){
+      router.push({
+        path: `/login`,
+      });
+    }
     ElMessage({
       type: "error",
       showClose: true,

+ 5 - 0
src/views/subject/subject.vue

@@ -325,6 +325,11 @@ const getList = async () => {
     // });
   } else {
     loading.value = false;
+    if(res.data.message=='登录凭证已过期,请重新登录'){
+      router.push({
+        path: `/login`,
+      });
+    }
     ElMessage({
       type: "error",
       showClose: true,

+ 5 - 0
src/views/task/task.vue

@@ -1583,6 +1583,11 @@ const mPage = reactive({
       });
     } else {
       mPage.loading = false;
+      if(res.data.message=='登录凭证已过期,请重新登录'){
+      router.push({
+        path: `/login`,
+      });
+    }
       ElMessage({
         type: "error",
         showClose: true,

+ 10 - 0
src/views/teacher/teacher.vue

@@ -694,6 +694,11 @@ const semesterList = async () => {
   if (semester.data.code == 200) {
     semesterData.value = JSON.parse(eds.decryptDes(semester.data.data));
   } else {
+    if(res.data.message=='登录凭证已过期,请重新登录'){
+      router.push({
+        path: `/login`,
+      });
+    }
     ElMessage({
       type: "error",
       showClose: true,
@@ -860,6 +865,11 @@ const getList = async () => {
       // });
     } else {
       loading.value=false
+      if(res.data.message=='登录凭证已过期,请重新登录'){
+        router.push({
+          path: `/login`,
+        });
+      }
       ElMessage({
         type: "error",
         showClose: true,

+ 43 - 15
src/views/trackSearch/trackSearch.vue

@@ -11,7 +11,7 @@
             v-model="searchInput.keyWord"
             popper-class="more-tag-data"
             filterable
-            clearable
+            :clearable="false"
             remote
             :remote-method="keyWordMethod"
             :loading="conteactLoading"
@@ -25,7 +25,7 @@
               :label="item.name"
               :value="item.id"
             >
-              <span style="float: left">{{ item.name }}</span>
+              <span style="float: left">{{ item.name }}-{{ item.cardNo }}</span>
             </el-option>
             <template #footer>
               <div class="addStudentMore">
@@ -82,8 +82,8 @@
           <path
             id="biking-road"
             :d="route"
-            stroke="#409EFF"
-            stroke-width="3"
+            stroke="#00fefe"
+            stroke-width="4"
             fill="none"
           />
           <!-- 绘制站点 -->
@@ -92,7 +92,7 @@
             cy="372"
             r="6"
             fill="white"
-            stroke="#409EFF"
+            stroke="#00fefe"
             stroke-width="2"
           />
           <circle
@@ -100,7 +100,7 @@
             cy="402"
             r="6"
             fill="white"
-            stroke="#409EFF"
+            stroke="#00fefe"
             stroke-width="2"
           />
           <circle
@@ -108,7 +108,7 @@
             cy="562"
             r="6"
             fill="white"
-            stroke="#409EFF"
+            stroke="#00fefe"
             stroke-width="2"
           />
           <circle
@@ -116,7 +116,7 @@
             cy="233"
             r="6"
             fill="white"
-            stroke="#409EFF"
+            stroke="#00fefe"
             stroke-width="2"
           />
           <circle
@@ -124,7 +124,7 @@
             cy="407"
             r="6"
             fill="white"
-            stroke="#409EFF"
+            stroke="#00fefe"
             stroke-width="2"
           />
           <circle
@@ -132,7 +132,7 @@
             cy="590"
             r="6"
             fill="white"
-            stroke="#409EFF"
+            stroke="#00fefe"
             stroke-width="2"
           />
           <circle
@@ -140,7 +140,7 @@
             cy="539"
             r="6"
             fill="white"
-            stroke="#409EFF"
+            stroke="#00fefe"
             stroke-width="2"
           />
           <circle
@@ -148,7 +148,7 @@
             cy="573"
             r="6"
             fill="white"
-            stroke="#409EFF"
+            stroke="#00fefe"
             stroke-width="2"
           />
           <!-- <text x="452" y="434" fill="#fff">探理楼</text>
@@ -164,6 +164,12 @@
           src="@/assets/man.png"
           alt=""
         />
+        <img
+          id="origin"
+          :style="`left: ${originX-15}px; top: ${originY-35}px;`"
+          src="@/assets/origin.png"
+          alt=""
+        />
         <!-- <svg
           t="1685007462176"
           class="icon"
@@ -227,6 +233,9 @@ const pageCount = ref(10);
 const total = ref(5); // 当前总数
 const totalPage = ref(100); // 总页数
 
+const originX=ref(0) // 起点
+const originY=ref(0) // 起点
+
 // 预约记录分页数据
 const getList = async () => {
   loading.value = true;
@@ -269,6 +278,10 @@ const getList = async () => {
           arr.push(str);
         }
       });
+
+      originX.value = tableData.list[0].x;
+      originY.value = tableData.list[0].y;
+
       console.log(arr.join(" "));
       route.value = arr.join(" ");
       loading.value = false;
@@ -336,10 +349,11 @@ const gradeList = async () => {
   console.log(res, JSON.parse(eds.decryptDes(res.data.data)), "用户下拉数据");
   let dataList = JSON.parse(eds.decryptDes(res.data.data));
   gradeData.value = dataList.list;
-  totalPage.value = dataList.pages;
+  totalPage.value = dataList.totalPage;
   if (!searchInput.keyWord) {
     searchInput.keyWord = gradeData.value[0].id;
   }
+  console.log(currentPage.value,totalPage.value);
   getList();
 };
 // 联系人下拉框搜索时加载
@@ -371,12 +385,12 @@ const addGradeMore = async () => {
     });
     console.log(
       res,
-      JSON.parse(eds.decryptDes(res.data.data)).records,
+      JSON.parse(eds.decryptDes(res.data.data)).list,
       "加载更多用户下拉数据"
     );
     gradeData.value = [
       ...gradeData.value,
-      ...JSON.parse(eds.decryptDes(res.data.data)).records,
+      ...JSON.parse(eds.decryptDes(res.data.data)).list,
     ];
   } else {
     console.log("数据全部加载完成");
@@ -403,6 +417,11 @@ const getAdminId = async () => {
     classId.value = classIds;
     gradeList();
   } else {
+    if(res.data.message=='登录凭证已过期,请重新登录'){
+      router.push({
+        path: `/login`,
+      });
+    }
     ElMessage({
       type: "error",
       showClose: true,
@@ -464,6 +483,7 @@ onUnmounted(() => {
     width: calc(100% - 60px);
     margin: 0 auto;
     position: absolute;
+    z-index: 999;
     top: 100px;
     left: 50px;
     color: #000;
@@ -591,6 +611,7 @@ onUnmounted(() => {
     height: calc(100% - 61px);
     overflow: auto;
     margin: 0 auto;
+    position: relative;
     display: flex;
     align-items: center;
     justify-content: center;
@@ -605,6 +626,13 @@ onUnmounted(() => {
       svg {
         // border: 3px solid rgba(255, 255, 255, 1);
       }
+      #origin{
+        position: absolute;
+        // left: 0;
+        // top: 0;
+        width: 30px; 
+        height: 34px
+      }
     }
   }
 

+ 6 - 1
src/views/trafficRecord/trafficRecord.vue

@@ -218,7 +218,7 @@
             prop="dateTime"
             label="记录时间"
           />
-          <el-table-column align="center" label="出类型">
+          <el-table-column align="center" label="出类型">
             <template #default="{ row }">
               <span v-if="row.access == 1">进</span>
               <span v-if="row.access == 0">出</span>
@@ -679,6 +679,11 @@ const getAdminId = async () => {
     classId.value = classIds;
     adminClassDataList();
   }else{
+    if(res.data.message=='登录凭证已过期,请重新登录'){
+      router.push({
+        path: `/login`,
+      });
+    }
     ElMessage({
       type: "error",
       showClose: true,

+ 5 - 0
src/views/user/user.vue

@@ -1948,6 +1948,11 @@ const getDepartment = async () => {
     // });
   } else {
     loading.value = false;
+    if(res.data.message=='登录凭证已过期,请重新登录'){
+      router.push({
+        path: `/login`,
+      });
+    }
     ElMessage({
       type: "error",
       showClose: true,