diff --git a/test_client/src/api/examtest.js b/test_client/src/api/examtest.js index 1e0b1cc..c106f9c 100644 --- a/test_client/src/api/examtest.js +++ b/test_client/src/api/examtest.js @@ -104,4 +104,11 @@ export function createPaper(data) { method: 'post', data }) +} +export function updatePaper(id, data) { + return request({ + url: `/examtest/paper/${id}/`, + method: 'put', + data + }) } \ No newline at end of file diff --git a/test_client/src/router/index.js b/test_client/src/router/index.js index 768aa95..fd6855c 100644 --- a/test_client/src/router/index.js +++ b/test_client/src/router/index.js @@ -171,6 +171,13 @@ export const asyncRoutes = [ meta: { title: '新建押题试卷', noCache: true, icon: '', perms: ['paper_add']}, hidden: true }, + { + path: 'paper/update', + name: 'UpdatePaper', + component: () => import('@/views/examtest/paperupdate.vue'), + meta: { title: '编辑押题试卷', noCache: true, icon: '', perms: ['paper_update']}, + hidden: true + }, ] }, { diff --git a/test_client/src/views/examtest/papercreate.vue b/test_client/src/views/examtest/papercreate.vue index 035bd4b..3db1968 100644 --- a/test_client/src/views/examtest/papercreate.vue +++ b/test_client/src/views/examtest/papercreate.vue @@ -29,7 +29,7 @@
多选题 - {{Form.danxuan_count}} 道 + {{Form.duoxuan_count}} 道 每道
@@ -172,18 +172,22 @@ export default { panduan_count = 0, questions = []; for (var i = 0, len = this.questions.length; i < len; i++) { - questions.push({id:this.questions[i].id,type:this.questions[i].type}) + var total_score = 0 switch (this.questions[i].type) { case "单选": danxuan_count = danxuan_count + 1; + total_score = this.Form.danxuan_score break; case "多选": duoxuan_count = duoxuan_count + 1; + total_score = this.Form.duoxuan_score break; case "判断": panduan_count = panduan_count + 1; + total_score = this.Form.panduan_score break; } + questions.push({id:this.questions[i].id,type:this.questions[i].type,total_score:total_score}) } this.Form.danxuan_count = danxuan_count this.Form.duoxuan_count = duoxuan_count diff --git a/test_client/src/views/examtest/paperupdate.vue b/test_client/src/views/examtest/paperupdate.vue new file mode 100644 index 0000000..681094a --- /dev/null +++ b/test_client/src/views/examtest/paperupdate.vue @@ -0,0 +1,209 @@ + + \ No newline at end of file diff --git a/test_client/src/views/system/banner.vue b/test_client/src/views/system/banner.vue index 27ed6ec..a6ba14c 100644 --- a/test_client/src/views/system/banner.vue +++ b/test_client/src/views/system/banner.vue @@ -19,7 +19,7 @@ -