yujialong 4 years ago
parent 1efe8a8843
commit ed0f0a0b0f
  1. 22
      src/components/testPaperDetail/index.vue
  2. 28
      src/layouts/navbar/index.vue
  3. 6
      src/libs/route/addRoutes.js
  4. 14
      src/libs/util.js
  5. 3
      src/main.js
  6. 30
      src/mixins/file/index.js
  7. 24
      src/pages/achievement/list/practiceResults.vue
  8. 2
      src/pages/achievement/list/wrongBook.vue
  9. 10
      src/pages/assessment/detail/index.vue
  10. 12
      src/pages/assessment/doReview/index.vue
  11. 9
      src/pages/assessment/list/index.vue
  12. 1
      src/pages/assessment/list/studentSide.vue
  13. 11
      src/pages/assessment/scoreQuery/index.vue
  14. 10
      src/pages/practice/detail/index.vue
  15. 12
      src/pages/practice/doReview/index.vue
  16. 3
      src/pages/practice/list/index.vue
  17. 2
      src/pages/practice/result/index.vue
  18. 24
      src/pages/practice/scoreQuery/index.vue
  19. 4
      src/pages/quesBank/list/myQuesBank.vue
  20. 2
      src/pages/quesBank/list/quesBankType.vue
  21. 1
      src/pages/quesBank/list/quesDialog.vue
  22. 4
      src/pages/system/list/role.vue
  23. 2
      src/pages/system/list/staff.vue
  24. 5
      src/pages/testPaper/add/index.vue
  25. 12
      src/plugins/filters/index.js
  26. 2
      src/store/modules/assessment.js
  27. 2
      src/store/modules/user.js

@ -31,18 +31,20 @@
<p class="val" v-html="item.questionStem"></p> <p class="val" v-html="item.questionStem"></p>
<div class="media" :id="item.mediaEleId"></div> <div class="media" :id="item.mediaEleId"></div>
</div> </div>
<div class="meta"> <template v-if="active != 5">
<p class="key">选项</p> <div class="meta" v-if="active != 3">
<div class="val"> <p class="key">选项</p>
<p v-for="(option,i) in item.options" :key="i">{{i}}.{{item.options[i]}}</p> <div class="val">
<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"> <div class="info">
<div class="info"> <p class="key">正确答案</p>
<p class="key">正确答案</p> <p class="val">{{item.answer}}</p>
<p class="val">{{item.answer}}</p> </div>
</div> </div>
</div> </template>
<div class="meta"> <div class="meta">
<p class="key">答案解析</p> <p class="key">答案解析</p>
<p class="val" v-html="item.answerAnalysis"></p> <p class="val" v-html="item.answerAnalysis"></p>

