yujialong 4 years ago
parent 0694358cf3
commit 34edeb2af3
  1. 6
      src/components/testPaperDetail/index.vue
  2. 11
      src/layouts/navbar/index.vue
  3. 20
      src/pages/achievement/statistics/index.vue
  4. 5
      src/pages/assessment/list/index.vue
  5. 1
      src/pages/assessment/monitor/index.vue
  6. 4
      src/pages/index/list/index.vue
  7. 8
      src/pages/practice/list/index.vue
  8. 41
      src/pages/testPaper/add/index.vue
  9. 21
      src/pages/testPaper/list/myTestPaper.vue
  10. 2
      src/setting.js
  11. 7
      src/styles/common.scss

@ -1,6 +1,6 @@
<template>
<div class="box">
<breadcrumb :data="'试卷管理/试卷预览'"></breadcrumb>
<breadcrumb :data="'试卷管理/试卷预览'" v-if="!isDia"></breadcrumb>
<div class="page">
<div class="page-content">
<h1 class="title">{{paperName}}</h1>
@ -56,12 +56,10 @@
</div>
</template>
<script>
import mixins from '@/mixins/setBackground'
import { mapState } from 'vuex'
import breadcrumb from '@/components/breadcrumb'
export default {
props: ['data'],
mixins: [ mixins ],
props: ['data','isDia'],
data() {
return {
assPaperName: '',

@ -91,11 +91,11 @@ export default {
index: '/achievement/list',
title: '成绩管理'
},
{
icon: 'menu-icon icon-msg',
index: '/messageBoard/list',
title: '交流互动'
},
// {
// icon: 'menu-icon icon-msg',
// index: '/messageBoard/list',
// title: ''
// },
{
icon: 'menu-icon icon-student',
index: '/student/list',
@ -112,6 +112,7 @@ export default {
testPaper: ['testPaper-add','testPaper-show'],
practice: ['practice-review','practice-result','practice-doReview','practice-scoreQuery','practice-detail'],
assessment: ['assessment-monitor','assessment-review','assessment-doReview','assessment-scoreQuery','assessment-detail'],
achievement: ['achievement-statistics'],
}
}
},

@ -108,6 +108,7 @@ export default {
totalScore: '',
},
statData: [],
listDataAll: [],
listData: [],
page: 1,
pageSize: 10,
@ -165,9 +166,13 @@ export default {
})
},
getList() {
this.$get(`${this.api.getRanking}?pageNum=${this.page}&pageSize=${this.pageSize}&assessmentId=${this.assessmentId}`)
this.$get(`${this.api.getRanking}?pageNum=${this.page}&pageSize=10000&assessmentId=${this.assessmentId}`)
.then(res => {
let list = res.data.list.list
let temp = res.data.list.list
let list = []
temp.map(n => {
n.classId == this.classId && list.push(n)
})
let len = list.length - 1
for(let i = 0; i < len; i++){
for(let j = 0; j < len; j++){
@ -181,14 +186,19 @@ export default {
let hasRank = list.filter(n => n.rank)
let notRank = list.filter(n => !n.rank)
list = [...hasRank,...notRank]
this.listData = list
this.total = res.data.list.totalCount
this.listDataAll = list
this.total = list.length
this.handlePage()
})
.catch(err => {})
},
handlePage(){
let list = this.listDataAll
this.listData = list.slice((this.page - 1) * this.pageSize,this.page * this.pageSize)
},
handleCurrentChange(val) {
this.page = val
this.getList()
this.handlePage()
},
exportData(){
location.href = `${this.api.getRankingExport}?assessmentId=${this.assessmentId}`

@ -171,8 +171,8 @@
</span>
</el-dialog>
<el-dialog title="试卷详情" :visible.sync="previewVisible" width="90%">
<test-paper-detail :key="previewId"></test-paper-detail>
<el-dialog title="试卷详情" :visible.sync="previewVisible" custom-class="testpaperDia" top="140px">
<test-paper-detail :isDia="true" :key="previewId"></test-paper-detail>
</el-dialog>
</div>
</template>
@ -495,7 +495,6 @@ export default {
finish(row){
this.$confirm('是否结束此次考试?', '提示', {
type: 'warning',
customClass: 'normal'
}).then(() => {
this.$post(`${this.api.compulsory}?id=${row.id}`).then(res => {
util.successMsg('结束成功')

@ -210,7 +210,6 @@ export default {
if(this.listData.length){
this.$confirm('是否强制终止此次考试?', '提示', {
type: 'warning',
customClass: 'normal'
}).then(() => {
this.$post(`${this.api.compulsory}?id=${this.id}`).then(res => {
util.successMsg('强制收卷成功')

@ -91,7 +91,7 @@
</div>
</div>
<div class="page">
<!-- <div class="page">
<div class="tabs">
<a class="item active">待回复的提问</a>
</div>
@ -124,7 +124,7 @@
</template>
<div class="none" v-else>暂无待回复的提问</div>
</div>
</div>
</div> -->
<el-dialog title="编辑班级" :visible.sync="classVisible" width="24%" center :close-on-click-modal="false">
<el-input placeholder="请输入班级名称" v-model="curClass.className"></el-input>

@ -114,8 +114,8 @@
</span>
</el-dialog>
<el-dialog title="试卷详情" :visible.sync="previewVisible" width="95%" custom-class="testpaperDia">
<test-paper-detail :key="previewId"></test-paper-detail>
<el-dialog title="试卷详情" :visible.sync="previewVisible" custom-class="testpaperDia" top="140px">
<test-paper-detail :isDia="true" :key="previewId"></test-paper-detail>
</el-dialog>
</div>
</template>
@ -477,8 +477,4 @@ export default {
}
}
}
// /deep/.testpaperDia{
// width: calc(100% - 220px) !important;
// margin-left: 240px;
// }
</style>

@ -172,6 +172,7 @@
</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="typeName" label="所属题库" min-width="140" align="center"></el-table-column>
<el-table-column prop="knowledgePoints" label="知识点" align="center"></el-table-column>
<el-table-column prop="useNum" label="使用次数" width="100" align="center"></el-table-column>
<el-table-column prop="createTime" label="上传时间" width="150" align="center"></el-table-column>
@ -240,8 +241,8 @@
</span>
</el-dialog>
<el-dialog title="试卷预览" :visible.sync="previewVisible" fullscreen>
<test-paper :data="previewList" :key="previewIndex"></test-paper>
<el-dialog title="试卷预览" :visible.sync="previewVisible" custom-class="testpaperDia" top="140px">
<test-paper :data="previewList" :isDia="true" :key="previewIndex"></test-paper>
</el-dialog>
</div>
</template>
@ -334,7 +335,8 @@ export default {
countCheck5: false,
},
pointRules: [30,20,10,10,2],
selectedData: []
selectedData: [],
isOpen: false
};
},
components: {testPaper,breadcrumb},
@ -489,7 +491,7 @@ export default {
if(this.type == 0){
this.getSelectFilter()
this.getType()
this.getQuesBank()
// this.getQuesBank()
this.getManualData()
this.manualVisible = true
}else{
@ -515,10 +517,37 @@ export default {
n.questionStem = n.questionStem.replace(/\(\)\(\)\(\)/g,`______`)
})
this.listData = list
if(!this.isOpen) this.getCourse()
this.isOpen = true
this.total = res.data.list.totalCount
this.$refs.listTable.clearSelection()
}).catch(err => {})
},
getCourse(){
let data = {
courses: this.selectManual.courses,
knowledgePoints: this.selectManual.knowledgePoints,
name: this.selectManual.name,
pageNum: this.page,
pageSize: 10000,
questionStem: this.keyword,
typeName: this.selectManual.typeName,
userId: this.userId,
}
this.$post(this.api.pageByChoiceList,data).then(res => {
let list = res.data.list.list
let quesBankList = []
list.map(n => {
quesBankList.includes(n.typeName) || quesBankList.push(n.typeName)
})
this.quesBankList = quesBankList.map(n => {
return {
typeName: n
}
})
}).catch(err => {})
},
initData(){
this.page = 1
this.getManualData()
@ -596,8 +625,7 @@ export default {
schoolId: this.clientId,
source: 2
}
this.$post(this.api.listByPage,data)
.then(res => {
this.$post(this.api.listByPage,data).then(res => {
let list = res.data.list.list
let result = list
list.map((n,i) => {
@ -655,6 +683,7 @@ export default {
this.$refs.selectedTable.clearSelection()
this.keyword = ''
this.page = 1
this.isOpen = false
},
getInteData() {
let data = {

@ -40,9 +40,6 @@
<span class="index">{{index+1}}.</span>
<div v-html="item.questionStem"></div>
</div>
<div class="options">
<p v-for="(option,i) in item.options" :key="i">{{i}}.{{item.options[i]}}</p>
</div>
</li>
</ul>
</li>
@ -68,9 +65,6 @@
<span class="index">{{index+1}}.</span>
<div v-html="item.questionStem"></div>
</div>
<div class="options">
<p v-for="(option,i) in item.options" :key="i">{{i}}.{{item.options[i]}}</p>
</div>
</li>
</ul>
</li>
@ -175,9 +169,9 @@ function getUrlBase64(url, ext, callback) {
img.crossOrigin = 'Anonymous';
img.src = url;
img.onload = function () {
canvas.height = 60; //,
canvas.width = 85; //
ctx.drawImage(img, 0, 0, 60, 85); //
canvas.height = 300; //,
canvas.width = 300; //
ctx.drawImage(img, 0, 0, 300, 300); //
var dataURL = canvas.toDataURL("image/" + ext);
callback.call(this, dataURL); //Base64
canvas = null;
@ -327,8 +321,7 @@ export default {
this.loading = true
this.exportVisible = true
this.paperName = row.name
this.$post(`${this.api.previewtestPaper}?id=${row.id}`)
.then(res => {
this.$post(`${this.api.previewtestPaper}?id=${row.id}`).then(res => {
let list = res.data
let reg = /<img src=".*?">/gi
let index = 0
@ -342,9 +335,10 @@ export default {
list[i].map(n => {
let src = reg.exec(n.questionStem)
if(src){
console.log(11,src,src[0],reg.lastIndex)
src = src[0].replace('<img src="','').replace('">','')
getUrlBase64(src, 'jpg', function (base64) {
n.questionStem = n.questionStem.replace(reg,`<img src="${base64}">`)
n.questionStem = n.questionStem.replace(reg,`<img width="300" src="${base64}">`)
})
}
})
@ -355,7 +349,8 @@ export default {
this.$nextTick(() => {
setTimeout(() => {
html2Canvas(document.querySelector('#pdfDom'), {
allowTaint: true
allowTaint: true,
tainttest : true,
}).then(canvas => {
let contentWidth = canvas.width
let contentHeight = canvas.height

@ -16,7 +16,7 @@ const Setting = {
showProgressBar: true,
// 接口请求地址
// apiBaseURL: env === 'development' ? 'http://192.168.31.151:8001' : 'http://39.108.250.202:8000/',
apiBaseURL: env === 'development' ? 'http://39.108.250.202:9000' : 'http://39.108.250.202:9000',
apiBaseURL: env === 'development' ? 'http://192.168.31.151:8001' : 'http://39.108.250.202:9000',
// 接口请求返回错误时,弹窗的持续时间,单位:秒
modalDuration: 3,
// 接口请求返回错误时,弹窗的类型,可选值为 Message 或 Notice

@ -304,6 +304,13 @@
}
}
.testpaperDia{
width: calc(100% - 260px) !important;
height: calc(100% - 160px) !important;
overflow: auto;
margin-left: 240px;
}
.el-message{
padding: 11px 20px;
.el-message__icon{

Loading…
Cancel
Save