diff --git a/test_client/src/api/cms.js b/test_client/src/api/cms.js index 00bc34f..e6eb590 100644 --- a/test_client/src/api/cms.js +++ b/test_client/src/api/cms.js @@ -64,6 +64,62 @@ export function updateMaterial(id, data) { export function deleteMaterial(id) { return request({ url: `/cms/material/${id}/`, - method: 'delete', + method: 'delete' }) -} \ No newline at end of file +} + +export function getSourceList(query) { + return request({ + url: '/cms/source/', + method: 'get', + params:query + }) +} +export function createSource(data) { + return request({ + url: '/cms/source/', + method: 'post', + data + }) +} +export function updateSource(id, data) { + return request({ + url: `/cms/source/${id}/`, + method: 'put', + data + }) +} +export function deleteSource(id) { + return request({ + url: `/cms/source/${id}/`, + method: 'delete' + }) +} + +export function getThresholdList(query) { + return request({ + url: '/cms/threshold/', + method: 'get', + params:query + }) +} +export function createThreshold(data) { + return request({ + url: '/cms/threshold/', + method: 'post', + data + }) +} +export function updateThreshold(id, data) { + return request({ + url: `/cms/threshold/${id}/`, + method: 'put', + data + }) +} +export function deleteThreshold(id) { + return request({ + url: `/cms/threshold/${id}/`, + method: 'delete' + }) +} diff --git a/test_client/src/router/index.js b/test_client/src/router/index.js index d1a3ef7..3ef5c25 100644 --- a/test_client/src/router/index.js +++ b/test_client/src/router/index.js @@ -42,8 +42,6 @@ export const constantRoutes = [ component: () => import('@/views/404'), hidden: true } - - ] /** @@ -94,7 +92,7 @@ export const asyncRoutes = [ component: () => import('@/views/news/newsupdate.vue'), meta: { title: '编辑文章', noCache: true, icon: '', perms: ['news_update']}, hidden: true - }, + } ] }, { @@ -109,7 +107,7 @@ export const asyncRoutes = [ name: 'VodIndex', component: () => import('@/views/vod/index.vue'), meta: { title: '课程视频', icon: '', perms: ['vod'] } - }, + } ] }, { @@ -148,7 +146,7 @@ export const asyncRoutes = [ name: 'ConsumerRule', component: () => import('@/views/crm/consumerrole.vue'), meta: { title: '客户角色', icon: '', perms: ['consumerrole_view'] } - }, + } ] }, @@ -223,43 +221,43 @@ export const asyncRoutes = [ name: 'CreateRule', component: () => import('@/views/examtest/rulecreate.vue'), meta: { title: '新建试卷结构', noCache: true, icon: '', perms: ['testrule_add']}, - hidden: true + hidden: true }, { path: 'testrule/update', name: 'UpdateRule', component: () => import('@/views/examtest/ruleupdate.vue'), meta: { title: '编辑试卷结构', noCache: true, icon: '', perms: ['testrule_update']}, - hidden: true + hidden: true }, { path: 'workscope/create', name: 'CreateWorkscope', component: () => import('@/views/examtest/workscopecreate.vue'), meta: { title: '新建工作类别', noCache: true, icon: '', perms: ['workscope_add']}, - hidden: true + hidden: true }, { path: 'workscope/update', name: 'UpdateWorkscope', component: () => import('@/views/examtest/workscopeupdate.vue'), meta: { title: '编辑工作类别', noCache: true, icon: '', perms: ['workscope_update']}, - hidden: true + hidden: true }, { path: 'paper/create', name: 'CreatePaper', component: () => import('@/views/examtest/papercreate.vue'), meta: { title: '新建押题试卷', noCache: true, icon: '', perms: ['paper_add']}, - hidden: true + hidden: true }, { path: 'paper/update', name: 'UpdatePaper', component: () => import('@/views/examtest/paperupdate.vue'), meta: { title: '编辑押题试卷', noCache: true, icon: '', perms: ['paper_update']}, - hidden: true - }, + hidden: true + } ] }, { @@ -280,7 +278,22 @@ export const asyncRoutes = [ name: 'issue', component: () => import('@/views/exam/issue.vue'), meta: { title: '出证记录', perms: ['certificate_view'] } - }, + } + ] + }, + { + path: '/threshold', + component: Layout, + redirect: '/threshold/source', + name: 'Threshold', + meta: { title: '阀值管理', icon: 'component'}, + children: [ + { + path: 'source', + name: 'source', + component: () => import('@/views/threshold/source.vue'), + meta: { title: '阀值管理', perms: ['threshold_view'] } + } ] }, { @@ -307,10 +320,10 @@ export const asyncRoutes = [ name: 'chart', component: () => import('@/views/analyse/chart.vue'), meta: { title: '图表分析', icon: '', perms: ['chart_manage'] } - }, + } ] }, - + // { // path: '/qtest', // component: Layout, diff --git a/test_client/src/views/news/news.vue b/test_client/src/views/news/news.vue index 1e3fa62..aa7a4e2 100644 --- a/test_client/src/views/news/news.vue +++ b/test_client/src/views/news/news.vue @@ -161,8 +161,8 @@ export default { }); this.getList() }); - - }).catch(() => { + + }).catch(() => { }); }, handleTop(scope) { @@ -175,7 +175,7 @@ export default { this.getList() } - + }); } } diff --git a/test_client/src/views/threshold/source.vue b/test_client/src/views/threshold/source.vue new file mode 100644 index 0000000..7e36a32 --- /dev/null +++ b/test_client/src/views/threshold/source.vue @@ -0,0 +1,573 @@ + + +