Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
R
re860_factory
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
waterword
re860_factory
Commits
e1e59099
Commit
e1e59099
authored
Oct 10, 2025
by
lyong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix:优化Tp测试局部测试
parent
88ed78b6
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
77 additions
and
96 deletions
+77
-96
factoryTestItem/factoryTestTouch.evue
factoryTestItem/factoryTestTouch.evue
+77
-96
No files found.
factoryTestItem/factoryTestTouch.evue
View file @
e1e59099
...
...
@@ -14,46 +14,11 @@
<script>
var
router
=
require
(
"
@system.router
"
);
var
lvgl
=
require
(
"
@native.lvgl7
"
);
var
point_div
=
undefined
;
var
point_div_list
=
undefined
;
var
FirstStartupFlag
=
1
;
export
default
{
data
:
{
flagBash
:
[
[
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
],
[
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
],
[
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
],
[
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
],
[
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
],
[
0
,
0
,
0
,
0
,
0
,
0
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
,
0
,
0
,
0
,
0
],
[
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
],
[
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
],
[
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
],
[
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
],
[
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
],
[
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
],
[
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
],
[
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
,
0
],
],
flagBash
:
Array
(
15
).
fill
().
map
(()
=>
Array
(
15
).
fill
(
0
)),
flagBashStd
:
Array
(
15
).
fill
().
map
(()
=>
Array
(
15
).
fill
(
0
)),
appItem
:
[
{
id
:
"
id_block0_0
"
},
{
id
:
"
id_block0_1
"
},
{
id
:
"
id_block0_2
"
},
{
id
:
"
id_block0_3
"
},
{
id
:
"
id_block0_4
"
},
{
id
:
"
id_block0_5
"
},
{
id
:
"
id_block0_6
"
},
{
id
:
"
id_block0_7
"
},
{
id
:
"
id_block0_8
"
},
{
id
:
"
id_block0_9
"
},
...
...
@@ -105,63 +70,51 @@
resetArrays
:
function
(
flagBash
,
flagBashStd
)
{
flagBash
=
Array
.
from
({
length
:
15
},
()
=>
Array
(
15
).
fill
(
0
));
this
.
flagBash
=
Array
.
from
({
length
:
15
},
()
=>
Array
(
15
).
fill
(
0
));
flagBashStd
=
Array
.
from
({
length
:
15
},
()
=>
Array
(
15
).
fill
(
0
));
this
.
flagBashStd
=
Array
.
from
({
length
:
15
},
()
=>
Array
(
15
).
fill
(
0
));
},
notRender
:
function
()
{
for
(
x
=
0
;
x
<
15
;
x
++
)
{
for
(
y
=
0
;
y
<
15
;
y
++
)
{
for
(
var
x
=
0
;
x
<
15
;
x
++
)
{
// ← 加 var
for
(
var
y
=
0
;
y
<
15
;
y
++
)
{
// ← 加 var
var
relId
=
"
id_block
"
+
x
+
"
_
"
+
y
;
////console.log("relId :" + relId);
this
.
$setBackgroundColor
(
relId
,
0xFFFFFF
)
this
.
$setBackgroundColor
(
relId
,
0xFFFFFF
);
}
}
},
dataInit
:
function
()
{
if
(
globalThis
.
factoryTest
.
touch
==
0
)
{
this
.
$setY
(
"
id_yes
"
,
-
480
);
// this.resetArrays();
// if (point_div_list) {
// point_div.removeChild(point_div_list)
// }
// this.notRender();
// this.$setY("id_ng", -480);
// this.$setY("id_back", -480);
}
},
// var dom = require("dom.js"); app.js引入
pointInit
:
function
()
{
var
getPointTopDiv
=
document
.
getElementById
(
'
id_pointDiv
'
);
////console.log("getPointTopDiv:" + getPointTopDiv)
;
var
parent
=
document
.
getElementById
(
'
id_pointDiv
'
);
if
(
!
parent
)
return
;
if
(
!
getPointTopDiv
)
return
if
(
!
point_div
)
{
point_div
=
document
.
createElement
(
'
div
'
,
{
if
(
this
.
point_div_list
&&
this
.
point_div
)
{
this
.
point_div
.
removeChild
(
this
.
point_div_list
);
this
.
point_div_list
=
null
;
}
if
(
!
this
.
point_div
)
{
this
.
point_div
=
document
.
createElement
(
'
div
'
,
{
top
:
0
,
left
:
0
,
width
:
480
,
height
:
480
,
},
getPointTopDiv
)
}
if
(
point_div_list
)
{
point_div
.
removeChild
(
point_div_list
)
return
;
},
parent
)
}
point_div_list
=
document
.
createElement
(
'
div
'
,
{
this
.
point_div_list
=
document
.
createElement
(
'
div
'
,
{
top
:
0
,
left
:
0
,
width
:
480
,
height
:
480
,
},
point_div
)
},
this
.
point_div
)
},
drawPointEvent
:
function
(
x
,
y
)
{
document
.
createElement
(
'
div
'
,
{
top
:
y
,
...
...
@@ -169,7 +122,7 @@
width
:
4
,
height
:
4
,
"
background-color
"
:
"
#ff0000
"
,
},
point_div_list
)
},
this
.
point_div_list
)
},
drawChanlePointEvent
:
function
(
x
,
y
)
{
document
.
createElement
(
'
div
'
,
{
...
...
@@ -178,38 +131,41 @@
width
:
4
,
height
:
4
,
"
background-color
"
:
"
#ff0000
"
,
},
point_div_list
)
},
this
.
point_div_list
)
},
resetDrawDiv
:
function
()
{
// if (point_div_list) {
point_div
.
removeChild
(
point_div_list
)
// return;
//}
point_div_list
=
document
.
createElement
(
'
div
'
,
{
top
:
0
,
left
:
0
,
width
:
480
,
height
:
480
,
},
point_div
)
if
(
this
.
point_div
&&
this
.
point_div_list
)
{
this
.
point_div
.
removeChild
(
this
.
point_div_list
);
}
if
(
!
this
.
point_div
)
return
;
// 节点还没创建就退出
this
.
point_div_list
=
document
.
createElement
(
'
div
'
,
{
top
:
0
,
left
:
0
,
width
:
480
,
height
:
480
},
this
.
point_div
);
},
onInit
:
function
()
{
this
.
point_div
=
null
;
this
.
point_div_list
=
null
;
},
onShow
:
function
()
{
////console.log(this.$uri + "===========factoryTestTouch onShow=============");
////console.log("FirstStartupFlag:" + FirstStartupFlag);
if
(
FirstStartupFlag
==
1
)
{
this
.
timerSet
();
this
.
pointInit
();
}
this
.
dataInit
();
// this.$enableMouseMoveEvent(true);
this
.
resetArrays
();
this
.
notRender
();
this
.
buttonReset
();
this
.
timerSet
();
this
.
pointInit
();
// 先建好 DOM
this
.
resetDrawDiv
();
// 再清一次子画布
},
buttonReset
:
function
()
{
this
.
$setY
(
"
id_yes
"
,
-
480
);
this
.
$setY
(
"
id_ng
"
,
256
);
this
.
$setY
(
"
id_back
"
,
384
);
},
resetArrays
:
function
()
{
this
.
flagBash
=
Array
(
15
).
fill
().
map
(()
=>
Array
(
15
).
fill
(
0
));
this
.
flagBashStd
=
Array
(
15
).
fill
().
map
(()
=>
Array
(
15
).
fill
(
0
));
},
exitEvent
:
function
()
{
FirstStartupFlag
=
0
;
var
x
=
0
;
var
y
=
0
;
var
divheight
=
32
;
...
...
@@ -231,13 +187,29 @@
},
onHide
:
function
()
{
////console.log(this.$uri + "===========factoryTestTouch onHide=============");
this
.
clearTimer
();
this
.
exitEvent
();
this
.
exit
();
},
onQuit
:
function
()
{
////console.log(this.$uri + "===========factoryTestTouch onQuit=============");
this
.
exit
();
},
exit
:
function
()
{
this
.
clearTimer
();
this
.
exitEvent
();
this
.
cleanPointDom
();
},
cleanPointDom
:
function
()
{
if
(
!
this
.
point_div
)
return
;
// 已经清过
if
(
this
.
point_div_list
)
{
try
{
this
.
point_div
.
removeChild
(
this
.
point_div_list
);
}
catch
(
e
)
{
}
this
.
point_div_list
=
null
;
}
var
parent
=
this
.
point_div
.
parentNode
;
if
(
parent
)
{
try
{
parent
.
removeChild
(
this
.
point_div
);
}
catch
(
e
)
{
}
}
this
.
point_div
=
null
;
},
/*************** timer ***************/
timerSet
:
function
()
{
...
...
@@ -406,18 +378,27 @@
},
touchedYesButton
:
function
(
node
,
topNode
,
x
,
y
)
{
globalThis
.
factoryTest
.
touch
=
1
;
// globalThis.factoryTest.touch = 1;
var
global
=
require
(
"
factory_dataStorage.js
"
);
global
.
setFactoryData
(
"
touch
"
,
1
);
this
.
exit
();
var
yesJumpPage
=
require
(
"
factoryYesJumpPage.js
"
);
////console.log("=====yesJumpPage.yesGoToNextPage(factoryTestTouch);")
yesJumpPage
.
yesGoToNextPage
(
"
factoryTestTouch
"
);
},
touchedNGButton
:
function
(
node
,
topNode
,
x
,
y
)
{
globalThis
.
factoryTest
.
touch
=
2
;
//globalThis.factoryTest.touch = 2;
var
global
=
require
(
"
factory_dataStorage.js
"
);
global
.
setFactoryData
(
"
touch
"
,
2
);
this
.
exit
();
router
.
push
({
path
:
"
factory_testList
"
,
});
},
touchedBackButton
:
function
(
node
,
topNode
,
x
,
y
)
{
var
global
=
require
(
"
factory_dataStorage.js
"
);
global
.
setFactoryData
(
"
touch
"
,
3
);
this
.
exit
();
router
.
push
({
path
:
"
factory_testList
"
,
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment