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
a75de90a
Commit
a75de90a
authored
Jun 17, 2025
by
xiaoye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
3de95e36
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
34 additions
and
5 deletions
+34
-5
src/pages/drawer/creator.vue
src/pages/drawer/creator.vue
+10
-1
src/pages/drawer/setting.vue
src/pages/drawer/setting.vue
+1
-1
src/pages/tournament.vue
src/pages/tournament.vue
+23
-3
No files found.
src/pages/drawer/creator.vue
View file @
a75de90a
...
@@ -99,6 +99,10 @@
...
@@ -99,6 +99,10 @@
rule
:
{
rule
:
{
select
:
''
,
select
:
''
,
settings
:
{
settings
:
{
winScore
:
3
,
drawScore
:
1
,
byeScore
:
0
,
hasThirdPlaceMatch
:
true
}
as
ruleSettings
,
}
as
ruleSettings
,
range
:
[
range
:
[
{
value
:
'
SingleElimination
'
,
text
:
'
单淘
'
},
{
value
:
'
SingleElimination
'
,
text
:
'
单淘
'
},
...
@@ -117,7 +121,12 @@
...
@@ -117,7 +121,12 @@
create
.
description
=
''
;
create
.
description
=
''
;
create
.
visibility
.
select
=
''
;
create
.
visibility
.
select
=
''
;
create
.
rule
.
select
=
''
;
create
.
rule
.
select
=
''
;
create
.
rule
.
settings
=
{}
as
ruleSettings
;
create
.
rule
.
settings
=
{
winScore
:
3
,
drawScore
:
1
,
byeScore
:
0
,
hasThirdPlaceMatch
:
true
}
as
ruleSettings
;
create
.
collaborators
=
[];
create
.
collaborators
=
[];
},
},
update
:
async
()
:
Promise
<
void
>
=>
{
update
:
async
()
:
Promise
<
void
>
=>
{
...
...
src/pages/drawer/setting.vue
View file @
a75de90a
...
@@ -15,7 +15,7 @@
...
@@ -15,7 +15,7 @@
:disabled =
"tournament.this?.status != 'Ready' || tournament.operatorChk()"
:disabled =
"tournament.this?.status != 'Ready' || tournament.operatorChk()"
></uni-data-select>
></uni-data-select>
<view
v-show =
"tournament.rule.select == 'Swiss'"
>
<view
v-show =
"tournament.rule.select == 'Swiss'"
>
<
uni-easyinput
type =
'number'
placeholder =
'轮数'
v-model =
'tournament.rule.settings.rounds'
:disabled =
"tournament.this?.status != 'Ready' || tournament.operatorChk()"
/
>
<
!--
<uni-easyinput
type =
'number'
placeholder =
'轮数'
v-model =
'tournament.rule.settings.rounds'
:disabled =
"tournament.this?.status != 'Ready' || tournament.operatorChk()"
/>
--
>
<uni-easyinput
type =
'number'
placeholder =
'胜利分'
v-model =
'tournament.rule.settings.winScore'
:disabled =
"tournament.this?.status != 'Ready' || tournament.operatorChk()"
/>
<uni-easyinput
type =
'number'
placeholder =
'胜利分'
v-model =
'tournament.rule.settings.winScore'
:disabled =
"tournament.this?.status != 'Ready' || tournament.operatorChk()"
/>
<uni-easyinput
type =
'number'
placeholder =
'平局分'
v-model =
'tournament.rule.settings.drawScore'
:disabled =
"tournament.this?.status != 'Ready' || tournament.operatorChk()"
/>
<uni-easyinput
type =
'number'
placeholder =
'平局分'
v-model =
'tournament.rule.settings.drawScore'
:disabled =
"tournament.this?.status != 'Ready' || tournament.operatorChk()"
/>
<uni-easyinput
type =
'number'
placeholder =
'轮空分'
v-model =
'tournament.rule.settings.byeScore'
:disabled =
"tournament.this?.status != 'Ready' || tournament.operatorChk()"
/>
<uni-easyinput
type =
'number'
placeholder =
'轮空分'
v-model =
'tournament.rule.settings.byeScore'
:disabled =
"tournament.this?.status != 'Ready' || tournament.operatorChk()"
/>
...
...
src/pages/tournament.vue
View file @
a75de90a
...
@@ -166,6 +166,7 @@
...
@@ -166,6 +166,7 @@
v
-
show
=
'
!page.loading
'
v
-
show
=
'
!page.loading
'
:
is
-
full
=
'
true
'
:
is
-
full
=
'
true
'
:
title
=
'
`比赛:${match.total
}
`
'
:
title
=
'
`比赛:${match.total
}
`
'
:
sub
-
title
=
"
tournament.this.rule == 'Swiss' ? `轮数:${match.maxRound
}
` : ''
"
>
>
<
view
id
=
'
round
'
>
<
view
id
=
'
round
'
>
<
div
>
<
div
>
...
@@ -180,7 +181,7 @@
...
@@ -180,7 +181,7 @@
<
/div
>
<
/div
>
<
div
>
<
div
>
<
view
class
=
'
button
'
@
click
=
'
() => { match.round = 0;
}
'
>
全部轮次
<
/view
>
<
view
class
=
'
button
'
@
click
=
'
() => { match.round = 0;
}
'
>
全部轮次
<
/view
>
<
view
class
=
'
button
'
@
click
=
'
() => { match.round = 0;
}
'
>
复制对战表
<
/view
>
<
view
class
=
'
button
'
@
click
=
'
tournament.copy()
'
>
复制对战表
<
/view
>
<
/div
>
<
/div
>
<
/view
>
<
/view
>
<
transition
name
=
'
switch
'
>
<
transition
name
=
'
switch
'
>
...
@@ -446,6 +447,24 @@
...
@@ -446,6 +447,24 @@
}
}
}
;
}
;
await
UniApp
.
selectFile
([
'
.ydk
'
,
'
.txt
'
],
f
);
await
UniApp
.
selectFile
([
'
.ydk
'
,
'
.txt
'
],
f
);
}
,
copy
:
()
:
void
=>
{
if
(
!
tournament
.
this
)
return
;
let
string
=
`<--- ${tournament.this.name
}
- [${tournament.this.rule == 'SingleElimination' ? '淘汰赛' : '瑞士轮'
}
]${tournament.this.ruleSettings.rounds ? `
[
$
{
tournament
.
this
.
ruleSettings
.
rounds
}轮
]
` : ''
}
[${tournament.this.count ?? 0
}
人] --->\n`
for
(
let
round
=
1
;
round
<=
match
.
maxRound
;
round
++
)
{
if
(
match
.
round
>
0
&&
match
.
round
!=
round
)
continue
;
string
+=
`---------------------------------------------\n第[ ${round
}
]轮对决战况表\n---------------------------------------------\n`
match
.
array
.
filter
(
i
=>
i
.
round
==
round
).
forEach
((
i
,
v
)
=>
{
if
(
i
.
player1Id
||
i
.
player2Id
)
{
string
+=
`[${v + 1
}
]组\n`
;
string
+=
`\t[选手A][${participant.array.find(p => p.id == i.player1Id)?.name ?? ''
}
]\n`
;
string
+=
`\t[比 分][${i.status == 'Finished' ? `
$
{
i
.
player1Score
}
:
$
{
i
.
player2Score
}
` : 'VS'
}
]\n`
;
string
+=
`\t[选手B][${participant.array.find(p => p.id == i.player2Id)?.name ?? ''
}
]\n`
;
}
}
);
}
string
+=
'
---------------------------------------------
'
;
UniApp
.
copy
(
string
);
}
}
}
);
}
);
...
@@ -454,7 +473,7 @@
...
@@ -454,7 +473,7 @@
total
:
0
,
total
:
0
,
page
:
1
,
page
:
1
,
round
:
0
,
round
:
0
,
maxRound
:
2
,
maxRound
:
0
,
status
:
{
status
:
{
color
:
new
Map
([
color
:
new
Map
([
[
'
Running
'
,
'
rgb(84, 200, 17)
'
],
[
'
Running
'
,
'
rgb(84, 200, 17)
'
],
...
@@ -677,7 +696,8 @@
...
@@ -677,7 +696,8 @@
watch
(()
=>
{
return
match
.
array
;
}
,
async
()
:
Promise
<
void
>
=>
{
watch
(()
=>
{
return
match
.
array
;
}
,
async
()
:
Promise
<
void
>
=>
{
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
]);
match
.
maxRound
=
match
.
array
.
find
(
i
=>
i
.
isThirdPlaceMatch
)?.
round
??
match
.
round
+
1
;
if
(
match
.
array
.
length
>
0
)
match
.
maxRound
=
match
.
array
.
reduce
((
a
,
b
)
=>
(
a
.
round
>
b
.
round
)
?
a
:
b
)?.
round
??
0
;
}
,
{
deep
:
true
}
);
}
,
{
deep
:
true
}
);
watch
(()
=>
{
return
tournament
.
this
?.
creator
;
}
,
async
(
n
=
-
1
)
=>
{
watch
(()
=>
{
return
tournament
.
this
?.
creator
;
}
,
async
(
n
=
-
1
)
=>
{
...
...
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