yujialong 4 weeks ago
parent 53dcea81dd
commit da0efc51bc
  1. 2
      public/index.html
  2. 1
      src/api/index.js
  3. 2
      src/pages/achievement/info/course.vue
  4. 11
      src/pages/achievement/info/project.vue
  5. 148
      src/pages/achievement/list/project.vue
  6. 8
      src/pages/achievement/show/index.vue
  7. 18
      src/pages/assessment/add/index.vue
  8. 2
      src/pages/match/manage/matchInfo.vue
  9. 6
      src/pages/match/manage/trialReport.vue
  10. 14
      src/router/permission.js

@ -10,7 +10,7 @@
var _hmt = _hmt || []; var _hmt = _hmt || [];
(function() { (function() {
var hm = document.createElement('script'); var hm = document.createElement('script');
hm.src = 'https://hm.baidu.com/hm.js?72fbad6ebf1d6c705117fe8fe0686a0e'; hm.src = 'https://hm.baidu.com/hm.js?e4d7deeca2d6ea71d2bd5fa2365bc654';
var s = document.getElementsByTagName('script')[0]; var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(hm, s); s.parentNode.insertBefore(hm, s);
})(); })();

@ -101,6 +101,7 @@ export default {
schoolCourse: `nakadai/nakadai/curriculum/schoolCourse`, // 获取学校购买订单后的课程 schoolCourse: `nakadai/nakadai/curriculum/schoolCourse`, // 获取学校购买订单后的课程
getSchoolEffectiveCourse: `nakadai/nakadai/curriculum/getSchoolEffectiveCourse`, getSchoolEffectiveCourse: `nakadai/nakadai/curriculum/getSchoolEffectiveCourse`,
projectListByCourseId: `occupationlab/occupationlab/projectManage/getSchoolProjectByAssessent`, // 根据课程id获取实训项目列表 projectListByCourseId: `occupationlab/occupationlab/projectManage/getSchoolProjectByAssessent`, // 根据课程id获取实训项目列表
getProjectOrExamPaperByAssessment: `occupationlab/occupationlab/projectManage/getProjectOrExamPaperByAssessment`,
// 成绩管理 // 成绩管理
deleteExperimentalReport: `occupationlab/occupationlab/achievement/deleteExperimentalReport`, // 单个、批量删除实验报告 deleteExperimentalReport: `occupationlab/occupationlab/achievement/deleteExperimentalReport`, // 单个、批量删除实验报告

@ -468,7 +468,7 @@ export default {
toReport (row) { toReport (row) {
this.$store.commit('achievement/setRow', this.curRow) this.$store.commit('achievement/setRow', this.curRow)
// //
this.$router.push(this.curTab == 1 ? `show?reportId=${row.reportId}` : `project?id=${row.projectId}&projectName=${row.projectName}&classId=${this.curRow.classId || ''}&workNumber=${row.workNumber || row.userName}&mallId=${this.id}&fromCourse=1`) this.$router.push(this.curTab == 1 ? `show?reportId=${row.reportId}` : `project?id=${row.projectId || ''}&paperId=${row.paperId || ''}&projectName=${row.projectName}&classId=${this.curRow.classId || ''}&workNumber=${row.workNumber || row.userName}&mallId=${this.id}&fromCourse=1`)
}, },
getChart () { // 线 getChart () { // 线
const data = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0] const data = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]

@ -179,7 +179,8 @@ export default {
classes: [], // classes: [], //
permissions: +this.$route.query.permissions, permissions: +this.$route.query.permissions,
experimentalName: this.$route.query.projectName, experimentalName: this.$route.query.projectName,
id: this.$route.query.id, id: this.$route.query.id || '',
paperId: this.$route.query.paperId || '',
mallId: this.$route.query.mallId, mallId: this.$route.query.mallId,
workNumber: this.$route.query.workNumber, workNumber: this.$route.query.workNumber,
keyword: "", keyword: "",
@ -263,7 +264,7 @@ export default {
// //
const res = this.permissions ? const res = this.permissions ?
await this.$post(`${this.api.getAssessmentDetail}?pageNum=${this.page}&pageSize=${this.pageSize}&assessmentId=${this.id}&classId=${this.classId}&keyword=${this.keyword}&mallId=${this.mallId}`) : await this.$post(`${this.api.getAssessmentDetail}?pageNum=${this.page}&pageSize=${this.pageSize}&assessmentId=${this.id}&classId=${this.classId}&keyword=${this.keyword}&mallId=${this.mallId}`) :
await this.$post(`${this.api.getPracticeDetail}?pageNum=${this.page}&pageSize=${this.pageSize}&projectId=${this.id}&keyWord=${this.keyword}&classId=${this.classId}&mallId=${this.mallId}`) await this.$post(`${this.api.getPracticeDetail}?pageNum=${this.page}&pageSize=${this.pageSize}&projectId=${this.id}&paperId=${this.paperId}&keyWord=${this.keyword}&classId=${this.classId}&mallId=${this.mallId}`)
// //
const isArr = res.page instanceof Array const isArr = res.page instanceof Array
this.list = isArr ? res.page : res.page.records this.list = isArr ? res.page : res.page.records
@ -286,7 +287,7 @@ export default {
// //
async getActivity () { async getActivity () {
// //
const { message } = await this.$post(`${this.api.practiceActivity}?pageNum=${this.pageActivation}&pageSize=${this.pageSizeActivation}&projectId=${this.id}&keyWord=${this.keyword}&classId=${this.classId}&mallId=${this.mallId}`) const { message } = await this.$post(`${this.api.practiceActivity}?pageNum=${this.pageActivation}&pageSize=${this.pageSizeActivation}&projectId=${this.id}}&paperId=${this.paperId}&keyWord=${this.keyword}&classId=${this.classId}&mallId=${this.mallId}`)
this.activations = message.records this.activations = message.records
this.totalActivation = message.total this.totalActivation = message.total
}, },
@ -315,7 +316,7 @@ export default {
// //
let url = this.permissions let url = this.permissions
? `${this.api.exportAssessmentInfo}?assessmentId=${this.id}&classId=${this.classId}` ? `${this.api.exportAssessmentInfo}?assessmentId=${this.id}&classId=${this.classId}`
: `${this.api.exportPracticeInfo}?projectId=${this.id}&mallId=${this.mallId}` : `${this.api.exportPracticeInfo}?projectId=${this.id}&mallId=${this.mallId}&paperId=${this.paperId}`
// id // id
if (this.multipleSelection.length) { if (this.multipleSelection.length) {
const ids = this.multipleSelection.map(e => this.permissions ? e.testStatusId : e.reportId) const ids = this.multipleSelection.map(e => this.permissions ? e.testStatusId : e.reportId)
@ -435,7 +436,7 @@ export default {
responseType: 'blob' responseType: 'blob'
}) })
} else { } else {
res = await axios.get(`${this.api.exportAllActivity}?projectId=${this.id}&mallId=${this.mallId}&classId=${this.classId}&keyWord=${this.keyword}`, { res = await axios.get(`${this.api.exportAllActivity}?projectId=${this.id}&paperId=${this.paperId}&mallId=${this.mallId}&classId=${this.classId}&keyWord=${this.keyword}`, {
headers: { headers: {
token: this.token token: this.token
}, },

@ -1,159 +1,88 @@
<template> <template>
<div class="page" <div class="page" v-loading="loading">
v-loading="loading">
<h6 class="p-title">筛选</h6> <h6 class="p-title">筛选</h6>
<div class="tool mul"> <div class="tool mul">
<ul class="filter"> <ul class="filter">
<li v-if="form.permissions"> <li v-if="form.permissions">
<label>时间</label> <label>时间</label>
<el-radio-group v-model="form.month" <el-radio-group v-model="form.month" @change="initData">
@change="initData"> <el-radio v-for="(item, index) in dateList" :key="index" :label="item.id" border>{{ item.name }}</el-radio>
<el-radio v-for="(item,index) in dateList"
:key="index"
:label="item.id"
border>{{ item.name }}</el-radio>
</el-radio-group> </el-radio-group>
<el-date-picker v-model="date" <el-date-picker v-model="date" @blur='pickerInput' align="right" unlink-panels type="daterange"
@blur='pickerInput' start-placeholder="开始日期" end-placeholder="结束日期" format="yyyy-MM-dd" value-format="yyyy-MM-dd" clearable
align="right" style="width: 300px">
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>
</li> </li>
<li> <li>
<label>实验项目分类</label> <label>实验项目分类</label>
<el-radio-group v-model="form.permissions" <el-radio-group v-model="form.permissions" @change="initData">
@change="initData"> <el-radio v-for="(item, index) in projectType" :key="index" :label="item.id" border>{{ item.name
<el-radio v-for="(item,index) in projectType" }}</el-radio>
:key="index"
:label="item.id"
border>{{ item.name }}</el-radio>
</el-radio-group> </el-radio-group>
</li> </li>
<li v-show="form.permissions === 1"> <li v-show="form.permissions === 1">
<label>班级</label> <label>班级</label>
<el-select v-model="form.classId" <el-select v-model="form.classId" clearable @change="initData">
clearable <el-option v-for="item in classList" :key="item.id" :label="item.className" :value="item.id">
@change="initData">
<el-option v-for="item in classList"
:key="item.id"
:label="item.className"
:value="item.id">
</el-option> </el-option>
</el-select> </el-select>
</li> </li>
<li> <li>
<label>课程</label> <label>课程</label>
<el-select v-model="form.mallId" <el-select v-model="form.mallId" @change="initData">
@change="initData"> <el-option v-for="(item, i) in curs" :key="i" :label="item.curriculumName" :value="item.mallId"
<el-option v-for="(item, i) in curs" @change="curChange"></el-option>
:key="i"
:label="item.curriculumName"
:value="item.mallId"
@change="curChange"></el-option>
</el-select> </el-select>
</li> </li>
<li> <li>
<el-input placeholder="请输入考核或项目名称" <el-input placeholder="请输入考核或项目名称" prefix-icon="el-icon-search" v-model="form.keyWord" clearable></el-input>
prefix-icon="el-icon-search"
v-model="form.keyWord"
clearable></el-input>
</li> </li>
</ul> </ul>
</div> </div>
<div class="tool mul"> <div class="tool mul">
<ul class="filter"></ul> <ul class="filter"></ul>
<div style="margin-bottom: 24px"> <div style="margin-bottom: 24px">
<el-button v-auth <el-button v-auth type="primary" @click="delAllData">批量删除</el-button>
type="primary"
@click="delAllData">批量删除</el-button>
</div> </div>
</div> </div>
<el-table :data="listData" <el-table :data="listData" class="table" ref="table" stripe header-align="center"
class="table" @selection-change="handleSelectionChange" row-key="id">
ref="table" <el-table-column type="selection" width="55" align="center" :reserve-selection="true"
stripe :selectable="disabledSelection"></el-table-column>
header-align="center" <el-table-column type="index" width="60" label="序号" align="center">
@selection-change="handleSelectionChange"
row-key="id">
<el-table-column type="selection"
width="55"
align="center"
:reserve-selection="true"
:selectable="disabledSelection"></el-table-column>
<el-table-column type="index"
width="60"
label="序号"
align="center">
<template slot-scope="scope"> <template slot-scope="scope">
{{ scope.$index + (page - 1) * pageSize + 1 }} {{ scope.$index + (page - 1) * pageSize + 1 }}
</template> </template>
</el-table-column> </el-table-column>
<template v-if="form.permissions == 1"> <template v-if="form.permissions == 1">
<el-table-column prop="className" <el-table-column prop="className" label="实验班级" align="center" min-width="140"></el-table-column>
label="实验班级" <el-table-column prop="experimentalName" label="考核名称" align="center" min-width="180">
align="center"
min-width="140"></el-table-column>
<el-table-column prop="experimentalName"
label="考核名称"
align="center"
min-width="180">
<template slot-scope="scope"> <template slot-scope="scope">
<span class="mul-ellipsis2">{{ scope.row.experimentalName }}</span> <span class="mul-ellipsis2">{{ scope.row.experimentalName }}</span>
</template> </template>
</el-table-column> </el-table-column>
</template> </template>
<el-table-column prop="projectName" <el-table-column prop="projectName" label="项目名称" align="center" min-width="180"></el-table-column>
label="项目名称" <el-table-column prop="projectPermissions" label="分类" align="center" width="100">
align="center"
min-width="180"></el-table-column>
<el-table-column prop="projectPermissions"
label="分类"
align="center"
width="100">
<template slot-scope="scope"> <template slot-scope="scope">
{{ form.permissions ? '考核' : '练习' }} {{ form.permissions ? '考核' : '练习' }}
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="experimentalNumber" <el-table-column prop="experimentalNumber" label="成绩报告数量" align="center"
label="成绩报告数量" :width="form.permissions ? 120 : 230"></el-table-column>
align="center" <el-table-column prop="createTime" label="创建时间" align="center" :width="form.permissions ? 160 : 230">
:width="form.permissions ? 120 : 230"></el-table-column>
<el-table-column prop="createTime"
label="创建时间"
align="center"
:width="form.permissions ? 160 : 230">
</el-table-column> </el-table-column>
<el-table-column label="操作" <el-table-column label="操作" align="center" :width="form.permissions ? 150 : 230">
align="center"
:width="form.permissions ? 150 : 230">
<template slot-scope="scope"> <template slot-scope="scope">
<el-button v-auth="'练习成绩管理'" <el-button v-auth="'练习成绩管理'" type="text" @click="entry(scope.row)">成绩管理</el-button>
type="text" <el-button v-auth type="text" v-if="scope.row.canDel" @click="handleDelete(scope.row)">删除</el-button>
@click="entry(scope.row)">成绩管理</el-button> <el-button v-auth type="text" v-else style='color:#999'>删除</el-button>
<el-button v-auth
type="text"
v-if="scope.row.canDel"
@click="handleDelete(scope.row)">删除</el-button>
<el-button v-auth
type="text"
v-else
style='color:#999'>删除</el-button>
</template> </template>
</el-table-column> </el-table-column>
</el-table> </el-table>
<div class="pagination"> <div class="pagination">
<el-pagination background <el-pagination background layout="total, prev, pager, next" :total="total" @current-change="handleCurrentChange"
layout="total, prev, pager, next" :current-page="page"></el-pagination>
:total="total"
@current-change="handleCurrentChange"
:current-page="page"></el-pagination>
</div> </div>
</div> </div>
</template> </template>
@ -322,7 +251,7 @@ export default {
// //
entry (row) { entry (row) {
this.$store.commit('achievement/setReferrer', `${this.$route.path}?${qs.stringify(this.form)}&page=${this.page}`) this.$store.commit('achievement/setReferrer', `${this.$route.path}?${qs.stringify(this.form)}&page=${this.page}`)
this.$router.push(`project?id=${row.assessmentId || row.projectId}&projectName=${row.projectName}&permissions=${row.permissions || 0}&mallId=${this.form.mallId}&classId=${row.classId || ''}`) this.$router.push(`project?id=${row.assessmentId || row.projectId || ''}&paperId=${row.paperId || ''}&projectName=${row.projectName}&permissions=${row.permissions || 0}&mallId=${this.form.mallId}&classId=${row.classId || ''}`)
}, },
handleDelete (row) { // handleDelete (row) { //
this.$confirm("该项目下的所有成绩报告将会删除,是否继续?", "提示", { this.$confirm("该项目下的所有成绩报告将会删除,是否继续?", "提示", {
@ -392,10 +321,11 @@ export default {
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>
.el-radio.is-bordered + .el-radio.is-bordered { .el-radio.is-bordered+.el-radio.is-bordered {
margin-left: 0; margin-left: 0;
} }
.el-radio-group { .el-radio-group {
white-space: nowrap; white-space: nowrap;
} }
</style> </style>

@ -109,12 +109,12 @@
{{ i + 1 }}. {{ item.userAnswer || '未填写' }} {{ i + 1 }}. {{ item.userAnswer || '未填写' }}
</div> </div>
</div> </div>
<div v-else v-html="scope.row.answer" style="white-space: pre-wrap"></div> <div v-else class="pre-code">{{ scope.row.answer }}</div>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column v-if="!isLc" prop="runResult" label="学生运行结果" :key="5" align="center"> <el-table-column v-if="!isLc" prop="runResult" label="学生运行结果" :key="5" align="center">
<template slot-scope="scope"> <template slot-scope="scope">
<div class="m-b-20" v-html="scope.row.runResult" style="white-space: pre-wrap"></div> <div class="m-b-20 pre-code">{{ scope.row.runResult }}</div>
<template v-if="scope.row.runThePictureList"> <template v-if="scope.row.runThePictureList">
<img v-for="(img, i) in scope.row.runThePictureList" :key="i" width="200" class="result-pic" <img v-for="(img, i) in scope.row.runThePictureList" :key="i" width="200" class="result-pic"
:src="img" alt=""> :src="img" alt="">
@ -271,6 +271,10 @@ export default {
padding: 12px 300px 20px; padding: 12px 300px 20px;
} }
.pre-code {
white-space: pre-wrap;
}
code, code,
kbd, kbd,
samp { samp {

@ -85,7 +85,7 @@
<!-- 单选实训项目ID --> <!-- 单选实训项目ID -->
<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.projectId" :label="scope.row.projectId">&nbsp;</el-radio> <el-radio v-model="form.uuid" :label="scope.row.uuid">&nbsp;</el-radio>
</template> </template>
</el-table-column> </el-table-column>
<el-table-column prop="projectName" label="项目名称" align="center"></el-table-column> <el-table-column prop="projectName" label="项目名称" align="center"></el-table-column>
@ -185,7 +185,8 @@ export default {
experimentDuration: "0d0h0m", experimentDuration: "0d0h0m",
curriculumId: "", curriculumId: "",
mallId: '', mallId: '',
projectId: "", projectId: '',
paperId: '',
isSpecify: 1, // (1 0) isSpecify: 1, // (1 0)
isEnableCode: 0, // isEnableCode: 0, //
invitationCode: "", invitationCode: "",
@ -388,8 +389,12 @@ export default {
permissions: 1, permissions: 1,
mallId: this.form.mallId mallId: this.form.mallId
} }
this.$post(this.api.projectListByCourseId, data).then(({ data }) => { this.$post(this.api.getProjectOrExamPaperByAssessment, data).then(({ data }) => {
this.projectData = data.records const list = data.records
list.forEach(e => {
e.uuid = e.projectId || e.paperId //
})
this.projectData = list
this.total = data.total this.total = data.total
}).catch(err => { }) }).catch(err => { })
}, },
@ -403,6 +408,7 @@ export default {
}, },
save (cb) { // save (cb) { //
if (this.submiting) return false if (this.submiting) return false
const { form } = this
if (!this.form.experimentalName) return util.warningMsg("请填写考核名称"); if (!this.form.experimentalName) return util.warningMsg("请填写考核名称");
if (this.expNameRepeat) return util.warningMsg("考核名称重复,请重新输入"); if (this.expNameRepeat) return util.warningMsg("考核名称重复,请重新输入");
if (this.form.type !== 1) { if (this.form.type !== 1) {
@ -424,7 +430,9 @@ export default {
if (String(minute).includes('.')) return util.warningMsg('实验分钟请填写整数') if (String(minute).includes('.')) return util.warningMsg('实验分钟请填写整数')
if (minute < 0) return util.warningMsg('实验分钟请勿填写负数') if (minute < 0) return util.warningMsg('实验分钟请勿填写负数')
} }
if (!this.form.projectId) return util.warningMsg("请选择实训项目"); if (!form.uuid) return util.warningMsg("请选择实训项目");
const item = this.projectData.find(e => form.uuid === e.projectId || form.uuid === e.paperId)
if (item) form[item.projectId ? 'projectId' : 'paperId'] = form.uuid
if (this.form.isSpecify == 0 && this.form.isEnableCode == 1) { if (this.form.isSpecify == 0 && this.form.isEnableCode == 1) {
if (!this.form.invitationCode) return util.warningMsg("请设置邀请码"); if (!this.form.invitationCode) return util.warningMsg("请设置邀请码");
if (!this.form.invitationCode || String(this.form.invitationCode).length < 6 || isNaN(this.form.invitationCode)) return util.warningMsg("请输入6位纯数字邀请码"); if (!this.form.invitationCode || String(this.form.invitationCode).length < 6 || isNaN(this.form.invitationCode)) return util.warningMsg("请输入6位纯数字邀请码");

@ -350,6 +350,8 @@ export default {
this.teamErrors = res.teamTip.split(';').filter(e => e) this.teamErrors = res.teamTip.split(';').filter(e => e)
if (Object.keys(res.stageTip).length) { if (Object.keys(res.stageTip).length) {
this.stageTip = res.stageTip this.stageTip = res.stageTip
} else {
this.stageTip = null
} }
}, },
// //

@ -114,7 +114,7 @@
</span> </span>
</div> </div>
</div> </div>
<div v-else v-html='scope.row.answer' style='white-space: pre-wrap'></div> <div v-else class="pre-code">{{ scope.row.answer }}</div>
<template v-if="scope.row.runThePictureList"> <template v-if="scope.row.runThePictureList">
<img v-for="(img, i) in scope.row.runThePictureList" :key="i" width="200" class="result-pic" <img v-for="(img, i) in scope.row.runThePictureList" :key="i" width="200" class="result-pic"
:src="img" alt=""> :src="img" alt="">
@ -248,6 +248,10 @@ export default {
padding: 12px 300px 20px; padding: 12px 300px 20px;
} }
.pre-code {
white-space: pre-wrap;
}
.text-right { .text-right {
text-align: right; text-align: right;
} }

@ -4,11 +4,11 @@ import util from "@/libs/util";
const whiteList = Setting.whiteList // 白名单 const whiteList = Setting.whiteList // 白名单
router.beforeEach((to, from, next) => { router.beforeEach((to, from, next) => {
document.title = Setting.titleSuffix; document.title = Setting.titleSuffix;
const role = util.local.get(Setting.tokenKey); const role = util.local.get(Setting.tokenKey);
if (!role && !whiteList.includes(to.path)) { if (!role && !whiteList.includes(to.path)) {
next('/login') next('/login')
} else { } else {
next() next()
} }
}); });
Loading…
Cancel
Save