Commit 96a20b0f authored by lyong's avatar lyong

fix:优化温湿度检测

parent 973c9813
...@@ -65,10 +65,15 @@ ...@@ -65,10 +65,15 @@
onQuit: function () { onQuit: function () {
factory_testRtc.exitTestRTC(); factory_testRtc.exitTestRTC();
}, },
checkAutoFactory: function (node, topNode, x, y) {
require("factory_testAuto.js").autoFactoryNextPage("factoryTestRtc");
},
touchedYesButton: function (node, topNode, x, y) { touchedYesButton: function (node, topNode, x, y) {
this.checkAutoFactory();
if (globalThis.factoryTest.autoStart == 1)
return;
globalThis.factoryTest.rtc = 1; globalThis.factoryTest.rtc = 1;
var yesJumpPage = require("factoryYesJumpPage.js"); var yesJumpPage = require("factoryYesJumpPage.js");
//console.log("=====yesJumpPage.yesGoToNextPage(factoryTestSound);") //console.log("=====yesJumpPage.yesGoToNextPage(factoryTestSound);")
......
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
<text class="fontsize36" id="title_TEXT" style="color: rgb(255, 255, 255);left:0 ;top: 0; width: 280;height: 55;">TVOC</text> <text class="fontsize36" id="title_TEXT" style="color: rgb(255, 255, 255);left:0 ;top: 0; width: 280;height: 55;">TVOC</text>
</div> </div>
<div style="left:0 ;top: 0; width: 100;height: 55;background-color: #f54335;"> <div style="left:0 ;top: 0; width: 100;height: 55;background-color: #f54335;">
<text class="fontsize36" id="id_back" onpress="touchedScreen" onclick="touchedBackButton" style="color: #ffffff;left:0 ;top: 0; width: 100;height: 55;">失败</text> <text class="fontsize36" id="id_back" onpress="touchedScreen" onclick="touchedNGButton" style="color: #ffffff;left:0 ;top: 0; width: 100;height: 55;">失败</text>
</div> </div>
<div id="id_yes" style="left:380 ;top: -480; width: 100;height: 55;background-color: #90c752;"> <div id="id_yes" style="left:380 ;top: -480; width: 100;height: 55;background-color: #90c752;">
<text class="fontsize36" onpress="touchedScreen" onclick="touchedYesButton" style="color: #ffffff;left:0 ;top: 0; width: 100;height: 55;">通过</text> <text class="fontsize36" onpress="touchedScreen" onclick="touchedYesButton" style="color: #ffffff;left:0 ;top: 0; width: 100;height: 55;">通过</text>
...@@ -93,7 +93,11 @@ ...@@ -93,7 +93,11 @@
this.$setTextColor("id_temp", "#00ff00"); this.$setTextColor("id_temp", "#00ff00");
this.$setTextColor("id_humidity", "#00ff00"); this.$setTextColor("id_humidity", "#00ff00");
}, },
checkAutoFactory: function (node, topNode, x, y) {
require("factory_testAuto.js").autoFactoryNextPage("factoryTestTvoc");
},
InterValTime: function () { InterValTime: function () {
console.log("tvoc test");
var file = this.readDataByFile(); // 注意 this var file = this.readDataByFile(); // 注意 this
var t = file.t; var t = file.t;
var h = file.h; var h = file.h;
...@@ -101,6 +105,9 @@ ...@@ -101,6 +105,9 @@
if (t > 0 && h > 0) { if (t > 0 && h > 0) {
this.setValue(t, h); this.setValue(t, h);
this.checkAutoFactory();
if (globalThis.factoryTest.autoStart == 1)
return;
} }
else { else {
this.naValueSet(); this.naValueSet();
...@@ -123,25 +130,17 @@ ...@@ -123,25 +130,17 @@
this.clearTimer(); this.clearTimer();
}, },
clearTimer: function () { clearTimer: function () {
serialManager.close();
this.$clearInterval(this.testTimer); this.$clearInterval(this.testTimer);
}, },
touchedYesButton: function (node, topNode, x, y) { touchedYesButton: function (node, topNode, x, y) {
globalThis.factoryTest.uartComm = 1; globalThis.factoryTest.tvoc = 1;
userData.factoryRecvCnt = 0;
var yesJumpPage = require("factoryYesJumpPage.js"); var yesJumpPage = require("factoryYesJumpPage.js");
//console.log("=====yesJumpPage.yesGoToNextPage(factoryTestUartComm);") yesJumpPage.yesGoToNextPage("factoryTestTvoc");
yesJumpPage.yesGoToNextPage("factoryTestUartComm");
}, },
touchedNGButton: function (node, topNode, x, y) { touchedNGButton: function (node, topNode, x, y) {
globalThis.factoryTest.uartComm = 2; globalThis.factoryTest.tvoc = 2;
router.push({
path: "factory_testList",
});
},
touchedBackButton: function (node, topNode, x, y) {
router.push({ router.push({
path: "factory_testList", path: "factory_testList",
}); });
......
...@@ -389,12 +389,12 @@ ...@@ -389,12 +389,12 @@
{ index: 5, property: "bright" }, { index: 5, property: "bright" },
{ index: 6, property: "licenseAuthor" }, { index: 6, property: "licenseAuthor" },
{ index: 7, property: "rtc" }, { index: 7, property: "rtc" },
{ index: 7, property: "tvoc" }, { index: 8, property: "tvoc" },
{ index: 8, property: "burnIn" }, { index: 9, property: "burnIn" },
{ index: 9, property: "systemCheck" }, { index: 10, property: "systemCheck" },
{ index: 10, property: "clearAll" }, { index: 11, property: "clearAll" },
// { index: 9, property: "pcba" }, // { index: 9, property: "pcba" },
{ index: 11, property: "start" }, { index: 12, property: "start" },
]; ];
......
...@@ -20,6 +20,7 @@ var flageMap = { ...@@ -20,6 +20,7 @@ var flageMap = {
"factoryTestBright": "bright", "factoryTestBright": "bright",
"factoryTestLicenseAuthor": "licenseAuthor", "factoryTestLicenseAuthor": "licenseAuthor",
"factoryTestRtc": "rtc", "factoryTestRtc": "rtc",
"factoryTestTvoc": "tvoc",
"factoryTestBurnIn": "burnIn", "factoryTestBurnIn": "burnIn",
"factoryTestsystemCheck": "systemCheck", "factoryTestsystemCheck": "systemCheck",
"factoryTestClearAll": "clearAll", "factoryTestClearAll": "clearAll",
...@@ -36,6 +37,7 @@ var autoMovePage = [ ...@@ -36,6 +37,7 @@ var autoMovePage = [
"factoryTestBright", "factoryTestBright",
"factoryTestLicenseAuthor", "factoryTestLicenseAuthor",
"factoryTestRtc", "factoryTestRtc",
"factoryTestTvoc",
// "factoryTestBurnIn", // "factoryTestBurnIn",
"factoryTestsystemCheck", "factoryTestsystemCheck",
// "factoryTestClearAll", // "factoryTestClearAll",
...@@ -58,7 +60,7 @@ function autoFactoryNextPage(curPageName) { ...@@ -58,7 +60,7 @@ function autoFactoryNextPage(curPageName) {
if (!curPageName) return; if (!curPageName) return;
console.log("[autoFactoryNextPage] 当前页面:" + curPageName); console.log("[autoFactoryNextPage] 当前页面:" + curPageName);
console.log("[autoFactoryNextPage] autoStart状态" + globalThis.factoryTest.autoStart); console.log("[autoFactoryNextPage] autoStart状态:" + globalThis.factoryTest.autoStart);
if (globalThis.factoryTest.autoStart == 1) { if (globalThis.factoryTest.autoStart == 1) {
// if (1) { // if (1) {
......
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