dev_202412
yujialong 2 months ago
parent 0285777652
commit a352c30a98
  1. 4
      src/api/index.js
  2. 12
      src/pages/achievement/show/index.vue
  3. 43
      src/pages/lesson/content/source.vue
  4. 14
      src/pages/match/add/index.vue
  5. 231
      src/pages/match/add/set.vue
  6. 36
      src/pages/match/add/step3.vue
  7. 10
      src/pages/match/manage/trialReport.vue
  8. 24
      src/pages/station/preview/index.vue

@ -194,6 +194,10 @@ export default {
queryAbnormalTeam: `competition/teamAbnormalInformation/queryAbnormalTeam`,
viewEventAllocationInformation: `competition/competitionAutomaticAllocationRecord/viewEventAllocationInformation`,
getDetailedExamScores: `exam/exam/paper/getDetailedExamScores`,
getProjectListOfSystem: `nakadai/mallProjectConfig/getProjectListOfSystem`,
getSystemListOfMall: `nakadai/mallProjectConfig/getSystemListOfMall`,
libraryList: `exam/exam/paperLibrary/libraryList`,
examPaperList: `exam/exam/paper/examPaperList`,
exportExamPaperReport: `${host}exam/exam/paper/exportExamPaperReport`,
// 赛事内容

@ -6,7 +6,7 @@
<div class="content" v-loading="loading">
<div class="text-right">
<el-button type="primary" @click="exportPage">导出报告</el-button>
<el-button type="primary" :loading="exporting" @click="exportPage">导出报告</el-button>
</div>
<h6 class="r-title">标准实验报告</h6>
<div class="info">
@ -155,7 +155,7 @@ export default {
infoData: {},
expData: [],
editing: false,
loadIns: null,
exporting: false,
loading: false,
isLc: false,
userScores: []
@ -238,6 +238,7 @@ export default {
this.loading = false
},
async exportPage () {
this.exporting = true
const form = Object.assign(this.form, this.infoData)
const list = JSON.parse(JSON.stringify(this.expData))
list.map((e, i) => {
@ -251,14 +252,17 @@ export default {
for (const i in form) {
if (form[i] && typeof form[i] === 'string') form[i] = form[i].replace(/<[^>]+>/g, '')
}
form.purpose = form.purpose.replace(/<[^>]+>/g, '')
if (form.purpose) form.purpose = form.purpose.replace(/<[^>]+>/g, '')
this.$post(this.isLc ? this.api.exportBankExperimentReport : this.api.exportLabReport, {
...form,
experimentalData: list
}).then(res => {
console.log(res)
util.downloadFileDirect(`实验报告.docx`, new Blob([res]))
}).catch(res => { })
this.exporting = false
}).catch(res => {
this.exporting = false
})
},
}
};

@ -1,7 +1,7 @@
<template>
<el-drawer title="添加系统资源" :visible.sync="sourceVisible" size="1200px" :close-on-click-modal="false"
custom-class="source-dia" @closed="closeDia">
<div class="overflow">
<div class="overflow" v-loading="loading">
<div class="left">
<el-input style="width: 300px" placeholder="请输入资源名称" prefix-icon="el-icon-search" v-model="keyword"
clearable></el-input>
@ -117,7 +117,7 @@ export default {
checked: [],
submiting: false,
loaded: 0,
loading: false,
};
},
watch: {
@ -141,26 +141,31 @@ export default {
},
//
async getCourse () {
const { list } = await this.$post(`${this.api[this.active === 'tab1' ? 'curriculumTree' : 'boutiqueCurriculumTree']}?name=${this.keyword}`)
if (list.length) {
const all = []
list.forEach(e => {
e.shrink = false
e.check = false
e.chapters.forEach(n => {
n.shrink = false
n.check = false
all.push(...n.subsections)
n.subsections.forEach(m => {
m.check = false
try {
this.loading = true
const { list } = await this.$post(`${this.api[this.active === 'tab1' ? 'curriculumTree' : 'boutiqueCurriculumTree']}?name=${this.keyword}`)
if (list.length) {
const all = []
list.forEach(e => {
e.shrink = false
e.check = false
e.chapters.forEach(n => {
n.shrink = false
n.check = false
all.push(...n.subsections)
n.subsections.forEach(m => {
m.check = false
})
})
})
})
list[0].shrink = true
list[0].chapters[0].shrink = true
this.allSections = all
list[0].shrink = true
list[0].chapters[0].shrink = true
this.allSections = all
}
this.course = list
} finally {
this.loading = false
}
this.course = list
},
initData () {
this.page = 1

@ -326,28 +326,28 @@ export default {
.active {
.circle {
color: #fff;
border-color: #2c45a1;
background: $main-color;
border-color: #26499f;
background: #062c87;
}
.text {
color: $main-color;
color: #062c87;
}
}
.done {
.circle {
color: #fff;
background: #9c86ff;
border-color: #2c45a1;
background: #062c87;
border-color: #26499f;
&:after {
background: #2c45a1;
background: #062c87;
}
}
.text {
color: #9178ff;
color: #062c87;
}
}

@ -24,16 +24,89 @@
</div>
</div>
</el-card>
<el-card shadow="hover" class="mgr20 m-b-20">
<!-- 理论系统选择试卷库非理论则选择系统 -->
<el-card shadow="hover" class="m-b-20">
<div>
<p class="m-b-20">课程</p>
<el-radio-group class="m-b-20" v-model="courseSystem">
<el-radio :label="0">从课程中选择</el-radio>
<el-radio :label="1">从系统中选择</el-radio>
</el-radio-group>
<div class="inline-input">
<el-cascader v-model="mallIds" :options="curs" :props="{ checkStrictly: true, value: 'id' }"
popper-class="course-cas" @expand-change="curChange" @change="curChange"></el-cascader>
<!-- 理论 && 选择课程 -->
<el-select v-if="isTheory && !courseSystem" 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>
<!-- 实训 && 选择课程 -->
<el-cascader v-else-if="!isTheory && !courseSystem" ref="cur" v-model="mallIds" :options="curs"
:props="{ checkStrictly: true, value: 'id' }" popper-class="course-cas" @expand-change="curChange"
@change="curChange"></el-cascader>
<!-- 实训 && 选择系统 -->
<el-select v-else-if="!isTheory && courseSystem" v-model="systemId" placeholder="请选择系统" @change="getProject">
<el-option v-for="(item, i) in services" :key="i" :label="item.systemName" :value="item.systemId">
</el-option>
</el-select>
</div>
</div>
</el-card>
<el-card shadow="hover" class="m-b-20">
<!-- 理论系统 -->
<el-card v-if="isTheory" 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>
</div>
</div>
<p v-if="form.paperName" style="margin-bottom: 20px">
已选试卷{{ form.paperName }}
<el-button type="primary" size="mini" @click="previewPaper(form)">预览</el-button>
</p>
<el-table :data="projects" class="table" header-align="center">
<el-table-column width="60" label="选择" align="center">
<template slot-scope="scope">
<el-radio v-model="form.paperId" :label="scope.row.paperId" @change="paperChange">&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-column label="操作" align="center" width="80">
<template slot-scope="scope">
<el-button type="text" @click="previewPaper(scope.row)">预览</el-button>
</template>
</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>
<el-card v-else shadow="hover" class="m-b-20">
<div class="flex-between m-b-20">
<span>实训项目</span>
<div style="display: inline-flex;">
@ -82,26 +155,42 @@
</template>
<script>
import util from "@/libs/util";
import Util from '@/libs/util'
import { Loading } from 'element-ui'
import TestPaperConst from '@/const/testPaper'
export default {
props: ['form', 'step1'],
data () {
return {
difficults: TestPaperConst.difficults,
paperTypes: TestPaperConst.paperTypes,
loadIns: null,
curriculumList: [],
curs: [],
mallIds: [],
systemId: '',
systems: [],
curs: [],
paperLibraries: [],
services: [],
keyword: '',
projects: [],
page: 1,
pageSize: 5,
total: 0,
libraryId: '',
sysId: '',
paperId: '',
paperName: '',
permissionsKeys: ['练习', '考核', '竞赛'],
timeInvalid: false
timeInvalid: false,
courseSystem: 1,
};
},
computed: {
//
isTheory () {
return this.form.method === 1
},
},
watch: {
// ,
form: {
@ -118,11 +207,13 @@ export default {
}
},
mounted () {
this.getSystemData()
// this.getCourse()
this.getSystem()
// this.isTheory ? this.getLibrary() : this.getCourse()
},
methods: {
//
async getSystemData () {
async getCourse () {
const { data } = await this.$get(this.api.getSystemIdBySchool)
const res = await this.$get(this.api.getSchoolEffectiveCourse)
const { mallId, cid, systemId } = this.form
@ -144,6 +235,14 @@ export default {
this.getProject()
}
},
//
async getSystem () {
const { data } = await this.$get(this.api.getSystemListOfMall)
this.services = data
this.systemId = data[0].systemId
this.loadIns = Loading.service()
this.getProject()
},
//
curChange (val) {
const id = val[0]
@ -158,32 +257,74 @@ export default {
this.loadIns = Loading.service()
this.getProject()
},
//
async getLibrary () {
try {
const res = await this.$post(this.api.libraryList, {
pageNum: 1,
pageSize: 10000,
type: 1,
isDisable: 0,
})
const { records } = res.pageList
if (records.length) {
this.paperLibraries = records
this.libraryId = records[0].libraryId
this.loadIns = Loading.service()
this.getProject()
}
} finally { }
},
//
getProject () {
this.$post(this.api.getProjectAssessmentByCompetition, {
pageNum: this.page,
pageSize: this.pageSize,
cid: this.form.cid,
projectName: this.keyword,
systemId: this.sysId,
permissions: 2
}).then(({ data }) => {
this.projects = data.records
this.total = data.total
this.loadIns.close()
}).catch(err => {
async getProject () {
try {
//
if (this.isTheory) {
const res = await this.$post(this.api.examPaperList, {
pageNum: this.page,
pageSize: this.pageSize,
type: 1,
keyWord: this.keyword,
libraryId: this.libraryId,
isDisable: 0,
status: 1
})
this.projects = res.pageList.records
this.total = res.pageList.total
} else { //
//
if (this.courseSystem) {
const res = await this.$get(this.api.getProjectListOfSystem, {
systemId: this.systemId
})
this.projects = res.data
} else {
const { data } = await this.$post(this.api.getProjectAssessmentByCompetition, {
pageNum: this.page,
pageSize: this.pageSize,
cid: this.form.cid,
projectName: this.keyword,
systemId: this.sysId,
permissions: 2
})
this.projects = data.records
this.total = data.total
this.loadIns.close()
}
}
} finally {
this.loadIns.close()
});
}
},
initData () {
this.page = 1;
this.getProject();
this.page = 1
this.getProject()
},
handleCurrentChange (val) {
this.page = val;
this.getProject();
this.page = val
this.getProject()
},
//
toProject () {
@ -204,7 +345,7 @@ export default {
const { playStartTime, playEndTime } = this.step1
if (startTime < new Date(playStartTime) || endTime > new Date(playEndTime)) {
this.timeInvalid = true
return util.warningMsg('设置的阶段比赛时间必须要在第一步设置的竞赛时间范围内,请重新设置。')
return Util.warningMsg('设置的阶段比赛时间必须要在第一步设置的竞赛时间范围内,请重新设置。')
}
this.timeInvalid = false
const { form, curStep } = this.$parent
@ -214,7 +355,7 @@ export default {
const time1 = new Date(form[i].startTime)
const time2 = new Date(form[i].endTime)
if ((startTime >= time1 && startTime <= time2) || (endTime >= time1 && endTime <= time2)) {
util.warningMsg('请注意,所设置的时间与已设置的阶段时间重合。')
Util.warningMsg('请注意,所设置的时间与已设置的阶段时间重合。')
break
}
}
@ -224,15 +365,27 @@ export default {
//
save () {
const { form } = this
if (!form.time.length) return util.warningMsg('请选择比赛时间')
if (!form.time.length) return Util.warningMsg('请选择比赛时间')
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 (!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
if (new Date(form.time[0]) < new Date(playStartTime) || new Date(form.time[1]) > new Date(playEndTime)) return Util.warningMsg('设置的阶段比赛时间必须要在第一步设置的竞赛时间范围内,请重新设置。')
//
if (this.isTheory) {
if (!this.libraryId) return Util.warningMsg('请选择试卷库')
if (!form.paperId) return Util.warningMsg('请选择试卷')
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
}
console.log(11, form)
form.startTime = form.time[0]
form.endTime = form.time[1]
this.$emit('hideSet', this.form)

@ -60,11 +60,22 @@
</el-form-item>
</template>
<template v-else>
<el-form-item class="req" prop="cid" label="课程系统">
{{ item.systemName }}
</el-form-item>
<el-form-item class="req" prop="assessmentId" label="已选择考核">
{{ item.projectName }}
<template v-if="item.method === 0">
<el-form-item class="req" prop="cid" label="课程系统">
{{ item.systemName }}
</el-form-item>
<el-form-item class="req" prop="assessmentId" label="已选择考核">
{{ item.projectName }}
</el-form-item>
</template>
<el-form-item v-else class="req" label="已选择试卷">
<div class="flex">
{{ item.paperName }}&emsp;
<el-form>
<el-button v-if="item.paperName" type="primary" size="mini" :disabled="false"
@click="previewPaper(item)">预览</el-button>
</el-form>
</div>
</el-form-item>
<el-form-item class="req" prop="resultAnnouncementTime" label="比赛地点">
<div class="line">
@ -103,7 +114,7 @@
<script>
import Oss from '@/components/upload/upload.js'
import Util from "@/libs/util";
import Util from '@/libs/util'
import Setting from "@/setting";
import set from './set'
export default {
@ -247,6 +258,19 @@ export default {
this.setVisible = false
this.$parent.showBtns = true
},
//
previewPaper (row) {
let url = `${location.origin}/examination`
if (Setting.isDev) {
url = `http://192.168.31.125:8098/`
} else if (Setting.isPro) {
const { host } = location
url = `https://${host === 'dev.huorantech.cn' ? host : 'www.huorantech.cn'}/examination/`
}
url += `#/testPaper/preview?id=${row.paperId}&token=${sessionStorage.getItem('token')}`
localStorage.setItem('exam_token', sessionStorage.getItem('token'))
window.open(url)
},
//
timeChange (val) {
if (val.length) {

@ -6,7 +6,7 @@
<div class="content" v-loading="loading">
<div class="text-right">
<el-button type="primary" @click="exportPage">导出报告</el-button>
<el-button type="primary" :loading="exporting" @click="exportPage">导出报告</el-button>
</div>
<h6 class="r-title">标准实验报告</h6>
<div class="info">
@ -155,7 +155,7 @@ export default {
infoData: {},
expData: [],
editing: false,
loadIns: null,
exporting: false,
loading: false,
isLc: false,
userScores: []
@ -217,6 +217,7 @@ export default {
this.loading = false
},
exportPage () {
this.exporting = true
const form = Object.assign(this.form, this.infoData)
const list = JSON.parse(JSON.stringify(this.expData))
list.map((e, i) => {
@ -237,7 +238,10 @@ export default {
}).then(res => {
console.log(res)
util.downloadFileDirect(`实验报告.docx`, new Blob([res]))
}).catch(res => { })
this.exporting = false
}).catch(res => {
this.exporting = false
})
},
}
};

@ -278,9 +278,9 @@
</div>
</div>
<el-dialog title="请选择项目" v-loading="loading" :visible.sync="projectVisible" width="828px" custom-class="project-dia"
<el-dialog title="请选择项目" :visible.sync="projectVisible" width="828px" custom-class="project-dia"
:close-on-click-modal="false">
<ul class="projects">
<ul class="projects" v-loading="loading">
<template v-if="isTheory">
<li v-for="(item, i) in papers" :key="i" :class="{ active: curPaper == item.paperId }"
@click="selectPaper(item)">
@ -824,17 +824,21 @@ export default {
this.projectVisible = true
},
//
queryProject () {
async queryProject () {
if (this.mallId) {
this.$get(this.api.getProjectBySystemId, {
systemId: this.systemIds,
cId: this.courseId, // id
mallId: this.mallId,
permissions: 0 // 0: ,1:
}).then(res => {
try {
this.loading = true
const res = await this.$get(this.api.getProjectBySystemId, {
systemId: this.systemIds,
cId: this.courseId, // id
mallId: this.mallId,
permissions: 0 // 0: ,1:
})
this.projects = res.projects //
this.papers = res.exercisePaperList //
}).catch(res => { })
} finally {
this.loading = false
}
}
},
//

Loading…
Cancel
Save