刘洋 8 months ago
parent
commit
dc8523abd8

+ 16 - 1
src/main/index.ts

@@ -114,7 +114,14 @@ ipcMain.on("change-win-size", (event, args: string) => {
 ipcMain.on("window-min", () => {
 ipcMain.on("window-min", () => {
   win?.minimize();
   win?.minimize();
 });
 });
-
+const isRunning = (query: string, cb: Function) => {
+  exec(
+    "cmd /c chcp 65001>nul && tasklist /FO CSV",
+    (err: any, stdout: any, stderr: any) => {
+      cb(stdout.toLowerCase().indexOf(query.toLowerCase()) > -1);
+    }
+  );
+};
 function startExe(exePath: string) {
 function startExe(exePath: string) {
   console.log("主进程接收到的exe路径:", exePath);
   console.log("主进程接收到的exe路径:", exePath);
   let checkPath = exePath.includes(".exe ")
   let checkPath = exePath.includes(".exe ")
@@ -126,6 +133,14 @@ function startExe(exePath: string) {
       console.log("子进程关闭了!");
       console.log("子进程关闭了!");
       win?.show();
       win?.show();
     });
     });
+    // exec(exePath, (error, stdout, stderr) => {
+    //   console.log("子进程关闭了!");
+    //   isRunning("client.exe", (status: boolean) => {
+    //     if (!status) {
+    //       win?.show();
+    //     }
+    //   });
+    // });
   } else {
   } else {
     dialog.showErrorBox("tip", `${checkPath}不存在!`);
     dialog.showErrorBox("tip", `${checkPath}不存在!`);
   }
   }

+ 2 - 2
src/main/preload/index.ts

@@ -8,7 +8,7 @@ const os = require("os");
 const path = require("path");
 const path = require("path");
 const fs = require("fs");
 const fs = require("fs");
 const { v4: uuidv4 } = require("uuid");
 const { v4: uuidv4 } = require("uuid");
-const execs = require("child_process").exec;
+const exec = require("child_process").exec;
 
 
 const isDev = process.env.NODE_ENV === "development";
 const isDev = process.env.NODE_ENV === "development";
 
 
@@ -28,7 +28,7 @@ const isRunning = (query: string, cb: Function) => {
   //   default:
   //   default:
   //     break;
   //     break;
   // }
   // }
-  execs(
+  exec(
     "cmd /c chcp 65001>nul && tasklist /FO CSV",
     "cmd /c chcp 65001>nul && tasklist /FO CSV",
     (err: any, stdout: any, stderr: any) => {
     (err: any, stdout: any, stderr: any) => {
       cb(stdout.toLowerCase().indexOf(query.toLowerCase()) > -1);
       cb(stdout.toLowerCase().indexOf(query.toLowerCase()) > -1);

+ 1 - 1
src/render/views/Audit/Main/SelectExamDialog.vue

@@ -12,7 +12,7 @@
           <a-space class="radio-content" align="center" :size="10">
           <a-space class="radio-content" align="center" :size="10">
             <div class="rc-id">No.{{ item.id }}</div>
             <div class="rc-id">No.{{ item.id }}</div>
             <div class="rc-name">{{ item.name }}</div>
             <div class="rc-name">{{ item.name }}</div>
-            <div class="rc-mode">{{ item.mode }}</div>
+            <div class="rc-mode">{{ item.mode }}模式</div>
           </a-space>
           </a-space>
         </a-radio>
         </a-radio>
       </a-radio-group>
       </a-radio-group>

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

@@ -39,9 +39,7 @@
         <div class="audit-box">
         <div class="audit-box">
           <div class="audit-box-head">
           <div class="audit-box-head">
             <h4>
             <h4>
-              复核校验<span style="color: red; font-weight: normal"
-                >(人工绑定审核)</span
-              >
+              复核校验<span style="font-weight: normal">(人工绑定审核)</span>
             </h4>
             </h4>
           </div>
           </div>
           <div class="audit-box-body">
           <div class="audit-box-body">

+ 8 - 2
src/render/views/BaseDataConfig/StuImportFileDialog.vue

@@ -71,6 +71,12 @@ const getFile = (file: any) => {
   params.file = file;
   params.file = file;
   curFileName.value = file?.name || "";
   curFileName.value = file?.name || "";
 };
 };
+function openProcessDialog() {
+  progress.value = 0;
+  progressStatus.value = "active";
+  errMsg.value = "";
+  showProgressDialog.value = true;
+}
 const submitHandle = () => {
 const submitHandle = () => {
   form.value.formRef.validate().then(() => {
   form.value.formRef.validate().then(() => {
     importStu({
     importStu({
@@ -79,8 +85,8 @@ const submitHandle = () => {
       subjectCode: props.curRow?.subjectCode as string,
       subjectCode: props.curRow?.subjectCode as string,
     }).then((res: any) => {
     }).then((res: any) => {
       let taskId = res.taskId;
       let taskId = res.taskId;
-      showProgressDialog.value = true;
-      // visible.value = false;
+      openProcessDialog();
+
       watchProgress({ taskId });
       watchProgress({ taskId });
     });
     });
   });
   });

+ 2 - 4
src/render/views/CurExam/index.vue

@@ -126,9 +126,7 @@
             </div>
             </div>
             <div class="body">
             <div class="body">
               <div class="option">
               <div class="option">
-                审核员<span style="color: red; font-weight: normal"
-                  >(人工绑定审核)</span
-                >
+                审核员<span style="font-weight: normal">(人工绑定审核)</span>
                 <p>
                 <p>
                   已完成:{{
                   已完成:{{
                     allData.assignedCheck?.auditorFinishCount
                     allData.assignedCheck?.auditorFinishCount
@@ -292,7 +290,7 @@
           <div class="flex-1 flex items-center justify-between">
           <div class="flex-1 flex items-center justify-between">
             <span class="sub1">No.{{ item?.id }}</span>
             <span class="sub1">No.{{ item?.id }}</span>
             <span class="sub2">{{ item?.name }}</span>
             <span class="sub2">{{ item?.name }}</span>
-            <span class="sub3">{{ item?.mode }}</span>
+            <span class="sub3">{{ item?.mode }}模式</span>
           </div>
           </div>
         </a-radio>
         </a-radio>
       </a-radio-group>
       </a-radio-group>