diff --git a/frontend/src/components/VoteModal.vue b/frontend/src/components/VoteModal.vue
index ea55787..748e495 100644
--- a/frontend/src/components/VoteModal.vue
+++ b/frontend/src/components/VoteModal.vue
@@ -38,7 +38,7 @@ function SendVote() {
watch(show, async (value) => {
if (value != true) return
loader.value = true
- ; (difficulty.value = ''), (qualityValue.value = 0), (comment.value = ''), reloadKey.value++
+ ;(difficulty.value = ''), (qualityValue.value = 0), (comment.value = ''), reloadKey.value++
axios('/backend/get_vote/', {
method: 'POST',
@@ -68,18 +68,35 @@ function cancleQuality() {
')
- ; (function (data) {
- row.append($('').text(data['pid']))
- row.append($(' | ').text(data['contest']))
- row.append(
- name2Str(data['pid'], data['name'], function () {
- detailsModal.value = true
- details.value = data
- }).click(function (e) {
- if ($(e.target).prop('tagName') == 'TD' && !window.autoStatus) changeStatus(data['pid'])
+ ;(function (data) {
+ row.append($(' | ').text(data['pid']))
+ row.append($(' | ').text(data['contest']))
+ row.append(
+ name2Str(data['pid'], data['name'], function () {
+ detailsModal.value = true
+ details.value = data
+ }).click(function (e) {
+ if ($(e.target).prop('tagName') == 'TD' && !window.autoStatus) changeStatus(data['pid'])
+ }),
+ )
+ row.append(difficulty2Str(data['difficulty'], data['cnt1']))
+ row.append(quality2Str(data['quality'], data['cnt2']))
+ row.append(
+ $(' | ')
+ .html('投票')
+ .click(function () {
+ pid.value = data['pid']
+ if (!loggedIn) {
+ router.push('/login')
+ }
+ voteModal.value = true
}),
- )
- row.append(difficulty2Str(data['difficulty'], data['cnt1']))
- row.append(quality2Str(data['quality'], data['cnt2']))
- row.append(
- $(' | ')
- .html('投票')
- .click(function () {
- pid.value = data['pid']
- if (!loggedIn) {
- router.push('/login')
- }
- voteModal.value = true
- }),
- )
- row.append(
- $(' | ')
- .html('显示投票')
- .click(function () {
- pid.value = data['pid']
- window.pid = data['pid']
- showVotesModal.value = true
- }),
- )
- })(problemsData[i])
+ )
+ row.append(
+ $(' | ')
+ .html('显示投票')
+ .click(function () {
+ pid.value = data['pid']
+ window.pid = data['pid']
+ showVotesModal.value = true
+ }),
+ )
+ })(problemsData[i])
table.append(row)
}
}
@@ -318,10 +318,10 @@ $(document).ready(function () {
problemsData[i]['difficulty2'],
problemsData[i]['difficulty'],
]
- ;[problemsData[i]['quality'], problemsData[i]['quality2']] = [
- problemsData[i]['quality2'],
- problemsData[i]['quality'],
- ]
+ ;[problemsData[i]['quality'], problemsData[i]['quality2']] = [
+ problemsData[i]['quality2'],
+ problemsData[i]['quality'],
+ ]
}
showTable()
})
|