[前端]完成比赛列表中,查看比赛提交的分页页面与api的对接[CI SKIP]
This commit is contained in:
@@ -237,11 +237,14 @@ require(["jquery", "avalon", "csrfToken", "bsAlert", "editor", "datetimePicker",
|
||||
addProblem: function () {
|
||||
vm.$fire("up!showContestProblemPage", 0, vm.contestList[vm.editingProblemContestIndex-1].id, vm.editMode);
|
||||
},
|
||||
showProblemEditor: function(el) {
|
||||
showProblemEditPage: function(el) {
|
||||
vm.$fire("up!showContestProblemPage", el.id, vm.contestList[vm.editingProblemContestIndex-1].id, vm.editMode);
|
||||
},
|
||||
showSubmissionPage: function() {
|
||||
vm.$fire("up!showContestSubmissionPage", el.id, vm.contestList[vm.editingProblemContestIndex-1].id, vm.editMode);
|
||||
showSubmissionPage: function(el) {
|
||||
var problemId = 0
|
||||
if (el)
|
||||
problemId = el.id;
|
||||
vm.$fire("up!showContestSubmissionPage", problemId, vm.contestList[vm.editingProblemContestIndex-1].id, vm.editMode);
|
||||
},
|
||||
getYesOrNo: function(yORn) {
|
||||
if (yORn) return "是";
|
||||
|
||||
@@ -44,13 +44,15 @@ require(["jquery", "avalon", "csrfToken", "bsAlert"], function ($, avalon, csrfT
|
||||
}
|
||||
},
|
||||
getPage: function (page_index) {
|
||||
if (!page_index)
|
||||
var page_index = vm.page;
|
||||
getPageData(page_index);
|
||||
},
|
||||
showSubmissionDetailPage: function (submissionId) {
|
||||
|
||||
},
|
||||
showProblemListPage: function(){
|
||||
vm.$fire("up!showProblemListPage");
|
||||
goBack: function(check){
|
||||
vm.$fire("up!showContestListPage");
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -58,7 +60,9 @@ require(["jquery", "avalon", "csrfToken", "bsAlert"], function ($, avalon, csrfT
|
||||
getPageData(1);
|
||||
|
||||
function getPageData(page) {
|
||||
var url = "/api/admin/submission/?paging=true&page=" + page + "&page_size=10&problem_id=" + avalon.vmodels.admin.problemId;
|
||||
var url = "/api/admin/contest_submission/?paging=true&page=" + page + "&page_size=10&contest_id=" + avalon.vmodels.admin.$contestId;
|
||||
if (avalon.vmodels.admin.$problemId)
|
||||
url += "&problem_id=" + avalon.vmodels.admin.$problemId
|
||||
$.ajax({
|
||||
url: url,
|
||||
dataType: "json",
|
||||
|
||||
Reference in New Issue
Block a user