赛事选择试卷相关

dev_review
yujialong 3 months ago
parent b8a41a5e23
commit 3668825847
  1. 2
      src/App.vue
  2. 6
      src/assets/css/main.css
  3. 34
      src/const/testPaper.js
  4. 4
      src/utils/api.js
  5. 276
      src/views/match/add/set.vue
  6. 30
      src/views/match/add/step3.vue
  7. 235
      src/views/match/add/template.vue
  8. 389
      src/views/match/manage/matchReport.vue
  9. 8
      src/views/match/manage/matchSignup.vue

@ -1,6 +1,6 @@
<template> <template>
<div id="app"> <div id="app">
<el-radio-group v-if="Setting.isDev" v-model="ip" @change="ipChange"> <el-radio-group v-if="Setting.isDev" class="ip" v-model="ip" @change="ipChange">
<el-radio :label="0">刘榕ip</el-radio> <el-radio :label="0">刘榕ip</el-radio>
<el-radio :label="1">陈赓ip</el-radio> <el-radio :label="1">陈赓ip</el-radio>
<el-radio :label="2">测试服ip</el-radio> <el-radio :label="2">测试服ip</el-radio>

@ -19,6 +19,12 @@ body {
font-size: 14px; font-size: 14px;
} }
.ip {
z-index: 1;
position: fixed;
top: 0;
left: 0;
}
a { a {
text-decoration: none; text-decoration: none;
} }

@ -0,0 +1,34 @@
export default {
difficults: [
{
id: 1,
name: '简单'
},
{
id: 2,
name: '普通'
},
{
id: 3,
name: '较难'
},
{
id: 4,
name: '难'
},
],
paperTypes: [
{
id: 0,
name: '练习'
},
{
id: 1,
name: '考核'
},
{
id: 2,
name: '竞赛'
},
],
}

