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
a52713da
Commit
a52713da
authored
Jun 18, 2025
by
xiaoye
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加轮数设置
parent
a75de90a
Pipeline
#37771
passed with stages
in 3 minutes and 6 seconds
Changes
6
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
21 additions
and
4 deletions
+21
-4
src/pages/drawer/creator.vue
src/pages/drawer/creator.vue
+2
-1
src/pages/drawer/setting.vue
src/pages/drawer/setting.vue
+1
-1
src/pages/tabulator.vue
src/pages/tabulator.vue
+7
-0
src/pages/tournament.vue
src/pages/tournament.vue
+7
-2
src/script/const.ts
src/script/const.ts
+1
-0
src/script/tournament.ts
src/script/tournament.ts
+3
-0
No files found.
src/pages/drawer/creator.vue
View file @
a52713da
...
@@ -13,6 +13,7 @@
...
@@ -13,6 +13,7 @@
:localdata =
'create.rule.range'
:localdata =
'create.rule.range'
></uni-data-select>
></uni-data-select>
<view
v-show =
"create.rule.select == 'Swiss'"
>
<view
v-show =
"create.rule.select == 'Swiss'"
>
<uni-easyinput
type =
'number'
placeholder =
'轮数(不填则自动计算)'
v-model =
'create.rule.settings.rounds'
/>
<uni-easyinput
type =
'number'
placeholder =
'胜利分'
v-model =
'create.rule.settings.winScore'
/>
<uni-easyinput
type =
'number'
placeholder =
'胜利分'
v-model =
'create.rule.settings.winScore'
/>
<uni-easyinput
type =
'number'
placeholder =
'平局分'
v-model =
'create.rule.settings.drawScore'
/>
<uni-easyinput
type =
'number'
placeholder =
'平局分'
v-model =
'create.rule.settings.drawScore'
/>
<uni-easyinput
type =
'number'
placeholder =
'轮空分'
v-model =
'create.rule.settings.byeScore'
/>
<uni-easyinput
type =
'number'
placeholder =
'轮空分'
v-model =
'create.rule.settings.byeScore'
/>
...
@@ -79,7 +80,7 @@
...
@@ -79,7 +80,7 @@
</template>
</template>
<
script
setup
lang =
'ts'
>
<
script
setup
lang =
'ts'
>
import
{
ref
,
reactive
,
onMounted
,
onUnmounted
,
onBeforeMount
,
watch
}
from
'
vue
'
;
import
{
ref
,
reactive
,
onMounted
,
onUnmounted
,
onBeforeMount
,
watch
}
from
'
vue
'
;
import
{
TournamentFindObject
,
ruleSettings
,
UserObject
}
from
'
../../script/type.ts
'
;
import
{
ruleSettings
,
UserObject
}
from
'
../../script/type.ts
'
;
import
{
Tabulator
,
User
}
from
'
../../script/post.ts
'
;
import
{
Tabulator
,
User
}
from
'
../../script/post.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/pages/drawer/setting.vue
View file @
a52713da
...
@@ -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/tabulator.vue
View file @
a52713da
...
@@ -333,6 +333,9 @@
...
@@ -333,6 +333,9 @@
}
}
tournament
.
collaborators
=
collaborators
;
tournament
.
collaborators
=
collaborators
;
},
},
updateRounds
:
(
round
:
number
)
:
void
=>
{
tournament
.
rule
.
settings
.
rounds
=
round
;
},
clear
:
()
:
void
=>
{
clear
:
()
:
void
=>
{
tournament
.
this
=
undefined
;
tournament
.
this
=
undefined
;
tournament
.
name
=
''
;
tournament
.
name
=
''
;
...
@@ -440,6 +443,8 @@
...
@@ -440,6 +443,8 @@
emitter
.
on
(
Const
.
tournamentInfo
,
page
.
show
.
drawer
);
emitter
.
on
(
Const
.
tournamentInfo
,
page
.
show
.
drawer
);
// @ts-ignore
// @ts-ignore
emitter
.
on
(
Const
.
tournamentReload
,
tournament
.
init
);
emitter
.
on
(
Const
.
tournamentReload
,
tournament
.
init
);
// @ts-ignore
emitter
.
on
(
Const
.
updateRounds
,
tournament
.
updateRounds
);
emitter
.
on
(
Const
.
createOff
,
creator
.
off
);
emitter
.
on
(
Const
.
createOff
,
creator
.
off
);
window
.
addEventListener
(
'
hashchange
'
,
loading
);
window
.
addEventListener
(
'
hashchange
'
,
loading
);
});
});
...
@@ -454,6 +459,8 @@
...
@@ -454,6 +459,8 @@
emitter
.
off
(
Const
.
tournamentInfo
,
page
.
show
.
drawer
);
emitter
.
off
(
Const
.
tournamentInfo
,
page
.
show
.
drawer
);
// @ts-ignore
// @ts-ignore
emitter
.
off
(
Const
.
tournamentReload
,
tournament
.
init
);
emitter
.
off
(
Const
.
tournamentReload
,
tournament
.
init
);
// @ts-ignore
emitter
.
off
(
Const
.
updateRounds
,
tournament
.
updateRounds
);
emitter
.
off
(
Const
.
createOff
,
creator
.
off
);
emitter
.
off
(
Const
.
createOff
,
creator
.
off
);
window
.
removeEventListener
(
'
hashchange
'
,
loading
);
window
.
removeEventListener
(
'
hashchange
'
,
loading
);
});
});
...
...
src/pages/tournament.vue
View file @
a52713da
...
@@ -344,13 +344,13 @@
...
@@ -344,13 +344,13 @@
const
t
:
TournamentGet
=
await
Tabulator
.
Tournament
.
Find
(
Mycard
.
token
,
id
);
const
t
:
TournamentGet
=
await
Tabulator
.
Tournament
.
Find
(
Mycard
.
token
,
id
);
if
(
t
.
tournament
)
{
if
(
t
.
tournament
)
{
tournament
.
this
=
t
.
tournament
;
tournament
.
this
=
t
.
tournament
;
emitter
.
emit
(
Const
.
tournamentReload
,
tournament
.
this
)
const
participants
=
t
.
participant
;
const
participants
=
t
.
participant
;
participant
.
array
=
participants
.
participants
;
participant
.
array
=
participants
.
participants
;
participant
.
total
=
participants
.
total
;
participant
.
total
=
participants
.
total
;
const
matches
=
t
.
match
;
const
matches
=
t
.
match
;
match
.
array
=
matches
.
matches
;
match
.
array
=
matches
.
matches
;
match
.
total
=
matches
.
total
;
match
.
total
=
matches
.
total
;
emitter
.
emit
(
Const
.
tournamentReload
,
tournament
.
this
);
return
true
;
return
true
;
}
}
return
false
;
return
false
;
...
@@ -698,8 +698,14 @@
...
@@ -698,8 +698,14 @@
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
]);
if
(
match
.
array
.
length
>
0
)
if
(
match
.
array
.
length
>
0
)
match
.
maxRound
=
match
.
array
.
reduce
((
a
,
b
)
=>
(
a
.
round
>
b
.
round
)
?
a
:
b
)?.
round
??
0
;
match
.
maxRound
=
match
.
array
.
reduce
((
a
,
b
)
=>
(
a
.
round
>
b
.
round
)
?
a
:
b
)?.
round
??
0
;
else
match
.
maxRound
=
0
;
}
,
{
deep
:
true
}
);
}
,
{
deep
:
true
}
);
watch
(()
=>
{
return
match
.
maxRound
;
}
,
async
()
:
Promise
<
void
>
=>
{
if
(
!
Number
.
isNaN
(
tournament
.
this
?.
ruleSettings
.
rounds
??
0
))
emitter
.
emit
(
Const
.
updateRounds
,
match
.
maxRound
);
}
);
watch
(()
=>
{
return
tournament
.
this
?.
creator
;
}
,
async
(
n
=
-
1
)
=>
{
watch
(()
=>
{
return
tournament
.
this
?.
creator
;
}
,
async
(
n
=
-
1
)
=>
{
if
(
n
>=
0
)
{
if
(
n
>=
0
)
{
const
response
=
await
User
.
Find
.
Id
(
n
);
const
response
=
await
User
.
Find
.
Id
(
n
);
...
@@ -708,7 +714,6 @@
...
@@ -708,7 +714,6 @@
creator
.
avatar
=
response
.
avatar
;
creator
.
avatar
=
response
.
avatar
;
}
}
}
}
}
,
{
immediate
:
true
}
);
}
,
{
immediate
:
true
}
);
<
/script
>
<
/script
>
...
...
src/script/const.ts
View file @
a52713da
...
@@ -10,6 +10,7 @@ class ConstData {
...
@@ -10,6 +10,7 @@ class ConstData {
changeUrl
=
'
changeUrl
'
;
changeUrl
=
'
changeUrl
'
;
show
=
'
show
'
;
show
=
'
show
'
;
showTournament
=
'
showTournament
'
;
showTournament
=
'
showTournament
'
;
updateRounds
=
'
updateRounds
'
;
pic
=
{
pic
=
{
hajimi
:
`
hajimi
:
`
<pre> :==+++=-.
<pre> :==+++=-.
...
...
src/script/tournament.ts
View file @
a52713da
...
@@ -32,6 +32,9 @@ class Tournament {
...
@@ -32,6 +32,9 @@ class Tournament {
this
.
creator
=
obj
.
creator
;
this
.
creator
=
obj
.
creator
;
this
.
createdAt
=
new
Date
(
obj
.
createdAt
);
this
.
createdAt
=
new
Date
(
obj
.
createdAt
);
this
.
count
=
obj
.
participants
.
length
;
this
.
count
=
obj
.
participants
.
length
;
if
(
!
Number
.
isNaN
(
this
.
ruleSettings
.
winScore
))
this
.
ruleSettings
.
winScore
=
3
;
if
(
!
Number
.
isNaN
(
this
.
ruleSettings
.
drawScore
))
this
.
ruleSettings
.
drawScore
=
1
;
if
(
!
Number
.
isNaN
(
this
.
ruleSettings
.
byeScore
))
this
.
ruleSettings
.
byeScore
=
0
;
}
}
}
}
...
...
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