Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
Z
zhmes-agecal
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
耿迪迪
zhmes-agecal
Commits
2622f89b
Commit
2622f89b
authored
Dec 03, 2025
by
wanghao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1 托盘编号 调整 由以前的一条龙 改成 27 个一组 一条龙
parent
6b26eb9d
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
16 deletions
+29
-16
TrayBinding.vue
zhmes-agecal-web/src/views/screen/components/TrayBinding.vue
+29
-16
No files found.
zhmes-agecal-web/src/views/screen/components/TrayBinding.vue
View file @
2622f89b
...
...
@@ -186,16 +186,23 @@ export default {
const
col
=
(
i
%
9
)
+
1
;
// 1-9列
let
number
;
// 计算当前行的起始数字
const
rowStart
=
(
row
-
1
)
*
9
+
1
;
const
rowEnd
=
row
*
9
;
if
(
row
%
2
===
1
)
{
// 奇数行:从左到右递增(1-9, 19-27, 37-45, 55-63)
number
=
rowStart
+
(
col
-
1
);
// 计算属于第几段(0,1,2)
const
segment
=
Math
.
floor
((
row
-
1
)
/
3
);
// 0:1-3行, 1:4-6行, 2:7-8行
// 计算段内行号(0,1,2)
const
segmentRow
=
(
row
-
1
)
%
3
;
// 计算当前段的起始数字
const
segmentStart
=
segment
*
27
+
1
;
// 每段内按照一条龙排列
if
(
segmentRow
%
2
===
0
)
{
// 奇数行(第1、4、7行):从左到右递增
number
=
segmentStart
+
segmentRow
*
9
+
(
col
-
1
);
}
else
{
// 偶数行
:从右到左递增(18-10, 36-28, 54-46, 72-64)
number
=
rowEnd
-
(
col
-
1
)
;
// 偶数行
(第2、5、8行):从右到左递增
number
=
segmentStart
+
(
segmentRow
+
1
)
*
9
-
col
;
}
return
{
...
...
@@ -331,16 +338,22 @@ export default {
const
col
=
(
i
%
9
)
+
1
;
// 1-9列
let
number
;
// 计算当前行的起始数字
const
rowStart
=
(
row
-
1
)
*
9
+
1
;
const
rowEnd
=
row
*
9
;
// 计算属于第几段(0,1,2)
const
segment
=
Math
.
floor
((
row
-
1
)
/
3
);
// 0:1-3行, 1:4-6行, 2:7-8行
// 计算段内行号(0,1,2)
const
segmentRow
=
(
row
-
1
)
%
3
;
// 计算当前段的起始数字
const
segmentStart
=
segment
*
27
+
1
;
if
(
row
%
2
===
1
)
{
// 奇数行:从左到右递增(1-9, 19-27, 37-45, 55-63)
number
=
rowStart
+
(
col
-
1
);
// 每段内按照一条龙排列
if
(
segmentRow
%
2
===
0
)
{
// 奇数行(第1、4、7行):从左到右递增
number
=
segmentStart
+
segmentRow
*
9
+
(
col
-
1
);
}
else
{
// 偶数行
:从右到左递增(18-10, 36-28, 54-46, 72-64)
number
=
rowEnd
-
(
col
-
1
)
;
// 偶数行
(第2、5、8行):从右到左递增
number
=
segmentStart
+
(
segmentRow
+
1
)
*
9
-
col
;
}
return
{
...
...
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