yujialong 4 years ago
parent 92daa966b2
commit 356f120dcd
  1. 197
      README.md
  2. 196
      README_EN.md
  3. BIN
      screenshots/wms1.png
  4. BIN
      screenshots/wms2.png
  5. BIN
      screenshots/wms3.png
  6. 10
      src/App.vue
  7. 201
      src/api/index.js
  8. 28
      src/assets/css/color-dark.css
  9. 4
      src/assets/css/icon.css
  10. 384
      src/assets/css/main.css
  11. 29
      src/assets/css/theme-green/color-green.css
  12. BIN
      src/assets/css/theme-green/fonts/element-icons.ttf
  13. BIN
      src/assets/css/theme-green/fonts/element-icons.woff
  14. 1
      src/assets/css/theme-green/index.css
  15. BIN
      src/assets/img/images/back_02.png
  16. BIN
      src/assets/img/login-bg.png
  17. 0
      src/assets/svg/edit.svg
  18. 63
      src/components/achiStatistics/index.vue
  19. 216
      src/components/doReview/index.vue
  20. 34
      src/components/testPaperDetail/index.vue
  21. 2
      src/layouts/header/index.vue
  22. 9
      src/libs/util.js
  23. 5
      src/main.js
  24. 11
      src/pages/account/login/index.vue
  25. 263
      src/pages/achievement/detail/index.vue
  26. 143
      src/pages/achievement/list/examResults.vue
  27. 2
      src/pages/achievement/list/index.vue
  28. 57
      src/pages/achievement/list/practiceResults.vue
  29. 12
      src/pages/achievement/list/wrongBook.vue
  30. 24
      src/pages/assessment/add/index.vue
  31. 340
      src/pages/assessment/list/index.vue
  32. 96
      src/pages/assessment/review/index.vue
  33. 12
      src/pages/assessment/scoreQuery/index.vue
  34. 211
      src/pages/quesBank/list/globalQuesBank.vue
  35. 2
      src/pages/quesBank/list/index.vue
  36. 518
      src/pages/quesBank/list/myQuesBank.vue
  37. 543
      src/pages/quesBank/list/quesDialog.vue
  38. 2
      src/pages/setting/person/index.vue
  39. 132
      src/pages/student/list/index.vue
  40. 65
      src/pages/student/list/studentSide.vue
  41. 11
      src/pages/student/list/studentTree.vue
  42. 8
      src/pages/system/list/role.vue
  43. 19
      src/pages/system/list/staff.vue
  44. 4
      src/pages/system/list/staffSide.vue
  45. 2
      src/pages/testPaper/add/index.vue
  46. 22
      src/pages/testPaper/list/allTestPaper.vue
  47. 2
      src/pages/testPaper/list/index.vue
  48. 25
      src/pages/testPaper/list/myTestPaper.vue
  49. 12
      src/pages/testPaper/review/index.vue
  50. 6
      src/router/modules/achievement.js
  51. 4
      src/setting.js
  52. 28
      src/store/modules/achievement.js
  53. 96
      src/store/modules/assessment.js
  54. 13
      src/store/modules/testpaper.js
  55. 145
      src/styles/common.scss
  56. 7
      src/styles/default/index.scss
  57. 0
      src/styles/font/icon/demo.css
  58. 0
      src/styles/font/icon/demo_index.html
  59. 0
      src/styles/font/icon/iconfont.css
  60. 0
      src/styles/font/icon/iconfont.eot
  61. 0
      src/styles/font/icon/iconfont.js
  62. 0
      src/styles/font/icon/iconfont.json
  63. 0
      src/styles/font/icon/iconfont.svg
  64. 0
      src/styles/font/icon/iconfont.ttf
  65. 0
      src/styles/font/icon/iconfont.woff
  66. 0
      src/styles/font/icon/iconfont.woff2
  67. 3
      src/styles/font/iconfont.css
  68. 6
      src/styles/index.scss
  69. 13
      src/styles/layout/index.scss
  70. 375
      src/styles/lib/_reset.scss
  71. 3
      src/styles/lib/_style.scss
  72. 80
      src/styles/lib/_var.scss
  73. 7
      src/styles/lib/background.scss
  74. 78
      src/styles/lib/border.scss
  75. 56
      src/styles/lib/box.scss
  76. 5
      src/styles/lib/cursor.scss
  77. 15
      src/styles/lib/display.scss
  78. 54
      src/styles/lib/flex.scss
  79. 16
      src/styles/lib/float.scss
  80. 41
      src/styles/lib/font-size.scss
  81. 17
      src/styles/lib/font-weight.scss
  82. 28
      src/styles/lib/index.scss
  83. 24
      src/styles/lib/line-height.scss
  84. 13
      src/styles/lib/link.scss
  85. 11
      src/styles/lib/overflow.scss
  86. 16
      src/styles/lib/position.scss
  87. 53
      src/styles/lib/size.scss
  88. 8
      src/styles/lib/text-align.scss
  89. 7
      src/styles/lib/text-color.scss
  90. 7
      src/styles/lib/vertical-align.scss
  91. 7
      src/styles/lib/visibility.scss
  92. 5
      src/styles/lib/white-space.scss
  93. 2
      src/styles/setting.scss

