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
b032a553
Commit
b032a553
authored
Jul 14, 2025
by
xiaoye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
减少不必要的请求
parent
f53fde14
Pipeline
#39012
passed with stages
in 3 minutes and 7 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
12 deletions
+11
-12
src/pages/drawer/setting.vue
src/pages/drawer/setting.vue
+7
-7
src/pages/tournament.vue
src/pages/tournament.vue
+4
-3
src/script/participant.ts
src/script/participant.ts
+0
-2
No files found.
src/pages/drawer/setting.vue
View file @
b032a553
...
...
@@ -29,27 +29,27 @@
</view>
<br>
<view
v-show =
'operatorChk()'
>
<view
class =
'button
click
'
@
click =
'emit.on()'
>
<view
class =
'button'
@
click =
'emit.on()'
>
<span>
{{
`切换状态:${status.text.get(tournament.this.status)
}
`
}}
<
/span
>
<
uni
-
icons
type
=
'
circle-filled
'
:
color
=
'
status.color.get(tournament.this.status)
'
><
/uni-icons
>
<
/view
>
<
view
class
=
'
button
click
'
@
click
=
'
emit.reset()
'
>
<
view
class
=
'
button
'
@
click
=
'
emit.reset()
'
>
<
span
>
重置比赛
<
/span
>
<
uni
-
icons
type
=
'
loop
'
><
/uni-icons
>
<
/view
>
<
view
class
=
'
button
click
'
@
click
=
'
emit.shuffle()
'
>
<
view
class
=
'
button
'
@
click
=
'
emit.shuffle()
'
>
<
span
>
打乱选手
<
/span
>
<
uni
-
icons
type
=
'
auth
'
><
/uni-icons
>
<
/view
>
<
view
class
=
'
button
click
'
@
click
=
'
emit.upload()
'
>
<
view
class
=
'
button
'
@
click
=
'
emit.upload()
'
>
<
span
>
上传选手
<
/span
>
<
uni
-
icons
type
=
'
cloud-upload
'
><
/uni-icons
>
<
/view
>
<
view
class
=
'
button
click
'
@
click
=
'
emit.empty()
'
>
<
view
class
=
'
button
'
@
click
=
'
emit.empty()
'
>
<
span
>
清空选手
<
/span
>
<
uni
-
icons
type
=
'
spinner-cycle
'
color
=
'
red
'
><
/uni-icons
>
<
/view
>
<
view
class
=
'
button
click
'
@
click
=
'
emit.del()
'
>
<
view
class
=
'
button
'
@
click
=
'
emit.del()
'
>
<
span
>
删除比赛
<
/span
>
<
uni
-
icons
type
=
'
trash
'
color
=
'
red
'
><
/uni-icons
>
<
/view
>
...
...
@@ -85,7 +85,7 @@
<
/uni-forms
>
<
/template
>
<
template
v
-
slot
:
footer
>
<
view
id
=
'
footer
'
>
<
view
id
=
'
footer
'
>
<
view
class
=
'
button
'
:
style
=
"
{ '--color' : '#409eff'
}
"
...
...
src/pages/tournament.vue
View file @
b032a553
...
...
@@ -458,15 +458,16 @@
let
del_list
:
Array
<
Participant
>
=
[];
// @ts-ignore
res
.
tempFiles
.
forEach
(
i
=>
{
const
name
=
i
.
name
.
replace
(
/
\.[^/
.
]
+$/
,
""
);
const
p
=
participant
.
array
.
filter
(
p
=>
p
.
baseName
==
name
||
p
.
name
==
name
);
const
fileName
=
i
.
name
.
replace
(
/
\.[^/
.
]
+$/
,
""
);
const
name
=
fileName
.
split
(
/
[\+\u
FF0B
]
/
);
const
p
=
participant
.
array
.
filter
(
p
=>
p
.
name
==
((
name
.
length
==
2
&&
!
Number
.
isNaN
(
name
[
0
])
&&
name
[
0
].
length
>
3
)
?
name
[
1
]
:
fileName
));
del_list
.
push
(...
p
);
}
);
// @ts-ignore
if
(
await
Tabulator
.
Tournament
.
UpdateYdk
(
Mycard
.
token
,
tournament
.
this
.
id
,
res
))
{
for
(
const
i
of
del_list
)
await
participant
.
del
(
i
);
await
Tabulator
.
Participant
.
Delete
(
Mycard
.
token
,
i
.
id
);
await
tournament
.
search
();
}
}
;
...
...
src/script/participant.ts
View file @
b032a553
...
...
@@ -5,7 +5,6 @@ import { Base64 } from 'js-base64';
class
Participant
{
id
:
number
;
name
:
string
;
baseName
:
string
;
qq
:
string
|
undefined
;
quit
:
boolean
;
tournamentId
:
number
;
...
...
@@ -16,7 +15,6 @@ class Participant {
constructor
(
obj
:
ParticipantObject
)
{
const
name
=
obj
.
name
.
split
(
/
[\+\u
FF0B
]
/
);
this
.
name
=
(
name
.
length
==
2
&&
!
Number
.
isNaN
(
name
[
0
])
&&
name
[
0
].
length
>
3
)
?
name
[
1
]
:
obj
.
name
;
this
.
baseName
=
obj
.
name
;
this
.
qq
=
(
name
.
length
==
2
&&
!
Number
.
isNaN
(
name
[
0
])
&&
name
[
0
].
length
>
3
)
?
name
[
0
]
:
undefined
;
this
.
tournamentId
=
obj
.
tournamentId
;
this
.
id
=
obj
.
id
;
...
...
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