刘洋 před 8 měsíci
rodič
revize
872e9410a1

+ 11 - 9
src/main/index.ts

@@ -130,18 +130,20 @@ function startExe(exePath: string) {
     : exePath;
   const fileExists = fs.existsSync(checkPath);
   if (fileExists) {
-    exec(exePath, (error, stdout, stderr) => {
-      console.log("子进程关闭了!");
-      win?.show();
-    });
     // exec(exePath, (error, stdout, stderr) => {
     //   console.log("子进程关闭了!");
-    //   isRunning("client.exe", (status: boolean) => {
-    //     if (!status) {
-    //       win?.show();
-    //     }
-    //   });
+    //   win?.show();
     // });
+    exec(exePath, (error, stdout, stderr) => {
+      console.log("子进程关闭了!");
+      setTimeout(() => {
+        isRunning("client.exe", (status: boolean) => {
+          if (!status) {
+            win?.show();
+          }
+        });
+      }, 200);
+    });
   } else {
     dialog.showErrorBox("tip", `${checkPath}不存在!`);
   }

+ 1 - 1
src/render/ap/exam.ts

@@ -10,7 +10,7 @@ export const getExamList = (data: {
     data,
   });
 
-export const getExamOverview = (params: { examId: number }) =>
+export const getExamOverview = (params: { examId: any }) =>
   request({
     url: "/api/admin/exam/overview",
     params,

+ 11 - 0
src/render/utils/index.ts

@@ -1,3 +1,14 @@
+import { session } from "./tool";
 export const closeApp = () => {
   window.close();
 };
+
+export const saveTemporaryImgViewConfig = (routePath: string, val: any) => {
+  let obj = session.get("temporaryImgViewConfig") || {};
+  obj[routePath] = val;
+  session.set("temporaryImgViewConfig", obj);
+};
+export const getTemporaryImgViewConfig = (routePath: string) => {
+  let obj = session.get("temporaryImgViewConfig") || {};
+  return obj[routePath];
+};

+ 25 - 4
src/render/views/DataCheck/ScanImage/index.vue

@@ -79,8 +79,12 @@ import {
   PictureFilled,
 } from "@ant-design/icons-vue";
 import { message } from "ant-design-vue";
-
-import { computed, nextTick, ref, unref } from "vue";
+import {
+  saveTemporaryImgViewConfig,
+  getTemporaryImgViewConfig,
+} from "@/utils/index";
+import { computed, nextTick, ref, unref, watch } from "vue";
+import { useRoute } from "vue-router";
 import {
   objAssign,
   getFileUrl,
@@ -100,11 +104,12 @@ import { abc } from "@/constants/enumerate";
 import FillAreaSetDialog from "./FillAreaSetDialog.vue";
 import RecogEditDialog from "./RecogEditDialog.vue";
 import ImportBtn from "@/components/ImportBtn/index.vue";
+import { debounce } from "lodash-es";
 
 defineOptions({
   name: "ScanImage",
 });
-
+const route = useRoute();
 const emit = defineEmits(["next", "prev"]);
 
 const userStore = useUserStore();
@@ -129,6 +134,16 @@ const imageSize = ref({
   left: 0,
   scale: 1,
 });
+const saveImageSizeToSession = debounce(() => {
+  saveTemporaryImgViewConfig(route.path, imageSize.value);
+}, 500);
+watch(
+  imageSize,
+  () => {
+    saveImageSizeToSession();
+  },
+  { deep: true }
+);
 
 const imageStyle = computed(() => {
   return {
@@ -155,7 +170,13 @@ function initImageSize() {
     },
     rotate: 0,
   });
-  imageSize.value = objAssign(imageSize.value, imgSize);
+  console.log(
+    "getTemporaryImgViewConfig(route.path)",
+    getTemporaryImgViewConfig(route.path)
+  );
+  imageSize.value =
+    getTemporaryImgViewConfig(route.path) ||
+    objAssign(imageSize.value, imgSize);
 
   nextTick(() => {
     updateRecogList();

+ 2 - 2
src/render/views/Review/ExportTypeDialog.vue

@@ -1,5 +1,5 @@
 <template>
-  <a-modal
+  <my-modal
     v-model:open="visible"
     :width="456"
     style="top: 10vh"
@@ -22,7 +22,7 @@
         </div>
       </a-col>
     </a-row>
-  </a-modal>
+  </my-modal>
 </template>
 
 <script setup lang="ts">

+ 3 - 0
src/render/views/ScanManage/ScanCheckMiss.vue

@@ -124,6 +124,9 @@ const fields = computed(() => {
       children: [
         {
           text: "查询",
+          onClick: () => {
+            toPage(1);
+          },
         },
         {
           text: "导出",