From 9554132a66ed413b502a769e592b25b41cebf55f Mon Sep 17 00:00:00 2001 From: caoqianming Date: Sun, 14 Mar 2021 22:00:30 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=9B=E5=BB=BA=E6=AD=A3=E5=BC=8F=E8=80=83?= =?UTF-8?q?=E8=AF=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test_client/src/api/exam.js | 29 ++ test_client/src/api/examtest.js | 3 +- test_client/src/router/index.js | 16 + test_client/src/styles/index.scss | 54 +++- test_client/src/views/exam/index.vue | 273 ++++++++++++++++++ test_client/src/views/examtest/workscope.vue | 10 +- .../src/views/examtest/workscopecreate.vue | 4 + .../src/views/examtest/workscopeupdate.vue | 4 + .../migrations/0025_auto_20210314_1716.py | 53 ++++ test_server/examtest/models.py | 20 +- test_server/examtest/models_paper.py | 2 + test_server/examtest/serializers.py | 13 +- test_server/examtest/urls.py | 3 +- test_server/examtest/views.py | 51 +++- test_server/utils/mixins.py | 48 +++ test_server/x.py | 1 + 16 files changed, 572 insertions(+), 12 deletions(-) create mode 100644 test_client/src/api/exam.js create mode 100644 test_client/src/views/exam/index.vue create mode 100644 test_server/examtest/migrations/0025_auto_20210314_1716.py create mode 100644 test_server/utils/mixins.py create mode 100644 test_server/x.py diff --git a/test_client/src/api/exam.js b/test_client/src/api/exam.js new file mode 100644 index 0000000..c87f665 --- /dev/null +++ b/test_client/src/api/exam.js @@ -0,0 +1,29 @@ +import request from '@/utils/request' + +export function getexamlist(query) { + return request({ + url: '/examtest/exam/', + method: 'get', + params: query + }) +} +export function createexam(data) { + return request({ + url: '/examtest/exam/', + method: 'post', + data + }) +} +export function updateexam(id, data) { + return request({ + url: `/examtest/exam/${id}/`, + method: 'put', + data + }) +} +export function deleteexam(id) { + return request({ + url: `/examtest/exam/${id}/`, + method: 'delete', + }) +} \ No newline at end of file diff --git a/test_client/src/api/examtest.js b/test_client/src/api/examtest.js index 4f64fbe..1f01cdb 100644 --- a/test_client/src/api/examtest.js +++ b/test_client/src/api/examtest.js @@ -35,10 +35,11 @@ export function deleteTestRule(id) { }) } -export function getWorkScopeAll() { +export function getWorkScopeAll(query) { return request({ url: '/examtest/workscope/', method: 'get', + params: query }) } diff --git a/test_client/src/router/index.js b/test_client/src/router/index.js index 244fb43..bfb6fc2 100644 --- a/test_client/src/router/index.js +++ b/test_client/src/router/index.js @@ -247,6 +247,21 @@ export const asyncRoutes = [ }, ] }, + { + path: '/exammanage', + component: Layout, + redirect: '/exammanage/index', + name: 'Exammanage', + meta: { title: '考试管理', icon: '', perms: []}, + children: [ + { + path: 'index', + name: 'exam', + component: () => import('@/views/exam/index.vue'), + meta: { title: '考试管理', icon: 'component', perms: ['exam_view'] } + }, + ] + }, { path: '/analyse', component: Layout, @@ -268,6 +283,7 @@ export const asyncRoutes = [ }, ] }, + { path: '/qtest', component: Layout, diff --git a/test_client/src/styles/index.scss b/test_client/src/styles/index.scss index 4a25b38..059de63 100644 --- a/test_client/src/styles/index.scss +++ b/test_client/src/styles/index.scss @@ -64,9 +64,61 @@ div:focus { padding: 10px; } +.el-table--medium td,   .el-table--medium th { + padding: 2px 0; +} +.el-form-item { + margin-bottom: 16px; +} +.el-card, .el-message { + border-radius: 0px; + overflow: hidden; +} .el-card__body { padding: 6px; } .el-card__header { padding: 6px; -} \ No newline at end of file +} +.el-tabs--border-card>.el-tabs__content { + padding: 6px; +} +.el-dialog__header { + padding: 10px 10px 6px; +} +// .el-dialog{ +// display: flex; +// flex-direction: column; +// margin:0 !important; +// position:absolute; +// top:50%; +// left:50%; +// transform:translate(-50%,-50%); +// /*height:600px;*/ +// max-height:calc(100% - 30px); +// max-width:calc(100% - 30px); +// } +.el-dialog .el-dialog__body{ + // flex:1; + // overflow: auto; + padding: 8px 12px; +} + +.el-form--label-top .el-form-item__label { + line-height: 16px; +} +.el-button+.el-button { + margin-left: 1px; +} +.el-tabs__header { + margin: 0 0 6px; +} +.pagination-container { + padding: 0px 0px; +} +body .el-table th.gutter{ + display: table-cell!important; +} +.el-dialog__footer{ + padding: 6px 6px 6px; +} diff --git a/test_client/src/views/exam/index.vue b/test_client/src/views/exam/index.vue new file mode 100644 index 0000000..fe91845 --- /dev/null +++ b/test_client/src/views/exam/index.vue @@ -0,0 +1,273 @@ + + + diff --git a/test_client/src/views/examtest/workscope.vue b/test_client/src/views/examtest/workscope.vue index a08ae95..9854b30 100644 --- a/test_client/src/views/examtest/workscope.vue +++ b/test_client/src/views/examtest/workscope.vue @@ -20,14 +20,20 @@ row-key="id" > - + - + + + +