dev_202412
yujialong 6 months ago
parent a8d8e144c8
commit f1bbd5be05
  1. 8
      public/index.html
  2. 98
      src/pages/match/theoryExam/index.vue

@ -3,21 +3,21 @@
<head>
<meta charset="utf-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="keywords" content="智信云,教学,教育,在线编程" />
<meta name="keywords" content="职站,教学,教育,在线编程" />
<meta
name="description"
content="智信云是一家为高等院校提供实验课程数字化服务的国家级高新技术企业。以区块链、大数据、人工智能等前沿技术在行业领域的运用为支撑,将新技术与经济与管理人才培养深度融合,面向全国高等院校的经济、金融、大数据应用等相关专业提供科研创新、金课建设、实验实训教学软件、实践教学以及学生就业培训为一体的专业建设咨询与技术支持服务。"
content="职站是一款辅助院校教师开展虚拟仿真实验教学的智能云实践平台。平台采用了大数据,云计算等技术,为学校搭建信息化平台提供了基础,可助力院校实现教学智能化升级。职站平台设计遵循着极简、高效的理念,可帮助老师轻松开展实验教学,并支持自定义发布考核和练习,智能统计和检验学生的日常实训练习效果;老师还可以通过可视化图表报告直观查看学生实训成绩,评估教学成果。"
/>
<meta name="baidu-site-verification" content="code-TRfXe8xIkJ" />
<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
<!-- <meta name="viewport" content="width=device-width, user-scalable=yes, shrink-to-fit=no" /> -->
<link rel="stylesheet" href="//at.alicdn.com/t/font_830376_qzecyukz0s.css" />
<title></title>
<title>职站——为院校打造一站式虚拟仿真实训教学数智云平台</title>
<script>
var _hmt = _hmt || [];
(function () {
var hm = document.createElement('script');
hm.src = 'https://hm.baidu.com/hm.js?e4d7deeca2d6ea71d2bd5fa2365bc654';
hm.src = 'https://hm.baidu.com/hm.js?72fbad6ebf1d6c705117fe8fe0686a0e';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(hm, s);
})();

@ -114,16 +114,12 @@
<span>上传要求说明</span>
<div class="html-parse" v-html="ques.uploadInstructions"></div>
</div>
<Upload style="max-width: 700px;" accept=".csv,.xlsx,.xls,.docx,.doc,.pdf,.jpg,.png,.zip,.rar,.7z"
:max-size="50" :file-list="ques.uploadList" :on-remove="e => handleRemove(ques)"
@onSuccess="e => uploadSuccess(e, ques)">
<div slot="trigger">
<el-button type="primary" plain>上传文件</el-button>
</div>
<template slot="tip">
<p></p>
</template>
</Upload>
<el-upload style="max-width: 700px;" accept=".csv,.xlsx,.xls,.docx,.doc,.pdf,.jpg,.png,.zip,.rar,.7z"
:before-upload="beforeUpload" :on-remove="e => handleRemove(ques)" :on-error="uploadError"
:before-remove="beforeRemove" :on-preview="handlePreview" :limit="1" action="#"
:on-exceed="handleExceed" :file-list="ques.fileList" :http-request="e => handleRequest(e, ques)">
<el-button type="primary" plain>上传文件</el-button>
</el-upload>
</div>
</template>
</div>
@ -146,11 +142,13 @@ import Setting from "@/setting"
import QuesConst from '@/const/ques'
import TestPaperConst from '@/const/testPaper'
import _ from 'lodash'
import Oss from '@/components/upload/upload.js'
import Upload from '@/components/upload'
import UeditorPlus from '@/components/ueditorPlus'
import PdfDia from '@/components/pdf'
import Bus from '@/libs/bus'
import OSS from 'ali-oss'
import OssConfig from '@/components/upload/config.js'
import Oss from '@/components/upload/upload.js'
export default {
components: {
@ -207,6 +205,7 @@ export default {
previewImg: '',
pdfVisible: false,
pdfSrc: '',
client: null,
};
},
mounted () {
@ -220,6 +219,7 @@ export default {
})
this.getCompetition(1)
this.initOss()
},
methods: {
//
@ -302,6 +302,13 @@ export default {
n.answer = type === 'essay' && curQues ? curQues.answerContent : ''
n.attachmentName = curQues ? curQues.attachmentName : ''
n.attachmentUrl = curQues ? curQues.attachmentUrl : ''
n.fileList = []
if (n.attachmentUrl) {
n.fileList = [{
name: n.attachmentName,
url: n.attachmentUrl
}]
}
//
const url = n.attachmentUrl
if (url) {
@ -319,7 +326,7 @@ export default {
// input
this.$nextTick(() => {
const w = document.querySelector('#quesWrap').clientWidth - 200
cache || this.submit(0) //
paper.map(e => {
e.examQuestions.map(n => {
if (e.questionType === 'fill_blank') {
@ -331,7 +338,6 @@ export default {
e.addEventListener('input', () => {
const answers = []
let hasFillLen = 0
let text = e.innerText
for (const e of inputs) {
const val = e.innerText
if (val) hasFillLen++
@ -346,16 +352,6 @@ export default {
this.submit(0)
this.calcProgress()
}, 500)
text = text.trim()
// //
e.style.width = Math.min(w, text.length * 14) + 'px'; // 7
// //
const lineHeight = 28; //
const lineCount = text.split('\n').length;
e.style.height = Math.max(lineCount * lineHeight, 28) + 'px';
})
}
}
@ -541,15 +537,63 @@ export default {
download (name, url) {
Util.downloadFile(name, url)
},
async initOss () {
const o = await OssConfig()
this.client = new OSS(o.config)
},
//
beforeUpload (file) {
const oversize = file.size / 1024 / 1024 < 50
if (!oversize) Util.warningMsg('请上传小于50M的文件!')
if (oversize) {
return true
} else {
return false
}
},
//
async handleRequest (e, ques) {
const { file } = e
try {
ques.fileList = []
const { name } = await this.client.multipartUpload(Date.now() + '.' + Util.getFileExt(file.name), file)
const url = 'https://huoran.oss-cn-shenzhen.aliyuncs.com/' + name
ques.fileList = [{
name: file.name,
url
}]
ques.attachmentName = file.name
ques.attachmentUrl = url
this.submit(0)
} catch (e) { }
},
handlePreview ({ url }) {
this.preview(url)
},
uploadError () {
this.$message({
message: "上传出错,请重试!",
type: "error",
center: true
})
},
beforeRemove (file) {
return this.$confirm(`确定移除 ${file.name}`);
},
handleExceed () {
Util.warningMsg(`当前限制选择 1 个文件,如需更换,请删除上一个文件再重新选择!`);
},
handleRemove (ques) {
Oss.del(ques.attachmentUrl)
ques.fileList = []
ques.attachmentName = ''
ques.attachmentUrl = ''
this.submit(0)
},
uploadSuccess (file, ques) {
ques.attachmentName = file.name
ques.attachmentUrl = file.url
},
//
answerAnalysisReady (editor) {
this.answerAnalysis && editor.setContent(this.answerAnalysis)

Loading…
Cancel
Save