From 54ee7e06f1e0d0853c9f71eee15c59ff4f1bf621 Mon Sep 17 00:00:00 2001 From: caoqianming Date: Thu, 19 Mar 2020 20:10:06 +0800 Subject: [PATCH] test add --- test_client/src/views/examtest/rulecreate.vue | 26 +++-- test_client/src/views/question/question.vue | 4 +- test_mini/pages/cuoti/index.js | 22 ++-- test_mini/pages/cuoti/index.wxml | 10 +- test_mini/pages/lianxi/main.js | 50 ++++---- test_mini/pages/lianxi/main.wxml | 14 +-- test_mini/pages/main/main.wxml | 2 +- test_mini/pages/moni/note.wxml | 7 +- test_mini/pages/test/test.js | 109 +++++++++++------- test_mini/pages/test/test.wxml | 28 ++--- .../migrations/0007_auto_20200319_1355.py | 23 ++++ .../migrations/0008_auto_20200319_1827.py | 84 ++++++++++++++ .../migrations/0009_auto_20200319_1850.py | 35 ++++++ test_server/examtest/models.py | 53 ++++++++- test_server/examtest/serializers.py | 14 ++- test_server/examtest/views.py | 26 +++-- .../migrations/0007_auto_20200319_0846.py | 34 ++++++ test_server/question/models.py | 36 +++--- test_server/question/serializers.py | 4 +- test_server/question/views.py | 19 ++- test_server/rbac/models.py | 32 +++++ 21 files changed, 464 insertions(+), 168 deletions(-) create mode 100644 test_server/examtest/migrations/0007_auto_20200319_1355.py create mode 100644 test_server/examtest/migrations/0008_auto_20200319_1827.py create mode 100644 test_server/examtest/migrations/0009_auto_20200319_1850.py create mode 100644 test_server/question/migrations/0007_auto_20200319_0846.py diff --git a/test_client/src/views/examtest/rulecreate.vue b/test_client/src/views/examtest/rulecreate.vue index dc27217..584bf07 100644 --- a/test_client/src/views/examtest/rulecreate.vue +++ b/test_client/src/views/examtest/rulecreate.vue @@ -26,7 +26,8 @@ + @visible-change="getQuestionCount" + @remove-tag="getQuestionCount2"> 分钟 - {{Form.totalscore}} 分 + {{Form.total_score}} 分 - - 分 + + 立即创建 @@ -86,8 +87,8 @@ export default { panduan_count:0, panduan_score:0, limit:0, - totalscore:0, - passscore:0 + total_score:0, + pass_score:0 }, typecount:{ danxuan:0, @@ -109,7 +110,7 @@ export default { { required: true, message: "时间限制不能为空"}, { type: "number", message: "时间限制必须是数字"} ], - passscore: [ + pass_score: [ { required: true, message: "及格分数不能为空"}, { type: "number", message: "及格分数必须是数字"} ] @@ -163,15 +164,22 @@ export default { this.typecount = response.data }); } - + }, + getQuestionCount2(val) { + getQuestionCount({ids:this.Form.questioncat}).then(response => { + this.typecount = response.data + }); }, calScore(current,old) { let form = this.Form let score = form.danxuan_count * form.danxuan_score + form.duoxuan_count * form.duoxuan_score + form.panduan_count * form.panduan_score - this.Form.totalscore = score + this.Form.total_score = score }, resetForm(formName) { this.$refs[formName].resetFields(); + this.typecount.danxuan = 0; + this.typecount.duoxuan = 0; + this.typecount.panduan = 0; }, goBack() { this.$router.replace('/sjmanage/testrule/') diff --git a/test_client/src/views/question/question.vue b/test_client/src/views/question/question.vue index f2bb576..4d3ec3e 100644 --- a/test_client/src/views/question/question.vue +++ b/test_client/src/views/question/question.vue @@ -83,10 +83,10 @@ - + - +