dev_202412
yujialong 4 months ago
parent e6903a20d4
commit 55e21d2dbb
  1. 2
      src/api/index.js
  2. 305
      src/pages/ass/list/index.vue
  3. 3
      src/pages/match/details/index.vue
  4. 7
      src/pages/match/list/index.vue
  5. 273
      src/pages/match/theoryExam/index.vue
  6. 7
      src/pages/record/details/index.vue
  7. 186
      src/pages/record/list/index.vue
  8. 58
      src/pages/record/list/practice.vue
  9. 59
      src/pages/station/preview/index.vue
  10. 13
      src/pages/station/product/index.vue

@ -175,6 +175,8 @@ export default {
submitTheExamPaper: `exam/exam/paper/submitTheExamPaper`,
getExamPaperCache: `exam/exam/paper/getExamPaperCache`,
getDetailedExamScores: `exam/exam/paper/getDetailedExamScores`,
submitTheExamPaperForPractice: `exam/exam/paper/submitTheExamPaperForPractice`,
submitTheExamPaperForAssessment: `exam/exam/paper/submitTheExamPaperForAssessment`,
exportExamPaperReport: `${host}exam/exam/paper/exportExamPaperReport`,
// 创业活动

@ -1,193 +1,109 @@
<template>
<!-- 考核列表 -->
<div class="wrap">
<div class="page"
style="padding-bottom: 0;margin-bottom: 12px">
<div class="page" style="padding-bottom: 0;margin-bottom: 12px">
<h6 class="l-title">
<img src="@/assets/img/ass1.png"
alt="">
<img src="@/assets/img/ass1.png" alt="">
考核筛选
</h6>
<ul class="filter">
<li>
<label>考核时间</label>
<el-radio-group size="small"
v-model="form.month">
<el-radio v-for="(item,index) in dateList"
:key="index"
:label="item.id"
border>
<el-radio-group size="small" v-model="form.month">
<el-radio v-for="(item, index) in dateList" :key="index" :label="item.id" border>
{{ item.name }}
</el-radio>
</el-radio-group>
<el-date-picker size="small"
v-model="date"
align="right"
unlink-panels
type="daterange"
start-placeholder="开始日期"
end-placeholder="结束日期"
format="yyyy-MM-dd"
value-format="yyyy-MM-dd"
clearable
style="width: 300px"></el-date-picker>
<el-date-picker size="small" v-model="date" align="right" unlink-panels type="daterange"
start-placeholder="开始日期" end-placeholder="结束日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" clearable
style="width: 300px"></el-date-picker>
</li>
</ul>
<ul class="filter">
<li>
<label>课程名称</label>
<el-select size="small"
v-model="form.mallId"
@change="initData">
<el-option label="不限"
value=""></el-option>
<el-option v-for="(item,index) in courseList"
:key="index"
:label="item.goodsName"
:value="item.mallId"></el-option>
<el-select size="small" v-model="form.mallId" @change="initData">
<el-option label="不限" value=""></el-option>
<el-option v-for="(item, index) in courseList" :key="index" :label="item.goodsName"
:value="item.mallId"></el-option>
</el-select>
</li>
<li>
<label>实验班级</label>
<el-select size="small"
v-model="form.classId"
@change="initData">
<el-option label="不限"
value=""></el-option>
<el-option v-for="(item,index) in classList"
:key="index"
:label="item.className"
:value="item.id"></el-option>
<el-select size="small" v-model="form.classId" @change="initData">
<el-option label="不限" value=""></el-option>
<el-option v-for="(item, index) in classList" :key="index" :label="item.className"
:value="item.id"></el-option>
</el-select>
</li>
<li>
<label>实验状态</label>
<el-select size="small"
v-model="form.status"
@change="initData">
<el-option v-for="(item,index) in statusList"
:key="index"
:label="item.name"
:value="item.value"></el-option>
<el-select size="small" v-model="form.status" @change="initData">
<el-option v-for="(item, index) in statusList" :key="index" :label="item.name"
:value="item.value"></el-option>
</el-select>
</li>
<li>
<label>搜索</label>
<el-input placeholder="请输入考核名称"
v-model="form.keyWord"
clearable></el-input>
<el-input placeholder="请输入考核名称" v-model="form.keyWord" clearable></el-input>
</li>
</ul>
</div>
<div class="page">
<el-table v-loading="listLoading"
:data="listData"
class="table"
stripe
header-align="center">
<el-table-column type="index"
width="60"
label="序号"
align="center">
<el-table v-loading="listLoading" :data="listData" class="table" stripe header-align="center">
<el-table-column type="index" width="60" label="序号" align="center">
<template slot-scope="scope">
{{ scope.$index + (page - 1) * pageSize + 1 }}
</template>
</el-table-column>
<el-table-column prop="goodsName"
label="课程名称"
align="center"
show-overflow-tooltip></el-table-column>
<el-table-column prop="experimentalName"
label="考核名称"
align="center"
show-overflow-tooltip></el-table-column>
<el-table-column prop="className"
label="实验班级"
align="center"></el-table-column>
<el-table-column prop="experimentalNum"
width="90"
label="实验人数"
align="center"></el-table-column>
<el-table-column prop="experimentDuration"
width="90"
label="考试时长"
align="center"></el-table-column>
<el-table-column prop="createTime"
width="160"
label="创建时间"
align="center"></el-table-column>
<el-table-column prop="startTime"
width="160"
label="起始时间"
align="center"></el-table-column>
<el-table-column prop="stopTime"
width="160"
label="结束时间"
align="center"></el-table-column>
<el-table-column label="倒计时"
width="90"
align="center">
<el-table-column prop="goodsName" label="课程名称" align="center" show-overflow-tooltip></el-table-column>
<el-table-column prop="experimentalName" label="考核名称" align="center" show-overflow-tooltip></el-table-column>
<el-table-column prop="className" label="实验班级" align="center"></el-table-column>
<el-table-column prop="experimentalNum" width="90" label="实验人数" align="center"></el-table-column>
<el-table-column prop="experimentDuration" width="90" label="考试时长" align="center"></el-table-column>
<el-table-column prop="createTime" width="160" label="创建时间" align="center"></el-table-column>
<el-table-column prop="startTime" width="160" label="起始时间" align="center"></el-table-column>
<el-table-column prop="stopTime" width="160" label="结束时间" align="center"></el-table-column>
<el-table-column label="倒计时" width="90" align="center">
<template slot-scope="scope">
<span>{{ timeFilter(scope.row) }}</span>
</template>
</el-table-column>
<el-table-column label="考核状态"
width="90"
align="center">
<el-table-column label="考核状态" width="90" align="center">
<template slot-scope="scope">
<span class="ellipsis">{{ status[scope.row.status] }}</span>
</template>
</el-table-column>
<el-table-column width="100"
label="操作"
align="center">
<el-table-column width="100" label="操作" align="center">
<template slot-scope="scope">
<!--status:考核状态(0待开始 1进行中 2已结束); stuState:学生考试状态(0未考 1在考 2已考)-->
<el-button v-if="scope.row.status == 2 && scope.row.stuState == 0"
type="text"
disabled>未参加</el-button>
<el-button v-if="(scope.row.status == 2 && scope.row.stuState == 1) || (scope.row.status == 2 && scope.row.stuState == 2 && !scope.row.reportId)"
type="text"
disabled>
<el-button v-if="scope.row.status == 2 && scope.row.stuState == 0" type="text" disabled>未参加</el-button>
<el-button
v-if="(scope.row.status == 2 && scope.row.stuState == 1) || (scope.row.status == 2 && scope.row.stuState == 2 && !scope.row.reportId)"
type="text" disabled>
未提交
</el-button>
<el-button v-if="scope.row.status != 2 && (scope.row.stuState == 0 || scope.row.stuState == 1)"
type="text"
@click="entry(scope.row)"
:disabled="scope.row.status !== 1">进入
<el-button v-if="scope.row.status != 2 && (scope.row.stuState == 0 || scope.row.stuState == 1)" type="text"
@click="entry(scope.row)" :disabled="scope.row.status !== 1">进入
</el-button>
<el-button v-if="scope.row.status == 1 && scope.row.stuState == 2"
type="text"
disabled>已提交</el-button>
<el-button v-if="scope.row.status == 2 && scope.row.stuState == 2 && scope.row.reportId"
type="text"
@click="show(scope.row)">查看成绩
<el-button v-if="scope.row.status == 1 && scope.row.stuState == 2" type="text" disabled>已提交</el-button>
<el-button v-if="scope.row.status == 2 && scope.row.stuState == 2 && scope.row.reportId" type="text"
@click="show(scope.row)">查看成绩
</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background
layout="total, prev, pager, next"
:total="totals"
@current-change="handleCurrentChange"
:current-page="page"></el-pagination>
<el-pagination background layout="total, prev, pager, next" :total="totals"
@current-change="handleCurrentChange" :current-page="page"></el-pagination>
</div>
</div>
<el-dialog title="请输入邀请码"
:visible.sync="icVisible"
width="30%"
@close="closeIc"
center
:close-on-click-modal="false">
<el-input v-model="invitationCode"
placeholder="邀请码"
maxlength="6"></el-input>
<div slot="footer"
class="dialog-footer">
<el-button type="primary"
@click="saveIc"> </el-button>
<el-dialog title="请输入邀请码" :visible.sync="icVisible" width="30%" @close="closeIc" center
:close-on-click-modal="false">
<el-input v-model="invitationCode" placeholder="邀请码" maxlength="6"></el-input>
<div slot="footer" class="dialog-footer">
<el-button type="primary" @click="saveIc"> </el-button>
</div>
</el-dialog>
</div>
@ -264,7 +180,6 @@ export default {
},
projectId: null,
url: '',
cid: null,
systemId: null,
assessmentId: '',
@ -424,12 +339,13 @@ export default {
this.curRow = row;
if (row.isEnableCode == 0) { // (0 1)
this.$post(`${this.api.enterExam}?assessmentId=${row.assessmentId}&classId=${row.classId}`).then(res => {
this.curRow.curriculumId = res.info.systemId
this.projectId = res.projectId
this.url = res.url
this.cid = res.info.cid
this.systemId = res.info.systemId
var date = res.assessmentInfo.stopTime;
const data = res.assessmentInfo
this.curRow.paperId = data.paperId || ''
this.curRow.curriculumId = data.systemId || ''
this.projectId = data.projectId || ''
this.cid = data.curriculumId
this.systemId = data.systemId || ''
let date = data.stopTime;
date = date.substring(0, 19);
date = date.replace(/-/g, '/');
this.stopTime = new Date(date).getTime();
@ -451,13 +367,13 @@ export default {
this.$post(`${this.api.enterExam}?assessmentId=${this.item.assessmentId}&classId=${this.item.classId}&invitationCode=${this.invitationCode}`).then(res => {
util.successMsg("验证成功!");
this.icVisible = false;
this.projectId = res.projectId
this.url = res.url
this.cid = res.info.cid
this.systemId = res.info.systemId
setTimeout(() => {
this.goSubSystem();
}, 1000);
const data = res.assessmentInfo
this.curRow.paperId = data.paperId || ''
this.curRow.curriculumId = data.systemId || ''
this.projectId = data.projectId
this.cid = data.curriculumId
this.systemId = data.systemId
this.goSubSystem();
}).catch(res => {
});
},
@ -469,40 +385,47 @@ export default {
const classId = this.classId
const classItem = this.classList.find(e => e.id == classId)
const row = this.curRow
const { curriculumId, mallId } = row
util.cookies.set("token", token)
util.cookies.set("assessmentId", this.assessmentId)
util.cookies.set("classId", classId)
util.cookies.set("className", classItem ? classItem.className : '')
util.cookies.set("projectId", this.projectId)
util.cookies.set("courseId", this.cid)
util.cookies.set("curriculumName", encodeURIComponent(row.sysName));
util.cookies.set("startTime", row.startTime)
util.cookies.set("stopTime", row.stopTime)
util.cookies.set("systemId", this.systemId);
util.cookies.set('mallId', mallId)
util.cookies.set('fromManager', '', -1)
util.cookies.set('competitionId', '', -1)
util.cookies.set('isSubmit', '', -1)
util.cookies.set('language', '', -1)
let href = ''
if (curriculumId == 11) {
href = `${Setting.systemPath}/#/index/list?token=${token}&cid=${this.cid}&systemId=${this.systemId}&projectId=${this.projectId}&mallId=${mallId}&assessmentId=${this.assessmentId}&classId=${classId}&stopTime=${this.stopTime}`;
} else if (curriculumId == 12) {
//
window.open(`http://${Setting.zcPath}?systemId=${this.systemId}&courseId=${this.cid}&projectId=${this.projectId}&token=${token}&userId=${this.userId}&assessmentId=${this.assessmentId}&classId=${classId}&mallId=${mallId}${Setting.isTest ? '&beta=1' : ''}`);
} else if (curriculumId == 19) {
//
href = `${Setting.sandPath}/#/?curriculumName=${row.sysName}&token=${token}&cid=${this.cid}&mallId=${mallId}&systemId=${this.systemId}&projectId=${this.projectId}&assessmentId=${this.assessmentId}&classId=${classId}&startTime=${row.startTime}&stopTime=${row.stopTime}&userId=${this.userId}&account=${this.account}&referrer=${encodeURIComponent(location.href)}`
const { curriculumId, paperId, mallId } = row
//
if (paperId) {
window.open(this.$router.resolve(`/match/theoryExam?paperId=${paperId}&assessmentId=${this.assessmentId}&classId=${classId}&cid=${this.cid}&mallId=${mallId}&curriculumName=${row.sysName}`).href)
} else {
if (process.env.NODE_ENV === 'development') {
href = 'http://192.168.31.125:8085/#/'
//
util.cookies.set("token", token)
util.cookies.set("assessmentId", this.assessmentId)
util.cookies.set("classId", classId)
util.cookies.set("className", classItem ? classItem.className : '')
util.cookies.set("projectId", this.projectId)
util.cookies.set("courseId", this.cid)
util.cookies.set("curriculumName", encodeURIComponent(row.sysName));
util.cookies.set("startTime", row.startTime)
util.cookies.set("stopTime", row.stopTime)
util.cookies.set("systemId", this.systemId);
util.cookies.set('mallId', mallId)
util.cookies.set('fromManager', '', -1)
util.cookies.set('competitionId', '', -1)
util.cookies.set('isSubmit', '', -1)
util.cookies.set('language', '', -1)
let href = ''
if (curriculumId == 11) {
href = `${Setting.systemPath}/#/index/list?token=${token}&cid=${this.cid}&systemId=${this.systemId}&projectId=${this.projectId}&mallId=${mallId}&assessmentId=${this.assessmentId}&classId=${classId}&stopTime=${this.stopTime}`;
} else if (curriculumId == 12) {
//
window.open(`http://${Setting.zcPath}?systemId=${this.systemId}&courseId=${this.cid}&projectId=${this.projectId}&token=${token}&userId=${this.userId}&assessmentId=${this.assessmentId}&classId=${classId}&mallId=${mallId}${Setting.isTest ? '&beta=1' : ''}`);
} else if (curriculumId == 19) {
//
href = `${Setting.sandPath}/#/?curriculumName=${row.sysName}&token=${token}&cid=${this.cid}&mallId=${mallId}&systemId=${this.systemId}&projectId=${this.projectId}&assessmentId=${this.assessmentId}&classId=${classId}&startTime=${row.startTime}&stopTime=${row.stopTime}&userId=${this.userId}&account=${this.account}&referrer=${encodeURIComponent(location.href)}`
} else {
href = `${location.origin}/pyTrials` // 8pythoncookiesystemId
if (process.env.NODE_ENV === 'development') {
href = 'http://192.168.31.125:8085/#/'
} else {
href = `${location.origin}/pyTrials` // 8pythoncookiesystemId
}
}
if (!href) return util.errorMsg("该考核非Python考核,请选择其他考核");
location.href = href;
}
if (!href) return util.errorMsg("该考核非Python考核,请选择其他考核");
location.href = href;
}
}
};
@ -510,26 +433,32 @@ export default {
<style lang="scss" scoped>
.wrap {
padding: 12px 60px 20px;
padding: 12px 60px 20px;
}
.page {
padding: 16px;
padding: 16px;
}
.filter {
display: flex;
width: auto;
flex-wrap: wrap;
li {
margin-bottom: 16px;
}
display: flex;
width: auto;
flex-wrap: wrap;
li {
margin-bottom: 16px;
}
}
/deep/ .el-tabs__nav-wrap::after {
display: none;
display: none;
}
.el-radio.is-bordered + .el-radio.is-bordered {
margin-left: 0;
.el-radio.is-bordered+.el-radio.is-bordered {
margin-left: 0;
}
.el-radio-group {
white-space: nowrap;
white-space: nowrap;
}
</style>

@ -784,7 +784,8 @@ export default {
this.getTeam()
},
methods: {
async getData () { //
//
async getData () {
clearInterval(this.timer)
const { competition } = await this.$post(`${this.api.getCompetition}?competitionId=${this.id}`)
const list = competition.competitionAnnexList

@ -264,13 +264,14 @@
<el-dialog title="创建团队" :visible.sync="teamVisible" :close-on-click-modal="false" width="300px">
<el-form class="dia-form">
<el-form-item>
<el-input placeholder="请输入团队名称" maxlength="10" v-model="teamForm.teamName"></el-input>
<el-input placeholder="请输入团队名称" maxlength="10" v-model.trim="teamForm.teamName"></el-input>
</el-form-item>
<el-form-item>
<el-input placeholder="请输入6位数团队邀请码" maxlength="6" v-model="teamForm.invitationCode"></el-input>
<el-input placeholder="请输入6位数团队邀请码" maxlength="6" v-model.trim="teamForm.invitationCode"></el-input>
</el-form-item>
<el-form-item v-if="curItem.isNeedCode">
<el-input placeholder="请输入4位数大赛邀请码" maxlength="4" v-model="teamForm.registrationInvitationCode"></el-input>
<el-input placeholder="请输入4位数大赛邀请码" maxlength="4"
v-model.trim="teamForm.registrationInvitationCode"></el-input>
</el-form-item>
</el-form>
<span slot="footer" class="dialog-footer">

@ -2,15 +2,18 @@
<div class="index" v-loading="loading || submiting">
<div class="top">
<div class="item">
<p class="names">{{ curStage.stageName }}{{ curStage.paperName }}</p>
<div class="count m-l-30">
阶段剩余时间
<span>{{ counterVal.day }}</span>
<span>{{ counterVal.hour }}</span>小时
<span>{{ counterVal.minutes }}</span>
<span>{{ counterVal.seconds }}</span>
</div>
<p v-if="paperId" class="names">{{ curriculumName }}</p>
<template v-else>
<p class="names">{{ curStage.stageName }}{{ curStage.paperName }}</p>
<div class="count m-l-30">
阶段剩余时间
<span>{{ counterVal.day }}</span>
<span>{{ counterVal.hour }}</span>小时
<span>{{ counterVal.minutes }}</span>
<span>{{ counterVal.seconds }}</span>
</div>
</template>
</div>
<div class="item">
@ -22,6 +25,7 @@
<span>{{ timeSum.seconds }}</span>
</div>
<el-button v-if="per === 0" class="submit" type="danger" @click="reload">重新开始</el-button>
<el-button class="submit" :loading="submiting" :disabled="submited" @click="confirmSubmit">提交</el-button>
<img class="exit" src="@/assets/img/exit.svg" alt="" @click="close">
</div>
@ -157,7 +161,7 @@ export default {
data () {
return {
loading: false,
per: 2, // (0 1 2)
per: 0, // (0 1 2)
questionTypes: QuesConst.questionTypes,
numToLetter: Util.numToLetter,
arabicToChinese: Util.arabicToChinese,
@ -165,6 +169,12 @@ export default {
token: Util.local.get(Setting.tokenKey)
},
token: Util.local.get(Setting.tokenKey),
paperId: +this.$route.query.paperId, // id
cid: +this.$route.query.cid,
mallId: +this.$route.query.mallId,
curriculumName: this.$route.query.curriculumName,
assessmentId: this.$route.query.assessmentId, // id
classId: this.$route.query.classId,
id: +this.$route.query.id, // id
stageId: +this.$route.query.stageId,
teamId: this.$route.query.teamId || '',
@ -218,7 +228,8 @@ export default {
this.getCompetition()
})
this.getCompetition(1)
this.per = this.id ? 2 : this.assessmentId ? 1 : 0
this.paperId ? this.getPracticePaper() : this.getCompetition(1)
this.initOss()
},
methods: {
@ -243,12 +254,12 @@ export default {
this.submit(1, 1)
} else { //
this.countVal = (endTime - now) / 1000
load && this.getPaper(now)
load && this.getCompetitionPaper(now)
}
}
},
//
async getPaper (now) {
//
async getCompetitionPaper (now) {
try {
const { paperId, stageId } = this.curStage
if (paperId) {
@ -271,100 +282,127 @@ export default {
}
this.startCount()
const r = examPaper
const paper = r.paperOutline
const types = this.questionTypes
paper.map(e => {
const type = e.questionType
e.questionTypeName = types.find(n => n.id === type).name
e.shrink = false
e.examQuestions.map(n => {
Object.assign(n, n.question)
const curQues = cacheQues.find(m => m.outlineId === e.outlineId && m.questionVersionId === n.questionVersionId) //
n.sign = curQues ? curQues.sign : 0
const opts = n.questionAnswerVersionsList
if (type !== 'fill_blank' && type !== 'essay' && opts) { //
opts.map(m => {
m.answer = curQues && curQues.answer && curQues.answer.length && curQues.answer.some(n => n == m.optionNumber) ? 1 : 0
})
if (opts.some(m => m.answer)) n.answered = 1
} else if (type === 'fill_blank') { //
n.fills = curQues && curQues.answer && curQues.answer.length && curQues.answer.some(m => m) ? curQues.answer : ''
let { answerData } = opts[0]
if (answerData) answerData = JSON.parse(answerData)
n.answered = n.fills && answerData && answerData.length === n.fills.filter(m => m).length ? 1 : 0
n.partAnswer = n.fills && answerData && answerData.length !== n.fills.filter(m => m).length ? 1 : 0
n.stem = this.getQuesStem(n)
} else if (type === 'essay') { //
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) {
n.uploadList = [{
name: n.attachmentName || url,
url
}]
}
if (n.answer || url) n.answered = 1
this.handlePaper(examPaper, cacheQues)
}
} catch (e) {
this.loading = false
}
},
//
async getPracticePaper () {
try {
const { paperId } = this
if (paperId) {
this.loading = true
//
const { examPaper } = await this.$get(this.api.examPaperDetails, { id: paperId })
const now = await Util.getNow()
this.entryTime = now
this.startCount()
this.handlePaper(examPaper)
}
} catch (e) {
this.loading = false
}
},
//
async handlePaper (r, cacheQues) {
try {
const paper = r.paperOutline
const types = this.questionTypes
paper.map(e => {
const type = e.questionType
e.questionTypeName = types.find(n => n.id === type).name
e.shrink = false
e.examQuestions.map(n => {
Object.assign(n, n.question)
const curQues = cacheQues ? cacheQues.find(m => m.outlineId === e.outlineId && m.questionVersionId === n.questionVersionId) : {} //
n.sign = curQues ? curQues.sign : 0
const opts = n.questionAnswerVersionsList
if (type !== 'fill_blank' && type !== 'essay' && opts) { //
opts.map(m => {
m.answer = curQues && curQues.answer && curQues.answer.length && curQues.answer.some(n => n == m.optionNumber) ? 1 : 0
})
if (opts.some(m => m.answer)) n.answered = 1
} else if (type === 'fill_blank') { //
n.fills = curQues && curQues.answer && curQues.answer.length && curQues.answer.some(m => m) ? curQues.answer : ''
let { answerData } = opts[0]
if (answerData) answerData = JSON.parse(answerData)
n.answered = n.fills && answerData && answerData.length === n.fills.filter(m => m).length ? 1 : 0
n.partAnswer = n.fills && answerData && answerData.length !== n.fills.filter(m => m).length ? 1 : 0
n.stem = this.getQuesStem(n)
} else if (type === 'essay') { //
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) {
n.uploadList = [{
name: n.attachmentName || url,
url
}]
}
if (n.answer || url) n.answered = 1
}
})
this.form = r
this.loading = false
})
this.form = r
console.log("🚀 ~ handlePaper ~ this.form:", this.form)
this.loading = false
// input
this.$nextTick(() => {
cache || this.submit(0) //
paper.map(e => {
e.examQuestions.map(n => {
if (e.questionType === 'fill_blank') {
const stem = document.querySelector(`#stem` + n.id)
if (stem) {
const inputs = stem.querySelectorAll('.fill-input')
if (inputs) {
for (const e of inputs) {
e.addEventListener('input', () => {
const answers = []
let hasFillLen = 0
for (const e of inputs) {
const val = e.innerText
if (val) hasFillLen++
answers.push(val)
}
n.fills = answers
n.answered = hasFillLen === inputs.length ? 1 : 0
n.partAnswer = hasFillLen && hasFillLen !== inputs.length ? 1 : 0
clearTimeout(this.timer)
this.timer = setTimeout(() => {
this.submit(0)
this.calcProgress()
}, 500)
})
}
// input
this.$nextTick(() => {
if (!cacheQues && this.id) this.submit(0) //
paper.map(e => {
e.examQuestions.map(n => {
if (e.questionType === 'fill_blank') {
const stem = document.querySelector(`#stem` + n.id)
if (stem) {
const inputs = stem.querySelectorAll('.fill-input')
if (inputs) {
for (const e of inputs) {
e.addEventListener('input', () => {
const answers = []
let hasFillLen = 0
for (const e of inputs) {
const val = e.innerText
if (val) hasFillLen++
answers.push(val)
}
n.fills = answers
n.answered = hasFillLen === inputs.length ? 1 : 0
n.partAnswer = hasFillLen && hasFillLen !== inputs.length ? 1 : 0
clearTimeout(this.timer)
this.timer = setTimeout(() => {
this.submit(0)
this.calcProgress()
}, 500)
})
}
}
}
})
}
})
this.calcProgress()
})
}
this.calcProgress()
})
} catch (e) {
this.loading = false
}
},
//
handleCounter (counterTime, isCount) {
console.log("🚀 ~ handleCounter ~ counterTime, isCount:", counterTime, isCount)
let leave1 = counterTime % (24 * 3600) //
let leave2 = leave1 % 3600 //
let leave3 = leave2 % 60 //
@ -384,6 +422,7 @@ export default {
},
//
counter (counterTime) {
// debugger
if (counterTime <= 0) {
if (this.per) { // /
clearInterval(this.counterTimer)
@ -392,8 +431,8 @@ export default {
this.handleCounter(counterTime, 1)
}
} else {
// 15
if (counterTime === 900) {
// 15
if (this.per === 2 && counterTime === 900) {
this.warned || this.$alert(`请注意,${this.per == 2 ? '比赛' : '考核'}还剩15分钟,请尽快完成答题并提交试卷。`, '提示', {
confirmButtonText: '确定',
type: 'warning'
@ -407,7 +446,7 @@ export default {
startCount () {
clearInterval(this.counterTimer)
this.counterTimer = setInterval(() => {
this.counter(this.per ? this.countVal-- : this.countVal++)
this.id && this.counter(this.countVal--)
this.timeSumVal >= 0 && this.handleCounter(this.timeSumVal++)
}, 1000)
},
@ -596,6 +635,24 @@ export default {
answerAnalysisReady (editor) {
this.answerAnalysis && editor.setContent(this.answerAnalysis)
},
//
async reload () {
//
if (this.submited) {
location.reload()
} else {
try {
await this.$confirm('<p style="color: #f56c6c;">点击重新开始,之前操作会清空。</p><p>确定重新开始吗?</p>', '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
closeOnClickModal: false,
dangerouslyUseHTMLString: true,
})
location.reload()
} catch (e) { }
}
},
//
async confirmSubmit () {
if (this.submiting) return false
@ -619,7 +676,7 @@ export default {
},
//
async submit (isSubmit, autoSubmit) {
if (isSubmit && this.submiting) return false
if ((isSubmit && this.submiting) || (!isSubmit && this.paperId)) return false
try {
if (isSubmit) this.submiting = true
const form = _.cloneDeep(this.form)
@ -667,8 +724,18 @@ export default {
data.submitTime = submitTime
data.timeSum = Math.ceil((now - entryTime) / 60000) //
//
if (this.paperId) {
data.cid = this.cid
data.paperId = this.paperId
data.mallId = this.mallId
}
if (this.assessmentId) {
data.assessmentId = this.assessmentId
data.classId = this.classId
}
//
await this.$post(this.api[isSubmit ? 'submitTheExamPaper' : 'examPaperRecordCache'], data)
await this.$post(this.api[this.assessmentId ? 'submitTheExamPaperForAssessment' : this.paperId ? 'submitTheExamPaperForPractice' : isSubmit ? 'submitTheExamPaper' : 'examPaperRecordCache'], data)
if (isSubmit) {
window.opener && window.opener.location.reload()
@ -698,6 +765,14 @@ export default {
this.close()
}
})
} else if (this.assessmentId) {
this.$alert('提交成功!', '提示', {
confirmButtonText: '确定',
type: 'success',
callback: () => {
this.close()
}
})
} else {
this.$message.success('提交成功!')
}

@ -58,6 +58,7 @@ export default {
],
curriculumId: this.$route.query.curriculumId,
projectId: this.$route.query.projectId,
paperId: this.$route.query.paperId,
listData: [],
total: 0,
page: +this.$route.query.page || 1,
@ -77,7 +78,7 @@ export default {
this.$router.back();
},
getData () {
this.$post(`${this.api.practiceByStudentDetail}?curriculumId=${this.curriculumId}&projectId=${this.projectId}&pageNum=${this.page}&pageSize=${this.pageSize}`).then(res => {
this.$post(`${this.api.practiceByStudentDetail}?curriculumId=${this.curriculumId}&projectId=${this.projectId}&paperId=${this.paperId}&pageNum=${this.page}&pageSize=${this.pageSize}`).then(res => {
this.listData = res.data.records;
this.total = res.data.total;
}).catch(err => { });
@ -122,8 +123,8 @@ export default {
}
},
toReport (row) {
this.$store.commit('project/setListReferrer', `${this.$route.path}?curriculumId=${this.curriculumId}&projectId=${this.projectId}&page=${this.page}`)
this.$router.push(`/record/trialReport?reportId=${row.reportId}`);
this.$store.commit('project/setListReferrer', `${this.$route.path}?curriculumId=${this.curriculumId}&projectId=${this.projectId}&paperId=${this.paperId}&page=${this.page}`)
this.$router.push(`/record/${row.paperId ? 'theoryReport' : 'trialReport'}?reportId=${row.reportId}`);
}
}
};

@ -3,8 +3,7 @@
<div class="wrap">
<div class="block overview">
<h6 class="l-title">
<img src="@/assets/img/record5.png"
alt="">
<img src="@/assets/img/record5.png" alt="">
实验概览
</h6>
<div class="nums">
@ -32,47 +31,29 @@
<div class="block record">
<h6 class="l-title">
<img src="@/assets/img/record6.png"
alt="">
<img src="@/assets/img/record6.png" alt="">
实验记录明细
</h6>
<div class="tool">
<ul class="filter"
style="justify-content: space-between;">
<ul class="filter" style="justify-content: space-between;">
<div class="tabs">
<a class="item"
v-for="(item, i) in tabs"
:key="i"
:class="{active: item.id == active}"
@click="tabChange(item.id)">{{ item.name }}</a>
<a class="item" v-for="(item, i) in tabs" :key="i" :class="{ active: item.id == active }"
@click="tabChange(item.id)">{{ item.name }}</a>
</div>
<li style="margin-right: 0">
<label>课程选择</label>
<el-select v-model="mallId"
@change="curChange">
<el-option v-for="(item, i) in curs"
:key="i"
:label="item.curriculumName"
:value="item.mallId"></el-option>
<el-select v-model="mallId" @change="curChange">
<el-option v-for="(item, i) in curs" :key="i" :label="item.curriculumName"
:value="item.mallId"></el-option>
</el-select>
<el-button style="margin-left: 20px;"
type="primary"
@click="exportData">导出数据</el-button>
<el-button style="margin-left: 20px;" type="primary" @click="exportData">导出数据</el-button>
</li>
</ul>
</div>
<practice v-if="!active"
ref="list0"
:mallId.sync="mallId"
:curriculumId.sync="curriculumId"
:key="1"></practice>
<ass v-else
ref="list1"
:curriculumId.sync="curriculumId"
:mallId.sync="mallId"
:key="2"></ass>
<practice v-if="!active" ref="list0" :mallId.sync="mallId" :curriculumId.sync="curriculumId" :key="1"></practice>
<ass v-else ref="list1" :curriculumId.sync="curriculumId" :mallId.sync="mallId" :key="2"></ass>
</div>
</div>
</template>
@ -82,7 +63,7 @@ import practice from "./practice";
import ass from "./ass";
import axios from 'axios';
import Setting from "@/setting";
import util from "@/libs/util";
import Util from "@/libs/util";
export default {
components: {
practice,
@ -112,7 +93,7 @@ export default {
name: '考核'
},
],
token: util.local.get(Setting.tokenKey),
token: Util.local.get(Setting.tokenKey),
};
},
created () {
@ -150,7 +131,7 @@ export default {
}).catch(err => { })
},
exportData () { //
if (this.active == "practice") {
if (!this.active) {
//
axios.get(`${this.api.exportPracticeByStudent}?curriculumId=${this.curriculumId}`, {
headers: {
@ -158,7 +139,8 @@ export default {
},
responseType: 'blob'
}).then((res) => {
util.downloadFileDirect(`学生练习成绩.xls`, new Blob([res.data]))
const name = res.headers['content-disposition']
Util.downloadFileDirect(name ? decodeURI(name) : '学生练习成绩.xls', new Blob([res.data]))
}).catch(res => { })
} else {
//
@ -168,7 +150,8 @@ export default {
},
responseType: 'blob'
}).then((res) => {
util.downloadFileDirect(`学生考核成绩.xls`, new Blob([res.data]))
const name = res.headers['content-disposition']
Util.downloadFileDirect(name ? decodeURI(name) : '学生考核成绩.xls', new Blob([res.data]))
}).catch(res => { })
}
},
@ -185,75 +168,88 @@ export default {
<style lang="scss" scoped>
.wrap {
padding: 12px 100px 20px;
padding: 12px 100px 20px;
}
.block {
padding: 16px;
margin-bottom: 12px;
background: #fff;
padding: 16px;
margin-bottom: 12px;
background: #fff;
}
.overview {
.nums {
display: flex;
justify-content: space-between;
.item:nth-child(1) {
background: url(../../../assets/img/record1-1.png) (88% 25px) / auto no-repeat,
url(../../../assets/img/record1.png) 0 0/100% 100% no-repeat;
}
.item:nth-child(2) {
background: url(../../../assets/img/record2-1.png) (88% 15px) / auto no-repeat,
url(../../../assets/img/record2.png) 0 0/100% 100% no-repeat;
}
.item:nth-child(3) {
background: url(../../../assets/img/record3-1.png) (88% 20px) / auto no-repeat,
url(../../../assets/img/record3.png) 0 0/100% 100% no-repeat;
}
.item:nth-child(4) {
margin-right: 0;
background: url(../../../assets/img/record4-1.png) (88% 18px) / auto no-repeat,
url(../../../assets/img/record4.png) 0 0/100% 100% no-repeat;
}
.item {
width: 22%;
min-width: 250px;
padding: 27px;
.name {
margin-top: 12px;
color: #fff;
font-size: 14px;
}
.val {
font-size: 26px;
color: #fff;
}
}
.nums {
display: flex;
justify-content: space-between;
.item:nth-child(1) {
background: url(../../../assets/img/record1-1.png) (88% 25px) / auto no-repeat,
url(../../../assets/img/record1.png) 0 0/100% 100% no-repeat;
}
.item:nth-child(2) {
background: url(../../../assets/img/record2-1.png) (88% 15px) / auto no-repeat,
url(../../../assets/img/record2.png) 0 0/100% 100% no-repeat;
}
.item:nth-child(3) {
background: url(../../../assets/img/record3-1.png) (88% 20px) / auto no-repeat,
url(../../../assets/img/record3.png) 0 0/100% 100% no-repeat;
}
.item:nth-child(4) {
margin-right: 0;
background: url(../../../assets/img/record4-1.png) (88% 18px) / auto no-repeat,
url(../../../assets/img/record4.png) 0 0/100% 100% no-repeat;
}
.item {
width: 22%;
min-width: 250px;
padding: 27px;
.name {
margin-top: 12px;
color: #fff;
font-size: 14px;
}
.val {
font-size: 26px;
color: #fff;
}
}
}
}
.record {
.tool {
display: flex;
justify-content: space-between;
margin-bottom: 16px;
}
.tool {
display: flex;
justify-content: space-between;
margin-bottom: 16px;
}
}
.tabs {
display: inline-flex;
align-items: center;
.item {
width: 80px;
margin-right: 16px;
text-align: center;
color: #666;
line-height: 34px;
border-radius: 4px;
background-color: #fff;
border: 1px solid #cacfdb;
cursor: pointer;
&.active {
color: #fff;
background-color: $main-color;
border-color: $main-color;
}
display: inline-flex;
align-items: center;
.item {
width: 80px;
margin-right: 16px;
text-align: center;
color: #666;
line-height: 34px;
border-radius: 4px;
background-color: #fff;
border: 1px solid #cacfdb;
cursor: pointer;
&.active {
color: #fff;
background-color: $main-color;
border-color: $main-color;
}
}
}
</style>

@ -1,51 +1,22 @@
<template>
<div>
<el-table :data="listData"
v-loading="loading"
stripe>
<el-table-column prop="id"
label="次序"
width="60"
align="center"
type="index"></el-table-column>
<el-table-column prop="curriculumName"
label="课程名称"
align="center"></el-table-column>
<el-table-column prop="projectName"
label="实验项目名称"
align="center"></el-table-column>
<el-table-column prop="hightScore"
width="120"
label="实验最高得分"
align="center"></el-table-column>
<el-table-column prop="practiceNum"
label="练习次数"
width="80"
align="center"></el-table-column>
<el-table-column prop="duration"
width="140"
label="累计实验时长(小时)"
align="center"></el-table-column>
<el-table-column prop="lastTime"
width="160"
label="最近实验时间"
align="center"></el-table-column>
<el-table-column prop="creationTime"
width="90"
label="操作"
align="center">
<el-table :data="listData" v-loading="loading" stripe>
<el-table-column prop="id" label="次序" width="60" align="center" type="index"></el-table-column>
<el-table-column prop="curriculumName" label="课程名称" align="center"></el-table-column>
<el-table-column prop="projectName" label="实验项目名称" align="center"></el-table-column>
<el-table-column prop="hightScore" width="120" label="实验最高得分" align="center"></el-table-column>
<el-table-column prop="practiceNum" label="练习次数" width="80" align="center"></el-table-column>
<el-table-column prop="duration" width="140" label="累计实验时长(小时)" align="center"></el-table-column>
<el-table-column prop="lastTime" width="160" label="最近实验时间" align="center"></el-table-column>
<el-table-column prop="creationTime" width="90" label="操作" align="center">
<template slot-scope="scope">
<el-button type="text"
@click="toDetails(scope.row)">实验情况</el-button>
<el-button type="text" @click="toDetails(scope.row)">实验情况</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background
:current-page="page"
layout="total, prev, pager, next"
:total="total"
@current-change="handleCurrentChange"></el-pagination>
<el-pagination background :current-page="page" layout="total, prev, pager, next" :total="total"
@current-change="handleCurrentChange"></el-pagination>
</div>
</div>
</template>
@ -108,11 +79,10 @@ export default {
},
toDetails (row) {
this.$store.commit('project/setReferrer', `${this.$route.path}?mallId=${this.mallId}&curriculumId=${this.curriculumId}&active=${this.$parent.active}&page=${this.page}`)
this.$router.push(`/record/details?curriculumId=${row.curriculumId}&projectId=${row.projectId}`);
this.$router.push(`/record/details?curriculumId=${row.curriculumId}&projectId=${row.projectId || ''}&paperId=${row.paperId || ''}`);
}
}
};
</script>
<style lang="scss" scoped>
</style>
<style lang="scss" scoped></style>

@ -246,7 +246,7 @@
<h6 class="title">练习成绩排行</h6>
<el-select style="width: 100%" v-model="archProject" placeholder="请选择" @change="getMaximumScore">
<el-option v-for="(item, i) in progressList" :key="i" :label="item.projectName"
:value="item.projectId"></el-option>
:value="item.uuid"></el-option>
</el-select>
<div v-if="maximumScores.length" class="arches">
<div v-for="(item, i) in maximumScores" :key="i" class="line">
@ -497,9 +497,12 @@ export default {
//
async getProgress () {
if (this.courseId) {
let res = await this.$post(`${this.api.courseLearningProgress}?courseId=${this.courseId}&systemId=${this.systemIds}&mallId=${this.mallId}`);
let res = await this.$post(`${this.api.courseLearningProgress}?courseId=${this.courseId}&systemId=${this.systemIds}&mallId=${this.mallId}`)
res.list.forEach(e => {
e.uuid = e.projectId || e.paperId
})
this.progressList = res.list
if (res.list.length) this.archProject = res.list[0].projectId
if (res.list.length) this.archProject = res.list[0].uuid
this.maximumScores.length || this.getMaximumScore()
this.plan = res.plan
this.schedule = +(res.schedule.replace('%', ''))
@ -507,7 +510,8 @@ export default {
},
//
async getMaximumScore () {
let { message } = await this.$post(`${this.api.maximumPracticeScoreList}?projectId=${this.archProject}&pageNum=1&pageSize=1000&mallId=${this.mallId}&cid=${this.courseId}`);
const item = this.progressList.find(e => e.uuid === this.archProject)
let { message } = await this.$post(`${this.api.maximumPracticeScoreList}?projectId=${item.projectId || ''}&paperId=${item.paperId || ''}&pageNum=1&pageSize=1000&mallId=${this.mallId}&cid=${this.courseId}`);
const list = message.records
list.forEach(e => {
if (!e.userAvatars) e.userAvatars = 'https://cube.elemecdn.com/3/7c/3ea6beec64369c2642b92c6726f1epng.png'
@ -695,7 +699,8 @@ export default {
}).catch(res => { }) :
this.$post(this.api.saveLearningProgress, {
cid: this.courseId,
projectId: item.projectId,
projectId: item.projectId || '',
paperId: item.paperId || '',
}).then(res => {
this.getProgress()
}).catch(res => { })
@ -909,26 +914,32 @@ export default {
},
//
async toSub () {
let curProject = this.projects.find(e => e.projectId == this.curProject)
if (!curProject && this.projects.length) {
curProject = this.projects[0]
this.curProject = curProject.projectId
}
const { systemId } = curProject
let token = Util.local.get(Setting.tokenKey)
this.third = curProject.type === 2 ? (curProject.systemId === 28 ? 'low' : 'ai') : ''
if (systemId == 11) {
//
location.href = `${Setting.systemPath}/#/index/list?curriculumName=${this.curriculumName}&token=${token}&cid=${this.courseId}&mallId=${this.mallId}&systemId=${this.systemIds}&projectId=${this.curProject}&assessmentId=&classId=&stopTime=&test=true`
} else if (systemId == 12) {
//
window.open(`http://${Setting.zcPath}?systemId=${systemId}&courseId=${this.courseId}&projectId=${this.curProject}&token=${token}&userId=${this.userId}&classId=1&mallId=${this.mallId}${Setting.isTest ? '&beta=1' : ''}`);
} else if (systemId == 19) {
//
location.href = `${Setting.sandPath}/#/?curriculumName=${this.curriculumName}&token=${token}&cid=${this.courseId}&mallId=${this.mallId}&systemId=${this.systemIds}&projectId=${this.curProject}&assessmentId=&classId=&stopTime=&referrer=${encodeURIComponent(location.href)}`
//
if (this.isTheory) {
window.open(this.$router.resolve(`/match/theoryExam?paperId=${this.curPaper}&cid=${this.courseId}&mallId=${this.mallId}&curriculumName=${this.curriculumName}`).href)
} else {
// python
this.toPython(this.curProject)
//
let curProject = this.projects.find(e => e.projectId == this.curProject)
if (!curProject && this.projects.length) {
curProject = this.projects[0]
this.curProject = curProject.projectId
}
const { systemId } = curProject
let token = Util.local.get(Setting.tokenKey)
this.third = curProject.type === 2 ? (curProject.systemId === 28 ? 'low' : 'ai') : ''
if (systemId == 11) {
//
location.href = `${Setting.systemPath}/#/index/list?curriculumName=${this.curriculumName}&token=${token}&cid=${this.courseId}&mallId=${this.mallId}&systemId=${this.systemIds}&projectId=${this.curProject}&assessmentId=&classId=&stopTime=&test=true`
} else if (systemId == 12) {
//
window.open(`http://${Setting.zcPath}?systemId=${systemId}&courseId=${this.courseId}&projectId=${this.curProject}&token=${token}&userId=${this.userId}&classId=1&mallId=${this.mallId}${Setting.isTest ? '&beta=1' : ''}`);
} else if (systemId == 19) {
//
location.href = `${Setting.sandPath}/#/?curriculumName=${this.curriculumName}&token=${token}&cid=${this.courseId}&mallId=${this.mallId}&systemId=${this.systemIds}&projectId=${this.curProject}&assessmentId=&classId=&stopTime=&referrer=${encodeURIComponent(location.href)}`
} else {
// python
this.toPython(this.curProject)
}
}
},
}

@ -259,19 +259,6 @@ export default {
this.$router.push(`/station/preview?courseId=${this.form.mall.associatedProduct}&curriculumName=${this.form.mall.productName}&mallId=${this.id}&chapter=${i}&section=${j}&admin=1`) :
this.toTrail()
},
// /
studySection (item) {
item.whetherToStudyOrNot ?
this.$post(`${this.api.deleteLearningProgress}?id=${item.learningProgressId}`).then(res => {
this.getChapter()
}).catch(res => { }) :
this.$post(this.api.saveLearningProgress, {
cid: this.form.mall.associatedProduct,
projectId: item.projectId,
}).then(res => {
this.getChapter()
}).catch(res => { })
},
//
toTrail () {
window.open('https://www.wjx.top/vm/wFCPCFp.aspx')

Loading…
Cancel
Save