Commit 96a20b0f authored by lyong's avatar lyong

fix:优化温湿度检测

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