diff --git a/test_client/dist.zip b/test_client/dist.zip new file mode 100644 index 0000000..23b15ee Binary files /dev/null and b/test_client/dist.zip differ diff --git a/test_client/src/router/index.js b/test_client/src/router/index.js index ef7b0b7..e74d1ca 100644 --- a/test_client/src/router/index.js +++ b/test_client/src/router/index.js @@ -96,8 +96,6 @@ export const asyncRoutes = [ } ] }, - - // youpei 是只针对地坪项目新建的菜单 { path: '/youpei', @@ -175,7 +173,7 @@ export const asyncRoutes = [ component: Layout, redirect: '/Qmanage/question', name: 'Qmanage', - meta: { title: '题库管理', icon: 'table' }, + meta: { title: '题库管理', icon: 'table', perms: ['qmanage'] }, children: [ { path: 'subject', @@ -216,7 +214,7 @@ export const asyncRoutes = [ component: Layout, redirect: '/sjmanage/workscope', name: 'Sjmanage', - meta: { title: '出卷管理', icon: 'component', perms: [] }, + meta: { title: '出卷管理', icon: 'component', perms: ['workscope'] }, children: [ { path: 'testrule', @@ -285,7 +283,7 @@ export const asyncRoutes = [ component: Layout, redirect: '/exammanage/index', name: 'Exammanage', - meta: { title: '考证管理', icon: 'component' }, + meta: { title: '考证管理', icon: 'component', perms: ['exammanage'] }, children: [ { path: 'index', @@ -306,7 +304,7 @@ export const asyncRoutes = [ component: Layout, redirect: '/threshold/source', name: 'Threshold', - meta: { title: '阈值库', icon: 'component', perms: ['threshold_view']}, + meta: { title: '阈值库', icon: 'component', perms: ['threshold_view'] }, children: [ { path: 'source', @@ -364,7 +362,7 @@ export const asyncRoutes = [ component: Layout, redirect: '/system/admin', name: 'System', - meta: { title: '系统管理', icon: 'tree', perms: [] }, + meta: { title: '系统管理', icon: 'tree', perms: ['system_admin'] }, children: [ { path: 'banner', @@ -404,14 +402,14 @@ export const asyncRoutes = [ component: Layout, redirect: '/changepassword', name: 'ChangePW', - meta: { title: '修改密码', icon: 'tree' }, + meta: { title: '修改密码', icon: 'tree', perms: ['change_password'] }, hidden: true, children: [ { path: '', name: 'ChangePassword', component: () => import('@/views/system/changepassword'), - meta: { title: '修改密码', noCache: true, icon: '' }, + meta: { title: '修改密码', noCache: true, icon: '', perms: ['change_password'] }, hidden: true } ] diff --git a/test_client/src/store/modules/permission.js b/test_client/src/store/modules/permission.js index 1ae691e..1cda060 100644 --- a/test_client/src/store/modules/permission.js +++ b/test_client/src/store/modules/permission.js @@ -49,11 +49,11 @@ const actions = { generateRoutes({ commit }, perms) { return new Promise(resolve => { let accessedRoutes - if (perms.includes('admin')) { - accessedRoutes = asyncRoutes || [] - } else { + // if (perms.includes('admin')) { + // accessedRoutes = asyncRoutes || [] + // } else { accessedRoutes = filterAsyncRoutes(asyncRoutes, perms) - } + // } commit('SET_ROUTES', accessedRoutes) resolve(accessedRoutes) }) diff --git a/test_client/src/views/analyse/examtest.vue b/test_client/src/views/analyse/examtest.vue index 9ea230c..f7c1b39 100644 --- a/test_client/src/views/analyse/examtest.vue +++ b/test_client/src/views/analyse/examtest.vue @@ -1,6 +1,7 @@ @@ -333,6 +330,26 @@ export default { } }) }, + handleDelete2(scope) { + this.$confirm('确认删数据吗?将丢失数据!', '警告', { + confirmButtonText: '确认', + cancelButtonText: '取消', + type: 'error' + }) + .then(async() => { + await deleteChildcomany(scope.row.id) + this.getList2() + this.getList() + this.$message({ + type: 'success', + message: '成功删除!' + }) + }) + // eslint-disable-next-line handle-callback-err + .catch(err => { + // console.error(err); + }) + }, } }