@ -65,11 +65,6 @@ export default {
index: '/index/list', index: '/index/list',
title: '我的首页' title: '我的首页'
}, },
{
icon: 'el-icon-user',
index: '/student/list',
title: '学生管理'
},
{ {
icon: 'el-icon-notebook-1', icon: 'el-icon-notebook-1',
index: '/quesBank/list', index: '/quesBank/list',
@ -95,15 +90,20 @@ export default {
index: '/achievement/list', index: '/achievement/list',
title: '成绩管理' title: '成绩管理'
}, },
{
icon: 'el-icon-setting',
index: '/system/list',
title: '系统设置'
},
{ {
icon: 'el-icon-chat-dot-round', icon: 'el-icon-chat-dot-round',
index: '/messageBoard/list', index: '/messageBoard/list',
title: '交流互动' title: '交流互动'
},
{
icon: 'el-icon-user',
index: '/student/list',
title: '学生管理'
},
{
icon: 'el-icon-setting',
index: '/system/list',
title: '系统设置'
} }
], ],
menus: [] menus: []
@ -129,13 +129,7 @@ export default {
initMenu(){ initMenu(){
if(Setting.dynamicRoute){ if(Setting.dynamicRoute){
let routes = this.routes let routes = this.routes
let menus = [ let menus = []
{
icon: 'el-icon-folder-checked',
index: '/index/list',
title: '我的首页'
}
]
this.defaultMenus.map(e => { this.defaultMenus.map(e => {
routes.find(n => n.path == e.index) && menus.push(e) routes.find(n => n.path == e.index) && menus.push(e)
}) })

@ -31,7 +31,7 @@ export default function(data,path){
// routes[1].children = [...routes[1].children,...newRoutes] // routes[1].children = [...routes[1].children,...newRoutes]
store.dispatch('auth/addRoutes',newRoutes) store.dispatch('auth/addRoutes',newRoutes)
// router.addRoutes(routes) // router.addRoutes(routes)
// setTimeout(() => { setTimeout(() => {
// !newRoutes.find(n => n.name == '/index/list') && router.push(newRoutes[0].path) !newRoutes.find(n => n.name == '/index/list') && router.push(newRoutes[0].path)
// },10) },10)
} }

@ -89,6 +89,20 @@ const util = {
getFileExt(fileName) { getFileExt(fileName) {
return fileName.substring(fileName.lastIndexOf('.') + 1) return fileName.substring(fileName.lastIndexOf('.') + 1)
}, },
// 传入文件名和路径,下载图片视频,支持跨域,a标签加download不支持跨域
downloadFile(fileName,url) {
var x = new XMLHttpRequest()
x.open("GET", url, true)
x.responseType = 'blob'
x.onload=function(e) {
var url = window.URL.createObjectURL(x.response)
var a = document.createElement('a')
a.href = url
a.download = fileName
a.click()
}
x.send()
},
} }
export default util export default util

@ -16,9 +16,12 @@ import Setting from '@/setting';
// 插件 // 插件
import plugins from '@/plugins'; import plugins from '@/plugins';
import filters from '@/plugins/filters'
Vue.use(plugins); Vue.use(plugins);
Object.keys(filters).forEach(item => Vue.filter(item,filters[item]))
Vue.prototype.api = api; Vue.prototype.api = api;
Vue.prototype.$get = get; Vue.prototype.$get = get;
Vue.prototype.$post = post; Vue.prototype.$post = post;

@ -1,4 +1,5 @@
import util from '@/libs/util' import util from '@/libs/util'
import { Loading } from 'element-ui'
export default { export default {
data() { data() {
return { return {
@ -7,15 +8,16 @@ export default {
iframeSrc: '', iframeSrc: '',
pdfVisible: false, pdfVisible: false,
pdfSrc: '', pdfSrc: '',
imgName: '', isDownload: 0,
imgSrc: '' loadIns: null,
} }
}, },
mounted() { mounted() {
this.insertScript() this.insertScript()
}, },
methods: { methods: {
preview(url,isVideo){ preview(url,isVideo,isDownload){
this.isDownload = isDownload
let ext = util.getFileExt(url) let ext = util.getFileExt(url)
if(isVideo){ if(isVideo){
this.$get(`${this.api.getPlayAuth}/${url}`).then(res => { this.$get(`${this.api.getPlayAuth}/${url}`).then(res => {
@ -63,14 +65,22 @@ export default {
this.playAuth = '' this.playAuth = ''
this.player.pause() this.player.pause()
}, },
download(fileName,url){ download(fileName,url,isVideo){
let ext = util.getFileExt(url) if(isVideo){
if(util.isImg(ext)){ this.loadIns = Loading.service()
this.imgName = fileName this.preview(url,isVideo,1)
this.imgSrc = url setTimeout(() => {
this.$refs.picLink.click() util.downloadFile(fileName,document.querySelector('#player video').src)
this.loadIns.close()
this.playAuth = ''
},1000)
}else{ }else{
window.open(url) let ext = util.getFileExt(url)
if(util.isImg(ext)){
util.downloadFile(fileName,url)
}else{
window.open(url)
}
} }
} }
} }

@ -62,9 +62,21 @@
</el-table-column> </el-table-column>
<el-table-column prop="userName" label="真实姓名" align="center"></el-table-column> <el-table-column prop="userName" label="真实姓名" align="center"></el-table-column>
<el-table-column prop="workNumber" label="学号" align="center"></el-table-column> <el-table-column prop="workNumber" label="学号" align="center"></el-table-column>
<el-table-column prop="max" label="最高分" align="center"></el-table-column> <el-table-column prop="max" label="最高分" align="center">
<el-table-column prop="min" label="最低分" align="center"></el-table-column> <template slot-scope="scope">
<el-table-column prop="avg" label="平均分" align="center"></el-table-column> <p>{{scope.row.max | defaultShow}}</p>
</template>
</el-table-column>
<el-table-column prop="min" label="最低分" align="center">
<template slot-scope="scope">
<p>{{scope.row.min | defaultShow}}</p>
</template>
</el-table-column>
<el-table-column prop="avg" label="平均分" align="center">
<template slot-scope="scope">
<p>{{scope.row.avg | defaultShow}}</p>
</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="showDetail(scope.row)" v-auth="'/achievement/list:练习成绩:查看详情'">查看详情</el-button> <el-button type="text" @click="showDetail(scope.row)" v-auth="'/achievement/list:练习成绩:查看详情'">查看详情</el-button>
@ -110,7 +122,11 @@
</el-table-column> </el-table-column>
<el-table-column prop="paperName" label="练习试卷名称" align="center"></el-table-column> <el-table-column prop="paperName" label="练习试卷名称" align="center"></el-table-column>
<el-table-column prop="examTime" label="开始时间" align="center"></el-table-column> <el-table-column prop="examTime" label="开始时间" align="center"></el-table-column>
<el-table-column prop="score" label="得分" align="center"></el-table-column> <el-table-column prop="score" label="得分" align="center">
<template slot-scope="scope">
<p>{{scope.row.score | defaultShow}}</p>
</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="show(scope.row)">查看</el-button>

@ -22,7 +22,7 @@
</el-form> </el-form>
<div> <div>
<el-input <el-input
placeholder="请输入学生姓名或学号" placeholder="请输入题干"
prefix-icon="el-icon-search" prefix-icon="el-icon-search"
v-model="keyword" v-model="keyword"
clearable clearable

@ -64,13 +64,13 @@
<template v-if="item.fileUrl"> <template v-if="item.fileUrl">
<div v-for="(url,fileName) in item.fileUrl" :key="fileName"> <div v-for="(url,fileName) in item.fileUrl" :key="fileName">
<el-button type="text" @click="preview(url,0)">{{fileName}}</el-button> <el-button type="text" @click="preview(url,0)">{{fileName}}</el-button>
<el-button type="primary" size="mini" @click="download(fileName,url)">下载</el-button> <el-button type="primary" size="mini" @click="download(fileName,url,0)">下载</el-button>
</div> </div>
</template> </template>
<template v-if="item.videoAudio"> <template v-if="item.videoAudio">
<div v-for="(url,fileName) in item.videoAudio" :key="fileName"> <div v-for="(url,fileName) in item.videoAudio" :key="fileName">
<el-button type="text" @click="preview(url,1)">{{fileName}}</el-button> <el-button type="text" @click="preview(url,1)">{{fileName}}</el-button>
<!-- <el-button type="primary" size="mini" @click="download(url)">下载</el-button> --> <el-button type="primary" size="mini" @click="download(fileName,url,1)">下载</el-button>
</div> </div>
</template> </template>
</div> </div>
@ -82,13 +82,12 @@
</div> </div>
</div> </div>
<div v-show="playAuth" class="el-image-viewer__wrapper" :class="{active: playAuth}" style="z-index: 2000"> <div v-show="playAuth" class="el-image-viewer__wrapper" :class="{over: isDownload}" style="z-index: 2000">
<div class="el-image-viewer__mask"></div> <div class="el-image-viewer__mask"></div>
<span class="el-image-viewer__btn el-image-viewer__close" @click="closePlayer"><i class="el-icon-circle-close" style="color: #fff"></i></span> <span class="el-image-viewer__btn el-image-viewer__close" @click="closePlayer"><i class="el-icon-circle-close" style="color: #fff"></i></span>
<div class="player" id="player"></div> <div class="player" id="player"></div>
</div> </div>
<pdf :visible.sync="pdfVisible" :src.sync="pdfSrc"></pdf> <pdf :visible.sync="pdfVisible" :src.sync="pdfSrc"></pdf>
<a ref="picLink" style="display: none;" crossOrigin="anonymous" download="用户上传图片.png" :href="imgSrc">下载图片</a>
</div> </div>
</template> </template>
<script> <script>
@ -296,6 +295,9 @@ export default {
} }
} }
} }
.over{
top: 5000px;
}
.player{ .player{
position: absolute; position: absolute;
top: 50%; top: 50%;

@ -15,7 +15,7 @@
<span class="val">100</span> <span class="val">100</span>
</div> </div>
<div> <div>
<span class="name">练习时长</span> <span class="name">考试时长</span>
<span class="val">{{duration}}</span> <span class="val">{{duration}}</span>
</div> </div>
</div> </div>
@ -49,13 +49,13 @@
<template v-if="item.fileUrl"> <template v-if="item.fileUrl">
<div v-for="(url,fileName) in item.fileUrl" :key="fileName"> <div v-for="(url,fileName) in item.fileUrl" :key="fileName">
<el-button type="text" @click="preview(url,0)">{{fileName}}</el-button> <el-button type="text" @click="preview(url,0)">{{fileName}}</el-button>
<el-button type="primary" size="mini" @click="download(fileName,url)">下载</el-button> <el-button type="primary" size="mini" @click="download(fileName,url,0)">下载</el-button>
</div> </div>
</template> </template>
<template v-if="item.videoAudio"> <template v-if="item.videoAudio">
<div v-for="(url,fileName) in item.videoAudio" :key="fileName"> <div v-for="(url,fileName) in item.videoAudio" :key="fileName">
<el-button type="text" @click="preview(url,1)">{{fileName}}</el-button> <el-button type="text" @click="preview(url,1)">{{fileName}}</el-button>
<!-- <el-button type="primary" size="mini" @click="download(url)">下载</el-button> --> <el-button type="primary" size="mini" @click="download(fileName,url,1)">下载</el-button>
</div> </div>
</template> </template>
</div> </div>
@ -84,13 +84,12 @@
<button type="button" @click="save(0)">保存</button> <button type="button" @click="save(0)">保存</button>
</div> </div>
<div v-show="playAuth" class="el-image-viewer__wrapper" :class="{active: playAuth}" style="z-index: 2000"> <div v-show="playAuth" class="el-image-viewer__wrapper" :class="{over: isDownload}" style="z-index: 2000">
<div class="el-image-viewer__mask"></div> <div class="el-image-viewer__mask"></div>
<span class="el-image-viewer__btn el-image-viewer__close" @click="closePlayer"><i class="el-icon-circle-close" style="color: #fff"></i></span> <span class="el-image-viewer__btn el-image-viewer__close" @click="closePlayer"><i class="el-icon-circle-close" style="color: #fff"></i></span>
<div class="player" id="player"></div> <div class="player" id="player"></div>
</div> </div>
<pdf :visible.sync="pdfVisible" :src.sync="pdfSrc"></pdf> <pdf :visible.sync="pdfVisible" :src.sync="pdfSrc"></pdf>
<a ref="picLink" style="display: none;" crossOrigin="anonymous" download="用户上传图片.png" :href="imgSrc">下载图片</a>
</div> </div>
</template> </template>
<script> <script>
@ -327,6 +326,9 @@ export default {
} }
} }
} }
.over{
top: 5000px;
}
.player{ .player{
position: absolute; position: absolute;
top: 50%; top: 50%;

@ -188,6 +188,7 @@
>{{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="name" label="试卷名称" align="center"></el-table-column>
<el-table-column prop="courses" 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="preview(scope.row)">预览</el-button> <el-button type="text" @click="preview(scope.row)">预览</el-button>
@ -296,7 +297,7 @@ export default {
}, },
mounted() { mounted() {
this.getData() this.getData()
this.addInterval() // this.addInterval()
}, },
watch: { watch: {
keyword: function(val) { keyword: function(val) {
@ -510,6 +511,12 @@ export default {
addAss(){ addAss(){
this.stuCompKey++ this.stuCompKey++
this.isAdd = true this.isAdd = true
let now = util.formatDate('yyyy-MM-dd hh:mm:ss',new Date(new Date().getTime() + 60000))
let second = util.formatDate('yyyy-MM-dd hh:mm:ss',new Date(new Date().getTime() + 86460000))
this.time = [now,second]
this.form.startTime = now
this.form.endTime = second
console.log(11,this.form)
this.addVisible = true this.addVisible = true
}, },
save(){ save(){

@ -54,6 +54,7 @@ export default {
let classId = this.classId ? this.classId.split(',') : [] let classId = this.classId ? this.classId.split(',') : []
let studentId = this.studentId let studentId = this.studentId
let classList = [] let classList = []
console.log(22,this.classId)
this.$get(this.api.queryStudentProfessionalArchitecture,data).then(res => { this.$get(this.api.queryStudentProfessionalArchitecture,data).then(res => {
let StaffProfessionalArchitectureList = res.data.StaffProfessionalArchitectureList let StaffProfessionalArchitectureList = res.data.StaffProfessionalArchitectureList
StaffProfessionalArchitectureList.map(n => { StaffProfessionalArchitectureList.map(n => {

@ -69,7 +69,11 @@
</el-table-column> </el-table-column>
<el-table-column prop="stuName" label="真实姓名" align="center"></el-table-column> <el-table-column prop="stuName" label="真实姓名" align="center"></el-table-column>
<el-table-column prop="stuNo" label="学号" align="center"></el-table-column> <el-table-column prop="stuNo" label="学号" align="center"></el-table-column>
<el-table-column prop="thisScore" label="得分" align="center"></el-table-column> <el-table-column prop="thisScore" label="得分" align="center">
<template slot-scope="scope">
<p>{{scope.row.thisScore | defaultShow}}</p>
</template>
</el-table-column>
<el-table-column prop="timeSpent" label="用时(分钟)" align="center"></el-table-column> <el-table-column prop="timeSpent" label="用时(分钟)" align="center"></el-table-column>
<el-table-column prop="openingTime" label="考试时间" align="center"></el-table-column> <el-table-column prop="openingTime" label="考试时间" align="center"></el-table-column>
<el-table-column label="操作" align="center"> <el-table-column label="操作" align="center">
@ -189,6 +193,11 @@ export default {
}, },
toStat(){ toStat(){
if(this.listData.length){ if(this.listData.length){
let invalid = false
this.listData.map(n => {
if(n.thisScore == null) invalid = true
})
if(invalid) return this.$message.warning('考核未全部批阅完,无法统计成绩,请先批阅')
this.setAssDetailInfo({ this.setAssDetailInfo({
id: this.listData[0].paperId, id: this.listData[0].paperId,
assessmentId: this.assessmentId, assessmentId: this.assessmentId,

@ -60,13 +60,13 @@
<template v-if="item.fileUrl"> <template v-if="item.fileUrl">
<div v-for="(url,fileName) in item.fileUrl" :key="fileName"> <div v-for="(url,fileName) in item.fileUrl" :key="fileName">
<el-button type="text" @click="preview(url,0)">{{fileName}}</el-button> <el-button type="text" @click="preview(url,0)">{{fileName}}</el-button>
<el-button type="primary" size="mini" @click="download(fileName,url)">下载</el-button> <el-button type="primary" size="mini" @click="download(fileName,url,0)">下载</el-button>
</div> </div>
</template> </template>
<template v-if="item.videoAudio"> <template v-if="item.videoAudio">
<div v-for="(url,fileName) in item.videoAudio" :key="fileName"> <div v-for="(url,fileName) in item.videoAudio" :key="fileName">
<el-button type="text" @click="preview(url,1)">{{fileName}}</el-button> <el-button type="text" @click="preview(url,1)">{{fileName}}</el-button>
<!-- <el-button type="primary" size="mini" @click="download(url)">下载</el-button> --> <el-button type="primary" size="mini" @click="download(fileName,url,1)">下载</el-button>
</div> </div>
</template> </template>
</div> </div>
@ -78,13 +78,12 @@
</div> </div>
</div> </div>
<div v-show="playAuth" class="el-image-viewer__wrapper" :class="{active: playAuth}" style="z-index: 2000"> <div v-show="playAuth" class="el-image-viewer__wrapper" :class="{over: isDownload}" style="z-index: 2000">
<div class="el-image-viewer__mask"></div> <div class="el-image-viewer__mask"></div>
<span class="el-image-viewer__btn el-image-viewer__close" @click="closePlayer"><i class="el-icon-circle-close" style="color: #fff"></i></span> <span class="el-image-viewer__btn el-image-viewer__close" @click="closePlayer"><i class="el-icon-circle-close" style="color: #fff"></i></span>
<div class="player" id="player"></div> <div class="player" id="player"></div>
</div> </div>
<pdf :visible.sync="pdfVisible" :src.sync="pdfSrc"></pdf> <pdf :visible.sync="pdfVisible" :src.sync="pdfSrc"></pdf>
<a ref="picLink" style="display: none;" crossOrigin="anonymous" download="用户上传图片.png" :href="imgSrc">下载图片</a>
</div> </div>
</template> </template>
<script> <script>
@ -306,6 +305,9 @@ export default {
} }
} }
} }
.over{
top: 5000px;
}
.player{ .player{
position: absolute; position: absolute;
top: 50%; top: 50%;

@ -49,13 +49,13 @@
<template v-if="item.fileUrl"> <template v-if="item.fileUrl">
<div v-for="(url,fileName) in item.fileUrl" :key="fileName"> <div v-for="(url,fileName) in item.fileUrl" :key="fileName">
<el-button type="text" @click="preview(url,0)">{{fileName}}</el-button> <el-button type="text" @click="preview(url,0)">{{fileName}}</el-button>
<el-button type="primary" size="mini" @click="download(fileName,url)">下载</el-button> <el-button type="primary" size="mini" @click="download(fileName,url,0)">下载</el-button>
</div> </div>
</template> </template>
<template v-if="item.videoAudio"> <template v-if="item.videoAudio">
<div v-for="(url,fileName) in item.videoAudio" :key="fileName"> <div v-for="(url,fileName) in item.videoAudio" :key="fileName">
<el-button type="text" @click="preview(url,1)">{{fileName}}</el-button> <el-button type="text" @click="preview(url,1)">{{fileName}}</el-button>
<!-- <el-button type="primary" size="mini" @click="download(url)">下载</el-button> --> <el-button type="primary" size="mini" @click="download(fileName,url,1)">下载</el-button>
</div> </div>
</template> </template>
</div> </div>
@ -84,13 +84,12 @@
<button type="button" @click="save(0)">保存</button> <button type="button" @click="save(0)">保存</button>
</div> </div>
<div v-show="playAuth" class="el-image-viewer__wrapper" :class="{active: playAuth}" style="z-index: 2000"> <div v-show="playAuth" class="el-image-viewer__wrapper" :class="{over: isDownload}" style="z-index: 2000">
<div class="el-image-viewer__mask"></div> <div class="el-image-viewer__mask"></div>
<span class="el-image-viewer__btn el-image-viewer__close" @click="closePlayer"><i class="el-icon-circle-close" style="color: #fff"></i></span> <span class="el-image-viewer__btn el-image-viewer__close" @click="closePlayer"><i class="el-icon-circle-close" style="color: #fff"></i></span>
<div class="player" id="player"></div> <div class="player" id="player"></div>
</div> </div>
<pdf :visible.sync="pdfVisible" :src.sync="pdfSrc"></pdf> <pdf :visible.sync="pdfVisible" :src.sync="pdfSrc"></pdf>
<a ref="picLink" style="display: none;" crossOrigin="anonymous" download="用户上传图片.png" :href="imgSrc">下载图片</a>
</div> </div>
</template> </template>
<script> <script>
@ -196,7 +195,7 @@ export default {
let totalScore = 0 let totalScore = 0
this.list.map(n => { this.list.map(n => {
n.questionScore !== '' && n.isSub && data.review.push({ n.questionScore !== '' && n.isSub && data.review.push({
detailId: Number(n.detailId) , detailId: Number(n.detailId),
score: Number(n.questionScore) score: Number(n.questionScore)
}) })
totalScore += Number(n.questionScore) totalScore += Number(n.questionScore)
@ -321,6 +320,9 @@ export default {
} }
} }
} }
.over{
top: 5000px;
}
.player{ .player{
position: absolute; position: absolute;
top: 50%; top: 50%;

@ -25,7 +25,7 @@
<el-table-column prop="practiseName" label="练习名称" align="center"></el-table-column> <el-table-column prop="practiseName" label="练习名称" align="center"></el-table-column>
<el-table-column prop="createTime" label="创建时间" align="center"></el-table-column> <el-table-column prop="createTime" label="创建时间" align="center"></el-table-column>
<el-table-column prop="className" label="练习班级" align="center"></el-table-column> <el-table-column prop="className" label="练习班级" align="center"></el-table-column>
<el-table-column label="操作" width="250"> <el-table-column label="操作" width="280">
<template slot-scope="scope"> <template slot-scope="scope">
<el-popover <el-popover
placement="bottom" placement="bottom"
@ -129,6 +129,7 @@
>{{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="name" label="试卷名称" align="center"></el-table-column>
<el-table-column prop="courses" 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="preview(scope.row)">预览</el-button> <el-button type="text" @click="preview(scope.row)">预览</el-button>

@ -34,7 +34,7 @@
<el-table-column prop="workNumber" label="学号" align="center"></el-table-column> <el-table-column prop="workNumber" label="学号" align="center"></el-table-column>
<el-table-column prop="examTime" label="开始时间" align="center"></el-table-column> <el-table-column prop="examTime" label="开始时间" align="center"></el-table-column>
<el-table-column prop="timeCost" label="答题用时(分钟)" align="center"></el-table-column> <el-table-column prop="timeCost" label="答题用时(分钟)" align="center"></el-table-column>
<el-table-column prop="workNumber" label="考试状态" align="center"> <el-table-column prop="workNumber" label="练习状态" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{getExamStatusName(scope.row.state)}} {{getExamStatusName(scope.row.state)}}
</template> </template>

@ -63,9 +63,21 @@
</el-table-column> </el-table-column>
<el-table-column prop="userName" label="真实姓名" align="center"></el-table-column> <el-table-column prop="userName" label="真实姓名" align="center"></el-table-column>
<el-table-column prop="workNumber" label="学号" align="center"></el-table-column> <el-table-column prop="workNumber" label="学号" align="center"></el-table-column>
<el-table-column prop="max" label="最高分" align="center"></el-table-column> <el-table-column prop="max" label="最高分" align="center">
<el-table-column prop="min" label="最低分" align="center"></el-table-column> <template slot-scope="scope">
<el-table-column prop="avg" label="平均分" align="center"></el-table-column> <p>{{scope.row.max | defaultShow}}</p>
</template>
</el-table-column>
<el-table-column prop="min" label="最低分" align="center">
<template slot-scope="scope">
<p>{{scope.row.min | defaultShow}}</p>
</template>
</el-table-column>
<el-table-column prop="avg" label="平均分" align="center">
<template slot-scope="scope">
<p>{{scope.row.avg | defaultShow}}</p>
</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="showDetail(scope.row)">查看详情</el-button> <el-button type="text" @click="showDetail(scope.row)">查看详情</el-button>
@ -111,7 +123,11 @@
</el-table-column> </el-table-column>
<el-table-column prop="paperName" label="练习试卷名称" align="center"></el-table-column> <el-table-column prop="paperName" label="练习试卷名称" align="center"></el-table-column>
<el-table-column prop="examTime" label="开始时间" align="center"></el-table-column> <el-table-column prop="examTime" label="开始时间" align="center"></el-table-column>
<el-table-column prop="score" label="得分" align="center"></el-table-column> <el-table-column prop="score" label="得分" align="center">
<template slot-scope="scope">
<p>{{scope.row.score | defaultShow}}</p>
</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="show(scope.row)">查看</el-button>

@ -69,7 +69,6 @@
<el-button type="text" @click="edit(scope.row)" v-auth="'/quesBank/list:我上传的题库:修改'">修改</el-button> <el-button type="text" @click="edit(scope.row)" v-auth="'/quesBank/list:我上传的题库:修改'">修改</el-button>
<el-button type="text" @click="delData(scope.row)" v-auth="'/quesBank/list:我上传的题库:删除'">删除</el-button> <el-button type="text" @click="delData(scope.row)" v-auth="'/quesBank/list:我上传的题库:删除'">删除</el-button>
<el-button v-if="!scope.row.myShare" type="text" @click="share(scope.row)" v-auth="'/quesBank/list:我上传的题库:共享'">共享</el-button> <el-button v-if="!scope.row.myShare" type="text" @click="share(scope.row)" v-auth="'/quesBank/list:我上传的题库:共享'">共享</el-button>
<el-button v-else type="text" @click="cancelShare(scope.row)" v-auth="'/quesBank/list:我上传的题库:共享'">取消共享</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -273,7 +272,8 @@ export default {
.then(() => { .then(() => {
let data = { let data = {
userId: this.userId, userId: this.userId,
ids: shareList ids: shareList,
source: 2
} }
this.$post(this.api.batchSave,data).then(res => { this.$post(this.api.batchSave,data).then(res => {
this.multipleSelection = []; this.multipleSelection = [];

@ -28,7 +28,7 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" width="200"> <el-table-column label="操作" width="200">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" v-if="scope.row.parentId == 0" @click="addSecond(scope.row)" v-auth="'/quesBank/list:题库分类:添加'">添加</el-button> <el-button type="text" v-if="scope.row.parentId == 0 && scope.row.source == 2" @click="addSecond(scope.row)" v-auth="'/quesBank/list:题库分类:添加'">添加</el-button>
<el-button type="text" @click="editType(scope.row)" v-auth="'/quesBank/list:题库分类:编辑'">编辑</el-button> <el-button type="text" @click="editType(scope.row)" v-auth="'/quesBank/list:题库分类:编辑'">编辑</el-button>
<el-button type="text" @click="handleDelete(scope.row)" v-auth="'/quesBank/list:题库分类:删除'">删除</el-button> <el-button type="text" @click="handleDelete(scope.row)" v-auth="'/quesBank/list:题库分类:删除'">删除</el-button>
</template> </template>

@ -49,6 +49,7 @@
> >
<el-button type="primary" class="ml20">上传视频/音频</el-button> <el-button type="primary" class="ml20">上传视频/音频</el-button>
</el-upload> </el-upload>
<span class="m-l-10" v-if="topicForm.videoAudio">已上传</span>
</el-form-item> </el-form-item>
<el-form-item label="题干" prop="questionStem"> <el-form-item label="题干" prop="questionStem">
<quill :border="true" :readonly="isDetail" :key="isDetail" v-model="topicForm.questionStem" :minHeight="150" :height="150" /> <quill :border="true" :readonly="isDetail" :key="isDetail" v-model="topicForm.questionStem" :minHeight="150" :height="150" />

@ -33,10 +33,10 @@
<el-table-column label="操作" width="180"> <el-table-column label="操作" width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="showRole(scope.row)" v-auth="'/system/list:角色权限:查看'">查看</el-button> <el-button type="text" @click="showRole(scope.row)" v-auth="'/system/list:角色权限:查看'">查看</el-button>
<!-- <template v-if="scope.row.id != 1"> --> <template v-if="scope.row.id != 1">
<el-button type="text" @click="editRole(scope.row)" v-auth="'/system/list:角色权限:编辑'">编辑</el-button> <el-button type="text" @click="editRole(scope.row)" v-auth="'/system/list:角色权限:编辑'">编辑</el-button>
<el-button type="text" @click="handleDelete(scope.row)" v-auth="'/system/list:角色权限:删除'">删除</el-button> <el-button type="text" @click="handleDelete(scope.row)" v-auth="'/system/list:角色权限:删除'">删除</el-button>
<!-- </template> --> </template>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>

@ -398,7 +398,7 @@ export default {
this.teacherForm.phone = user.phone this.teacherForm.phone = user.phone
this.teacherForm.email = user.email this.teacherForm.email = user.email
this.teacherForm.userAccount = user.account this.teacherForm.userAccount = user.account
this.originalAccount = Number(user.account) this.originalAccount = user.account
this.teacherForm.userId = user.userId this.teacherForm.userId = user.userId
this.teacherForm.schoolId = user.schoolId this.teacherForm.schoolId = user.schoolId
this.teacherForm.roleValue = user.roleId this.teacherForm.roleValue = user.roleId

@ -582,8 +582,11 @@ export default {
}, },
getQuesBank() { getQuesBank() {
let data = { let data = {
keyword: '',
pageNum: 1, pageNum: 1,
pageSize: 10000 pageSize: 10000,
schoolId: this.clientId,
source: 2
} }
this.$post(this.api.listByPage,data) this.$post(this.api.listByPage,data)
.then(res => { .then(res => {

@ -0,0 +1,12 @@
/**
* @description 返回缺省值
* 传入的如果是null就返回'--'
* 用例<Tag :default="val">text</Tag> <Tag>{{val | default}}</Tag>
* */
const defaultShow = (val) => {
return val == null ? '--' : val
}
module.exports = {
defaultShow
}

@ -92,7 +92,7 @@ export default {
return id != null ? state.stateList.find(n => n.id == id).name : '' return id != null ? state.stateList.find(n => n.id == id).name : ''
}, },
getReviewStatusName: state => id => { getReviewStatusName: state => id => {
return id != null ? state.reviewStatusList.find(n => n.id == id).name : '' return id != null ? state.reviewStatusList.find(n => n.id == id).name : '--'
}, },
getExamStatusName: state => id => { getExamStatusName: state => id => {
return id != null ? state.examStatusList.find(n => n.id == id).name : '' return id != null ? state.examStatusList.find(n => n.id == id).name : ''

@ -59,7 +59,7 @@ export default {
get(api.logins,{ account: username.trim(), password: password }).then(res => { get(api.logins,{ account: username.trim(), password: password }).then(res => {
if(res.success){ if(res.success){
let user = res.data.userInfo let user = res.data.userInfo
if(user.isPort == 0 || user.isPort == 2){ if((user.isPort == 0 || user.isPort == 2) && user.roleId != 4){
let routes = res.data.permissions[0].children let routes = res.data.permissions[0].children
commit('SET_INFO',{ commit('SET_INFO',{
avatar: user.userAvatars, avatar: user.userAvatars,

Loading…
Cancel
Save