|
@@ -36,11 +36,7 @@
|
|
|
</div>
|
|
</div>
|
|
|
<div class="info-item">
|
|
<div class="info-item">
|
|
|
<span class="label">得分:</span>
|
|
<span class="label">得分:</span>
|
|
|
- <span class="value">{{
|
|
|
|
|
- paperData.status !== "已完成"
|
|
|
|
|
- ? "未评分"
|
|
|
|
|
- : `${paperData.resultScore}分`
|
|
|
|
|
- }}</span>
|
|
|
|
|
|
|
+ <span class="value">{{ paperData.status !== '已完成' ? '未评分' : `${paperData.resultScore}分` }}</span>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="info-item">
|
|
<div class="info-item">
|
|
|
<span class="label">报考时间:</span>
|
|
<span class="label">报考时间:</span>
|
|
@@ -81,8 +77,7 @@
|
|
|
class="question-item"
|
|
class="question-item"
|
|
|
>
|
|
>
|
|
|
<div v-if="item.questions.length > 0" class="type">
|
|
<div v-if="item.questions.length > 0" class="type">
|
|
|
- {{ item.type
|
|
|
|
|
- }}<el-tag
|
|
|
|
|
|
|
+ {{ item.type }}<el-tag
|
|
|
v-if="paperStatus === 'all'"
|
|
v-if="paperStatus === 'all'"
|
|
|
type="primary"
|
|
type="primary"
|
|
|
size="small"
|
|
size="small"
|
|
@@ -96,9 +91,7 @@
|
|
|
>
|
|
>
|
|
|
<div class="stem">
|
|
<div class="stem">
|
|
|
<span>{{ `【${qIndex + 1}】${q.stem}` }}</span>
|
|
<span>{{ `【${qIndex + 1}】${q.stem}` }}</span>
|
|
|
- <el-tag type="primary" size="small">{{
|
|
|
|
|
- `${q.questionScore}分`
|
|
|
|
|
- }}</el-tag>
|
|
|
|
|
|
|
+ <el-tag type="primary" size="small">{{ `${q.questionScore}分` }}</el-tag>
|
|
|
</div>
|
|
</div>
|
|
|
<div v-if="q.img && q.img.length" class="img">
|
|
<div v-if="q.img && q.img.length" class="img">
|
|
|
<ibps-image
|
|
<ibps-image
|
|
@@ -122,30 +115,21 @@
|
|
|
}}</el-tag>
|
|
}}</el-tag>
|
|
|
</div>
|
|
</div>
|
|
|
<div class="answer-content">
|
|
<div class="answer-content">
|
|
|
- <el-radio-group
|
|
|
|
|
- v-if="q.questionType === '单选题'"
|
|
|
|
|
- :value="q.answer"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <el-radio-group v-if="q.questionType === '单选题'" :value="q.answer">
|
|
|
<el-radio
|
|
<el-radio
|
|
|
v-for="(o, i) in q.options"
|
|
v-for="(o, i) in q.options"
|
|
|
:key="`${index}${qIndex}${i}`"
|
|
:key="`${index}${qIndex}${i}`"
|
|
|
:label="o.label"
|
|
:label="o.label"
|
|
|
>{{ `${o.label}.${o.value}` }}</el-radio>
|
|
>{{ `${o.label}.${o.value}` }}</el-radio>
|
|
|
</el-radio-group>
|
|
</el-radio-group>
|
|
|
- <el-checkbox-group
|
|
|
|
|
- v-else-if="q.questionType === '多选题'"
|
|
|
|
|
- :value="q.answer"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <el-checkbox-group v-else-if="q.questionType === '多选题'" :value="q.answer">
|
|
|
<el-checkbox
|
|
<el-checkbox
|
|
|
v-for="(o, i) in q.options"
|
|
v-for="(o, i) in q.options"
|
|
|
:key="`${index}${qIndex}${i}`"
|
|
:key="`${index}${qIndex}${i}`"
|
|
|
:label="o.label"
|
|
:label="o.label"
|
|
|
>{{ `${o.label}.${o.value}` }}</el-checkbox>
|
|
>{{ `${o.label}.${o.value}` }}</el-checkbox>
|
|
|
</el-checkbox-group>
|
|
</el-checkbox-group>
|
|
|
- <el-radio-group
|
|
|
|
|
- v-else-if="q.questionType === '判断题'"
|
|
|
|
|
- :value="q.answer"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <el-radio-group v-else-if="q.questionType === '判断题'" :value="q.answer">
|
|
|
<el-radio-button label="√">√</el-radio-button>
|
|
<el-radio-button label="√">√</el-radio-button>
|
|
|
<el-radio-button label="×">×</el-radio-button>
|
|
<el-radio-button label="×">×</el-radio-button>
|
|
|
</el-radio-group>
|
|
</el-radio-group>
|
|
@@ -164,30 +148,21 @@
|
|
|
<div class="right">
|
|
<div class="right">
|
|
|
<div class="title">参考答案:</div>
|
|
<div class="title">参考答案:</div>
|
|
|
<div class="answer-content">
|
|
<div class="answer-content">
|
|
|
- <el-radio-group
|
|
|
|
|
- v-if="q.questionType === '单选题'"
|
|
|
|
|
- :value="q.rightKey"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <el-radio-group v-if="q.questionType === '单选题'" :value="q.rightKey">
|
|
|
<el-radio
|
|
<el-radio
|
|
|
v-for="(o, i) in q.options"
|
|
v-for="(o, i) in q.options"
|
|
|
:key="`${index}${qIndex}${i}`"
|
|
:key="`${index}${qIndex}${i}`"
|
|
|
:label="o.label"
|
|
:label="o.label"
|
|
|
>{{ `${o.label}.${o.value}` }}</el-radio>
|
|
>{{ `${o.label}.${o.value}` }}</el-radio>
|
|
|
</el-radio-group>
|
|
</el-radio-group>
|
|
|
- <el-checkbox-group
|
|
|
|
|
- v-else-if="q.questionType === '多选题'"
|
|
|
|
|
- :value="q.rightKey"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <el-checkbox-group v-else-if="q.questionType === '多选题'" :value="q.rightKey">
|
|
|
<el-checkbox
|
|
<el-checkbox
|
|
|
v-for="(o, i) in q.options"
|
|
v-for="(o, i) in q.options"
|
|
|
:key="`${index}${qIndex}${i}`"
|
|
:key="`${index}${qIndex}${i}`"
|
|
|
:label="o.label"
|
|
:label="o.label"
|
|
|
>{{ `${o.label}.${o.value}` }}</el-checkbox>
|
|
>{{ `${o.label}.${o.value}` }}</el-checkbox>
|
|
|
</el-checkbox-group>
|
|
</el-checkbox-group>
|
|
|
- <el-radio-group
|
|
|
|
|
- v-else-if="q.questionType === '判断题'"
|
|
|
|
|
- :value="q.rightKey"
|
|
|
|
|
- >
|
|
|
|
|
|
|
+ <el-radio-group v-else-if="q.questionType === '判断题'" :value="q.rightKey">
|
|
|
<el-radio-button label="√">√</el-radio-button>
|
|
<el-radio-button label="√">√</el-radio-button>
|
|
|
<el-radio-button label="×">×</el-radio-button>
|
|
<el-radio-button label="×">×</el-radio-button>
|
|
|
</el-radio-group>
|
|
</el-radio-group>
|
|
@@ -214,9 +189,7 @@
|
|
|
v-for="(paper, index) in paperList"
|
|
v-for="(paper, index) in paperList"
|
|
|
:key="index"
|
|
:key="index"
|
|
|
:timestamp="paper.applyTime"
|
|
:timestamp="paper.applyTime"
|
|
|
- :icon="
|
|
|
|
|
- paper.status === '已完成' ? 'el-icon-circle-check' : 'el-icon-view'
|
|
|
|
|
- "
|
|
|
|
|
|
|
+ :icon="paper.status === '已完成' ? 'el-icon-circle-check' : 'el-icon-view'"
|
|
|
:type="paper.status === '已完成' ? 'success' : 'primary'"
|
|
:type="paper.status === '已完成' ? 'success' : 'primary'"
|
|
|
placement="top"
|
|
placement="top"
|
|
|
size="large"
|
|
size="large"
|
|
@@ -313,23 +286,23 @@ export default {
|
|
|
set () {}, // 解决报错
|
|
set () {}, // 解决报错
|
|
|
get () {
|
|
get () {
|
|
|
const showPaperData = cloneDeep(this.paperData)
|
|
const showPaperData = cloneDeep(this.paperData)
|
|
|
- showPaperData.list?.forEach((papers) => {
|
|
|
|
|
- papers.questions = papers.questions.filter((paper) => {
|
|
|
|
|
- switch (this.paperStatus) {
|
|
|
|
|
- case 'all':
|
|
|
|
|
- return true
|
|
|
|
|
- case 'false':
|
|
|
|
|
- return paper.score && paper.score === '0'
|
|
|
|
|
- case 'true':
|
|
|
|
|
- return paper.score && paper.score !== '0'
|
|
|
|
|
- case 'noFinished':
|
|
|
|
|
- return paper.score === ''
|
|
|
|
|
- default:
|
|
|
|
|
- break
|
|
|
|
|
- }
|
|
|
|
|
- })
|
|
|
|
|
- })
|
|
|
|
|
- return showPaperData
|
|
|
|
|
|
|
+ showPaperData.list?.forEach((papers) => {
|
|
|
|
|
+ papers.questions = papers.questions.filter((paper) => {
|
|
|
|
|
+ switch (this.paperStatus) {
|
|
|
|
|
+ case 'all':
|
|
|
|
|
+ return true
|
|
|
|
|
+ case 'false':
|
|
|
|
|
+ return paper.score && paper.score === '0'
|
|
|
|
|
+ case 'true':
|
|
|
|
|
+ return paper.score && paper.score !== '0'
|
|
|
|
|
+ case 'noFinished':
|
|
|
|
|
+ return paper.score === ''
|
|
|
|
|
+ default:
|
|
|
|
|
+ break
|
|
|
|
|
+ }
|
|
|
|
|
+ })
|
|
|
|
|
+ })
|
|
|
|
|
+ return showPaperData
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
@@ -349,7 +322,7 @@ export default {
|
|
|
window.removeEventListener('keyup', this.handleKeyPress)
|
|
window.removeEventListener('keyup', this.handleKeyPress)
|
|
|
},
|
|
},
|
|
|
methods: {
|
|
methods: {
|
|
|
- // 获取题库数据
|
|
|
|
|
|
|
+ // 获取题库数据
|
|
|
async loadData () {
|
|
async loadData () {
|
|
|
if (!this.bankId) {
|
|
if (!this.bankId) {
|
|
|
this.$message.error('获取题目信息失败,请重试!')
|
|
this.$message.error('获取题目信息失败,请重试!')
|
|
@@ -357,8 +330,7 @@ export default {
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
this.paperList = await this.getQuestionData()
|
|
this.paperList = await this.getQuestionData()
|
|
|
- this.paperData =
|
|
|
|
|
- this.paperList.find((i) => i.dataId === this.id) || this.paperList[0]
|
|
|
|
|
|
|
+ this.paperData = this.paperList.find(i => i.dataId === this.id) || this.paperList[0]
|
|
|
this.showPaperId = this.paperData.dataId
|
|
this.showPaperId = this.paperData.dataId
|
|
|
|
|
|
|
|
const isAllNotFinish = this.paperList.every(item => item.status !== '已完成')
|
|
const isAllNotFinish = this.paperList.every(item => item.status !== '已完成')
|
|
@@ -384,139 +356,96 @@ export default {
|
|
|
},
|
|
},
|
|
|
transformUser (userId) {
|
|
transformUser (userId) {
|
|
|
const { userList = [] } = this.$store.getters
|
|
const { userList = [] } = this.$store.getters
|
|
|
- const user = userList.find((u) => u.userId === userId) || {}
|
|
|
|
|
|
|
+ const user = userList.find(u => u.userId === userId) || {}
|
|
|
return user.userName || '-'
|
|
return user.userName || '-'
|
|
|
},
|
|
},
|
|
|
getQuestionData () {
|
|
getQuestionData () {
|
|
|
- const param = this.examId
|
|
|
|
|
- ? `and e.exam_id_ = '${this.examId}'`
|
|
|
|
|
- : 'and e.exam_id_ is null'
|
|
|
|
|
|
|
+ const param = this.examId ? `and e.exam_id_ = '${this.examId}'` : 'and e.exam_id_ is null'
|
|
|
const sql = `select e.id_ as dataId, e.exam_id_ as examId, e.kao_shi_ren_ as examinee, e.bu_men_ as dept, e.zhuang_tai_ as status, e.bao_ming_shi_jian as applyTime, e.kai_shi_shi_jian_ as startTime, e.jie_shu_shi_jian_ as endTime, e.ti_ku_zong_fen_ as totalScore, e.de_fen_ as resultScore, ed.ti_mu_id_ as questionId, ed.ti_gan_ as stem, ed.ti_xing_ as questionType, ed.fen_zhi_ as questionScore, ed.fu_tu_ as img, ed.xuan_xiang_lei_xi as optionsType, ed.xuan_xiang_ as options, ed.can_kao_da_an_ as rightKey, ed.ping_fen_fang_shi as rateType, ed.ping_fen_ren_ as rater, ed.hui_da_ as answer, ed.ping_yue_shi_jian as rateTime, ed.de_fen_ as score, ed.jie_xi_ as analysis, q.ti_ku_ming_cheng_ as paperName, case when e.exam_id_ is not null then ex.da_biao_zhan_bi_ else q.da_biao_zhan_bi_ end as qualifiedRadio, case when e.exam_id_ is not null then ex.ji_fen_fang_shi_ else q.ji_fen_fang_shi_ end as scoringType, case when e.exam_id_ is not null then ex.kao_shi_ming_chen else '自主考核' end as examName, case when e.exam_id_ is not null then ex.xian_kao_shi_jian else '不限' end as limitDate from t_examination e left join t_examination_detail ed on e.id_ = ed.parent_id_ left join t_question_bank q on e.ti_ku_id_ = q.id_ left join t_exams ex on e.exam_id_ = ex.id_ where e.ti_ku_id_ = '${this.bankId}' ${param} and e.kao_shi_ren_ = '${this.examineeId}' and (e.zhuang_tai_ = '已完成' or e.zhuang_tai_ = '已交卷') order by field(ed.ti_xing_, '单选题', '多选题', '判断题', '填空题', '简答题')`
|
|
const sql = `select e.id_ as dataId, e.exam_id_ as examId, e.kao_shi_ren_ as examinee, e.bu_men_ as dept, e.zhuang_tai_ as status, e.bao_ming_shi_jian as applyTime, e.kai_shi_shi_jian_ as startTime, e.jie_shu_shi_jian_ as endTime, e.ti_ku_zong_fen_ as totalScore, e.de_fen_ as resultScore, ed.ti_mu_id_ as questionId, ed.ti_gan_ as stem, ed.ti_xing_ as questionType, ed.fen_zhi_ as questionScore, ed.fu_tu_ as img, ed.xuan_xiang_lei_xi as optionsType, ed.xuan_xiang_ as options, ed.can_kao_da_an_ as rightKey, ed.ping_fen_fang_shi as rateType, ed.ping_fen_ren_ as rater, ed.hui_da_ as answer, ed.ping_yue_shi_jian as rateTime, ed.de_fen_ as score, ed.jie_xi_ as analysis, q.ti_ku_ming_cheng_ as paperName, case when e.exam_id_ is not null then ex.da_biao_zhan_bi_ else q.da_biao_zhan_bi_ end as qualifiedRadio, case when e.exam_id_ is not null then ex.ji_fen_fang_shi_ else q.ji_fen_fang_shi_ end as scoringType, case when e.exam_id_ is not null then ex.kao_shi_ming_chen else '自主考核' end as examName, case when e.exam_id_ is not null then ex.xian_kao_shi_jian else '不限' end as limitDate from t_examination e left join t_examination_detail ed on e.id_ = ed.parent_id_ left join t_question_bank q on e.ti_ku_id_ = q.id_ left join t_exams ex on e.exam_id_ = ex.id_ where e.ti_ku_id_ = '${this.bankId}' ${param} and e.kao_shi_ren_ = '${this.examineeId}' and (e.zhuang_tai_ = '已完成' or e.zhuang_tai_ = '已交卷') order by field(ed.ti_xing_, '单选题', '多选题', '判断题', '填空题', '简答题')`
|
|
|
return new Promise((resolve, reject) => {
|
|
return new Promise((resolve, reject) => {
|
|
|
- this.$common
|
|
|
|
|
- .request('sql', sql)
|
|
|
|
|
- .then((res) => {
|
|
|
|
|
- const { data = [] } = res.variables || {}
|
|
|
|
|
- if (!data.length) {
|
|
|
|
|
- this.$message.error('未查询到已提交的考试记录,请先完成考试!')
|
|
|
|
|
- this.closeDialog()
|
|
|
|
|
- return
|
|
|
|
|
|
|
+ this.$common.request('sql', sql).then(res => {
|
|
|
|
|
+ const { data = [] } = res.variables || {}
|
|
|
|
|
+ if (!data.length) {
|
|
|
|
|
+ this.$message.error('未查询到已提交的考试记录,请先完成考试!')
|
|
|
|
|
+ this.closeDialog()
|
|
|
|
|
+ return
|
|
|
|
|
+ }
|
|
|
|
|
+ const result = []
|
|
|
|
|
+ data.map(item => {
|
|
|
|
|
+ // 数据转换
|
|
|
|
|
+ if (['单选题', '多选题'].includes(item.questionType)) {
|
|
|
|
|
+ item.options = JSON.parse(item.options)
|
|
|
|
|
+ item.rightKey = item.questionType === '多选题' ? item.rightKey.split(',') : item.rightKey
|
|
|
|
|
+ item.answer = item.questionType === '多选题' ? JSON.parse(item.answer) : item.answer
|
|
|
|
|
+ } else if (item.questionType === '填空题') {
|
|
|
|
|
+ item.rightKey = item.rightKey ? JSON.parse(item.rightKey) : []
|
|
|
|
|
+ item.answer = item.answer ? JSON.parse(item.answer) : Array(item.rightKey.length).fill('')
|
|
|
|
|
+ } else if (item.questionType === '简答题') {
|
|
|
|
|
+ item.rightKey = [item.rightKey]
|
|
|
|
|
+ item.answer = [item.answer]
|
|
|
}
|
|
}
|
|
|
- const result = []
|
|
|
|
|
- data.map((item) => {
|
|
|
|
|
- // 数据转换
|
|
|
|
|
- if (['单选题', '多选题'].includes(item.questionType)) {
|
|
|
|
|
- item.options = JSON.parse(item.options)
|
|
|
|
|
- item.rightKey =
|
|
|
|
|
- item.questionType === '多选题'
|
|
|
|
|
- ? item.rightKey.split(',')
|
|
|
|
|
- : item.rightKey
|
|
|
|
|
- item.answer =
|
|
|
|
|
- item.questionType === '多选题'
|
|
|
|
|
- ? JSON.parse(item.answer)
|
|
|
|
|
- : item.answer
|
|
|
|
|
- } else if (item.questionType === '填空题') {
|
|
|
|
|
- item.rightKey = item.rightKey ? JSON.parse(item.rightKey) : []
|
|
|
|
|
- item.answer = item.answer
|
|
|
|
|
- ? JSON.parse(item.answer)
|
|
|
|
|
- : Array(item.rightKey.length).fill('')
|
|
|
|
|
- } else if (item.questionType === '简答题') {
|
|
|
|
|
- item.rightKey = [item.rightKey]
|
|
|
|
|
- item.answer = [item.answer]
|
|
|
|
|
- }
|
|
|
|
|
- item.img = item.img ? JSON.parse(item.img) : ''
|
|
|
|
|
|
|
+ item.img = item.img ? JSON.parse(item.img) : ''
|
|
|
|
|
|
|
|
- // 数据分组
|
|
|
|
|
- const index = result.findIndex((i) => i.dataId === item.dataId)
|
|
|
|
|
- if (index === -1) {
|
|
|
|
|
- const {
|
|
|
|
|
- dataId,
|
|
|
|
|
- examinee,
|
|
|
|
|
- dept,
|
|
|
|
|
- status,
|
|
|
|
|
- applyTime,
|
|
|
|
|
- startTime,
|
|
|
|
|
- endTime,
|
|
|
|
|
- qualifiedRadio,
|
|
|
|
|
- paperName,
|
|
|
|
|
- totalScore,
|
|
|
|
|
- resultScore,
|
|
|
|
|
- scoringType
|
|
|
|
|
- } = item || {}
|
|
|
|
|
- result.push({
|
|
|
|
|
- dataId,
|
|
|
|
|
- examinee,
|
|
|
|
|
- dept,
|
|
|
|
|
- status,
|
|
|
|
|
- applyTime,
|
|
|
|
|
- startTime,
|
|
|
|
|
- endTime,
|
|
|
|
|
- qualifiedRadio,
|
|
|
|
|
- isQualified:
|
|
|
|
|
- status === '已完成'
|
|
|
|
|
- ? parseFloat(resultScore) >=
|
|
|
|
|
- (parseFloat(qualifiedRadio) / 100) *
|
|
|
|
|
- parseFloat(totalScore)
|
|
|
|
|
- : '',
|
|
|
|
|
- paperName,
|
|
|
|
|
- totalScore: parseFloat(totalScore),
|
|
|
|
|
- resultScore: parseFloat(resultScore),
|
|
|
|
|
- // totalCount: data.length,
|
|
|
|
|
- scoringType,
|
|
|
|
|
- list: [
|
|
|
|
|
- {
|
|
|
|
|
- type: item.questionType,
|
|
|
|
|
- questions: [item]
|
|
|
|
|
- }
|
|
|
|
|
- ]
|
|
|
|
|
|
|
+ // 数据分组
|
|
|
|
|
+ const index = result.findIndex(i => i.dataId === item.dataId)
|
|
|
|
|
+ if (index === -1) {
|
|
|
|
|
+ const { dataId, examinee, dept, status, applyTime, startTime, endTime, qualifiedRadio, paperName, totalScore, resultScore, scoringType } = item || {}
|
|
|
|
|
+ result.push({
|
|
|
|
|
+ dataId,
|
|
|
|
|
+ examinee,
|
|
|
|
|
+ dept,
|
|
|
|
|
+ status,
|
|
|
|
|
+ applyTime,
|
|
|
|
|
+ startTime,
|
|
|
|
|
+ endTime,
|
|
|
|
|
+ qualifiedRadio,
|
|
|
|
|
+ isQualified: status === '已完成' ? parseFloat(resultScore) >= (parseFloat(qualifiedRadio) / 100 * parseFloat(totalScore)) : '',
|
|
|
|
|
+ paperName,
|
|
|
|
|
+ totalScore: parseFloat(totalScore),
|
|
|
|
|
+ resultScore: parseFloat(resultScore),
|
|
|
|
|
+ // totalCount: data.length,
|
|
|
|
|
+ scoringType,
|
|
|
|
|
+ list: [{
|
|
|
|
|
+ type: item.questionType,
|
|
|
|
|
+ questions: [item]
|
|
|
|
|
+ }]
|
|
|
|
|
+ })
|
|
|
|
|
+ } else {
|
|
|
|
|
+ const qIndex = result[index].list.findIndex(i => i.type === item.questionType)
|
|
|
|
|
+ if (qIndex === -1) {
|
|
|
|
|
+ result[index].list.push({
|
|
|
|
|
+ type: item.questionType,
|
|
|
|
|
+ questions: [item]
|
|
|
})
|
|
})
|
|
|
} else {
|
|
} else {
|
|
|
- const qIndex = result[index].list.findIndex(
|
|
|
|
|
- (i) => i.type === item.questionType
|
|
|
|
|
- )
|
|
|
|
|
- if (qIndex === -1) {
|
|
|
|
|
- result[index].list.push({
|
|
|
|
|
- type: item.questionType,
|
|
|
|
|
- questions: [item]
|
|
|
|
|
- })
|
|
|
|
|
- } else {
|
|
|
|
|
- result[index].list[qIndex].questions.push(item)
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ result[index].list[qIndex].questions.push(item)
|
|
|
}
|
|
}
|
|
|
- })
|
|
|
|
|
- result.forEach((item) => {
|
|
|
|
|
- let count = 0
|
|
|
|
|
- item.list.forEach((i) => {
|
|
|
|
|
- count += i.questions.length
|
|
|
|
|
- i.totalScore = i.questions.reduce(
|
|
|
|
|
- (a, b) => a + parseFloat(b.questionScore),
|
|
|
|
|
- 0
|
|
|
|
|
- )
|
|
|
|
|
- })
|
|
|
|
|
- item.totalCount = count
|
|
|
|
|
- })
|
|
|
|
|
- // 获取最高分最低分
|
|
|
|
|
- const { maxScore, minScore } = result
|
|
|
|
|
- .filter((i) => i.status === '已完成')
|
|
|
|
|
- .reduce(
|
|
|
|
|
- (acc, curr) => {
|
|
|
|
|
- if (curr.resultScore > acc.maxScore) {
|
|
|
|
|
- acc.maxScore = curr.resultScore
|
|
|
|
|
- }
|
|
|
|
|
- if (curr.resultScore < acc.minScore) {
|
|
|
|
|
- acc.minScore = curr.resultScore
|
|
|
|
|
- }
|
|
|
|
|
- return acc
|
|
|
|
|
- },
|
|
|
|
|
- { maxScore: -Infinity, minScore: Infinity }
|
|
|
|
|
- )
|
|
|
|
|
- this.maxScore = maxScore
|
|
|
|
|
- this.minScore = minScore
|
|
|
|
|
- resolve(result)
|
|
|
|
|
|
|
+ }
|
|
|
})
|
|
})
|
|
|
- .catch((error) => {
|
|
|
|
|
- reject(error)
|
|
|
|
|
|
|
+ result.forEach(item => {
|
|
|
|
|
+ let count = 0
|
|
|
|
|
+ item.list.forEach(i => {
|
|
|
|
|
+ count += i.questions.length
|
|
|
|
|
+ i.totalScore = i.questions.reduce((a, b) => a + parseFloat(b.questionScore), 0)
|
|
|
|
|
+ })
|
|
|
|
|
+ item.totalCount = count
|
|
|
})
|
|
})
|
|
|
|
|
+ // 获取最高分最低分
|
|
|
|
|
+ const { maxScore, minScore } = result.filter(i => i.status === '已完成').reduce((acc, curr) => {
|
|
|
|
|
+ if (curr.resultScore > acc.maxScore) {
|
|
|
|
|
+ acc.maxScore = curr.resultScore
|
|
|
|
|
+ }
|
|
|
|
|
+ if (curr.resultScore < acc.minScore) {
|
|
|
|
|
+ acc.minScore = curr.resultScore
|
|
|
|
|
+ }
|
|
|
|
|
+ return acc
|
|
|
|
|
+ }, { maxScore: -Infinity, minScore: Infinity })
|
|
|
|
|
+ this.maxScore = maxScore
|
|
|
|
|
+ this.minScore = minScore
|
|
|
|
|
+ resolve(result)
|
|
|
|
|
+ }).catch(error => {
|
|
|
|
|
+ reject(error)
|
|
|
|
|
+ })
|
|
|
})
|
|
})
|
|
|
},
|
|
},
|
|
|
changePaper (id, status) {
|
|
changePaper (id, status) {
|
|
@@ -525,7 +454,7 @@ export default {
|
|
|
return
|
|
return
|
|
|
}
|
|
}
|
|
|
this.showPaperId = id
|
|
this.showPaperId = id
|
|
|
- this.paperData = this.paperList.find((i) => i.dataId === id)
|
|
|
|
|
|
|
+ this.paperData = this.paperList.find(i => i.dataId === id)
|
|
|
console.log(id)
|
|
console.log(id)
|
|
|
this.paperStatus = 'all'
|
|
this.paperStatus = 'all'
|
|
|
},
|
|
},
|
|
@@ -538,205 +467,202 @@ export default {
|
|
|
}
|
|
}
|
|
|
</script>
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
|
-.paper-detail-dialog {
|
|
|
|
|
- ::v-deep {
|
|
|
|
|
- .el-dialog__body {
|
|
|
|
|
- position: relative;
|
|
|
|
|
- height: calc(100vh - 115px);
|
|
|
|
|
- width: 1080px;
|
|
|
|
|
- margin: 0 auto;
|
|
|
|
|
- box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
|
|
|
|
- .el-radio,
|
|
|
|
|
- .el-checkbox {
|
|
|
|
|
- display: block;
|
|
|
|
|
- margin-bottom: 10px;
|
|
|
|
|
- pointer-events: none;
|
|
|
|
|
- &:last-child {
|
|
|
|
|
- margin-bottom: 0;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- .el-radio-button {
|
|
|
|
|
- pointer-events: none;
|
|
|
|
|
- }
|
|
|
|
|
- .el-radio__label,
|
|
|
|
|
- .el-checkbox__label {
|
|
|
|
|
- font-size: 16px;
|
|
|
|
|
- white-space: normal;
|
|
|
|
|
- line-height: 1.5;
|
|
|
|
|
- }
|
|
|
|
|
- .el-input {
|
|
|
|
|
- margin-bottom: 10px;
|
|
|
|
|
- pointer-events: none;
|
|
|
|
|
- &:last-child {
|
|
|
|
|
- margin-bottom: 0;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- .el-tag {
|
|
|
|
|
- margin-right: 0;
|
|
|
|
|
- }
|
|
|
|
|
- .ibps-p-0 {
|
|
|
|
|
- margin: 0;
|
|
|
|
|
- .list-group {
|
|
|
|
|
- display: inline-block;
|
|
|
|
|
- width: 100%;
|
|
|
|
|
|
|
+ .paper-detail-dialog {
|
|
|
|
|
+ ::v-deep {
|
|
|
|
|
+ .el-dialog__body {
|
|
|
|
|
+ position: relative;
|
|
|
|
|
+ height: calc(100vh - 115px);
|
|
|
|
|
+ width: 1080px;
|
|
|
|
|
+ margin: 0 auto;
|
|
|
|
|
+ box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
|
|
|
|
|
+ .el-radio, .el-checkbox {
|
|
|
|
|
+ display: block;
|
|
|
|
|
+ margin-bottom: 10px;
|
|
|
|
|
+ pointer-events: none;
|
|
|
|
|
+ &:last-child {
|
|
|
|
|
+ margin-bottom: 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .el-radio-button {
|
|
|
|
|
+ pointer-events: none;
|
|
|
|
|
+ }
|
|
|
|
|
+ .el-radio__label, .el-checkbox__label {
|
|
|
|
|
+ font-size: 16px;
|
|
|
|
|
+ white-space: normal;
|
|
|
|
|
+ line-height: 1.5;
|
|
|
|
|
+ }
|
|
|
|
|
+ .el-input {
|
|
|
|
|
+ margin-bottom: 10px;
|
|
|
|
|
+ pointer-events: none;
|
|
|
|
|
+ &:last-child {
|
|
|
|
|
+ margin-bottom: 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .el-tag {
|
|
|
|
|
+ margin-right: 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ .ibps-p-0 {
|
|
|
|
|
+ margin: 0;
|
|
|
|
|
+ .list-group {
|
|
|
|
|
+ display: inline-block;
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .el-dialog__header {
|
|
|
|
|
+ text-align: center;
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- .el-dialog__header {
|
|
|
|
|
- text-align: center;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- .container {
|
|
|
|
|
- position: relative;
|
|
|
|
|
- height: calc(100vh - 160px);
|
|
|
|
|
- padding: 20px;
|
|
|
|
|
- .paper-info {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- flex-wrap: wrap;
|
|
|
|
|
- justify-content: flex-start;
|
|
|
|
|
- margin-bottom: 20px;
|
|
|
|
|
- background-color: #f5f5f5;
|
|
|
|
|
- border: 1px solid #ddd;
|
|
|
|
|
- padding: 10px;
|
|
|
|
|
- border-radius: 5px;
|
|
|
|
|
- font-size: 16px;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ .container {
|
|
|
|
|
+ position: relative;
|
|
|
|
|
+ height: calc(100vh - 160px);
|
|
|
|
|
+ padding: 20px;
|
|
|
|
|
+ .paper-info {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ flex-wrap: wrap;
|
|
|
|
|
+ justify-content: flex-start;
|
|
|
|
|
+ margin-bottom: 20px;
|
|
|
|
|
+ background-color: #f5f5f5;
|
|
|
|
|
+ border: 1px solid #ddd;
|
|
|
|
|
+ padding: 10px;
|
|
|
|
|
+ border-radius: 5px;
|
|
|
|
|
+ font-size: 16px;
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- .info-item {
|
|
|
|
|
- width: 33.3%;
|
|
|
|
|
- margin-bottom: 10px;
|
|
|
|
|
- display: flex;
|
|
|
|
|
- align-items: center;
|
|
|
|
|
- .label {
|
|
|
|
|
- width: 100px;
|
|
|
|
|
- font-weight: bold;
|
|
|
|
|
- color: #333;
|
|
|
|
|
- }
|
|
|
|
|
- .value {
|
|
|
|
|
- flex: 1;
|
|
|
|
|
- color: #666;
|
|
|
|
|
- white-space: nowrap;
|
|
|
|
|
- overflow: hidden;
|
|
|
|
|
- text-overflow: ellipsis;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ .info-item {
|
|
|
|
|
+ width: 33.3%;
|
|
|
|
|
+ margin-bottom: 10px;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ .label {
|
|
|
|
|
+ width: 100px;
|
|
|
|
|
+ font-weight: bold;
|
|
|
|
|
+ color: #333;
|
|
|
|
|
+ }
|
|
|
|
|
+ .value {
|
|
|
|
|
+ flex: 1;
|
|
|
|
|
+ color: #666;
|
|
|
|
|
+ white-space: nowrap;
|
|
|
|
|
+ overflow: hidden;
|
|
|
|
|
+ text-overflow: ellipsis;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- .question {
|
|
|
|
|
- font-size: 16px;
|
|
|
|
|
- .question-item {
|
|
|
|
|
- padding-top: 20px;
|
|
|
|
|
- &:last-child {
|
|
|
|
|
- padding-bottom: 20px;
|
|
|
|
|
- }
|
|
|
|
|
- .card {
|
|
|
|
|
- padding-bottom: 10px;
|
|
|
|
|
- &:last-child {
|
|
|
|
|
- padding-bottom: 0;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- .type {
|
|
|
|
|
- font-size: 20px;
|
|
|
|
|
- font-weight: 600;
|
|
|
|
|
- margin-bottom: 20px;
|
|
|
|
|
- .score {
|
|
|
|
|
- margin-left: 10px;
|
|
|
|
|
- vertical-align: bottom;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- .stem {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- margin-bottom: 10px;
|
|
|
|
|
- align-items: flex-start;
|
|
|
|
|
- > span:first-child {
|
|
|
|
|
- line-height: 1.5;
|
|
|
|
|
- margin-right: 10px;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- .img {
|
|
|
|
|
- position: relative;
|
|
|
|
|
- width: 100%;
|
|
|
|
|
- margin-bottom: 10px;
|
|
|
|
|
|
|
+ .question {
|
|
|
|
|
+ font-size: 16px;
|
|
|
|
|
+ .question-item {
|
|
|
|
|
+ padding-top: 20px;
|
|
|
|
|
+ &:last-child {
|
|
|
|
|
+ padding-bottom: 20px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .card {
|
|
|
|
|
+ padding-bottom: 10px;
|
|
|
|
|
+ &:last-child {
|
|
|
|
|
+ padding-bottom: 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .type {
|
|
|
|
|
+ font-size: 20px;
|
|
|
|
|
+ font-weight: 600;
|
|
|
|
|
+ margin-bottom: 20px;
|
|
|
|
|
+ .score {
|
|
|
|
|
+ margin-left: 10px;
|
|
|
|
|
+ vertical-align: bottom;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .stem {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ margin-bottom: 10px;
|
|
|
|
|
+ align-items: flex-start;
|
|
|
|
|
+ > span:first-child {
|
|
|
|
|
+ line-height: 1.5;
|
|
|
|
|
+ margin-right: 10px;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .img {
|
|
|
|
|
+ position: relative;
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ margin-bottom: 10px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .answer {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ border: 1px solid #ccc;
|
|
|
|
|
+ border-radius: 5px;
|
|
|
|
|
+ .mine, .right {
|
|
|
|
|
+ flex: 1;
|
|
|
|
|
+ padding: 10px;
|
|
|
|
|
+ .title {
|
|
|
|
|
+ font-size: 16px;
|
|
|
|
|
+ color: #01a39e;
|
|
|
|
|
+ margin-bottom: 10px;
|
|
|
|
|
+ .score {
|
|
|
|
|
+ vertical-align: middle;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .mine {
|
|
|
|
|
+ background-color: #f5f5f5;
|
|
|
|
|
+ border-right: 1px solid #ccc;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
- .answer {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- border: 1px solid #ccc;
|
|
|
|
|
- border-radius: 5px;
|
|
|
|
|
- .mine,
|
|
|
|
|
- .right {
|
|
|
|
|
- flex: 1;
|
|
|
|
|
- padding: 10px;
|
|
|
|
|
- .title {
|
|
|
|
|
- font-size: 16px;
|
|
|
|
|
- color: #01a39e;
|
|
|
|
|
- margin-bottom: 10px;
|
|
|
|
|
- .score {
|
|
|
|
|
- vertical-align: middle;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ .date-line {
|
|
|
|
|
+ position: fixed;
|
|
|
|
|
+ width: 280px;
|
|
|
|
|
+ height: calc(100vh - 120px);
|
|
|
|
|
+ overflow-y: auto;
|
|
|
|
|
+ top: 60px;
|
|
|
|
|
+ left: calc(50vw + 540px);
|
|
|
|
|
+ padding-right: 8px;
|
|
|
|
|
+ ::v-deep {
|
|
|
|
|
+ .el-timeline {
|
|
|
|
|
+ padding-left: 10px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .el-card__body {
|
|
|
|
|
+ padding: 10px 10px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .el-tag {
|
|
|
|
|
+ margin-left: 5px;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .timeline-card {
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
+ .card-item {
|
|
|
|
|
+ margin-bottom: 10px;
|
|
|
|
|
+ &:last-child {
|
|
|
|
|
+ margin-bottom: 0;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .active-card {
|
|
|
|
|
+ box-shadow: 0 2px 12px 0 rgba(64, 158, 255, 1);
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
- .mine {
|
|
|
|
|
- background-color: #f5f5f5;
|
|
|
|
|
- border-right: 1px solid #ccc;
|
|
|
|
|
- }
|
|
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- .date-line {
|
|
|
|
|
- position: fixed;
|
|
|
|
|
- width: 280px;
|
|
|
|
|
- height: calc(100vh - 120px);
|
|
|
|
|
- overflow-y: auto;
|
|
|
|
|
- top: 60px;
|
|
|
|
|
- left: calc(50vw + 540px);
|
|
|
|
|
- padding-right: 8px;
|
|
|
|
|
- ::v-deep {
|
|
|
|
|
- .el-timeline {
|
|
|
|
|
- padding-left: 10px;
|
|
|
|
|
- }
|
|
|
|
|
- .el-card__body {
|
|
|
|
|
- padding: 10px 10px;
|
|
|
|
|
- }
|
|
|
|
|
- .el-tag {
|
|
|
|
|
- margin-left: 5px;
|
|
|
|
|
- }
|
|
|
|
|
}
|
|
}
|
|
|
- .timeline-card {
|
|
|
|
|
- cursor: pointer;
|
|
|
|
|
- .card-item {
|
|
|
|
|
- margin-bottom: 10px;
|
|
|
|
|
- &:last-child {
|
|
|
|
|
- margin-bottom: 0;
|
|
|
|
|
|
|
+ @media screen and (max-width: 1600px) {
|
|
|
|
|
+ .paper-detail-dialog {
|
|
|
|
|
+ ::v-deep {
|
|
|
|
|
+ .el-dialog__body {
|
|
|
|
|
+ width: 880px;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .date-line {
|
|
|
|
|
+ left: calc(50vw + 440px);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- .active-card {
|
|
|
|
|
- box-shadow: 0 2px 12px 0 rgba(64, 158, 255, 1);
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
-@media screen and (max-width: 1600px) {
|
|
|
|
|
- .paper-detail-dialog {
|
|
|
|
|
- ::v-deep {
|
|
|
|
|
- .el-dialog__body {
|
|
|
|
|
- width: 880px;
|
|
|
|
|
- }
|
|
|
|
|
}
|
|
}
|
|
|
- .date-line {
|
|
|
|
|
- left: calc(50vw + 440px);
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
-@media screen and (max-width: 1400px) {
|
|
|
|
|
- .paper-detail-dialog {
|
|
|
|
|
- ::v-deep {
|
|
|
|
|
- .el-dialog__body {
|
|
|
|
|
- width: 800px;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- .date-line {
|
|
|
|
|
- left: calc(50vw + 400px);
|
|
|
|
|
|
|
+ @media screen and (max-width: 1400px) {
|
|
|
|
|
+ .paper-detail-dialog {
|
|
|
|
|
+ ::v-deep {
|
|
|
|
|
+ .el-dialog__body {
|
|
|
|
|
+ width: 800px;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+ .date-line {
|
|
|
|
|
+ left: calc(50vw + 400px);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
-}
|
|
|
|
|
</style>
|
|
</style>
|