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
104db06b
Commit
104db06b
authored
Jun 29, 2025
by
xiaoye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix
parent
1741020c
Pipeline
#38230
passed with stages
in 2 minutes and 12 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
37 additions
and
3 deletions
+37
-3
src/pages/tournament.vue
src/pages/tournament.vue
+15
-3
src/script/post.ts
src/script/post.ts
+20
-0
src/style/tournament.scss
src/style/tournament.scss
+2
-0
No files found.
src/pages/tournament.vue
View file @
104db06b
...
@@ -38,9 +38,6 @@
...
@@ -38,9 +38,6 @@
<span>
关闭
</span>
<span>
关闭
</span>
<uni-icons
type =
'close'
></uni-icons>
<uni-icons
type =
'close'
></uni-icons>
</view>
</view>
</view>
<br>
<view
class =
'button_list'
>
<view
class =
'button click'
@
click =
'tournament.operatorChk(tournament.on)'
>
<view
class =
'button click'
@
click =
'tournament.operatorChk(tournament.on)'
>
<span>
{{
tournament
.
status
.
text
.
get
(
tournament
.
this
.
status
)
}}
</span>
<span>
{{
tournament
.
status
.
text
.
get
(
tournament
.
this
.
status
)
}}
</span>
<uni-icons
type =
'circle-filled'
:color =
'tournament.status.color.get(tournament.this.status)'
></uni-icons>
<uni-icons
type =
'circle-filled'
:color =
'tournament.status.color.get(tournament.this.status)'
></uni-icons>
...
@@ -57,6 +54,10 @@
...
@@ -57,6 +54,10 @@
<span>
上传
</span>
<span>
上传
</span>
<uni-icons
type =
'cloud-upload'
></uni-icons>
<uni-icons
type =
'cloud-upload'
></uni-icons>
</view>
</view>
<view
class =
'button click'
@
click =
'tournament.operatorChk(tournament.empty)'
>
<span>
清空
</span>
<uni-icons
type =
'spinner-cycle'
color =
'red'
></uni-icons>
</view>
<view
class =
'button click'
@
click =
'tournament.operatorChk(tournament.del)'
>
<view
class =
'button click'
@
click =
'tournament.operatorChk(tournament.del)'
>
<span>
删除
</span>
<span>
删除
</span>
<uni-icons
type =
'trash'
color =
'red'
></uni-icons>
<uni-icons
type =
'trash'
color =
'red'
></uni-icons>
...
@@ -442,6 +443,17 @@
...
@@ -442,6 +443,17 @@
}
}
}
);
}
);
}
,
}
,
empty
:
()
:
void
=>
{
uni
.
showModal
({
title
:
'
确认要清空比赛选手吗?
'
,
success
:
async
(
res
:
UniApp
.
ShowModalRes
)
:
Promise
<
void
>
=>
{
if
(
!
res
.
confirm
)
return
;
// @ts-ignore
if
(
await
Tabulator
.
Tournament
.
Empty
(
Mycard
.
token
,
tournament
.
this
.
id
))
page
.
reload
();
}
}
);
}
,
shuffle
:
()
:
void
=>
{
shuffle
:
()
:
void
=>
{
if
(
tournament
.
this
?.
status
!=
'
Ready
'
)
return
;
if
(
tournament
.
this
?.
status
!=
'
Ready
'
)
return
;
uni
.
showModal
({
uni
.
showModal
({
...
...
src/script/post.ts
View file @
104db06b
...
@@ -95,6 +95,7 @@ class TabulatorAPI {
...
@@ -95,6 +95,7 @@ class TabulatorAPI {
response
.
data
.
data
.
matches
.
forEach
((
i
:
MatchObject
)
=>
{
response
.
data
.
data
.
matches
.
forEach
((
i
:
MatchObject
)
=>
{
matches
.
push
(
new
Match
(
i
));
matches
.
push
(
new
Match
(
i
));
});
});
console
.
log
(
response
)
return
{
return
{
tournament
:
new
Tournament
(
response
.
data
.
data
),
tournament
:
new
Tournament
(
response
.
data
.
data
),
participant
:
{
participant
:
{
...
@@ -269,6 +270,25 @@ class TabulatorAPI {
...
@@ -269,6 +270,25 @@ class TabulatorAPI {
return
false
;
return
false
;
}
}
},
},
Empty
:
async
(
token
:
string
,
id
:
number
)
:
Promise
<
Boolean
>
=>
{
let
response
:
{
data
:
{
success
:
boolean
;
}
};
try
{
response
=
await
this
.
url
.
post
(
`/api/tournament/
${
id
}
/clear-participants`
,
{
headers
:
{
'
x-user-token
'
:
token
}
});
return
response
.
data
.
success
;
}
catch
(
error
)
{
console
.
error
(
error
);
return
false
;
}
},
Shuffle
:
async
(
token
:
string
,
id
:
number
)
:
Promise
<
Boolean
>
=>
{
Shuffle
:
async
(
token
:
string
,
id
:
number
)
:
Promise
<
Boolean
>
=>
{
let
response
:
{
let
response
:
{
data
:
{
data
:
{
...
...
src/style/tournament.scss
View file @
104db06b
...
@@ -11,6 +11,8 @@
...
@@ -11,6 +11,8 @@
.button_list
{
.button_list
{
display
:
flex
;
display
:
flex
;
flex-wrap
:
wrap
;
row-gap
:
10px
;
}
}
.button
{
.button
{
...
...
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