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. 132
      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,7 +10,7 @@
var _hmt = _hmt || [];
(function() {
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];
s.parentNode.insertBefore(hm, s);
})();

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

@ -468,7 +468,7 @@ export default {
toReport (row) {
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 () { // 线
const data = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0]

@ -179,7 +179,8 @@ export default {
classes: [], //
permissions: +this.$route.query.permissions,
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,
workNumber: this.$route.query.workNumber,
keyword: "",
@ -263,7 +264,7 @@ export default {
//
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.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
this.list = isArr ? res.page : res.page.records
@ -286,7 +287,7 @@ export default {
//
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.totalActivation = message.total
},
@ -315,7 +316,7 @@ export default {
//
let url = this.permissions
? `${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
if (this.multipleSelection.length) {
const ids = this.multipleSelection.map(e => this.permissions ? e.testStatusId : e.reportId)
@ -435,7 +436,7 @@ export default {
responseType: 'blob'
})
} 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: {
token: this.token
},

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

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

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

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

Loading…
Cancel
Save