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
8e4ea77a
Commit
8e4ea77a
authored
Jun 29, 2025
by
xiaoye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加加载动画
parent
104db06b
Pipeline
#38232
passed with stages
in 4 minutes and 20 seconds
Changes
4
Pipelines
1
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
133 additions
and
5 deletions
+133
-5
src/pages/tabulator.vue
src/pages/tabulator.vue
+4
-1
src/script/post.ts
src/script/post.ts
+113
-2
src/style/page.scss
src/style/page.scss
+16
-0
src/style/tournament.scss
src/style/tournament.scss
+0
-2
No files found.
src/pages/tabulator.vue
View file @
8e4ea77a
...
@@ -26,6 +26,9 @@
...
@@ -26,6 +26,9 @@
</uni-list-chat>
</uni-list-chat>
</uni-list>
</uni-list>
</view>
</view>
<transition
name =
'switch'
>
<uni-icons
id =
'progress'
type =
'spinner-cycle'
v-if =
'Loading'
size =
'80'
></uni-icons>
</transition>
<view
class =
'click head'
><uni-list><uni-list-chat></uni-list-chat></uni-list></view>
<view
class =
'click head'
><uni-list><uni-list-chat></uni-list-chat></uni-list></view>
<Pics
<Pics
:style =
"
{
:style =
"
{
...
@@ -147,7 +150,7 @@
...
@@ -147,7 +150,7 @@
import
{
ref
,
reactive
,
onMounted
,
onUnmounted
,
onBeforeMount
,
watch
}
from
'
vue
'
;
import
{
ref
,
reactive
,
onMounted
,
onUnmounted
,
onBeforeMount
,
watch
}
from
'
vue
'
;
import
{
TournamentFindObject
,
TournamentCreateObject
,
ruleSettings
,
UserObject
}
from
'
../script/type.ts
'
;
import
{
TournamentFindObject
,
TournamentCreateObject
,
ruleSettings
,
UserObject
}
from
'
../script/type.ts
'
;
import
UniApp
from
'
../script/uniapp.ts
'
;
import
UniApp
from
'
../script/uniapp.ts
'
;
import
{
Tabulator
,
User
}
from
'
../script/post.ts
'
;
import
{
Tabulator
,
User
,
Loading
}
from
'
../script/post.ts
'
;
import
Tournament
from
'
../script/tournament.ts
'
;
import
Tournament
from
'
../script/tournament.ts
'
;
import
Mycard
from
'
../script/mycard.ts
'
;
import
Mycard
from
'
../script/mycard.ts
'
;
import
emitter
from
'
../script/emitter.ts
'
import
emitter
from
'
../script/emitter.ts
'
...
...
src/script/post.ts
View file @
8e4ea77a
import
{
ref
,
Ref
}
from
'
vue
'
;
import
axios
,
{
AxiosInstance
}
from
'
axios
'
;
import
axios
,
{
AxiosInstance
}
from
'
axios
'
;
import
Tournament
from
'
../script/tournament.ts
'
;
import
Tournament
from
'
../script/tournament.ts
'
;
import
Participant
from
'
../script/participant.ts
'
;
import
Participant
from
'
../script/participant.ts
'
;
...
@@ -26,6 +27,8 @@ import {
...
@@ -26,6 +27,8 @@ import {
}
from
'
./type.ts
'
}
from
'
./type.ts
'
import
UniApp
from
'
./uniapp.ts
'
;
import
UniApp
from
'
./uniapp.ts
'
;
let
Loading
=
ref
(
false
);
class
TabulatorAPI
{
class
TabulatorAPI
{
url
:
AxiosInstance
;
url
:
AxiosInstance
;
...
@@ -43,6 +46,7 @@ class TabulatorAPI {
...
@@ -43,6 +46,7 @@ class TabulatorAPI {
}
}
};
};
try
{
try
{
Loading
.
value
=
true
;
response
=
await
this
.
url
.
post
(
`/api/tournament`
,
TournamentData
,
{
response
=
await
this
.
url
.
post
(
`/api/tournament`
,
TournamentData
,
{
headers
:
{
headers
:
{
'
x-user-token
'
:
token
'
x-user-token
'
:
token
...
@@ -55,6 +59,9 @@ class TabulatorAPI {
...
@@ -55,6 +59,9 @@ class TabulatorAPI {
console
.
error
(
error
);
console
.
error
(
error
);
return
-
1
;
return
-
1
;
}
}
finally
{
Loading
.
value
=
false
;
}
},
},
Delete
:
async
(
token
:
string
,
id
:
number
)
:
Promise
<
Boolean
>
=>
{
Delete
:
async
(
token
:
string
,
id
:
number
)
:
Promise
<
Boolean
>
=>
{
let
response
:
{
let
response
:
{
...
@@ -63,6 +70,7 @@ class TabulatorAPI {
...
@@ -63,6 +70,7 @@ class TabulatorAPI {
}
}
};
};
try
{
try
{
Loading
.
value
=
true
;
response
=
await
this
.
url
.
delete
(
`/api/tournament/
${
id
}
`
,
{
response
=
await
this
.
url
.
delete
(
`/api/tournament/
${
id
}
`
,
{
headers
:
{
headers
:
{
'
x-user-token
'
:
token
'
x-user-token
'
:
token
...
@@ -74,6 +82,9 @@ class TabulatorAPI {
...
@@ -74,6 +82,9 @@ class TabulatorAPI {
console
.
error
(
error
);
console
.
error
(
error
);
return
false
;
return
false
;
}
}
finally
{
Loading
.
value
=
false
;
}
},
},
Find
:
async
(
token
:
string
,
id
:
number
)
:
Promise
<
TournamentGet
>
=>
{
Find
:
async
(
token
:
string
,
id
:
number
)
:
Promise
<
TournamentGet
>
=>
{
let
response
:
{
let
response
:
{
...
@@ -82,6 +93,7 @@ class TabulatorAPI {
...
@@ -82,6 +93,7 @@ class TabulatorAPI {
}
}
};
};
try
{
try
{
Loading
.
value
=
true
;
response
=
await
this
.
url
.
get
(
`/api/tournament/
${
id
}
`
,
{
response
=
await
this
.
url
.
get
(
`/api/tournament/
${
id
}
`
,
{
headers
:
{
headers
:
{
'
x-user-token
'
:
token
'
x-user-token
'
:
token
...
@@ -95,7 +107,6 @@ class TabulatorAPI {
...
@@ -95,7 +107,6 @@ 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
:
{
...
@@ -122,6 +133,9 @@ class TabulatorAPI {
...
@@ -122,6 +133,9 @@ class TabulatorAPI {
}
}
};
};
}
}
finally
{
Loading
.
value
=
false
;
}
},
},
FindALL
:
async
(
token
:
string
,
obj
:
TournamentFindObject
=
{})
:
Promise
<
AllTournament
>
=>
{
FindALL
:
async
(
token
:
string
,
obj
:
TournamentFindObject
=
{})
:
Promise
<
AllTournament
>
=>
{
const
filter
=
(
i
:
any
)
:
any
=>
{
const
filter
=
(
i
:
any
)
:
any
=>
{
...
@@ -135,6 +149,7 @@ class TabulatorAPI {
...
@@ -135,6 +149,7 @@ class TabulatorAPI {
}
}
};
};
try
{
try
{
Loading
.
value
=
true
;
response
=
await
this
.
url
.
get
(
`/api/tournament`
,
{
response
=
await
this
.
url
.
get
(
`/api/tournament`
,
{
params
:
{
params
:
{
recordsPerPage
:
20
,
recordsPerPage
:
20
,
...
@@ -168,6 +183,9 @@ class TabulatorAPI {
...
@@ -168,6 +183,9 @@ class TabulatorAPI {
tournaments
:
[]
tournaments
:
[]
};
};
}
}
finally
{
Loading
.
value
=
false
;
}
},
},
Update
:
async
(
token
:
string
,
id
:
number
,
Data
:
TournamentCreateObject
)
:
Promise
<
boolean
>
=>
{
Update
:
async
(
token
:
string
,
id
:
number
,
Data
:
TournamentCreateObject
)
:
Promise
<
boolean
>
=>
{
let
response
:
{
let
response
:
{
...
@@ -176,6 +194,7 @@ class TabulatorAPI {
...
@@ -176,6 +194,7 @@ class TabulatorAPI {
}
}
};
};
try
{
try
{
Loading
.
value
=
true
;
response
=
await
this
.
url
.
patch
(
`/api/tournament/
${
id
}
`
,
Data
,
{
response
=
await
this
.
url
.
patch
(
`/api/tournament/
${
id
}
`
,
Data
,
{
headers
:
{
headers
:
{
'
x-user-token
'
:
token
'
x-user-token
'
:
token
...
@@ -187,6 +206,9 @@ class TabulatorAPI {
...
@@ -187,6 +206,9 @@ class TabulatorAPI {
console
.
error
(
error
);
console
.
error
(
error
);
return
false
;
return
false
;
}
}
finally
{
Loading
.
value
=
false
;
}
},
},
Start
:
async
(
token
:
string
,
id
:
number
)
:
Promise
<
boolean
>
=>
{
Start
:
async
(
token
:
string
,
id
:
number
)
:
Promise
<
boolean
>
=>
{
let
response
:
{
let
response
:
{
...
@@ -195,6 +217,7 @@ class TabulatorAPI {
...
@@ -195,6 +217,7 @@ class TabulatorAPI {
}
}
};
};
try
{
try
{
Loading
.
value
=
true
;
response
=
await
this
.
url
.
post
(
`/api/tournament/
${
id
}
/start`
,
{},
{
response
=
await
this
.
url
.
post
(
`/api/tournament/
${
id
}
/start`
,
{},
{
headers
:
{
headers
:
{
'
x-user-token
'
:
token
'
x-user-token
'
:
token
...
@@ -206,6 +229,9 @@ class TabulatorAPI {
...
@@ -206,6 +229,9 @@ class TabulatorAPI {
console
.
error
(
error
);
console
.
error
(
error
);
return
false
;
return
false
;
}
}
finally
{
Loading
.
value
=
false
;
}
},
},
Reset
:
async
(
token
:
string
,
id
:
number
)
:
Promise
<
boolean
>
=>
{
Reset
:
async
(
token
:
string
,
id
:
number
)
:
Promise
<
boolean
>
=>
{
let
response
:
{
let
response
:
{
...
@@ -214,6 +240,7 @@ class TabulatorAPI {
...
@@ -214,6 +240,7 @@ class TabulatorAPI {
}
}
};
};
try
{
try
{
Loading
.
value
=
true
;
response
=
await
this
.
url
.
post
(
`/api/tournament/
${
id
}
/reset`
,
{},
{
response
=
await
this
.
url
.
post
(
`/api/tournament/
${
id
}
/reset`
,
{},
{
headers
:
{
headers
:
{
'
x-user-token
'
:
token
'
x-user-token
'
:
token
...
@@ -225,6 +252,9 @@ class TabulatorAPI {
...
@@ -225,6 +252,9 @@ class TabulatorAPI {
console
.
error
(
error
);
console
.
error
(
error
);
return
false
;
return
false
;
}
}
finally
{
Loading
.
value
=
false
;
}
},
},
Finish
:
async
(
token
:
string
,
id
:
number
)
:
Promise
<
boolean
>
=>
{
Finish
:
async
(
token
:
string
,
id
:
number
)
:
Promise
<
boolean
>
=>
{
let
response
:
{
let
response
:
{
...
@@ -233,6 +263,7 @@ class TabulatorAPI {
...
@@ -233,6 +263,7 @@ class TabulatorAPI {
}
}
};
};
try
{
try
{
Loading
.
value
=
true
;
response
=
await
this
.
url
.
post
(
`/api/tournament/
${
id
}
/finish`
,
{},
{
response
=
await
this
.
url
.
post
(
`/api/tournament/
${
id
}
/finish`
,
{},
{
headers
:
{
headers
:
{
'
x-user-token
'
:
token
'
x-user-token
'
:
token
...
@@ -244,6 +275,9 @@ class TabulatorAPI {
...
@@ -244,6 +275,9 @@ class TabulatorAPI {
console
.
error
(
error
);
console
.
error
(
error
);
return
false
;
return
false
;
}
}
finally
{
Loading
.
value
=
false
;
}
},
},
UpdateYdk
:
async
(
token
:
string
,
id
:
number
,
res
:
UniApp
.
ChooseFileSuccessCallbackResult
)
:
Promise
<
Boolean
>
=>
{
UpdateYdk
:
async
(
token
:
string
,
id
:
number
,
res
:
UniApp
.
ChooseFileSuccessCallbackResult
)
:
Promise
<
Boolean
>
=>
{
let
response
:
{
let
response
:
{
...
@@ -252,6 +286,7 @@ class TabulatorAPI {
...
@@ -252,6 +286,7 @@ class TabulatorAPI {
}
}
};
};
try
{
try
{
Loading
.
value
=
true
;
let
formData
=
new
FormData
();
let
formData
=
new
FormData
();
for
(
let
i
=
0
;
i
<
res
.
tempFilePaths
.
length
;
i
++
)
{
for
(
let
i
=
0
;
i
<
res
.
tempFilePaths
.
length
;
i
++
)
{
let
f
=
await
fetch
(
res
.
tempFilePaths
[
i
]);
let
f
=
await
fetch
(
res
.
tempFilePaths
[
i
]);
...
@@ -269,6 +304,9 @@ class TabulatorAPI {
...
@@ -269,6 +304,9 @@ class TabulatorAPI {
console
.
error
(
error
);
console
.
error
(
error
);
return
false
;
return
false
;
}
}
finally
{
Loading
.
value
=
false
;
}
},
},
Empty
:
async
(
token
:
string
,
id
:
number
)
:
Promise
<
Boolean
>
=>
{
Empty
:
async
(
token
:
string
,
id
:
number
)
:
Promise
<
Boolean
>
=>
{
let
response
:
{
let
response
:
{
...
@@ -277,6 +315,7 @@ class TabulatorAPI {
...
@@ -277,6 +315,7 @@ class TabulatorAPI {
}
}
};
};
try
{
try
{
Loading
.
value
=
true
;
response
=
await
this
.
url
.
post
(
`/api/tournament/
${
id
}
/clear-participants`
,
{
response
=
await
this
.
url
.
post
(
`/api/tournament/
${
id
}
/clear-participants`
,
{
headers
:
{
headers
:
{
'
x-user-token
'
:
token
'
x-user-token
'
:
token
...
@@ -288,6 +327,9 @@ class TabulatorAPI {
...
@@ -288,6 +327,9 @@ class TabulatorAPI {
console
.
error
(
error
);
console
.
error
(
error
);
return
false
;
return
false
;
}
}
finally
{
Loading
.
value
=
false
;
}
},
},
Shuffle
:
async
(
token
:
string
,
id
:
number
)
:
Promise
<
Boolean
>
=>
{
Shuffle
:
async
(
token
:
string
,
id
:
number
)
:
Promise
<
Boolean
>
=>
{
let
response
:
{
let
response
:
{
...
@@ -296,6 +338,7 @@ class TabulatorAPI {
...
@@ -296,6 +338,7 @@ class TabulatorAPI {
}
}
};
};
try
{
try
{
Loading
.
value
=
true
;
response
=
await
this
.
url
.
post
(
`/api/tournament/
${
id
}
/shuffle-participants`
,
{},
{
response
=
await
this
.
url
.
post
(
`/api/tournament/
${
id
}
/shuffle-participants`
,
{},
{
headers
:
{
headers
:
{
'
x-user-token
'
:
token
'
x-user-token
'
:
token
...
@@ -307,6 +350,9 @@ class TabulatorAPI {
...
@@ -307,6 +350,9 @@ class TabulatorAPI {
console
.
error
(
error
);
console
.
error
(
error
);
return
false
;
return
false
;
}
}
finally
{
Loading
.
value
=
false
;
}
},
},
Drag
:
async
(
token
:
string
,
id
:
number
,
from
:
number
,
to
:
number
)
:
Promise
<
Boolean
>
=>
{
Drag
:
async
(
token
:
string
,
id
:
number
,
from
:
number
,
to
:
number
)
:
Promise
<
Boolean
>
=>
{
let
response
:
{
let
response
:
{
...
@@ -315,6 +361,7 @@ class TabulatorAPI {
...
@@ -315,6 +361,7 @@ class TabulatorAPI {
}
}
};
};
try
{
try
{
Loading
.
value
=
true
;
response
=
await
this
.
url
.
post
(
`/api/tournament/
${
id
}
/drag-participant`
,
{
response
=
await
this
.
url
.
post
(
`/api/tournament/
${
id
}
/drag-participant`
,
{
draggingParticipantId
:
from
,
draggingParticipantId
:
from
,
placeAfterParticipantId
:
to
placeAfterParticipantId
:
to
...
@@ -329,6 +376,9 @@ class TabulatorAPI {
...
@@ -329,6 +376,9 @@ class TabulatorAPI {
console
.
error
(
error
);
console
.
error
(
error
);
return
false
;
return
false
;
}
}
finally
{
Loading
.
value
=
false
;
}
},
},
Import
:
async
(
token
:
string
,
id
:
number
,
fromId
:
number
,
count
:
number
)
:
Promise
<
boolean
>
=>
{
Import
:
async
(
token
:
string
,
id
:
number
,
fromId
:
number
,
count
:
number
)
:
Promise
<
boolean
>
=>
{
let
response
:
{
let
response
:
{
...
@@ -337,6 +387,7 @@ class TabulatorAPI {
...
@@ -337,6 +387,7 @@ class TabulatorAPI {
}
}
};
};
try
{
try
{
Loading
.
value
=
true
;
response
=
await
this
.
url
.
post
(
`/api/tournament/
${
id
}
/import-participants-from`
,
{
response
=
await
this
.
url
.
post
(
`/api/tournament/
${
id
}
/import-participants-from`
,
{
tournamentId
:
fromId
,
tournamentId
:
fromId
,
swissMaxPlayers
:
count
swissMaxPlayers
:
count
...
@@ -351,6 +402,9 @@ class TabulatorAPI {
...
@@ -351,6 +402,9 @@ class TabulatorAPI {
console
.
error
(
error
);
console
.
error
(
error
);
return
false
;
return
false
;
}
}
finally
{
Loading
.
value
=
false
;
}
}
}
}
}
Participant
=
{
Participant
=
{
...
@@ -361,6 +415,7 @@ class TabulatorAPI {
...
@@ -361,6 +415,7 @@ class TabulatorAPI {
}
}
};
};
try
{
try
{
Loading
.
value
=
true
;
if
(
Data
.
name
.
length
==
0
)
if
(
Data
.
name
.
length
==
0
)
throw
new
Error
(
'
请填写名称
'
);
throw
new
Error
(
'
请填写名称
'
);
if
(
Array
.
findIndex
(
i
=>
Data
.
name
==
i
.
name
)
>
-
1
)
if
(
Array
.
findIndex
(
i
=>
Data
.
name
==
i
.
name
)
>
-
1
)
...
@@ -376,6 +431,9 @@ class TabulatorAPI {
...
@@ -376,6 +431,9 @@ class TabulatorAPI {
console
.
error
(
error
);
console
.
error
(
error
);
return
false
;
return
false
;
}
}
finally
{
Loading
.
value
=
false
;
}
},
},
CreateGroup
:
async
(
token
:
string
,
Data
:
Array
<
ParticipantCreateObject
>
)
:
Promise
<
boolean
>
=>
{
CreateGroup
:
async
(
token
:
string
,
Data
:
Array
<
ParticipantCreateObject
>
)
:
Promise
<
boolean
>
=>
{
let
response
:
{
let
response
:
{
...
@@ -384,6 +442,7 @@ class TabulatorAPI {
...
@@ -384,6 +442,7 @@ class TabulatorAPI {
}
}
};
};
try
{
try
{
Loading
.
value
=
true
;
response
=
await
this
.
url
.
post
(
`/api/participant/import`
,
{
response
=
await
this
.
url
.
post
(
`/api/participant/import`
,
{
data
:
Data
data
:
Data
},
{
},
{
...
@@ -397,6 +456,9 @@ class TabulatorAPI {
...
@@ -397,6 +456,9 @@ class TabulatorAPI {
console
.
error
(
error
);
console
.
error
(
error
);
return
false
;
return
false
;
}
}
finally
{
Loading
.
value
=
false
;
}
},
},
Find
:
async
(
token
:
string
,
id
:
number
)
:
Promise
<
Participant
|
undefined
>
=>
{
Find
:
async
(
token
:
string
,
id
:
number
)
:
Promise
<
Participant
|
undefined
>
=>
{
let
response
:
{
let
response
:
{
...
@@ -405,6 +467,7 @@ class TabulatorAPI {
...
@@ -405,6 +467,7 @@ class TabulatorAPI {
}
}
};
};
try
{
try
{
Loading
.
value
=
true
;
response
=
await
this
.
url
.
get
(
`/api/participant/
${
id
}
`
,
{
response
=
await
this
.
url
.
get
(
`/api/participant/
${
id
}
`
,
{
headers
:
{
headers
:
{
'
x-user-token
'
:
token
'
x-user-token
'
:
token
...
@@ -416,6 +479,9 @@ class TabulatorAPI {
...
@@ -416,6 +479,9 @@ class TabulatorAPI {
console
.
error
(
error
);
console
.
error
(
error
);
return
undefined
;
return
undefined
;
}
}
finally
{
Loading
.
value
=
false
;
}
},
},
FindALL
:
async
(
token
:
string
,
obj
:
ParticipantFindObject
=
{})
:
Promise
<
AllParticipant
>
=>
{
FindALL
:
async
(
token
:
string
,
obj
:
ParticipantFindObject
=
{})
:
Promise
<
AllParticipant
>
=>
{
let
response
:
{
let
response
:
{
...
@@ -425,6 +491,7 @@ class TabulatorAPI {
...
@@ -425,6 +491,7 @@ class TabulatorAPI {
}
}
};
};
try
{
try
{
Loading
.
value
=
true
;
response
=
await
this
.
url
.
get
(
`/api/participant`
,
{
response
=
await
this
.
url
.
get
(
`/api/participant`
,
{
params
:
{
params
:
{
recordsPerPage
:
20
,
recordsPerPage
:
20
,
...
@@ -454,6 +521,9 @@ class TabulatorAPI {
...
@@ -454,6 +521,9 @@ class TabulatorAPI {
participants
:
[]
participants
:
[]
};
};
}
}
finally
{
Loading
.
value
=
false
;
}
},
},
Update
:
async
(
token
:
string
,
id
:
number
,
Data
:
ParticipantUpdateObject
)
:
Promise
<
boolean
>
=>
{
Update
:
async
(
token
:
string
,
id
:
number
,
Data
:
ParticipantUpdateObject
)
:
Promise
<
boolean
>
=>
{
let
response
:
{
let
response
:
{
...
@@ -462,6 +532,7 @@ class TabulatorAPI {
...
@@ -462,6 +532,7 @@ class TabulatorAPI {
}
}
};
};
try
{
try
{
Loading
.
value
=
true
;
response
=
await
this
.
url
.
patch
(
`/api/participant/
${
id
}
`
,
Data
,
{
response
=
await
this
.
url
.
patch
(
`/api/participant/
${
id
}
`
,
Data
,
{
headers
:
{
headers
:
{
'
x-user-token
'
:
token
'
x-user-token
'
:
token
...
@@ -473,6 +544,9 @@ class TabulatorAPI {
...
@@ -473,6 +544,9 @@ class TabulatorAPI {
console
.
error
(
error
);
console
.
error
(
error
);
return
false
;
return
false
;
}
}
finally
{
Loading
.
value
=
false
;
}
},
},
Delete
:
async
(
token
:
string
,
id
:
number
)
:
Promise
<
Boolean
>
=>
{
Delete
:
async
(
token
:
string
,
id
:
number
)
:
Promise
<
Boolean
>
=>
{
let
response
:
{
let
response
:
{
...
@@ -481,6 +555,7 @@ class TabulatorAPI {
...
@@ -481,6 +555,7 @@ class TabulatorAPI {
}
}
};
};
try
{
try
{
Loading
.
value
=
true
;
response
=
await
this
.
url
.
delete
(
`/api/participant/
${
id
}
`
,
{
response
=
await
this
.
url
.
delete
(
`/api/participant/
${
id
}
`
,
{
headers
:
{
headers
:
{
'
x-user-token
'
:
token
'
x-user-token
'
:
token
...
@@ -492,6 +567,9 @@ class TabulatorAPI {
...
@@ -492,6 +567,9 @@ class TabulatorAPI {
console
.
error
(
error
);
console
.
error
(
error
);
return
false
;
return
false
;
}
}
finally
{
Loading
.
value
=
false
;
}
}
}
}
}
Match
=
{
Match
=
{
...
@@ -502,6 +580,7 @@ class TabulatorAPI {
...
@@ -502,6 +580,7 @@ class TabulatorAPI {
}
}
};
};
try
{
try
{
Loading
.
value
=
true
;
response
=
await
this
.
url
.
get
(
`/api/match/
${
id
}
`
,
{
response
=
await
this
.
url
.
get
(
`/api/match/
${
id
}
`
,
{
headers
:
{
headers
:
{
'
x-user-token
'
:
token
'
x-user-token
'
:
token
...
@@ -513,6 +592,9 @@ class TabulatorAPI {
...
@@ -513,6 +592,9 @@ class TabulatorAPI {
console
.
error
(
error
);
console
.
error
(
error
);
return
undefined
;
return
undefined
;
}
}
finally
{
Loading
.
value
=
false
;
}
},
},
FindALL
:
async
(
token
:
string
,
obj
:
MatchFindObject
=
{})
:
Promise
<
AllMatch
>
=>
{
FindALL
:
async
(
token
:
string
,
obj
:
MatchFindObject
=
{})
:
Promise
<
AllMatch
>
=>
{
let
response
:
{
let
response
:
{
...
@@ -522,6 +604,7 @@ class TabulatorAPI {
...
@@ -522,6 +604,7 @@ class TabulatorAPI {
}
}
};
};
try
{
try
{
Loading
.
value
=
true
;
response
=
await
this
.
url
.
get
(
`/api/match`
,
{
response
=
await
this
.
url
.
get
(
`/api/match`
,
{
params
:
{
params
:
{
recordsPerPage
:
20
,
recordsPerPage
:
20
,
...
@@ -559,6 +642,9 @@ class TabulatorAPI {
...
@@ -559,6 +642,9 @@ class TabulatorAPI {
matches
:
[]
matches
:
[]
};
};
}
}
finally
{
Loading
.
value
=
false
;
}
},
},
Update
:
async
(
token
:
string
,
id
:
number
,
Data
:
MatchUpdateObject
)
:
Promise
<
boolean
>
=>
{
Update
:
async
(
token
:
string
,
id
:
number
,
Data
:
MatchUpdateObject
)
:
Promise
<
boolean
>
=>
{
let
response
:
{
let
response
:
{
...
@@ -567,6 +653,7 @@ class TabulatorAPI {
...
@@ -567,6 +653,7 @@ class TabulatorAPI {
}
}
};
};
try
{
try
{
Loading
.
value
=
true
;
response
=
await
this
.
url
.
patch
(
`/api/match/
${
id
}
`
,
Data
,
{
response
=
await
this
.
url
.
patch
(
`/api/match/
${
id
}
`
,
Data
,
{
headers
:
{
headers
:
{
'
x-user-token
'
:
token
'
x-user-token
'
:
token
...
@@ -578,6 +665,9 @@ class TabulatorAPI {
...
@@ -578,6 +665,9 @@ class TabulatorAPI {
console
.
error
(
error
);
console
.
error
(
error
);
return
false
;
return
false
;
}
}
finally
{
Loading
.
value
=
false
;
}
}
}
}
}
ApiKey
=
{
ApiKey
=
{
...
@@ -588,6 +678,7 @@ class TabulatorAPI {
...
@@ -588,6 +678,7 @@ class TabulatorAPI {
}
}
};
};
try
{
try
{
Loading
.
value
=
true
;
response
=
await
this
.
url
.
post
(
`/api/api-key`
,
{
response
=
await
this
.
url
.
post
(
`/api/api-key`
,
{
name
:
Data
.
name
,
name
:
Data
.
name
,
description
:
Data
.
description
?.
length
??
0
>
0
?
Data
.
description
:
undefined
,
description
:
Data
.
description
?.
length
??
0
>
0
?
Data
.
description
:
undefined
,
...
@@ -604,6 +695,9 @@ class TabulatorAPI {
...
@@ -604,6 +695,9 @@ class TabulatorAPI {
console
.
error
(
error
);
console
.
error
(
error
);
return
false
;
return
false
;
}
}
finally
{
Loading
.
value
=
false
;
}
},
},
Find
:
async
(
token
:
string
,
id
:
number
)
:
Promise
<
ApiKey
|
undefined
>
=>
{
Find
:
async
(
token
:
string
,
id
:
number
)
:
Promise
<
ApiKey
|
undefined
>
=>
{
let
response
:
{
let
response
:
{
...
@@ -612,6 +706,7 @@ class TabulatorAPI {
...
@@ -612,6 +706,7 @@ class TabulatorAPI {
}
}
};
};
try
{
try
{
Loading
.
value
=
true
;
response
=
await
this
.
url
.
get
(
`/api/api-key/
${
id
}
`
,
{
response
=
await
this
.
url
.
get
(
`/api/api-key/
${
id
}
`
,
{
headers
:
{
headers
:
{
'
x-user-token
'
:
token
'
x-user-token
'
:
token
...
@@ -623,6 +718,9 @@ class TabulatorAPI {
...
@@ -623,6 +718,9 @@ class TabulatorAPI {
console
.
error
(
error
);
console
.
error
(
error
);
return
undefined
;
return
undefined
;
}
}
finally
{
Loading
.
value
=
false
;
}
},
},
FindALL
:
async
(
token
:
string
,
obj
:
ApiKeyFindObject
=
{})
:
Promise
<
AllAPI
>
=>
{
FindALL
:
async
(
token
:
string
,
obj
:
ApiKeyFindObject
=
{})
:
Promise
<
AllAPI
>
=>
{
let
response
:
{
let
response
:
{
...
@@ -632,6 +730,7 @@ class TabulatorAPI {
...
@@ -632,6 +730,7 @@ class TabulatorAPI {
}
}
};
};
try
{
try
{
Loading
.
value
=
true
;
if
(
!
obj
.
userId
||
obj
.
userId
<
0
)
if
(
!
obj
.
userId
||
obj
.
userId
<
0
)
throw
new
Error
(
'
未登录
'
);
throw
new
Error
(
'
未登录
'
);
response
=
await
this
.
url
.
get
(
`/api/api-key`
,
{
response
=
await
this
.
url
.
get
(
`/api/api-key`
,
{
...
@@ -662,6 +761,9 @@ class TabulatorAPI {
...
@@ -662,6 +761,9 @@ class TabulatorAPI {
api
:
[]
api
:
[]
};
};
}
}
finally
{
Loading
.
value
=
false
;
}
},
},
Update
:
async
(
token
:
string
,
id
:
number
,
Data
:
ApiKeyCreateObject
)
:
Promise
<
boolean
>
=>
{
Update
:
async
(
token
:
string
,
id
:
number
,
Data
:
ApiKeyCreateObject
)
:
Promise
<
boolean
>
=>
{
let
response
:
{
let
response
:
{
...
@@ -670,6 +772,7 @@ class TabulatorAPI {
...
@@ -670,6 +772,7 @@ class TabulatorAPI {
}
}
};
};
try
{
try
{
Loading
.
value
=
true
;
response
=
await
this
.
url
.
patch
(
`/api/api-key/
${
id
}
`
,
{
response
=
await
this
.
url
.
patch
(
`/api/api-key/
${
id
}
`
,
{
name
:
Data
.
name
,
name
:
Data
.
name
,
description
:
Data
.
description
?.
length
??
0
>
0
?
Data
.
description
:
''
,
description
:
Data
.
description
?.
length
??
0
>
0
?
Data
.
description
:
''
,
...
@@ -685,6 +788,9 @@ class TabulatorAPI {
...
@@ -685,6 +788,9 @@ class TabulatorAPI {
console
.
error
(
error
);
console
.
error
(
error
);
return
false
;
return
false
;
}
}
finally
{
Loading
.
value
=
false
;
}
},
},
Delete
:
async
(
token
:
string
,
id
:
number
)
:
Promise
<
Boolean
>
=>
{
Delete
:
async
(
token
:
string
,
id
:
number
)
:
Promise
<
Boolean
>
=>
{
let
response
:
{
let
response
:
{
...
@@ -693,6 +799,7 @@ class TabulatorAPI {
...
@@ -693,6 +799,7 @@ class TabulatorAPI {
}
}
};
};
try
{
try
{
Loading
.
value
=
true
;
response
=
await
this
.
url
.
delete
(
`/api/api-key/
${
id
}
`
,
{
response
=
await
this
.
url
.
delete
(
`/api/api-key/
${
id
}
`
,
{
headers
:
{
headers
:
{
'
x-user-token
'
:
token
'
x-user-token
'
:
token
...
@@ -704,6 +811,9 @@ class TabulatorAPI {
...
@@ -704,6 +811,9 @@ class TabulatorAPI {
console
.
error
(
error
);
console
.
error
(
error
);
return
false
;
return
false
;
}
}
finally
{
Loading
.
value
=
false
;
}
}
}
}
}
}
}
...
@@ -756,5 +866,6 @@ const Tabulator = new TabulatorAPI(import.meta.env.VITE_TABULATOR_API);
...
@@ -756,5 +866,6 @@ const Tabulator = new TabulatorAPI(import.meta.env.VITE_TABULATOR_API);
export
{
export
{
Tabulator
,
Tabulator
,
User
User
,
Loading
};
};
src/style/page.scss
View file @
8e4ea77a
...
@@ -11,6 +11,22 @@
...
@@ -11,6 +11,22 @@
}
}
}
}
}
}
#progress
{
@keyframes
spin
{
from
{
transform
:
rotate
(
0deg
);
}
to
{
transform
:
rotate
(
360deg
);
}
}
position
:
fixed
;
top
:
20%
;
width
:
100%
;
margin
:
0
auto
;
z-index
:
4
;
animation
:
spin
2s
linear
infinite
;
}
#really
{
#really
{
box-shadow
:
2px
2px
10px
rgba
(
0
,
0
,
0
,
0
.2
);
box-shadow
:
2px
2px
10px
rgba
(
0
,
0
,
0
,
0
.2
);
// background-color: white;
// background-color: white;
...
...
src/style/tournament.scss
View file @
8e4ea77a
.PageTournament
{
.PageTournament
{
#PageTournament
{
#PageTournament
{
#round
{
#round
{
// display: flex;
// column-gap: 10%;
div
{
div
{
display
:
flex
;
display
:
flex
;
column-gap
:
10%
;
column-gap
:
10%
;
...
...
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