yujialong 1 month ago
parent 37eb678280
commit 996a611e03
  1. 38
      src/libs/route/addRoutes.js
  2. 10
      src/views/customer/AddCustomer.vue
  3. 28
      src/views/match/manage/theoryReport.vue

@ -3,27 +3,27 @@ import generateBtnPermission from '../auth/generateBtnPermission';
const newRoutes = [] const newRoutes = []
function createMeta(item){ function createMeta (item) {
let meta = { title: item.name } let meta = { title: item.name }
return meta return meta
} }
function createRoute(data){ function createRoute (data) {
data.map(e => { data.map(e => {
if(e.path){ if (e.path) {
let meta = createMeta(e) let meta = createMeta(e)
newRoutes.push({ newRoutes.push({
path: e.path, path: e.path,
meta meta
}) })
} }
// 递归生成路由集合 // 递归生成路由集合
e.children && e.children.length && createRoute(e.children) e.children && e.children.length && createRoute(e.children)
}) })
} }
export default function(data,path){ export default function (data, path) {
generateBtnPermission(data) generateBtnPermission(data)
createRoute(data) createRoute(data)
store.commit('addRoutes',newRoutes) store.commit('addRoutes', newRoutes)
} }

@ -703,7 +703,7 @@ export default {
}) })
// //
// if (list[0].startTime && list[0].endTime) { // if (list[0].startTime && list[0].endTime) {
if (list[0].startTime && now < new Date(list[0].startTime).getTime()) { if (list[0].startTime && now < new Date(list[0].startTime)) {
e.startTime = list[0].startTime e.startTime = list[0].startTime
e.endTime = connect ? list[list.length - 1].endTime : list[0].endTime e.endTime = connect ? list[list.length - 1].endTime : list[0].endTime
e.status = '未生效' e.status = '未生效'
@ -717,7 +717,7 @@ export default {
e.other += `<br>${j.startTime} ~ ${j.endTime}` e.other += `<br>${j.startTime} ~ ${j.endTime}`
}) })
} }
} else if (list[list.length - 1].endTime && now > new Date(list[list.length - 1].endTime).getTime()) { } else if (list[list.length - 1].endTime && now > new Date(list[list.length - 1].endTime)) {
e.status = '已过期' e.status = '已过期'
} else { } else {
// //
@ -730,7 +730,7 @@ export default {
for (const j in list) { for (const j in list) {
const i = +j const i = +j
const n = list[i] const n = list[i]
if (n.startTime && n.endTime && now >= new Date(n.startTime).getTime() && now <= new Date(n.endTime).getTime()) { if (n.startTime && n.endTime && now >= new Date(n.startTime) && now <= new Date(n.endTime)) {
// //
e.startTime = n.startTime e.startTime = n.startTime
e.endTime = n.endTime e.endTime = n.endTime
@ -745,7 +745,7 @@ export default {
}) })
} }
break break
} else if (i != 0 && list[i - 1].endTime && n.startTime && n.endTime && now > new Date(list[i - 1].endTime).getTime() && now < new Date(n.startTime).getTime()) { } else if (i != 0 && list[i - 1].endTime && n.startTime && n.endTime && now > new Date(list[i - 1].endTime) && now < new Date(n.startTime)) {
// //
e.startTime = n.startTime e.startTime = n.startTime
e.endTime = n.endTime e.endTime = n.endTime
@ -783,7 +783,7 @@ export default {
}, },
// //
getRemain (startTime, endTime) { getRemain (startTime, endTime) {
return parseInt(((new Date(endTime).getTime() - new Date(startTime).getTime()) / 86400000)) return parseInt(((new Date(endTime) - new Date(startTime)) / 86400000))
}, },
// //
handlePage () { handlePage () {

@ -64,7 +64,7 @@
<div v-else class="score-wrap"> <div v-else class="score-wrap">
<em>{{ info.score }}</em> <em>{{ info.score }}</em>
<img src="@/assets/img/point.png" alt=""> <img src="@/assets/img/point.png" alt="">
<p v-if="essayExist" class="exist">部分试题待判分成绩待定</p> <p v-if="notReview" class="exist">部分试题待判分成绩待定</p>
</div> </div>
</li> </li>
<li> <li>
@ -96,15 +96,16 @@
</el-table-column> </el-table-column>
<el-table-column prop="userTotalScore" label="得分" align="center"> <el-table-column prop="userTotalScore" label="得分" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<p v-if="scope.row.questionType === 'essay'" class="text-red">待评分 <p v-if="scope.row.questionType === 'essay' && scope.row.scoringStatus === '未判分'" class="text-red">待评分
</p> </p>
<p v-else-if="essayExist && !scope.row.paperId" class="text-red">{{ scope.row.userTotalScore <p v-else-if="notReview && !scope.row.paperId" class="text-red">{{ scope.row.userTotalScore
}}部分试题待判分成绩待定</p> }}部分试题待判分成绩待定</p>
<p v-else>{{ scope.row.userTotalScore }}</p> <p v-else>{{ scope.row.userTotalScore }}</p>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="scoreRatePercentage" label="得分率" align="center"> <el-table-column prop="scoreRatePercentage" label="得分率" align="center">
<template slot-scope="scope">{{ scope.row.questionType === 'essay' ? '-' : scope.row.scoreRatePercentage <template slot-scope="scope">{{ scope.row.questionType === 'essay' && scope.row.scoringStatus === '未判分'
? '-' : scope.row.scoreRatePercentage
}}</template> }}</template>
</el-table-column> </el-table-column>
</el-table> </el-table>
@ -157,19 +158,19 @@
</template> </template>
<div v-if="ques.knowledgePointList && ques.knowledgePointList.length" class="m-b-10"> <div v-if="ques.knowledgePointList && ques.knowledgePointList.length" class="m-b-10">
<span>知识点</span> <span class="line-label">知识点</span>
<el-tag v-for="(kp, k) in ques.knowledgePointList" :key="k" class="m-r-5" type="info">{{ kp.name <el-tag v-for="(kp, k) in ques.knowledgePointList" :key="k" class="m-r-5" type="info">{{ kp.name
}}</el-tag> }}</el-tag>
</div> </div>
<div class="flex m-b-10"> <div class="flex m-b-10">
<span>解析</span> <span class="line-label">解析</span>
<div <div
v-if="ques.questionAnswerVersionsList.length && ques.questionAnswerVersionsList[0].answerAnalysis" v-if="ques.questionAnswerVersionsList.length && ques.questionAnswerVersionsList[0].answerAnalysis"
v-html="ques.questionAnswerVersionsList[0].answerAnalysis" class="html-parse"></div> v-html="ques.questionAnswerVersionsList[0].answerAnalysis" class="html-parse"></div>
<div v-else>暂无解析</div> <div v-else>暂无解析</div>
</div> </div>
<div :class="['ques-info', { essay: item.questionType === 'essay' }]"> <div :class="['ques-info', { essay: item.questionType === 'essay' && ques.scoringStatus === '未判分' }]">
<template v-if="item.questionType === 'essay'"> <template v-if="item.questionType === 'essay'">
<div class="line"> <div class="line">
<span class="line-label">参考答案</span> <span class="line-label">参考答案</span>
@ -207,6 +208,11 @@
<div class="line">考生得分<el-input class="score-input" size="small" :value="ques.userScore" <div class="line">考生得分<el-input class="score-input" size="small" :value="ques.userScore"
disabled /> disabled />
</div> </div>
<div v-for="(coment, k) in ques.comment" :key="k" class="line">
<span class="line-label">评语{{ k + 1 }}</span>
<div v-html="coment" class="html-parse"></div>
</div>
</div> </div>
</div> </div>
</div> </div>
@ -285,6 +291,7 @@ export default {
outlines: [], outlines: [],
paper: [], paper: [],
essayExist: 0, essayExist: 0,
notReview: 0,
previewImgVisible: false, previewImgVisible: false,
previewImg: '', previewImg: '',
pdfVisible: false, pdfVisible: false,
@ -306,8 +313,12 @@ export default {
const { questionTypes: types, difficults } = QuesConst const { questionTypes: types, difficults } = QuesConst
const { numToLetter } = Util const { numToLetter } = Util
let essayExist = 0 let essayExist = 0
let notReview = 0
outline.map(e => { outline.map(e => {
if (e.questionType === 'essay') essayExist = 1 if (e.questionType === 'essay') {
essayExist = 1
if (e.scoringStatus === '未判分') notReview = 1
}
e.shrink = false e.shrink = false
const type = e.questionType const type = e.questionType
e.questionTypeName = types.find(n => n.id === type).name e.questionTypeName = types.find(n => n.id === type).name
@ -376,6 +387,7 @@ export default {
}) })
this.essayExist = essayExist // this.essayExist = essayExist //
this.notReview = notReview //
this.paper = outline this.paper = outline
this.outlines = [ this.outlines = [
...outline, ...outline,

Loading…
Cancel
Save