Commit 3f3d5017 authored by waterword's avatar waterword

refactor(factoryTest): 重构系统检测逻辑并优化字体路径

- 更新 GothamMedium.ttf 字体路径为相对路径
- 添加系统检测结果全局变量 factoryTestSystemCheck
- 实现系统检测计数和结果更新逻辑
- 优化系统信息更新和显示逻辑
parent 8954c7e3
......@@ -1226,7 +1226,7 @@
this.setPickPara("setTimePickerAMPM", 40, 26);
globalThat.$FontPath = "GothamMedium.ttf";
globalThat.$FontPath = "./../re860a-v1.0/GothamMedium.ttf";
this.$setTextFontSize("enterPasswordShowInvisiableText", 24);
this.$setText("enterPasswordShowInvisiableText", "`");
globalThat.$FontPath = "SimHei_GB2312_80_t.ttf";
......
......@@ -139,7 +139,8 @@
crtsystemId1_crtTextTips: "绿/黄色代表通过,红色代表不通过(黄色表示系统做过0TA升级)",
crtsystemId2_crtTextTips: "绿/黄色代表通过,红色代表不通过(黄色表示系统做过0TA升级)",
crtsystemId3_crtTextTips: "该页信息不作判定",
pagecnt: 1
pagecnt: 1,
factoryTestSystemCheck: 0,
},
......@@ -168,6 +169,7 @@
onHide: function () {
console.log(this.$uri + "===========onHide=============");
this.clearTimer();
},
onQuit: function () {
console.log(this.$uri + "===========onQuit=============");
......@@ -223,6 +225,8 @@
this.pagecnt = 1;
//添加检查全绿为测试功能
globalThis.factoryTest.systemCheck = this.factoryTestSystemCheck;
console.log("=====globalThis.factoryTest.systemCheck:"+globalThis.factoryTest.systemCheck);
var yesJumpPage = require("factoryYesJumpPage.js");
console.log("=====yesJumpPage.yesGoToNextPage(factoryTestsystemCheck);")
......
......@@ -33,12 +33,41 @@ const textValueKeys = [
// "crtsystemId3_TextValue5"
];
// function setTextColorByValue(that, fullKey, value) {
// const color = (value === "NG") ? "#ff0000" : "#00ff00";
// const key = fullKey.replace(/^crt/, ""); // 去掉前缀 "crt"
// that.$setTextColor(key, color);
// }
let checkedCount = 0;
let ngCount = 0;
function setTextColorByValue(that, fullKey, value) {
// 1. 设置颜色
const color = (value === "NG") ? "#ff0000" : "#00ff00";
const key = fullKey.replace(/^crt/, ""); // 去掉前缀 "crt"
const key = fullKey.replace(/^crt/, "");
that.$setTextColor(key, color);
// 2. 更新计数
checkedCount++;
if (value === "NG") ngCount++;
// 3. 等所有项都检测完再写全局变量
console.log("textValueKeys.length: " + textValueKeys.length +", checkedCount: " + checkedCount + ", ngCount: " + ngCount)
console.log("factoryTestSystemCheck: " + that.factoryTestSystemCheck)
if (checkedCount === textValueKeys.length) {
that.factoryTestSystemCheck = (ngCount === 0) ? 1 : 2;
// 重置计数器,方便下次调用
checkedCount = 0;
ngCount = 0;
}
}
// 获取系统信息
function updateSystemInfo() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment