刘洋 8 månader sedan
förälder
incheckning
eaddc49ebe

+ 16 - 7
src/main/index.ts

@@ -123,6 +123,21 @@ const isRunning = (query: string, cb: Function) => {
     }
   );
 };
+
+function watchClientIsRunning(times = 10) {
+  setTimeout(() => {
+    isRunning("client.exe", (status: boolean) => {
+      if (status) {
+        if (times > 0) {
+          watchClientIsRunning(times--);
+        }
+      } else {
+        win?.show();
+      }
+    });
+  }, 500);
+}
+
 function startExe(exePath: string) {
   console.log("主进程接收到的exe路径:", exePath);
   let checkPath = exePath.includes(".exe ")
@@ -136,13 +151,7 @@ function startExe(exePath: string) {
     // });
     exec(exePath, (error, stdout, stderr) => {
       console.log("子进程关闭了!");
-      setTimeout(() => {
-        isRunning("client.exe", (status: boolean) => {
-          if (!status) {
-            win?.show();
-          }
-        });
-      }, 200);
+      watchClientIsRunning();
     });
   } else {
     dialog.showErrorBox("tip", `${checkPath}不存在!`);

+ 4 - 0
src/render/App.vue

@@ -19,6 +19,10 @@ userStore.initHeatBeat();
 if (userStore.userInfo) {
   userStore.startHeatBeat();
 }
+document.addEventListener("keydown", (e: any) => {
+  console.log(e.code + "...........", e.keyCode);
+  console.log("e", e);
+});
 </script>
 <style lang="less">
 .app-in {

+ 4 - 2
src/render/styles/base.less

@@ -42,8 +42,10 @@ body {
 .page-box {
   padding: 20px;
 }
-.qm-low-form .ant-form-item {
-  margin-bottom: 24px !important;
+.qm-low-form {
+  .ant-form-item {
+    margin-bottom: 24px !important;
+  }
 }
 
 .tips-info {

+ 0 - 1
src/render/views/Audit/Main/index.vue

@@ -92,7 +92,6 @@
                 v-model:value="imageCheckLoopTime"
                 :min="1"
                 :max="999"
-                :precision="0"
                 :controls="false"
               ></a-input-number>
               <span>秒/张</span>

+ 8 - 0
src/render/views/BaseDataConfig/ScanParams.vue

@@ -210,6 +210,14 @@ const fields = computed(() => {
 });
 
 const addTag = () => {
+  if (
+    params.paperTypeBarcodeContent.includes(
+      params.paperTypeBarcodeContentItem + ""
+    )
+  ) {
+    window.$message.error(params.paperTypeBarcodeContentItem + " 已存在!");
+    return;
+  }
   params.paperTypeBarcodeContent.push(params.paperTypeBarcodeContentItem);
   params.paperTypeBarcodeContentItem = "";
   form.value.formRef.clearValidate(["paperTypeBarcodeContentItem"]);

+ 1 - 1
src/render/views/DataCheck/ScanImage/RecogEditDialog.vue

@@ -197,7 +197,7 @@ function removeKeyEvent() {
 }
 
 function keyEventHandle(e: KeyboardEvent) {
-  if (e.code === "Enter" && !e.repeat) {
+  if (e.keyCode == 13 && !e.repeat) {
     e.preventDefault();
     onConfirm();
     return;

+ 1 - 1
src/render/views/RecognizeCheck/RecognizeArbitrate.vue

@@ -410,7 +410,7 @@ function removeKeyEvent() {
 }
 
 function keyEventHandle(e: KeyboardEvent) {
-  if (e.code === "Enter") {
+  if (e.keyCode == 13) {
     e.preventDefault();
     onConfirm();
     return;

+ 1 - 1
src/render/views/Review/ReviewMarkPan.vue

@@ -128,7 +128,7 @@ function removeKeyEvent() {
 }
 
 function keyEventHandle(e: KeyboardEvent) {
-  if (e.code === "Enter") {
+  if (e.keyCode == 13) {
     e.preventDefault();
     onMark();
     return;

+ 3 - 2
src/render/views/ScanManage/StuInfo.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="stu-info h-full">
-    <qm-low-form :params="params" :fields="fields" :label-width="80">
+    <qm-low-form :params="params" :fields="fields" :label-width="64">
       <template #subjectCode>
         <SelectSubject
           v-model="params.subjectCode"
@@ -85,7 +85,8 @@ const fields = computed(() => {
       colSpan: 3,
       label: "考点",
       attrs: {
-        options: examSiteOptions.value || [],
+        // options: examSiteOptions.value || [],
+        options: [{ code: 1, name: "啊好的所发生的发生的发撒代发阿斯蒂芬" }],
         fieldNames: { label: "name", value: "code" },
         allowClear: true,
       },

+ 1 - 1
vite.config.mts

@@ -72,7 +72,7 @@ export default defineConfig((configEnv) => {
       }),
     ],
     server: {
-      host: "127.0.0.1",
+      host: "0.0.0.0",
       port: 8090,
       proxy: {
         "/api": {