sync
This commit is contained in:
parent
01eafa8efc
commit
ba63ef6d15
@ -46,7 +46,7 @@
|
||||
|
||||
### 学之思交流群(加群获取数据库脚本)
|
||||
|
||||
* 交流六群:`593529956`
|
||||
* QQ交流群七:`873533715`
|
||||
* QQ:`2693073475`
|
||||
* 微信:`alvis-u`
|
||||
|
||||
@ -82,9 +82,9 @@
|
||||
|
||||
* 用户登录登出功能,登录会自动绑定微信账号,登出会解绑
|
||||
* 首页包含任务中心、固定试卷、时段试卷,和web端保持一致
|
||||
* 试卷模块,固定试卷和时段试卷的分页查询,下拉加载更多,上拉刷新当前数据
|
||||
* 记录模块,考试结果的分页,包含了试卷基本信息
|
||||
* 我的模块,包含个人资料的修改,个人动态,消息中心模块
|
||||
* 试卷模块:固定试卷和时段试卷的分页查询,下拉加载更多,上拉刷新当前数据
|
||||
* 记录模块:考试结果的分页,包含了试卷基本信息
|
||||
* 我的模块:包含个人资料的修改、个人动态、消息中心模块
|
||||
|
||||
### 系统展示
|
||||
|
||||
|
@ -122,7 +122,7 @@ npm run build
|
||||
* 执行下列命令,运行程序
|
||||
|
||||
```java
|
||||
nohup java -Duser.timezone=Asia/Shanghai -jar -Dspring.profiles.active=prod xzs-3.0.7.jar > start1.log 2>&1 &
|
||||
nohup java -Duser.timezone=Asia/Shanghai -jar -Dspring.profiles.active=prod xzs-3.1.0.jar > start1.log 2>&1 &
|
||||
```
|
||||
|
||||
### 前后端分离部署
|
||||
@ -143,7 +143,7 @@ server {
|
||||
index index.html;
|
||||
}
|
||||
location /api/ {
|
||||
proxy_pass https://localhost:8000;
|
||||
proxy_pass http://localhost:8000;
|
||||
}
|
||||
}
|
||||
```
|
||||
|
BIN
docs/favicon.ico
BIN
docs/favicon.ico
Binary file not shown.
Before Width: | Height: | Size: 66 KiB |
BIN
docs/favicon.png
Normal file
BIN
docs/favicon.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 2.3 KiB |
@ -1,38 +1,41 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>学之思开发部署教程</title>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
||||
<meta name="description" content="Description">
|
||||
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
||||
<link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/vue.css">
|
||||
<link rel="stylesheet" href="xzs.css">
|
||||
<link rel="shortcut icon" href="favicon.ico">
|
||||
<meta charset="UTF-8">
|
||||
<title>学之思开发部署教程</title>
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" />
|
||||
<meta name="description" content="Description">
|
||||
<meta name="viewport" content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
|
||||
<link rel="stylesheet" href="//unpkg.com/docsify/lib/themes/vue.css">
|
||||
<link rel="stylesheet" href="xzs.css">
|
||||
<link rel="shortcut icon" href="favicon.png">
|
||||
</head>
|
||||
|
||||
<body style="min-width: 1024px;">
|
||||
<nav class="head">
|
||||
<div class="head-logo">
|
||||
<a href="https://www.mindskip.net" target="_blank">
|
||||
<img src="http://www.mindskip.net/images/icon/logo-white.png"/>
|
||||
</a>
|
||||
</div>
|
||||
<div class="head-link">
|
||||
<a href="https://www.mindskip.net/" target="_blank">官网</a>
|
||||
<a href="https://www.mindskip.net/sdd.html" target="_blank">思多多</a>
|
||||
<a href="https://www.mindskip.net/wdd.html" target="_blank">维多多</a>
|
||||
<a href="https://www.mindskip.net/xdd.html" target="_blank">学多多</a>
|
||||
<a href="https://www.mindskip.net/xzs.html" target="_blank">学之思</a>
|
||||
<a href="https://www.mindskip.net/buy.html" target="_blank">商业购买</a>
|
||||
</div>
|
||||
</nav>
|
||||
<div id="app"></div>
|
||||
<script>
|
||||
window.$docsify = {
|
||||
name: '学之思开发部署教程',
|
||||
coverpage: false
|
||||
}
|
||||
</script>
|
||||
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
|
||||
<nav class="head">
|
||||
<div class="head-logo">
|
||||
<a href="https://www.mindskip.net" target="_blank">
|
||||
<img src="logo.png" />
|
||||
</a>
|
||||
</div>
|
||||
<div class="head-link">
|
||||
<a href="https://www.mindskip.net/" target="_blank">官网</a>
|
||||
<a href="https://www.mindskip.net/sdd.html" target="_blank">思多多</a>
|
||||
<a href="https://www.mindskip.net/wdd.html" target="_blank">维多多</a>
|
||||
<a href="https://www.mindskip.net/xdd.html" target="_blank">学多多</a>
|
||||
<a href="https://www.mindskip.net/xzs.html" target="_blank">学之思</a>
|
||||
<a href="https://www.mindskip.net/buy.html" target="_blank">商业购买</a>
|
||||
</div>
|
||||
</nav>
|
||||
<div id="app"></div>
|
||||
<script>
|
||||
window.$docsify = {
|
||||
name: '学之思开发部署教程',
|
||||
coverpage: false
|
||||
}
|
||||
</script>
|
||||
<script src="//unpkg.com/docsify/lib/docsify.min.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
</html>
|
BIN
docs/logo.png
Normal file
BIN
docs/logo.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 5.0 KiB |
@ -7,7 +7,6 @@ table td {
|
||||
}
|
||||
|
||||
.head {
|
||||
position: fixed !important;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
@ -22,6 +21,7 @@ table td {
|
||||
.head-logo {
|
||||
height: 58px;
|
||||
width: 182px;
|
||||
line-height: 78px;
|
||||
}
|
||||
|
||||
.head-link {
|
||||
|
1
source/vue/xzs-admin/.gitignore
vendored
1
source/vue/xzs-admin/.gitignore
vendored
@ -20,4 +20,3 @@ yarn-error.log*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
||||
/package-lock.json
|
||||
|
1530
source/vue/xzs-admin/package-lock.json
generated
1530
source/vue/xzs-admin/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -16,7 +16,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"axios": "^0.19.0",
|
||||
"core-js": "^3.7.0",
|
||||
"core-js": "^3.8.2",
|
||||
"element-ui": "^2.14.1",
|
||||
"js-cookie": "2.2.0",
|
||||
"normalize.css": "8.0.1",
|
||||
@ -24,14 +24,14 @@
|
||||
"vue": "^2.6.10",
|
||||
"vue-count-to": "^1.0.13",
|
||||
"vue-router": "^3.4.9",
|
||||
"vuex": "^3.5.1"
|
||||
"vuex": "^3.6.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vue/cli-plugin-babel": "^4.5.9",
|
||||
"@vue/cli-plugin-eslint": "^4.5.9",
|
||||
"@vue/cli-plugin-router": "^4.5.9",
|
||||
"@vue/cli-plugin-vuex": "^4.5.9",
|
||||
"@vue/cli-service": "^4.5.9",
|
||||
"@vue/cli-plugin-babel": "^4.5.10",
|
||||
"@vue/cli-plugin-eslint": "^4.5.10",
|
||||
"@vue/cli-plugin-router": "^4.5.10",
|
||||
"@vue/cli-plugin-vuex": "^4.5.10",
|
||||
"@vue/cli-service": "^4.5.10",
|
||||
"@vue/eslint-config-standard": "^4.0.0",
|
||||
"babel-eslint": "^10.1.0",
|
||||
"eslint": "^5.16.0",
|
||||
|
File diff suppressed because one or more lines are too long
@ -8,7 +8,7 @@
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
|
||||
<title>TEKsystems Admin</title>
|
||||
<title>学之思管理系统</title>
|
||||
<style>
|
||||
html {
|
||||
height: 100%;
|
||||
|
@ -1,9 +0,0 @@
|
||||
import { post } from '@/utils/request'
|
||||
|
||||
export default {
|
||||
list: query => post('/api/admin/industry/list'),
|
||||
pageList: query => post('/api/admin/industry/page', query),
|
||||
edit: query => post('/api/admin/industry/edit', query),
|
||||
select: id => post('/api/admin/industry/select/' + id),
|
||||
deleteSubject: id => post('/api/admin/industry/delete/' + id)
|
||||
}
|
@ -1,9 +1,9 @@
|
||||
import { post } from '@/utils/request'
|
||||
|
||||
export default {
|
||||
list: query => post('/api/admin/skill/list'),
|
||||
pageList: query => post('/api/admin/skill/page', query),
|
||||
edit: query => post('/api/admin/skill/edit', query),
|
||||
select: id => post('/api/admin/skill/select/' + id),
|
||||
deleteSubject: id => post('/api/admin/skill/delete/' + id)
|
||||
list: query => post('/api/admin/education/subject/list'),
|
||||
pageList: query => post('/api/admin/education/subject/page', query),
|
||||
edit: query => post('/api/admin/education/subject/edit', query),
|
||||
select: id => post('/api/admin/education/subject/select/' + id),
|
||||
deleteSubject: id => post('/api/admin/education/subject/delete/' + id)
|
||||
}
|
||||
|
@ -37,7 +37,7 @@ export default {
|
||||
const first = matched[0]
|
||||
|
||||
if (!this.isDashboard(first)) {
|
||||
matched = [{ path: '/dashboard', meta: { title: 'Home' } }].concat(matched)
|
||||
matched = [{ path: '/dashboard', meta: { title: '主页' } }].concat(matched)
|
||||
}
|
||||
this.levelList = matched.filter(item => item.meta && item.meta.title && item.meta.breadcrumb !== false)
|
||||
},
|
||||
|
@ -12,12 +12,12 @@
|
||||
</div>
|
||||
<el-dropdown-menu slot="dropdown">
|
||||
<router-link to="/profile/index">
|
||||
<el-dropdown-item>Personal information</el-dropdown-item>
|
||||
<el-dropdown-item>个人信息</el-dropdown-item>
|
||||
</router-link>
|
||||
<router-link to="/">
|
||||
<el-dropdown-item>Home</el-dropdown-item>
|
||||
<el-dropdown-item>主页</el-dropdown-item>
|
||||
</router-link>
|
||||
<el-dropdown-item @click.native="logout" divided>Log out</el-dropdown-item>
|
||||
<el-dropdown-item @click.native="logout" divided>退出</el-dropdown-item>
|
||||
</el-dropdown-menu>
|
||||
</el-dropdown>
|
||||
</div>
|
||||
|
@ -24,7 +24,7 @@ export default {
|
||||
},
|
||||
data () {
|
||||
return {
|
||||
title: 'TEKsystems Admin'
|
||||
title: '学之思管理系统'
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -9,7 +9,7 @@
|
||||
</div>
|
||||
<app-main />
|
||||
<div class="foot-copyright">
|
||||
<span>Copyright © 2020 TekSystems</span>
|
||||
<span>Copyright © 2020 武汉思维跳跃科技有限公司 版权所有</span>
|
||||
</div>
|
||||
<back-to-top :visibility-height="100" :back-position="0" transition-name="fade" ref="backTop"/>
|
||||
</div>
|
||||
|
@ -10,11 +10,9 @@ import '@/styles/index.scss' // global css
|
||||
import './icons' // icon
|
||||
import NProgress from 'nprogress' // progress bar
|
||||
import 'nprogress/nprogress.css' // progress bar style
|
||||
import locale from 'element-ui/lib/locale/lang/en'
|
||||
|
||||
Vue.use(Element, {
|
||||
locale,
|
||||
size: 'medium', // set element-ui default size
|
||||
size: 'medium' // set element-ui default size
|
||||
})
|
||||
|
||||
Vue.config.productionTip = false
|
||||
|
@ -21,7 +21,7 @@ const constantRoutes = [
|
||||
name: 'Login',
|
||||
hidden: true,
|
||||
component: () => import('@/views/login/index'),
|
||||
meta: { title: 'Login' }
|
||||
meta: { title: '登录' }
|
||||
},
|
||||
{
|
||||
path: '/',
|
||||
@ -32,7 +32,7 @@ const constantRoutes = [
|
||||
path: 'dashboard',
|
||||
component: () => import('@/views/dashboard/index'),
|
||||
name: 'Dashboard',
|
||||
meta: { title: 'Home', icon: 'home', affix: true }
|
||||
meta: { title: '主页', icon: 'home', affix: true }
|
||||
}
|
||||
]
|
||||
},
|
||||
@ -41,7 +41,7 @@ const constantRoutes = [
|
||||
component: Layout,
|
||||
name: 'UserPage',
|
||||
meta: {
|
||||
title: 'User Management',
|
||||
title: '用户管理',
|
||||
icon: 'users'
|
||||
},
|
||||
children: [
|
||||
@ -49,26 +49,26 @@ const constantRoutes = [
|
||||
path: 'student/list',
|
||||
component: () => import('@/views/user/student/list'),
|
||||
name: 'UserStudentPageList',
|
||||
meta: { title: 'Recruiter List', noCache: true }
|
||||
meta: { title: '学生列表', noCache: true }
|
||||
},
|
||||
{
|
||||
path: 'student/edit',
|
||||
component: () => import('@/views/user/student/edit'),
|
||||
name: 'UserStudentEdit',
|
||||
meta: { title: 'Recruiter edit', noCache: true, activeMenu: '/user/student/list' },
|
||||
meta: { title: '学生编辑', noCache: true, activeMenu: '/user/student/list' },
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'admin/list',
|
||||
component: () => import('@/views/user/admin/list'),
|
||||
name: 'UserAdminPageList',
|
||||
meta: { title: 'Admin List', noCache: true }
|
||||
meta: { title: '管理员列表', noCache: true }
|
||||
},
|
||||
{
|
||||
path: 'admin/edit',
|
||||
component: () => import('@/views/user/admin/edit'),
|
||||
name: 'UserAdminEdit',
|
||||
meta: { title: 'Admin edit', noCache: true, activeMenu: '/user/admin/list' },
|
||||
meta: { title: '管理员编辑', noCache: true, activeMenu: '/user/admin/list' },
|
||||
hidden: true
|
||||
}
|
||||
]
|
||||
@ -78,7 +78,7 @@ const constantRoutes = [
|
||||
component: Layout,
|
||||
name: 'ExamPage',
|
||||
meta: {
|
||||
title: 'Paper management',
|
||||
title: '卷题管理',
|
||||
icon: 'exam'
|
||||
},
|
||||
children: [
|
||||
@ -86,8 +86,7 @@ const constantRoutes = [
|
||||
path: 'paper/list',
|
||||
component: () => import('@/views/exam/paper/list'),
|
||||
name: 'ExamPaperPageList',
|
||||
meta: { title: '试卷列表', noCache: true },
|
||||
hidden: true
|
||||
meta: { title: '试卷列表', noCache: true }
|
||||
},
|
||||
{
|
||||
path: 'paper/edit',
|
||||
@ -100,7 +99,7 @@ const constantRoutes = [
|
||||
path: 'question/list',
|
||||
component: () => import('@/views/exam/question/list'),
|
||||
name: 'ExamQuestionPageList',
|
||||
meta: { title: 'Question List', noCache: true }
|
||||
meta: { title: '题目列表', noCache: true }
|
||||
},
|
||||
{
|
||||
path: 'question/edit/singleChoice',
|
||||
@ -134,103 +133,90 @@ const constantRoutes = [
|
||||
path: 'question/edit/shortAnswer',
|
||||
component: () => import('@/views/exam/question/edit/short-answer'),
|
||||
name: 'shortAnswerPage',
|
||||
meta: { title: 'Question edit', noCache: true, activeMenu: '/exam/question/list' },
|
||||
meta: { title: '简答题编辑', noCache: true, activeMenu: '/exam/question/list' },
|
||||
hidden: true
|
||||
}
|
||||
]
|
||||
},
|
||||
// {
|
||||
// path: '/task',
|
||||
// component: Layout,
|
||||
// name: 'TaskPage',
|
||||
// meta: {
|
||||
// title: '任务管理',
|
||||
// icon: 'task'
|
||||
// },
|
||||
// alwaysShow: true,
|
||||
// children: [
|
||||
// {
|
||||
// path: 'list',
|
||||
// component: () => import('@/views/task/list'),
|
||||
// name: 'TaskListPage',
|
||||
// meta: { title: '任务列表', noCache: true }
|
||||
// },
|
||||
// {
|
||||
// path: 'edit',
|
||||
// component: () => import('@/views/task/edit'),
|
||||
// name: 'TaskEditPage',
|
||||
// meta: { title: '任务创建', noCache: true }
|
||||
// }
|
||||
// ]
|
||||
// },
|
||||
{
|
||||
path: '/task',
|
||||
component: Layout,
|
||||
name: 'TaskPage',
|
||||
meta: {
|
||||
title: '任务管理',
|
||||
icon: 'task'
|
||||
},
|
||||
alwaysShow: true,
|
||||
children: [
|
||||
{
|
||||
path: 'list',
|
||||
component: () => import('@/views/task/list'),
|
||||
name: 'TaskListPage',
|
||||
meta: { title: '任务列表', noCache: true }
|
||||
},
|
||||
{
|
||||
path: 'edit',
|
||||
component: () => import('@/views/task/edit'),
|
||||
name: 'TaskEditPage',
|
||||
meta: { title: '任务创建', noCache: true }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/education',
|
||||
component: Layout,
|
||||
name: 'EducationPage',
|
||||
meta: {
|
||||
title: 'Configuration',
|
||||
title: '教育管理',
|
||||
icon: 'education'
|
||||
},
|
||||
alwaysShow: true,
|
||||
children: [
|
||||
{
|
||||
path: 'industry/list',
|
||||
component: () => import('@/views/education/industry/list'),
|
||||
name: 'EducationIndustryPage',
|
||||
meta: { title: 'Industry', noCache: true }
|
||||
},
|
||||
{
|
||||
path: 'industry/edit',
|
||||
component: () => import('@/views/education/industry/edit'),
|
||||
name: 'EducationIndustryEditPage',
|
||||
meta: { title: 'Industry edit', noCache: true, activeMenu: '/education/industry/list' },
|
||||
hidden: true
|
||||
},
|
||||
{
|
||||
path: 'subject/list',
|
||||
component: () => import('@/views/education/subject/list'),
|
||||
name: 'EducationSubjectPage',
|
||||
meta: { title: 'Skill', noCache: true }
|
||||
meta: { title: '学科列表', noCache: true }
|
||||
},
|
||||
{
|
||||
path: 'subject/edit',
|
||||
component: () => import('@/views/education/subject/edit'),
|
||||
name: 'EducationSubjectEditPage',
|
||||
meta: { title: 'Skill edit', noCache: true, activeMenu: '/education/subject/list' },
|
||||
meta: { title: '学科编辑', noCache: true, activeMenu: '/education/subject/list' },
|
||||
hidden: true
|
||||
}
|
||||
]
|
||||
},
|
||||
// {
|
||||
// path: '/message',
|
||||
// component: Layout,
|
||||
// name: 'MessagePage',
|
||||
// meta: {
|
||||
// title: '消息中心',
|
||||
// icon: 'message'
|
||||
// },
|
||||
// alwaysShow: true,
|
||||
// children: [
|
||||
// {
|
||||
// path: 'list',
|
||||
// component: () => import('@/views/message/list'),
|
||||
// name: 'MessageListPage',
|
||||
// meta: { title: '消息列表', noCache: true }
|
||||
// },
|
||||
// {
|
||||
// path: 'send',
|
||||
// component: () => import('@/views/message/send'),
|
||||
// name: 'MessageSendPage',
|
||||
// meta: { title: '消息发送', noCache: true }
|
||||
// }
|
||||
// ]
|
||||
// },
|
||||
{
|
||||
path: '/message',
|
||||
component: Layout,
|
||||
name: 'MessagePage',
|
||||
meta: {
|
||||
title: '消息中心',
|
||||
icon: 'message'
|
||||
},
|
||||
alwaysShow: true,
|
||||
children: [
|
||||
{
|
||||
path: 'list',
|
||||
component: () => import('@/views/message/list'),
|
||||
name: 'MessageListPage',
|
||||
meta: { title: '消息列表', noCache: true }
|
||||
},
|
||||
{
|
||||
path: 'send',
|
||||
component: () => import('@/views/message/send'),
|
||||
name: 'MessageSendPage',
|
||||
meta: { title: '消息发送', noCache: true }
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
path: '/log',
|
||||
component: Layout,
|
||||
name: 'LogPage',
|
||||
meta: {
|
||||
title: 'Activity Logs',
|
||||
title: '日志中心',
|
||||
icon: 'log'
|
||||
},
|
||||
alwaysShow: true,
|
||||
@ -239,7 +225,7 @@ const constantRoutes = [
|
||||
path: 'user/list',
|
||||
component: () => import('@/views/log/list'),
|
||||
name: 'LogUserPage',
|
||||
meta: { title: 'User Activities', noCache: true }
|
||||
meta: { title: '用户日志', noCache: true }
|
||||
}
|
||||
]
|
||||
},
|
||||
|
@ -1,14 +1,14 @@
|
||||
// initial state
|
||||
const state = {
|
||||
user: {
|
||||
sexEnum: [{ key: 1, value: 'Male' }, { key: 2, value: 'Female' }],
|
||||
statusEnum: [{ key: 1, value: 'Enabled' }, { key: 2, value: 'Disable' }],
|
||||
sexEnum: [{ key: 1, value: '男' }, { key: 2, value: '女' }],
|
||||
statusEnum: [{ key: 1, value: '启用' }, { key: 2, value: '禁用' }],
|
||||
levelEnum: [{ key: 1, value: '一年级' }, { key: 2, value: '二年级' }, { key: 3, value: '三年级' }, { key: 4, value: '四年级' }, { key: 5, value: '五年级' }, { key: 6, value: '六年级' },
|
||||
{ key: 7, value: '初一' }, { key: 8, value: '初二' }, { key: 9, value: '初三' },
|
||||
{ key: 10, value: '高一' }, { key: 11, value: '高二' }, { key: 12, value: '高三' }],
|
||||
roleEnum: [{ key: 1, value: '学生' }, { key: 2, value: '教师' }, { key: 3, value: '管理员' }],
|
||||
statusTag: [{ key: 1, value: 'success' }, { key: 2, value: 'danger' }],
|
||||
statusBtn: [{ key: 1, value: 'Disable' }, { key: 2, value: 'Enabled' }]
|
||||
statusBtn: [{ key: 1, value: '禁用' }, { key: 2, value: '启用' }]
|
||||
},
|
||||
exam: {
|
||||
examPaper: {
|
||||
@ -18,7 +18,7 @@ const state = {
|
||||
typeEnum: [{ key: 1, value: '单选题' }, { key: 2, value: '多选题' }, { key: 3, value: '判断题' }, { key: 4, value: '填空题' }, { key: 5, value: '简答题' }],
|
||||
editUrlEnum: [{ key: 1, value: '/exam/question/edit/singleChoice', name: '单选题' },
|
||||
{ key: 2, value: '/exam/question/edit/multipleChoice', name: '多选题' },
|
||||
{ key: 3, value: '/exam/question/edit/trueFaltagsViewse', name: '判断题' },
|
||||
{ key: 3, value: '/exam/question/edit/trueFalse', name: '判断题' },
|
||||
{ key: 4, value: '/exam/question/edit/gapFilling', name: '填空题' },
|
||||
{ key: 5, value: '/exam/question/edit/shortAnswer', name: '简答题' }]
|
||||
}
|
||||
@ -33,9 +33,7 @@ const getters = {
|
||||
}
|
||||
|
||||
// actions
|
||||
const actions = {
|
||||
|
||||
}
|
||||
const actions = {}
|
||||
|
||||
// mutations
|
||||
const mutations = {}
|
||||
|
@ -6,7 +6,7 @@ const request = function (loadtip, query) {
|
||||
if (loadtip) {
|
||||
loading = vue.prototype.$loading({
|
||||
lock: false,
|
||||
text: 'Loading…',
|
||||
text: '正在加载中…',
|
||||
spinner: 'el-icon-loading',
|
||||
background: 'rgba(0, 0, 0, 0.5)'
|
||||
})
|
||||
|
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div class="dashboard-container">
|
||||
<el-row :gutter="40" class="panel-group">
|
||||
<!--<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
|
||||
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
|
||||
<div class="card-panel">
|
||||
<div class="card-panel-icon-wrapper icon-people">
|
||||
<svg-icon icon-class="exam" class-name="card-panel-icon"/>
|
||||
@ -13,7 +13,7 @@
|
||||
<count-to :start-val="0" :end-val="examPaperCount" :duration="2600" class="card-panel-num" v-loading="loading"/>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>-->
|
||||
</el-col>
|
||||
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
|
||||
<div class="card-panel" >
|
||||
<div class="card-panel-icon-wrapper icon-message">
|
||||
@ -21,13 +21,12 @@
|
||||
</div>
|
||||
<div class="card-panel-description">
|
||||
<div class="card-panel-text">
|
||||
Question Count
|
||||
题目总数
|
||||
</div>
|
||||
<count-to :start-val="0" :end-val="questionCount" :duration="3000" class="card-panel-num" v-loading="loading"/>
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
<!--
|
||||
<el-col :xs="12" :sm="12" :lg="6" class="card-panel-col">
|
||||
<div class="card-panel">
|
||||
<div class="card-panel-icon-wrapper icon-shopping">
|
||||
@ -54,7 +53,6 @@
|
||||
</div>
|
||||
</div>
|
||||
</el-col>
|
||||
-->
|
||||
</el-row>
|
||||
<el-row class="echarts-line">
|
||||
<div id="echarts-moth-user" style="width: 100%;height:400px;" v-loading="loading"/>
|
||||
@ -98,8 +96,8 @@ export default {
|
||||
_this.questionCount = response.questionCount
|
||||
_this.doExamPaperCount = response.doExamPaperCount
|
||||
_this.doQuestionCount = response.doQuestionCount
|
||||
_this.echartsUserAction.setOption(this.option('User Activity', '{b}day{c}°', response.mothDayText, response.mothDayUserActionValue))
|
||||
_this.echartsQuestion.setOption(this.option('Monthly Question Count', '{b}day{c}topic', response.mothDayText, response.mothDayDoExamQuestionValue))
|
||||
_this.echartsUserAction.setOption(this.option('用户活跃度', '{b}日{c}度', response.mothDayText, response.mothDayUserActionValue))
|
||||
_this.echartsQuestion.setOption(this.option('题目月数量', '{b}日{c}题', response.mothDayText, response.mothDayDoExamQuestionValue))
|
||||
this.loading = false
|
||||
})
|
||||
},
|
||||
|
@ -1,87 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
|
||||
<el-form :model="form" ref="form" label-width="100px" v-loading="formLoading">
|
||||
<el-form-item label="Industry:" required>
|
||||
<el-input v-model="form.name"></el-input>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="年级:" required>
|
||||
<el-select v-model="form.level" placeholder="年级">
|
||||
<el-option v-for="item in levelEnum" :key="item.key" :value="item.key" :label="item.value"></el-option>
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="submitForm">Submit</el-button>
|
||||
<el-button @click="resetForm">Reset</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters, mapState, mapActions } from 'vuex'
|
||||
import industryApi from '@/api/industry'
|
||||
|
||||
export default {
|
||||
data () {
|
||||
return {
|
||||
form: {
|
||||
id: null,
|
||||
name: '',
|
||||
level: 1,
|
||||
levelName: ''
|
||||
},
|
||||
formLoading: false
|
||||
}
|
||||
},
|
||||
created () {
|
||||
let id = this.$route.query.id
|
||||
let _this = this
|
||||
if (id && parseInt(id) !== 0) {
|
||||
_this.formLoading = true
|
||||
industryApi.select(id).then(re => {
|
||||
_this.form = re.response
|
||||
_this.formLoading = false
|
||||
})
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
submitForm () {
|
||||
let _this = this
|
||||
this.formLoading = true
|
||||
this.form.levelName = this.enumFormat(this.levelEnum, this.form.level)
|
||||
industryApi.edit(this.form).then(data => {
|
||||
if (data.code === 1) {
|
||||
_this.$message.success(data.message)
|
||||
_this.delCurrentView(_this).then(() => {
|
||||
_this.$router.push('/education/industry/list')
|
||||
})
|
||||
} else {
|
||||
_this.$message.error(data.message)
|
||||
_this.formLoading = false
|
||||
}
|
||||
}).catch(e => {
|
||||
_this.formLoading = false
|
||||
})
|
||||
},
|
||||
resetForm () {
|
||||
this.$refs['form'].resetFields()
|
||||
this.form = {
|
||||
id: null,
|
||||
name: '',
|
||||
level: 1,
|
||||
levelName: ''
|
||||
}
|
||||
},
|
||||
...mapActions('tagsView', { delCurrentView: 'delCurrentView' })
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('enumItem', [
|
||||
'enumFormat'
|
||||
]),
|
||||
...mapState('enumItem', {
|
||||
levelEnum: state => state.user.levelEnum
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
@ -1,92 +0,0 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParam" ref="queryForm" :inline="true">
|
||||
<!--<el-form-item label="年级:">
|
||||
<el-select v-model="queryParam.level" placeholder="年级" clearable="">
|
||||
<el-option v-for="item in levelEnum" :key="item.key" :value="item.key" :label="item.value"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>-->
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="submitForm">Search</el-button>
|
||||
<router-link :to="{path:'/education/industry/edit'}" class="link-left">
|
||||
<el-button type="primary">Add</el-button>
|
||||
</router-link>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table v-loading="listLoading" :data="tableData" border fit highlight-current-row style="width: 100%">
|
||||
<el-table-column prop="id" label="ID" />
|
||||
<el-table-column prop="name" label="Industry"/>
|
||||
<el-table-column width="220px" label="Operation" align="center">
|
||||
<template slot-scope="{row}">
|
||||
<router-link :to="{path:'/education/industry/edit', query:{id:row.id}}" class="link-left">
|
||||
<el-button size="mini">Edit</el-button>
|
||||
</router-link>
|
||||
<el-button size="mini" type="danger" @click="delSubject(row)" class="link-left">Delete</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<pagination v-show="total>0" :total="total" :page.sync="queryParam.pageIndex" :limit.sync="queryParam.pageSize"
|
||||
@pagination="search"/>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { mapGetters, mapState } from 'vuex'
|
||||
import Pagination from '@/components/Pagination'
|
||||
import industryApi from '@/api/industry'
|
||||
|
||||
export default {
|
||||
components: { Pagination },
|
||||
data () {
|
||||
return {
|
||||
queryParam: {
|
||||
level: null,
|
||||
pageIndex: 1,
|
||||
pageSize: 10
|
||||
},
|
||||
listLoading: true,
|
||||
tableData: [],
|
||||
total: 0
|
||||
}
|
||||
},
|
||||
created () {
|
||||
this.search()
|
||||
},
|
||||
methods: {
|
||||
search () {
|
||||
this.listLoading = true
|
||||
industryApi.pageList(this.queryParam).then(data => {
|
||||
const re = data.response
|
||||
this.tableData = re.list
|
||||
this.total = re.total
|
||||
this.queryParam.pageIndex = re.pageNum
|
||||
this.listLoading = false
|
||||
})
|
||||
},
|
||||
submitForm () {
|
||||
this.queryParam.pageIndex = 1
|
||||
this.search()
|
||||
},
|
||||
delSubject (row) {
|
||||
let _this = this
|
||||
industryApi.deleteSubject(row.id).then(re => {
|
||||
if (re.code === 1) {
|
||||
_this.search()
|
||||
_this.$message.success(re.message)
|
||||
} else {
|
||||
_this.$message.error(re.message)
|
||||
}
|
||||
})
|
||||
}
|
||||
},
|
||||
computed: {
|
||||
...mapGetters('enumItem', [
|
||||
'enumFormat'
|
||||
]),
|
||||
...mapState('enumItem', {
|
||||
levelEnum: state => state.user.levelEnum
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
@ -2,17 +2,17 @@
|
||||
<div class="app-container">
|
||||
|
||||
<el-form :model="form" ref="form" label-width="100px" v-loading="formLoading">
|
||||
<el-form-item label="Skill:" required>
|
||||
<el-form-item label="学科:" required>
|
||||
<el-input v-model="form.name"></el-input>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="年级:" required>
|
||||
<el-form-item label="年级:" required>
|
||||
<el-select v-model="form.level" placeholder="年级">
|
||||
<el-option v-for="item in levelEnum" :key="item.key" :value="item.key" :label="item.value"></el-option>
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="submitForm">Submit</el-button>
|
||||
<el-button @click="resetForm">Reset</el-button>
|
||||
<el-button type="primary" @click="submitForm">提交</el-button>
|
||||
<el-button @click="resetForm">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
|
@ -1,30 +1,29 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParam" ref="queryForm" :inline="true">
|
||||
<!--<el-form-item label="年级:">
|
||||
<el-form-item label="年级:">
|
||||
<el-select v-model="queryParam.level" placeholder="年级" clearable="">
|
||||
<el-option v-for="item in levelEnum" :key="item.key" :value="item.key" :label="item.value"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>-->
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="submitForm">Search</el-button>
|
||||
<el-button type="primary" @click="submitForm">查询</el-button>
|
||||
<router-link :to="{path:'/education/subject/edit'}" class="link-left">
|
||||
<el-button type="primary">Add</el-button>
|
||||
<el-button type="primary">添加</el-button>
|
||||
</router-link>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table v-loading="listLoading" :data="tableData" border fit highlight-current-row style="width: 100%">
|
||||
<el-table-column prop="id" label="ID" />
|
||||
<el-table-column prop="name" label="Skill"/>
|
||||
<!-- <el-table-column prop="industry" label="industry"/> -->
|
||||
<!-- <el-table-column prop="levelName" label="年级" /> -->
|
||||
<el-table-column width="220px" label="Operation" align="center">
|
||||
<el-table-column prop="id" label="Id" />
|
||||
<el-table-column prop="name" label="学科"/>
|
||||
<el-table-column prop="levelName" label="年级" />
|
||||
<el-table-column width="220px" label="操作" align="center">
|
||||
<template slot-scope="{row}">
|
||||
<router-link :to="{path:'/education/subject/edit', query:{id:row.id}}" class="link-left">
|
||||
<el-button size="mini">Edit</el-button>
|
||||
<el-button size="mini">编辑</el-button>
|
||||
</router-link>
|
||||
<el-button size="mini" type="danger" @click="delSubject(row)" class="link-left">Delete</el-button>
|
||||
<el-button size="mini" type="danger" @click="delSubject(row)" class="link-left">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -30,9 +30,7 @@
|
||||
<div class="q-title" v-html="question.title"/>
|
||||
</div>
|
||||
<div v-else-if="qType==5" v-loading="qLoading">
|
||||
Question:<div class="q-title" v-html="question.title"/>
|
||||
Answer: <div class="q-title" v-html="question.correct"/>
|
||||
Analysis:<div class="q-title" v-html="question.analyze"/>
|
||||
<div class="q-title" v-html="question.title"/>
|
||||
</div>
|
||||
<div v-else>
|
||||
</div>
|
||||
|
@ -208,6 +208,7 @@ export default {
|
||||
this.questionShow.question = this.form
|
||||
},
|
||||
resetForm () {
|
||||
let lastId = this.form.id
|
||||
this.$refs['form'].resetFields()
|
||||
this.form = {
|
||||
id: null,
|
||||
@ -222,6 +223,7 @@ export default {
|
||||
score: '',
|
||||
difficult: 0
|
||||
}
|
||||
this.form.id = lastId
|
||||
},
|
||||
...mapActions('exam', { initSubject: 'initSubject' }),
|
||||
...mapActions('tagsView', { delCurrentView: 'delCurrentView' })
|
||||
|
@ -195,6 +195,7 @@ export default {
|
||||
this.questionShow.question = this.form
|
||||
},
|
||||
resetForm () {
|
||||
let lastId = this.form.id
|
||||
this.$refs['form'].resetFields()
|
||||
this.form = {
|
||||
id: null,
|
||||
@ -214,6 +215,7 @@ export default {
|
||||
score: '',
|
||||
difficult: 0
|
||||
}
|
||||
this.form.id = lastId
|
||||
},
|
||||
...mapActions('exam', { initSubject: 'initSubject' }),
|
||||
...mapActions('tagsView', { delCurrentView: 'delCurrentView' })
|
||||
|
@ -1,42 +1,42 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="form" ref="form" label-width="100px" v-loading="formLoading" :rules="rules">
|
||||
<el-form-item label="Industry:" prop="industryId" required>
|
||||
<el-select v-model="form.industryId" placeholder="Industry" @change="levelChange">
|
||||
<el-option v-for="item in industryFilter" :key="item.id" :value="item.id" :label="item.name"></el-option>
|
||||
<el-form-item label="年级:" prop="gradeLevel" required>
|
||||
<el-select v-model="form.gradeLevel" placeholder="年级" @change="levelChange">
|
||||
<el-option v-for="item in levelEnum" :key="item.key" :value="item.key" :label="item.value"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="Skill:" prop="skillId" required>
|
||||
<el-select v-model="form.skillId" placeholder="Skill" >
|
||||
<el-option v-for="item in subjectFilter" :key="item.id" :value="item.id" :label="item.name"></el-option>
|
||||
<el-form-item label="学科:" prop="subjectId" required>
|
||||
<el-select v-model="form.subjectId" placeholder="学科" >
|
||||
<el-option v-for="item in subjectFilter" :key="item.id" :value="item.id" :label="item.name+' ( '+item.levelName+' )'"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="Question:" prop="title" required>
|
||||
<el-form-item label="题干:" prop="title" required>
|
||||
<el-input v-model="form.title" @focus="inputClick(form,'title')" />
|
||||
</el-form-item>
|
||||
<el-form-item label="Answer:" prop="correct" required>
|
||||
<el-form-item label="答案:" prop="correct" required>
|
||||
<el-input v-model="form.correct" @focus="inputClick(form,'correct')" />
|
||||
</el-form-item>
|
||||
<el-form-item label="Analysis:" prop="analyze" required>
|
||||
<el-form-item label="解析:" prop="analyze" required>
|
||||
<el-input v-model="form.analyze" @focus="inputClick(form,'analyze')" />
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="分数:" prop="score" required>
|
||||
<el-form-item label="分数:" prop="score" required>
|
||||
<el-input-number v-model="form.score" :precision="1" :step="1" :max="100"></el-input-number>
|
||||
</el-form-item> -->
|
||||
<el-form-item label="Difficulty:" required>
|
||||
</el-form-item>
|
||||
<el-form-item label="难度:" required>
|
||||
<el-rate v-model="form.difficult" class="question-item-rate"></el-rate>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="submitForm">Submit</el-button>
|
||||
<el-button @click="resetForm">Reset</el-button>
|
||||
<el-button type="success" @click="showQuestion">Preview</el-button>
|
||||
<el-button type="primary" @click="submitForm">提交</el-button>
|
||||
<el-button @click="resetForm">重置</el-button>
|
||||
<el-button type="success" @click="showQuestion">预览</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-dialog :visible.sync="richEditor.dialogVisible" append-to-body :close-on-click-modal="false" style="width: 100%;height: 100%" :show-close="false" center>
|
||||
<Ueditor @ready="editorReady"/>
|
||||
<span slot="footer" class="dialog-footer">
|
||||
<el-button type="primary" @click="editorConfirm">Confirm</el-button>
|
||||
<el-button @click="richEditor.dialogVisible = false">Cancel</el-button>
|
||||
<el-button type="primary" @click="editorConfirm">确 定</el-button>
|
||||
<el-button @click="richEditor.dialogVisible = false">取 消</el-button>
|
||||
</span>
|
||||
</el-dialog>
|
||||
<el-dialog :visible.sync="questionShow.dialog" style="width: 100%;height: 100%">
|
||||
@ -50,7 +50,6 @@ import QuestionShow from '../components/Show'
|
||||
import Ueditor from '@/components/Ueditor'
|
||||
import { mapGetters, mapState, mapActions } from 'vuex'
|
||||
import questionApi from '@/api/question'
|
||||
import industryApi from '@/api/industry'
|
||||
|
||||
export default {
|
||||
components: {
|
||||
@ -61,36 +60,35 @@ export default {
|
||||
form: {
|
||||
id: null,
|
||||
questionType: 5,
|
||||
industryId: null,
|
||||
skillId: null,
|
||||
gradeLevel: null,
|
||||
subjectId: null,
|
||||
title: '',
|
||||
items: [],
|
||||
analyze: '',
|
||||
correct: '',
|
||||
score: '0',
|
||||
score: '',
|
||||
difficult: 0
|
||||
},
|
||||
subjectFilter: null,
|
||||
industryFilter: null,
|
||||
formLoading: false,
|
||||
rules: {
|
||||
gradeLevel: [
|
||||
{ required: true, message: 'Please select grade', trigger: 'change' }
|
||||
{ required: true, message: '请选择年级', trigger: 'change' }
|
||||
],
|
||||
subjectId: [
|
||||
{ required: true, message: 'Please select subject', trigger: 'change' }
|
||||
{ required: true, message: '请选择学科', trigger: 'change' }
|
||||
],
|
||||
title: [
|
||||
{ required: true, message: 'Please enter the question', trigger: 'blur' }
|
||||
{ required: true, message: '请输入题干', trigger: 'blur' }
|
||||
],
|
||||
correct: [
|
||||
{ required: true, message: 'Please enter the answer', trigger: 'blur' }
|
||||
{ required: true, message: '请输入答案', trigger: 'blur' }
|
||||
],
|
||||
analyze: [
|
||||
{ required: true, message: 'Please enter parse', trigger: 'blur' }
|
||||
{ required: true, message: '请输入解析', trigger: 'blur' }
|
||||
],
|
||||
score: [
|
||||
{ required: true, message: 'Please enter the score', trigger: 'blur' }
|
||||
{ required: true, message: '请输入分数', trigger: 'blur' }
|
||||
]
|
||||
},
|
||||
richEditor: {
|
||||
@ -113,7 +111,6 @@ export default {
|
||||
this.initSubject(function () {
|
||||
_this.subjectFilter = _this.subjects
|
||||
})
|
||||
this.subjectFilter = this.subjects.filter(data => data.level === this.form.gradeLevel)
|
||||
if (id && parseInt(id) !== 0) {
|
||||
_this.formLoading = true
|
||||
questionApi.select(id).then(re => {
|
||||
@ -121,10 +118,6 @@ export default {
|
||||
_this.formLoading = false
|
||||
})
|
||||
}
|
||||
industryApi.list().then(re => {
|
||||
this.industryFilter=re.response;
|
||||
})
|
||||
|
||||
},
|
||||
methods: {
|
||||
editorReady (instance) {
|
||||
@ -168,6 +161,7 @@ export default {
|
||||
})
|
||||
},
|
||||
resetForm () {
|
||||
let lastId = this.form.id
|
||||
this.$refs['form'].resetFields()
|
||||
this.form = {
|
||||
id: null,
|
||||
@ -178,15 +172,14 @@ export default {
|
||||
items: [],
|
||||
analyze: '',
|
||||
correct: '',
|
||||
score: '0',
|
||||
score: '',
|
||||
difficult: 0
|
||||
}
|
||||
this.form.id = lastId
|
||||
},
|
||||
levelChange () {
|
||||
this.form.subjectId = null
|
||||
//this.subjectFilter = this.subjects.filter(data => data.level === this.form.gradeLevel)
|
||||
console.log(this.subjectFilter);
|
||||
|
||||
this.subjectFilter = this.subjects.filter(data => data.level === this.form.gradeLevel)
|
||||
},
|
||||
showQuestion () {
|
||||
this.questionShow.dialog = true
|
||||
|
@ -1,49 +1,48 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParam" ref="queryForm" :inline="true">
|
||||
<el-form-item label="Question ID:">
|
||||
<el-form-item label="题目ID:">
|
||||
<el-input v-model="queryParam.id" clearable></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="Industry:">
|
||||
<el-select v-model="queryParam.industry" placeholder="Industry" @change="levelChange" clearable>
|
||||
<el-option v-for="item in industryFilter" :key="item.id" :value="item.id" :label="item.name"></el-option>
|
||||
<el-form-item label="年级:">
|
||||
<el-select v-model="queryParam.level" placeholder="年级" @change="levelChange" clearable>
|
||||
<el-option v-for="item in levelEnum" :key="item.key" :value="item.key" :label="item.value"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="Skill:">
|
||||
<el-select v-model="queryParam.skill" clearable placeholder="Skill">
|
||||
<el-form-item label="学科:">
|
||||
<el-select v-model="queryParam.subjectId" clearable>
|
||||
<el-option v-for="item in subjectFilter" :key="item.id" :value="item.id"
|
||||
:label="item.name"></el-option>
|
||||
:label="item.name+' ( '+item.levelName+' )'"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<!-- <el-form-item label="题型:">
|
||||
<el-form-item label="题型:">
|
||||
<el-select v-model="queryParam.questionType" clearable>
|
||||
<el-option v-for="item in questionType" :key="item.key" :value="item.key" :label="item.value"></el-option>
|
||||
</el-select>
|
||||
</el-form-item> -->
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="submitForm">Search</el-button>
|
||||
<el-button type="primary" @click="submitForm">查询</el-button>
|
||||
<el-popover placement="bottom" trigger="click">
|
||||
<!--<el-button type="warning" size="mini" v-for="item in editUrlEnum" :key="item.key"
|
||||
<el-button type="warning" size="mini" v-for="item in editUrlEnum" :key="item.key"
|
||||
@click="$router.push({path:item.value})">{{item.name}}
|
||||
</el-button> -->
|
||||
<el-button slot="reference" type="primary" class="link-left" @click="$router.push('/exam/question/edit/shortAnswer')">Add</el-button>
|
||||
</el-button>
|
||||
<el-button slot="reference" type="primary" class="link-left">添加</el-button>
|
||||
</el-popover>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<el-table v-loading="listLoading" :data="tableData" border fit highlight-current-row style="width: 100%">
|
||||
<el-table-column prop="id" label="ID" width="90px"/>
|
||||
<el-table-column prop="industryName" label="Industry" width="120px"/>
|
||||
<el-table-column prop="skillName" label="Skill" width="120px"/>
|
||||
<!-- <el-table-column prop="questionType" label="题型" :formatter="questionTypeFormatter" width="70px"/> -->
|
||||
<el-table-column prop="shortTitle" label="Question" show-overflow-tooltip/>
|
||||
<!-- <el-table-column prop="score" label="分数" width="60px"/> -->
|
||||
<el-table-column prop="difficult" label="Difficulty" width="100px"/>
|
||||
<el-table-column prop="createTime" label="Create Time" width="160px"/>
|
||||
<el-table-column label="Operation" align="center" width="220px">
|
||||
<el-table-column prop="id" label="Id" width="90px"/>
|
||||
<el-table-column prop="subjectId" label="学科" :formatter="subjectFormatter" width="120px"/>
|
||||
<el-table-column prop="questionType" label="题型" :formatter="questionTypeFormatter" width="70px"/>
|
||||
<el-table-column prop="shortTitle" label="题干" show-overflow-tooltip/>
|
||||
<el-table-column prop="score" label="分数" width="60px"/>
|
||||
<el-table-column prop="difficult" label="难度" width="60px"/>
|
||||
<el-table-column prop="createTime" label="创建时间" width="160px"/>
|
||||
<el-table-column label="操作" align="center" width="220px">
|
||||
<template slot-scope="{row}">
|
||||
<el-button size="mini" @click="showQuestion(row)">Preview</el-button>
|
||||
<el-button size="mini" @click="editQuestion(row)">Edit</el-button>
|
||||
<el-button size="mini" type="danger" @click="deleteQuestion(row)" class="link-left">Delete</el-button>
|
||||
<el-button size="mini" @click="showQuestion(row)">预览</el-button>
|
||||
<el-button size="mini" @click="editQuestion(row)">编辑</el-button>
|
||||
<el-button size="mini" type="danger" @click="deleteQuestion(row)" class="link-left">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
@ -60,7 +59,6 @@ import { mapGetters, mapState, mapActions } from 'vuex'
|
||||
import Pagination from '@/components/Pagination'
|
||||
import QuestionShow from './components/Show'
|
||||
import questionApi from '@/api/question'
|
||||
import industryApi from '@/api/industry'
|
||||
|
||||
export default {
|
||||
components: { Pagination, QuestionShow },
|
||||
@ -68,15 +66,14 @@ export default {
|
||||
return {
|
||||
queryParam: {
|
||||
id: null,
|
||||
questionType: '5',
|
||||
skill: null,
|
||||
industry: null,
|
||||
questionType: null,
|
||||
level: null,
|
||||
subjectId: null,
|
||||
pageIndex: 1,
|
||||
pageSize: 10
|
||||
},
|
||||
subjectFilter: null,
|
||||
industryFilter: null,
|
||||
listLoading: false,
|
||||
listLoading: true,
|
||||
tableData: [],
|
||||
total: 0,
|
||||
questionShow: {
|
||||
@ -90,13 +87,6 @@ export default {
|
||||
created () {
|
||||
this.initSubject()
|
||||
this.search()
|
||||
let _this = this
|
||||
this.initSubject(function () {
|
||||
_this.subjectFilter = _this.subjects
|
||||
})
|
||||
industryApi.list().then(re => {
|
||||
this.industryFilter=re.response;
|
||||
})
|
||||
},
|
||||
methods: {
|
||||
submitForm () {
|
||||
|
@ -1,23 +1,23 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParam" ref="queryForm" :inline="true">
|
||||
<el-form-item label="User ID:">
|
||||
<el-form-item label="用户Id:">
|
||||
<el-input v-model="queryParam.userId"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="Username: ">
|
||||
<el-form-item label="用户名:">
|
||||
<el-input v-model="queryParam.userName"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="submitForm">Search</el-button>
|
||||
<el-button type="primary" @click="submitForm">查询</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table v-loading="listLoading" :data="tableData" border fit highlight-current-row style="width: 100%">
|
||||
<el-table-column prop="Id" label="ID" width="100" />
|
||||
<el-table-column prop="userName" label="Username" width="150" />
|
||||
<el-table-column prop="realName" label="Name" width="150" />
|
||||
<el-table-column prop="content" label="Activity" />
|
||||
<el-table-column prop="createTime" label="Create Time" width="160px"/>
|
||||
<el-table-column prop="id" label="Id" width="100" />
|
||||
<el-table-column prop="userName" label="用户名" width="150" />
|
||||
<el-table-column prop="realName" label="真实姓名" width="150" />
|
||||
<el-table-column prop="content" label="动态" />
|
||||
<el-table-column prop="createTime" label="创建时间" width="160px"/>
|
||||
</el-table>
|
||||
<pagination v-show="total>0" :total="total" :page.sync="queryParam.pageIndex" :limit.sync="queryParam.pageSize"
|
||||
@pagination="search"/>
|
||||
|
@ -3,7 +3,7 @@
|
||||
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form" auto-complete="on" label-position="left">
|
||||
|
||||
<div class="title-container">
|
||||
<h3 class="title">TEKSystems Question Bank Admin Portal</h3>
|
||||
<h3 class="title">学之思管理系统</h3>
|
||||
</div>
|
||||
|
||||
<el-form-item prop="userName">
|
||||
@ -13,7 +13,7 @@
|
||||
<el-input
|
||||
ref="userName"
|
||||
v-model="loginForm.userName"
|
||||
placeholder="Username"
|
||||
placeholder="用户名"
|
||||
name="userName"
|
||||
type="text"
|
||||
tabindex="1"
|
||||
@ -31,7 +31,7 @@
|
||||
ref="password"
|
||||
v-model="loginForm.password"
|
||||
:type="passwordType"
|
||||
placeholder="Password"
|
||||
placeholder="密码"
|
||||
name="password"
|
||||
tabindex="2"
|
||||
auto-complete="on"
|
||||
@ -45,14 +45,14 @@
|
||||
</el-form-item>
|
||||
</el-tooltip>
|
||||
|
||||
<el-checkbox v-model="loginForm.remember" style="margin-bottom: 20px;margin-left: 5px;">Remember me</el-checkbox>
|
||||
<el-checkbox v-model="loginForm.remember" style="margin-bottom: 20px;margin-left: 5px;">记住密码</el-checkbox>
|
||||
|
||||
<el-button :loading="loading" type="primary" style="width:100%;margin-bottom:30px;" @click.native.prevent="handleLogin">Login</el-button>
|
||||
<el-button :loading="loading" type="primary" style="width:100%;margin-bottom:30px;" @click.native.prevent="handleLogin">登录</el-button>
|
||||
|
||||
</el-form>
|
||||
|
||||
<div class="account-foot-copyright">
|
||||
<span>Copyright © 2020 TEKSystems</span>
|
||||
<span>Copyright © 2020 武汉思维跳跃科技有限公司 版权所有</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
@ -66,14 +66,14 @@ export default {
|
||||
data () {
|
||||
const validateUsername = (rule, value, callback) => {
|
||||
if (value.length < 5) {
|
||||
callback(new Error('The username can not be less than 5 characters.'))
|
||||
callback(new Error('用户名不能少于5个字符'))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
}
|
||||
const validatePassword = (rule, value, callback) => {
|
||||
if (value.length < 5) {
|
||||
callback(new Error('The password must be no less than 5 characters.'))
|
||||
callback(new Error('密码不能少于5个字符'))
|
||||
} else {
|
||||
callback()
|
||||
}
|
||||
|
@ -175,6 +175,7 @@ export default {
|
||||
})
|
||||
},
|
||||
resetForm () {
|
||||
let lastId = this.form.id
|
||||
this.$refs['form'].resetFields()
|
||||
this.form = {
|
||||
id: null,
|
||||
@ -182,6 +183,7 @@ export default {
|
||||
title: '',
|
||||
paperItems: []
|
||||
}
|
||||
this.form.id = lastId
|
||||
},
|
||||
subjectFormatter (row, column, cellValue, index) {
|
||||
return this.subjectEnumFormat(cellValue)
|
||||
|
@ -1,38 +1,38 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
|
||||
<el-form :model="form" ref="form" label-width="120px" v-loading="formLoading" :rules="rules">
|
||||
<el-form-item label="User name:" prop="userName" required>
|
||||
<el-form :model="form" ref="form" label-width="100px" v-loading="formLoading" :rules="rules">
|
||||
<el-form-item label="用户名:" prop="userName" required>
|
||||
<el-input v-model="form.userName"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="Password:" required>
|
||||
<el-form-item label="密码:" required>
|
||||
<el-input v-model="form.password"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="Name: " prop="realName" required>
|
||||
<el-form-item label="真实姓名:" prop="realName" required>
|
||||
<el-input v-model="form.realName"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="Age:">
|
||||
<el-form-item label="年龄:">
|
||||
<el-input v-model="form.age"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="gender:">
|
||||
<el-select v-model="form.sex" placeholder="Gender" clearable>
|
||||
<el-form-item label="性别:">
|
||||
<el-select v-model="form.sex" placeholder="性别" clearable>
|
||||
<el-option v-for="item in sexEnum" :key="item.key" :value="item.key" :label="item.value"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="BirthDay:">
|
||||
<el-date-picker v-model="form.birthDay" value-format="yyyy-MM-dd" type="date" placeholder="Option date"/>
|
||||
<el-form-item label="出生日期:">
|
||||
<el-date-picker v-model="form.birthDay" value-format="yyyy-MM-dd" type="date" placeholder="选择日期"/>
|
||||
</el-form-item>
|
||||
<el-form-item label="Phone:">
|
||||
<el-form-item label="手机:">
|
||||
<el-input v-model="form.phone"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="Status:" required>
|
||||
<el-select v-model="form.status" placeholder="Status">
|
||||
<el-form-item label="状态:" required>
|
||||
<el-select v-model="form.status" placeholder="状态">
|
||||
<el-option v-for="item in statusEnum" :key="item.key" :value="item.key" :label="item.value"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="submitForm">Submit</el-button>
|
||||
<el-button @click="resetForm">Reset</el-button>
|
||||
<el-button type="primary" @click="submitForm">提交</el-button>
|
||||
<el-button @click="resetForm">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
@ -60,10 +60,10 @@ export default {
|
||||
formLoading: false,
|
||||
rules: {
|
||||
userName: [
|
||||
{ required: true, message: 'Please enter the user name', trigger: 'blur' }
|
||||
{ required: true, message: '请输入用户名', trigger: 'blur' }
|
||||
],
|
||||
realName: [
|
||||
{ required: true, message: 'Please enter your real name', trigger: 'blur' }
|
||||
{ required: true, message: '请输入真实姓名', trigger: 'blur' }
|
||||
]
|
||||
}
|
||||
}
|
||||
@ -118,7 +118,7 @@ export default {
|
||||
birthDay: null,
|
||||
phone: null
|
||||
}
|
||||
this.form = lastId
|
||||
this.form.id = lastId
|
||||
},
|
||||
...mapActions('tagsView', { delCurrentView: 'delCurrentView' })
|
||||
},
|
||||
|
@ -1,40 +1,40 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParam" ref="queryForm" :inline="true">
|
||||
<el-form-item label="Username:">
|
||||
<el-form-item label="用户名:">
|
||||
<el-input v-model="queryParam.userName"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="submitForm">Search</el-button>
|
||||
<el-button type="primary" @click="submitForm">查询</el-button>
|
||||
<router-link :to="{path:'/user/admin/edit'}" class="link-left">
|
||||
<el-button type="primary">Add</el-button>
|
||||
<el-button type="primary">添加</el-button>
|
||||
</router-link>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table v-loading="listLoading" :data="tableData" border fit highlight-current-row style="width: 100%">
|
||||
<el-table-column prop="id" label="ID" />
|
||||
<el-table-column prop="userName" label="Username"/>
|
||||
<el-table-column prop="realName" label="Name" />
|
||||
<el-table-column prop="sex" label="Gender" width="100px;" :formatter="sexFormatter"/>
|
||||
<el-table-column prop="phone" label="Phone"/>
|
||||
<el-table-column prop="createTime" label="Create Time" width="160px"/>
|
||||
<el-table-column label="Status" prop="status" width="70px">
|
||||
<el-table-column prop="id" label="Id" />
|
||||
<el-table-column prop="userName" label="用户名"/>
|
||||
<el-table-column prop="realName" label="真实姓名" />
|
||||
<el-table-column prop="sex" label="性别" width="60px;" :formatter="sexFormatter"/>
|
||||
<el-table-column prop="phone" label="手机号"/>
|
||||
<el-table-column prop="createTime" label="创建时间" width="160px"/>
|
||||
<el-table-column label="状态" prop="status" width="70px">
|
||||
<template slot-scope="{row}">
|
||||
<el-tag :type="statusTagFormatter(row.status)">
|
||||
{{ statusFormatter(row.status) }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="220px" label="Operation" align="center">
|
||||
<el-table-column width="220px" label="操作" align="center">
|
||||
<template slot-scope="{row}">
|
||||
<el-button size="mini" @click="changeStatus(row)" class="link-left">
|
||||
{{ statusBtnFormatter(row.status) }}
|
||||
</el-button>
|
||||
<router-link :to="{path:'/user/admin/edit', query:{id:row.id}}" class="link-left">
|
||||
<el-button size="mini">Edit</el-button>
|
||||
<el-button size="mini">编辑</el-button>
|
||||
</router-link>
|
||||
<el-button size="mini" type="danger" @click="deleteUser(row)" class="link-left">Delete</el-button>
|
||||
<el-button size="mini" type="danger" @click="deleteUser(row)" class="link-left">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
@ -2,42 +2,42 @@
|
||||
<div class="app-container">
|
||||
|
||||
<el-form :model="form" ref="form" label-width="100px" v-loading="formLoading" :rules="rules">
|
||||
<el-form-item label="Username:" prop="userName" required>
|
||||
<el-form-item label="用户名:" prop="userName" required>
|
||||
<el-input v-model="form.userName"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="Password:" prop="password" required>
|
||||
<el-form-item label="密码:" required>
|
||||
<el-input v-model="form.password"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="Name:" prop="realName" required>
|
||||
<el-form-item label="真实姓名:" prop="realName" required>
|
||||
<el-input v-model="form.realName"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="Age:">
|
||||
<el-form-item label="年龄:">
|
||||
<el-input v-model="form.age"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item label="Gender:">
|
||||
<el-select v-model="form.sex" placeholder="Gender" clearable>
|
||||
<el-form-item label="性别:">
|
||||
<el-select v-model="form.sex" placeholder="性别" clearable>
|
||||
<el-option v-for="item in sexEnum" :key="item.key" :value="item.key" :label="item.value"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item label="Birthday:">
|
||||
<el-date-picker v-model="form.birthDay" type="date" value-format="yyyy-MM-dd" placeholder="Option date" />
|
||||
<el-form-item label="出生日期:">
|
||||
<el-date-picker v-model="form.birthDay" type="date" value-format="yyyy-MM-dd" placeholder="选择日期" />
|
||||
</el-form-item>
|
||||
<el-form-item label="Phone:">
|
||||
<el-form-item label="手机:">
|
||||
<el-input v-model="form.phone"></el-input>
|
||||
</el-form-item>
|
||||
<!--<el-form-item label="年级:" prop="userLevel" required>
|
||||
<el-form-item label="年级:" prop="userLevel" required>
|
||||
<el-select v-model="form.userLevel" placeholder="年级">
|
||||
<el-option v-for="item in levelEnum" :key="item.key" :value="item.key" :label="item.value"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>-->
|
||||
<el-form-item label="Status:" required>
|
||||
<el-select v-model="form.status" placeholder="Status">
|
||||
</el-form-item>
|
||||
<el-form-item label="状态:" required>
|
||||
<el-select v-model="form.status" placeholder="状态">
|
||||
<el-option v-for="item in statusEnum" :key="item.key" :value="item.key" :label="item.value"></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="submitForm">Submit</el-button>
|
||||
<el-button @click="resetForm">Reset</el-button>
|
||||
<el-button type="primary" @click="submitForm">提交</el-button>
|
||||
<el-button @click="resetForm">重置</el-button>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
</div>
|
||||
@ -61,21 +61,18 @@ export default {
|
||||
sex: '',
|
||||
birthDay: null,
|
||||
phone: null,
|
||||
userLevel: '1'
|
||||
userLevel: null
|
||||
},
|
||||
formLoading: false,
|
||||
rules: {
|
||||
userName: [
|
||||
{ required: true, message: 'Please enter a username', trigger: 'blur' }
|
||||
{ required: true, message: '请输入用户名', trigger: 'blur' }
|
||||
],
|
||||
realName: [
|
||||
{ required: true, message: 'Please enter a real name', trigger: 'blur' }
|
||||
{ required: true, message: '请输入真实姓名', trigger: 'blur' }
|
||||
],
|
||||
userLevel: [
|
||||
{ required: true, message: 'Please select grade', trigger: 'change' }
|
||||
],
|
||||
password: [
|
||||
{ required: true, message: 'Please enter a password', trigger: 'blur' }
|
||||
{ required: true, message: '请选择年级', trigger: 'change' }
|
||||
]
|
||||
}
|
||||
}
|
||||
@ -116,6 +113,7 @@ export default {
|
||||
})
|
||||
},
|
||||
resetForm () {
|
||||
let lastId = this.form.id
|
||||
this.$refs['form'].resetFields()
|
||||
this.form = {
|
||||
id: null,
|
||||
@ -128,8 +126,9 @@ export default {
|
||||
sex: '',
|
||||
birthDay: null,
|
||||
phone: null,
|
||||
userLevel: '1'
|
||||
userLevel: null
|
||||
}
|
||||
this.form.id = lastId
|
||||
},
|
||||
...mapActions('tagsView', { delCurrentView: 'delCurrentView' })
|
||||
},
|
||||
|
@ -1,44 +1,44 @@
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :model="queryParam" ref="queryForm" :inline="true">
|
||||
<el-form-item label="Username:">
|
||||
<el-form-item label="用户名:">
|
||||
<el-input v-model="queryParam.userName"></el-input>
|
||||
</el-form-item>
|
||||
<el-form-item>
|
||||
<el-button type="primary" @click="submitForm">Search</el-button>
|
||||
<el-button type="primary" @click="submitForm">查询</el-button>
|
||||
<router-link :to="{path:'/user/student/edit'}" class="link-left">
|
||||
<el-button type="primary">Add</el-button>
|
||||
<el-button type="primary">添加</el-button>
|
||||
</router-link>
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
|
||||
<el-table v-loading="listLoading" :data="tableData" border fit highlight-current-row style="width: 100%">
|
||||
<el-table-column prop="id" label="ID" />
|
||||
<el-table-column prop="userName" label="Username"/>
|
||||
<el-table-column prop="realName" label="Name" />
|
||||
<!--<el-table-column prop="userLevel" label="学级" :formatter="levelFormatter"/>-->
|
||||
<el-table-column prop="sex" label="Gender" width="100px;" :formatter="sexFormatter"/>
|
||||
<el-table-column prop="phone" label="Phone Number"/>
|
||||
<el-table-column prop="createTime" label="Create Time" width="160px"/>
|
||||
<el-table-column label="Status" prop="status" width="70px">
|
||||
<el-table-column prop="id" label="Id" />
|
||||
<el-table-column prop="userName" label="用户名"/>
|
||||
<el-table-column prop="realName" label="真实姓名" />
|
||||
<el-table-column prop="userLevel" label="学级" :formatter="levelFormatter"/>
|
||||
<el-table-column prop="sex" label="性别" width="60px;" :formatter="sexFormatter"/>
|
||||
<el-table-column prop="phone" label="手机号"/>
|
||||
<el-table-column prop="createTime" label="创建时间" width="160px"/>
|
||||
<el-table-column label="状态" prop="status" width="70px">
|
||||
<template slot-scope="{row}">
|
||||
<el-tag :type="statusTagFormatter(row.status)">
|
||||
{{ statusFormatter(row.status) }}
|
||||
</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column width="270px" label="Operation" align="center">
|
||||
<el-table-column width="270px" label="操作" align="center">
|
||||
<template slot-scope="{row}">
|
||||
<el-button size="mini" @click="changeStatus(row)" class="link-left">
|
||||
{{ statusBtnFormatter(row.status) }}
|
||||
</el-button>
|
||||
<router-link :to="{path:'/user/student/edit', query:{id:row.id}}" class="link-left">
|
||||
<el-button size="mini" >Edit</el-button>
|
||||
<el-button size="mini" >编辑</el-button>
|
||||
</router-link>
|
||||
<router-link :to="{path:'/log/user/list', query:{userId:row.id}}" class="link-left">
|
||||
<el-button size="mini" >Logs</el-button>
|
||||
<el-button size="mini" >日志</el-button>
|
||||
</router-link>
|
||||
<el-button size="mini" type="danger" @click="deleteUser(row)" class="link-left">Delete</el-button>
|
||||
<el-button size="mini" type="danger" @click="deleteUser(row)" class="link-left">删除</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
1
source/vue/xzs-student/.gitignore
vendored
1
source/vue/xzs-student/.gitignore
vendored
@ -20,4 +20,3 @@ yarn-error.log*
|
||||
*.njsproj
|
||||
*.sln
|
||||
*.sw?
|
||||
/package-lock.json
|
||||
|
1960
source/vue/xzs-student/package-lock.json
generated
1960
source/vue/xzs-student/package-lock.json
generated
File diff suppressed because it is too large
Load Diff
@ -16,7 +16,7 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"axios": "^0.19.0",
|
||||
"core-js": "^3.8.0",
|
||||
"core-js": "^3.8.2",
|
||||
"element-ui": "^2.14.1",
|
||||
"js-cookie": "2.2.0",
|
||||
"normalize.css": "8.0.1",
|
||||
@ -26,11 +26,11 @@
|
||||
"vuex": "^3.6.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@vue/cli-plugin-babel": "^4.5.9",
|
||||
"@vue/cli-plugin-eslint": "^4.5.9",
|
||||
"@vue/cli-plugin-router": "^4.5.9",
|
||||
"@vue/cli-plugin-vuex": "^4.5.9",
|
||||
"@vue/cli-service": "^4.5.9",
|
||||
"@vue/cli-plugin-babel": "^4.5.10",
|
||||
"@vue/cli-plugin-eslint": "^4.5.10",
|
||||
"@vue/cli-plugin-router": "^4.5.10",
|
||||
"@vue/cli-plugin-vuex": "^4.5.10",
|
||||
"@vue/cli-service": "^4.5.10",
|
||||
"@vue/eslint-config-standard": "^4.0.0",
|
||||
"babel-eslint": "^10.0.3",
|
||||
"eslint": "^5.16.0",
|
||||
|
@ -66,7 +66,7 @@
|
||||
</div>
|
||||
</el-footer>
|
||||
<div class="foot-copyright">
|
||||
<span>Copyright © 2020 TekSystem 版权所有</span>
|
||||
<span>Copyright © 2020 武汉思维跳跃科技有限公司 版权所有</span>
|
||||
</div>
|
||||
</el-container>
|
||||
</template>
|
||||
|
@ -5,7 +5,7 @@ Page({
|
||||
paperType: 1,
|
||||
spinShow: false,
|
||||
loadMoreLoad: false,
|
||||
loadMoreTip: 'No data',
|
||||
loadMoreTip: '暂无数据',
|
||||
queryParam: {
|
||||
paperType: 1,
|
||||
pageIndex: 1,
|
||||
@ -77,7 +77,7 @@ Page({
|
||||
if (re.pageNum >= re.pages) {
|
||||
this.setData({
|
||||
loadMoreLoad: false,
|
||||
loadMoreTip: 'No data'
|
||||
loadMoreTip: '暂无数据'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -3,7 +3,7 @@ Page({
|
||||
data: {
|
||||
spinShow: false,
|
||||
loadMoreLoad: false,
|
||||
loadMoreTip: 'No data',
|
||||
loadMoreTip: '暂无数据',
|
||||
queryParam: {
|
||||
pageIndex: 1,
|
||||
pageSize: app.globalData.pageSize
|
||||
@ -58,7 +58,7 @@ Page({
|
||||
if (re.pageNum >= re.pages) {
|
||||
this.setData({
|
||||
loadMoreLoad: false,
|
||||
loadMoreTip: 'No data'
|
||||
loadMoreTip: '暂无数据'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ Page({
|
||||
data: {
|
||||
spinShow: false,
|
||||
loadMoreLoad: false,
|
||||
loadMoreTip: 'No data',
|
||||
loadMoreTip: '暂无数据',
|
||||
queryParam: {
|
||||
pageIndex: 1,
|
||||
pageSize: app.globalData.pageSize
|
||||
@ -59,7 +59,7 @@ Page({
|
||||
if (re.pageNum >= re.pages) {
|
||||
this.setData({
|
||||
loadMoreLoad: false,
|
||||
loadMoreTip: 'No data'
|
||||
loadMoreTip: '暂无数据'
|
||||
});
|
||||
}
|
||||
}
|
||||
|
@ -1,15 +1,29 @@
|
||||
package com.mindskip.xzs.base;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author 武汉思维跳跃科技有限公司
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class BasePage {
|
||||
|
||||
private Integer pageIndex;
|
||||
|
||||
private Integer pageSize;
|
||||
|
||||
public Integer getPageIndex() {
|
||||
return pageIndex;
|
||||
}
|
||||
|
||||
public void setPageIndex(Integer pageIndex) {
|
||||
this.pageIndex = pageIndex;
|
||||
}
|
||||
|
||||
public Integer getPageSize() {
|
||||
return pageSize;
|
||||
}
|
||||
|
||||
public void setPageSize(Integer pageSize) {
|
||||
this.pageSize = pageSize;
|
||||
}
|
||||
}
|
||||
|
@ -7,32 +7,32 @@ public enum SystemCode {
|
||||
/**
|
||||
* OK
|
||||
*/
|
||||
OK(1, "Success"),
|
||||
OK(1, "成功"),
|
||||
/**
|
||||
* AccessTokenError
|
||||
*/
|
||||
AccessTokenError(400, "User login token is invalid"),
|
||||
AccessTokenError(400, "用户登录令牌失效"),
|
||||
/**
|
||||
* UNAUTHORIZED
|
||||
*/
|
||||
UNAUTHORIZED(401, "User is not logged in"),
|
||||
UNAUTHORIZED(401, "用户未登录"),
|
||||
/**
|
||||
* UNAUTHORIZED
|
||||
*/
|
||||
AuthError(402, "Wrong user name or password"),
|
||||
AuthError(402, "用户名或密码错误"),
|
||||
/**
|
||||
* InnerError
|
||||
*/
|
||||
InnerError(500, "Internal System Error"),
|
||||
InnerError(500, "系统内部错误"),
|
||||
/**
|
||||
* ParameterValidError
|
||||
*/
|
||||
ParameterValidError(501, "Parameter validation error"),
|
||||
ParameterValidError(501, "参数验证错误"),
|
||||
|
||||
/**
|
||||
* AccessDenied
|
||||
*/
|
||||
AccessDenied(502,"User does not have permission to access");
|
||||
AccessDenied(502,"用户没有权限访问");
|
||||
|
||||
int code;
|
||||
String message;
|
||||
|
@ -1,9 +1,25 @@
|
||||
package com.mindskip.xzs.configuration.property;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class PasswordKeyConfig {
|
||||
private String publicKey;
|
||||
|
||||
private String privateKey;
|
||||
|
||||
public String getPublicKey() {
|
||||
return publicKey;
|
||||
}
|
||||
|
||||
public void setPublicKey(String publicKey) {
|
||||
this.publicKey = publicKey;
|
||||
}
|
||||
|
||||
public String getPrivateKey() {
|
||||
return privateKey;
|
||||
}
|
||||
|
||||
public void setPrivateKey(String privateKey) {
|
||||
this.privateKey = privateKey;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,14 +1,46 @@
|
||||
package com.mindskip.xzs.configuration.property;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class QnConfig {
|
||||
|
||||
private String url;
|
||||
private String bucket;
|
||||
private String accessKey;
|
||||
private String secretKey;
|
||||
|
||||
public String getUrl() {
|
||||
return url;
|
||||
}
|
||||
|
||||
public void setUrl(String url) {
|
||||
this.url = url;
|
||||
}
|
||||
|
||||
public String getBucket() {
|
||||
return bucket;
|
||||
}
|
||||
|
||||
public void setBucket(String bucket) {
|
||||
this.bucket = bucket;
|
||||
}
|
||||
|
||||
public String getAccessKey() {
|
||||
return accessKey;
|
||||
}
|
||||
|
||||
public void setAccessKey(String accessKey) {
|
||||
this.accessKey = accessKey;
|
||||
}
|
||||
|
||||
public String getSecretKey() {
|
||||
return secretKey;
|
||||
}
|
||||
|
||||
public void setSecretKey(String secretKey) {
|
||||
this.secretKey = secretKey;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,6 +1,5 @@
|
||||
package com.mindskip.xzs.configuration.property;
|
||||
|
||||
import lombok.Data;
|
||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||
|
||||
import java.util.List;
|
||||
@ -10,10 +9,43 @@ import java.util.List;
|
||||
* @author 武汉思维跳跃科技有限公司
|
||||
*/
|
||||
@ConfigurationProperties(prefix = "system")
|
||||
@Data
|
||||
public class SystemConfig {
|
||||
|
||||
private PasswordKeyConfig pwdKey;
|
||||
private List<String> securityIgnoreUrls;
|
||||
private WxConfig wx;
|
||||
private QnConfig qn;
|
||||
|
||||
public PasswordKeyConfig getPwdKey() {
|
||||
return pwdKey;
|
||||
}
|
||||
|
||||
public void setPwdKey(PasswordKeyConfig pwdKey) {
|
||||
this.pwdKey = pwdKey;
|
||||
}
|
||||
|
||||
public List<String> getSecurityIgnoreUrls() {
|
||||
return securityIgnoreUrls;
|
||||
}
|
||||
|
||||
public void setSecurityIgnoreUrls(List<String> securityIgnoreUrls) {
|
||||
this.securityIgnoreUrls = securityIgnoreUrls;
|
||||
}
|
||||
|
||||
public WxConfig getWx() {
|
||||
return wx;
|
||||
}
|
||||
|
||||
public void setWx(WxConfig wx) {
|
||||
this.wx = wx;
|
||||
}
|
||||
|
||||
public QnConfig getQn() {
|
||||
return qn;
|
||||
}
|
||||
|
||||
public void setQn(QnConfig qn) {
|
||||
this.qn = qn;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -1,14 +1,47 @@
|
||||
package com.mindskip.xzs.configuration.property;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.time.Duration;
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class WxConfig {
|
||||
|
||||
|
||||
private String appid;
|
||||
private String secret;
|
||||
private Duration tokenToLive;
|
||||
private List<String> securityIgnoreUrls;
|
||||
|
||||
public String getAppid() {
|
||||
return appid;
|
||||
}
|
||||
|
||||
public void setAppid(String appid) {
|
||||
this.appid = appid;
|
||||
}
|
||||
|
||||
public String getSecret() {
|
||||
return secret;
|
||||
}
|
||||
|
||||
public void setSecret(String secret) {
|
||||
this.secret = secret;
|
||||
}
|
||||
|
||||
public Duration getTokenToLive() {
|
||||
return tokenToLive;
|
||||
}
|
||||
|
||||
public void setTokenToLive(Duration tokenToLive) {
|
||||
this.tokenToLive = tokenToLive;
|
||||
}
|
||||
|
||||
public List<String> getSecurityIgnoreUrls() {
|
||||
return securityIgnoreUrls;
|
||||
}
|
||||
|
||||
public void setSecurityIgnoreUrls(List<String> securityIgnoreUrls) {
|
||||
this.securityIgnoreUrls = securityIgnoreUrls;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -2,7 +2,7 @@ package com.mindskip.xzs.configuration.spring.mvc;
|
||||
|
||||
import com.mindskip.xzs.configuration.property.SystemConfig;
|
||||
import com.mindskip.xzs.configuration.spring.wx.TokenHandlerInterceptor;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.servlet.config.annotation.*;
|
||||
|
||||
@ -14,12 +14,17 @@ import java.util.List;
|
||||
*/
|
||||
|
||||
@Configuration
|
||||
@AllArgsConstructor
|
||||
public class WebMvcConfiguration extends WebMvcConfigurationSupport {
|
||||
|
||||
private final TokenHandlerInterceptor tokenHandlerInterceptor;
|
||||
private final SystemConfig systemConfig;
|
||||
|
||||
@Autowired
|
||||
public WebMvcConfiguration(TokenHandlerInterceptor tokenHandlerInterceptor, SystemConfig systemConfig) {
|
||||
this.tokenHandlerInterceptor = tokenHandlerInterceptor;
|
||||
this.systemConfig = systemConfig;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addViewControllers(ViewControllerRegistry registry) {
|
||||
registry.addRedirectViewController("/", "/student/index.html");
|
||||
|
@ -1,14 +1,37 @@
|
||||
package com.mindskip.xzs.configuration.spring.security;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @author 武汉思维跳跃科技有限公司
|
||||
*/
|
||||
|
||||
@Data
|
||||
public class AuthenticationBean {
|
||||
private String userName;
|
||||
private String password;
|
||||
private boolean remember;
|
||||
|
||||
public String getUserName() {
|
||||
return userName;
|
||||
}
|
||||
|
||||
public void setUserName(String userName) {
|
||||
this.userName = userName;
|
||||
}
|
||||
|
||||
public String getPassword() {
|
||||
return password;
|
||||
}
|
||||
|
||||
public void setPassword(String password) {
|
||||
this.password = password;
|
||||
}
|
||||
|
||||
public boolean isRemember() {
|
||||
return remember;
|
||||
}
|
||||
|
||||
public void setRemember(boolean remember) {
|
||||
this.remember = remember;
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -4,7 +4,7 @@ import com.mindskip.xzs.base.SystemCode;
|
||||
import com.mindskip.xzs.domain.UserEventLog;
|
||||
import com.mindskip.xzs.event.UserEvent;
|
||||
import com.mindskip.xzs.service.UserService;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.ApplicationEventPublisher;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.core.userdetails.User;
|
||||
@ -23,18 +23,23 @@ import java.util.Date;
|
||||
* @author 武汉思维跳跃科技有限公司
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class RestAuthenticationSuccessHandler extends SimpleUrlAuthenticationSuccessHandler {
|
||||
|
||||
private final ApplicationEventPublisher eventPublisher;
|
||||
private final UserService userService;
|
||||
|
||||
@Autowired
|
||||
public RestAuthenticationSuccessHandler(ApplicationEventPublisher eventPublisher, UserService userService) {
|
||||
this.eventPublisher = eventPublisher;
|
||||
this.userService = userService;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onAuthenticationSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication) throws IOException, ServletException {
|
||||
User springUser = (User) authentication.getPrincipal();
|
||||
com.mindskip.xzs.domain.User user = userService.getUserByUserName(springUser.getUsername());
|
||||
UserEventLog userEventLog = new UserEventLog(user.getId(), user.getUserName(), user.getRealName(), new Date());
|
||||
userEventLog.setContent(user.getUserName() + " 登录了Tek Systems出题系统");
|
||||
userEventLog.setContent(user.getUserName() + " 登录了学之思考试系统");
|
||||
eventPublisher.publishEvent(new UserEvent(userEventLog));
|
||||
com.mindskip.xzs.domain.User newUser = new com.mindskip.xzs.domain.User();
|
||||
newUser.setUserName(user.getUserName());
|
||||
|
@ -5,7 +5,7 @@ import com.mindskip.xzs.domain.User;
|
||||
import com.mindskip.xzs.domain.UserEventLog;
|
||||
import com.mindskip.xzs.event.UserEvent;
|
||||
import com.mindskip.xzs.service.UserService;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.ApplicationEventPublisher;
|
||||
import org.springframework.security.core.Authentication;
|
||||
import org.springframework.security.web.authentication.logout.SimpleUrlLogoutSuccessHandler;
|
||||
@ -21,12 +21,17 @@ import java.util.Date;
|
||||
* @author 武汉思维跳跃科技有限公司
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class RestLogoutSuccessHandler extends SimpleUrlLogoutSuccessHandler {
|
||||
|
||||
private final ApplicationEventPublisher eventPublisher;
|
||||
private final UserService userService;
|
||||
|
||||
@Autowired
|
||||
public RestLogoutSuccessHandler(ApplicationEventPublisher eventPublisher, UserService userService) {
|
||||
this.eventPublisher = eventPublisher;
|
||||
this.userService = userService;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onLogoutSuccess(HttpServletRequest request, HttpServletResponse response, Authentication authentication) {
|
||||
org.springframework.security.core.userdetails.User springUser = (org.springframework.security.core.userdetails.User) authentication.getPrincipal();
|
||||
|
@ -3,7 +3,7 @@ package com.mindskip.xzs.configuration.spring.security;
|
||||
import com.mindskip.xzs.configuration.property.CookieConfig;
|
||||
import com.mindskip.xzs.configuration.property.SystemConfig;
|
||||
import com.mindskip.xzs.domain.enums.RoleEnum;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.security.config.annotation.web.builders.HttpSecurity;
|
||||
@ -27,7 +27,6 @@ import java.util.List;
|
||||
public class SecurityConfigurer {
|
||||
|
||||
@Configuration
|
||||
@AllArgsConstructor
|
||||
public static class FormLoginWebSecurityConfigurerAdapter extends WebSecurityConfigurerAdapter {
|
||||
|
||||
private final SystemConfig systemConfig;
|
||||
@ -39,6 +38,18 @@ public class SecurityConfigurer {
|
||||
private final RestLogoutSuccessHandler restLogoutSuccessHandler;
|
||||
private final RestAccessDeniedHandler restAccessDeniedHandler;
|
||||
|
||||
@Autowired
|
||||
public FormLoginWebSecurityConfigurerAdapter(SystemConfig systemConfig, LoginAuthenticationEntryPoint restAuthenticationEntryPoint, RestAuthenticationProvider restAuthenticationProvider, RestDetailsServiceImpl formDetailsService, RestAuthenticationSuccessHandler restAuthenticationSuccessHandler, RestAuthenticationFailureHandler restAuthenticationFailureHandler, RestLogoutSuccessHandler restLogoutSuccessHandler, RestAccessDeniedHandler restAccessDeniedHandler) {
|
||||
this.systemConfig = systemConfig;
|
||||
this.restAuthenticationEntryPoint = restAuthenticationEntryPoint;
|
||||
this.restAuthenticationProvider = restAuthenticationProvider;
|
||||
this.formDetailsService = formDetailsService;
|
||||
this.restAuthenticationSuccessHandler = restAuthenticationSuccessHandler;
|
||||
this.restAuthenticationFailureHandler = restAuthenticationFailureHandler;
|
||||
this.restLogoutSuccessHandler = restLogoutSuccessHandler;
|
||||
this.restAccessDeniedHandler = restAccessDeniedHandler;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param http http
|
||||
* @throws Exception exception
|
||||
|
@ -2,18 +2,22 @@ package com.mindskip.xzs.context;
|
||||
|
||||
import com.mindskip.xzs.domain.User;
|
||||
import com.mindskip.xzs.service.UserService;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.security.core.context.SecurityContextHolder;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.web.context.request.RequestAttributes;
|
||||
import org.springframework.web.context.request.RequestContextHolder;
|
||||
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class WebContext {
|
||||
private static final String USER_ATTRIBUTES = "USER_ATTRIBUTES";
|
||||
private final UserService userService;
|
||||
|
||||
@Autowired
|
||||
public WebContext(UserService userService) {
|
||||
this.userService = userService;
|
||||
}
|
||||
|
||||
|
||||
public void setCurrentUser(User user) {
|
||||
RequestContextHolder.currentRequestAttributes().setAttribute(USER_ATTRIBUTES, user, RequestAttributes.SCOPE_REQUEST);
|
||||
|
@ -5,8 +5,7 @@ import com.mindskip.xzs.base.RestResponse;
|
||||
import com.mindskip.xzs.service.*;
|
||||
import com.mindskip.xzs.utility.DateTimeUtil;
|
||||
import com.mindskip.xzs.viewmodel.admin.dashboard.IndexVM;
|
||||
import com.mindskip.xzs.service.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
@ -15,16 +14,23 @@ import java.util.List;
|
||||
|
||||
@RestController("AdminDashboardController")
|
||||
@RequestMapping(value = "/api/admin/dashboard")
|
||||
@AllArgsConstructor
|
||||
public class DashboardController extends BaseApiController {
|
||||
|
||||
|
||||
private final ExamPaperService examPaperService;
|
||||
private final QuestionService questionService;
|
||||
private final ExamPaperAnswerService examPaperAnswerService;
|
||||
private final ExamPaperQuestionCustomerAnswerService examPaperQuestionCustomerAnswerService;
|
||||
private final UserEventLogService userEventLogService;
|
||||
|
||||
@Autowired
|
||||
public DashboardController(ExamPaperService examPaperService, QuestionService questionService, ExamPaperAnswerService examPaperAnswerService, ExamPaperQuestionCustomerAnswerService examPaperQuestionCustomerAnswerService, UserEventLogService userEventLogService) {
|
||||
this.examPaperService = examPaperService;
|
||||
this.questionService = questionService;
|
||||
this.examPaperAnswerService = examPaperAnswerService;
|
||||
this.examPaperQuestionCustomerAnswerService = examPaperQuestionCustomerAnswerService;
|
||||
this.userEventLogService = userEventLogService;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/index", method = RequestMethod.POST)
|
||||
public RestResponse<IndexVM> Index() {
|
||||
IndexVM vm = new IndexVM();
|
||||
|
@ -4,14 +4,13 @@ package com.mindskip.xzs.controller.admin;
|
||||
import com.mindskip.xzs.base.BaseApiController;
|
||||
import com.mindskip.xzs.base.RestResponse;
|
||||
import com.mindskip.xzs.domain.Subject;
|
||||
import com.mindskip.xzs.service.IndustryService;
|
||||
import com.mindskip.xzs.service.SubjectService;
|
||||
import com.mindskip.xzs.utility.PageInfoHelper;
|
||||
import com.mindskip.xzs.viewmodel.admin.education.SubjectEditRequestVM;
|
||||
import com.mindskip.xzs.viewmodel.admin.education.SubjectPageRequestVM;
|
||||
import com.mindskip.xzs.viewmodel.admin.education.SubjectResponseVM;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
@ -19,11 +18,15 @@ import java.util.List;
|
||||
|
||||
@RestController("AdminEducationController")
|
||||
@RequestMapping(value = "/api/admin/education")
|
||||
@AllArgsConstructor
|
||||
public class EducationController extends BaseApiController {
|
||||
|
||||
private final SubjectService subjectService;
|
||||
|
||||
@Autowired
|
||||
public EducationController(SubjectService subjectService) {
|
||||
this.subjectService = subjectService;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/subject/list", method = RequestMethod.POST)
|
||||
public RestResponse<List<Subject>> list() {
|
||||
List<Subject> subjects = subjectService.allSubject();
|
||||
|
@ -10,18 +10,22 @@ import com.mindskip.xzs.viewmodel.admin.exam.ExamPaperPageRequestVM;
|
||||
import com.mindskip.xzs.viewmodel.admin.exam.ExamPaperEditRequestVM;
|
||||
import com.mindskip.xzs.viewmodel.admin.exam.ExamResponseVM;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
@RestController("AdminExamPaperController")
|
||||
@RequestMapping(value = "/api/admin/exam/paper")
|
||||
@AllArgsConstructor
|
||||
public class ExamPaperController extends BaseApiController {
|
||||
|
||||
private final ExamPaperService examPaperService;
|
||||
|
||||
@Autowired
|
||||
public ExamPaperController(ExamPaperService examPaperService) {
|
||||
this.examPaperService = examPaperService;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/page", method = RequestMethod.POST)
|
||||
public RestResponse<PageInfo<ExamResponseVM>> pageList(@RequestBody ExamPaperPageRequestVM model) {
|
||||
PageInfo<ExamPaper> pageInfo = examPaperService.page(model);
|
||||
|
@ -1,62 +0,0 @@
|
||||
package com.mindskip.xzs.controller.admin;
|
||||
|
||||
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.mindskip.xzs.base.BaseApiController;
|
||||
import com.mindskip.xzs.base.RestResponse;
|
||||
import com.mindskip.xzs.domain.Industry;
|
||||
import com.mindskip.xzs.service.IndustryService;
|
||||
import com.mindskip.xzs.utility.PageInfoHelper;
|
||||
import com.mindskip.xzs.viewmodel.admin.industry.IndustryEditRequestVM;
|
||||
import com.mindskip.xzs.viewmodel.admin.industry.IndustryPageRequestVM;
|
||||
import com.mindskip.xzs.viewmodel.admin.industry.IndustryResponseVM;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
@RestController("AdminIndustryController")
|
||||
@RequestMapping(value = "/api/admin")
|
||||
@AllArgsConstructor
|
||||
public class IndustryController extends BaseApiController {
|
||||
|
||||
private final IndustryService industryService;
|
||||
|
||||
@RequestMapping(value = "/industry/list", method = RequestMethod.POST)
|
||||
public RestResponse<List<Industry>> list() {
|
||||
List<Industry> industries = industryService.allIndustry();
|
||||
return RestResponse.ok(industries);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/industry/page", method = RequestMethod.POST)
|
||||
public RestResponse<PageInfo<IndustryResponseVM>> pageList(@RequestBody IndustryPageRequestVM model) {
|
||||
PageInfo<Industry> pageInfo = industryService.page(model);
|
||||
PageInfo<IndustryResponseVM> page = PageInfoHelper.copyMap(pageInfo, e -> modelMapper.map(e, IndustryResponseVM.class));
|
||||
return RestResponse.ok(page);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/industry/edit", method = RequestMethod.POST)
|
||||
public RestResponse edit(@RequestBody @Valid IndustryEditRequestVM model) {
|
||||
Industry industry = modelMapper.map(model, Industry.class);
|
||||
if (model.getId() == null) {
|
||||
industryService.insertByFilter(industry);
|
||||
} else {
|
||||
industryService.updateByIdFilter(industry);
|
||||
}
|
||||
return RestResponse.ok();
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/industry/select/{id}", method = RequestMethod.POST)
|
||||
public RestResponse<IndustryEditRequestVM> select(@PathVariable Integer id) {
|
||||
Industry industry = industryService.selectById(id);
|
||||
IndustryEditRequestVM vm = modelMapper.map(industry, IndustryEditRequestVM.class);
|
||||
return RestResponse.ok(vm);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/industry/delete/{id}", method = RequestMethod.POST)
|
||||
public RestResponse delete(@PathVariable Integer id) {
|
||||
industryService.deleteById(id);
|
||||
return RestResponse.ok();
|
||||
}
|
||||
}
|
@ -14,7 +14,7 @@ import com.mindskip.xzs.viewmodel.admin.message.MessagePageRequestVM;
|
||||
import com.mindskip.xzs.viewmodel.admin.message.MessageResponseVM;
|
||||
import com.mindskip.xzs.viewmodel.admin.message.MessageSendVM;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
@ -27,12 +27,17 @@ import java.util.stream.Collectors;
|
||||
|
||||
@RestController("AdminMessageController")
|
||||
@RequestMapping(value = "/api/admin/message")
|
||||
@AllArgsConstructor
|
||||
public class MessageController extends BaseApiController {
|
||||
|
||||
private final MessageService messageService;
|
||||
private final UserService userService;
|
||||
|
||||
@Autowired
|
||||
public MessageController(MessageService messageService, UserService userService) {
|
||||
this.messageService = messageService;
|
||||
this.userService = userService;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/page", method = RequestMethod.POST)
|
||||
public RestResponse<PageInfo<MessageResponseVM>> pageList(@RequestBody MessagePageRequestVM model) {
|
||||
PageInfo<Message> pageInfo = messageService.page(model);
|
||||
|
@ -5,39 +5,33 @@ import com.mindskip.xzs.base.RestResponse;
|
||||
import com.mindskip.xzs.base.SystemCode;
|
||||
import com.mindskip.xzs.domain.Question;
|
||||
import com.mindskip.xzs.domain.TextContent;
|
||||
import com.mindskip.xzs.domain.User;
|
||||
import com.mindskip.xzs.domain.UserEventLog;
|
||||
import com.mindskip.xzs.domain.enums.QuestionTypeEnum;
|
||||
import com.mindskip.xzs.domain.question.QuestionObject;
|
||||
import com.mindskip.xzs.event.UserEvent;
|
||||
import com.mindskip.xzs.service.IndustryService;
|
||||
import com.mindskip.xzs.service.QuestionService;
|
||||
import com.mindskip.xzs.service.SkillService;
|
||||
import com.mindskip.xzs.service.TextContentService;
|
||||
import com.mindskip.xzs.utility.*;
|
||||
import com.mindskip.xzs.viewmodel.admin.question.QuestionEditRequestVM;
|
||||
import com.mindskip.xzs.viewmodel.admin.question.QuestionPageRequestVM;
|
||||
import com.mindskip.xzs.viewmodel.admin.question.QuestionResponseVM;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.mindskip.xzs.utility.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.context.ApplicationEventPublisher;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.Date;
|
||||
|
||||
@RestController("AdminQuestionController")
|
||||
@RequestMapping(value = "/api/admin/question")
|
||||
@AllArgsConstructor
|
||||
public class QuestionController extends BaseApiController {
|
||||
|
||||
private final QuestionService questionService;
|
||||
private final TextContentService textContentService;
|
||||
private final ApplicationEventPublisher eventPublisher;
|
||||
private final IndustryService industryService;
|
||||
private final SkillService skillService;
|
||||
|
||||
@Autowired
|
||||
public QuestionController(QuestionService questionService, TextContentService textContentService) {
|
||||
this.questionService = questionService;
|
||||
this.textContentService = textContentService;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/page", method = RequestMethod.POST)
|
||||
public RestResponse<PageInfo<QuestionResponseVM>> pageList(@RequestBody QuestionPageRequestVM model) {
|
||||
@ -61,24 +55,13 @@ public class QuestionController extends BaseApiController {
|
||||
if (validQuestionEditRequestResult.getCode() != SystemCode.OK.getCode()) {
|
||||
return validQuestionEditRequestResult;
|
||||
}
|
||||
User user = getCurrentUser();
|
||||
UserEventLog userEventLog = new UserEventLog(user.getId(), user.getUserName(), user.getRealName(), new Date());
|
||||
String content = "";
|
||||
|
||||
if (null == model.getId()) {
|
||||
Question question = questionService.insertFullQuestion(model, getCurrentUser().getId());
|
||||
content = user.getUserName() + "增加 [题号——>"+question.getId()+"] " +
|
||||
"[industry——>"+industryService.selectById(model.getIndustryId()).getName()+"] " +
|
||||
"[skill——>"+skillService.selectById(model.getSkillId()).getName()+"]";
|
||||
questionService.insertFullQuestion(model, getCurrentUser().getId());
|
||||
} else {
|
||||
questionService.updateFullQuestion(model);
|
||||
content = user.getUserName() + "更新 [题号——>"+model.getId()+"] " +
|
||||
"[industry——>"+industryService.selectById(model.getIndustryId()).getName()+"] " +
|
||||
"[skill——>"+skillService.selectById(model.getSkillId()).getName()+"]";
|
||||
}
|
||||
|
||||
userEventLog.setContent(content);
|
||||
eventPublisher.publishEvent(new UserEvent(userEventLog));
|
||||
return RestResponse.ok();
|
||||
}
|
||||
|
||||
@ -94,13 +77,6 @@ public class QuestionController extends BaseApiController {
|
||||
Question question = questionService.selectById(id);
|
||||
question.setDeleted(true);
|
||||
questionService.updateByIdFilter(question);
|
||||
User user = getCurrentUser();
|
||||
UserEventLog userEventLog = new UserEventLog(user.getId(), user.getUserName(), user.getRealName(), new Date());
|
||||
String content = user.getUserName() + "删除 [题号——>"+question.getId()+"] " +
|
||||
"[industry——>"+industryService.selectById(question.getIndustryId()).getName()+"] " +
|
||||
"[skill——>"+skillService.selectById(question.getSkillId()).getName()+"]";
|
||||
userEventLog.setContent(content);
|
||||
eventPublisher.publishEvent(new UserEvent(userEventLog));
|
||||
return RestResponse.ok();
|
||||
}
|
||||
|
||||
|
@ -1,62 +0,0 @@
|
||||
package com.mindskip.xzs.controller.admin;
|
||||
|
||||
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.mindskip.xzs.base.BaseApiController;
|
||||
import com.mindskip.xzs.base.RestResponse;
|
||||
import com.mindskip.xzs.domain.Skill;
|
||||
import com.mindskip.xzs.service.SkillService;
|
||||
import com.mindskip.xzs.utility.PageInfoHelper;
|
||||
import com.mindskip.xzs.viewmodel.admin.skill.SkillEditRequestVM;
|
||||
import com.mindskip.xzs.viewmodel.admin.skill.SkillPageRequestVM;
|
||||
import com.mindskip.xzs.viewmodel.admin.skill.SkillResponseVM;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
@RestController("AdminSkillController")
|
||||
@RequestMapping(value = "/api/admin")
|
||||
@AllArgsConstructor
|
||||
public class SkillController extends BaseApiController {
|
||||
|
||||
private final SkillService skillService;
|
||||
|
||||
@RequestMapping(value = "/skill/list", method = RequestMethod.POST)
|
||||
public RestResponse<List<Skill>> list() {
|
||||
List<Skill> industries = skillService.allSkill();
|
||||
return RestResponse.ok(industries);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/skill/page", method = RequestMethod.POST)
|
||||
public RestResponse<PageInfo<SkillResponseVM>> pageList(@RequestBody SkillPageRequestVM model) {
|
||||
PageInfo<Skill> pageInfo = skillService.page(model);
|
||||
PageInfo<SkillResponseVM> page = PageInfoHelper.copyMap(pageInfo, e -> modelMapper.map(e, SkillResponseVM.class));
|
||||
return RestResponse.ok(page);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/skill/edit", method = RequestMethod.POST)
|
||||
public RestResponse edit(@RequestBody @Valid SkillEditRequestVM model) {
|
||||
Skill skill = modelMapper.map(model, Skill.class);
|
||||
if (model.getId() == null) {
|
||||
skillService.insertByFilter(skill);
|
||||
} else {
|
||||
skillService.updateByIdFilter(skill);
|
||||
}
|
||||
return RestResponse.ok();
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/skill/select/{id}", method = RequestMethod.POST)
|
||||
public RestResponse<SkillEditRequestVM> select(@PathVariable Integer id) {
|
||||
Skill skill = skillService.selectById(id);
|
||||
SkillEditRequestVM vm = modelMapper.map(skill, SkillEditRequestVM.class);
|
||||
return RestResponse.ok(vm);
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/skill/delete/{id}", method = RequestMethod.POST)
|
||||
public RestResponse delete(@PathVariable Integer id) {
|
||||
skillService.deleteById(id);
|
||||
return RestResponse.ok();
|
||||
}
|
||||
}
|
@ -11,18 +11,22 @@ import com.mindskip.xzs.viewmodel.admin.task.TaskPageRequestVM;
|
||||
import com.mindskip.xzs.viewmodel.admin.task.TaskPageResponseVM;
|
||||
import com.mindskip.xzs.viewmodel.admin.task.TaskRequestVM;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
|
||||
@RestController("AdminTaskController")
|
||||
@RequestMapping(value = "/api/admin/task")
|
||||
@AllArgsConstructor
|
||||
public class TaskController extends BaseApiController {
|
||||
|
||||
private final TaskExamService taskExamService;
|
||||
|
||||
@Autowired
|
||||
public TaskController(TaskExamService taskExamService) {
|
||||
this.taskExamService = taskExamService;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/page", method = RequestMethod.POST)
|
||||
public RestResponse<PageInfo<TaskPageResponseVM>> pageList(@RequestBody TaskPageRequestVM model) {
|
||||
PageInfo<TaskExam> pageInfo = taskExamService.page(model);
|
||||
|
@ -8,10 +8,9 @@ import com.mindskip.xzs.service.FileUpload;
|
||||
import com.mindskip.xzs.service.UserService;
|
||||
import com.mindskip.xzs.viewmodel.admin.file.UeditorConfigVM;
|
||||
import com.mindskip.xzs.viewmodel.admin.file.UploadResultVM;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
import org.springframework.web.multipart.MultipartFile;
|
||||
import org.springframework.web.multipart.MultipartHttpServletRequest;
|
||||
@ -23,8 +22,6 @@ import java.io.InputStream;
|
||||
import java.util.Arrays;
|
||||
|
||||
|
||||
@Slf4j
|
||||
@AllArgsConstructor
|
||||
@RequestMapping("/api/admin/upload")
|
||||
@RestController("AdminUploadController")
|
||||
public class UploadController extends BaseApiController {
|
||||
@ -36,6 +33,13 @@ public class UploadController extends BaseApiController {
|
||||
private static final String IMAGE_UPLOAD_FILE = "upFile";
|
||||
private final UserService userService;
|
||||
|
||||
@Autowired
|
||||
public UploadController(FileUpload fileUpload, SystemConfig systemConfig, UserService userService) {
|
||||
this.fileUpload = fileUpload;
|
||||
this.systemConfig = systemConfig;
|
||||
this.userService = userService;
|
||||
}
|
||||
|
||||
@ResponseBody
|
||||
@RequestMapping("/configAndUpload")
|
||||
public Object upload(HttpServletRequest request, HttpServletResponse response) {
|
||||
|
@ -13,10 +13,9 @@ import com.mindskip.xzs.utility.DateTimeUtil;
|
||||
import com.mindskip.xzs.viewmodel.admin.user.*;
|
||||
import com.mindskip.xzs.utility.PageInfoHelper;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.mindskip.xzs.viewmodel.admin.user.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.validation.Valid;
|
||||
@ -30,13 +29,19 @@ import java.util.UUID;
|
||||
*/
|
||||
@RestController("AdminUserController")
|
||||
@RequestMapping(value = "/api/admin/user")
|
||||
@AllArgsConstructor
|
||||
public class UserController extends BaseApiController {
|
||||
|
||||
private final UserService userService;
|
||||
private final UserEventLogService userEventLogService;
|
||||
private final AuthenticationService authenticationService;
|
||||
|
||||
@Autowired
|
||||
public UserController(UserService userService, UserEventLogService userEventLogService, AuthenticationService authenticationService) {
|
||||
this.userService = userService;
|
||||
this.userEventLogService = userEventLogService;
|
||||
this.authenticationService = authenticationService;
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = "/page/list", method = RequestMethod.POST)
|
||||
public RestResponse<PageInfo<UserResponseVM>> pageList(@RequestBody UserPageRequestVM model) {
|
||||
|
@ -13,9 +13,7 @@ import com.mindskip.xzs.service.*;
|
||||
import com.mindskip.xzs.utility.DateTimeUtil;
|
||||
import com.mindskip.xzs.utility.JsonUtil;
|
||||
import com.mindskip.xzs.viewmodel.student.dashboard.*;
|
||||
import com.mindskip.xzs.service.*;
|
||||
import com.mindskip.xzs.viewmodel.student.dashboard.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
@ -27,7 +25,6 @@ import java.util.stream.Collectors;
|
||||
|
||||
@RestController("StudentDashboardController")
|
||||
@RequestMapping(value = "/api/student/dashboard")
|
||||
@AllArgsConstructor
|
||||
public class DashboardController extends BaseApiController {
|
||||
|
||||
private final UserService userService;
|
||||
@ -37,6 +34,16 @@ public class DashboardController extends BaseApiController {
|
||||
private final TaskExamCustomerAnswerService taskExamCustomerAnswerService;
|
||||
private final TextContentService textContentService;
|
||||
|
||||
@Autowired
|
||||
public DashboardController(UserService userService, ExamPaperService examPaperService, QuestionService questionService, TaskExamService taskExamService, TaskExamCustomerAnswerService taskExamCustomerAnswerService, TextContentService textContentService) {
|
||||
this.userService = userService;
|
||||
this.examPaperService = examPaperService;
|
||||
this.questionService = questionService;
|
||||
this.taskExamService = taskExamService;
|
||||
this.taskExamCustomerAnswerService = taskExamCustomerAnswerService;
|
||||
this.textContentService = textContentService;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/index", method = RequestMethod.POST)
|
||||
public RestResponse<IndexVM> index() {
|
||||
IndexVM indexVM = new IndexVM();
|
||||
|
@ -8,7 +8,7 @@ import com.mindskip.xzs.domain.User;
|
||||
import com.mindskip.xzs.service.SubjectService;
|
||||
import com.mindskip.xzs.viewmodel.student.education.SubjectEditRequestVM;
|
||||
import com.mindskip.xzs.viewmodel.student.education.SubjectVM;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
@ -16,11 +16,15 @@ import java.util.stream.Collectors;
|
||||
|
||||
@RestController("StudentEducationController")
|
||||
@RequestMapping(value = "/api/student/education")
|
||||
@AllArgsConstructor
|
||||
public class EducationController extends BaseApiController {
|
||||
|
||||
private final SubjectService subjectService;
|
||||
|
||||
@Autowired
|
||||
public EducationController(SubjectService subjectService) {
|
||||
this.subjectService = subjectService;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/subject/list", method = RequestMethod.POST)
|
||||
public RestResponse<List<SubjectVM>> list() {
|
||||
User user = getCurrentUser();
|
||||
|
@ -18,8 +18,7 @@ import com.mindskip.xzs.viewmodel.student.exam.ExamPaperSubmitVM;
|
||||
import com.mindskip.xzs.viewmodel.student.exampaper.ExamPaperAnswerPageResponseVM;
|
||||
import com.mindskip.xzs.viewmodel.student.exampaper.ExamPaperAnswerPageVM;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.mindskip.xzs.domain.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.ApplicationEventPublisher;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@ -28,7 +27,6 @@ import java.util.Date;
|
||||
|
||||
@RestController("StudentExamPaperAnswerController")
|
||||
@RequestMapping(value = "/api/student/exampaper/answer")
|
||||
@AllArgsConstructor
|
||||
public class ExamPaperAnswerController extends BaseApiController {
|
||||
|
||||
private final ExamPaperAnswerService examPaperAnswerService;
|
||||
@ -36,6 +34,14 @@ public class ExamPaperAnswerController extends BaseApiController {
|
||||
private final SubjectService subjectService;
|
||||
private final ApplicationEventPublisher eventPublisher;
|
||||
|
||||
@Autowired
|
||||
public ExamPaperAnswerController(ExamPaperAnswerService examPaperAnswerService, ExamPaperService examPaperService, SubjectService subjectService, ApplicationEventPublisher eventPublisher) {
|
||||
this.examPaperAnswerService = examPaperAnswerService;
|
||||
this.examPaperService = examPaperService;
|
||||
this.subjectService = subjectService;
|
||||
this.eventPublisher = eventPublisher;
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = "/pageList", method = RequestMethod.POST)
|
||||
public RestResponse<PageInfo<ExamPaperAnswerPageResponseVM>> pageList(@RequestBody @Valid ExamPaperAnswerPageVM model) {
|
||||
|
@ -11,7 +11,7 @@ import com.mindskip.xzs.viewmodel.admin.exam.ExamPaperEditRequestVM;
|
||||
import com.mindskip.xzs.viewmodel.student.exam.ExamPaperPageResponseVM;
|
||||
import com.mindskip.xzs.viewmodel.student.exam.ExamPaperPageVM;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.ApplicationEventPublisher;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@ -19,13 +19,19 @@ import javax.validation.Valid;
|
||||
|
||||
@RestController("StudentExamPaperController")
|
||||
@RequestMapping(value = "/api/student/exam/paper")
|
||||
@AllArgsConstructor
|
||||
public class ExamPaperController extends BaseApiController {
|
||||
|
||||
private final ExamPaperService examPaperService;
|
||||
private final ExamPaperAnswerService examPaperAnswerService;
|
||||
private final ApplicationEventPublisher eventPublisher;
|
||||
|
||||
@Autowired
|
||||
public ExamPaperController(ExamPaperService examPaperService, ExamPaperAnswerService examPaperAnswerService, ApplicationEventPublisher eventPublisher) {
|
||||
this.examPaperService = examPaperService;
|
||||
this.examPaperAnswerService = examPaperAnswerService;
|
||||
this.eventPublisher = eventPublisher;
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = "/select/{id}", method = RequestMethod.POST)
|
||||
public RestResponse<ExamPaperEditRequestVM> select(@PathVariable Integer id) {
|
||||
|
@ -1,36 +0,0 @@
|
||||
package com.mindskip.xzs.controller.student;
|
||||
|
||||
import com.mindskip.xzs.base.BaseApiController;
|
||||
import com.mindskip.xzs.base.RestResponse;
|
||||
import com.mindskip.xzs.domain.Question;
|
||||
import com.mindskip.xzs.service.ExaminationPaperProductionService;
|
||||
import com.mindskip.xzs.viewmodel.student.exam.ExaminationProductionVM;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import java.util.List;
|
||||
|
||||
@RestController("ExaminationPaperProductionController")
|
||||
@RequestMapping(value = "/api/student/examination")
|
||||
@AllArgsConstructor
|
||||
public class ExaminationPaperProductionController extends BaseApiController {
|
||||
|
||||
private final ExaminationPaperProductionService examinationPaperProductionService;
|
||||
|
||||
@RequestMapping(value = "/paper", method = RequestMethod.GET)
|
||||
public RestResponse paper() {
|
||||
return RestResponse.ok(examinationPaperProductionService.paper());
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/paper/production", method = RequestMethod.POST)
|
||||
public RestResponse paperProduction(@RequestBody @Valid ExaminationProductionVM examinationProductionVM) {
|
||||
List<Question> questionList = examinationPaperProductionService.generation(examinationProductionVM);
|
||||
return RestResponse.ok(questionList);
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -20,12 +20,11 @@ import com.mindskip.xzs.viewmodel.student.question.answer.QuestionAnswerVM;
|
||||
import com.mindskip.xzs.viewmodel.student.question.answer.QuestionPageStudentRequestVM;
|
||||
import com.mindskip.xzs.viewmodel.student.question.answer.QuestionPageStudentResponseVM;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@RestController("StudentQuestionAnswerController")
|
||||
@RequestMapping(value = "/api/student/question/answer")
|
||||
@AllArgsConstructor
|
||||
public class QuestionAnswerController extends BaseApiController {
|
||||
|
||||
private final ExamPaperQuestionCustomerAnswerService examPaperQuestionCustomerAnswerService;
|
||||
@ -33,6 +32,14 @@ public class QuestionAnswerController extends BaseApiController {
|
||||
private final TextContentService textContentService;
|
||||
private final SubjectService subjectService;
|
||||
|
||||
@Autowired
|
||||
public QuestionAnswerController(ExamPaperQuestionCustomerAnswerService examPaperQuestionCustomerAnswerService, QuestionService questionService, TextContentService textContentService, SubjectService subjectService) {
|
||||
this.examPaperQuestionCustomerAnswerService = examPaperQuestionCustomerAnswerService;
|
||||
this.questionService = questionService;
|
||||
this.textContentService = textContentService;
|
||||
this.subjectService = subjectService;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/page", method = RequestMethod.POST)
|
||||
public RestResponse<PageInfo<QuestionPageStudentResponseVM>> pageList(@RequestBody QuestionPageStudentRequestVM model) {
|
||||
model.setCreateUser(getCurrentUser().getId());
|
||||
|
@ -2,15 +2,17 @@ package com.mindskip.xzs.controller.student;
|
||||
|
||||
import com.mindskip.xzs.base.BaseApiController;
|
||||
import com.mindskip.xzs.service.QuestionService;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@RestController("StudentQuestionController")
|
||||
@RequestMapping(value = "/api/student/question")
|
||||
@AllArgsConstructor
|
||||
public class QuestionController extends BaseApiController {
|
||||
|
||||
private final QuestionService questionService;
|
||||
|
||||
|
||||
@Autowired
|
||||
public QuestionController(QuestionService questionService) {
|
||||
this.questionService = questionService;
|
||||
}
|
||||
}
|
||||
|
@ -5,8 +5,7 @@ import com.mindskip.xzs.base.BaseApiController;
|
||||
import com.mindskip.xzs.base.RestResponse;
|
||||
import com.mindskip.xzs.service.FileUpload;
|
||||
import com.mindskip.xzs.service.UserService;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.ResponseBody;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
@ -18,8 +17,6 @@ import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
|
||||
@Slf4j
|
||||
@AllArgsConstructor
|
||||
@RequestMapping("/api/student/upload")
|
||||
@RestController("StudentUploadController")
|
||||
public class UploadController extends BaseApiController {
|
||||
@ -27,6 +24,12 @@ public class UploadController extends BaseApiController {
|
||||
private final FileUpload fileUpload;
|
||||
private final UserService userService;
|
||||
|
||||
@Autowired
|
||||
public UploadController(FileUpload fileUpload, UserService userService) {
|
||||
this.fileUpload = fileUpload;
|
||||
this.userService = userService;
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping("/image")
|
||||
@ResponseBody
|
||||
|
@ -17,9 +17,8 @@ import com.mindskip.xzs.utility.DateTimeUtil;
|
||||
import com.mindskip.xzs.utility.PageInfoHelper;
|
||||
import com.mindskip.xzs.viewmodel.student.user.*;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.mindskip.xzs.viewmodel.student.user.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.ApplicationEventPublisher;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@ -35,7 +34,6 @@ import java.util.stream.Collectors;
|
||||
*/
|
||||
@RestController("StudentUserController")
|
||||
@RequestMapping(value = "/api/student/user")
|
||||
@AllArgsConstructor
|
||||
public class UserController extends BaseApiController {
|
||||
|
||||
private final UserService userService;
|
||||
@ -44,6 +42,15 @@ public class UserController extends BaseApiController {
|
||||
private final AuthenticationService authenticationService;
|
||||
private final ApplicationEventPublisher eventPublisher;
|
||||
|
||||
@Autowired
|
||||
public UserController(UserService userService, UserEventLogService userEventLogService, MessageService messageService, AuthenticationService authenticationService, ApplicationEventPublisher eventPublisher) {
|
||||
this.userService = userService;
|
||||
this.userEventLogService = userEventLogService;
|
||||
this.messageService = messageService;
|
||||
this.authenticationService = authenticationService;
|
||||
this.eventPublisher = eventPublisher;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/current", method = RequestMethod.POST)
|
||||
public RestResponse<UserResponseVM> current() {
|
||||
User user = getCurrentUser();
|
||||
@ -69,7 +76,7 @@ public class UserController extends BaseApiController {
|
||||
user.setDeleted(false);
|
||||
userService.insertByFilter(user);
|
||||
UserEventLog userEventLog = new UserEventLog(user.getId(), user.getUserName(), user.getRealName(), new Date());
|
||||
userEventLog.setContent("欢迎 " + user.getUserName() + " 注册来到Tek Systems出题系统");
|
||||
userEventLog.setContent("欢迎 " + user.getUserName() + " 注册来到学之思考试系统");
|
||||
eventPublisher.publishEvent(new UserEvent(userEventLog));
|
||||
return RestResponse.ok();
|
||||
}
|
||||
|
@ -11,7 +11,7 @@ import com.mindskip.xzs.service.UserTokenService;
|
||||
import com.mindskip.xzs.utility.WxUtil;
|
||||
import com.mindskip.xzs.viewmodel.wx.student.user.BindInfo;
|
||||
import com.mindskip.xzs.domain.User;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@ -21,7 +21,6 @@ import javax.validation.constraints.NotBlank;
|
||||
|
||||
@Controller("WXStudentAuthController")
|
||||
@RequestMapping(value = "/api/wx/student/auth")
|
||||
@AllArgsConstructor
|
||||
@ResponseBody
|
||||
public class AuthController extends BaseWXApiController {
|
||||
|
||||
@ -30,6 +29,14 @@ public class AuthController extends BaseWXApiController {
|
||||
private final UserService userService;
|
||||
private final UserTokenService userTokenService;
|
||||
|
||||
@Autowired
|
||||
public AuthController(SystemConfig systemConfig, AuthenticationService authenticationService, UserService userService, UserTokenService userTokenService) {
|
||||
this.systemConfig = systemConfig;
|
||||
this.authenticationService = authenticationService;
|
||||
this.userService = userService;
|
||||
this.userTokenService = userTokenService;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/bind", method = RequestMethod.POST)
|
||||
public RestResponse bind(@Valid BindInfo model) {
|
||||
User user = userService.getUserByUserName(model.getUserName());
|
||||
|
@ -16,8 +16,7 @@ import com.mindskip.xzs.service.TextContentService;
|
||||
import com.mindskip.xzs.utility.DateTimeUtil;
|
||||
import com.mindskip.xzs.utility.JsonUtil;
|
||||
import com.mindskip.xzs.viewmodel.student.dashboard.*;
|
||||
import com.mindskip.xzs.viewmodel.student.dashboard.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMethod;
|
||||
@ -31,7 +30,6 @@ import java.util.stream.Collectors;
|
||||
|
||||
@Controller("WXStudentDashboardController")
|
||||
@RequestMapping(value = "/api/wx/student/dashboard")
|
||||
@AllArgsConstructor
|
||||
@ResponseBody
|
||||
public class DashboardController extends BaseWXApiController {
|
||||
|
||||
@ -40,6 +38,14 @@ public class DashboardController extends BaseWXApiController {
|
||||
private final TaskExamService taskExamService;
|
||||
private final TaskExamCustomerAnswerService taskExamCustomerAnswerService;
|
||||
|
||||
@Autowired
|
||||
public DashboardController(ExamPaperService examPaperService, TextContentService textContentService, TaskExamService taskExamService, TaskExamCustomerAnswerService taskExamCustomerAnswerService) {
|
||||
this.examPaperService = examPaperService;
|
||||
this.textContentService = textContentService;
|
||||
this.taskExamService = taskExamService;
|
||||
this.taskExamCustomerAnswerService = taskExamCustomerAnswerService;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/index", method = RequestMethod.POST)
|
||||
public RestResponse<IndexVM> index() {
|
||||
IndexVM indexVM = new IndexVM();
|
||||
|
@ -13,15 +13,13 @@ import com.mindskip.xzs.utility.DateTimeUtil;
|
||||
import com.mindskip.xzs.utility.ExamUtil;
|
||||
import com.mindskip.xzs.utility.PageInfoHelper;
|
||||
import com.mindskip.xzs.viewmodel.admin.exam.ExamPaperEditRequestVM;
|
||||
import com.mindskip.xzs.viewmodel.student.exam.*;
|
||||
import com.mindskip.xzs.viewmodel.student.exampaper.ExamPaperAnswerPageResponseVM;
|
||||
import com.mindskip.xzs.viewmodel.student.exampaper.ExamPaperAnswerPageVM;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.mindskip.xzs.domain.*;
|
||||
import com.mindskip.xzs.viewmodel.student.exam.ExamPaperReadVM;
|
||||
import com.mindskip.xzs.viewmodel.student.exam.ExamPaperSubmitItemVM;
|
||||
import com.mindskip.xzs.viewmodel.student.exam.ExamPaperSubmitVM;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.ApplicationEventPublisher;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@ -34,7 +32,6 @@ import java.util.stream.Collectors;
|
||||
|
||||
@Controller("WXStudentExamPaperAnswerController")
|
||||
@RequestMapping(value = "/api/wx/student/exampaper/answer")
|
||||
@AllArgsConstructor
|
||||
@ResponseBody
|
||||
public class ExamPaperAnswerController extends BaseWXApiController {
|
||||
|
||||
@ -43,6 +40,14 @@ public class ExamPaperAnswerController extends BaseWXApiController {
|
||||
private final ApplicationEventPublisher eventPublisher;
|
||||
private final ExamPaperService examPaperService;
|
||||
|
||||
@Autowired
|
||||
public ExamPaperAnswerController(ExamPaperAnswerService examPaperAnswerService, SubjectService subjectService, ApplicationEventPublisher eventPublisher, ExamPaperService examPaperService) {
|
||||
this.examPaperAnswerService = examPaperAnswerService;
|
||||
this.subjectService = subjectService;
|
||||
this.eventPublisher = eventPublisher;
|
||||
this.examPaperService = examPaperService;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/pageList", method = RequestMethod.POST)
|
||||
public RestResponse<PageInfo<ExamPaperAnswerPageResponseVM>> pageList(@Valid ExamPaperAnswerPageVM model) {
|
||||
model.setCreateUser(getCurrentUser().getId());
|
||||
|
@ -12,7 +12,7 @@ import com.mindskip.xzs.viewmodel.admin.exam.ExamPaperEditRequestVM;
|
||||
import com.mindskip.xzs.viewmodel.student.exam.ExamPaperPageResponseVM;
|
||||
import com.mindskip.xzs.viewmodel.student.exam.ExamPaperPageVM;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@ -21,13 +21,18 @@ import javax.validation.Valid;
|
||||
|
||||
@Controller("WXStudentExamController")
|
||||
@RequestMapping(value = "/api/wx/student/exampaper")
|
||||
@AllArgsConstructor
|
||||
@ResponseBody
|
||||
public class ExamPaperController extends BaseWXApiController {
|
||||
|
||||
private final ExamPaperService examPaperService;
|
||||
private final SubjectService subjectService;
|
||||
|
||||
@Autowired
|
||||
public ExamPaperController(ExamPaperService examPaperService, SubjectService subjectService) {
|
||||
this.examPaperService = examPaperService;
|
||||
this.subjectService = subjectService;
|
||||
}
|
||||
|
||||
|
||||
@RequestMapping(value = "/select/{id}", method = RequestMethod.POST)
|
||||
public RestResponse<ExamPaperEditRequestVM> select(@PathVariable Integer id) {
|
||||
|
@ -17,9 +17,8 @@ import com.mindskip.xzs.utility.DateTimeUtil;
|
||||
import com.mindskip.xzs.utility.PageInfoHelper;
|
||||
import com.mindskip.xzs.viewmodel.student.user.*;
|
||||
import com.github.pagehelper.PageInfo;
|
||||
import com.mindskip.xzs.viewmodel.student.user.*;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.ApplicationEventPublisher;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
@ -36,7 +35,6 @@ import java.util.stream.Collectors;
|
||||
*/
|
||||
@Controller("WXStudentUserController")
|
||||
@RequestMapping(value = "/api/wx/student/user")
|
||||
@AllArgsConstructor
|
||||
@ResponseBody
|
||||
public class UserController extends BaseWXApiController {
|
||||
|
||||
@ -46,6 +44,15 @@ public class UserController extends BaseWXApiController {
|
||||
private final AuthenticationService authenticationService;
|
||||
private final ApplicationEventPublisher eventPublisher;
|
||||
|
||||
@Autowired
|
||||
public UserController(UserService userService, UserEventLogService userEventLogService, MessageService messageService, AuthenticationService authenticationService, ApplicationEventPublisher eventPublisher) {
|
||||
this.userService = userService;
|
||||
this.userEventLogService = userEventLogService;
|
||||
this.messageService = messageService;
|
||||
this.authenticationService = authenticationService;
|
||||
this.eventPublisher = eventPublisher;
|
||||
}
|
||||
|
||||
@RequestMapping(value = "/current", method = RequestMethod.POST)
|
||||
public RestResponse<UserResponseVM> current() {
|
||||
User user = getCurrentUser();
|
||||
@ -71,7 +78,7 @@ public class UserController extends BaseWXApiController {
|
||||
user.setDeleted(false);
|
||||
userService.insertByFilter(user);
|
||||
UserEventLog userEventLog = new UserEventLog(user.getId(), user.getUserName(), user.getRealName(), new Date());
|
||||
userEventLog.setContent("欢迎 " + user.getUserName() + " 注册来到Tek Systems出题系统");
|
||||
userEventLog.setContent("欢迎 " + user.getUserName() + " 注册来到学之思考试系统");
|
||||
eventPublisher.publishEvent(new UserEvent(userEventLog));
|
||||
return RestResponse.ok();
|
||||
}
|
||||
|
@ -1,13 +0,0 @@
|
||||
package com.mindskip.xzs.domain;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@AllArgsConstructor
|
||||
public class AllSkillAndIndustry {
|
||||
private List<Skill> skills;
|
||||
private List<Industry> industries;
|
||||
}
|
@ -1,12 +1,34 @@
|
||||
package com.mindskip.xzs.domain;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class ExamPaperAnswerInfo {
|
||||
public ExamPaper examPaper;
|
||||
public ExamPaperAnswer examPaperAnswer;
|
||||
public List<ExamPaperQuestionCustomerAnswer> examPaperQuestionCustomerAnswers;
|
||||
|
||||
public ExamPaper getExamPaper() {
|
||||
return examPaper;
|
||||
}
|
||||
|
||||
public void setExamPaper(ExamPaper examPaper) {
|
||||
this.examPaper = examPaper;
|
||||
}
|
||||
|
||||
public ExamPaperAnswer getExamPaperAnswer() {
|
||||
return examPaperAnswer;
|
||||
}
|
||||
|
||||
public void setExamPaperAnswer(ExamPaperAnswer examPaperAnswer) {
|
||||
this.examPaperAnswer = examPaperAnswer;
|
||||
}
|
||||
|
||||
public List<ExamPaperQuestionCustomerAnswer> getExamPaperQuestionCustomerAnswers() {
|
||||
return examPaperQuestionCustomerAnswers;
|
||||
}
|
||||
|
||||
public void setExamPaperQuestionCustomerAnswers(List<ExamPaperQuestionCustomerAnswer> examPaperQuestionCustomerAnswers) {
|
||||
this.examPaperQuestionCustomerAnswers = examPaperQuestionCustomerAnswers;
|
||||
}
|
||||
}
|
||||
|
@ -1,37 +0,0 @@
|
||||
package com.mindskip.xzs.domain;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* t_industry
|
||||
*
|
||||
* @author
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class Industry implements Serializable {
|
||||
private Integer id;
|
||||
|
||||
private String name;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
}
|
@ -17,14 +17,6 @@ public class Question implements Serializable {
|
||||
|
||||
private Integer subjectId;
|
||||
|
||||
private Integer industryId;
|
||||
|
||||
private String industryName;
|
||||
|
||||
private Integer skillId;
|
||||
|
||||
private String skillName;
|
||||
|
||||
private Integer score;
|
||||
|
||||
private Integer gradeLevel;
|
||||
@ -43,8 +35,6 @@ public class Question implements Serializable {
|
||||
|
||||
private Boolean deleted;
|
||||
|
||||
private String content;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
@ -53,14 +43,6 @@ public class Question implements Serializable {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
public void setContent(String content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public Integer getQuestionType() {
|
||||
return questionType;
|
||||
}
|
||||
@ -77,38 +59,6 @@ public class Question implements Serializable {
|
||||
this.subjectId = subjectId;
|
||||
}
|
||||
|
||||
public String getIndustryName() {
|
||||
return industryName;
|
||||
}
|
||||
|
||||
public void setIndustryName(String industryName) {
|
||||
this.industryName = industryName;
|
||||
}
|
||||
|
||||
public String getSkillName() {
|
||||
return skillName;
|
||||
}
|
||||
|
||||
public void setSkillName(String skillName) {
|
||||
this.skillName = skillName;
|
||||
}
|
||||
|
||||
public Integer getIndustryId() {
|
||||
return industryId;
|
||||
}
|
||||
|
||||
public void setIndustryId(Integer industryId) {
|
||||
this.industryId = industryId;
|
||||
}
|
||||
|
||||
public Integer getSkillId() {
|
||||
return skillId;
|
||||
}
|
||||
|
||||
public void setSkillId(Integer skillId) {
|
||||
this.skillId = skillId;
|
||||
}
|
||||
|
||||
public Integer getScore() {
|
||||
return score;
|
||||
}
|
||||
|
@ -1,37 +0,0 @@
|
||||
package com.mindskip.xzs.domain;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
/**
|
||||
* t_industry
|
||||
*
|
||||
* @author
|
||||
*/
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class Skill implements Serializable {
|
||||
private Integer id;
|
||||
|
||||
private String name;
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
}
|
@ -1,9 +1,22 @@
|
||||
package com.mindskip.xzs.domain.exam;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ExamPaperQuestionItemObject {
|
||||
private Integer id;
|
||||
private Integer itemOrder;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Integer getItemOrder() {
|
||||
return itemOrder;
|
||||
}
|
||||
|
||||
public void setItemOrder(Integer itemOrder) {
|
||||
this.itemOrder = itemOrder;
|
||||
}
|
||||
}
|
||||
|
@ -1,13 +1,27 @@
|
||||
package com.mindskip.xzs.domain.exam;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class ExamPaperTitleItemObject {
|
||||
|
||||
private String name;
|
||||
|
||||
private List<ExamPaperQuestionItemObject> questionItems;
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public List<ExamPaperQuestionItemObject> getQuestionItems() {
|
||||
return questionItems;
|
||||
}
|
||||
|
||||
public void setQuestionItems(List<ExamPaperQuestionItemObject> questionItems) {
|
||||
this.questionItems = questionItems;
|
||||
}
|
||||
}
|
||||
|
@ -1,10 +1,32 @@
|
||||
package com.mindskip.xzs.domain.other;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class ExamPaperAnswerUpdate {
|
||||
private Integer id;
|
||||
private Integer customerScore;
|
||||
private Boolean doRight;
|
||||
|
||||
public Integer getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public void setId(Integer id) {
|
||||
this.id = id;
|
||||
}
|
||||
|
||||
public Integer getCustomerScore() {
|
||||
return customerScore;
|
||||
}
|
||||
|
||||
public void setCustomerScore(Integer customerScore) {
|
||||
this.customerScore = customerScore;
|
||||
}
|
||||
|
||||
public Boolean getDoRight() {
|
||||
return doRight;
|
||||
}
|
||||
|
||||
public void setDoRight(Boolean doRight) {
|
||||
this.doRight = doRight;
|
||||
}
|
||||
}
|
||||
|
@ -1,11 +1,24 @@
|
||||
package com.mindskip.xzs.domain.other;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class KeyValue {
|
||||
|
||||
private String name;
|
||||
private Integer value;
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public Integer getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(Integer value) {
|
||||
this.value = value;
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,6 @@
|
||||
package com.mindskip.xzs.domain.question;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class QuestionItemObject {
|
||||
|
||||
private String prefix;
|
||||
@ -10,4 +8,28 @@ public class QuestionItemObject {
|
||||
private String content;
|
||||
|
||||
private Integer score;
|
||||
|
||||
public String getPrefix() {
|
||||
return prefix;
|
||||
}
|
||||
|
||||
public void setPrefix(String prefix) {
|
||||
this.prefix = prefix;
|
||||
}
|
||||
|
||||
public String getContent() {
|
||||
return content;
|
||||
}
|
||||
|
||||
public void setContent(String content) {
|
||||
this.content = content;
|
||||
}
|
||||
|
||||
public Integer getScore() {
|
||||
return score;
|
||||
}
|
||||
|
||||
public void setScore(Integer score) {
|
||||
this.score = score;
|
||||
}
|
||||
}
|
||||
|
@ -1,11 +1,9 @@
|
||||
package com.mindskip.xzs.domain.question;
|
||||
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
public class QuestionObject {
|
||||
|
||||
private String titleContent;
|
||||
@ -15,4 +13,36 @@ public class QuestionObject {
|
||||
private List<QuestionItemObject> questionItemObjects;
|
||||
|
||||
private String correct;
|
||||
|
||||
public String getTitleContent() {
|
||||
return titleContent;
|
||||
}
|
||||
|
||||
public void setTitleContent(String titleContent) {
|
||||
this.titleContent = titleContent;
|
||||
}
|
||||
|
||||
public String getAnalyze() {
|
||||
return analyze;
|
||||
}
|
||||
|
||||
public void setAnalyze(String analyze) {
|
||||
this.analyze = analyze;
|
||||
}
|
||||
|
||||
public List<QuestionItemObject> getQuestionItemObjects() {
|
||||
return questionItemObjects;
|
||||
}
|
||||
|
||||
public void setQuestionItemObjects(List<QuestionItemObject> questionItemObjects) {
|
||||
this.questionItemObjects = questionItemObjects;
|
||||
}
|
||||
|
||||
public String getCorrect() {
|
||||
return correct;
|
||||
}
|
||||
|
||||
public void setCorrect(String correct) {
|
||||
this.correct = correct;
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,6 @@
|
||||
package com.mindskip.xzs.domain.task;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class TaskItemAnswerObject {
|
||||
private Integer examPaperId;
|
||||
private Integer examPaperAnswerId;
|
||||
@ -17,4 +15,28 @@ public class TaskItemAnswerObject {
|
||||
this.examPaperAnswerId = examPaperAnswerId;
|
||||
this.status = status;
|
||||
}
|
||||
|
||||
public Integer getExamPaperId() {
|
||||
return examPaperId;
|
||||
}
|
||||
|
||||
public void setExamPaperId(Integer examPaperId) {
|
||||
this.examPaperId = examPaperId;
|
||||
}
|
||||
|
||||
public Integer getExamPaperAnswerId() {
|
||||
return examPaperAnswerId;
|
||||
}
|
||||
|
||||
public void setExamPaperAnswerId(Integer examPaperAnswerId) {
|
||||
this.examPaperAnswerId = examPaperAnswerId;
|
||||
}
|
||||
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(Integer status) {
|
||||
this.status = status;
|
||||
}
|
||||
}
|
||||
|
@ -1,10 +1,32 @@
|
||||
package com.mindskip.xzs.domain.task;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
@Data
|
||||
public class TaskItemObject {
|
||||
private Integer examPaperId;
|
||||
private String examPaperName;
|
||||
private Integer itemOrder;
|
||||
|
||||
public Integer getExamPaperId() {
|
||||
return examPaperId;
|
||||
}
|
||||
|
||||
public void setExamPaperId(Integer examPaperId) {
|
||||
this.examPaperId = examPaperId;
|
||||
}
|
||||
|
||||
public String getExamPaperName() {
|
||||
return examPaperName;
|
||||
}
|
||||
|
||||
public void setExamPaperName(String examPaperName) {
|
||||
this.examPaperName = examPaperName;
|
||||
}
|
||||
|
||||
public Integer getItemOrder() {
|
||||
return itemOrder;
|
||||
}
|
||||
|
||||
public void setItemOrder(Integer itemOrder) {
|
||||
this.itemOrder = itemOrder;
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,5 @@
|
||||
package com.mindskip.xzs.listener;
|
||||
|
||||
import com.mindskip.xzs.domain.*;
|
||||
import com.mindskip.xzs.domain.*;
|
||||
import com.mindskip.xzs.domain.enums.ExamPaperTypeEnum;
|
||||
import com.mindskip.xzs.domain.enums.QuestionTypeEnum;
|
||||
@ -9,7 +8,7 @@ import com.mindskip.xzs.service.ExamPaperAnswerService;
|
||||
import com.mindskip.xzs.service.ExamPaperQuestionCustomerAnswerService;
|
||||
import com.mindskip.xzs.service.TaskExamCustomerAnswerService;
|
||||
import com.mindskip.xzs.service.TextContentService;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.ApplicationListener;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
@ -22,15 +21,21 @@ import java.util.List;
|
||||
* @author 武汉思维跳跃科技有限公司
|
||||
*/
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class CalculateExamPaperAnswerListener implements ApplicationListener<CalculateExamPaperAnswerCompleteEvent> {
|
||||
|
||||
|
||||
private final ExamPaperAnswerService examPaperAnswerService;
|
||||
private final ExamPaperQuestionCustomerAnswerService examPaperQuestionCustomerAnswerService;
|
||||
private final TextContentService textContentService;
|
||||
private final TaskExamCustomerAnswerService examCustomerAnswerService;
|
||||
|
||||
@Autowired
|
||||
public CalculateExamPaperAnswerListener(ExamPaperAnswerService examPaperAnswerService, ExamPaperQuestionCustomerAnswerService examPaperQuestionCustomerAnswerService, TextContentService textContentService, TaskExamCustomerAnswerService examCustomerAnswerService) {
|
||||
this.examPaperAnswerService = examPaperAnswerService;
|
||||
this.examPaperQuestionCustomerAnswerService = examPaperQuestionCustomerAnswerService;
|
||||
this.textContentService = textContentService;
|
||||
this.examCustomerAnswerService = examCustomerAnswerService;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public void onApplicationEvent(CalculateExamPaperAnswerCompleteEvent calculateExamPaperAnswerCompleteEvent) {
|
||||
|
@ -2,15 +2,19 @@ package com.mindskip.xzs.listener;
|
||||
|
||||
import com.mindskip.xzs.event.UserEvent;
|
||||
import com.mindskip.xzs.service.UserEventLogService;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.ApplicationListener;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
@Component
|
||||
@AllArgsConstructor
|
||||
public class UserLogListener implements ApplicationListener<UserEvent> {
|
||||
|
||||
private UserEventLogService userEventLogService;
|
||||
private final UserEventLogService userEventLogService;
|
||||
|
||||
@Autowired
|
||||
public UserLogListener(UserEventLogService userEventLogService) {
|
||||
this.userEventLogService = userEventLogService;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onApplicationEvent(UserEvent userEvent) {
|
||||
|
@ -1,29 +0,0 @@
|
||||
package com.mindskip.xzs.repository;
|
||||
|
||||
import com.mindskip.xzs.domain.Industry;
|
||||
import com.mindskip.xzs.domain.Subject;
|
||||
import com.mindskip.xzs.viewmodel.admin.industry.IndustryEditRequestVM;
|
||||
import com.mindskip.xzs.viewmodel.admin.industry.IndustryPageRequestVM;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface IndustryMapper extends BaseMapper<Industry> {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(Industry record);
|
||||
|
||||
int insertSelective(Industry record);
|
||||
|
||||
Industry selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(Industry record);
|
||||
|
||||
int updateByPrimaryKey(Industry record);
|
||||
|
||||
List<Industry> page(IndustryPageRequestVM requestVM);
|
||||
|
||||
List<Industry> allIndustry();
|
||||
|
||||
}
|
@ -1,9 +1,8 @@
|
||||
package com.mindskip.xzs.repository;
|
||||
|
||||
import com.mindskip.xzs.domain.Question;
|
||||
import com.mindskip.xzs.domain.other.KeyValue;
|
||||
import com.mindskip.xzs.domain.Question;
|
||||
import com.mindskip.xzs.viewmodel.admin.question.QuestionPageRequestVM;
|
||||
import com.mindskip.xzs.viewmodel.student.exam.EachPaperProductionVM;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
@ -30,11 +29,5 @@ public interface QuestionMapper extends BaseMapper<Question> {
|
||||
|
||||
Integer selectAllCount();
|
||||
|
||||
List<KeyValue> selectCountByDate(@Param("startTime") Date startTime, @Param("endTime") Date endTime);
|
||||
|
||||
List<Question> selectQuestionsByQuestionsNumber(@Param("eachList") List<EachPaperProductionVM> eachList);
|
||||
|
||||
List<Question> selectAllSkills();
|
||||
|
||||
List<Question> selectAllIndustry();
|
||||
List<KeyValue> selectCountByDate(@Param("startTime") Date startTime,@Param("endTime") Date endTime);
|
||||
}
|
||||
|
@ -1,27 +0,0 @@
|
||||
package com.mindskip.xzs.repository;
|
||||
|
||||
import com.mindskip.xzs.domain.Skill;
|
||||
import com.mindskip.xzs.viewmodel.admin.skill.SkillPageRequestVM;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
public interface SkillMapper extends BaseMapper<Skill> {
|
||||
int deleteByPrimaryKey(Integer id);
|
||||
|
||||
int insert(Skill record);
|
||||
|
||||
int insertSelective(Skill record);
|
||||
|
||||
Skill selectByPrimaryKey(Integer id);
|
||||
|
||||
int updateByPrimaryKeySelective(Skill record);
|
||||
|
||||
int updateByPrimaryKey(Skill record);
|
||||
|
||||
List<Skill> page(SkillPageRequestVM requestVM);
|
||||
|
||||
List<Skill> allSkill();
|
||||
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user