Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
T
tabulator-another-web
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
List
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
tabulator-another-web
Commits
69c2cafd
Commit
69c2cafd
authored
Jun 04, 2025
by
xiaoye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Update tournament.vue
parent
9a2356b3
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
10 deletions
+11
-10
src/pages/tournament.vue
src/pages/tournament.vue
+11
-10
No files found.
src/pages/tournament.vue
View file @
69c2cafd
...
@@ -41,7 +41,7 @@
...
@@ -41,7 +41,7 @@
</view>
</view>
<view
class =
'button click'
@
click =
'tournament.operatorChk(tournament.shuffle)'
>
<view
class =
'button click'
@
click =
'tournament.operatorChk(tournament.shuffle)'
>
<span>
打乱
</span>
<span>
打乱
</span>
<uni-icons
type =
'
loop
'
></uni-icons>
<uni-icons
type =
'
auth
'
></uni-icons>
</view>
</view>
<view
class =
'button click'
@
click =
'tournament.operatorChk(tournament.upload)'
>
<view
class =
'button click'
@
click =
'tournament.operatorChk(tournament.upload)'
>
<span>
上传
</span>
<span>
上传
</span>
...
@@ -178,7 +178,7 @@
...
@@ -178,7 +178,7 @@
>
>
<
/uni-list-item
>
<
/uni-list-item
>
<
view
<
view
v
-
for
=
'
(i, v)
in (match.round == 0) ? match.array.slice((match.page - 1) * 20, match.page * 20) : match.array.filter(m => m.round == match.round).slice((match.page - 1) * 20, match.page * 20)
'
v
-
for
=
'
i
in (match.round == 0) ? match.array.slice((match.page - 1) * 20, match.page * 20) : match.array.filter(m => m.round == match.round).slice((match.page - 1) * 20, match.page * 20)
'
>
>
<
view
<
view
class
=
'
match
'
class
=
'
match
'
...
@@ -189,7 +189,7 @@
...
@@ -189,7 +189,7 @@
:
clearable
=
'
false
'
:
clearable
=
'
false
'
type
=
'
number
'
type
=
'
number
'
:
placeholder
=
'
participant.array.find(p => p.id == i.player1Id)?.name
'
:
placeholder
=
'
participant.array.find(p => p.id == i.player1Id)?.name
'
v
-
model
=
'
match.submit.chk[
v
][0]
'
v
-
model
=
'
match.submit.chk[
match.array.findIndex(m => m === i)
][0]
'
:
disabled
=
"
i.status != 'Running'
"
:
disabled
=
"
i.status != 'Running'
"
><
/uni-easyinput
>
><
/uni-easyinput
>
<
view
>
<
view
>
...
@@ -199,11 +199,11 @@
...
@@ -199,11 +199,11 @@
:
clearable
=
'
false
'
:
clearable
=
'
false
'
type
=
'
number
'
type
=
'
number
'
:
placeholder
=
'
participant.array.find(p => p.id == i.player2Id)?.name
'
:
placeholder
=
'
participant.array.find(p => p.id == i.player2Id)?.name
'
v
-
model
=
'
match.submit.chk[
v
][1]
'
v
-
model
=
'
match.submit.chk[
match.array.findIndex(m => m === i)
][1]
'
:
disabled
=
"
i.status != 'Running'
"
:
disabled
=
"
i.status != 'Running'
"
><
/uni-easyinput
>
><
/uni-easyinput
>
<
/view
>
<
/view
>
<
view
class
=
'
button
'
@
click
=
'
match.submit.on(
v
)
'
>
{{
i
.
status
==
'
Running
'
?
'
提交比分
'
:
i
.
status
==
'
Finished
'
?
'
重赛
'
:
''
}}
<
/view
>
<
view
class
=
'
button
'
@
click
=
'
match.submit.on(
i
)
'
>
{{
i
.
status
==
'
Running
'
?
'
提交比分
'
:
i
.
status
==
'
Finished
'
?
'
重赛
'
:
''
}}
<
/view
>
<
/view
>
<
/view
>
<
uni
-
list
-
item
<
uni
-
list
-
item
:
clickable
=
true
:
clickable
=
true
...
@@ -440,14 +440,15 @@
...
@@ -440,14 +440,15 @@
if
(
!
match
.
submit
.
page
)
if
(
!
match
.
submit
.
page
)
match
.
submit
.
chk
=
match
.
array
.
map
(
i
=>
[
i
.
player1Score
??
0
,
i
.
player2Score
??
0
]);
match
.
submit
.
chk
=
match
.
array
.
map
(
i
=>
[
i
.
player1Score
??
0
,
i
.
player2Score
??
0
]);
}
,
}
,
on
:
async
(
v
:
number
)
:
Promise
<
void
>
=>
{
on
:
async
(
i
:
Match
)
:
Promise
<
void
>
=>
{
switch
(
match
.
array
[
v
].
status
)
{
const
v
=
match
.
array
.
findIndex
(
m
=>
m
===
i
);
switch
(
i
.
status
)
{
case
'
Running
'
:
case
'
Running
'
:
const
player1
:
number
=
match
.
submit
.
chk
[
v
][
0
]
??
0
;
const
player1
:
number
=
match
.
submit
.
chk
[
v
][
0
]
??
0
;
const
player2
:
number
=
match
.
submit
.
chk
[
v
][
1
]
??
0
;
const
player2
:
number
=
match
.
submit
.
chk
[
v
][
1
]
??
0
;
const
id
:
null
|
number
=
player1
>
player2
?
match
.
array
[
v
].
player1Id
:
player1
==
player2
?
null
:
match
.
array
[
v
]
.
player2Id
const
id
:
null
|
number
=
player1
>
player2
?
i
.
player1Id
:
player1
==
player2
?
null
:
i
.
player2Id
// @ts-ignore
// @ts-ignore
if
(
await
Tabulator
.
Match
.
Update
(
Mycard
.
token
,
match
.
array
[
v
]
.
id
,
{
if
(
await
Tabulator
.
Match
.
Update
(
Mycard
.
token
,
i
.
id
,
{
player1Score
:
player1
,
player1Score
:
player1
,
player2Score
:
player2
,
player2Score
:
player2
,
winnerId
:
id
winnerId
:
id
...
@@ -456,7 +457,7 @@
...
@@ -456,7 +457,7 @@
break
;
break
;
case
'
Finished
'
:
case
'
Finished
'
:
// @ts-ignore
// @ts-ignore
if
(
await
Tabulator
.
Match
.
Update
(
Mycard
.
token
,
match
.
array
[
v
]
.
id
,
{
if
(
await
Tabulator
.
Match
.
Update
(
Mycard
.
token
,
i
.
id
,
{
player1Score
:
0
,
player1Score
:
0
,
player2Score
:
0
,
player2Score
:
0
,
winnerId
:
undefined
winnerId
:
undefined
...
...
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