@ -1,197 +0,0 @@
# vue-manage-system
<a href="https://github.com/vuejs/vue">
<img src="https://img.shields.io/badge/vue-2.6.10-brightgreen.svg" alt="vue">
</a>
<a href="https://github.com/ElemeFE/element">
<img src="https://img.shields.io/badge/element--ui-2.8.2-brightgreen.svg" alt="element-ui">
</a>
<a href="https://github.com/lin-xin/vue-manage-system/blob/master/LICENSE">
<img src="https://img.shields.io/github/license/mashape/apistatus.svg" alt="license">
</a>
<a href="https://github.com/lin-xin/vue-manage-system/releases">
<img src="https://img.shields.io/github/release/lin-xin/vue-manage-system.svg" alt="GitHub release">
</a>
<a href="https://lin-xin.gitee.io/example/work/#/donate">
<img src="https://img.shields.io/badge/%24-donate-ff69b4.svg" alt="donate">
</a>
基于 Vue + Element UI 的后台管理系统解决方案。[线上地址](https://lin-xin.gitee.io/example/work/)
> React + Ant Design 的版本正在开发中,仓库地址:[react-manage-system](https://github.com/lin-xin/react-manage-system)
[English document](https://github.com/lin-xin/manage-system/blob/master/README_EN.md)
## 项目截图
### 登录
![Image text](https://github.com/lin-xin/manage-system/raw/master/screenshots/wms3.png)
### 默认皮肤
![Image text](https://github.com/lin-xin/manage-system/raw/master/screenshots/wms1.png)
### 浅绿色皮肤
![Image text](https://github.com/lin-xin/manage-system/raw/master/screenshots/wms2.png)
## 赞赏
请作者喝杯咖啡吧!(微信号:linxin_20)
![微信扫一扫](https://lin-xin.gitee.io/images/weixin.jpg)
## 特别鸣谢
- [实验楼](https://www.shiyanlou.com?source=vue-manage-system)
## 前言
该方案作为一套多功能的后台框架模板,适用于绝大部分的后台管理系统(Web Management System)开发。基于 vue.js,使用 vue-cli3 脚手架,引用 Element UI 组件库,方便开发快速简洁好看的组件。分离颜色样式,支持手动切换主题色,而且很方便使用自定义主题色。
## 功能
- [x] Element UI
- [x] 登录/注销
- [x] Dashboard
- [x] 表格
- [x] Tab 选项卡
- [x] 表单
- [x] 图表 :bar_chart:
- [x] 富文本编辑器
- [x] markdown 编辑器
- [x] 图片拖拽/裁剪上传
- [x] 支持切换主题色 :sparkles:
- [x] 列表拖拽排序
- [x] 权限测试
- [x] 404 / 403
- [x] 三级菜单
- [x] 自定义图标
- [x] 可拖拽弹窗
- [x] 国际化
## 安装步骤
```
git clone https://github.com/lin-xin/vue-manage-system.git // 把模板下载到本地
cd vue-manage-system // 进入模板目录
npm install // 安装项目依赖,等待安装完成之后,安装失败可用 cnpm 或 yarn
// 开启服务器,浏览器访问 http://localhost:8080
npm run serve
// 执行构建命令,生成的dist文件夹放在服务器下即可访问
npm run build
```
## 组件使用说明与演示
### vue-schart
vue.js 封装 sChart.js 的图表组件。访问地址:[vue-schart](https://github.com/linxin/vue-schart)
<p><a href="https://www.npmjs.com/package/vue-schart"><img src="https://img.shields.io/npm/dm/vue-schart.svg" alt="Downloads"></a></p>
```html
<template>
<div>
<schart class="wrapper" canvasId="myCanvas" :options="options"></schart>
</div>
</template>
<script>
import Schart from 'vue-schart'; // 导入Schart组件
export default {
data() {
return {
options: {
type: 'bar',
title: {
text: '最近一周各品类销售图'
},
labels: ['周一', '周二', '周三', '周四', '周五'],
datasets: [
{
label: '家电',
data: [234, 278, 270, 190, 230]
},
{
label: '百货',
data: [164, 178, 190, 135, 160]
},
{
label: '食品',
data: [144, 198, 150, 235, 120]
}
]
}
};
},
components: {
Schart
}
};
</script>
<style>
.wrapper {
width: 7rem;
height: 5rem;
}
</style>
```
## 其他注意事项
### 一、如果我不想用到上面的某些组件呢,那我怎么在模板中删除掉不影响到其他功能呢?
举个栗子,我不想用 Vue-Quill-Editor 这个组件,那我需要分四步走。
第一步:删除该组件的路由,在目录 src/router/index.js 中,找到引入改组件的路由,删除下面这段代码。
```JavaScript
{
// 富文本编辑器组件
path: '/editor',
component: resolve => require(['../components/page/VueEditor.vue'], resolve)
},
```
第二步:删除引入该组件的文件。在目录 src/components/page/ 删除 VueEditor.vue 文件。
第三步:删除该页面的入口。在目录 src/components/common/Sidebar.vue 中,找到该入口,删除下面这段代码。
```js
{
index: 'editor',
title: '富文本编辑器'
},
```
第四步:卸载该组件。执行以下命令:
npm un vue-quill-editor -S
完成。
### 二、如何切换主题色呢?
第一步:打开 src/main.js 文件,找到引入 element 样式的地方,换成浅绿色主题。
```javascript
import 'element-ui/lib/theme-default/index.css'; // 默认主题
// import './assets/css/theme-green/index.css'; // 浅绿色主题
```
第二步:打开 src/App.vue 文件,找到 style 标签引入样式的地方,切换成浅绿色主题。
```javascript
@import "./assets/css/main.css";
@import "./assets/css/color-dark.css"; /*深色主题*/
/*@import "./assets/css/theme-green/color-green.css"; !*浅绿色主题*!*/
```
第三步:打开 src/components/common/Sidebar.vue 文件,找到 el-menu 标签,把 background-color/text-color/active-text-color 属性去掉即可。
## License
[MIT](https://github.com/lin-xin/vue-manage-system/blob/master/LICENSE)

@ -1,196 +0,0 @@
# vue-manage-system
<a href="https://github.com/vuejs/vue">
<img src="https://img.shields.io/badge/vue-2.6.10-brightgreen.svg" alt="vue">
</a>
<a href="https://github.com/ElemeFE/element">
<img src="https://img.shields.io/badge/element--ui-2.8.2-brightgreen.svg" alt="element-ui">
</a>
<a href="https://github.com/lin-xin/vue-manage-system/blob/master/LICENSE">
<img src="https://img.shields.io/github/license/mashape/apistatus.svg" alt="license">
</a>
<a href="https://github.com/lin-xin/vue-manage-system/releases">
<img src="https://img.shields.io/github/release/lin-xin/vue-manage-system.svg" alt="GitHub release">
</a>
<a href="https://lin-xin.gitee.io/example/work/#/donate">
<img src="https://img.shields.io/badge/%24-donate-ff69b4.svg" alt="donate">
</a>
The web management system solution based on Vue2 and Element-UI。[live demo](https://lin-xin.gitee.io/example/work/)
## Donation
![WeChat](https://lin-xin.gitee.io/images/weixin.jpg)
## Preface
The scheme as a set of multi-function background frame templates, suitable for most of the WEB management system development. Convenient development fast simple good components based on Vue2 and Element-UI. Color separation of color style, support manual switch themes, and it is convenient to use a custom theme color.
## Function
- [x] Element-UI
- [x] Login/Logout
- [x] Dashboard
- [x] Table
- [x] Tabs
- [x] From
- [x] Chart :bar_chart:
- [x] Editor
- [x] Markdown
- [x] Upload pictures by clipping or dragging
- [x] Support manual switch themes :sparkles:
- [x] List drag sort
- [x] Permission
- [x] 404 / 403
- [x] Three level menu
- [x] Custom icon
## Installation steps
git clone https://github.com/lin-xin/vue-manage-system.git // Clone templates
cd vue-manage-system // Enter template directory
npm install // Installation dependency
## Local development
// Open server and access http://localhost:8080 in browser
npm run serve
## Constructing production
// Constructing project
npm run build
## Component description and presentation
### vue-schart
Vue.js wrapper for sChart.js. Github : [vue-schart](https://github.com/linxin/vue-schart)
```html
<template>
<div>
<schart class="wrapper" canvasId="myCanvas" :options="options"></schart>
</div>
</template>
<script>
import Schart from 'vue-schart'; // 导入Schart组件
export default {
data() {
return {
options: {
type: 'bar',
title: {
text: '最近一周各品类销售图'
},
labels: ['周一', '周二', '周三', '周四', '周五'],
datasets: [
{
label: '家电',
data: [234, 278, 270, 190, 230]
},
{
label: '百货',
data: [164, 178, 190, 135, 160]
},
{
label: '食品',
data: [144, 198, 150, 235, 120]
}
]
}
};
},
components: {
Schart
}
};
</script>
<style>
.wrapper {
width: 7rem;
height: 5rem;
}
</style>
```
### element-ui
A desktop component library based on vue.js2.0 . Github : [element](http://element.eleme.io/#/zh-CN/component/layout)
### Vue-Quill-Editor
Quill editor component for Vue2. Github : [vue-quill-editor](https://github.com/surmon-china/vue-quill-editor)
### mavonEditor
A markdown editor based on Vue that supports a variety of personalized features. Github: [mavonEditor](https://github.com/hinesboy/mavonEditor)
### vue-cropperjs
A Vue wrapper component for cropperjs. Github: [vue-cropperjs](https://github.com/Agontuk/vue-cropperjs)
## Notice
### 一、If I don't want to use some components, how can I delete it?
For example, I don't want to use the Vue-Quill-Editor component, I need to take four steps.
The first step to remove the component of the routing. Enter 'src/router/index.js' and delete the code below.
```JavaScript
{
path: '/editor',
component: resolve => require(['../components/page/VueEditor.vue'], resolve)
},
```
Second,delete the component files. Enter 'src/components/page/' and delete 'VueEditor.vue' file.
The third step is to delete the entry. Enter 'src/components/common/Sidebar.vue' and delete the code below.
```js
{
index: 'editor',
title: '富文本编辑器'
},
```
Finally, uninstall this component.
npm un vue-quill-editor -S
Complete!
### 二、How to switch themes?
The first step to enter 'src/main.js' and change into green theme.
```javascript
import 'element-ui/lib/theme-default/index.css'; // default theme
// import '../static/css/theme-green/index.css'; // green theme
```
The second step to enter 'src/App.vue' and change into green theme.
```javascript
@import "../static/css/main.css";
@import "../static/css/color-dark.css"; /*深色主题*/
/*@import "../static/css/theme-green/color-green.css"; !*浅绿色主题*!*/
```
Finally,enter 'src/components/common/Sidebar.vue' and find el-menu Tags,delete 'background-color/text-color/active-text-color'。
## Screenshot
### Default theme
![Image text](https://github.com/lin-xin/manage-system/raw/master/screenshots/wms1.png)
### Green theme
![Image text](https://github.com/lin-xin/manage-system/raw/master/screenshots/wms2.png)
## License
[MIT](https://github.com/lin-xin/vue-manage-system/blob/master/LICENSE)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 81 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 KiB

@ -21,12 +21,4 @@
}) })
} }
} }
</script> </script>
<style>
@import "./assets/css/main.css";
/* @import "./assets/css/color-dark.css"; */
/*深色主题*/
@import "./assets/css/theme-green/color-green.css";
/* 浅绿色主题 */
</style>

@ -1,123 +1,146 @@
import Setting from '@/setting';
// let host = Setting.apiBaseURL
let host = 'http://192.168.31.152:8001'//刘本地
// let host = 'http://192.168.31.117'//宁本地
export default { export default {
logins: `${host}/management/userInfo/login`, //登录  logins: `management/userInfo/login`, //登录 
// 查询省份城市 // 查询省份城市
queryProvince: `${host}/enterprise/province/queryProvince`, queryProvince: `enterprise/province/queryProvince`,
queryCity: `${host}/enterprise/city/queryCity`, queryCity: `enterprise/city/queryCity`,
queryClient: `${host}/enterprise/client/list`, queryClient: `enterprise/client/list`,
userinfoUpdate:`${host}/management/userInfo/update`,//个人中心信息修改 userinfoUpdate:`management/userInfo/update`,//个人中心信息修改
userinfo:`${host}/management/userInfo/getUserInfo`,//个人中心信息展示 userinfo:`management/userInfo/getUserInfo`,//个人中心信息展示
getAccount:`${host}/management/userInfo/getAccount`,//账号判重 getAccount:`management/userInfo/getAccount`,//账号判重
// 学生班级 // 学生班级
addClass: `${host}/management/class/addClass`, addClass: `management/class/addClass`,
deleteClass: `${host}/management/class/deleteClass`, deleteClass: `management/class/deleteClass`,
queryClass: `${host}/management/class/queryClass`, queryClass: `management/class/queryClass`,
updateClass: `${host}/management/class/updateClass`, updateClass: `management/class/updateClass`,
// 学生年级 // 学生年级
addGrade: `${host}/management/grade/addGrade`, addGrade: `management/grade/addGrade`,
deleteGrade: `${host}/management/grade/deleteGrade`, deleteGrade: `management/grade/deleteGrade`,
queryGrade: `${host}/management/grade/queryGrade`, queryGrade: `management/grade/queryGrade`,
updateGrade: `${host}/management/grade/updateGrade`, updateGrade: `management/grade/updateGrade`,
// 学生专业组织 // 学生专业组织
addStudentProfessionalArchitecture: `${host}/management/studentProfessionalArchitecture/addStudentProfessionalArchitecture`, addStudentProfessionalArchitecture: `management/studentProfessionalArchitecture/addStudentProfessionalArchitecture`,
deleteStaffProfessionalArchitecture: `${host}/management/studentProfessionalArchitecture/deleteStaffProfessionalArchitecture`, deleteStudentProfessionalArchitecture: `management/studentProfessionalArchitecture/deleteStudentProfessionalArchitecture`,
queryStudentProfessionalArchitecture: `${host}/management/studentProfessionalArchitecture/queryStudentProfessionalArchitecture`, queryStudentPAN: `management/studentProfessionalArchitecture/queryStudentPAN`,
updateStaffProfessionalArchitecture: `${host}/management/studentProfessionalArchitecture/updateStaffProfessionalArchitecture`, queryStudentProfessionalArchitecture: `management/studentProfessionalArchitecture/queryStudentProfessionalArchitecture`,
updateStudentProfessionalArchitecture: `management/studentProfessionalArchitecture/updateStudentProfessionalArchitecture`,
// 学生管理 // 学生管理
addStudent: `${host}/management/student/addStudent`, addStudent: `management/student/addStudent`,
deleteStudents: `${host}/management/student/deleteStudents`, deleteStudents: `management/student/deleteStudents`,
getStudent: `${host}/management/student/getStudent`, getStudent: `management/student/getStudent`,
queryStudent: `${host}/management/student/list`, queryStudent: `management/student/list`,
updateStudent: `${host}/management/student/updateStudent`, updateStudent: `management/student/updateStudent`,
studentGetWorkNumber: `${host}/management/student/getWorkNumber`, studentGetWorkNumber: `management/student/getWorkNumber`,
exportFailureStudent: `${host}/management/student/exportFailure`, exportFailureStudent: `management/student/exportFailure`,
uploadFileStudent: `${host}/management/student/uploadFile`, uploadFileStudent: `management/student/uploadFile`,
downloadStudentTemp: 'http://liuwanr.oss-cn-shenzhen.aliyuncs.com/xlsx/20201102/1604658660956.xlsx', downloadStudentTemp: 'http://liuwanr.oss-cn-shenzhen.aliyuncs.com/xlsx/20201102/1604658660956.xlsx',
// 一级部门 // 一级部门
addStaffPro: `${host}/management/staffProfessionalArchitecture/addStaffProfessionalArchitecture`, addStaffPro: `management/staffProfessionalArchitecture/addStaffProfessionalArchitecture`,
deleteStaffPro: `${host}/management/staffProfessionalArchitecture/deleteStaffProfessionalArchitecture`, deleteStaffPro: `management/staffProfessionalArchitecture/deleteStaffProfessionalArchitecture`,
queryStaffPAN: `${host}/management/staffProfessionalArchitecture/queryStaffPAN`, queryStaffPAN: `management/staffProfessionalArchitecture/queryStaffPAN`,
queryStaffPro: `${host}/management/staffProfessionalArchitecture/queryStaffProfessionalArchitecture`, queryStaffPro: `management/staffProfessionalArchitecture/queryStaffProfessionalArchitecture`,
updateStaffPro: `${host}/management/staffProfessionalArchitecture/updateStaffProfessionalArchitecture`, updateStaffPro: `management/staffProfessionalArchitecture/updateStaffProfessionalArchitecture`,
// 二级部门 // 二级部门
addStaffGrade: `${host}/management/staffGrade/addStaffGrade`, addStaffGrade: `management/staffGrade/addStaffGrade`,
deleteStaffGrade: `${host}/management/staffGrade/deleteStaffGrade`, deleteStaffGrade: `management/staffGrade/deleteStaffGrade`,
queryStaffGrade: `${host}/management/staffGrade/queryStaffGrade`, queryStaffGrade: `management/staffGrade/queryStaffGrade`,
queryStaffName: `${host}/management/staffGrade/queryStaffName`, queryStaffName: `management/staffGrade/queryStaffName`,
updateStaffGrade: `${host}/management/staffGrade/updateStaffGrade`, updateStaffGrade: `management/staffGrade/updateStaffGrade`,
// 员工管理 // 员工管理
addStaff: `${host}/management/staff/addStaff`, addStaff: `management/staff/addStaff`,
deleteStaffs: `${host}/management/staff/deleteStaffs`, deleteStaffs: `management/staff/deleteStaffs`,
getStaff: `${host}/management/staff/getStaff`, getStaff: `management/staff/getStaff`,
queryStaff: `${host}/management/staff/managementList`, queryStaff: `management/staff/managementList`,
updateStaff: `${host}/management/staff/updateStaff`, updateStaff: `management/staff/updateStaff`,
getWorkNumber: `${host}/management/staff/getWorkNumber`, getWorkNumber: `management/staff/getWorkNumber`,
exportFailureStaff: `${host}/management/staff/exportFailure`, exportFailureStaff: `management/staff/exportFailure`,
uploadFileStaff: `${host}/management/staff/uploadFile`, uploadFileStaff: `management/staff/uploadFile`,
downloadStaffTemp: `http://liuwanr.oss-cn-shenzhen.aliyuncs.com/xlsx/20201102/1604658763812.xlsx`, downloadStaffTemp: `http://liuwanr.oss-cn-shenzhen.aliyuncs.com/xlsx/20201102/1604658763812.xlsx`,
// 角色管理 // 角色管理
getRole: `${host}/management/role/get`, getRole: `management/role/get`,
queryRoles: `${host}/management/role/list`, queryRoles: `management/role/list`,
removeRole: `${host}/management/role/batchRemove`, removeRole: `management/role/batchRemove`,
saveOrUpdate: `${host}/management/role/saveOrUpdate`, saveOrUpdate: `management/role/saveOrUpdate`,
// 权限菜单管理 // 权限菜单管理
doAssign: `${host}/management/permission/doAssign`, doAssign: `management/permission/doAssign`,
queryPermissionMenu: `${host}/management/permission/queryManagementPermissionMenu`, queryPermissionMenu: `management/permission/queryManagementPermissionMenu`,
toAssign: `${host}/management/permission/toAssign`, toAssign: `management/permission/toAssign`,
// 视频管理 // 视频管理
fileDeletion: `${host}/oss/manage/fileDeletion`, //批量删除文件 fileDeletion: `oss/manage/fileDeletion`, //批量删除文件
fileupload: `${host}/oss/manage/fileupload`, //文件上传 fileupload: `oss/manage/fileupload`, //文件上传
getPlayAuth: `${host}/oss/manage/getPlayAuth`, //获取播放凭证 getPlayAuth: `oss/manage/getPlayAuth`, //获取播放凭证
removeMoreVideo: `${host}/oss/manage/removeMoreVideo`, //批量删除视频文件 removeMoreVideo: `oss/manage/removeMoreVideo`, //批量删除视频文件
removeVideo: `${host}/oss/manage/removeVideo`, //删除视频文件 removeVideo: `oss/manage/removeVideo`, //删除视频文件
getTypeByOneLever:`${host}/enterprise/questionBank/getTypeByOneLever`, getTypeByOneLever:`enterprise/questionBank/getTypeByOneLever`,
typesList:`${host}/enterprise/questionTypes/typesList`, typesList:`enterprise/questionTypes/typesList`,
// 共享相关 // 共享相关
deleteBySharing:`${host}/management/questionSharing/deleteBySharing`, deleteBySharing:`management/questionSharing/deleteBySharing`,
detailSharing:`${host}/management/questionSharing/detail`, detailSharing:`management/questionSharing/detail`,
getMeSharingInfo:`${host}/management/questionSharing/getMeSharingInfo`, getMeSharingInfo:`management/questionSharing/getMeSharingInfo`,
pageByConditionSharing:`${host}/management/questionSharing/pageByConditionSharing`, pageByConditionSharing:`management/questionSharing/pageByConditionSharing`,
saveSharing:`${host}/management/questionSharing/save`, saveSharing:`management/questionSharing/save`,
batchSave:`enterprise/questionSharing/batchSave`,
cancelByMySharing:`enterprise/questionSharing/cancelByMySharing`,
delByMySharing:`management/questionSharing/delByMySharing`,
deleteByMeSubject:`enterprise/questionSharing/deleteByMeSubject`,
// 试卷管理 // 试卷管理
copyPaper:`${host}/management/testPaper/copyPaper`, copyPaper:`management/testPaper/copyPaper`,
delByMyTestPaper:`${host}/management/testPaper/delByMyTestPaper`, delByMyTestPaper:`management/testPaper/delByMyTestPaper`,
detailtestPaper:`${host}/management/testPaper/detail`, detailtestPaper:`management/testPaper/detail`,
pageBySchoolTestPaper:`${host}/management/testPaper/pageBySchoolTestPaper`, pageBySchoolTestPaper:`management/testPaper/pageBySchoolTestPaper`,
pageBygetMeTestPaper:`${host}/management/testPaper/pageBygetMeTestPaper`, pageBygetMeTestPaper:`management/testPaper/pageBygetMeTestPaper`,
previewtestPaper:`${host}/management/testPaper/preview`, previewtestPaper:`management/testPaper/preview`,
saveOrUpdatetestPaper:`${host}/management/testPaper/saveOrUpdate`, saveOrUpdatetestPaper:`management/testPaper/saveOrUpdate`,
getModifyByList:`${host}/management/testPaper/getModifyByList`, getModifyByList:`management/testPaper/getModifyByList`,
// 试题信息相关 // 试题信息相关
addQuestions:`${host}/management/questions/addQuestions`, addQuestions:`management/questions/addQuestions`,
fuzzyQuery:`${host}/management/questions/fuzzyQuery`, fuzzyQuery:`management/questions/fuzzyQuery`,
getSelectInfo:`${host}/management/questions/getSelectInfo`, getSelectInfo:`management/questions/getSelectInfo`,
pageByChoiceList:`${host}/management/questions/pageByChoiceList`, pageByChoiceList:`management/questions/pageByChoiceList`,
statistical:`${host}/management/questions/statistical`, statistical:`management/questions/statistical`,
getQuestionListBySelect:`${host}/management/questions/getQuestionListBySelect`, getQuestionListBySelect:`management/questions/getQuestionListBySelect`,
// 考核管理 // 考核管理
addAssessment:`${host}/management/gz-assessment/addAssessment`, addAssessment:`/management/assessment/addAssessment`,
deleteAssessment:`${host}/management/gz-assessment/deleteAssessment`, deleteAssessment:`/management/assessment/deleteAssessment`,
queryAssessment:`${host}/management/gz-assessment/queryAssessment`, queryAssessment:`/management/assessment/queryAssessment`,
updateAssessment:`${host}/management/gz-assessment/updateAssessment`, queryAssessmentName:`/management/assessment/queryAssessmentName`,
updateAssessment:`/management/assessment/updateAssessment`,
// 考试批阅
correcting:`/management/review/correcting`,
getWrong:`/management/review/getWrong`,
reviewByid:`/management/review/reviewByid`,
reviewList:`/management/review/reviewList`,
// 题库管理
deleteByOne:`enterprise/questions/deleteByOne`,
findById:`enterprise/questions/findById`,
pageByCondition:`enterprise/questions/pageByCondition`,
updateQuestions:`enterprise/questions/update`,
getExcel:`enterprise/questions/getExcel`,
impExcel:`management/questions/impExcel`,
// 成绩管理
answerDetail:`management/paperRecord/answerDetail`,
findByIdpaperRecord:`management/paperRecord/findById`,
getAssessmentByClass:`management/paperRecord/getAssessmentByClass`,
getMyClass:`management/paperRecord/getMyClass`,
savepaperRecord:`management/paperRecord/save`,
teacherByGetAchievement:`management/paperRecord/teacherByGetAchievement`,
achievementStatistics:`/management/paperRecord/achievementStatistics`,
} }

@ -1,28 +0,0 @@
.header{
background-color: #242f42;
}
.login-wrap{
background: #324157;
}
.plugins-tips{
background: #eef1f6;
}
.plugins-tips a{
color: #20a0ff;
}
.el-upload--text em {
color: #20a0ff;
}
.pure-button{
background: #20a0ff;
}
.tags-li.active {
border: 1px solid #409EFF;
background-color: #409EFF;
}
.message-title{
color: #20a0ff;
}
.collapse-btn:hover{
background: rgb(40,52,70);
}

@ -1,4 +0,0 @@
[class*=" icon-"], [class^=icon-] {
font-family: iconfont!important;
}

@ -1,384 +0,0 @@
* {
margin: 0;
padding: 0;
}
html,
body,
#app,
.wrapper {
width: 100%;
height: 100%;
}
body {
font-family: 'PingFang SC', "Helvetica Neue", Helvetica, "microsoft yahei", arial, STHeiTi, sans-serif;
font-size: 14px;
background: #f0f0f0;
}
a {
text-decoration: none
}
i{
font-style: normal;
}
li {
list-style-type:none;
}
.required{
margin-right: 5px;
color: #F56C6C;
}
.content-box {
-webkit-transition: left .3s ease-in-out;
transition: left .3s ease-in-out;
}
.content {
width: auto;
height: 100%;
padding: 20px;
box-sizing: border-box;
}
.content-collapse {
left: 65px;
}
.container {
padding: 30px;
background: #fff;
border: 1px solid #ddd;
border-radius: 5px;
}
.crumbs {
margin: 10px 0;
}
.el-table th {
background-color: #f5f7fa !important;
}
.pagination {
margin: 20px 0;
text-align: right;
}
.plugins-tips {
padding: 20px 10px;
margin-bottom: 20px;
}
.el-button+.el-tooltip {
margin-left: 10px;
}
.el-table tr:hover {
background: #f6faff;
}
.orderTable td .el-input{
width: 60%;
}
.orderTable .el-select>.el-input{
display: inline-block;
}
.mgb20 {
margin-bottom: 20px;
}
.move-enter-active,
.move-leave-active {
transition: opacity .5s;
}
.move-enter,
.move-leave {
opacity: 0;
}
/*BaseForm*/
.form-box {
width: 600px;
}
.form-box .line {
text-align: center;
}
.el-time-panel__content::after,
.el-time-panel__content::before {
margin-top: -7px;
}
.el-time-spinner__wrapper .el-scrollbar__wrap:not(.el-scrollbar__wrap--hidden-default) {
padding-bottom: 0;
}
/*Upload*/
.pure-button {
width: 150px;
height: 40px;
line-height: 40px;
text-align: center;
color: #fff;
border-radius: 3px;
}
.g-core-image-corp-container .info-aside {
height: 45px;
}
.avatar-uploader .el-upload--text {
background-color: #fff;
border: 1px dashed #d9d9d9;
border-radius: 6px;
box-sizing: border-box;
width: 360px;
height: 180px;
text-align: center;
cursor: pointer;
position: relative;
overflow: hidden;
}
.avatar-uploader .el-upload--text .el-icon-upload {
font-size: 67px;
color: #97a8be;
margin: 40px 0 16px;
line-height: 50px;
}
.avatar-uploader .el-upload--text {
color: #97a8be;
font-size: 14px;
text-align: center;
}
.avatar-uploader .el-upload--text em {
font-style: normal;
}
/* .link_upload .el-upload-list{
width: 30%;
} */
/*VueEditor*/
.ql-container {
min-height: 400px;
}
.ql-snow .ql-tooltip {
transform: translateX(117.5px) translateY(10px) !important;
}
.editor-btn {
margin-top: 20px;
}
/*markdown*/
.v-note-wrapper .v-note-panel {
min-height: 500px;
}
.ms-login .el-tabs__nav-wrap::after{
background-color: #fff;
opacity: 0;
}
.ms-login .el-tabs__item{
padding: 0 90px;
color: #999;
}
.ms-login .el-tabs__item:hover{
color: #000;
}
.ms-login .el-tabs__item.is-active{
color: #333;
font-weight: bold;
}
.ms-login .el-tabs__active-bar{
background-color: #000;
border-radius:2px;
}
.ms-login .el-tabs__nav-scroll{
display: flex;
justify-content: center;
}
.ms-login .el-input__inner{
height: 80px;
line-height: 80px;
border:1px solid rgba(220,220,220,1);
border-radius:2px;
}
.el-row {
margin-bottom: 20px;
}
.mgb20 {
margin-bottom: 20px;
}
#app .el-table thead{
color: #fff;
}
#app .el-table th{
background-color: #cb221c!important;
font-size: 16px;
font-weight: normal;
}
#app .el-select{
display: unset;
}
/*flex*/
.flex-center{
display: flex;
align-items: center;
}
.flex-between{
display: flex;
align-items: center;
justify-content: space-between;
}
.flex-around{
display: flex;
align-items: center;
justify-content: space-around;
}
.flex-start-around{
display: flex;
align-items: flex-start;
justify-content: center;
}
.flex-end-around{
display: flex;
align-items: flex-end;
justify-content: center;
}
.flex-column{
display: flex;
align-items: center;
flex-direction: column;
}
.flex-start{
display: flex;
align-items: flex-start;
}
.flex-end{
display: flex;
align-items: flex-end;
}
.flex-justify-end{
display: flex;
justify-content: flex-end;
}
.hr_tag{
background-color: #cb221c;
width: 3px;
height: 15px;
margin-right: 5px;
}
.user_header{
padding: 20px 0;
border-bottom: 1px dashed #eee;
}
.addhr_tag{
background-color: #666;
width: 6px;
height: 17px;
margin-right: 5px;
}
.per_title span{
font-size: 16px;
font-weight: bold;
}
.per_back{
margin-left: 5px;
}
.per_school{
margin-left: 30px;
}
.per_title:hover{
cursor:pointer;
}
/* 溢出省略号 */
.ellipsis{
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.tabs{
display: flex;
align-items: center;
padding: 20px 1.5% 20px;
margin-bottom: 20px;
z-index: 999;
background-color: #fff;
}
.tabs .item{
padding: 12px 20px;
margin-right: 10px;
color:#606266;
line-height: 1;
border-radius: 4px;
background-color: #fff;
border: 1px solid #dcdfe6;
cursor: pointer;
}
.tabs .active{
color: #fff;
background-color: #cb221c;
border-color: #cb221c;
}
.btns{
display: flex;
justify-content: center;
margin-top: 20px;
}
.btns button{
height: 30px;
padding: 0 30px;
margin: 0 15px;
font-size: 14px;
color: #333;
line-height: 30px;
background-color: #fff;
border: 1px solid #ededed;
border-radius: 4px;
cursor: pointer;
}
.btns .submit{
color: #fff;
background-color: #e80909;
border-color: #e80909;
}
.btns button:hover{
opacity: .8;
}
.btns button:focus{
outline: none;
}
.userRadio .el-radio{
margin-right: 10px!important;
}
.userRadio .el-radio__input{
display: none!important;
}

@ -1,29 +0,0 @@
.header{
background-color: #fff;
}
.login-wrap{
background: rgba(56, 157, 170, 0.82);;
}
.plugins-tips{
background: #f2f2f2;
}
.plugins-tips a{
color: #cb221c;
}
.el-upload--text em {
color: #cb221c;
}
.pure-button{
background: #cb221c;
}
.pagination > .active > a, .pagination > .active > a:hover, .pagination > .active > a:focus, .pagination > .active > span, .pagination > .active > span:hover, .pagination > .active > span:focus {
background-color: #cb221c !important;
border-color: #cb221c !important;
}
.tags-li.active {
border: 1px solid #cb221c;
background-color: #cb221c;
}
.collapse-btn:hover{
background: #cb221c;
}

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.5 MiB

Before

Width:  |  Height:  |  Size: 875 B

After

Width:  |  Height:  |  Size: 875 B

@ -5,39 +5,39 @@
<div class="info"> <div class="info">
<div class="item"> <div class="item">
<p class="key">考试名称</p> <p class="key">考试名称</p>
<p class="val">期末考</p> <p class="val">{{assessmentName}}</p>
</div> </div>
<div class="item"> <div class="item">
<p class="key">开始时间</p> <p class="key">开始时间</p>
<p class="val">2020.10.12</p> <p class="val">{{info.startTime}}</p>
</div> </div>
<div class="item"> <div class="item">
<p class="key">总分</p> <p class="key">总分</p>
<p class="val">100</p> <p class="val">{{info.totalScore}}</p>
</div> </div>
<div class="items"> <div class="items">
<div class="item"> <div class="item">
<p class="key">最高分</p> <p class="key">最高分</p>
<p class="val">期末考</p> <p class="val">{{info.highestScore}}</p>
</div> </div>
<div class="item"> <div class="item">
<p class="key">应考人数</p> <p class="key">应考人数</p>
<p class="val">10</p> <p class="val">{{info.shouldPeople}}</p>
</div> </div>
</div> </div>
<div class="items"> <div class="items">
<div class="item"> <div class="item">
<p class="key">最低分</p> <p class="key">最低分</p>
<p class="val">期末考</p> <p class="val">{{info.lowestScore}}</p>
</div> </div>
<div class="item"> <div class="item">
<p class="key">实考人数</p> <p class="key">实考人数</p>
<p class="val">10</p> <p class="val">{{info.actualPeople}}</p>
</div> </div>
</div> </div>
<div class="item"> <div class="item">
<p class="key">平均分</p> <p class="key">平均分</p>
<p class="val">20</p> <p class="val">{{info.averageScore}}</p>
</div> </div>
</div> </div>
</div> </div>
@ -51,32 +51,49 @@
</div> </div>
</template> </template>
<script> <script>
import { mapState,mapGetters } from 'vuex'
import mixins from '@/mixins/setBackground'; import mixins from '@/mixins/setBackground';
import echarts from 'echarts' import echarts from 'echarts'
export default { export default {
mixins: [ mixins ], mixins: [ mixins ],
data() { data() {
return { return {
info: {
id: '',
actualPeople: '',
averageScore: '',
highestScore: '',
lowestScore: '',
paperName: '',
shouldPeople: '',
startTime: '',
totalScore: '',
},
statData: []
}; };
}, },
computed: {
...mapState('user', [
'userId'
]),
...mapState('achievement', [
'id','assessmentId','assessmentName','classId'
])
},
mounted() { mounted() {
this.getData() this.getData()
this.getChart()
}, },
methods: { methods: {
getData() { getData() {
this.$get(`${this.api.getCourse}/${this.id}`) this.$post(`${this.api.achievementStatistics}?userId=${this.userId}&assessmentId=${this.assessmentId}&paperId=${this.id}&classId=${this.classId}`)
.then(res => { .then(res => {
let data = res.data.course this.info = res.data.list
this.name = data.name let statData = []
this.classificationId = data.classificationId for(let i in this.info){
this.description = data.description if(i.includes('get')) statData.push(this.info[i])
this.coverUrl = data.coverUrl }
this.uploadList.push({ this.statData = statData
name: 'cover.jpg', this.getChart()
url: this.coverUrl
})
}) })
.catch(err => { .catch(err => {
@ -90,13 +107,13 @@ export default {
xAxis: { xAxis: {
type: 'category', type: 'category',
boundaryGap: false, boundaryGap: false,
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun'] data: ['0-10', '11-20', '21-30', '31-40', '41-50', '51-60', '61-70', '71-80','81-90','91-100']
}, },
yAxis: { yAxis: {
type: 'value' type: 'value'
}, },
series: [{ series: [{
data: [820, 932, 901, 934, 1290, 1330, 1320], data: this.statData,
type: 'line', type: 'line',
areaStyle: {} areaStyle: {}
}] }]
@ -115,7 +132,7 @@ export default {
.title{ .title{
padding-left: 5px; padding-left: 5px;
border-left: 5px solid #cb221c; border-left: 5px solid #cb221c;
margin: 20px 0 40px; margin: 20px 0;
line-height: 1; line-height: 1;
font-size: 16px; font-size: 16px;
} }

@ -1,174 +1,150 @@
<template> <template>
<div class="box"> <div class="box">
<h1 class="title">期中测评</h1> <h1 class="title">{{paperName}}</h1>
<div class="metas"> <div class="metas">
<div> <div>
<span class="name">学生姓名</span> <span class="name">学生姓名</span>
<span class="val">张裕</span> <span class="val">{{userName}}</span>
</div> </div>
<div> <div>
<span class="name">学生得分</span> <span class="name">学生得分</span>
<span class="val">112</span> <span class="val">{{(reviewStatus == 2 || reviewStatus == 3) ? total_score : '--'}}</span>
</div> </div>
<div> <div>
<span class="name">试卷总分</span> <span class="name">试卷总分</span>
<span class="val">212</span> <span class="val">100</span>
</div> </div>
<div> <div>
<span class="name">练习时长</span> <span class="name">练习时长</span>
<span class="val">60min</span> <span class="val">{{duration}}</span>
</div> </div>
</div> </div>
<div class="wrap"> <div class="wrap">
<div class="select"> <div class="select">
<el-radio v-model="look" label="1">查看全部</el-radio> <el-radio v-model="look" label="1">查看全部</el-radio>
<el-radio v-model="look" label="2">只看错题</el-radio> <el-radio v-model="look" label="2" v-if="reviewStatus == 2 || reviewStatus == 3">只看错题</el-radio>
</div> </div>
<div class="item"> <div class="item" v-for="(item,index) in list" :key="index">
<div class="status">简答题待阅</div> <div class="status" :class="{done: item.isCorrecting}">{{item.isSub ? '简答题' : '客观题'}}{{getCorrectingName(item.isCorrecting)}}</div>
<p class="name">1测试测试测试测试测试测试测试</p> <div class="name" v-html="item.question_stem"></div>
<div class="answer"> <div class="answer">
<p class="key">学生答案</p> <div class="info">
<p class="val">测试测试测试测试测试测试测试</p> <p class="key">正确答案</p>
</div> <p class="val">{{item.answer}}</p>
<div class="meta"> </div>
<span class="key">知识点</span> <div class="info">
<span class="val">测试测试</span> <p class="key">学生答案</p>
</div> <p class="val">{{item.user_answer}}</p>
<div class="meta">
<span class="key">答案解析</span>
<span class="val">测试测试</span>
</div>
<div class="meta">
<span class="key">考试得分</span>
<div class="val">
<input type="text">
</div> </div>
</div>
</div>
<div class="item">
<div class="status done">客观题已阅</div>
<p class="name">1测试测试测试测试测试测试测试</p>
<div class="answer">
<p class="key">学生答案</p>
<p class="val">测试测试测试测试测试测试测试</p>
</div> </div>
<div class="meta"> <div class="meta">
<span class="key">知识点</span> <span class="key">知识点</span>
<span class="val">测试测试</span> <span class="val">{{item.knowledge_points}}</span>
</div> </div>
<div class="meta"> <div class="meta">
<span class="key">答案解析</span> <span class="key">答案解析</span>
<span class="val">测试测试</span> <span class="val">{{item.answer_analysis}}</span>
</div> </div>
<div class="meta"> <div class="meta">
<span class="key">考试得分</span> <span class="key">考试得分</span>
<div class="val"> <div class="val">
<input type="text"> <input type="text" v-model.number="item.this_score" :disabled="!isReview">
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="btns"> <div class="btns" v-if="isReview">
<button type="button" class="submit">提交</button> <button type="button" class="submit" @click="save(1)">提交</button>
<button type="button">保存</button> <button type="button" @click="save(0)">保存</button>
<button type="button">返回</button>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import mixins from '@/mixins/setBackground'; import mixins from '@/mixins/setBackground'
import { mapState,mapGetters,mapActions } from 'vuex'
export default { export default {
mixins: [ mixins ], mixins: [ mixins ],
data() { data() {
return { return {
schoolId: this.$store.state.schoolId, paperName: '',
id: '', userName: '',
total_score: '',
duration: '',
list: [],
look: '1', look: '1',
page: 1,
pageSize: 10,
total: 0,
isDetail: Boolean(this.$route.query.show),
userId: this.$store.state.userLoginId,
username: this.$store.state.name,
classificationId: '',
coverUrl: '',
name: '',
classificationList: [],
uploadList: [],
description: '',
selectVisible: false
}; };
}, },
computed: {
...mapState('user', [
'userId','clientId'
]),
...mapState('assessment', [
'id','paperId','isReview','reviewStatus'
]),
...mapGetters('assessment', [
'getCorrectingName'
])
},
watch: {
look(val,oldVal){
val == 1 ? this.getData() : this.getWrong()
}
},
mounted() { mounted() {
this.id = this.$route.query.id this.getData()
this.id && this.getData()
}, },
methods: { methods: {
save() {
if(!this.name) return this.$message.warning('请填写课程名称')
if(!this.classificationId) return this.$message.warning('请选择课程分类')
if(!this.coverUrl) return this.$message.warning('请上传课程封面')
let data = {
id: this.id,
classificationId: this.classificationId,
coverUrl: this.coverUrl,
description: this.description,
name: this.name,
founderId: this.userId,
schoolId: this.schoolId,
founderName: this.username
}
if(this.id){
this.$put(this.api.editCourse, data).then(res => {
this.$message.success('修改成功');
this.$router.back()
})
.catch(err => {
});
}else{
this.$post(this.api.addCourse, data).then(res => {
this.$message.success('创建成功');
this.$router.back()
})
.catch(err => {
});
}
},
getData() { getData() {
this.$get(`${this.api.getCourse}/${this.id}`) this.$post(`${this.api.correcting}?assessmentId=${1}&userId=${566}&paperId=${1}`)
.then(res => { .then(res => {
let data = res.data.course this.list = res.data.list
this.name = data.name this.list.forEach(n => {
this.classificationId = data.classificationId n.isCorrecting == 0 && (n.this_score = '')
this.description = data.description n.isSub = n.typeName == '简答题'
this.coverUrl = data.coverUrl
this.uploadList.push({
name: 'cover.jpg',
url: this.coverUrl
}) })
this.paperName = this.list[0].name
this.userName = this.list[0].userName
this.total_score = this.list[0].total_score
this.duration = this.list[0].duration
}) })
.catch(err => { .catch(err => {})
});
}, },
goback() { getWrong(){
if(this.isDetail){ this.$post(`${this.api.getWrong}?assessmentId=${1}&userId=${566}&paperId=${1}`)
this.$router.back() .then(res => {
}else{ this.list = res.data.list
this.$confirm('确定返回?未更新的信息将不会保存。', '提示', { })
type: 'warning' .catch(err => {})
}) },
.then(() => { save(status) {
this.$router.back() let data = []
if(status){
let isEmpty = false
let isNotNum = false
this.list.map(n => {
if(n.this_score === '') isEmpty = true
if(isNaN(n.this_score)) isNotNum = true
if(n.isSub){
data.push({
detailId: n.detailId,
score: n.this_score
})
}
}) })
.catch(() => {}); if(isEmpty) return this.$message.warning('请批阅完所有题目')
if(isNotNum) return this.$message.warning('考试得分请输入数字')
} }
this.$post(this.api.reviewByid,data).then(res => {
this.$message.success(status ? '提交成功' : '保存成功')
this.$router.back()
})
.catch(err => {
})
}, },
}, },
}; };
@ -206,7 +182,10 @@ export default {
.item{ .item{
padding-bottom: 30px; padding-bottom: 30px;
margin-bottom: 30px; margin-bottom: 30px;
border-bottom: 1px dashed #f4f4f4; border-bottom: 1px dashed #d2d2d2;
&:last-child{
border-bottom: 0;
}
.status{ .status{
color: #cb221c; color: #cb221c;
@ -234,6 +213,11 @@ export default {
font-size: 12px; font-size: 12px;
border: 1px solid #e8e8e8; border: 1px solid #e8e8e8;
background-color: #f3f2f2; background-color: #f3f2f2;
.info{
display: inline-flex;
align-items: center;
margin-right: 30px;
}
} }
.meta{ .meta{
display: flex; display: flex;
@ -242,21 +226,27 @@ export default {
margin: 10px 0; margin: 10px 0;
font-size: 12px; font-size: 12px;
.key{ .key{
width: 70px; width: 80px;
margin-right: 10px; margin-right: 10px;
text-align: right; text-align: right;
white-space: nowrap;
} }
input{ input{
width: 60px; width: 60px;
height: 28px; height: 28px;
padding: 0 5px; padding: 0 5px;
margin-right: 5px; margin-right: 5px;
color: #444;
background-color: #fff; background-color: #fff;
border: 1px solid #ebebeb; border: 1px solid #ebebeb;
box-sizing: border-box; box-sizing: border-box;
&:focus{ &:focus{
outline: none; outline: none;
} }
&:disabled{
background-color: #e8e8e8;
cursor: not-allowed;
}
} }
} }
} }

@ -1,6 +1,6 @@
<template> <template>
<div class="box"> <div class="box">
<h1 class="title">期中测评</h1> <h1 class="title">{{paperName}}</h1>
<div class="metas"> <div class="metas">
<div style="margin-right: 20px;"> <div style="margin-right: 20px;">
<span class="name">总分</span> <span class="name">总分</span>
@ -8,7 +8,7 @@
</div> </div>
<div> <div>
<span class="name">考试时长</span> <span class="name">考试时长</span>
<span class="val">2分钟</span> <span class="val">{{totalDuration}}分钟</span>
</div> </div>
</div> </div>
@ -23,10 +23,6 @@
<p class="key">序号</p> <p class="key">序号</p>
<p class="val">{{index+1}}</p> <p class="val">{{index+1}}</p>
</div> </div>
<div class="info" v-if="item.point">
<p class="key">得分</p>
<p class="val">{{item.point}}</p>
</div>
</div> </div>
<div class="meta"> <div class="meta">
<p class="key">题干</p> <p class="key">题干</p>
@ -35,7 +31,7 @@
<div class="meta"> <div class="meta">
<p class="key">选项</p> <p class="key">选项</p>
<div class="val"> <div class="val">
<p v-for="(option,i) in item.options" :key="i">{{i}}.{{option[i]}}</p> <p v-for="(option,i) in item.options" :key="i">{{i}}.{{item.options[i]}}</p>
</div> </div>
</div> </div>
<div class="meta ans"> <div class="meta ans">
@ -43,10 +39,6 @@
<p class="key">正确答案</p> <p class="key">正确答案</p>
<p class="val">{{item.answer}}</p> <p class="val">{{item.answer}}</p>
</div> </div>
<div class="info" v-if="item.studentAnswer">
<p class="key">学生答案</p>
<p class="val">{{item.studentAnswer}}</p>
</div>
</div> </div>
<div class="meta"> <div class="meta">
<p class="key">答案解析</p> <p class="key">答案解析</p>
@ -57,12 +49,14 @@
</div> </div>
</template> </template>
<script> <script>
import mixins from '@/mixins/setBackground'; import mixins from '@/mixins/setBackground'
import { mapState } from 'vuex'
export default { export default {
mixins: [ mixins ], mixins: [ mixins ],
data() { data() {
return { return {
id: this.$route.query.id, assPaperName: '',
assTotalDuration: 0,
selectVisible: false, selectVisible: false,
tabs: [ tabs: [
{ {
@ -86,12 +80,20 @@ export default {
curType: [] curType: []
}; };
}, },
computed: {
...mapState('user', [
'userId'
]),
...mapState('testpaper', [
'id','paperName','totalDuration'
])
},
mounted() { mounted() {
this.getData() this.getData()
}, },
methods: { methods: {
getData() { getData() {
this.$post(`${this.api.previewtestPaper}?id=${1}`) this.$post(`${this.api.previewtestPaper}?id=${this.id}`)
.then(res => { .then(res => {
this.allData = res.data this.allData = res.data
this.curType = this.allData.list1 this.curType = this.allData.list1
@ -114,9 +116,7 @@ export default {
for(let i in n){ for(let i in n){
if(i.includes('option') && n[i]){ if(i.includes('option') && n[i]){
console.log(i.replace('option','')) console.log(i.replace('option',''))
options[i.replace('option','')] = { options[i.replace('option','')] = n[i]
[i.replace('option','')]: n[i]
}
} }
} }
n.options = options n.options = options

@ -1,5 +1,5 @@
<template> <template>
<div class="header flex-between"> <div class="header flex j-between">
<div v-if="showBack" class="goBack" v-throttle @click="back"><i class="el-icon-arrow-left"></i>返回</div> <div v-if="showBack" class="goBack" v-throttle @click="back"><i class="el-icon-arrow-left"></i>返回</div>
<div v-else class="logo"> <div v-else class="logo">
<img src="../../assets/img/logo-fill.png"> <img src="../../assets/img/logo-fill.png">

@ -49,6 +49,15 @@ const util = {
} }
return fmt; return fmt;
}, },
// 移除数组中指定值
removeByValue(arr, val) {
for(var i=0; i<arr.length; i++) {
if(arr[i] == val) {
arr.splice(i, 1);
break;
}
}
}
}; };
export default util; export default util;

@ -2,13 +2,10 @@ import Vue from 'vue';
import App from '@/App.vue'; import App from '@/App.vue';
import router from '@/router'; import router from '@/router';
import ElementUI from 'element-ui'; import ElementUI from 'element-ui';
import '@/styles/index.scss'
import mixinApp from '@/mixins/app'; import mixinApp from '@/mixins/app';
import VueI18n from 'vue-i18n'; import VueI18n from 'vue-i18n';
import { messages } from '@/i18n'; import { messages } from '@/i18n';
// import 'element-ui/lib/theme-chalk/index.css'; // 默认主题
import './assets/css/theme-green/index.css'; // 浅绿色主题
import './assets/css/icon.css';
import './assets/icon/iconfont.css';
import 'babel-polyfill'; import 'babel-polyfill';
import '@/libs/resize'; import '@/libs/resize';
import api from '@/api'; import api from '@/api';

@ -10,7 +10,7 @@
<div class="left"> <div class="left">
<div class="text"> <div class="text">
<p>欢迎进入</p> <p>欢迎进入</p>
<p>电子竞技<br>数字化考试系统</p> <p>电子竞技<br>数字化考试系统<br><span>教师管理端</span></p>
</div> </div>
</div> </div>
<div class="right"> <div class="right">
@ -31,7 +31,7 @@
</el-input> </el-input>
</el-form-item> </el-form-item>
<el-button class="submit" type="primary" @click="submitForm">登录</el-button> <el-button class="submit" type="primary" @click="submitForm">登录</el-button>
<!-- <div class="links flex-between"> <!-- <div class="links flex j-between">
<el-button type="text" class="ques" @click="toReg">前往注册</el-button> <el-button type="text" class="ques" @click="toReg">前往注册</el-button>
<el-button type="text" class="forget">忘记密码</el-button> <el-button type="text" class="forget">忘记密码</el-button>
</div> --> </div> -->
@ -59,8 +59,8 @@ export default {
return { return {
loginForm: { loginForm: {
// username: '18818574533', // username: '18818574533',
username: '123456', username: 'manager',
password: '123456', password: 'huoran123',
}, },
loginRules: { loginRules: {
username: [{ required: true, message: '请输入用户名', trigger: 'blur' }], username: [{ required: true, message: '请输入用户名', trigger: 'blur' }],
@ -164,6 +164,9 @@ export default {
p:first-child{ p:first-child{
margin-bottom: 30px; margin-bottom: 30px;
} }
span{
font-size: 36px;
}
} }
} }
.right{ .right{

@ -0,0 +1,263 @@
<template>
<div class="box">
<h1 class="title">{{paperName }}</h1>
<div class="metas">
<div style="margin-right: 20px;">
<span class="name">总分</span>
<span class="val">100</span>
</div>
<div>
<span class="name">考试时长</span>
<span class="val">{{time}}分钟</span>
</div>
</div>
<ul class="tab">
<li v-for="(item,index) in tabs" :key="index" :class="{active: active == item.id}" @click="tabChange(item.id)">{{item.name}}</li>
</ul>
<div class="wrap">
<div class="item" v-for="(item,index) in curType" :key="index">
<div class="answer">
<div class="info">
<p class="key">序号</p>
<p class="val">{{index+1}}</p>
</div>
<div class="info">
<p class="key">得分</p>
<p class="val">{{item.question_score}}</p>
</div>
</div>
<div class="meta">
<p class="key">题干</p>
<p class="val" v-html="item.question_stem"></p>
</div>
<div class="meta">
<p class="key">选项</p>
<div class="val">
<p v-for="(option,i) in item.options" :key="i">{{i}}.{{item.options[i]}}</p>
</div>
</div>
<div class="meta ans">
<div class="info">
<p class="key">正确答案</p>
<p class="val">{{item.answer}}</p>
</div>
<div class="info">
<p class="key">学生答案</p>
<p class="val">{{item.user_answer}}</p>
</div>
</div>
<div class="meta">
<p class="key">答案解析</p>
<p class="val" v-html="item.answer_analysis"></p>
</div>
</div>
</div>
</div>
</template>
<script>
import mixins from '@/mixins/setBackground'
import { mapState } from 'vuex'
export default {
mixins: [ mixins ],
data() {
return {
paperName: '',
time: 0,
selectVisible: false,
tabs: [
{
id: 1,
name: '单选题'
},{
id: 2,
name: '多选题'
},{
id: 3,
name: '填空题'
},{
id: 4,
name: '判断题'
},{
id: 5,
name: '简答题'
}
],
active: 1,
curType: []
};
},
computed: {
...mapState('user', [
'userId'
]),
...mapState('achievement', [
'id','assessmentId'
])
},
mounted() {
this.getData()
},
methods: {
getData() {
this.$post(`${this.api.answerDetail}?userId=${this.userId}&assessmentId=${this.assessmentId}&paperId=${this.id}`)
// this.$post(`${this.api.answerDetail}?userId=${1}&assessmentId=${1}&paperId=${1}`)
.then(res => {
this.paperName = res.paperName
this.time = res.time
this.allData = res.data
this.curType = this.allData.list1
this.handleOptions()
})
.catch(err => {});
},
tabChange(id){
this.active = id
this.curType = this.allData[`list${id}`]
this.handleOptions()
},
handleOptions(){
let curType = this.curType
curType.forEach(n => {
if(!n.options){
let options = {}
for(let i in n){
if(i.includes('option') && n[i]){
console.log(i.replace('option_',''))
options[i.replace('option_','')] = n[i]
}
}
n.options = options
}
})
this.curType = curType
}
},
};
</script>
<style lang="scss" scoped>
.box{
width: 90%;
margin: 0 auto;
}
.title{
text-align: center;
font-size: 18px;
font-weight: 600;
}
.metas{
display: flex;
justify-content: center;
margin: 20px 0 30px;
.name{
font-size: 12px;
color: #717171;
}
.val{
font-size: 12px;
color: #929292;
}
}
.tab{
display: flex;
align-items: center;
margin-bottom: 10px;
li{
position: relative;
padding: 0 44px;
margin-right: 7px;
font-size: 13px;
line-height: 46px;
text-align: center;
color: #444;
border: 1px solid #ececec;
cursor: pointer;
&:hover{
opacity: .8;
}
&.active:after{
content: '';
position: absolute;
top: 0;
left: 0;
width: 100%;
height: 4px;
background-color: #e80909;
}
}
}
.wrap{
.item{
padding-bottom: 30px;
margin-bottom: 30px;
border-bottom: 1px dashed #f4f4f4;
.key{
font-weight: bold;
color: #333;
font-size: 14px;
}
.val{
color: #757575;
font-size: 14px;
}
.answer{
display: flex;
align-items: center;
padding: 15px;
margin: 15px 0;
font-size: 12px;
border: 1px solid #e8e8e8;
background-color: #f3f2f2;
.info{
display: inline-flex;
align-items: center;
margin-right: 30px;
}
}
.meta{
padding-left: 10px;
margin: 20px 0;
font-size: 12px;
&.ans{
display: flex;
align-items: center;
.info{
margin-right: 20px;
}
}
.key{
margin-bottom: 5px;
}
}
}
}
.btns{
display: flex;
justify-content: center;
margin-top: 20px;
button{
height: 30px;
padding: 0 30px;
margin: 0 15px;
font-size: 14px;
color: #333;
line-height: 30px;
background-color: #fff;
border: 1px solid #ededed;
border-radius: 4px;
cursor: pointer;
&.submit{
color: #fff;
background-color: #e80909;
border-color: #e80909;
}
&:hover{
opacity: .8;
}
}
}
</style>

@ -2,21 +2,21 @@
<div> <div>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="24"> <el-col :span="24">
<el-card shadow="hover" class="mgb20"> <el-card shadow="hover" class="m-b-20">
<div class="flex-center mgb20"> <div class="flex a-center m-b-20">
<p class="hr_tag"></p> <p class="hr_tag"></p>
<span>筛选</span> <span>筛选</span>
</div> </div>
<div class="flex-between"> <div class="flex j-between">
<el-form label-width="80px" inline> <el-form label-width="80px" inline>
<el-form-item class="no-mb" label="教学班级"> <el-form-item class="no-mb" label="教学班级">
<el-select v-model="publishStatus" clearable placeholder="请选择教学班级" @change="getData"> <el-select v-model="classId" clearable placeholder="请选择教学班级" @change="getAssess">
<el-option v-for="(item,index) in statusList" :key="index" :label="item.name" :value="item.value"></el-option> <el-option v-for="(item,index) in classList" :key="index" :label="item.className" :value="item.classId"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item class="no-mb" label="考试名称"> <el-form-item class="no-mb" label="考试名称">
<el-select v-model="publishStatus" clearable placeholder="请选择考试名称" @change="getData"> <el-select v-model="assessmentName" clearable placeholder="请选择考试名称" @change="getData" :disabled="classId == ''">
<el-option v-for="(item,index) in statusList" :key="index" :label="item.name" :value="item.value"></el-option> <el-option v-for="(item,index) in assessmentNameList" :key="index" :label="item.assessmentName" :value="item.assessmentName"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -33,9 +33,9 @@
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-card shadow="hover" class="mgb20"> <el-card shadow="hover" class="m-b-20">
<div class="flex-between mgb20"> <div class="flex j-between m-b-20">
<div class="flex-center"> <div class="flex a-center">
<p class="hr_tag"></p> <p class="hr_tag"></p>
<span>考试成绩</span> <span>考试成绩</span>
</div> </div>
@ -50,7 +50,7 @@
type="primary" type="primary"
size="small" size="small"
round round
@click="showBatchUpload" @click="exportData"
>导出</el-button> >导出</el-button>
</div> </div>
</div> </div>
@ -75,11 +75,11 @@
slot-scope="scope" slot-scope="scope"
>{{scope.$index + (page - 1) * pageSize + 1}}</template> >{{scope.$index + (page - 1) * pageSize + 1}}</template>
</el-table-column> </el-table-column>
<el-table-column prop="name" label="真实姓名" align="center"></el-table-column> <el-table-column prop="stuName" label="真实姓名" align="center"></el-table-column>
<el-table-column prop="name" label="学号" align="center"></el-table-column> <el-table-column prop="stuNo" label="学号" align="center"></el-table-column>
<el-table-column prop="name" label="得分" align="center"></el-table-column> <el-table-column prop="thisScore" label="得分" align="center"></el-table-column>
<el-table-column prop="name" label="用时(分钟)" align="center"></el-table-column> <el-table-column prop="timeSpent" label="用时(分钟)" align="center"></el-table-column>
<el-table-column prop="name" label="考试时间" align="center"></el-table-column> <el-table-column prop="totalDuration" label="考试时间" align="center"></el-table-column>
<el-table-column label="操作" align="center"> <el-table-column label="操作" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="show(scope.row)">查看详情</el-button> <el-button type="text" @click="show(scope.row)">查看详情</el-button>
@ -102,19 +102,30 @@
</div> </div>
</template> </template>
<script> <script>
import { mapState,mapActions } from 'vuex'
export default { export default {
data() { data() {
return { return {
listData: [{}], classId: '',
classList: [],
assessmentId: '',
assessmentName: '',
assessmentNameList: [],
keyword: '', keyword: '',
listData: [],
page: 1, page: 1,
pageSize: 10, pageSize: 10,
total: 0, total: 0,
searchTimer: null, searchTimer: null,
}; };
}, },
computed: {
...mapState('user', [
'userId'
])
},
mounted() { mounted() {
this.getData() this.getClass()
}, },
watch: { watch: {
keyword: function(val) { keyword: function(val) {
@ -125,20 +136,48 @@ export default {
} }
}, },
methods: { methods: {
...mapActions('achievement', [
'setInfo'
]),
getData() { getData() {
// this.$get(this.api.list, { this.$post(this.api.teacherByGetAchievement, {
// page: this.page, userId: this.userId,
// size: this.pageSize, pageNum: this.page,
// questionStem: this.keyword, pageSize: this.pageSize,
// questionType: this.subject keyword: this.keyword,
// }) assessmentId: this.assessmentId,
// .then(res => { classId: this.classId
// this.total = res.page.totalCount; // })
// this.page = res.page.currPage; // .then(res => {
// this.listData = res.page.list; this.listData = res.data.list.list
// this.$refs.table.clearSelection() this.total = res.data.list.totalCount
// }) })
// .catch(err => {}) .catch(err => {})
},
getClass() {
this.$post(this.api.getMyClass,{
// userId: this.userId
userId: 1
})
.then(res => {
this.classList = res.data.list
this.classId = this.classList[0].classId
this.getAssess()
})
.catch(err => {})
},
getAssess() {
this.$post(this.api.getAssessmentByClass,{
userId: 1,
classId: this.classId
})
.then(res => {
this.assessmentNameList = res.data.list
this.assessmentId = this.classList.find(n => n.classId == this.classId).assessmentId
this.assessmentName = this.assessmentNameList[0].assessmentName
this.getData()
})
.catch(err => {})
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.page = val this.page = val
@ -152,10 +191,23 @@ export default {
this.multipleSelection = val; this.multipleSelection = val;
}, },
show(row){ show(row){
this.$router.push('/testPaper/show') this.setInfo({
id: row.paperId,
assessmentId: row.id
})
this.$router.push('detail')
}, },
toStat(){ toStat(){
this.setInfo({
id: this.listData[0].paperId,
assessmentId: this.assessmentId,
assessmentName: this.assessmentName,
classId: this.classId
})
this.$router.push('statistics') this.$router.push('statistics')
},
exportData(){
} }
} }
}; };
@ -165,31 +217,4 @@ export default {
/deep/.no-mb.el-form-item{ /deep/.no-mb.el-form-item{
margin-bottom: 0; margin-bottom: 0;
} }
/deep/.el-radio{
margin-right: 15px;
}
::v-deep .el-checkbox-group{
font-size: 2px;
}
.Upload {
text-align: center;
}
.bt {
margin-bottom: 15px;
}
.flex_around {
display: flex;
justify-content: space-around;
align-items: center;
}
.card_m {
margin: 10px 0 20px 0;
}
.input ::v-deep .el-input {
width: 50%;
}
.radio {
margin: 0 15px 0 30px;
font-weight: 600;
}
</style> </style>

@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<div class="tabs mgb20"> <div class="tabs m-b-20">
<a class="item" v-for="(item,index) in tabs" :key="index" :class="{active: index == active}" @click="tabChange(index)">{{item}}</a> <a class="item" v-for="(item,index) in tabs" :key="index" :class="{active: index == active}" @click="tabChange(index)">{{item}}</a>
</div> </div>

@ -2,16 +2,16 @@
<div> <div>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="24"> <el-col :span="24">
<el-card shadow="hover" class="mgb20"> <el-card shadow="hover" class="m-b-20">
<div class="flex-center mgb20"> <div class="flex a-center m-b-20">
<p class="hr_tag"></p> <p class="hr_tag"></p>
<span>筛选</span> <span>筛选</span>
</div> </div>
<div class="flex-between"> <div class="flex j-between">
<el-form label-width="80px"> <el-form label-width="80px">
<el-form-item class="no-mb" label="教学班级"> <el-form-item class="no-mb" label="教学班级">
<el-select v-model="publishStatus" clearable placeholder="请选择教学班级" @change="getData"> <el-select v-model="classId" clearable placeholder="请选择教学班级" @change="getData">
<el-option v-for="(item,index) in statusList" :key="index" :label="item.name" :value="item.value"></el-option> <el-option v-for="(item,index) in classList" :key="index" :label="item.name" :value="item.value"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -28,9 +28,9 @@
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-card shadow="hover" class="mgb20"> <el-card shadow="hover" class="m-b-20">
<div class="flex-between mgb20"> <div class="flex j-between m-b-20">
<div class="flex-center"> <div class="flex a-center">
<p class="hr_tag"></p> <p class="hr_tag"></p>
<span>练习成绩</span> <span>练习成绩</span>
</div> </div>
@ -39,7 +39,7 @@
type="primary" type="primary"
size="small" size="small"
round round
@click="showBatchUpload" @click="exportData"
>导出</el-button> >导出</el-button>
</div> </div>
</div> </div>
@ -89,9 +89,9 @@
</el-col> </el-col>
</el-row> </el-row>
<el-dialog title="练习成绩详情" :visible.sync="detailVisible" width="40%" @close="closeSelect" :close-on-click-modal="false"> <!-- <el-dialog title="练习成绩详情" :visible.sync="detailVisible" width="40%" @close="closeSelect" :close-on-click-modal="false">
<div class="flex-justify-end"> <div class="flex-justify-end">
<div class="mgb20"> <div class="m-b-20">
<el-input <el-input
placeholder="请输入练习项目名称" placeholder="请输入练习项目名称"
prefix-icon="el-icon-search" prefix-icon="el-icon-search"
@ -139,7 +139,7 @@
<el-button @click="detailVisible = false">取消</el-button> <el-button @click="detailVisible = false">取消</el-button>
<el-button type="primary" @click="uploadSure">确定</el-button> <el-button type="primary" @click="uploadSure">确定</el-button>
</span> </span>
</el-dialog> </el-dialog> -->
</div> </div>
</template> </template>
<script> <script>
@ -148,32 +148,12 @@ export default {
return { return {
keyword: '', keyword: '',
listData: [{}], listData: [{}],
subjectList: [ classId: '',
{ classList: [],
id: '', total: 0,
name: '不限'
},
{
id: 1,
name: '单选题'
},
{
id: 2,
name: '多选题'
},
{
id: 3,
name: '判断题'
}
],
total: 0, // ()
page: 1, page: 1,
pageSize: 10, pageSize: 10,
multipleSelection: [], multipleSelection: [],
isShowTopics: false,
topicsTitle: '',
uploadList: [],
uploadDataList: [],
searchTimer: null, searchTimer: null,
detailVisible: false detailVisible: false
}; };
@ -209,15 +189,14 @@ export default {
this.page = val this.page = val
this.getData() this.getData()
}, },
closeTopics() {
this.isShowTopics = false
this.resetForm()
},
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val; this.multipleSelection = val;
}, },
show(row){ show(row){
this.detailVisible = true this.detailVisible = true
},
exportData(){
} }
} }
}; };

@ -2,12 +2,12 @@
<div> <div>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="24"> <el-col :span="24">
<el-card shadow="hover" class="mgb20"> <el-card shadow="hover" class="m-b-20">
<div class="flex-center mgb20"> <div class="flex a-center m-b-20">
<p class="hr_tag"></p> <p class="hr_tag"></p>
<span>筛选</span> <span>筛选</span>
</div> </div>
<div class="flex-between"> <div class="flex j-between">
<el-form label-width="80px" inline> <el-form label-width="80px" inline>
<el-form-item class="no-mb" label="错题来源"> <el-form-item class="no-mb" label="错题来源">
<el-select v-model="publishStatus" clearable placeholder="请选择错题来源" @change="getData"> <el-select v-model="publishStatus" clearable placeholder="请选择错题来源" @change="getData">
@ -33,9 +33,9 @@
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-card shadow="hover" class="mgb20"> <el-card shadow="hover" class="m-b-20">
<div class="flex-between mgb20"> <div class="flex j-between m-b-20">
<div class="flex-center"> <div class="flex a-center">
<p class="hr_tag"></p> <p class="hr_tag"></p>
<span>错题管理</span> <span>错题管理</span>
</div> </div>

@ -1,8 +1,8 @@
<template> <template>
<div> <div>
<el-form :disabled="isDetail"> <el-form :disabled="isDetail">
<el-card shadow="hover" class="mgb20"> <el-card shadow="hover" class="m-b-20">
<div class="flex-between"> <div class="flex j-between">
<div class="per_title" v-throttle @click="goback()"> <div class="per_title" v-throttle @click="goback()">
<i class="el-icon-arrow-left"></i> <i class="el-icon-arrow-left"></i>
<span class="per_back">返回</span> <span class="per_back">返回</span>
@ -14,9 +14,9 @@
</div> </div>
</el-card> </el-card>
<el-card shadow="hover" class="mgb20"> <el-card shadow="hover" class="m-b-20">
<div> <div>
<p class="mgb20">考核名称</p> <p class="m-b-20">考核名称</p>
<el-input <el-input
placeholder="请输入考核名称" placeholder="请输入考核名称"
v-model="assessmentName" v-model="assessmentName"
@ -27,9 +27,9 @@
</div> </div>
</el-card> </el-card>
<el-card shadow="hover" class="mgb20"> <el-card shadow="hover" class="m-b-20">
<div> <div>
<p class="mgb20">考核类型</p> <p class="m-b-20">考核类型</p>
<div class="inline_input"> <div class="inline_input">
<el-select v-model="classificationId" placeholder="请选择考核类型"> <el-select v-model="classificationId" placeholder="请选择考核类型">
<el-option <el-option
@ -43,9 +43,9 @@
</div> </div>
</el-card> </el-card>
<el-card shadow="hover" class="mgb20"> <el-card shadow="hover" class="m-b-20">
<div> <div>
<p class="mgb20">考核时间</p> <p class="m-b-20">考核时间</p>
<el-date-picker <el-date-picker
size="small" size="small"
v-model="date" v-model="date"
@ -59,18 +59,18 @@
</div> </div>
</el-card> </el-card>
<el-card shadow="hover" class="mgb20"> <el-card shadow="hover" class="m-b-20">
<div> <div>
<p class="mgb20">试卷选择</p> <p class="m-b-20">试卷选择</p>
<div class="inline_input"> <div class="inline_input">
<el-button type="primary" @click="openSelect">试卷选择</el-button> <el-button type="primary" @click="openSelect">试卷选择</el-button>
</div> </div>
</div> </div>
</el-card> </el-card>
<el-card shadow="hover" class="mgb20"> <el-card shadow="hover" class="m-b-20">
<div> <div>
<p class="mgb20">发布班级</p> <p class="m-b-20">发布班级</p>
<div class="inline_input"> <div class="inline_input">
<div class="per-wrap"> <div class="per-wrap">
<el-tree <el-tree

@ -1,23 +1,25 @@
<template> <template>
<div> <div>
<el-card shadow="hover" class="mgb20"> <el-card shadow="hover" class="m-b-20">
<div> <div>
<div class="flex-center mgb20"> <div class="flex a-center m-b-20">
<p class="hr_tag"></p> <p class="hr_tag"></p>
<span>筛选</span> <span>筛选</span>
</div> </div>
<div> <div>
<div class="flex-between no-mb"> <div class="flex j-between no-mb">
<div> <div>
<el-form label-width="80px" inline> <el-form label-width="80px" inline>
<el-form-item label="考核类型" class="no-mb"> <el-form-item label="考试类型" class="no-mb">
<el-select v-model="type" clearable placeholder="请选择考核类型" @change="getData"> <el-select v-model="type" clearable placeholder="请选择考试类型" @change="getData">
<el-option v-for="(item,index) in typeList" :key="index" :label="item.name" :value="item.value"></el-option> <el-option label="不限" value=""></el-option>
<el-option v-for="(item,index) in typeList" :key="index" :label="item.name" :value="item.id"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="考试状态" class="no-mb"> <el-form-item label="考试状态" class="no-mb">
<el-select v-model="state" clearable placeholder="请选择考试状态" @change="getData"> <el-select v-model="state" clearable placeholder="请选择考试状态" @change="getData">
<el-option v-for="(item,index) in stateList" :key="index" :label="item.name" :value="item.value"></el-option> <el-option label="不限" value=""></el-option>
<el-option v-for="(item,index) in stateList" :key="index" :label="item.name" :value="item.id"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -31,8 +33,8 @@
</el-card> </el-card>
<el-card shadow="hover"> <el-card shadow="hover">
<div class="flex-between mgb20"> <div class="flex j-between m-b-20">
<div class="flex-center"> <div class="flex a-center">
<p class="hr_tag"></p> <p class="hr_tag"></p>
<span>考核列表</span> <span>考核列表</span>
</div> </div>
@ -44,19 +46,34 @@
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column> <el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="100" label="序号" align="center"></el-table-column> <el-table-column type="index" width="100" label="序号" align="center"></el-table-column>
<el-table-column prop="assessmentName" label="考核名称" align="center"></el-table-column> <el-table-column prop="assessmentName" label="考核名称" align="center"></el-table-column>
<el-table-column prop="name" label="考核类型" align="center"></el-table-column> <el-table-column prop="name" label="考核类型" align="center">
<template slot-scope="scope">
{{getTypeName(scope.row.type)}}
</template>
</el-table-column>
<el-table-column prop="startTime" label="考试开始时间" align="center"></el-table-column> <el-table-column prop="startTime" label="考试开始时间" align="center"></el-table-column>
<el-table-column prop="endTime" label="考试结束时间" align="center"></el-table-column> <el-table-column prop="endTime" label="考试结束时间" align="center"></el-table-column>
<el-table-column prop="name" label="考核状态" align="center"></el-table-column> <el-table-column prop="name" label="考核状态" align="center">
<el-table-column prop="name" label="考试班级" align="center"></el-table-column> <template slot-scope="scope">
<el-table-column label="操作" align="center" width="300"> {{getStateName(scope.row.state)}}
</template>
</el-table-column>
<el-table-column prop="className" label="考试班级" align="center"></el-table-column>
<el-table-column label="操作" width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="show(scope.row)" v-auth>查看</el-button> <el-button type="text" @click="show(scope.row)" v-auth>查看</el-button>
<el-button type="text" @click="edit(scope.row)" v-auth>修改</el-button> <template v-if="scope.row.state == 1">
<el-button type="text" @click="monitor(scope.row)" v-auth>监控</el-button> <el-button type="text" @click="edit(scope.row)" v-auth>修改</el-button>
<el-button type="text" @click="review(scope.row)" v-auth>批阅</el-button> <el-button type="text" @click="delData(scope.row)" v-auth>取消</el-button>
<el-button type="text" @click="finish(scope.row)" v-auth>结束考试</el-button> </template>
<el-button type="text" @click="scoreQuery(scope.row)" v-auth>成绩查询</el-button> <template v-if="scope.row.state == 2">
<el-button type="text" @click="monitor(scope.row)" v-auth>监控</el-button>
<el-button type="text" @click="finish(scope.row)" v-auth>结束考试</el-button>
</template>
<template v-if="scope.row.state == 3">
<el-button type="text" @click="review(scope.row)" v-auth>批阅</el-button>
<el-button type="text" @click="scoreQuery(scope.row)" v-auth>成绩查询</el-button>
</template>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -66,22 +83,24 @@
</div> </div>
</el-card> </el-card>
<el-dialog title="创建考核" :visible.sync="addVisible" width="50%" @close="closeAdd" :close-on-click-modal="false"> <el-dialog :title="isAdd ? '创建考核' : '修改考核'" :visible.sync="addVisible" width="50%" @close="closeAdd" :close-on-click-modal="false">
<el-form ref="form" label-width="100px"> <el-form ref="form" label-width="100px">
<el-form-item prop="account" label="考核名称"> <el-form-item label="考核名称">
<el-input v-model="account" placeholder="请输入考核名称"></el-input> <el-input v-model="form.assessmentName" size="small" placeholder="请输入考核名称" @change="nameChange"></el-input>
</el-form-item> </el-form-item>
<el-form-item prop="userName" label="考核类型"> <el-form-item label="考核类型">
<el-select v-model="classificationId" placeholder="请选择考核类型"> <div class="w-p-30">
<el-option <el-select v-model="form.type" size="small" placeholder="请选择考核类型">
v-for="item in classificationList" <el-option
:key="item.id" v-for="item in typeList"
:label="item.name" :key="item.id"
:value="item.id"> :label="item.name"
</el-option> :value="item.id">
</el-select> </el-option>
</el-select>
</div>
</el-form-item> </el-form-item>
<el-form-item prop="account" label="考核时间"> <el-form-item label="考核时间">
<el-date-picker <el-date-picker
size="small" size="small"
v-model="time" v-model="time"
@ -93,15 +112,22 @@
:picker-options="pickerOptions" :picker-options="pickerOptions"
></el-date-picker> ></el-date-picker>
</el-form-item> </el-form-item>
<el-form-item prop="account" label="试卷选择"> <el-form-item label="试卷选择">
<el-button type="primary" @click="openSelect">试卷选择</el-button> <el-button type="primary" size="small" @click="openSelect">试卷选择</el-button>
<el-tag
class="m-l-10"
v-if="testPaperName"
closable
@close="removeTestPaper">
{{testPaperName}}
</el-tag>
</el-form-item> </el-form-item>
<el-form-item prop="account" label="发布班级"> <el-form-item label="发布班级">
<el-tree <el-tree
ref="per" ref="class"
:data="permissions" :data="classList"
show-checkbox show-checkbox
node-key="id" node-key="classId"
:default-expanded-keys="checkedIds" :default-expanded-keys="checkedIds"
:default-checked-keys="checkedIds" :default-checked-keys="checkedIds"
:props="defaultProps"> :props="defaultProps">
@ -111,23 +137,23 @@
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="addVisible = false">取消</el-button> <el-button @click="addVisible = false">取消</el-button>
<el-button type="primary" @click="uploadSure">确定</el-button> <el-button type="primary" @click="save">确定</el-button>
</span> </span>
</el-dialog> </el-dialog>
<el-dialog title="试卷选择" :visible.sync="selectVisible" width="40%" @close="closeSelect" :close-on-click-modal="false"> <el-dialog title="试卷选择" :visible.sync="selectVisible" width="40%" @close="closeSelect" :close-on-click-modal="false">
<div class="flex-justify-end"> <div class="flex j-end m-b-20">
<el-form label-width="80px" inline> <el-form label-width="80px" inline>
<el-form-item class="no-mb" label="所属课程"> <el-form-item class="no-mb" label="所属课程">
<el-select v-model="publishStatus" clearable placeholder="请选择所属课程" @change="getData"> <el-select v-model="cid" clearable placeholder="请选择所属课程" >
<el-option v-for="(item,index) in statusList" :key="index" :label="item.name" :value="item.value"></el-option> <el-option v-for="(item,index) in coursesList" :key="index" :label="item.typeName" :value="item.cid"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item class="no-mb"> <el-form-item class="no-mb">
<el-input <el-input
placeholder="请输入试卷名称" placeholder="请输入试卷名称"
prefix-icon="el-icon-search" prefix-icon="el-icon-search"
v-model="keyword" v-model="keywordPaper"
clearable clearable
></el-input> ></el-input>
</el-form-item> </el-form-item>
@ -135,17 +161,16 @@
</div> </div>
<el-table <el-table
:data="listData" :data="testPaperData"
ref="table" ref="table"
row-key="id" row-key="id"
class="table" class="table"
stripe stripe
header-align="center" header-align="center"
@selection-change="handleSelectionChange"
> >
<el-table-column width="60" label="选择" align="center"> <el-table-column width="60" label="选择" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-radio v-model="projectId" :label="scope.row.projectId">&nbsp;</el-radio> <el-radio v-model="testPaperId" :label="scope.row.id">&nbsp;</el-radio>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column type="index" width="100" label="序号" align="center"> <el-table-column type="index" width="100" label="序号" align="center">
@ -156,7 +181,7 @@
<el-table-column prop="name" label="试卷名称" align="center"></el-table-column> <el-table-column prop="name" label="试卷名称" align="center"></el-table-column>
<el-table-column label="操作" align="center"> <el-table-column label="操作" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="showQues(scope.row)">预览</el-button> <el-button type="text" @click="preview(scope.row)">预览</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -164,16 +189,16 @@
<el-pagination <el-pagination
background background
@current-change="handleCurrentChange" @current-change="handleCurrentChange"
:current-page="page" :current-page="pagePaper"
:page-size="pageSize" :page-size="pageSizePaper"
layout="total,prev, pager, next" layout="total,prev, pager, next"
:total="total" :total="totalPaper"
></el-pagination> ></el-pagination>
</div> </div>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="selectVisible = false">取消</el-button> <el-button @click="selectVisible = false">取消</el-button>
<el-button type="primary" @click="uploadSure">确定</el-button> <el-button type="primary" @click="savePaper">确定</el-button>
</span> </span>
</el-dialog> </el-dialog>
@ -201,24 +226,67 @@
</template> </template>
<script> <script>
import { mapState,mapGetters,mapActions } from 'vuex'
export default { export default {
data() { data() {
return { return {
listData: [],
keyword: '', keyword: '',
type: '', type: '',
typeList: [],
state: '', state: '',
stateList: [], listData: [],
page: 1, page: 1,
pageSize: 10, pageSize: 10,
total: 0, total: 0,
searchTimer: null, searchTimer: null,
isAdd: false,
addVisible: false, addVisible: false,
selectVisible: false, selectVisible: false,
detailVisible: false detailVisible: false,
time: [],
originalName: '',
nameRepeat: false,
form: {
assessmentName: '',
startTime: '',
endTime: '',
state: 1,
testPaperId: '',
type: ''
},
permissions: [],
pickerOptions: {
disabledDate: time => {
return time.getTime() < new Date().getTime() - 86400000
}
},
testPaperName: '',
classList: [],
checkedIds: [],
defaultProps: {
children: 'children',
label: 'className'
},
keywordPaper: '',
cid: '',
coursesList: [],
pagePaper: 1,
pageSizePaper: 10,
totalPaper: 0,
testPaperData: [],
testPaperId: ''
}; };
}, },
computed: {
...mapState('user', [
'userId','clientId'
]),
...mapState('assessment', [
'typeList','stateList'
]),
...mapGetters('assessment', [
'getTypeName','getStateName'
])
},
mounted() { mounted() {
this.getData() this.getData()
}, },
@ -228,9 +296,30 @@ export default {
this.searchTimer = setTimeout(() => { this.searchTimer = setTimeout(() => {
this.getData() this.getData()
},500) },500)
} },
keywordPaper: function(val) {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
this.getPapers()
},500)
},
time: function(val){
if(val){
this.form.startTime = val[0]
this.form.endTime = val[1]
}else{
this.form.startTime = ''
this.form.endTime = ''
}
},
}, },
methods: { methods: {
...mapActions('testpaper', [
'setInfo'
]),
...mapActions('assessment', [
'setAssInfo'
]),
getData() { getData() {
this.$get(this.api.queryAssessment, { this.$get(this.api.queryAssessment, {
page: this.page, page: this.page,
@ -249,8 +338,38 @@ export default {
this.page = val; this.page = val;
this.getData(); this.getData();
}, },
delData(row) {
this.$confirm('确定要删除吗?', '提示', {
type: 'warning'
})
.then(() => {
this.$post(`${this.api.deleteAssessment}?assessmentIds=${row.id}`).then(res => {
this.$message.success('删除成功')
this.getData()
}).catch(res => {});
})
.catch(() => {});
},
edit(row){ edit(row){
this.$router.push('add') this.isAdd = false
this.form = row
this.time = [this.form.startTime,this.form.endTime]
this.addVisible = true
this.getClass(row)
},
nameChange(){
if(this.form.assessmentName !== this.originalName){
this.$get(`${this.api.queryAssessmentName}?userId=${this.userId}&assessmentName=${this.form.assessmentName}`).then(res => {
if(res.data.userInfo){
this.nameRepeat = true
this.$message.warning('该考核名称已存在')
}else{
this.nameRepeat = false
}
}).catch(res => {});
}else{
this.nameRepeat = false
}
}, },
monitor(row){ monitor(row){
this.$router.push('monitor') this.$router.push('monitor')
@ -262,21 +381,128 @@ export default {
this.$router.push('scoreQuery') this.$router.push('scoreQuery')
}, },
review(row){ review(row){
this.setAssInfo({
id: row.id
})
this.$router.push('review') this.$router.push('review')
}, },
getClass(row) {
this.$post(this.api.getMyClass,{
// userId: this.userId
userId: 1
})
.then(res => {
this.classList = res.data.list
if(row){
this.$nextTick(() => {
this.$refs.class.setCheckedNodes(row.classId.split(','))
})
}
})
.catch(err => {})
},
addAss(){ addAss(){
this.isAdd = true
this.addVisible = true this.addVisible = true
this.getClass()
},
save(){
let form = this.form
if(form.assessmentName === '') return this.$message.warning('请填写考核名称')
if(this.nameRepeat) return this.$message.warning('该考核名称已存在')
if(form.type === '') return this.$message.warning('请选择考核类型')
if(form.startTime === '') return this.$message.warning('请选择考核时间')
if(form.testPaperId === '') return this.$message.warning('请选择试卷')
if(!this.$refs.class.getCheckedKeys().length) return this.$message.warning('请选择发布班级')
form.classId = this.$refs.class.getCheckedKeys().join()
let data = {
id: form.id,
userId: this.userId,
assessmentName: form.assessmentName,
classId: form.classId,
startTime: form.startTime,
endTime: form.endTime,
state: form.state,
type: form.type,
testPaperId: form.testPaperId,
}
if(this.form.id){
this.$post(this.api.updateAssessment, data).then(res => {
this.$message.success('修改成功')
this.addVisible = false
this.getData()
})
.catch(err => {
});
}else{
this.$post(this.api.addAssessment, data).then(res => {
this.$message.success('创建成功')
this.addVisible = false
this.getData()
})
.catch(err => {
});
}
}, },
closeAdd(){ closeAdd(){
this.form = {
assessmentName: '',
startTime: '',
endTime: '',
state: 1,
testPaperId: '',
type: ''
}
}, },
openSelect(){ openSelect(){
this.selectVisible = true this.selectVisible = true
this.getCourses()
this.getPapers()
},
removeTestPaper(){
this.testPaperName = ''
},
getCourses() {
this.$get(this.api.getTypeByOneLever)
.then(res => {
this.coursesList = res.data.list
})
.catch(err => {})
},
getPapers() {
this.$post(this.api.pageBySchoolTestPaper, {
pageNum: this.pagePaper,
pageSize: this.pageSizePaper,
userId: this.userId,
schoolId: this.clientId,
questionStem: this.keywordPaper,
})
.then(res => {
this.testPaperData = res.data.list.list
this.totalPaper = res.data.list.totalCount
this.$refs.table.clearSelection()
})
.catch(err => {})
},
preview(row){
this.setInfo({
id: row.id,
paperName: row.name,
totalDuration: row.duration
})
this.$router.push('/testPaper/show')
},
savePaper(){
this.form.testPaperId = this.testPaperId
this.testPaperName = this.testPaperData.find(n => n.id == this.testPaperId).name
this.selectVisible = false
}, },
closeSelect(){ closeSelect(){
}, },
show(row){ show(row){
this.form = row
this.detailVisible = true this.detailVisible = true
}, },
closeDetail(){ closeDetail(){

@ -1,15 +1,16 @@
<template> <template>
<div> <div>
<el-card shadow="hover" class="mgb20"> <el-card shadow="hover" class="m-b-20">
<div class="flex-center mgb20"> <div class="flex a-center m-b-20">
<p class="hr_tag"></p> <p class="hr_tag"></p>
<span>筛选</span> <span>筛选</span>
</div> </div>
<div class="flex-between"> <div class="flex j-between">
<el-form label-width="80px" inline> <el-form label-width="80px" inline>
<el-form-item class="no-mb" label="批阅状态"> <el-form-item class="no-mb" label="批阅状态">
<el-select v-model="publishStatus" clearable placeholder="请选择授课专业" @change="getData"> <el-select v-model="assessmentId" clearable placeholder="请选择批阅状态" @change="getData">
<el-option v-for="(item,index) in statusList" :key="index" :label="item.name" :value="item.value"></el-option> <el-option label="不限" value=""></el-option>
<el-option v-for="(item,index) in reviewStatusList" :key="index" :label="item.name" :value="item.id"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -24,9 +25,9 @@
</div> </div>
</el-card> </el-card>
<el-card shadow="hover" class="mgb20"> <el-card shadow="hover" class="m-b-20">
<div class="flex-between mgb20"> <div class="flex j-between m-b-20">
<div class="flex-center"> <div class="flex a-center">
<p class="hr_tag"></p> <p class="hr_tag"></p>
<span>考试批阅</span> <span>考试批阅</span>
</div> </div>
@ -39,29 +40,30 @@
class="table" class="table"
stripe stripe
header-align="center" header-align="center"
@selection-change="handleSelectionChange"
> >
<el-table-column
type="selection"
width="55"
align="center"
:reserve-selection="true"
></el-table-column>
<el-table-column type="index" width="100" label="序号" align="center"> <el-table-column type="index" width="100" label="序号" align="center">
<template <template
slot-scope="scope" slot-scope="scope"
>{{scope.$index + (page - 1) * pageSize + 1}}</template> >{{scope.$index + (page - 1) * pageSize + 1}}</template>
</el-table-column> </el-table-column>
<el-table-column prop="name" label="真实姓名" align="center"></el-table-column> <el-table-column prop="stuName" label="真实姓名" align="center"></el-table-column>
<el-table-column prop="name" label="学号" align="center"></el-table-column> <el-table-column prop="stuNo" label="学号" align="center"></el-table-column>
<el-table-column prop="name" label="交卷时间" align="center"></el-table-column> <el-table-column prop="handPaperTime" label="交卷时间" align="center"></el-table-column>
<el-table-column prop="name" label="答题用时(分钟)" align="center"></el-table-column> <el-table-column prop="timeSpent" label="答题用时(分钟)" align="center"></el-table-column>
<el-table-column prop="name" label="考试状态" align="center"></el-table-column> <el-table-column prop="name" label="考试状态" align="center">
<el-table-column prop="name" label="批阅状态" align="center"></el-table-column> <template slot-scope="scope">
{{getExamStatusName(scope.row.examinationStatus)}}
</template>
</el-table-column>
<el-table-column prop="name" label="批阅状态" align="center">
<template slot-scope="scope">
{{getReviewStatusName(scope.row.reviewStatus)}}
</template>
</el-table-column>
<el-table-column label="操作" align="center"> <el-table-column label="操作" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="show(scope.row)">查看</el-button> <el-button type="text" @click="review(scope.row,false)">查看</el-button>
<el-button type="text" @click="review(scope.row)">批阅</el-button> <el-button type="text" @click="review(scope.row,true)" v-if="scope.row.reviewStatus == 0 && scope.row.reviewStatus == 1">批阅</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -79,17 +81,30 @@
</div> </div>
</template> </template>
<script> <script>
import { mapState,mapGetters,mapActions } from 'vuex'
export default { export default {
data() { data() {
return { return {
listData: [{}], assessmentId: '',
keyword: '', keyword: '',
listData: [],
page: 1, page: 1,
pageSize: 10, pageSize: 10,
total: 0, total: 0,
searchTimer: null, searchTimer: null,
}; };
}, },
computed: {
...mapState('user', [
'userId','clientId'
]),
...mapState('assessment', [
'id','reviewStatusList','examStatusList'
]),
...mapGetters('assessment', [
'getReviewStatusName','getExamStatusName'
])
},
mounted() { mounted() {
this.getData() this.getData()
}, },
@ -102,29 +117,28 @@ export default {
} }
}, },
methods: { methods: {
...mapActions('assessment', [
'setAssInfo'
]),
getData() { getData() {
// this.$get(this.api.list, { this.$post(`${this.api.reviewList}?pageNum=${this.page}&pageSize=${this.pageSize}&userId=${2}&assessmentId=${1}`)
// page: this.page, .then(res => {
// size: this.pageSize, this.listData = res.data.list.list
// questionStem: this.keyword, this.total = res.data.list.totalCount
// questionType: this.subject })
// }) .catch(err => {})
// .then(res => {
// this.total = res.page.totalCount; //
// this.page = res.page.currPage; //
// this.listData = res.page.list;
// this.$refs.table.clearSelection()
// })
// .catch(err => {})
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.page = val this.page = val
this.getData() this.getData()
}, },
show(row){ review(row,isReview){
this.$router.push('/testPaper/doReview') this.setAssInfo({
}, isReview,
review(row){ id: row.id,
paperId: row.paperId,
reviewStatus: row.reviewStatus
})
this.$router.push('/testPaper/doReview') this.$router.push('/testPaper/doReview')
} }
} }

@ -1,11 +1,11 @@
<template> <template>
<div> <div>
<el-card shadow="hover" class="mgb20"> <el-card shadow="hover" class="m-b-20">
<div class="flex-center mgb20"> <div class="flex a-center m-b-20">
<p class="hr_tag"></p> <p class="hr_tag"></p>
<span>筛选</span> <span>筛选</span>
</div> </div>
<div class="flex-between"> <div class="flex j-between">
<el-form label-width="80px" inline> <el-form label-width="80px" inline>
<el-form-item class="no-mb" label="教学班级"> <el-form-item class="no-mb" label="教学班级">
<el-select v-model="publishStatus" clearable placeholder="请选择教学班级" @change="getData"> <el-select v-model="publishStatus" clearable placeholder="请选择教学班级" @change="getData">
@ -29,9 +29,9 @@
</div> </div>
</el-card> </el-card>
<el-card shadow="hover" class="mgb20"> <el-card shadow="hover" class="m-b-20">
<div class="flex-between mgb20"> <div class="flex j-between m-b-20">
<div class="flex-center"> <div class="flex a-center">
<p class="hr_tag"></p> <p class="hr_tag"></p>
<span>成绩查询</span> <span>成绩查询</span>
</div> </div>

@ -1,23 +1,25 @@
<template> <template>
<div> <div>
<el-card shadow="hover" class="mgb20"> <el-card shadow="hover" class="m-b-20">
<div> <div>
<div class="flex-center mgb20"> <div class="flex a-center m-b-20">
<p class="hr_tag"></p> <p class="hr_tag"></p>
<span>筛选</span> <span>筛选</span>
</div> </div>
<div> <div>
<div class="flex-between no-mb"> <div class="flex j-between no-mb">
<div> <div>
<el-form label-width="80px" inline> <el-form label-width="80px" inline>
<el-form-item label="创建人"> <el-form-item class="no-mb" label="创建人">
<el-select v-model="publishStatus" clearable placeholder="请选择创建人" @change="getData"> <el-select v-model="createUser" clearable placeholder="请选择创建人" @change="getData">
<el-option v-for="(item,index) in statusList" :key="index" :label="item.name" :value="item.value"></el-option> <el-option label="不限" value=""></el-option>
<el-option v-for="(item,index) in createUserList" :key="index" :label="item.name" :value="item.name"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
<el-form-item label="试题类型"> <el-form-item class="no-mb" label="试题类型">
<el-select v-model="publishStatus" clearable placeholder="请选择试题类型" @change="getData"> <el-select v-model="name" clearable placeholder="请选择试题类型" @change="getData">
<el-option v-for="(item,index) in statusList" :key="index" :label="item.name" :value="item.value"></el-option> <el-option label="不限" value=""></el-option>
<el-option v-for="(item,index) in typeList" :key="index" :label="item.name" :value="item.name"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -31,30 +33,36 @@
</el-card> </el-card>
<el-card shadow="hover"> <el-card shadow="hover">
<div class="flex-between mgb20"> <div class="flex j-between m-b-20">
<div class="flex-center"> <div class="flex a-center">
<p class="hr_tag"></p> <p class="hr_tag"></p>
<span>分类管理</span> <span>分类管理</span>
</div> </div>
<div> <div>
<el-button type="primary" size="small" round @click="delAllSelection" v-auth>批量删除</el-button> <!-- <el-button type="primary" size="small" round @click="delAllData" v-auth>取消共享</el-button> -->
<el-button type="primary" size="small" round @click="delAllData" v-auth>批量删除</el-button>
</div> </div>
</div> </div>
<el-table :data="listData" class="table" stripe header-align="center" row-key="id"> <el-table :data="listData" class="table" stripe header-align="center" row-key="id" @selection-change="handleSelectionChange">
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column> <el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
<el-table-column type="index" width="100" label="序号" align="center"></el-table-column> <el-table-column type="index" width="100" label="序号" align="center"></el-table-column>
<el-table-column prop="name" label="题干" align="center"></el-table-column> <el-table-column prop="questionStem" label="题干" align="center">
<template slot-scope="scope">
<div v-html="scope.row.questionStem"></div>
</template>
</el-table-column>
<el-table-column prop="name" label="试题类型" align="center"></el-table-column> <el-table-column prop="name" label="试题类型" align="center"></el-table-column>
<el-table-column prop="name" label="对应课程" align="center"></el-table-column> <el-table-column prop="courses" label="对应课程" align="center"></el-table-column>
<el-table-column prop="name" label="所属题库" align="center"></el-table-column> <el-table-column prop="typeName" label="所属题库" align="center"></el-table-column>
<el-table-column prop="name" label="知识点" align="center"></el-table-column> <el-table-column prop="knowledgePoints" label="知识点" align="center"></el-table-column>
<el-table-column prop="name" label="使用次数" align="center"></el-table-column> <el-table-column prop="useNum" label="使用次数" align="center"></el-table-column>
<el-table-column prop="name" label="共享时间" align="center"></el-table-column> <el-table-column prop="createTime" label="共享时间" align="center"></el-table-column>
<el-table-column prop="name" label="创建人" align="center"></el-table-column> <el-table-column prop="createUser" label="创建人" align="center"></el-table-column>
<el-table-column label="操作" align="center" width="300"> <el-table-column label="操作" align="center" width="120">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="editFirst(scope.row)" v-auth>修改</el-button> <el-button type="text" @click="show(scope.row)" v-auth>查看</el-button>
<el-button type="text" @click="handleDelete(scope.row)" v-auth>删除</el-button> <el-button v-if="scope.row.myShare" type="text" @click="cancelShare(scope.row)">取消共享</el-button>
<el-button type="text" @click="delData(scope.row)" v-auth>删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -64,52 +72,42 @@
</div> </div>
</el-card> </el-card>
<el-dialog :title="firstId ? '编辑一级分类' : '添加一级分类'" :visible.sync="firstVisible" width="24%" center :close-on-click-modal="false"> <ques-dialog ref="quesDialog" :title="topicsTitle" :visible.sync="visible" :isDetail.sync="isDetail" @getData="dialogGetData" @closeTopics="closeTopics"></ques-dialog>
<el-form>
<el-form-item>
<el-input placeholder="请输入题库分类名称" v-model="firstName"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="firstVisible = false">取消</el-button>
<el-button type="primary" @click="firstSubmit">确定</el-button>
</span>
</el-dialog>
<el-dialog :title="secondId ? '编辑二级分类' : '添加二级分类'" :visible.sync="secondVisible" width="24%" center :close-on-click-modal="false">
<el-form>
<el-form-item>
<el-input placeholder="请输入题库分类名称" v-model="secondName"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">
<el-button @click="secondVisible = false">取消</el-button>
<el-button type="primary" @click="secondSubmit">确定</el-button>
</span>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import quesDialog from './quesDialog';
import { mapState,mapActions } from 'vuex';
export default { export default {
data() { data() {
return { return {
createUser: '',
createUserList: [
{
name: '系统内置'
},{
name: '老师'
}
],
name: '',
typeList: [],
listData: [], listData: [],
keyword: '', keyword: '',
page: 1, page: 1,
pageSize: 10, pageSize: 10,
total: 0, total: 0,
multipleSelection: [],
searchTimer: null, searchTimer: null,
firstVisible: false, isDetail: false,
firstId: '', visible: false,
firstName: '', topicsTitle: ''
secondVisible: false,
secondName: '',
secondId: ''
}; };
}, },
components: {quesDialog},
mounted() { mounted() {
this.getData() this.getData()
this.getType()
}, },
watch: { watch: {
keyword: function(val) { keyword: function(val) {
@ -121,36 +119,111 @@ export default {
}, },
methods: { methods: {
getData() { getData() {
// this.$get(this.api.list, { this.$post(this.api.pageByConditionSharing, {
// page: this.page, pageNum: this.page,
// size: this.pageSize, pageSize: this.pageSize,
// questionStem: this.keyword, questionStem: this.keyword,
// questionType: this.subject createUser: this.createUser,
// }) name: this.name
// .then(res => { })
// this.dataTotal = res.page.totalCount; // .then(res => {
// this.page = res.page.currPage; // this.listData = res.data.list.list
// this.orderData = res.page.list; this.total = res.data.list.totalCount
// this.$refs.table.clearSelection() })
// }) .catch(err => {})
// .catch(err => {}) },
getType() {
this.$get(this.api.typesList)
.then(res => {
this.typeList = res.data.list
})
.catch(err => {})
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.page = val; this.page = val;
this.getData(); this.getData();
}, },
handleDelete(row) { handleSelectionChange(val) {
this.multipleSelection = val;
},
cancelShare(row) {
this.$confirm('确定要取消共享吗?', '提示', {
type: 'info'
})
.then(() => {
this.$post(`${this.api.cancelByMySharing}?ids=${row.id}`).then(res => {
this.$message.success('取消共享成功');
this.getData()
}).catch(res => {});
})
.catch(() => {});
},
delData(row) {
this.$confirm('确定要删除吗?', '提示', { this.$confirm('确定要删除吗?', '提示', {
type: 'warning' type: 'warning'
}) })
.then(() => { .then(() => {
this.$del(`${this.api.deleteColumn}/${row.id}`).then(res => { this.$post(`${this.api.deleteByMeSubject}?ids=${row.id}`).then(res => {
this.$message.success('删除成功'); this.$message.success('删除成功')
this.getData() this.getData()
}).catch(res => {}); }).catch(res => {});
}) })
.catch(() => {}); .catch(() => {});
}, },
delAllData() {
if(this.multipleSelection.length){
let newArr = this.multipleSelection
let delList = newArr.map(item => {
return item.id
})
this.$confirm('确定要删除吗?', '提示', {
type: 'warning'
})
.then(() => {
this.$post(`${this.api.deleteByMeSubject}?ids=${delList.join()}`).then(res => {
this.multipleSelection = [];
this.$message.success('删除成功')
this.getData()
}).catch(res => {});
})
.catch(() => {});
}else{
this.$message.error('请先选择数据!');
}
},
dialogGetData(){
this.getData()
this.visible = false
},
addTopics() {
this.topicsTitle = '新增题目'
this.visible = true
this.isDetail = false
},
getDetail(id) {
this.$refs.quesDialog.getData(id)
},
edit(row) {
this.topicsTitle = '编辑题目'
this.visible = true
this.isDetail = false
this.getDetail(row.id)
},
show(row) {
this.topicsTitle = '查看题目'
this.isDetail = true
this.visible = true
this.getDetail(row.id)
},
closeTopics() {
this.isDetail = false
},
} }
} }
</script> </script>
<style lang="scss" scoped>
/deep/.no-mb.el-form-item{
margin-bottom: 0;
}
</style>

@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<div class="tabs mgb20"> <div class="tabs m-b-20">
<a class="item" v-for="(item,index) in tabs" :key="index" :class="{active: index == active}" @click="tabChange(index)">{{item}}</a> <a class="item" v-for="(item,index) in tabs" :key="index" :class="{active: index == active}" @click="tabChange(index)">{{item}}</a>
</div> </div>

@ -2,16 +2,17 @@
<div> <div>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="24"> <el-col :span="24">
<el-card shadow="hover" class="mgb20"> <el-card shadow="hover" class="m-b-20">
<div class="flex-center mgb20"> <div class="flex a-center m-b-20">
<p class="hr_tag"></p> <p class="hr_tag"></p>
<span>测评题库</span> <span>测评题库</span>
</div> </div>
<div class="flex-between"> <div class="flex j-between">
<el-form label-width="80px"> <el-form label-width="80px">
<el-form-item class="no-mb" label="试题类型"> <el-form-item class="no-mb" label="试题类型">
<el-select v-model="publishStatus" clearable placeholder="请选择试题类型" @change="getData"> <el-select v-model="typeId" clearable placeholder="请选择试题类型" @change="getData">
<el-option v-for="(item,index) in statusList" :key="index" :label="item.name" :value="item.value"></el-option> <el-option label="不限" value=""></el-option>
<el-option v-for="(item,index) in typeList" :key="index" :label="item.name" :value="item.name"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
@ -28,9 +29,9 @@
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-card shadow="hover" class="mgb20"> <el-card shadow="hover" class="m-b-20">
<div class="flex-between mgb20"> <div class="flex j-between m-b-20">
<div class="flex-center"> <div class="flex a-center">
<p class="hr_tag"></p> <p class="hr_tag"></p>
<span>题目列表</span> <span>题目列表</span>
</div> </div>
@ -45,20 +46,20 @@
type="primary" type="primary"
size="small" size="small"
round round
@click="showBatchUpload" @click="showimportVisible"
>批量上传</el-button> >批量上传</el-button>
<el-button <el-button
type="primary" type="primary"
size="small" size="small"
round round
@click="showBatchUpload" @click="shareDataBatch"
>共享</el-button> >批量共享</el-button>
<el-button <!-- <el-button
type="primary" type="primary"
size="small" size="small"
round round
@click="showBatchUpload" @click="cancelShareBatch"
>取消共享</el-button> >取消共享</el-button> -->
<el-button <el-button
type="primary" type="primary"
size="small" size="small"
@ -88,30 +89,24 @@
slot-scope="scope" slot-scope="scope"
>{{scope.$index + (page - 1) * pageSize + 1}}</template> >{{scope.$index + (page - 1) * pageSize + 1}}</template>
</el-table-column> </el-table-column>
<el-table-column prop="name" label="题干" align="center"></el-table-column> <el-table-column prop="questionStem" label="题干" align="center">
<template slot-scope="scope">
<div v-html="scope.row.questionStem"></div>
</template>
</el-table-column>
<el-table-column prop="name" label="试题类型" align="center"></el-table-column> <el-table-column prop="name" label="试题类型" align="center"></el-table-column>
<el-table-column prop="name" label="对应课程" align="center"></el-table-column> <el-table-column prop="courses" label="对应课程" align="center"></el-table-column>
<el-table-column prop="name" label="所属题库" align="center"></el-table-column> <el-table-column prop="typeName" label="所属题库" align="center"></el-table-column>
<el-table-column prop="name" label="知识点" align="center"></el-table-column> <el-table-column prop="knowledgePoints" label="知识点" align="center"></el-table-column>
<el-table-column prop="name" label="使用次数" align="center"></el-table-column> <el-table-column prop="useNum" label="使用次数" align="center"></el-table-column>
<el-table-column prop="name" label="上传时间" align="center"></el-table-column> <el-table-column prop="createTime" label="上传时间" align="center"></el-table-column>
<el-table-column label="操作" align="center"> <el-table-column label="操作" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<template v-if="scope.row.isEnable"> <el-button type="text" @click="show(scope.row)">查看</el-button>
<el-button type="text" @click="showQues(scope.row)">查看</el-button> <el-button type="text" @click="edit(scope.row)">修改</el-button>
</template> <el-button type="text" @click="share(scope.row)">共享</el-button>
<template v-else>
<el-button type="text" @click="editQues(scope.row)">修改</el-button>
</template>
<el-switch
v-model="scope.row.isEnable"
:active-text="scope.row.isEnable ? '关闭' : '启用'"
:active-value="1"
:inactive-value="0"
style="margin: 0 10px 0 5px"
@change="switchQues($event,scope.row,scope.$index)"
></el-switch>
<el-button type="text" @click="delData(scope.row)">删除</el-button> <el-button type="text" @click="delData(scope.row)">删除</el-button>
<!-- <el-button type="text" @click="cancelShare(scope.row)">取消共享</el-button> -->
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -122,145 +117,59 @@
:current-page="page" :current-page="page"
:page-size="pageSize" :page-size="pageSize"
layout="total,prev, pager, next" layout="total,prev, pager, next"
:total="dataTotal" :total="total"
></el-pagination> ></el-pagination>
</div> </div>
</el-card> </el-card>
</el-col> </el-col>
</el-row> </el-row>
<el-dialog :title="topicsTitle" :visible.sync="NewTopics" width="30%" @close="closeTopics" :close-on-click-modal="false"> <ques-dialog ref="quesDialog" :title="topicsTitle" :visible.sync="visible" :isDetail.sync="isDetail" @getData="dialogGetData" @closeTopics="closeTopics"></ques-dialog>
<ques-dialog></ques-dialog>
<div slot="footer" class="dialog-footer" v-show="!isShowTopics">
<el-button v-throttle @click="NewTopics = false">取消</el-button>
<el-button type="primary" @click="saveTopics" v-throttle>确定</el-button>
</div>
</el-dialog>
<el-dialog title="批量上传" :visible.sync="BatchUpload" width="30%" @close="closeUpload" :close-on-click-modal="false"> <el-dialog title="批量导入" :visible.sync="importVisible" width="24%" center :close-on-click-modal="false">
<el-card shadow="hover" class="card_m" v-show="this.label=1"> <div style="text-align: center">
<div class="Upload"> <div style="margin-bottom: 10px;"><el-button type="primary" @click="downLoad">模板下载<i class="el-icon-download el-icon--right"></i></el-button></div>
<div class="bt" @click="downloadTem"> <el-upload
<el-link :underline="false"> accept=".xls,.xlsx"
1.请下载模板 :on-remove="handleRemove"
<i class="el-icon-download"></i> :on-error="uploadError"
</el-link> :on-success="uploadSuccess"
</div> :before-remove="beforeRemove"
<div class="bt"> :limit="1"
<el-upload :on-exceed="handleExceed"
accept=".xls,.xlsx" :action="this.api.impExcel"
:on-remove="handleRemove" :file-list="uploadList"
:on-error="uploadError" :data="{userId: this.userId}"
:on-success="uploadSuccess" name="file"
:before-remove="beforeRemove" >
:limit="1" <el-button type="primary" class="ml20">上传文件<i class="el-icon-upload2 el-icon--right"></i></el-button>
:on-exceed="handleExceed" </el-upload>
:action="this.api.upload" <el-link v-if="uploadFaild" type="primary" @click="showFaild">导入失败查看原因</el-link>
:file-list="uploadList" </div>
name="file"
>
<el-link :underline="false">
2.请点击上传模板
<i class="el-icon-upload"></i>
</el-link>
</el-upload>
</div>
<div>
<el-upload
accept=".xls,.xlsx"
:on-remove="handleDataRemove"
:on-error="uploadError"
:on-success="uploadSuccess"
:before-remove="beforeRemove"
:limit="1"
:on-exceed="handleExceed"
:action="this.api.import"
:file-list="uploadDataList"
name="file"
>
<el-link :underline="false">
3.请点击批量导入
<i class="el-icon-upload"></i>
</el-link>
</el-upload>
<el-link v-if="uploadFaild" type="primary" @click="showFaild">导入失败查看原因</el-link>
</div>
</div>
</el-card>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="BatchUpload = false">取消</el-button> <el-button @click="importVisible = false"> </el-button>
<el-button type="primary" v-throttle @click="uploadSure">确定</el-button> <el-button type="primary" @click="uploadSure"> </el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
</template> </template>
<script> <script>
import quesDialog from './quesDialog'; import quesDialog from './quesDialog'
import { mapState } from 'vuex'
export default { export default {
data() { data() {
return { return {
topicForm: {
answer: '',
questionType : '单选题',
questionStem : '',
optionA:'',
optionB:'',
optionC:'',
optionD:'',
optionE:'',
optionF:'',
aisTrue: false,
bisTrue: false,
cisTrue: false,
disTrue: false,
eisTrue: false,
fisTrue: false,
answerAnalysis: ''
},
rules: {
questionType: [{ required: true, message: '请选择题型', trigger: 'change' }],
questionStem: [{ required: true, message: '请填写题干', trigger: 'blur' }],
// optionA: [{ required: true, message: '', trigger: 'change' }],
// optionB: [{ required: true, message: '', trigger: 'change' }]
},
value: true,
subject: '', //
keyword: '', keyword: '',
typeId: '',
typeList: [],
listData: [], listData: [],
subjectList: [
{
id: '',
name: '不限'
},
{
id: 1,
name: '单选题'
},
{
id: 2,
name: '多选题'
},
{
id: 3,
name: '判断题'
}
],
dataTotal: 0, // ()
page: 1, page: 1,
pageSize: 10, pageSize: 10,
currentPage: 1, total: 0,
SetEvaluation: false, visible: false,
radio: '1', // importVisible: false,
topicsNumber: '', //
topicsTime: '', //
random: true,
custom: false,
info: {},
NewTopics: false, //
BatchUpload: false, //
questionType: ['','单选题','多选题','判断题'],
multipleSelection: [], multipleSelection: [],
isShowTopics: false, isDetail: false,
topicsTitle: '', topicsTitle: '',
uploadList: [], uploadList: [],
uploadDataList: [], uploadDataList: [],
@ -269,8 +178,14 @@ export default {
token: '', token: '',
}; };
}, },
computed: {
...mapState('user', [
'userId','clientId'
])
},
mounted() { mounted() {
this.getData() this.getData()
this.getType()
}, },
components: {quesDialog}, components: {quesDialog},
watch: { watch: {
@ -283,80 +198,96 @@ export default {
}, },
methods: { methods: {
getData() { getData() {
// this.$get(this.api.list, { this.$post(this.api.pageByCondition, {
// page: this.page, name: this.typeId,
// size: this.pageSize, pageNum: this.page,
// questionStem: this.keyword, pageSize: this.pageSize,
// questionType: this.subject questionStem: this.keyword,
// }) userId: this.userId
// .then(res => { })
// this.dataTotal = res.page.totalCount; // .then(res => {
// this.page = res.page.currPage; // this.listData = res.data.list.list
// this.listData = res.page.list; this.total = res.data.list.totalCount
// this.$refs.table.clearSelection() })
// }) .catch(err => {})
// .catch(err => {})
}, },
resetForm() { getType() {
this.topicForm = { this.$get(this.api.typesList)
answer: '', .then(res => {
questionType : '', this.typeList = res.data.list
questionStem : '',
optionA:'',
optionB:'',
optionC:'',
optionD:'',
optionE:'',
optionF:'',
aisTrue: false,
bisTrue: false,
cisTrue: false,
disTrue: false,
eisTrue: false,
fisTrue: false,
answerAnalysis: ''
}
this.$nextTick(() => {
this.$refs.topicForm.clearValidate()
}) })
.catch(err => {})
}, },
handleCurrentChange(val) { handleCurrentChange(val) {
this.page = val this.page = val
this.getData() this.getData()
}, },
dialogGetData(){
this.getData()
this.visible = false
},
addTopics() { addTopics() {
this.topicForm.id = ''
this.topicsTitle = '新增题目' this.topicsTitle = '新增题目'
this.NewTopics = true this.visible = true
this.isDetail = false
}, },
getDetail(id) { getDetail(id) {
this.$get(this.api.infoId + id).then(res => { this.$refs.quesDialog.getData(id)
this.topicForm = res.questions
this.topicForm.id = id
this.topicForm.questionType = this.questionType[this.topicForm.questionType]
this.NewTopics = true
}).catch(res => {});
}, },
editQues(row) { edit(row) {
this.topicsTitle = '编辑题目' this.topicsTitle = '编辑题目'
this.visible = true
this.isDetail = false
this.getDetail(row.id) this.getDetail(row.id)
}, },
showQues(row) { show(row) {
this.topicsTitle = '查看题目' this.topicsTitle = '查看题目'
this.isShowTopics = true this.isDetail = true
this.visible = true
this.getDetail(row.id) this.getDetail(row.id)
}, },
closeTopics() { closeTopics() {
this.isShowTopics = false this.isDetail = false
this.resetForm()
}, },
delData(row) { delData(row) {
this.$confirm('确定要删除吗?', '提示', { this.$confirm('确定要删除吗?', '提示', {
type: 'warning' type: 'warning'
}) })
.then(() => { .then(() => {
this.$post(this.api.delete,[row.id]).then(res => { this.$post(`${this.api.deleteByMeSubject}?ids=${row.id}`).then(res => {
this.$message.success('删除成功'); this.$message.success('删除成功')
this.getData()
}).catch(res => {});
})
.catch(() => {});
},
share(row) {
this.$confirm('确定要共享吗?', '提示', {
type: 'info'
})
.then(() => {
let data = {
userId: this.userId,
qid: row.id
}
this.$post(this.api.saveSharing,data).then(res => {
this.$message.success('共享成功')
this.getData()
}).catch(res => {});
})
.catch(() => {});
},
cancelShare(row) {
this.$confirm('确定要取消共享吗?', '提示', {
type: 'info'
})
.then(() => {
let data = {
userId: this.userId,
qid: row.id
}
this.$post(this.api.delete,data).then(res => {
this.$message.success('取消共享成功');
this.getData() this.getData()
}).catch(res => {}); }).catch(res => {});
}) })
@ -365,8 +296,60 @@ export default {
handleSelectionChange(val) { handleSelectionChange(val) {
this.multipleSelection = val; this.multipleSelection = val;
}, },
delAllData() { shareDataBatch() {
if(this.multipleSelection.length != ''){
let newArr = this.multipleSelection
let shareList = newArr.map(item => {
return item.id
})
this.$confirm('确定要共享吗?', '提示', {
type: 'info'
})
.then(() => {
let data = {
userId: this.userId,
ids: shareList
}
this.$post(this.api.batchSave,data).then(res => {
this.multipleSelection = [];
this.$message.success('共享成功');
this.getData()
}).catch(res => {});
})
.catch(() => {});
}else{
this.$message.error('请先选择数据!');
}
},
cancelShareBatch() {
if(this.multipleSelection.length != ''){ if(this.multipleSelection.length != ''){
let newArr = this.multipleSelection
let shareList = newArr.map(item => {
return item.id
})
this.$confirm('确定要取消共享吗?', '提示', {
type: 'info'
})
.then(() => {
let data = {
userId: this.userId,
qid: shareList
}
this.$post(this.api.saveSharing,data).then(res => {
this.multipleSelection = [];
this.$message.success('取消共享成功');
this.getData()
}).catch(res => {});
})
.catch(() => {});
}else{
this.$message.error('请先选择数据!');
}
},
delAllData() {
if(this.multipleSelection.length){
let newArr = this.multipleSelection let newArr = this.multipleSelection
let delList = newArr.map(item => { let delList = newArr.map(item => {
return item.id return item.id
@ -376,8 +359,7 @@ export default {
type: 'warning' type: 'warning'
}) })
.then(() => { .then(() => {
let data = delList this.$post(`${this.api.deleteByMeSubject}?ids=${delList.join()}`).then(res => {
this.$post(this.api.delete,data).then(res => {
this.multipleSelection = []; this.multipleSelection = [];
this.$message.success('删除成功'); this.$message.success('删除成功');
this.getData() this.getData()
@ -385,69 +367,14 @@ export default {
}) })
.catch(() => {}); .catch(() => {});
}else{ }else{
this.$message.error('请先选择题目 !'); this.$message.error('请先选择数据!');
}
},
downloadTem() {
location.href = this.api.download
},
questionTypeChange() {
for(let i in this.topicForm){
if(i.includes('isTrue')) this.topicForm[i] = false
} }
}, },
saveTopics() { downLoad() {
this.$refs.topicForm.validate((valid) => { location.href = this.api.getExcel
if (valid) {
let topicForm = this.topicForm
let optionCount = 0
let answer = ''
let isInvalidAnswer = false
for(let n in topicForm) {
if(n.includes('option')) {
topicForm[n] != '' && ++optionCount
}
if(n.includes('isTrue') && topicForm[n]) {
let curOpt = n.replace('isTrue','')
answer += curOpt
if(!topicForm[`option${curOpt.toUpperCase()}`].length) isInvalidAnswer = true
}
}
if(optionCount < 2) return this.$message.warning('请至少添加两个选项!');
if(!answer) return this.$message.warning('请设置正确答案!');
if(topicForm.questionType != '多选题' && answer.length > 1) return this.$message.warning('单选题、判断题只能设置一个正确答案!');
if(isInvalidAnswer) return this.$message.warning('正确答案选项为空,请重新设置!');
this.topicForm.questionType = this.questionType.indexOf(this.topicForm.questionType)
this.topicForm.answer = answer.toUpperCase()
if(this.topicForm.id) {
this.$put(this.api.questionsUpdate,this.topicForm).then(res => {
if(res.errmessage == 'success') {
this.$message.success('提交成功!');
this.NewTopics = false
this.getData()
}else{
this.$message.error(res.message);
}
}).catch(res => {});
}else{
this.$post(this.api.save,this.topicForm).then(res => {
if(res.errmessage == 'success') {
this.$message.success('提交成功!');
this.NewTopics = false
this.getData()
}else{
this.$message.error(res.message);
}
}).catch(res => {});
}
}else{
return false;
}
})
}, },
showBatchUpload() { showimportVisible() {
this.BatchUpload = true this.importVisible = true
}, },
handleExceed(files, fileList) { handleExceed(files, fileList) {
this.$message.warning( this.$message.warning(
@ -456,15 +383,22 @@ export default {
}, },
uploadSuccess(res, file, fileList) { uploadSuccess(res, file, fileList) {
this.uploadFaild = false this.uploadFaild = false
if(res.data.token){ if(res.success){
this.token = res.data.token if(res.data.data.token){
this.uploadFaild = true this.token = res.data.data.token
this.uploadFaild = true
}else{
this.$message.success('上传成功')
}
}else{
res.message ? this.$message.error(res.message) : this.$message.error('上传失败,请检查数据')
} }
}, },
showFaild(){ showFaild(){
location.href = `${this.api.export_failure}?token=${this.token}` location.href = `${this.api.export_failure}?token=${this.token}`
}, },
uploadError(err, file, fileList) { uploadError(err, file, fileList) {
console.log(222)
this.$message({ this.$message({
message: "上传出错,请重试!", message: "上传出错,请重试!",
type: "error", type: "error",
@ -481,7 +415,7 @@ export default {
this.uploadList = fileList this.uploadList = fileList
}, },
uploadSure(){ uploadSure(){
this.BatchUpload = false this.importVisible = false
this.page = 1 this.page = 1
this.keyword = '' this.keyword = ''
this.getData() this.getData()
@ -490,12 +424,6 @@ export default {
this.uploadList = [] this.uploadList = []
this.uploadDataList = [] this.uploadDataList = []
}, },
addFill(){
this.fillList.push('')
},
delFill(index){
this.fillList.splice(index,1)
},
} }
}; };
</script> </script>
@ -504,47 +432,5 @@ export default {
/deep/.no-mb.el-form-item{ /deep/.no-mb.el-form-item{
margin-bottom: 0; margin-bottom: 0;
} }
/deep/.el-radio{
margin-right: 15px;
}
::v-deep .el-checkbox-group{
font-size: 2px;
}
.Upload {
text-align: center;
}
.bt {
margin-bottom: 15px;
}
.flex_around {
display: flex;
justify-content: space-around;
align-items: center;
}
.card_m {
margin: 10px 0 20px 0;
}
.input ::v-deep .el-input {
width: 50%;
}
.radio {
margin: 0 15px 0 30px;
font-weight: 600;
}
.input-wrap{
display: flex;
align-items: center;
margin-bottom: 10px;
.el-input{
display: inline-block;
width: 250px;
}
i{
margin-left: 5px;
font-size: 22px;
cursor: pointer;
}
}
</style> </style>

@ -1,103 +1,138 @@
<template> <template>
<div> <div>
<el-form <el-dialog :title="title" :visible.sync="visible" width="40%" @close="closeTopics" center :close-on-click-modal="false">
:model="topicForm" <el-form
:rules="rules" :model="topicForm"
:disabled="isShowTopics" :rules="rules"
ref="topicForm" :disabled.sync="isDetail"
label-width="100px" ref="topicForm"
class="demo-topicForm" label-width="100px"
> class="topic-form"
<el-form-item label="题型" prop="questionType"> >
<el-radio-group v-model="topicForm.questionType" @change="questionTypeChange"> <el-form-item label="所属题库" prop="cid">
<el-radio label="单选题"></el-radio> <el-select v-model="topicForm.cid" clearable placeholder="请选择所属题库">
<el-radio label="多选题"></el-radio> <el-option v-for="(item,index) in quesBankList" :key="index" :label="item.typeName" :value="item.cid"></el-option>
<el-radio label="判断题"></el-radio> </el-select>
<el-radio label="填空题"></el-radio> </el-form-item>
<el-radio label="简答题"></el-radio> <!-- <el-form-item label="考试题型" prop="questionStem">
</el-radio-group> <el-select v-model="topicForm.typeId" clearable placeholder="请选择考试题型">
</el-form-item> <el-option v-for="(item,index) in typeList" :key="index" :label="item.name" :value="item.name"></el-option>
<el-form-item label="上传" prop="questionStem"> </el-select>
<el-upload </el-form-item> -->
:on-remove="handleRemove" <el-form-item label="所属课程" prop="courses">
:on-error="uploadError" <el-input v-model="topicForm.courses"></el-input>
:on-success="uploadSuccess" </el-form-item>
:before-remove="beforeRemove" <el-form-item label="知识点" prop="knowledgePoints">
:limit="1" <el-input v-model="topicForm.knowledgePoints"></el-input>
:on-exceed="handleExceed" </el-form-item>
:action="this.api.uploadFileUser" <el-form-item label="题型" prop="questionType">
:file-list="uploadList" <el-radio-group v-model="topicForm.questionType" @change="questionTypeChange">
name="file" <el-radio label="单选题"></el-radio>
> <el-radio label="多选题"></el-radio>
<el-button type="primary" class="ml20">上传视频/音频</el-button> <el-radio label="判断题"></el-radio>
</el-upload> <el-radio label="填空题"></el-radio>
<el-link v-if="uploadFaild" type="primary" @click="showFaild">导入失败查看原因</el-link> <el-radio label="简答题"></el-radio>
</el-form-item> </el-radio-group>
<el-form-item label="题干" prop="questionStem"> </el-form-item>
<el-input type="textarea" v-model="topicForm.questionStem"></el-input> <el-form-item label="上传" prop="source">
</el-form-item> <el-upload
:on-remove="handleRemove"
:on-error="uploadError"
:on-success="uploadSuccess"
:before-remove="beforeRemove"
:limit="1"
:on-exceed="handleExceed"
:action="this.api.fileupload"
:file-list="uploadList"
name="file"
>
<el-button type="primary" class="ml20">上传视频/音频</el-button>
</el-upload>
<el-link v-if="uploadFaild" type="primary" @click="showFaild">导入失败查看原因</el-link>
</el-form-item>
<el-form-item label="题干" prop="questionStem">
<quill :border="true" :readonly="isDetail" :key="isDetail" v-model="topicForm.questionStem" :minHeight="150" :height="150" />
</el-form-item>
<el-form-item label="选项" prop="optionA" v-if="topicForm.questionType != '填空题' && topicForm.questionType != '简答题'"> <el-form-item label="选项" prop="optionA" v-if="topicForm.questionType != '填空题' && topicForm.questionType != '简答题'">
<div class="input flex_around bt">
<span>A</span>
<el-input placeholder="请输入题目" v-model="topicForm.optionA"></el-input>
<el-checkbox v-model="topicForm.aisTrue">设为正确答案</el-checkbox>
</div>
<div class="input flex_around bt">
<span>B</span>
<el-input placeholder="请输入题目" v-model="topicForm.optionB"></el-input>
<el-checkbox v-model="topicForm.bisTrue">设为正确答案</el-checkbox>
</div>
<template v-if="topicForm.questionType != '判断题'">
<div class="input flex_around bt"> <div class="input flex_around bt">
<span>C</span> <span>A</span>
<el-input placeholder="请输入题目" v-model="topicForm.optionC"></el-input> <el-input placeholder="请输入题目" v-model="topicForm.optionA"></el-input>
<el-checkbox v-model="topicForm.cisTrue">设为正确答案</el-checkbox> <el-checkbox v-model="topicForm.aisTrue">设为正确答案</el-checkbox>
</div> </div>
<div class="input flex_around bt"> <div class="input flex_around bt">
<span>D</span> <span>B</span>
<el-input placeholder="请输入题目" v-model="topicForm.optionD"></el-input> <el-input placeholder="请输入题目" v-model="topicForm.optionB"></el-input>
<el-checkbox v-model="topicForm.disTrue">设为正确答案</el-checkbox> <el-checkbox v-model="topicForm.bisTrue">设为正确答案</el-checkbox>
</div> </div>
<div class="input flex_around bt"> <template v-if="topicForm.questionType != '判断题'">
<span>E</span> <div class="input flex_around bt">
<el-input placeholder="请输入题目" v-model="topicForm.optionE"></el-input> <span>C</span>
<el-checkbox v-model="topicForm.eisTrue">设为正确答案</el-checkbox> <el-input placeholder="请输入题目" v-model="topicForm.optionC"></el-input>
</div> <el-checkbox v-model="topicForm.cisTrue">设为正确答案</el-checkbox>
<div class="input flex_around"> </div>
<span>F</span> <div class="input flex_around bt">
<el-input placeholder="请输入题目" v-model="topicForm.optionF"></el-input> <span>D</span>
<el-checkbox v-model="topicForm.fisTrue">设为正确答案</el-checkbox> <el-input placeholder="请输入题目" v-model="topicForm.optionD"></el-input>
</div> <el-checkbox v-model="topicForm.disTrue">设为正确答案</el-checkbox>
</template> </div>
</el-form-item> <div class="input flex_around bt">
<el-form-item label="正确答案" prop="optionA" v-if="topicForm.questionType == '填空题'"> <span>E</span>
<div class="bt"> <el-input placeholder="请输入题目" v-model="topicForm.optionE"></el-input>
<div class="input-wrap" v-for="(item,index) in fillList" :key="index"> <el-checkbox v-model="topicForm.eisTrue">设为正确答案</el-checkbox>
<el-input </div>
placeholder="请输入题目" <div class="input flex_around">
v-model="fillList[index]" <span>F</span>
></el-input> <el-input placeholder="请输入题目" v-model="topicForm.optionF"></el-input>
<template v-if="index == 0"> <el-checkbox v-model="topicForm.fisTrue">设为正确答案</el-checkbox>
<i class="el-icon-circle-plus-outline" @click="addFill"></i> </div>
</template> </template>
<template v-if="fillList.length > 1"> </el-form-item>
<i class="el-icon-close" @click="delFill(index)"></i> <el-form-item label="正确答案" prop="optionA" v-if="topicForm.questionType == '填空题'">
</template> <div class="bt">
<div class="input-wrap" v-for="(item,index) in fillList" :key="index">
<el-input
placeholder="请输入正确答案"
v-model="fillList[index]"
></el-input>
<template v-if="!isDetail">
<template v-if="index == 0">
<i class="el-icon-circle-plus-outline" @click="addFill"></i>
</template>
<template v-if="fillList.length > 1">
<i class="el-icon-close" @click="delFill(index)"></i>
</template>
</template>
</div>
</div> </div>
</div> </el-form-item>
</el-form-item> <el-form-item label="答案解析" prop="answerAnalysis">
<el-form-item label="答案解析" prop="answerAnalysis"> <el-input type="textarea" v-model="topicForm.answerAnalysis"></el-input>
<el-input type="textarea" v-model="topicForm.answerAnalysis"></el-input> </el-form-item>
</el-form-item> </el-form>
</el-form> <div slot="footer" class="dialog-footer" v-show="!isDetail">
<el-button v-throttle @click="closeDialog">取消</el-button>
<el-button type="primary" @click="saveTopics" v-throttle>确定</el-button>
</div>
</el-dialog>
</div> </div>
</template> </template>
<script> <script>
import quill from '@/components/quill'
import { mapState } from 'vuex'
export default { export default {
props: ['visible','title','isDetail'],
data() { data() {
return { return {
quesBankList: [],
typeList: [],
topicForm: { topicForm: {
userId: this.userId,
schoolId: this.clientId,
cid : '',
typeId: '',
courses: '',
knowledgePoints: '',
answer: '', answer: '',
questionType : '单选题', questionType : '单选题',
questionStem : '', questionStem : '',
@ -113,49 +148,174 @@ export default {
disTrue: false, disTrue: false,
eisTrue: false, eisTrue: false,
fisTrue: false, fisTrue: false,
answerAnalysis: '' answerAnalysis: '',
videoAudio: ''
}, },
rules: { rules: {
cid: [{ required: true, message: '请选择所属题库', trigger: 'change' }],
courses: [{ required: true, message: '请输入所属课程', trigger: 'blur' }],
knowledgePoints: [{ required: true, message: '请填写知识点', trigger: 'blur' }],
questionType: [{ required: true, message: '请选择题型', trigger: 'change' }], questionType: [{ required: true, message: '请选择题型', trigger: 'change' }],
questionStem: [{ required: true, message: '请填写题干', trigger: 'blur' }], questionStem: [{ required: true, message: '请填写题干', trigger: 'blur' }],
// optionA: [{ required: true, message: '', trigger: 'change' }], // optionA: [{ required: true, message: '', trigger: 'change' }],
// optionB: [{ required: true, message: '', trigger: 'change' }] // optionB: [{ required: true, message: '', trigger: 'change' }]
}, },
questionType: ['','单选题','多选题','判断题'], options: 'ABCDEF',
fillList: [''] questionType: ['','单选题','多选题','判断题','简答题','填空题'],
fillList: [''],
uploadList: [],
uploadFaild: false
}; };
}, },
mounted() { computed: {
this.getData() ...mapState('user', [
'userId','clientId'
])
}, },
watch: { components: { quill },
keyword: function(val) { mounted() {
clearTimeout(this.searchTimer) this.getQuesBank()
this.searchTimer = setTimeout(() => {
this.getData()
},500)
}
}, },
// watch: {
// visible(val){
// this.toTop()
// }
// },
methods: { methods: {
getData() { getData(id) {
// this.$get(this.api.list, { this.$post(`${this.api.findById}?id=${id}`)
// page: this.page, .then(res => {
// size: this.pageSize, let list = res.data.list
// questionStem: this.keyword, this.topicForm = {
// questionType: this.subject id: list.id,
// }) userId: list.userId,
// .then(res => { schoolId: list.schoolId,
// this.dataTotal = res.page.totalCount; // cid : list.cid,
// this.page = res.page.currPage; // typeId: list.typeId,
// this.orderData = res.page.list; courses: list.courses,
// this.$refs.table.clearSelection() knowledgePoints: list.knowledgePoints,
// }) answer: list.answer,
// .catch(err => {}) questionType: '',
questionStem: list.questionStem,
optionA: list.optionA,
optionB: list.optionB,
optionC: list.optionC,
optionD: list.optionD,
optionE: list.optionE,
optionF: list.optionF,
aisTrue: false,
bisTrue: false,
cisTrue: false,
disTrue: false,
eisTrue: false,
fisTrue: false,
answerAnalysis: list.answerAnalysis,
videoAudio: list.videoAudio
},
this.topicForm.questionType = this.questionType[this.topicForm.typeId]
let typeId = this.topicForm.typeId
if(typeId == 1 || typeId == 2 || typeId == 3){
let answer = this.topicForm.answer.toLowerCase().split('')
answer.forEach(n => {
this.topicForm[`${n}isTrue`] = true
})
}else if(typeId == 5){
let fillList = []
for(let n in this.topicForm) {
if(n.includes('option') && this.topicForm[n]) {
fillList.push(this.topicForm[n])
}
}
this.fillList = fillList
}
this.$refs.topicForm.clearValidate()
this.toTop()
})
.catch(err => {})
},
getQuesBank() {
this.$get(this.api.getTypeByOneLever)
.then(res => {
this.quesBankList = res.data.list
})
.catch(err => {})
},
questionTypeChange() {
for(let i in this.topicForm){
if(i.includes('isTrue')) this.topicForm[i] = false
}
},
saveTopics() {
this.$refs.topicForm.validate((valid) => {
if (valid) {
let topicForm = this.topicForm
let optionCount = 0
let answer = ''
let isInvalidAnswer = false
this.topicForm.typeId = this.questionType.indexOf(topicForm.questionType)
if(topicForm.typeId != 4 && topicForm.typeId != 5){
for(let n in topicForm) {
if(n.includes('option')) {
topicForm[n] != '' && ++optionCount
}
if(n.includes('isTrue') && topicForm[n]) {
let curOpt = n.replace('isTrue','')
answer += curOpt
if(!topicForm[`option${curOpt.toUpperCase()}`].length) isInvalidAnswer = true
}
}
if(optionCount < 2) return this.$message.warning('请至少添加两个选项!');
if(!answer) return this.$message.warning('请设置正确答案!');
if(topicForm.questionType != '多选题' && answer.length > 1) return this.$message.warning('单选题、判断题只能设置一个正确答案!');
if(isInvalidAnswer) return this.$message.warning('正确答案选项为空,请重新设置!');
this.topicForm.answer = answer.toUpperCase()
}else if(this.topicForm.typeId == 5){
if(!this.fillList.length || this.fillList.every(n => n === '')) return this.$message.warning('请至少添加一个正确答案!')
this.options.split('').map((n,i) => {
this.topicForm[`option${this.options[i]}`] = ''
})
this.fillList.map((n,i) => {
this.topicForm[`option${this.options[i]}`] = n
})
}
this.topicForm.userId = this.userId
if(this.topicForm.id) {
this.$post(this.api.updateQuestions,this.topicForm).then(res => {
if(res.success) {
this.$message.success('修改成功');
this.$emit('getData')
}else{
this.$message.error(res.data.message);
}
}).catch(res => {});
}else{
this.$post(this.api.addQuestions,this.topicForm).then(res => {
if(res.success) {
this.$message.success('新增成功');
this.$emit('getData')
}else{
this.$message.error(res.data.message);
}
}).catch(res => {});
}
}else{
return false;
}
})
},
toTop(){
document.querySelector('.topic-form').scrollTop = 0
}, },
resetForm() { resetForm() {
this.topicForm = { this.topicForm = {
userId: this.userId,
cid : '',
typeId: '',
courses: '',
knowledgePoints: '',
answer: '', answer: '',
questionType : '', questionType : '单选题',
questionStem : '', questionStem : '',
optionA:'', optionA:'',
optionB:'', optionB:'',
@ -169,21 +329,14 @@ export default {
disTrue: false, disTrue: false,
eisTrue: false, eisTrue: false,
fisTrue: false, fisTrue: false,
answerAnalysis: '' answerAnalysis: '',
videoAudio: ''
} }
this.$nextTick(() => { this.$nextTick(() => {
this.$refs.topicForm.clearValidate() this.$refs.topicForm.clearValidate()
this.toTop()
}) })
}, },
handleCurrentChange(val) {
this.page = val
this.getData()
},
addTopics() {
this.topicForm.id = ''
this.topicsTitle = '新增题目'
this.NewTopics = true
},
getDetail(id) { getDetail(id) {
this.$get(this.api.infoId + id).then(res => { this.$get(this.api.infoId + id).then(res => {
this.topicForm = res.questions this.topicForm = res.questions
@ -192,121 +345,49 @@ export default {
this.NewTopics = true this.NewTopics = true
}).catch(res => {}); }).catch(res => {});
}, },
editQues(row) { addFill(){
this.topicsTitle = '编辑题目' if(this.fillList.some(n => n === '')) return this.$message.warning('请先填写当前答案')
this.getDetail(row.id) this.fillList.length < 5 ? this.fillList.push('') : this.$message.warning('最多添加5个')
},
showQues(row) {
this.topicsTitle = '查看题目'
this.isShowTopics = true
this.getDetail(row.id)
},
closeTopics() {
this.isShowTopics = false
this.resetForm()
}, },
delData(row) { delFill(index){
this.$confirm('确定要删除吗?', '提示', { this.fillList.splice(index,1)
type: 'warning'
})
.then(() => {
this.$post(this.api.delete,[row.id]).then(res => {
this.$message.success('删除成功');
this.getData()
}).catch(res => {});
})
.catch(() => {});
}, },
handleSelectionChange(val) { handleExceed(files, fileList) {
this.multipleSelection = val; this.$message.warning(
`当前限制选择 1 个文件,如需更换,请删除上一个文件再重新选择!`
);
}, },
delAllData() { uploadSuccess(res, file, fileList) {
if(this.multipleSelection.length != ''){ this.uploadFaild = false
let newArr = this.multipleSelection if(res.data.token){
let delList = newArr.map(item => { this.token = res.data.token
return item.id this.uploadFaild = true
})
this.$confirm('确定要删除吗?', '提示', {
type: 'warning'
})
.then(() => {
let data = delList
this.$post(this.api.delete,data).then(res => {
this.multipleSelection = [];
this.$message.success('删除成功');
this.getData()
}).catch(res => {});
})
.catch(() => {});
}else{
this.$message.error('请先选择题目 !');
} }
}, },
downloadTem() { showFaild(){
location.href = this.api.download location.href = `${this.api.export_failure}?token=${this.token}`
}, },
questionTypeChange() { uploadError(err, file, fileList) {
for(let i in this.topicForm){ this.$message({
if(i.includes('isTrue')) this.topicForm[i] = false message: "上传出错,请重试!",
} type: "error",
center: true
});
}, },
saveTopics() { beforeRemove(file, fileList) {
this.$refs.topicForm.validate((valid) => { return this.$confirm(`确定移除 ${file.name}`);
if (valid) {
let topicForm = this.topicForm
let optionCount = 0
let answer = ''
let isInvalidAnswer = false
for(let n in topicForm) {
if(n.includes('option')) {
topicForm[n] != '' && ++optionCount
}
if(n.includes('isTrue') && topicForm[n]) {
let curOpt = n.replace('isTrue','')
answer += curOpt
if(!topicForm[`option${curOpt.toUpperCase()}`].length) isInvalidAnswer = true
}
}
if(optionCount < 2) return this.$message.warning('请至少添加两个选项!');
if(!answer) return this.$message.warning('请设置正确答案!');
if(topicForm.questionType != '多选题' && answer.length > 1) return this.$message.warning('单选题、判断题只能设置一个正确答案!');
if(isInvalidAnswer) return this.$message.warning('正确答案选项为空,请重新设置!');
this.topicForm.questionType = this.questionType.indexOf(this.topicForm.questionType)
this.topicForm.answer = answer.toUpperCase()
if(this.topicForm.id) {
this.$put(this.api.questionsUpdate,this.topicForm).then(res => {
if(res.errmessage == 'success') {
this.$message.success('提交成功!');
this.NewTopics = false
this.getData()
}else{
this.$message.error(res.message);
}
}).catch(res => {});
}else{
this.$post(this.api.save,this.topicForm).then(res => {
if(res.errmessage == 'success') {
this.$message.success('提交成功!');
this.NewTopics = false
this.getData()
}else{
this.$message.error(res.message);
}
}).catch(res => {});
}
}else{
return false;
}
})
}, },
addFill(){ handleRemove(file, fileList) {
this.fillList.push('') this.uploadList = fileList
}, },
delFill(index){ closeTopics() {
this.fillList.splice(index,1) this.$emit('update:visible',false)
this.$emit('closeTopics')
this.resetForm()
}, },
closeDialog(){
this.$emit('update:visible',false)
}
} }
}; };
</script> </script>
@ -332,9 +413,6 @@ export default {
justify-content: space-around; justify-content: space-around;
align-items: center; align-items: center;
} }
.card_m {
margin: 10px 0 20px 0;
}
.input ::v-deep .el-input { .input ::v-deep .el-input {
width: 50%; width: 50%;
} }
@ -357,5 +435,10 @@ export default {
cursor: pointer; cursor: pointer;
} }
} }
.topic-form{
height: 500px;
padding-right: 20px;
overflow: auto;
}
</style> </style>

@ -156,7 +156,7 @@
</div> </div>
</div> </div>
<div class="card mgb20"> <div class="card m-b-20">
<p class="block-title">账号信息</p> <p class="block-title">账号信息</p>
<div class="information"> <div class="information">
<div class="block"> <div class="block">

@ -7,8 +7,8 @@
<el-main style="padding-top: 0"> <el-main style="padding-top: 0">
<el-col :span="24"> <el-col :span="24">
<el-card shadow="hover" class="mgb20 student_tab"> <el-card shadow="hover" class="m-b-20 student_tab">
<div class="flex-between mgb20"> <div class="flex j-between m-b-20">
<div> <div>
<el-input placeholder="请输入学生名称" prefix-icon="el-icon-search" v-model="keyword" clearable></el-input> <el-input placeholder="请输入学生名称" prefix-icon="el-icon-search" v-model="keyword" clearable></el-input>
</div> </div>
@ -39,7 +39,7 @@
</el-table-column> </el-table-column>
<el-table-column prop="loginNumber" label="登录次数" align="center"> <el-table-column prop="loginNumber" label="登录次数" align="center">
</el-table-column> </el-table-column>
<el-table-column prop="lastLoginTime" label="上次登录时间" align="center"> <el-table-column prop="lastLoginTime" label="上次登录时间" width="150" align="center">
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center"> <el-table-column label="操作" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
@ -136,6 +136,7 @@
<script> <script>
import StudentSide from './studentSide' import StudentSide from './studentSide'
import { mapState,mapGetters } from 'vuex' import { mapState,mapGetters } from 'vuex'
import util from '@/libs/util'
export default { export default {
data() { data() {
return { return {
@ -144,6 +145,7 @@ export default {
clientId: this.clientId, clientId: this.clientId,
clientName: this.clientName, clientName: this.clientName,
studentId: '', studentId: '',
userId: '',
userName: '', userName: '',
workNumber: '', workNumber: '',
phone: '', phone: '',
@ -181,7 +183,7 @@ export default {
{ required: true, message: '请选择年级', trigger: 'change' } { required: true, message: '请选择年级', trigger: 'change' }
], ],
classId: [ classId: [
// { required: true, message: '', trigger: 'change' } { required: true, message: '请选择班级', trigger: 'change' }
], ],
phone: [ phone: [
{ {
@ -248,7 +250,7 @@ export default {
getData(){ getData(){
let data = { let data = {
searchContent: this.keyword, searchContent: this.keyword,
professionalId: this.professionalStudentIds, professionalIds: this.professionalStudentIds,
gradeIds: this.gradeIds, gradeIds: this.gradeIds,
classIds: this.classIds, classIds: this.classIds,
schoolId: this.clientId schoolId: this.clientId
@ -258,69 +260,83 @@ export default {
this.total = res.data.total this.total = res.data.total
}).catch(res => {}); }).catch(res => {});
}, },
fircheck(val){ handleCheck(data){
val.ischeck = !val.ischeck let professionalStudentIds = []
val.children.map(e => { let gradeIds = []
e.children.map(r => { let classIds = []
if(val.ischeck){
e.ischeck = true data.forEach( e => {
r.ischeck = true if(e.ischeck){
this.parmData.push(r.classId) professionalStudentIds.push(e.stuProfessionalArchitectureId)
}else{
util.removeByValue(professionalStudentIds, e.stuProfessionalArchitectureId);
}
e.children.forEach( r => {
if(r.ischeck){
gradeIds.push(r.gradeId)
}else{ }else{
e.ischeck = false util.removeByValue(gradeIds, r.gradeId);
r.ischeck = false
this.core.removeByValue(this.parmData, r.classId);
} }
r.children.forEach( n => {
if(n.ischeck){
classIds.push(n.classId)
}else{
util.removeByValue(classIds, n.classId);
}
})
}) })
}) })
this.classIds = this.parmData.toString() this.professionalStudentIds = professionalStudentIds.toString()
this.gradeIds = gradeIds.toString()
this.classIds = classIds.toString()
this.getData() this.getData()
}, },
fircheck(val,val2){
val.ischeck = !val.ischeck
val.children.map( e => e.ischeck = val.ischeck)
val.children.map( e => e.children.map(n => n.ischeck = e.ischeck))
this.handleCheck(val2)
},
twocheck(val,val2){ twocheck(val,val2){
const twoStatus = val.ischeck val.ischeck = !val.ischeck
val.ischeck = !twoStatus val.children.map( e => e.ischeck = val.ischeck)
val2.map(e => { val2.forEach( e => {
e.children.map(r => { e.children.forEach( r => {
r.children.map(k =>{ if(r.gradeId == val.gradeId){
if(r.gradeId == val.gradeId){ if(e.children.every(i => i.ischeck)){
if(r.ischeck){ e.ischeck = true
e.ischeck = true }else{
k.ischeck = true e.ischeck = false
this.parmData.push(k.classId)
} else {
e.ischeck = false
k.ischeck = false
this.core.removeByValue(this.parmData, k.classId);
}
} }
}) }
}) })
}) })
this.classIds = this.parmData.toString() this.handleCheck(val2)
this.getData()
}, },
threecheck(val,val2){ threecheck(val,val2){
const threeStatus = val.ischeck val.ischeck = !val.ischeck
val.ischeck = !threeStatus val2.forEach( e => {
val2.map(e => { e.children.forEach( r => {
e.children.map(r => { r.children.forEach( n => {
r.children.map(k =>{ if(n.classId == val.classId){
if(k.classId == val.classId){ if(r.children.every(i => i.ischeck)){
if(k.ischeck){
e.ischeck = true
r.ischeck = true r.ischeck = true
this.parmData.push(val.classId) }else{
} else {
e.ischeck = false
r.ischeck = false r.ischeck = false
this.core.removeByValue(this.parmData,val.classId);
} }
} }
}) })
// if(r.gradeId == val.gradeId){
if(e.children.every(i => i.ischeck)){
e.ischeck = true
}else{
e.ischeck = false
}
// }
}) })
}) })
this.classIds = this.parmData.toString() this.handleCheck(val2)
this.getData()
}, },
closestudent(){ closestudent(){
this.$refs.studentForm.resetFields() this.$refs.studentForm.resetFields()
@ -335,9 +351,8 @@ export default {
this.studentVisible = true this.studentVisible = true
this.isAdd = false this.isAdd = false
this.studentForm.studentId = row.studentId this.studentForm.studentId = row.studentId
this.studentForm.userId = row.userId
this.majorList = this.$refs.getSelectData.majorList this.majorList = this.$refs.getSelectData.majorList
console.log(12,row)
this.$get(`${this.api.getStudent}/${row.studentId}`).then(res => { this.$get(`${this.api.getStudent}/${row.studentId}`).then(res => {
let student = res.data.student let student = res.data.student
let userInfo = res.data.userInfo let userInfo = res.data.userInfo
@ -375,7 +390,7 @@ export default {
}, },
getClassData(){ getClassData(){
let data = { let data = {
classId: this.studentForm.gradeId gradeId: this.studentForm.gradeId
} }
this.$get(this.api.queryClass,data).then(res => { this.$get(this.api.queryClass,data).then(res => {
this.classList = res.data.Class this.classList = res.data.Class
@ -420,13 +435,16 @@ export default {
userId: this.studentForm.userId ? this.studentForm.userId : '' userId: this.studentForm.userId ? this.studentForm.userId : ''
}, },
student: { student: {
userId: this.studentForm.userId,
studentId: this.studentForm.studentId,
roleId: 4, roleId: 4,
isPort: 2, isPort: 2,
clientId: this.studentForm.clientId,
clientName: this.studentForm.clientName,
professionalId: this.studentForm.professionalId, professionalId: this.studentForm.professionalId,
gradeId: this.studentForm.gradeId, gradeId: this.studentForm.gradeId,
classId: this.studentForm.classId, classId: this.studentForm.classId,
workNumber: this.studentForm.workNumber, workNumber: this.studentForm.workNumber,
schoolId: this.clientId
} }
} }
if(this.studentForm.studentId){ if(this.studentForm.studentId){
@ -452,7 +470,9 @@ export default {
type: 'warning' type: 'warning'
}) })
.then(() => { .then(() => {
let data = [row.studentId] let data = {
studentIds: row.studentId
}
this.$del(this.api.deleteStudents,data).then(res => { this.$del(this.api.deleteStudents,data).then(res => {
this.$message.success('删除成功') this.$message.success('删除成功')
this.getData() this.getData()
@ -474,7 +494,9 @@ export default {
type: 'warning' type: 'warning'
}) })
.then(() => { .then(() => {
let data = delList let data = {
studentIds: delList.join()
}
this.$del(this.api.deleteStudents,data).then(res => { this.$del(this.api.deleteStudents,data).then(res => {
this.multipleSelection = [] this.multipleSelection = []
this.$message.success('删除成功') this.$message.success('删除成功')

@ -15,40 +15,40 @@
<!-- 添加专业 --> <!-- 添加专业 -->
<el-dialog :title="Form.classmajorId ? '编辑专业' : '新增专业'" :visible.sync="isaddClassMajor" width="24%" center @close="closeAddClass" :close-on-click-modal="false"> <el-dialog :title="Form.classmajorId ? '编辑专业' : '新增专业'" :visible.sync="isaddClassMajor" width="24%" center @close="closeAddClass" :close-on-click-modal="false">
<el-form ref="Form" :model="Form" :rules="rules"> <el-form ref="Form" :model="Form">
<el-form-item prop="classmajorName"> <el-form-item prop="classmajorName">
<el-input placeholder="请输入专业名称" v-model="Form.classmajorName" @change="majorChange"></el-input> <el-input placeholder="请输入专业名称" v-model="Form.classmajorName" @change="majorChange"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="isaddClassMajor = false"> </el-button> <el-button @click="isaddClassMajor = false">取消</el-button>
<el-button type="primary" @click="sure"> </el-button> <el-button type="primary" @click="sure">确定</el-button>
</span> </span>
</el-dialog> </el-dialog>
<!-- 添加年级 --> <!-- 添加年级 -->
<el-dialog :title="Form2.departmentId ? '编辑年级' : '新增年级'" :visible.sync="isAddDepartment" width="24%" center @close="closeAddClass2" :close-on-click-modal="false"> <el-dialog :title="Form2.departmentId ? '编辑年级' : '新增年级'" :visible.sync="isAddDepartment" width="24%" center @close="closeAddClass2" :close-on-click-modal="false">
<el-form ref="Form2" :model="Form2" :rules="rules"> <el-form ref="Form2" :model="Form2">
<el-form-item prop="departmentName"> <el-form-item prop="departmentName">
<el-input placeholder="请输入年级名称" v-model="Form2.departmentName"></el-input> <el-input placeholder="请输入年级名称" v-model.number="Form2.departmentName"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="isAddDepartment = false"> </el-button> <el-button @click="isAddDepartment = false">取消</el-button>
<el-button type="primary" @click="sureDepartment"> </el-button> <el-button type="primary" @click="sureDepartment">确定</el-button>
</span> </span>
</el-dialog> </el-dialog>
<!-- 添加班级 --> <!-- 添加班级 -->
<el-dialog :title="Form3.classId ? '编辑班级' : '新增班级'" :visible.sync="isAddClass" width="24%" center @close="closeAddClass3" :close-on-click-modal="false"> <el-dialog :title="Form3.classId ? '编辑班级' : '新增班级'" :visible.sync="isAddClass" width="24%" center @close="closeAddClass3" :close-on-click-modal="false">
<el-form ref="Form3" :model="Form3" :rules="rules"> <el-form ref="Form3" :model="Form3">
<el-form-item prop="className"> <el-form-item prop="className">
<el-input placeholder="请输入班级名称" v-model="Form3.className"></el-input> <el-input placeholder="请输入班级名称" v-model.number="Form3.className"></el-input>
</el-form-item> </el-form-item>
</el-form> </el-form>
<span slot="footer" class="dialog-footer"> <span slot="footer" class="dialog-footer">
<el-button @click="isAddClass = false"> </el-button> <el-button @click="isAddClass = false">取消</el-button>
<el-button type="primary" @click="sureClass('Form3')"> </el-button> <el-button type="primary" @click="sureClass('Form3')">确定</el-button>
</span> </span>
</el-dialog> </el-dialog>
</div> </div>
@ -79,24 +79,6 @@ export default {
classId: '', classId: '',
className: '' className: ''
}, },
rules: {
departmentName: [
{ required: true, message: '请输入年级名称', trigger: 'blur' },
{
pattern: /^[0-9]*$/,
message: '年级名称必须为数字',
trigger: 'blur'
}
],
className: [
{ required: true, message: '请输入班级名称', trigger: 'blur' },
{
pattern: /^[0-9]*$/,
message: '班级名称必须为数字',
trigger: 'blur'
}
]
},
majorNoAdd: true, majorNoAdd: true,
}; };
}, },
@ -128,25 +110,26 @@ export default {
e.children.map(e => { e.children.map(e => {
(e.ifVisible = false), (e.ischeck = false), (e.label = e.gradeName); (e.ifVisible = false), (e.ischeck = false), (e.label = e.gradeName);
let data = { let data = {
classId: e.gradeId gradeId: e.gradeId
} }
this.$get(this.api.queryClass,data).then(res => { this.$get(this.api.queryClass,data).then(res => {
res.data.Class.map(e => { res.data.Class.map(e => {
(e.ifVisible = false), (e.ischeck = false), (e.label = e.className); (e.ifVisible = false), (e.ischeck = false), (e.label = e.className);
}) })
e.children = res.message e.children = res.data.Class
}).catch(res => {}); }).catch(res => {});
}) })
}).catch(res => {}); }).catch(res => {});
}) })
setTimeout(() => { setTimeout(() => {
this.majorList = StaffProfessionalArchitectureList this.majorList = StaffProfessionalArchitectureList
this.majorList[0].ifVisible = true
}, 500); }, 500);
}).catch(res => {}); }).catch(res => {});
}, },
// //
fircheckitem(item){ fircheckitem(item){
this.$emit("fircheck",item) this.$emit("fircheck",item,this.majorList)
}, },
// //
twocheckitem(item){ twocheckitem(item){
@ -185,7 +168,7 @@ export default {
type: 'warning' type: 'warning'
}) })
.then(() => { .then(() => {
this.$post(`${this.api.deleteStaffProfessionalArchitecture}?staffProfessionalArchitectureIds=${item.stuProfessionalArchitectureId}`).then(res => { this.$post(`${this.api.deleteStudentProfessionalArchitecture}?studentProfessionalArchitectureIds=${item.stuProfessionalArchitectureId}`).then(res => {
this.$message.success('删除成功'); this.$message.success('删除成功');
this.majorList.splice(index, 1) this.majorList.splice(index, 1)
}).catch(res => {}); }).catch(res => {});
@ -194,14 +177,14 @@ export default {
}, },
sure(){ sure(){
if(!this.Form.classmajorName) return this.$message.warning('请输入专业名称'); if(!this.Form.classmajorName) return this.$message.warning('请输入专业名称');
if(!this.majorNoAdd) return this.$message.warning('该一级部门已存在'); if(!this.majorNoAdd) return this.$message.warning('该专业名称已存在');
let data = { let data = {
stuProfessionalArchitectureName: this.Form.classmajorName, stuProfessionalArchitectureName: this.Form.classmajorName,
stuProfessionalArchitectureId: this.Form.classmajorId, stuProfessionalArchitectureId: this.Form.classmajorId,
schoolId: this.clientId schoolId: this.clientId
} }
if(this.Form.classmajorId){ if(this.Form.classmajorId){
this.$post(this.api.updateStaffProfessionalArchitecture,data).then(res => { this.$post(this.api.updateStudentProfessionalArchitecture,data).then(res => {
this.$message.success('编辑成功'); this.$message.success('编辑成功');
this.isaddClassMajor = false this.isaddClassMajor = false
this.majorList.map(e =>{ this.majorList.map(e =>{
@ -216,7 +199,7 @@ export default {
this.$message.success('添加成功'); this.$message.success('添加成功');
this.isaddClassMajor = false this.isaddClassMajor = false
let newData = { let newData = {
stuProfessionalArchitectureId: res.data.stuProfessionalArchitectureId, stuProfessionalArchitectureId: res.data.studentProfessionalArchitectureId,
stuProfessionalArchitectureName : this.Form.classmajorName, stuProfessionalArchitectureName : this.Form.classmajorName,
label: this.Form.classmajorName, label: this.Form.classmajorName,
ifVisible: false, ifVisible: false,
@ -271,7 +254,8 @@ export default {
.catch(() => {}); .catch(() => {});
}, },
sureDepartment(){ sureDepartment(){
if(!this.Form2.departmentName) return this.$message.warning('请输入年级名称'); if(!this.Form2.departmentName) return this.$message.warning('请输入年级名称')
if(isNaN(this.Form2.departmentName)) return this.$message.warning('年级名称必须为数字')
let data = { let data = {
gradeName: this.Form2.departmentName, gradeName: this.Form2.departmentName,
gradeId: this.Form2.departmentId, gradeId: this.Form2.departmentId,
@ -313,7 +297,7 @@ export default {
}, },
async majorChange(){ async majorChange(){
let res = await this.$get(this.api.queryStaffPAN, { name: this.Form.classmajorName,schoolId: this.clientId }); let res = await this.$get(this.api.queryStudentPAN, { name: this.Form.classmajorName,schoolId: this.clientId });
if(res.data.StaffProfessionalArchitecture != null){ if(res.data.StaffProfessionalArchitecture != null){
this.$message.warning('该专业组织已存在'); this.$message.warning('该专业组织已存在');
this.majorNoAdd = false this.majorNoAdd = false
@ -329,6 +313,7 @@ export default {
this.Form2.departmentId = two.gradeId this.Form2.departmentId = two.gradeId
}, },
editClass(three){ editClass(three){
console.log(33,three)
this.Form3.classId = three.classId, this.Form3.classId = three.classId,
this.Form3.className = three.className this.Form3.className = three.className
this.isAddClass = true this.isAddClass = true
@ -343,6 +328,7 @@ export default {
} }
}, },
delClass(item,index){ delClass(item,index){
console.log(item)
this.$confirm('确定要删除该班级吗?', '提示', { this.$confirm('确定要删除该班级吗?', '提示', {
type: 'warning' type: 'warning'
}) })
@ -366,7 +352,8 @@ export default {
.catch(() => {}); .catch(() => {});
}, },
sureClass(){ sureClass(){
if(!this.Form3.className) return this.$message.warning('请输入班级名称'); if(!this.Form3.className) return this.$message.warning('请输入班级名称')
if(isNaN(this.Form3.className)) return this.$message.warning('班级名称必须为数字')
let data = { let data = {
className: this.Form3.className, className: this.Form3.className,
classId: this.Form3.classId, classId: this.Form3.classId,

@ -8,10 +8,12 @@
<div class="item" @click.stop="open(item)"> <div class="item" @click.stop="open(item)">
<!-- <i :class="{ 'arrowTransform': !item.ifVisible, 'arrowTransformReturn': item.ifVisible}" class="icon-shixiangyoujiantou-"></i> --> <!-- <i :class="{ 'arrowTransform': !item.ifVisible, 'arrowTransformReturn': item.ifVisible}" class="icon-shixiangyoujiantou-"></i> -->
<img <img
v-if="item.children&&item.children.length!=0"
:class="{ 'arrowTransform': !item.ifVisible, 'arrowTransformReturn': item.ifVisible}" :class="{ 'arrowTransform': !item.ifVisible, 'arrowTransformReturn': item.ifVisible}"
src="../../../assets/img/icon-xiangyou.png" src="../../../assets/img/icon-xiangyou.png"
alt alt
/> />
<i v-else class="empty"></i>
<i :class="item.ischeck ? 'icon-yigouxuan' : 'icon-weigouxuan'" @click.stop="fircheckitem(item)"></i> <i :class="item.ischeck ? 'icon-yigouxuan' : 'icon-weigouxuan'" @click.stop="fircheckitem(item)"></i>
<span>{{item.label}}</span> <span>{{item.label}}</span>
<i class="edit ft" @click.stop="editmajorClass(item)"></i> <i class="edit ft" @click.stop="editmajorClass(item)"></i>
@ -23,11 +25,12 @@
<div v-for="(item1,index1) in item.children" :key="index1"> <div v-for="(item1,index1) in item.children" :key="index1">
<div class="item1" @click.stop="open(item1)"> <div class="item1" @click.stop="open(item1)">
<img <img
v-if="item1.children&&item1.children.length!=0"
:class="{ 'arrowTransform': !item1.ifVisible, 'arrowTransformReturn': item1.ifVisible}" :class="{ 'arrowTransform': !item1.ifVisible, 'arrowTransformReturn': item1.ifVisible}"
src="../../../assets/img/icon-xiangyou.png" src="../../../assets/img/icon-xiangyou.png"
alt alt
style="margin-left:30px"
/> />
<i v-else class="empty"></i>
<i :class="item1.ischeck ? 'icon-yigouxuan' : 'icon-weigouxuan'" @click.stop="twocheckitem(item1)"></i> <i :class="item1.ischeck ? 'icon-yigouxuan' : 'icon-weigouxuan'" @click.stop="twocheckitem(item1)"></i>
<span>{{item1.label}}年级</span> <span>{{item1.label}}年级</span>
<i class="edit ft" @click.stop="editDepartment(item1)"></i> <i class="edit ft" @click.stop="editDepartment(item1)"></i>
@ -195,12 +198,16 @@ $outColor: rgba(255, 255, 255, 0.8); //外部节点的边框颜色
text-align: left; text-align: left;
margin-top: 20px; margin-top: 20px;
} }
.empty{
width: 25px;
}
.item:first{ .item:first{
margin-top: 0; margin-top: 0;
} }
.item1 { .item1 {
@include public; @include public;
margin-top: 20px; margin-top: 20px;
margin-left: 15px;
} }
.item2 { .item2 {
@include public; @include public;
@ -214,7 +221,7 @@ $outColor: rgba(255, 255, 255, 0.8); //外部节点的边框颜色
display: inline-block; display: inline-block;
width: 17px; width: 17px;
height: 17px; height: 17px;
background: url(../../../assets/img/edit.svg) 0 0/cover no-repeat; background: url(../../../assets/svg/edit.svg) 0 0/cover no-repeat;
} }
//ul,li //ul,li
ul, ul,

@ -1,8 +1,8 @@
<template> <template>
<div> <div>
<el-card shadow="hover" class="mgb20"> <el-card shadow="hover" class="m-b-20">
<div> <div>
<div class="flex-center mgb20"> <div class="flex a-center m-b-20">
<p class="hr_tag"></p> <p class="hr_tag"></p>
<span>筛选</span> <span>筛选</span>
</div> </div>
@ -17,8 +17,8 @@
</el-card> </el-card>
<el-card shadow="hover"> <el-card shadow="hover">
<div class="flex-between mgb20"> <div class="flex j-between m-b-20">
<div class="flex-center"> <div class="flex a-center">
<p class="hr_tag"></p> <p class="hr_tag"></p>
<span>角色列表</span> <span>角色列表</span>
</div> </div>

@ -7,8 +7,8 @@
<el-main style="padding-top: 0"> <el-main style="padding-top: 0">
<el-col :span="24"> <el-col :span="24">
<el-card shadow="hover" class="mgb20 teacher_tab"> <el-card shadow="hover" class="m-b-20 teacher_tab">
<div class="flex-between mgb20"> <div class="flex j-between m-b-20">
<div> <div>
<el-input placeholder="请输入员工姓名/工号" v-model="keyword" prefix-icon="el-icon-search" clearable></el-input> <el-input placeholder="请输入员工姓名/工号" v-model="keyword" prefix-icon="el-icon-search" clearable></el-input>
</div> </div>
@ -139,6 +139,7 @@
import TeacherSide from './staffSide.vue'; import TeacherSide from './staffSide.vue';
import Setting from '@/setting'; import Setting from '@/setting';
import { mapState } from 'vuex'; import { mapState } from 'vuex';
import util from '@/libs/util'
export default { export default {
data() { data() {
return { return {
@ -158,7 +159,8 @@ export default {
department: '', department: '',
userAccount: '', userAccount: '',
major: '', major: '',
schoolId: this.clientId clientId: this.clientId,
clientName: this.clientName,
}, },
rules: { rules: {
userAccount: [ userAccount: [
@ -267,6 +269,8 @@ export default {
} }
}, },
mounted(){ mounted(){
this.teacherForm.clientId = this.clientId
this.teacherForm.clientName = this.clientName
this.getData() this.getData()
this.getRoles() this.getRoles()
}, },
@ -279,13 +283,13 @@ export default {
if(e.ischeck){ if(e.ischeck){
oneDepartmentIds.push(e.staffProfessionalArchitectureId) oneDepartmentIds.push(e.staffProfessionalArchitectureId)
}else{ }else{
this.removeByValue(oneDepartmentIds, e.staffProfessionalArchitectureId); util.removeByValue(oneDepartmentIds, e.staffProfessionalArchitectureId);
} }
e.children.forEach( r => { e.children.forEach( r => {
if(r.ischeck){ if(r.ischeck){
twoDepartmentIds.push(r.staffGradeId) twoDepartmentIds.push(r.staffGradeId)
}else{ }else{
this.removeByValue(twoDepartmentIds, r.staffGradeId); util.removeByValue(twoDepartmentIds, r.staffGradeId);
} }
}) })
}) })
@ -368,8 +372,8 @@ export default {
}, },
closeTeacher(){ closeTeacher(){
this.$refs.teacherForm.resetFields() this.$refs.teacherForm.resetFields()
this.teacherForm.clientId = this.$store.state.schoolId this.teacherForm.clientId = this.clientId
this.teacherForm.clientName = this.$store.state.schoolName this.teacherForm.clientName = this.clientName
this.teacherForm.department = '' this.teacherForm.department = ''
this.teacherForm.major = '' this.teacherForm.major = ''
this.teacherForm.workNumber = '' this.teacherForm.workNumber = ''
@ -446,7 +450,6 @@ export default {
userId: this.teacherForm.userId, userId: this.teacherForm.userId,
userName: this.teacherForm.userName, userName: this.teacherForm.userName,
account: this.teacherForm.userAccount, account: this.teacherForm.userAccount,
schoolId: this.teacherForm.schoolId,
clientId: this.teacherForm.clientId, clientId: this.teacherForm.clientId,
clientName: this.teacherForm.clientName, clientName: this.teacherForm.clientName,
roleId: this.teacherForm.roleValue, roleId: this.teacherForm.roleValue,

@ -342,13 +342,13 @@ export default {
color: #cb221c; color: #cb221c;
} }
.item .empty{ .item .empty{
width: 20px; width: 25px;
} }
.edit{ .edit{
display: inline-block; display: inline-block;
width: 17px; width: 17px;
height: 17px; height: 17px;
background: url(../../../assets/img/edit.svg) 0 0/cover no-repeat; background: url(../../../assets/svg/edit.svg) 0 0/cover no-repeat;
} }
//ul,li //ul,li

@ -130,7 +130,7 @@
</el-select> </el-select>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="flex-between" style="align-items: flex-start"> <div class="flex j-between" style="align-items: flex-start">
<el-form label-width="80px" inline size="mini"> <el-form label-width="80px" inline size="mini">
<el-form-item class="no-mb" label="试题类型"> <el-form-item class="no-mb" label="试题类型">
<el-select v-model="selectManual.name" clearable placeholder="请选择试题类型" @change="getManualData"> <el-select v-model="selectManual.name" clearable placeholder="请选择试题类型" @change="getManualData">

@ -1,8 +1,8 @@
<template> <template>
<div> <div>
<el-card shadow="hover" class="mgb20"> <el-card shadow="hover" class="m-b-20">
<div> <div>
<div class="flex-center mgb20"> <div class="flex a-center m-b-20">
<p class="hr_tag"></p> <p class="hr_tag"></p>
<span>筛选</span> <span>筛选</span>
</div> </div>
@ -21,7 +21,7 @@
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="flex-between"> <div class="flex j-between">
<el-form label-width="80px" inline> <el-form label-width="80px" inline>
<el-form-item label="试卷用途" class="userRadio no-mb"> <el-form-item label="试卷用途" class="userRadio no-mb">
<el-radio-group v-model="purposeId" @change="getData"> <el-radio-group v-model="purposeId" @change="getData">
@ -44,8 +44,8 @@
</el-card> </el-card>
<el-card shadow="hover"> <el-card shadow="hover">
<div class="flex-between mgb20"> <div class="flex j-between m-b-20">
<div class="flex-center"> <div class="flex a-center">
<p class="hr_tag"></p> <p class="hr_tag"></p>
<span>所有试卷</span> <span>所有试卷</span>
</div> </div>
@ -94,7 +94,7 @@
</template> </template>
<script> <script>
import { mapState,mapGetters } from 'vuex' import { mapState,mapGetters,mapActions } from 'vuex'
export default { export default {
data() { data() {
return { return {
@ -148,6 +148,9 @@ export default {
} }
}, },
methods: { methods: {
...mapActions('testpaper', [
'setInfo'
]),
getData() { getData() {
this.$post(this.api.pageBySchoolTestPaper, { this.$post(this.api.pageBySchoolTestPaper, {
pageNum: this.page, pageNum: this.page,
@ -178,7 +181,12 @@ export default {
this.getData(); this.getData();
}, },
preview(row){ preview(row){
this.$router.push(`show?id=${row.id}`) this.setInfo({
id: row.id,
paperName: row.name,
totalDuration: row.duration
})
this.$router.push('show')
}, },
review(row){ review(row){
this.$router.push('review') this.$router.push('review')

@ -1,6 +1,6 @@
<template> <template>
<div> <div>
<div class="tabs mgb20"> <div class="tabs m-b-20">
<a class="item" v-for="(item,index) in tabs" :key="index" :class="{active: index == active}" @click="tabChange(index)">{{item}}</a> <a class="item" v-for="(item,index) in tabs" :key="index" :class="{active: index == active}" @click="tabChange(index)">{{item}}</a>
</div> </div>

@ -1,8 +1,8 @@
<template> <template>
<div> <div>
<el-card shadow="hover" class="mgb20"> <el-card shadow="hover" class="m-b-20">
<div> <div>
<div class="flex-center mgb20"> <div class="flex a-center m-b-20">
<p class="hr_tag"></p> <p class="hr_tag"></p>
<span>筛选</span> <span>筛选</span>
</div> </div>
@ -10,7 +10,8 @@
<div class="no-mb"> <div class="no-mb">
<el-form label-width="80px" inline> <el-form label-width="80px" inline>
<el-form-item label="所属课程" class="userRadio"> <el-form-item label="所属课程" class="userRadio">
<el-select v-model="cid" clearable placeholder="请选择所属题库"> <el-select v-model="cid" clearable placeholder="请选择所属课程" @change="getData">
<el-option label="不限" value=""></el-option>
<el-option v-for="(item,index) in quesBankList" :key="index" :label="item.typeName" :value="item.cid"></el-option> <el-option v-for="(item,index) in quesBankList" :key="index" :label="item.typeName" :value="item.cid"></el-option>
</el-select> </el-select>
</el-form-item> </el-form-item>
@ -21,7 +22,7 @@
</el-radio-group> </el-radio-group>
</el-form-item> </el-form-item>
</el-form> </el-form>
<div class="flex-between"> <div class="flex j-between">
<el-form label-width="80px" inline> <el-form label-width="80px" inline>
<el-form-item label="试卷用途" class="userRadio no-mb"> <el-form-item label="试卷用途" class="userRadio no-mb">
<el-radio-group v-model="purposeId" @change="getData"> <el-radio-group v-model="purposeId" @change="getData">
@ -44,8 +45,8 @@
</el-card> </el-card>
<el-card shadow="hover"> <el-card shadow="hover">
<div class="flex-between mgb20"> <div class="flex j-between m-b-20">
<div class="flex-center"> <div class="flex a-center">
<p class="hr_tag"></p> <p class="hr_tag"></p>
<span>我的试卷</span> <span>我的试卷</span>
</div> </div>
@ -102,7 +103,7 @@
</template> </template>
<script> <script>
import { mapState,mapGetters } from 'vuex' import { mapState,mapGetters,mapActions } from 'vuex'
export default { export default {
data() { data() {
return { return {
@ -156,6 +157,9 @@ export default {
} }
}, },
methods: { methods: {
...mapActions('testpaper', [
'setInfo'
]),
getData() { getData() {
this.$post(this.api.pageBygetMeTestPaper, { this.$post(this.api.pageBygetMeTestPaper, {
pageNum: this.page, pageNum: this.page,
@ -228,7 +232,12 @@ export default {
}).catch(res => {}); }).catch(res => {});
}, },
preview(row){ preview(row){
this.$router.push(`show?id=${row.id}`) this.setInfo({
id: row.id,
paperName: row.name,
totalDuration: row.duration
})
this.$router.push('show')
}, },
copy(row){ copy(row){
this.$post(`${this.api.copyPaper}?id=${row.id}`).then(res => { this.$post(`${this.api.copyPaper}?id=${row.id}`).then(res => {

@ -2,12 +2,12 @@
<div> <div>
<el-row :gutter="20"> <el-row :gutter="20">
<el-col :span="24"> <el-col :span="24">
<el-card shadow="hover" class="mgb20"> <el-card shadow="hover" class="m-b-20">
<div class="flex-center mgb20"> <div class="flex a-center m-b-20">
<p class="hr_tag"></p> <p class="hr_tag"></p>
<span>筛选</span> <span>筛选</span>
</div> </div>
<div class="flex-between"> <div class="flex j-between">
<el-form label-width="80px" inline> <el-form label-width="80px" inline>
<el-form-item class="no-mb" label="授课专业"> <el-form-item class="no-mb" label="授课专业">
<el-select v-model="publishStatus" clearable placeholder="请选择授课专业" @change="getData"> <el-select v-model="publishStatus" clearable placeholder="请选择授课专业" @change="getData">
@ -33,9 +33,9 @@
</el-col> </el-col>
<el-col :span="24"> <el-col :span="24">
<el-card shadow="hover" class="mgb20"> <el-card shadow="hover" class="m-b-20">
<div class="flex-between mgb20"> <div class="flex j-between m-b-20">
<div class="flex-center"> <div class="flex a-center">
<p class="hr_tag"></p> <p class="hr_tag"></p>
<span>练习批阅</span> <span>练习批阅</span>
</div> </div>

@ -25,5 +25,11 @@ export default {
component: () => import('@/components/achiStatistics'), component: () => import('@/components/achiStatistics'),
meta: { title: '成绩统计' } meta: { title: '成绩统计' }
}, },
{
name: `${pre}detail`,
path: `detail`,
component: () => import('@/pages/achievement/detail'),
meta: { title: '答题详情' }
},
] ]
}; };

@ -15,7 +15,7 @@ const Setting = {
// 页面切换时,是否显示模拟的进度条 // 页面切换时,是否显示模拟的进度条
showProgressBar: true, showProgressBar: true,
// 接口请求地址 // 接口请求地址
apiBaseURL: env === 'development' ? 'http://39.108.250.202:8000' : 'http://39.108.250.202:8000', apiBaseURL: env === 'development' ? 'http://192.168.31.152:8001' : 'http://39.108.250.202:8000/',
// 接口请求返回错误时,弹窗的持续时间,单位:秒 // 接口请求返回错误时,弹窗的持续时间,单位:秒
modalDuration: 3, modalDuration: 3,
// 接口请求返回错误时,弹窗的类型,可选值为 Message 或 Notice // 接口请求返回错误时,弹窗的类型,可选值为 Message 或 Notice
@ -50,7 +50,7 @@ const Setting = {
menuSideWidth: 256, menuSideWidth: 256,
layout: { layout: {
// 需要隐藏顶栏的页面路径 // 需要隐藏顶栏的页面路径
hideNavList: ['testPaper-add','testPaper-review','testPaper-show','testPaper-doReview','assessment-review','assessment-scoreQuery','assessment-monitor','achievement-show','achievement-statistics','setting-person'], hideNavList: ['testPaper-add','testPaper-review','testPaper-show','testPaper-doReview','assessment-review','assessment-scoreQuery','assessment-monitor','achievement-show','achievement-statistics','achievement-detail','setting-person'],
// 侧边栏风格,可选值为 dark 或 light // 侧边栏风格,可选值为 dark 或 light
siderTheme: 'dark', siderTheme: 'dark',
// 顶栏风格,可选值为 light、dark 或 primary // 顶栏风格,可选值为 light、dark 或 primary

@ -0,0 +1,28 @@
/**
* 成绩管理
* */
export default {
namespaced: true,
state: {
id: '',
assessmentId: '',
assessmentName: '',
classId: ''
},
getters: {
},
mutations: {
SET_INFO: (state, info) => {
state.id = info.id
state.assessmentId = info.assessmentId
state.assessmentName = info.assessmentName
state.classId = info.classId
},
},
actions: {
setInfo({ commit },info) {
commit('SET_INFO',info)
},
}
}

@ -0,0 +1,96 @@
/**
* 考核管理
* */
export default {
namespaced: true,
state: {
id: '',
paperId: '',
isReview: false,
reviewStatus: '',
typeList: [
{
id: 1,
name: '期中开始'
},{
id: 2,
name: '期末考试'
},{
id: 3,
name: '模拟考'
}
],
stateList: [
{
id: 1,
name: '待开始'
},{
id: 2,
name: '进行中'
},{
id: 3,
name: '已结束'
}
],
reviewStatusList: [
{
id: 0,
name: '未批阅'
},{
id: 1,
name: '批阅部分'
},{
id: 2,
name: '已批阅'
}
],
examStatusList: [
{
id: 0,
name: '未考'
},{
id: 1,
name: '已考试'
}
],
correctingList: [
{
id: 0,
name: '待阅'
},{
id: 1,
name: '已阅'
}
],
},
getters: {
getTypeName: state => id => {
return state.typeList.find(n => n.id == id).name
},
getStateName: state => id => {
return state.stateList.find(n => n.id == id).name
},
getReviewStatusName: state => id => {
return state.reviewStatusList.find(n => n.id == id).name
},
getExamStatusName: state => id => {
return state.examStatusList.find(n => n.id == id).name
},
getCorrectingName: state => id => {
return state.correctingList.find(n => n.id == id).name
},
},
mutations: {
SET_INFO: (state, info) => {
state.id = info.id
state.paperId = info.paperId
state.isReview = info.isReview
state.reviewStatus = info.reviewStatus
},
},
actions: {
setAssInfo({ commit },info) {
commit('SET_INFO',info)
},
}
}

@ -46,6 +46,9 @@ export default {
label: '智能组卷' label: '智能组卷'
} }
], ],
id: '',
paperName: '',
totalDuration: ''
}, },
getters: { getters: {
getStatusName: state => id => { getStatusName: state => id => {
@ -62,9 +65,15 @@ export default {
}, },
}, },
mutations: { mutations: {
SET_INFO: (state, info) => {
state.id = info.id
state.paperName = info.paperName
state.totalDuration = info.totalDuration
},
}, },
actions: { actions: {
setInfo({ commit },info) {
commit('SET_INFO',info)
},
} }
} }

@ -0,0 +1,145 @@
@import "./default/index.scss";
.content-box {
-webkit-transition: left .3s ease-in-out;
transition: left .3s ease-in-out;
}
.content {
width: auto;
height: 100%;
padding: 20px;
box-sizing: border-box;
}
.content-collapse {
left: 65px;
}
.container {
padding: 30px;
background: #fff;
border: 1px solid #ddd;
border-radius: 5px;
}
.crumbs {
margin: 10px 0;
}
.pagination {
margin: 20px 0;
text-align: right;
}
.el-button+.el-tooltip {
margin-left: 10px;
}
.ql-snow .ql-tooltip {
transform: translateX(117.5px) translateY(10px) !important;
}
.el-row {
margin-bottom: 20px;
}
#app .el-table thead{
color: #fff;
}
#app .el-table th{
background-color: $--color-primary!important;
font-size: 16px;
font-weight: normal;
}
#app .el-select{
display: unset;
}
.required{
margin-right: 5px;
color: #F56C6C;
}
.hr_tag{
background-color: $--color-primary;
width: 3px;
height: 15px;
margin-right: 5px;
}
.per_title span{
font-size: 16px;
font-weight: bold;
}
.per_back{
margin-left: 5px;
}
.per_school{
margin-left: 30px;
}
.per_title:hover{
cursor:pointer;
}
[v-cloak] {
display: none;
}
.tabs{
display: flex;
align-items: center;
padding: 20px 1.5% 20px;
margin-bottom: 20px;
z-index: 999;
background-color: #fff;
.item{
padding: 12px 20px;
margin-right: 10px;
color:#606266;
line-height: 1;
border-radius: 4px;
background-color: #fff;
border: 1px solid #dcdfe6;
cursor: pointer;
&.active{
color: #fff;
background-color: $--color-primary;
border-color: $--color-primary;
}
}
}
.btns{
display: flex;
justify-content: center;
margin-top: 20px;
button{
height: 30px;
padding: 0 30px;
margin: 0 15px;
font-size: 14px;
color: #333;
line-height: 30px;
background-color: #fff;
border: 1px solid #ededed;
border-radius: 4px;
cursor: pointer;
&.submit{
color: #fff;
background-color: #e80909;
border-color: #e80909;
}
&:hover{
opacity: .8;
}
&:focus{
outline: none;
}
}
}
.userRadio .el-radio{
margin-right: 10px!important;
}
.userRadio .el-radio__input{
display: none!important;
}

@ -0,0 +1,7 @@
/* 改变主题色变量 */
$--color-primary: #cb221c;
/* 改变 icon 字体路径变量,必需 */
$--font-path: '~element-ui/lib/theme-chalk/fonts';
@import "~element-ui/packages/theme-chalk/src/index";

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 10 KiB

@ -0,0 +1,3 @@
[class*=" icon-"], [class^=icon-] {
font-family: iconfont!important;
}

@ -0,0 +1,6 @@
@import "./default/index.scss";
@import "./font/iconfont.css";
@import "./font/icon/iconfont.css";
@import "./lib/index.scss";
@import "./layout/index.scss";
@import "./common.scss";

@ -0,0 +1,13 @@
@import "lib/var";
html,
body,
#app,
.wrapper {
width: 100%;
height: 100%;
}
body {
font-size: 14px;
background: $bg-grey;
}

@ -0,0 +1,375 @@
@import "var";
// reset 初始化浏览器样式
* {
box-sizing: border-box;
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
*:before,
*:after {
box-sizing: border-box;
}
html {
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
}
body,
div,
dl,
dt,
dd,
ul,
ol,
li,
h1,
h2,
h3,
h4,
h5,
h6,
form,
fieldset,
legend,
input,
textarea,
p,
blockquote,
th,
td,
hr,
button,
article,
aside,
details,
figcaption,
figure,
footer,
header,
hgroup,
menu,
nav,
section {
margin: 0;
padding: 0;
}
button,
input,
select,
textarea {
font-family: inherit;
font-size: inherit;
line-height: inherit;
}
input::-ms-clear,
input::-ms-reveal {
display: none;
}
ol,ul{
li{
list-style: none;
}
}
h1 {
font-size: 2em;
margin: 0.67em 0;
}
article,
aside,
footer,
header,
nav,
section {
display: block;
}
figcaption,
figure,
main {
display: block;
}
figure {
margin: 1em 40px;
}
li:focus {
outline-width: 0;
}
i{
font-style: normal;
}
/**
* 1. Remove the gray background on active links in IE 10.
* 2. Remove gaps in links underline in iOS 8+ and Safari 8+.
*/
a {
background-color: transparent;
-webkit-text-decoration-skip: objects;
text-decoration: none;
color: inherit;
}
a:active {
color: inherit;
}
a:active,
a:hover,
a:focus {
outline-width: 0;
}
abbr[title] {
border-bottom: none;
text-decoration: underline;
text-decoration: underline dotted;
}
/**
* Prevent the duplicate application of `bolder` by the next rule in Safari 6.
*/
b,
strong {
font-weight: inherit;
}
/**
* Add the correct font weight in Chrome, Edge, and Safari.
*/
b,
strong {
font-weight: bolder;
}
pre,
code,
kbd,
samp {
font-family: monospace, monospace;
font-size: 1em;
}
dfn {
font-style: italic;
}
mark {
background-color: #ff0;
color: #000;
}
small {
font-size: 80%;
}
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
}
audio,
video {
display: inline-block;
}
audio:not([controls]) {
display: none;
height: 0;
}
img {
border-style: none;
vertical-align: middle;
}
svg:not(:root) {
overflow: hidden;
}
button,
input,
optgroup,
select,
textarea {
font-size: 100%;
line-height: 1.15;
margin: 0;
}
button,
input {
overflow: visible;
}
button,
select {
text-transform: none;
}
button,
html [type="button"],
[type="reset"],
[type="submit"] {
-webkit-appearance: button;
}
button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
border-style: none;
padding: 0;
}
/**
* Restore the focus styles unset by the previous rule.
*/
button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
outline: 1px dotted ButtonText;
}
/**
* Change the border, margin, and padding in all browsers (opinionated).
*/
fieldset {
border: 1px solid #c0c0c0;
margin: 0 2px;
padding: 0.35em 0.625em 0.75em;
}
/**
* 1. Correct the text wrapping in Edge and IE.
* 2. Correct the color inheritance from `fieldset` elements in IE.
* 3. Remove the padding so developers are not caught out when they zero out
* `fieldset` elements in all browsers.
*/
legend {
box-sizing: border-box; /* 1 */
color: inherit; /* 2 */
display: table; /* 1 */
max-width: 100%; /* 1 */
padding: 0; /* 3 */
white-space: normal; /* 1 */
}
/**
* 1. Add the correct display in IE 9-.
* 2. Add the correct vertical alignment in Chrome, Firefox, and Opera.
*/
progress {
display: inline-block; /* 1 */
vertical-align: baseline; /* 2 */
}
/**
* Remove the default vertical scrollbar in IE.
*/
textarea {
overflow: auto;
resize: vertical;
}
/**
* 1. Add the correct box sizing in IE 10-.
* 2. Remove the padding in IE 10-.
*/
[type="checkbox"],
[type="radio"] {
box-sizing: border-box; /* 1 */
padding: 0; /* 2 */
}
/**
* Correct the cursor style of increment and decrement buttons in Chrome.
*/
[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
height: auto;
}
/**
* 1. Correct the odd appearance in Chrome and Safari.
* 2. Correct the outline style in Safari.
*/
[type="search"] {
-webkit-appearance: textfield; /* 1 */
outline-offset: -2px; /* 2 */
}
/**
* Remove the inner padding and cancel buttons in Chrome and Safari on macOS.
*/
[type="search"]::-webkit-search-cancel-button,
[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
/**
* 1. Correct the inability to style clickable types in iOS and Safari.
* 2. Change font properties to `inherit` in Safari.
*/
::-webkit-file-upload-button {
-webkit-appearance: button; /* 1 */
font: inherit; /* 2 */
}
/*
* Add the correct display in IE 9-.
* 1. Add the correct display in Edge, IE, and Firefox.
*/
details, /* 1 */
menu {
display: block;
}
/*
* Add the correct display in all browsers.
*/
summary {
display: list-item;
}
/**
* Add the correct display in IE 9-.
*/
canvas {
display: inline-block;
}

@ -0,0 +1,3 @@
html {
font-family: 'PingFang SC', "Helvetica Neue", Helvetica, "microsoft yahei", arial, STHeiTi, sans-serif;
}

@ -0,0 +1,80 @@
// 颜色 size范围
$color-black: #333 !default;
$color-white: #ffffff !default;
$color-grey: #888 !default;
$color-green: #19be6b !default;
$color-blue: #61c3ff !default;
$color-yellow: #ff9900 !default;
$color-red: #f35958 !default;
$color-title: #17233d !default;
$color-content: #515a6e !default;
$color-disabled: #c5c8ce !default;
$bg-grey:#f0f0f0 !default;
$bg-white: #ffffff !default;
$bg-black: #393D49 !default;
$color-border: #dcdfe6 !default;
// 主题背景色
$bg-colors: (
'white': $bg-white,
'black': $bg-black,
'grey': $bg-grey,
'green': $color-green,
'blue': $color-blue,
'yellow': $color-yellow,
'red': $color-red,
) !default;
// 文本颜色
$text-colors: (
'white': $color-white,
'black': $color-black,
'grey': $color-grey,
'green': $color-green,
'blue': $color-blue,
'yellow': $color-yellow,
'red': $color-red,
'title': $color-title,
'content': $color-content,
'disabled': $color-disabled
) !default;
// 边框颜色
$border-colors: (
'white': $color-white,
'black': $color-black,
'grey': $color-border,
'green': $color-green,
'blue': $color-blue,
'yellow': $color-yellow,
'red': $color-red
) !default;
// border
$border-width-through: 20 !default;
$border-radius-through: 20 !default;
// margin padding left right top bottom
$box-sizes: (
-20, -15, -12, -10, -8, -6, -5, -4, -3, -2, -1,
0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 15, 20, 25, 30, 35, 40, 50, 60, 80, 100) !default;
// width height
$sizes: (
40, 50, 60, 70, 80, 90, 100,
120, 150, 200, 250, 300, 400, 500, 600, 800, 1000, 1200) !default;
// font-size
$font-size-em-through: 10 !default;
$font-size-em-decimal-through: 5 !default;
$font-size-rem-through: 10 !default;
$font-size-rem-decimal-through: 5 !default;
$font-size-px-through: 80 !default;
// line-height
$line-height-through: 20 !default;
$line-height-decimal-through: 5 !default;
$line-height-px-through: 100 !default;

@ -0,0 +1,7 @@
@import "var";
@each $name, $color in $bg-colors {
.bg-#{$name} {
background-color: $color;
}
}

@ -0,0 +1,78 @@
@import "var";
.border {
border: 1px solid $color-border;
}
// vertical
.b-v {
border-top: 1px solid $color-border;
border-bottom: 1px solid $color-border;
}
// horizontal
.b-h {
border-left: 1px solid $color-border;
border-right: 1px solid $color-border;
}
// border double
.b-double {
border: double $color-border;
}
.b-w-thin {
border-width: 0.55px;
}
.b-round {
border-radius: 50%;
}
.b-none {
border: none;
}
@each $side in left, right, top, bottom {
.b-#{str-slice($side, 0, 1)} {
border-#{$side}: 1px solid $color-border;
}
}
// border-style
@each $style in dotted, dashed {
.border-#{$style} {
border: 1px $style $color-border
}
.b-v-#{$style} {
border-top: 1px $style $color-border;
border-bottom: 1px $style $color-border;
}
.b-h-#{$style} {
border-left: 1px $style $color-border;
border-right: 1px $style $color-border;
}
@each $side in left, right, top, bottom {
.b-#{str-slice($side, 0, 1)}-#{$style} {
border-#{$side}: 1px $style $color-border;
}
}
}
@for $size from 0 through $border-width-through {
.b-#{$size} {
border-width: #{$size}px;
}
}
@for $size from 0 through $border-radius-through {
.b-radius-#{$size}, .b-r-#{$size} {
border-radius: #{$size}px;
}
}
@each $name, $color in $border-colors {
.b-#{$name} {
border-color: $color;
}
}

@ -0,0 +1,56 @@
@import "var";
/**
* margin padding
* @each 循环多次保证优先级
*/
.m-auto {
margin-left: auto;
margin-right: auto;
}
@each $size in $box-sizes {
.m-#{$size}, .margin-#{$size} {
margin: #{$size}px;
}
@if $size >= 0 {
.p-#{$size}, .padding-#{$size} {
padding: #{$size}px;
}
}
}
@each $size in $box-sizes {
.m-h-#{$size} {
margin-left: #{$size}px;
margin-right: #{$size}px;
}
.m-v-#{$size} {
margin-top: #{$size}px;
margin-bottom: #{$size}px;
}
@if $size >= 0 {
.p-h-#{$size} {
padding-left: #{$size}px;
padding-right: #{$size}px;
}
.p-v-#{$size} {
padding-top: #{$size}px;
padding-bottom: #{$size}px;
}
}
}
@each $size in $box-sizes {
@each $side in top right bottom left {
.m-#{str-slice($side, 0, 1)}-#{$size} {
margin-#{$side}: #{$size}px;
}
@if $size >= 0 {
.p-#{str-slice($side, 0, 1)}-#{$size} {
padding-#{$side}: #{$size}px;
}
}
}
}

@ -0,0 +1,5 @@
@each $type in default, auto, crosshair, pointer, move, text, wait, help {
.cursor-#{$type} {
cursor: $type;
}
}

@ -0,0 +1,15 @@
@import "var";
@each $type in inherit, none, inline, inline-block, block, table, inline-table, table-cell {
.d-#{$type} {
display: #{$type};
}
}
.hide {
display: none;
}
.show {
display: block
}

@ -0,0 +1,54 @@
.flex {
display: flex;
}
.flex-column {
display: flex;
flex-direction: column;
}
.j-start {
justify-content: flex-start;
}
.j-end {
justify-content: flex-end;
}
.j-center {
justify-content: center;
}
.j-between {
justify-content: space-between;
}
.j-around {
justify-content: space-around;
}
.a-start {
align-items: flex-start;
}
.a-center {
align-items: center;
}
.a-end {
align-items: flex-end;
}
@each $type in nowrap, wrap, wrap-reverse {
.flex-#{$type} {
flex-wrap: $type;
}
}
@each $size in 1, 2, 3 {
.flex-#{$size} {
flex: $size;
}
}
@for $i from 0 through 3 {
.flex-s-#{$i} {
flex-shrink: $i;
}
}

@ -0,0 +1,16 @@
.cl {
&:before, &:after {
content: ' ';
display: table;
}
&:after {
clear: both;
}
}
.fl {
float: left;
}
.fr {
float: right;
}

@ -0,0 +1,41 @@
@import "var";
@for $size from 0 through $font-size-em-through {
.fs-em-#{$size} {
font-size: #{$size}em;
}
@if $size <= $font-size-em-decimal-through {
@for $i from 0 to 10 {
.fs-em-#{$size}_#{$i} {
font-size: #{$size}#{'.'}#{$i}em;
}
}
} @else {
.fs-em-#{$size}_5 {
font-size: #{$size}#{'.5'}em;
}
}
}
@for $size from 0 through $font-size-rem-through {
.fs-rem-#{$size} {
font-size: #{$size}rem;
}
@if $size <= $font-size-rem-decimal-through {
@for $i from 0 to 10 {
.fs-rem-#{$size}_#{$i} {
font-size: #{$size}#{'.'}#{$i}rem;
}
}
} @else {
.fs-rem-#{$size}_5 {
font-size: #{$size}#{'.5'}rem;
}
}
}
@for $size from 12 through $font-size-px-through {
.fs-#{$size} {
font-size: #{$size}px;
}
}

@ -0,0 +1,17 @@
.bold {
font-weight: bold;
}
.normal {
font-weight: normal;
}
.lighter {
font-weight: lighter;
}
@each $weight in 100, 200, 300, 400, 500, 600, 700, 800, 900 {
.fw-#{$weight} {
font-weight: $weight;
}
}

@ -0,0 +1,28 @@
/*!
* quickly-css
* Github: https://gitee.com/zj1024/quickly-css
* Author: zhangjing
*/
@import "reset";
@import "background";
@import "border";
@import "box";
@import "cursor";
@import "display";
@import "flex";
@import "float";
@import "font-size";
@import "font-weight";
@import "line-height";
@import "link";
@import "overflow";
@import "position";
@import "size";
@import "text-align";
@import "text-color";
@import "vertical-align";
@import "visibility";
@import "white-space";
@import "style";

@ -0,0 +1,24 @@
@import "var";
@for $size from 0 through $line-height-through {
.l-h-#{$size} {
line-height: #{$size}em;
}
@if $size <= $line-height-decimal-through {
@for $i from 0 to 10 {
.l-h-#{$size}_#{$i} {
line-height: #{$size}#{'.'}#{$i}em;
}
}
} @else {
.l-h-#{$size}_5 {
line-height: #{$size}#{'.5'}em;
}
}
}
@for $size from 0 through $line-height-px-through {
.lh-#{$size} {
line-height: #{$size}px;
}
}

@ -0,0 +1,13 @@
@import "var";
@each $name, $color in $text-colors {
.link-#{$name} {
color: $color;
text-decoration: none;
cursor: pointer;
&:hover, &:active, &:focus {
color: darken($color, 10%);
text-decoration: underline;
}
}
}

@ -0,0 +1,11 @@
@each $type in visible, hidden, scroll, auto, inherit {
.o-#{$type} {
overflow: $type;
}
.o-x-#{$type} {
overflow-x: $type;
}
.o-y-#{$type} {
overflow-y: $type;
}
}

@ -0,0 +1,16 @@
@import "var";
@each $type in static, relative, absolute, fixed, sticky {
.#{$type} {
position: $type;
}
}
@each $size in $box-sizes {
@each $side in top, right, bottom, left {
.#{$side}-#{$size} {
#{$side}: #{$size}px;
}
}
}

@ -0,0 +1,53 @@
@import "var";
.w-full {
width: 100%;
}
.h-full {
height: 100%;
}
@for $percent from 0 to 100 {
.w-p-#{$percent} {
width: #{$percent}#{'%'};
}
.h-p-#{$percent} {
height: #{$percent}#{'%'};
}
}
@for $i from 1 through 30 {
.h-#{$i} {
height: #{$i}px;
}
}
@for $i from 1 through 30 {
.w-#{$i} {
width: #{$i}px;
}
}
@each $i in $sizes {
.w-#{$i} {
width: #{$i}px;
}
.h-#{$i} {
height: #{$i}px;
}
.max-w-#{$i} {
max-width: #{$i}px;
}
.max-h-#{$i} {
max-height: #{$i}px;
}
.min-w-#{$i} {
min-width: #{$i}px;
}
.min-h-#{$i} {
min-height: #{$i}px;
}
}

@ -0,0 +1,8 @@
/**
* 任何的版本的 Internet Explorer 包括 IE8都不支持属性值 "inherit"
*/
@each $type in left, right, center, justify, inherit {
.text-#{$type} {
text-align: #{$type};
}
}

@ -0,0 +1,7 @@
@import "var";
@each $name, $color in $text-colors {
.text-#{$name} {
color: $color;
}
}

@ -0,0 +1,7 @@
$types: (baseline, sub, super, top, text-top, middle, bottom, text-bottom, inherit);
@each $type in $types {
.v-a-#{$type} {
vertical-align: $type;
}
}

@ -0,0 +1,7 @@
.visible {
visibility: visible;
}
.hidden {
visibility: hidden;
}

@ -0,0 +1,5 @@
@each $type in normal, nowrap, pre, pre-wrap, pre-line {
.text-#{$type} {
white-space: $type;
}
}

@ -1,2 +0,0 @@
@listBackgroundColor: #f0f0f0;
@actionBackgroundColor: #fff;
Loading…
Cancel
Save