@ -340,6 +340,10 @@ export default {
checkTeamStatus: `competition/teamAbnormalInformation/checkTeamStatus`, checkTeamStatus: `competition/teamAbnormalInformation/checkTeamStatus`,
queryAbnormalTeam: `competition/teamAbnormalInformation/queryAbnormalTeam`, queryAbnormalTeam: `competition/teamAbnormalInformation/queryAbnormalTeam`,
viewEventAllocationInformation: `competition/competitionAutomaticAllocationRecord/viewEventAllocationInformation`, viewEventAllocationInformation: `competition/competitionAutomaticAllocationRecord/viewEventAllocationInformation`,
getCompetitionProjectByMiddleGround: `occupationlab/occupationlab/projectManage/getCompetitionProjectByMiddleGround`,
libraryList: `exam/exam/paperLibrary/libraryList`,
examPaperList: `exam/exam/paper/examPaperList`,
copyExamPaper: `exam/exam/paper/copyExamPaper`,
// 赛事内容 // 赛事内容
addCompetitionContent: `competition/competition/content/addCompetitionContent`, addCompetitionContent: `competition/competition/content/addCompetitionContent`,

@ -24,57 +24,120 @@
</div> </div>
</div> </div>
</el-card> </el-card>
<el-card shadow="hover" class="mgr20 m-b-20">
<div> <!-- 理论系统 -->
<p class="m-b-20">系统</p> <template v-if="isTheory">
<div class="inline-input"> <!-- 理论系统选择试卷库非理论则选择系统 -->
<el-select v-model="systemId" placeholder="请选择系统" @change="getProject"> <el-card shadow="hover" class="mgr20 m-b-20">
<el-option v-for="(item, i) in systems" :key="i" :label="item.systemName" :value="item.systemId"> <div>
</el-option> <p class="m-b-20">试卷库</p>
</el-select> <div class="inline-input">
<el-select v-model="libraryId" placeholder="请选择试卷库" @change="getProject">
<el-option v-for="(item, i) in paperLibraries" :key="i" :label="item.libraryName" :value="item.libraryId">
</el-option>
</el-select>
</div>
</div> </div>
</div> </el-card>
</el-card>
<el-card shadow="hover" class="m-b-20"> <el-card shadow="hover" class="m-b-20">
<div class="flex-between m-b-20"> <div class="flex-between m-b-20">
<span>实训项目</span> <span>理论试卷</span>
<div style="display: inline-flex;"> <div style="display: inline-flex;">
<div> <div>
<el-input placeholder="请输入项目名称" prefix-icon="el-icon-search" v-model.trim="keyword" clearable></el-input> <el-input placeholder="请输入试卷名称" prefix-icon="el-icon-search" v-model.trim="keyword" clearable></el-input>
</div>
</div> </div>
<el-button style="margin-left: 5px" type="primary" round @click="toProject">自定义实验项目</el-button>
</div> </div>
</div> <p v-if="form.originPaperName" style="margin-bottom: 20px">已选试卷{{ form.originPaperName }}</p>
<!-- 实训项目表格 --> <el-table :data="projects" class="table" stripe header-align="center">
<el-table :data="projects" class="table" stripe header-align="center"> <el-table-column width="60" label="选择" align="center">
<el-table-column width="60" label="选择" align="center"> <template slot-scope="scope">
<template slot-scope="scope"> <el-radio v-model="form.paperId" :label="scope.row.paperId">&nbsp;</el-radio>
<el-radio v-model="form.projectId" :label="scope.row.projectId">&nbsp;</el-radio> </template>
</template> </el-table-column>
</el-table-column> <el-table-column type="index" width="60" label="序号" align="center"></el-table-column>
<el-table-column prop="projectName" label="项目名称" align="center"></el-table-column> <el-table-column prop="name" label="试卷名称" min-width="140" align="center"></el-table-column>
<el-table-column prop="auth" label="项目权限" align="center"> <el-table-column prop="questionCount" label="试题总数" align="center" min-width="70"></el-table-column>
<template slot-scope="scope"> <el-table-column prop="score" label="总分" align="center" min-width="70"></el-table-column>
{{ permissionsKeys[scope.row.permissions] }} <el-table-column prop="difficult" label="试卷难度" align="center" min-width="70" sortable="custom">
</template> <template slot-scope="scope">{{ difficults.find(e => e.id === scope.row.difficult) ? difficults.find(e =>
</el-table-column> e.id === scope.row.difficult).name : '' }}</template>
<el-table-column prop="founder" label="创建人" align="center"> </el-table-column>
<template slot-scope="scope"> <el-table-column prop="suggestTime" label="建议用时" align="center" min-width="70">
{{ scope.row.founder ? '老师创建' : '系统内置' }} <template slot-scope="scope">{{ scope.row.suggestTime }}min</template>
</template> </el-table-column>
</el-table-column> <el-table-column prop="classificationPath" label="试卷分类" align="center" min-width="70"
<el-table-column prop="createTime" label="创建时间" align="center"></el-table-column> show-overflow-tooltip></el-table-column>
<!-- <el-table-column label="操作" align="center"> <el-table-column label="建议用途" align="center" min-width="70">
<template slot-scope="scope">{{ paperTypes.find(e => e.id === scope.row.paperType) ? paperTypes.find(e =>
e.id === scope.row.paperType).name : '' }}</template>
</el-table-column>
<el-table-column prop="updateTime" label="最近编辑时间" align="center" width="170"></el-table-column>
<el-table-column prop="createUser" label="最近编辑人" align="center" width="110"></el-table-column>
</el-table>
<div class="pagination">
<el-pagination background :page-size="pageSize" @current-change="handleCurrentChange"
layout="total,prev, pager, next" :total="total"></el-pagination>
</div>
</el-card>
</template>
<template v-else>
<el-card shadow="hover" class="mgr20 m-b-20">
<div>
<p class="m-b-20">系统</p>
<div class="inline-input">
<el-select v-model="systemId" placeholder="请选择系统" @change="getProject">
<el-option v-for="(item, i) in systems" :key="i" :label="item.systemName" :value="item.systemId">
</el-option>
</el-select>
</div>
</div>
</el-card>
<el-card shadow="hover" class="m-b-20">
<div class="flex-between m-b-20">
<span>实训项目</span>
<div style="display: inline-flex;">
<div>
<el-input placeholder="请输入项目名称" prefix-icon="el-icon-search" v-model.trim="keyword" clearable></el-input>
</div>
<el-button style="margin-left: 5px" type="primary" round @click="toProject">自定义实验项目</el-button>
</div>
</div>
<!-- 实训项目表格 -->
<el-table :data="projects" class="table" stripe header-align="center">
<el-table-column width="60" label="选择" align="center">
<template slot-scope="scope">
<el-radio v-model="form.projectId" :label="scope.row.projectId">&nbsp;</el-radio>
</template>
</el-table-column>
<el-table-column prop="projectName" label="项目名称" align="center"></el-table-column>
<el-table-column prop="auth" label="项目权限" align="center">
<template slot-scope="scope">
{{ permissionsKeys[scope.row.permissions] }}
</template>
</el-table-column>
<el-table-column prop="founder" label="创建人" align="center">
<template slot-scope="scope">
{{ scope.row.founder ? '老师创建' : '系统内置' }}
</template>
</el-table-column>
<el-table-column prop="createTime" label="创建时间" align="center"></el-table-column>
<!-- <el-table-column label="操作" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button type="text" @click="showProject(scope.row)">查看</el-button> <el-button type="text" @click="showProject(scope.row)">查看</el-button>
</template> </template>
</el-table-column> --> </el-table-column> -->
</el-table> </el-table>
<div class="pagination"> <div class="pagination">
<el-pagination background :page-size="pageSize" @current-change="handleCurrentChange" <el-pagination background :page-size="pageSize" @current-change="handleCurrentChange"
layout="total,prev, pager, next" :total="total"></el-pagination> layout="total,prev, pager, next" :total="total"></el-pagination>
</div> </div>
</el-card> </el-card>
</template>
<div style="text-align: center"> <div style="text-align: center">
<el-button @click="back">返回</el-button> <el-button @click="back">返回</el-button>
@ -86,22 +149,36 @@
<script> <script>
import util from "@/libs/util"; import util from "@/libs/util";
import { Loading } from 'element-ui' import { Loading } from 'element-ui'
import TestPaperConst from '@/const/testPaper'
export default { export default {
props: ['form', 'step1'], props: ['form', 'step1'],
data () { data () {
return { return {
difficults: TestPaperConst.difficults,
paperTypes: TestPaperConst.paperTypes,
loadIns: null, loadIns: null,
systems: [], systems: [],
paperLibraries: [],
testPapers: [],
keyword: '', keyword: '',
projects: [], projects: [],
page: 1, page: 1,
pageSize: 5, pageSize: 5,
total: 0, total: 0,
libraryId: '',
systemId: '', systemId: '',
paperId: '',
paperName: '',
permissionsKeys: ['练习', '考核', '竞赛'], permissionsKeys: ['练习', '考核', '竞赛'],
timeInvalid: false timeInvalid: false,
}; };
}, },
computed: {
//
isTheory () {
return this.form.method === 1
},
},
watch: { watch: {
// , // ,
form: { form: {
@ -118,7 +195,7 @@ export default {
} }
}, },
mounted () { mounted () {
this.getCourse() this.isTheory ? this.getLibrary() : this.getCourse()
}, },
methods: { methods: {
// //
@ -137,30 +214,61 @@ export default {
this.getProject() this.getProject()
} }
}, },
//
async getLibrary () {
try {
const res = await this.$post(this.api.libraryList, {
pageNum: 1,
pageSize: 10000,
type: 1
})
const { records } = res.pageList
if (records.length) {
this.paperLibraries = records
this.libraryId = records[0].libraryId
this.loadIns = Loading.service()
this.getProject()
}
} finally { }
},
// // /
getProject () { async getProject () {
this.$post(this.api.getProjectAssessmentByCompetition, { try {
pageNum: this.page, //
pageSize: this.pageSize, if (this.isTheory) {
projectName: this.keyword, const res = await this.$post(this.api.examPaperList, {
systemId: this.systemId, pageNum: this.page,
permissions: 2 pageSize: this.pageSize,
}).then(({ data }) => { type: 1,
this.projects = data.records keyWord: this.keyword,
this.total = data.total libraryId: this.libraryId
this.loadIns.close() })
}).catch(err => { this.projects = res.pageList.records
this.total = res.pageList.total
} else {
//
const { data } = await this.$post(this.api.getCompetitionProjectByMiddleGround, {
pageNum: this.page,
pageSize: this.pageSize,
projectName: this.keyword,
systemId: this.systemId,
permissions: 2
})
this.projects = data.records
this.total = data.total
}
} finally {
this.loadIns.close() this.loadIns.close()
}); }
}, },
initData () { initData () {
this.page = 1; this.page = 1
this.getProject(); this.getProject()
}, },
handleCurrentChange (val) { handleCurrentChange (val) {
this.page = val; this.page = val
this.getProject(); this.getProject()
}, },
// //
toProject () { toProject () {
@ -203,16 +311,44 @@ export default {
if (!form.time.length) return util.warningMsg('请选择比赛时间') if (!form.time.length) return util.warningMsg('请选择比赛时间')
const { playStartTime, playEndTime } = this.step1 const { playStartTime, playEndTime } = this.step1
if (new Date(form.time[0]) < new Date(playStartTime) || new Date(form.time[1]) > new Date(playEndTime)) return util.warningMsg('设置的阶段比赛时间必须要在第一步设置的竞赛时间范围内,请重新设置。') if (new Date(form.time[0]) < new Date(playStartTime) || new Date(form.time[1]) > new Date(playEndTime)) return util.warningMsg('设置的阶段比赛时间必须要在第一步设置的竞赛时间范围内,请重新设置。')
if (!form.cid) return util.warningMsg('请选择课程')
if (!form.projectId) return util.warningMsg('请选择项目') //
const { systemId, systemName, projectName } = this.projects.find(e => e.projectId == form.projectId) if (this.isTheory) {
if (systemId) form.systemId = systemId if (!this.libraryId) return util.warningMsg('请选择试卷库')
if (projectName) form.projectName = projectName if (!form.paperId) return util.warningMsg('请选择试卷')
if (systemName) form.systemName = systemName
form.libraryId = this.libraryId
const curPaper = this.projects.find(e => e.paperId === form.paperId)
if (curPaper) form.paperName = curPaper.name
} else {
if (!form.cid) return util.warningMsg('请选择课程')
if (!form.projectId) return util.warningMsg('请选择项目')
const { systemId, systemName, projectName } = this.projects.find(e => e.projectId == form.projectId)
if (systemId) form.systemId = systemId
if (projectName) form.projectName = projectName
if (systemName) form.systemName = systemName
}
form.startTime = form.time[0] form.startTime = form.time[0]
form.endTime = form.time[1] form.endTime = form.time[1]
this.handlePaper()
this.$emit('hideSet', this.form) this.$emit('hideSet', this.form)
}, },
//
async handlePaper () {
const { form } = this
// id
if (form.paperName !== form.originPaperName) {
const res = await this.$post(this.api.copyExamPaper, {
associatedID: form.stageId,
paperId: form.paperId,
typeId: 1
})
if (res.examPaper) {
form.paperId = res.examPaper.paperId
}
}
},
// //
back () { back () {
this.$emit('update:form', this.$parent.curOriginForm) this.$emit('update:form', this.$parent.curOriginForm)

@ -22,6 +22,7 @@
</el-alert> </el-alert>
</div> </div>
</el-form-item> </el-form-item>
<!-- 其他赛事 -->
<template v-if="item.method === 2"> <template v-if="item.method === 2">
<el-form-item class="req" label="比赛地点"> <el-form-item class="req" label="比赛地点">
<el-input v-model="item.offlineAddress" style="width: 80%"></el-input> <el-input v-model="item.offlineAddress" style="width: 80%"></el-input>
@ -70,12 +71,19 @@
</el-form-item> </el-form-item>
</template> </template>
<template v-else> <template v-else>
<el-form-item class="req" prop="cid" label="课程系统"> <template v-if="item.method === 0">
{{ item.systemName }} <el-form-item class="req" prop="cid" label="课程系统">
</el-form-item> {{ item.systemName }}
<el-form-item class="req" prop="assessmentId" label="已选择考核"> </el-form-item>
{{ item.projectName }} <el-form-item class="req" prop="assessmentId" label="已选择考核">
</el-form-item> {{ item.projectName }}
</el-form-item>
</template>
<template v-else>
<el-form-item class="req" label="已选择试卷">
{{ item.paperName }}
</el-form-item>
</template>
<el-form-item class="req" prop="resultAnnouncementTime" label="比赛地点"> <el-form-item class="req" prop="resultAnnouncementTime" label="比赛地点">
<div class="line"> <div class="line">
<el-checkbox v-model="item.onlineButton">线上</el-checkbox> <el-checkbox v-model="item.onlineButton">线上</el-checkbox>
@ -151,6 +159,7 @@ export default {
stageId: '', stageId: '',
startTime: '', startTime: '',
systemId: '', systemId: '',
paperId: '',
offlineAddress: '', offlineAddress: '',
offlineButton: 0, offlineButton: 0,
onlineAddress: '', onlineAddress: '',
@ -237,8 +246,10 @@ export default {
form.method = e.method form.method = e.method
form.stageId = e.stageId form.stageId = e.stageId
form.stageName = e.stageName form.stageName = e.stageName
if (form.paperName) form.originPaperName = form.paperName //
this.form.push(form) this.form.push(form)
}) })
this.resumeData() this.resumeData()
this.$nextTick(() => { this.$nextTick(() => {
this.updateTime = 0 this.updateTime = 0
@ -401,11 +412,16 @@ export default {
Util.errorMsg('设置的阶段比赛时间必须要在第一步设置的竞赛时间范围内,请重新设置。') Util.errorMsg('设置的阶段比赛时间必须要在第一步设置的竞赛时间范围内,请重新设置。')
break break
} }
if (e.method !== 2 && !e.cid) { if (e.method === 0 && !e.cid) {
invalid = 1 invalid = 1
Util.errorMsg('请选择课程') Util.errorMsg('请选择课程')
break break
} }
if (e.method === 1 && !e.paperId) {
invalid = 1
Util.errorMsg('请选择试卷')
break
}
if (e.method === 2) { // 线 if (e.method === 2) { // 线
if (!e.offlineAddress) { if (!e.offlineAddress) {
invalid = 1 invalid = 1

@ -0,0 +1,235 @@
<template>
<!-- 理论考试选择试卷 -->
<div>
<el-dialog title="请选择试卷" :visible.sync="listVisible" width="1200px" :close-on-click-modal="false"
@closed="closeDia">
<div class="tool">
<ul class="filter">
<li>
<label>搜索</label>
<el-input style="width: 250px;" placeholder="请输入模板名称" prefix-icon="el-icon-search" v-model="filter.keyWord"
clearable />
</li>
</ul>
<div>
<el-button type="primary" @click="add">新增模板</el-button>
</div>
</div>
<el-table :data="projects" class="table" stripe header-align="center">
<el-table-column width="60" label="选择" align="center">
<template slot-scope="scope">
<el-radio v-model="scope.row.paperId" :label="scope.row.paperId">&nbsp;</el-radio>
</template>
</el-table-column>
<el-table-column type="index" width="60" label="序号" align="center"></el-table-column>
<el-table-column prop="name" label="试卷名称" min-width="140" align="center"></el-table-column>
<el-table-column prop="questionCount" label="试题总数" align="center" min-width="70"></el-table-column>
<el-table-column prop="score" label="总分" align="center" min-width="70"></el-table-column>
<el-table-column prop="difficult" label="试卷难度" align="center" min-width="70" sortable="custom">
<template slot-scope="scope">{{ difficults.find(e => e.id === scope.row.difficult) ? difficults.find(e =>
e.id === scope.row.difficult).name : '' }}</template>
</el-table-column>
<el-table-column prop="suggestTime" label="建议用时" align="center" min-width="70">
<template slot-scope="scope">{{ scope.row.suggestTime }}min</template>
</el-table-column>
<el-table-column prop="classificationPath" label="试卷分类" align="center" min-width="70"
show-overflow-tooltip></el-table-column>
<el-table-column label="建议用途" align="center" min-width="70">
<template slot-scope="scope">{{ paperTypes.find(e => e.id === scope.row.paperType) ? paperTypes.find(e =>
e.id === scope.row.paperType).name : '' }}</template>
</el-table-column>
<el-table-column prop="updateTime" label="最近编辑时间" align="center" width="170"></el-table-column>
<el-table-column prop="createUser" label="最近编辑人" align="center" width="110"></el-table-column>
</el-table>
<div class="pagination">
<el-pagination background :page-size="pageSize" @current-change="handleCurrentChange"
layout="total,prev, pager, next" :total="total"></el-pagination>
</div>
<span slot="footer" class="dialog-footer">
<el-button @click="selectQuesVisible = false">取消</el-button>
<el-button type="primary" :loading="submiting" @click="submit">确定</el-button>
</span>
</el-dialog>
</div>
</template>
<script>
import Setting from '@/setting'
import Util from '@/libs/util'
import _ from 'lodash'
export default {
props: ['visible'],
data () {
return {
arabicToChinese: Util.arabicToChinese,
listVisible: false,
searchTimer: null,
questionTypes: [
{
name: '单选题'
},
{
name: '多选题'
},
{
name: '判断题'
},
{
name: '填空题'
},
{
name: '问答题'
},
],
filter: {
keyWord: '',
},
list: [],
page: 1,
pageSize: 10,
total: 0,
submiting: false,
};
},
watch: {
'filter.keyWord': function (val) {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(this.initData, 500)
},
visible () {
this.listVisible = this.visible
this.visible && this.getList()
}
},
mounted () {
this.originForm = _.cloneDeep(this.form)
},
methods: {
//
async getList () {
try {
const res = await this.$post(this.api.examPaperList, {
pageNum: this.page,
pageSize: this.pageSize,
type: 1,
keyWord: this.keyword,
libraryId: this.systemId
})
this.projects = res.pageList.records
this.total = res.pageList.total
} catch (e) { }
},
//
currentChange (val) {
this.page = val
this.getList()
},
initData () {
this.page = 1
this.getList()
},
//
add () {
this.form = _.cloneDeep(this.originForm)
this.detailVisible = true
},
//
addLine (i) {
this.form.paperOutline.splice(i + 1, 0, {
examQuestions: [],
outlineName: '',
questionNum: '',
questionType: '',
targetScore: '',
})
},
//
delLine (i) {
this.form.paperOutline.length > 1 && this.form.paperOutline.splice(i, 1)
},
// 使
async useTemplate (row) {
const data = await this.getDetail(row.templateId)
this.$parent.form.paperOutline = data.paperOutline
this.listVisible = false
},
//
async getDetail (id) {
const res = await this.$get(this.api.templateDetails, {
id
})
return res.template
},
//
async edit (row) {
this.detailVisible = true
const data = await this.getDetail(row.templateId)
this.form = data
},
//
async del (row) {
try {
await this.$confirm(`确认要删除【${row.templateName}】吗?`, '提示', {
confirmButtonText: '确定',
cancelButtonText: '取消',
type: 'warning',
closeOnClickModal: false,
})
await this.$post(this.api.deleteTemplate, {
ids: [row.templateId]
})
Util.successMsg('删除成功')
this.getList()
} catch (e) { }
},
//
async submit () {
if (this.submiting) return false
const { form } = this
if (!form.templateName) return Util.warningMsg('请输入模板名称')
let invalid = 0
for (const e of form.paperOutline) {
if (!e.questionType) {
Util.warningMsg('请选择题型')
invalid = 1
break
}
if (!e.questionNum) {
Util.warningMsg('请输入目标题数')
invalid = 1
break
}
if (!e.targetScore) {
Util.warningMsg('请输入目标分值')
invalid = 1
break
}
}
if (invalid) return false
this.submiting = true
form.createSource = 1
form.questionNum = this.questionNum
form.totalScore = this.totalScore
form.outlineNum = form.paperOutline.length
form.questionType = [...new Set(form.paperOutline.map(e => e.questionType))].join('、')
try {
await this.$post(this.api.saveExamPaperTemplate, form)
Util.successMsg('保存成功')
this.detailVisible = false
this.submiting = false
this.getList()
} catch (e) {
this.submiting = false
}
},
//
closeDia () {
this.$emit('update:visible', false)
}
}
};
</script>
<style lang="scss" scoped></style>

@ -1,204 +1,137 @@
<template> <template>
<div class="wrap"> <div class="wrap">
<el-card shadow="hover" <el-card shadow="hover" class="m-b-20">
class="m-b-20"> <el-page-header @back="$router.back()" content="查看报告"></el-page-header>
<el-page-header @back="$router.back()"
content="查看报告"></el-page-header>
</el-card> </el-card>
<div class="content" <div class="content" v-loading="loading">
v-loading="loading">
<div class="text-right"> <div class="text-right">
<el-button type="primary" <el-button type="primary" @click="exportPage">导出报告</el-button>
@click="exportPage">导出报告</el-button>
</div> </div>
<h6 class="r-title">标准实验报告</h6> <h6 class="r-title">标准实验报告</h6>
<div class="info"> <div class="info">
<h6 class="l-title"> <h6 class="l-title">
<img src="@/assets/img/info1.png" <img src="@/assets/img/info1.png" alt="">
alt="">
基本信息 基本信息
</h6> </h6>
<ul :class="['info-list', {edit: editing}]"> <ul :class="['info-list', { edit: editing }]">
<li> <li>
<label>学生姓名</label> <label>学生姓名</label>
<el-input v-if="editing" <el-input v-if="editing" v-model="infoData.userName" disabled></el-input>
v-model="infoData.userName"
disabled></el-input>
<span v-else>{{ infoData.userName }}</span> <span v-else>{{ infoData.userName }}</span>
</li> </li>
<li> <li>
<label>学生学号</label> <label>学生学号</label>
<el-input v-if="editing" <el-input v-if="editing" v-model="infoData.workNumber" disabled></el-input>
v-model="infoData.workNumber"
disabled></el-input>
<span v-else>{{ infoData.workNumber }}</span> <span v-else>{{ infoData.workNumber }}</span>
</li> </li>
<li> <li>
<label>实验时间</label> <label>实验时间</label>
<el-input v-if="editing" <el-input v-if="editing" v-model="infoData.submitTime" disabled></el-input>
v-model="infoData.submitTime"
disabled></el-input>
<span v-else>{{ infoData.submitTime }}</span> <span v-else>{{ infoData.submitTime }}</span>
</li> </li>
<li> <li>
<label>实验成绩</label> <label>实验成绩</label>
<el-input v-if="editing" <el-input v-if="editing" v-model="infoData.score" disabled></el-input>
v-model="infoData.score" <div v-else class="score-wrap">
disabled></el-input>
<div v-else
class="score-wrap">
<em>{{ infoData.score }}</em> <em>{{ infoData.score }}</em>
<img src="@/assets/img/point.png" <img src="@/assets/img/point.png" alt="">
alt="">
</div> </div>
</li> </li>
<li> <li>
<label>学生班级</label> <label>学生班级</label>
<el-input v-if="editing" <el-input v-if="editing" v-model="infoData.className"></el-input>
v-model="infoData.className"></el-input>
<span v-else>{{ infoData.className }}</span> <span v-else>{{ infoData.className }}</span>
</li> </li>
<li> <li>
<label>指导老师</label> <label>指导老师</label>
<el-input v-if="editing" <el-input v-if="editing" v-model="infoData.instructor"></el-input>
v-model="infoData.instructor"></el-input>
<span v-else>{{ infoData.instructor }}</span> <span v-else>{{ infoData.instructor }}</span>
</li> </li>
<li> <li>
<label>实验学时</label> <label>实验学时</label>
<el-input v-if="editing" <el-input v-if="editing" v-model="infoData.period"></el-input>
v-model="infoData.period"></el-input>
<span v-else>{{ infoData.period }}</span> <span v-else>{{ infoData.period }}</span>
</li> </li>
</ul> </ul>
<div class="m-b-20"> <div class="m-b-20">
<h6 class="l-title"> <h6 class="l-title">
<img src="@/assets/img/report2.png" <img src="@/assets/img/report2.png" alt="">
alt="">
实验项目名称 实验项目名称
</h6> </h6>
<el-input v-if="editing" <el-input v-if="editing" v-model="form.projectName" type="textarea"></el-input>
v-model="form.projectName" <div v-else class="pre-wrap" v-html="form.projectName"></div>
type="textarea"></el-input>
<div v-else
class="pre-wrap"
v-html="form.projectName"></div>
</div> </div>
<div class="m-b-20"> <div class="m-b-20">
<h6 class="l-title"> <h6 class="l-title">
<img src="@/assets/img/report3.png" <img src="@/assets/img/report3.png" alt="">
alt="">
实验目的 实验目的
</h6> </h6>
<div :class="['pre-wrap', {edit: editing}]" <div :class="['pre-wrap', { edit: editing }]" v-html="form.purpose"></div>
v-html="form.purpose"></div>
</div> </div>
<div class="m-b-20"> <div class="m-b-20">
<h6 class="l-title"> <h6 class="l-title">
<img src="@/assets/img/report4.png" <img src="@/assets/img/report4.png" alt="">
alt="">
实验数据 实验数据
</h6> </h6>
<el-table :data="expData" <el-table :data="expData" class="table" border stripe header-align="center">
class="table" <el-table-column type="index" label="序号" align="center" width="60">
border
stripe
header-align="center">
<el-table-column type="index"
label="序号"
align="center"
width="60">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.$index + 1 }} {{ scope.$index + 1 }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="judgmentName" <el-table-column prop="judgmentName" label="判分点" width="270" align="center"></el-table-column>
label="判分点" <el-table-column v-if='project' prop="judgmentName" label="考核点" align="center" width="150">
width="270"
align="center"></el-table-column>
<el-table-column v-if='project'
prop="judgmentName"
label="考核点"
align="center"
width="150">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-for="(item, index) in scope.row.lcRuleRecords" <div v-for="(item, index) in scope.row.lcRuleRecords" :key="index">
:key="index">
<span> <span>
<span>{{index+1}}. </span>{{item.name}} <span>{{ index + 1 }}. </span>{{ item.name }}
</span> </span>
</div> </div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="ruleAnswer" <el-table-column prop="ruleAnswer" label="参考答案" style='word-wrap: break-word'>
label="参考答案"
style='word-wrap: break-word'>
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if='scope.row.lcRuleRecords'> <div v-if='scope.row.lcRuleRecords'>
<div v-for="(item, index) in scope.row.lcRuleRecords" <div v-for="(item, index) in scope.row.lcRuleRecords" :key="index">
:key="index">
<span> <span>
<span>{{index+1}}. </span>{{item.ruleAnswer}} <span>{{ index + 1 }}. </span>{{ item.ruleAnswer }}
</span> </span>
</div> </div>
</div> </div>
<div v-else <div v-else v-html="scope.row.referenceAnswer"></div>
v-html="scope.row.referenceAnswer"></div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="userAnswer" <el-table-column prop="userAnswer" label="学生答案">
label="学生答案">
<template slot-scope="scope"> <template slot-scope="scope">
<div v-if='scope.row.lcRuleRecords'> <div v-if='scope.row.lcRuleRecords'>
<div v-for="(item, index) in scope.row.lcRuleRecords" <div v-for="(item, index) in scope.row.lcRuleRecords" :key="index">
:key="index">
<span v-if='item.userAnswer'> <span v-if='item.userAnswer'>
<span>{{index+1}}. </span>{{item.userAnswer}} <span>{{ index + 1 }}. </span>{{ item.userAnswer }}
</span> </span>
<span v-else> <span v-else>
<span>{{index+1}}. </span>未填写 <span>{{ index + 1 }}. </span>未填写
</span> </span>
</div> </div>
</div> </div>
<div v-else <div v-else v-html='scope.row.answer' style='white-space: pre-wrap'></div>
v-html='scope.row.answer'
style='white-space: pre-wrap'></div>
<template v-if="scope.row.runThePictureList"> <template v-if="scope.row.runThePictureList">
<img v-for="(img, i) in scope.row.runThePictureList" <img v-for="(img, i) in scope.row.runThePictureList" :key="i" width="200" class="result-pic"
:key="i" :src="img" alt="">
width="200"
class="result-pic"
:src="img"
alt="">
</template> </template>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="quesScore" <el-table-column prop="quesScore" label="分值" :key="6" width="80" align="center"></el-table-column>
label="分值" <el-table-column prop="score" label="得分" width="80" align="center"></el-table-column>
:key="6"
width="80"
align="center"></el-table-column>
<el-table-column prop="score"
label="得分"
width="80"
align="center"></el-table-column>
</el-table> </el-table>
</div> </div>
<div class="m-b-20"> <div class="m-b-20">
<h6 class="l-title"> <h6 class="l-title">
<img src="@/assets/img/report5.png" <img src="@/assets/img/report5.png" alt="">
alt="">
实验总结与体会 实验总结与体会
</h6> </h6>
<quill v-if="editing" <quill v-if="editing" :border="true" v-model="form.summarize" :minHeight="150" :height="150" />
:border="true" <div v-else class="pre-wrap" v-html="form.summarize"></div>
v-model="form.summarize"
:minHeight="150"
:height="150" />
<div v-else
class="pre-wrap"
v-html="form.summarize"></div>
</div> </div>
</div> </div>
</div> </div>
@ -318,132 +251,160 @@ export default {
<style lang="scss" scoped> <style lang="scss" scoped>
.wrap { .wrap {
padding: 12px 300px 20px; padding: 12px 300px 20px;
} }
.text-right { .text-right {
text-align: right; text-align: right;
} }
code, code,
kbd, kbd,
samp { samp {
font-family: 'PingFang SC', 'Helvetica Neue', Helvetica, 'microsoft yahei', arial, STHeiTi, sans-serif; font-family: 'PingFang SC', 'Helvetica Neue', Helvetica, 'microsoft yahei', arial, STHeiTi, sans-serif;
word-wrap: break-word; word-wrap: break-word;
white-space: pre-wrap; white-space: pre-wrap;
} }
/deep/ pre { /deep/ pre {
white-space: pre-wrap; /* css-3 */ white-space: pre-wrap;
white-space: -moz-pre-wrap; /* Mozilla, since 1999 */ /* css-3 */
white-space: pre-wrap; /* Opera 4-6 */ white-space: -moz-pre-wrap;
white-space: -o-pre-wrap; /* Opera 7 */ /* Mozilla, since 1999 */
word-wrap: break-word; /* Internet Explorer 5.5+ */ white-space: pre-wrap;
word-break: break-all; /* Opera 4-6 */
overflow: hidden; white-space: -o-pre-wrap;
font-size: 12px; /* Opera 7 */
font-weight: 400; word-wrap: break-word;
font-family: 'PingFang SC', 'Helvetica Neue', Helvetica, 'microsoft yahei', arial, STHeiTi, sans-serif; /* Internet Explorer 5.5+ */
word-break: break-all;
overflow: hidden;
font-size: 12px;
font-weight: 400;
font-family: 'PingFang SC', 'Helvetica Neue', Helvetica, 'microsoft yahei', arial, STHeiTi, sans-serif;
} }
.content { .content {
padding: 16px 40px; padding: 16px 40px;
background: #fff; background: #fff;
.r-title {
margin-bottom: 40px; .r-title {
font-size: 24px; margin-bottom: 40px;
text-align: center; font-size: 24px;
color: #333; text-align: center;
} color: #333;
.info { }
padding: 20px 16px;
border: 1px solid #e1e6f2; .info {
padding: 20px 16px;
border: 1px solid #e1e6f2;
}
.l-title {
display: flex;
align-items: center;
padding: 5px 8px;
margin-bottom: 12px;
font-size: 14px;
color: #333;
background-color: #f7f5ff;
}
.info-list {
display: flex;
flex-wrap: wrap;
padding: 10px 0 0 20px;
li {
display: inline-flex;
width: 23%;
padding: 0 10px;
margin-bottom: 34px;
} }
.l-title {
display: flex; &.edit {
li {
align-items: center; align-items: center;
padding: 5px 8px; }
margin-bottom: 12px;
font-size: 14px;
color: #333;
background-color: #f7f5ff;
} }
.info-list {
display: flex; label {
flex-wrap: wrap; font-size: 14px;
padding: 10px 0 0 20px; color: #333;
li { white-space: nowrap;
display: inline-flex;
width: 23%;
padding: 0 10px;
margin-bottom: 34px;
}
&.edit {
li {
align-items: center;
}
}
label {
font-size: 14px;
color: #333;
white-space: nowrap;
}
span {
min-width: 150px;
padding: 0 10px 3px;
border-bottom: 1px solid #e1e6f2;
}
/deep/.el-input {
width: 174px;
}
} }
.score-wrap {
position: relative; span {
min-width: 150px; min-width: 150px;
border-bottom: 1px solid #e1e6f2; padding: 0 10px 3px;
em { border-bottom: 1px solid #e1e6f2;
position: absolute;
top: -12px;
left: 30px;
font-family: din;
font-size: 30px;
font-weight: 600;
color: #0b1d30;
}
img {
position: absolute;
bottom: -15px;
left: 0;
}
} }
/deep/.el-textarea .el-textarea__inner,
.pre-wrap { /deep/.el-input {
min-height: 72px; width: 174px;
padding: 10px 16px;
font-size: 14px;
color: #333;
&.edit {
color: #abb3c6;
border: 1px solid #cacfdb;
border-radius: 4px;
background-color: #f6f7f9;
}
} }
/deep/ .table th { }
background-color: #e5dfff !important;
.cell { .score-wrap {
line-height: 35px; position: relative;
color: #fff; min-width: 150px;
} border-bottom: 1px solid #e1e6f2;
em {
position: absolute;
top: -12px;
left: 30px;
font-family: din;
font-size: 30px;
font-weight: 600;
color: #0b1d30;
}
img {
position: absolute;
bottom: -15px;
left: 0;
}
}
/deep/.el-textarea .el-textarea__inner,
.pre-wrap {
min-height: 72px;
padding: 10px 16px;
font-size: 14px;
color: #333;
&.edit {
color: #abb3c6;
border: 1px solid #cacfdb;
border-radius: 4px;
background-color: #f6f7f9;
} }
}
/deep/ .table th {
background-color: #e5dfff !important;
.cell {
line-height: 35px;
color: #fff;
}
}
} }
.result-pic { .result-pic {
margin: 10px 0; margin: 10px 0;
} }
@media (max-width: 1650px) { @media (max-width: 1650px) {
.wrap { .wrap {
padding: 12px 200px 20px; padding: 12px 200px 20px;
} }
} }
@media (max-width: 1430px) { @media (max-width: 1430px) {
.wrap { .wrap {
padding: 12px 100px 20px; padding: 12px 100px 20px;
} }
} }
</style> </style>

@ -69,11 +69,13 @@
</el-table-column> </el-table-column>
<el-table-column label="操作" align="center" width="270"> <el-table-column label="操作" align="center" width="270">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-auth="'/match:管理:报名人员:编辑'" type="text" @click="edit(scope.row)">编辑</el-button> <template v-if="!scope.row.isDel">
<el-button type="text" @click="del(scope.row)">删除</el-button> <el-button v-auth="'/match:管理:报名人员:编辑'" type="text" @click="edit(scope.row)">编辑</el-button>
<el-button type="text" @click="del(scope.row)">删除</el-button>
</template>
<template v-if="info.releaseType"> <template v-if="info.releaseType">
<el-button v-auth="'/match:管理:报名人员:参赛信息与成绩'" type="text" @click="toInfo(scope.row)">参赛信息与成绩</el-button> <el-button v-auth="'/match:管理:报名人员:参赛信息与成绩'" type="text" @click="toInfo(scope.row)">参赛信息与成绩</el-button>
<el-switch v-auth="'/match:管理:报名人员:禁用'" v-model="scope.row.isDisable" <el-switch v-if="!scope.row.isDel" v-auth="'/match:管理:报名人员:禁用'" v-model="scope.row.isDisable"
:active-text="scope.row.isDisable ? '禁用' : '启用'" :active-value="0" :inactive-value="1" :active-text="scope.row.isDisable ? '禁用' : '启用'" :active-value="0" :inactive-value="1"
style="margin: 0 10px 0 5px" @change="switchOff($event, scope.row, scope.$index)"></el-switch> style="margin: 0 10px 0 5px" @change="switchOff($event, scope.row, scope.$index)"></el-switch>
</template> </template>

Loading…
Cancel
Save