Commit 22783492 authored by xiaoye's avatar xiaoye

fix

parent b032a553
Pipeline #39246 passed with stages
in 1 minute and 50 seconds
...@@ -92,7 +92,7 @@ ...@@ -92,7 +92,7 @@
</uni-list-item> </uni-list-item>
<uni-list-item <uni-list-item
v-for = '(i, v) in participant.array.filter(i => searcher.filterParticipant(i)).slice((participant.page - 1) * 20, participant.page * 20)' v-for = '(i, v) in participant.array.filter(i => searcher.filterParticipant(i)).slice((participant.page - 1) * 20, participant.page * 20)'
:title = "i.score && match.array.findIndex(m => (m.status == 'Finished' || m.status == 'Abandoned') && (m.player1.id == i.id || m.player2.id == i.id)) > -1 ? `胜平负:${i.score.win + i.score.bye}-${i.score.draw}-${i.score.lose}` : ''" :title = "i.score && match.array.findIndex(m => (m.status == 'Finished' || m.status == 'Abandoned') && (m.player1.id == i.id || m.player2.id == i.id)) > -1 ? `胜平负:${i.score.win + (i.quit ? 0 : i.score.bye)}-${i.score.draw}-${i.score.lose}` : ''"
:note = "i.score && match.array.findIndex(m => (m.status == 'Finished' || m.status == 'Abandoned') && (m.player1.id == i.id || m.player2.id == i.id)) > -1 ? `分数:${i.score.score}\n小分:${i.score.tieBreaker}` : ''" :note = "i.score && match.array.findIndex(m => (m.status == 'Finished' || m.status == 'Abandoned') && (m.player1.id == i.id || m.player2.id == i.id)) > -1 ? `分数:${i.score.score}\n小分:${i.score.tieBreaker}` : ''"
:clickable = true :clickable = true
> >
...@@ -555,6 +555,7 @@ ...@@ -555,6 +555,7 @@
array : [] as Array<Participant>, array : [] as Array<Participant>,
total : 0, total : 0,
page : 1, page : 1,
copyValue : 0,
add : async() : Promise<void> => { add : async() : Promise<void> => {
// @ts-ignore // @ts-ignore
if (await Tabulator.Participant.Create(Mycard.token, { name : participant.name, tournamentId : tournament.this.id}, participant.array)) { if (await Tabulator.Participant.Create(Mycard.token, { name : participant.name, tournamentId : tournament.this.id}, participant.array)) {
...@@ -665,8 +666,7 @@ ...@@ -665,8 +666,7 @@
string += `[${map.get(i) ?? `${i + 1}名`}][${p.name}]${p.qq ? `[${p.qq}]` : ''}\n` string += `[${map.get(i) ?? `${i + 1}名`}][${p.name}]${p.qq ? `[${p.qq}]` : ''}\n`
} }
UniApp.copy(string); UniApp.copy(string);
}, }
copyValue : 0
}); });
let page = reactive({ let page = reactive({
......
...@@ -36,7 +36,7 @@ class Match { ...@@ -36,7 +36,7 @@ class Match {
this.player2 = { this.player2 = {
id : obj.player2Id, id : obj.player2Id,
name : (name2.length == 2 && !Number.isNaN(name2[0]) && name2[0].length > 3) ? name2[1] : obj.player2?.name ?? '', name : (name2.length == 2 && !Number.isNaN(name2[0]) && name2[0].length > 3) ? name2[1] : obj.player2?.name ?? '',
qq : (name2.length == 2 && !Number.isNaN(name2[0]) && name2[0].length > 3) ? name1[0] : undefined, qq : (name2.length == 2 && !Number.isNaN(name2[0]) && name2[0].length > 3) ? name2[0] : undefined,
score : obj.player2Score score : obj.player2Score
}; };
this.winnerId = obj.winnerId as number | null; this.winnerId = obj.winnerId as number | null;
......
...@@ -291,7 +291,7 @@ class TabulatorAPI { ...@@ -291,7 +291,7 @@ class TabulatorAPI {
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]);
let blob = await f.blob(); let blob = await f.blob();
formData.append('files', blob, res.tempFiles[i].name.replace('.ydk', '')); formData.append('files', blob, res.tempFiles[i].name.replace(/\.[^/.]+$/, ""));
} }
response = await this.url.post(`/api/tournament/${id}/upload-ydk`,formData, { response = await this.url.post(`/api/tournament/${id}/upload-ydk`,formData, {
headers : { headers : {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment