From 781ea35fe22769a565e2f5ba4a1c8b5bfa05e1cc Mon Sep 17 00:00:00 2001 From: caoqianming Date: Wed, 25 Mar 2020 16:37:07 +0800 Subject: [PATCH] change workscope --- test_client/src/api/examtest.js | 35 +++++ test_client/src/router/index.js | 30 +++- test_client/src/views/crm/consumer.vue | 2 +- test_client/src/views/examtest/rule.vue | 12 +- test_client/src/views/examtest/rulecreate.vue | 78 +--------- test_client/src/views/examtest/ruleupdate.vue | 74 +--------- test_client/src/views/examtest/workscope.vue | 115 +++++++++++++++ .../src/views/examtest/workscopecreate.vue | 132 +++++++++++++++++ .../src/views/examtest/workscopeupdate.vue | 139 ++++++++++++++++++ .../src/views/question/questioncat.vue | 24 ++- test_mini/app.js | 4 + test_mini/app.json | 3 +- test_mini/pages/lianxi/index.js | 38 +++-- test_mini/pages/lianxi/index.wxml | 2 +- test_mini/pages/main/main.js | 21 +-- test_mini/pages/main/main.wxml | 6 +- test_mini/pages/moni/index.js | 26 ++-- test_mini/pages/moni/index.wxml | 4 +- test_mini/pages/my/index.js | 12 +- test_mini/pages/my/index.wxml | 4 + test_mini/pages/subject/index.js | 2 +- test_mini/pages/test/detail.wxml | 5 +- test_mini/pages/test/test.js | 2 +- test_mini/pages/workscope/index.js | 100 +++++++++++++ test_mini/pages/workscope/index.json | 4 + test_mini/pages/workscope/index.wxml | 21 +++ test_mini/pages/workscope/index.wxss | 1 + .../examtest/migrations/0013_workscope.py | 32 ++++ .../migrations/0014_auto_20200325_1252.py | 25 ++++ .../migrations/0015_auto_20200325_1559.py | 27 ++++ .../migrations/0016_auto_20200325_1610.py | 19 +++ test_server/examtest/models.py | 17 ++- test_server/examtest/serializers.py | 26 ++-- test_server/examtest/urls.py | 3 +- test_server/examtest/views.py | 92 +++++++----- test_server/question/views.py | 11 ++ 36 files changed, 876 insertions(+), 272 deletions(-) create mode 100644 test_client/src/views/examtest/workscope.vue create mode 100644 test_client/src/views/examtest/workscopecreate.vue create mode 100644 test_client/src/views/examtest/workscopeupdate.vue create mode 100644 test_mini/pages/workscope/index.js create mode 100644 test_mini/pages/workscope/index.json create mode 100644 test_mini/pages/workscope/index.wxml create mode 100644 test_mini/pages/workscope/index.wxss create mode 100644 test_server/examtest/migrations/0013_workscope.py create mode 100644 test_server/examtest/migrations/0014_auto_20200325_1252.py create mode 100644 test_server/examtest/migrations/0015_auto_20200325_1559.py create mode 100644 test_server/examtest/migrations/0016_auto_20200325_1610.py diff --git a/test_client/src/api/examtest.js b/test_client/src/api/examtest.js index 0ecf461..061ba7c 100644 --- a/test_client/src/api/examtest.js +++ b/test_client/src/api/examtest.js @@ -34,3 +34,38 @@ export function deleteTestRule(id) { method: 'delete', }) } + +export function getWorkScopeAll() { + return request({ + url: '/examtest/workscope/', + method: 'get', + }) +} + +export function getWorkScopDetail(id){ + return request({ + url: `/examtest/workscope/${id}/`, + method: 'get', + }) +} + +export function createWorkScope(data) { + return request({ + url: '/examtest/workscope/', + method: 'post', + data + }) +} +export function updateWorkScope(id, data) { + return request({ + url: `/examtest/workscope/${id}/`, + method: 'put', + data + }) +} +export function deleteWorkScope(id) { + return request({ + url: `/examtest/workscope/${id}/`, + method: 'delete', + }) +} \ No newline at end of file diff --git a/test_client/src/router/index.js b/test_client/src/router/index.js index fb51b7f..3342a4b 100644 --- a/test_client/src/router/index.js +++ b/test_client/src/router/index.js @@ -101,7 +101,7 @@ export const asyncRoutes = [ path: 'questioncat', name: 'questioncat', component: () => import('@/views/question/questioncat.vue'), - meta: { title: '题库分类', icon: '', perms: ['questioncat_manage'] } + meta: { title: '科目分类', icon: '', perms: ['questioncat_manage'] } }, { path: 'question', @@ -116,13 +116,19 @@ export const asyncRoutes = [ component: Layout, redirect: '/sjmanage/', name: 'Sjmanage', - meta: { title: '试卷管理', icon: 'component'}, + meta: { title: '出卷管理', icon: 'component'}, children: [ { path: 'testrule', name: 'TestRule', component: () => import('@/views/examtest/rule.vue'), - meta: { title: '模考规则', icon: '', perms: ['testrule_manage'] }, + meta: { title: '试卷结构', icon: '', perms: ['testrule_manage'] }, + }, + { + path: 'workscope', + name: 'workscope', + component: () => import('@/views/examtest/workscope.vue'), + meta: { title: '工作类别', icon: '', perms: ['workscope_manage'] }, }, { path: 'testpaper', @@ -134,14 +140,28 @@ export const asyncRoutes = [ path: 'testrule/create', name: 'CreateRule', component: () => import('@/views/examtest/rulecreate.vue'), - meta: { title: '新建模考规则', noCache: true, icon: '', perms: ['testrule_add']}, + meta: { title: '新建试卷结构', noCache: true, icon: '', perms: ['testrule_add']}, hidden: true }, { path: 'testrule/update', name: 'UpdateRule', component: () => import('@/views/examtest/ruleupdate.vue'), - meta: { title: '编辑模考规则', noCache: true, icon: '', perms: ['testrule_update']}, + meta: { title: '编辑试卷结构', noCache: true, icon: '', perms: ['testrule_update']}, + hidden: true + }, + { + path: 'workscope/create', + name: 'CreateWorkscope', + component: () => import('@/views/examtest/workscopecreate.vue'), + meta: { title: '新建工作类别', noCache: true, icon: '', perms: ['workscope_add']}, + hidden: true + }, + { + path: 'workscope/update', + name: 'UpdateWorkscope', + component: () => import('@/views/examtest/workscopeupdate.vue'), + meta: { title: '编辑工作类别', noCache: true, icon: '', perms: ['workscope_update']}, hidden: true }, ] diff --git a/test_client/src/views/crm/consumer.vue b/test_client/src/views/crm/consumer.vue index f378d5d..a72fec0 100644 --- a/test_client/src/views/crm/consumer.vue +++ b/test_client/src/views/crm/consumer.vue @@ -99,7 +99,7 @@ v-if="scope.row.company_name != null" >{{ scope.row.company_name }} - +