刘洋 8 달 전
부모
커밋
efefc84d7c

+ 5 - 2
src/render/utils/request.ts

@@ -6,7 +6,7 @@ import qs from "qs";
 import { getAuthorization, getMD5 } from "./crypto";
 import router from "@/router";
 import { initSyncTime, fetchTime } from "./syncServerTime";
-import { local } from "@/utils/tool";
+import { local, session } from "@/utils/tool";
 import { useAppStore, useUserStore } from "@/store";
 import { message } from "@qmth/ui";
 
@@ -128,7 +128,10 @@ function createService() {
         }
       } else {
         err("请求超时,服务器无响应!");
-        local.remove("baseUrl");
+        if (local.get("baseUrl")) {
+          session.set("baseUrl", local.get("baseUrl"));
+          local.remove("baseUrl");
+        }
         userStore.setUserInfo(null);
         router.replace({ name: "Login" });
       }

+ 2 - 2
src/render/views/DataCheck/SliceImage/index.vue

@@ -62,7 +62,7 @@ import { computed, ref, watch } from "vue";
 import { NumberOutlined, PictureFilled } from "@ant-design/icons-vue";
 import { message } from "ant-design-vue";
 
-import { uploadSlice, cardInfo } from "@/ap/base";
+import { updateSlice, cardInfo } from "@/ap/base";
 import { CardContent, CardPage } from "@/ap/types/base";
 import { getFileMD5 } from "@/utils/crypto";
 import { useDataCheckStore, useUserStore } from "@/store";
@@ -140,7 +140,7 @@ async function cutImageModified(file: File) {
     file,
     md5,
   };
-  const res = await uploadSlice(datas).catch(() => {});
+  const res = await updateSlice(datas).catch(() => {});
   if (!res) return;
 
   dataCheckStore.modifySliceUri({

+ 14 - 2
src/render/views/Login/IpSet.vue

@@ -73,14 +73,14 @@
   </div>
 </template>
 <script name="IpSet" lang="ts" setup>
-import { ref, computed, reactive } from "vue";
+import { ref, onMounted, reactive } from "vue";
 import {
   CheckCircleFilled,
   CloseCircleFilled,
   SwapRightOutlined,
 } from "@ant-design/icons-vue";
 import FooterInfo from "@/components/FooterInfo/index.vue";
-import { local } from "@/utils/tool";
+import { local, session } from "@/utils/tool";
 
 const input2 = ref();
 const input3 = ref();
@@ -94,6 +94,18 @@ const ipData = reactive({
   ip4: "",
   port: "",
 });
+onMounted(() => {
+  let lastBaseUrl = session.get("baseUrl");
+  //说明是去了别的页面后,连接失败回跳回来的。
+  let ipAndPort = lastBaseUrl.split("//")[1];
+  ipData.port = ipAndPort.split(":")[1];
+  let ipArr = ipAndPort.split(":")[0];
+  ipData.ip1 = ipArr[0];
+  ipData.ip2 = ipArr[1];
+  ipData.ip3 = ipArr[2];
+  ipData.ip4 = ipArr[2];
+  session.remove("baseUrl");
+});
 const changeFocus = (val: string, el: any) => {
   if (val?.length == 3) {
     el.focus();

+ 1 - 1
src/render/views/ScanManage/ScanCheckMiss.vue

@@ -66,7 +66,7 @@ const transParams = computed(() => {
 const { dataList, pagination, loading, getList, toPage } = useTable(
   getScannedList,
   transParams,
-  true
+  false
 );
 const fields = computed(() => {
   return [

+ 1 - 1
src/render/views/ScanManage/StuInfo.vue

@@ -57,7 +57,7 @@ const transParams = computed(() => {
 const { dataList, pagination, loading, getList, toPage } = useTable(
   getStuPage,
   transParams,
-  true
+  false
 );
 const fields = computed(() => {
   return [