|
@@ -125,7 +125,7 @@ import moment from "moment";
|
|
|
import { mapMutations } from "vuex";
|
|
|
import { FACE_API_MODEL_PATH } from "@/constants/constants";
|
|
|
import DevTools from "./DevTools.vue";
|
|
|
-import nativeExe from "@/utils/nativeExe";
|
|
|
+import nativeExe, { fileExists } from "@/utils/nativeExe";
|
|
|
import {
|
|
|
EPCC_DOMAIN,
|
|
|
VUE_APP_CONFIG_FILE_SEVER_URL,
|
|
@@ -683,11 +683,28 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
|
|
|
- function checkRemoteAppTxt() {
|
|
|
+ async function checkRemoteAppTxt() {
|
|
|
let applicationNames;
|
|
|
try {
|
|
|
const fs = window.nodeRequire("fs");
|
|
|
- applicationNames = fs.readFileSync("remoteApplication.txt", "utf-8");
|
|
|
+ try {
|
|
|
+ applicationNames = fs.readFileSync(
|
|
|
+ "remoteApplication.txt",
|
|
|
+ "utf-8"
|
|
|
+ );
|
|
|
+ } catch (error) {
|
|
|
+ console.log(error);
|
|
|
+ window._hmt.push([
|
|
|
+ "_trackEvent",
|
|
|
+ "登录页面",
|
|
|
+ "读取remoteApplication.txt出错--0",
|
|
|
+ ]);
|
|
|
+ await new Promise(resolve2 => setTimeout(() => resolve2(), 3000));
|
|
|
+ applicationNames = fs.readFileSync(
|
|
|
+ "remoteApplication.txt",
|
|
|
+ "utf-8"
|
|
|
+ );
|
|
|
+ }
|
|
|
} catch (error) {
|
|
|
console.log(error);
|
|
|
window._hmt.push([
|
|
@@ -702,12 +719,21 @@ export default {
|
|
|
return;
|
|
|
}
|
|
|
if (applicationNames && applicationNames.trim()) {
|
|
|
+ let names = applicationNames
|
|
|
+ .replace("qq", "QQ")
|
|
|
+ .replace("teamviewer", "TeamViewer")
|
|
|
+ .replace("lookmypc", "LookMyPC")
|
|
|
+ .replace("xt", "协通")
|
|
|
+ .replace("winaw32", "Symantec PCAnywhere")
|
|
|
+ .replace("pcaquickconnect", "Symantec PCAnywhere")
|
|
|
+ .replace("sessioncontroller", "Symantec PCAnywhere")
|
|
|
+ .replace("sunloginclient", "向日葵")
|
|
|
+ .replace("wemeet", "腾讯会议");
|
|
|
+
|
|
|
+ names = [...new Set(names.split(","))].join("");
|
|
|
this.disableLoginBtnBecauseRemoteApp = true;
|
|
|
this.$Message.info({
|
|
|
- content:
|
|
|
- "在考试期间,请关掉" +
|
|
|
- applicationNames.trim() +
|
|
|
- "软件,诚信考试。",
|
|
|
+ content: "在考试期间,请关掉" + names + "软件,诚信考试。",
|
|
|
duration: 2 * 24 * 60 * 60,
|
|
|
});
|
|
|
} else {
|
|
@@ -720,7 +746,13 @@ export default {
|
|
|
"DISABLE_REMOTE_ASSISTANCE"
|
|
|
)
|
|
|
) {
|
|
|
- await nativeExe("Project1.exe", checkRemoteAppTxt.bind(this));
|
|
|
+ let exe = "Project1.exe";
|
|
|
+ if (fileExists("Project2.exe")) {
|
|
|
+ const remoteAppName =
|
|
|
+ "qq;teamviewer;lookmypc;xt;winaw32;pcaquickconnect;sessioncontroller;sunloginclient;wemeet";
|
|
|
+ exe = `Project2.exe "${remoteAppName}" `;
|
|
|
+ }
|
|
|
+ await nativeExe(exe, checkRemoteAppTxt.bind(this));
|
|
|
} else {
|
|
|
this.disableLoginBtnBecauseRemoteApp = false;
|
|
|
}
|
|
@@ -761,11 +793,22 @@ export default {
|
|
|
"魔力秀",
|
|
|
];
|
|
|
|
|
|
- function checkVCamTxt() {
|
|
|
+ async function checkVCamTxt() {
|
|
|
let applicationNames;
|
|
|
try {
|
|
|
const fs = window.nodeRequire("fs");
|
|
|
- applicationNames = fs.readFileSync("CameraInfo.txt", "utf-8");
|
|
|
+ try {
|
|
|
+ applicationNames = fs.readFileSync("CameraInfo.txt", "utf-8");
|
|
|
+ } catch (error) {
|
|
|
+ console.log(error);
|
|
|
+ window._hmt.push([
|
|
|
+ "_trackEvent",
|
|
|
+ "登录页面",
|
|
|
+ "CameraInfo.txt出错--0",
|
|
|
+ ]);
|
|
|
+ await new Promise(resolve2 => setTimeout(() => resolve2(), 3000));
|
|
|
+ applicationNames = fs.readFileSync("CameraInfo.txt", "utf-8");
|
|
|
+ }
|
|
|
} catch (error) {
|
|
|
console.log(error);
|
|
|
window._hmt.push([
|