实验记录

chengdu
4 years ago
parent cfb36245dc
commit cc629aa5b4
  1. 4
      src/components/common/Studentcommon/FictitiousList.vue
  2. 64
      src/components/common/Studentcommon/TeachingList.vue
  3. 89
      src/components/common/Studentcommon/competitionList.vue
  4. 32
      src/components/common/Studentcommon/registration.vue
  5. 1
      src/utils/api.js

@ -56,11 +56,11 @@ export default {
this.getData()
},
getData() {
this.$get(this.api.fictitiousRecord, {
this.$post(this.api.fictitiousRecord, {
userId: this.userId,
page: this.pageNo,
size: this.pageSize,
projectPermissions: 0,
source: 0,
systemId: 3
})
.then(res => {

@ -1,15 +1,26 @@
<template>
<div>
<div class="flex-between">
<div class="tabs">
<a class="item" v-for="(item,index) in classTabs" :key="index" :class="{active: index == classActive}" @click="classTabChange(item,index)">{{item.className}}</a>
</div>
<div>
<el-input placeholder="请输入考核名称" prefix-icon="el-icon-search" v-model="searchContent" clearable></el-input>
</div>
</div>
<el-table
:cell-style="tableRowStyle"
:header-cell-style="{background:'#328aff',color:'#FFFFFF'}"
:data="tableData"
stripe
:row-key="getRowKeys"
@selection-change="handleSelectionChange"
class="mat20"
>
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
<el-table-column prop="id" label="次序" width="120" align="center" type="index"></el-table-column>
<el-table-column prop="experimentalName" label="实验教学名称" align="center"></el-table-column>
<el-table-column prop="experimentalClassName" label="班级" align="center"></el-table-column>
<el-table-column prop="projectName" label="实验项目名称" align="center"></el-table-column>
<el-table-column prop="className" label="班级" align="center"></el-table-column>
<el-table-column prop="experimentalName" label="考核名称" align="center"></el-table-column>
<el-table-column prop="score" label="得分" align="center"></el-table-column>
<el-table-column prop="timeConsuming" label="耗时" align="center">
<template slot-scope="scope">
@ -38,11 +49,27 @@ export default {
tableData: [],
userId: this.$store.state.userId,
pageNo: 1,
pageSize: 10
pageSize: 10,
classTabs: {
classId: '',
className: '全部'
},
classActive: 0,
classId: '',
searchContent: ''
};
},
created() {
this.getData();
this.getClassData()
},
watch: {
searchContent (val) {
clearTimeout(this.searchTimer)
this.searchTimer = setTimeout(() => {
this.getData()
},500)
}
},
methods: {
tableRowStyle({ row, column, rowIndex, columnIndex }) {
@ -57,11 +84,13 @@ export default {
this.getData()
},
getData() {
this.$get(this.api.fictitiousRecord, {
this.$post(this.api.fictitiousRecord, {
classId: this.classId,
userId: this.userId,
page: this.pageNo,
size: this.pageSize,
projectPermissions: 1,
searchContent: this.core.encodeString(this.searchContent),
source: 2,
systemId: 3
})
.then(res => {
@ -78,11 +107,30 @@ export default {
},
toReport(row) {
this.$router.push(`/showExperiment?id=${row.reportId}`)
}
},
getRowKeys(row){
return row.reportId
},
handleSelectionChange(val) {
this.$emit("handleSelect",val)
},
getClassData(){
this.$get(`${this.api.mineClass}?userId=${this.userId}`).then(res => {
res.list.unshift({...this.classTabs})
this.classTabs = res.list
}).catch(res => {});
},
classTabChange(item,index){
this.classActive = index
this.classId = item.classId
this.getData()
},
}
};
</script>
<style lang="scss" scopted>
.mat20{
margin-top: 20px;
}
</style>

@ -0,0 +1,89 @@
<template>
<div>
<el-table
:cell-style="tableRowStyle"
:header-cell-style="{background:'#328aff',color:'#FFFFFF'}"
:data="tableData"
stripe
>
<el-table-column type="selection" width="55" align="center" :reserve-selection="true"></el-table-column>
<el-table-column prop="id" label="次序" width="120" align="center" type="index"></el-table-column>
<el-table-column prop="experimentalName" label="实验教学名称" align="center"></el-table-column>
<el-table-column prop="experimentalClassName" label="班级" align="center"></el-table-column>
<el-table-column prop="projectName" label="实验项目名称" align="center"></el-table-column>
<el-table-column prop="score" label="得分" align="center"></el-table-column>
<el-table-column prop="timeConsuming" label="耗时" align="center">
<template slot-scope="scope">
{{scope.row.timeConsuming}}
</template>
</el-table-column>
<el-table-column prop="startTime" label="起始时间" align="center"></el-table-column>
<el-table-column prop="endTime" label="结束时间" align="center"></el-table-column>
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button type="text" @click="toReport(scope.row)">实验成绩报告</el-button>
</template>
</el-table-column>
</el-table>
<div class="pagination">
<el-pagination background :current-page="pageNo" layout="total, prev, pager, next" :total="totals" @current-change="handleCurrentChange"></el-pagination>
</div>
</div>
</template>
<script>
export default {
data() {
return {
totals: 0,
tableData: [],
userId: this.$store.state.userId,
pageNo: 1,
pageSize: 10
};
},
created() {
this.getData();
},
methods: {
tableRowStyle({ row, column, rowIndex, columnIndex }) {
if (rowIndex % 2 === 0) {
return 'background-color: #FFF';
} else {
return 'background-color: #F5F2FF';
}
},
handleCurrentChange(val) {
this.pageNo = val
this.getData()
},
getData() {
this.$post(this.api.fictitiousRecord, {
userId: this.userId,
page: this.pageNo,
size: this.pageSize,
source: 1,
systemId: 3
})
.then(res => {
let data = res.data
this.tableData = data.list
this.totals = data.totalCount
})
.catch(err => {
console.log(err);
});
},
exportData() {
location.href = `${this.api.exportProjectRecord}?userId=${this.userId}`
},
toReport(row) {
this.$router.push(`/showExperiment?id=${row.reportId}`)
}
}
};
</script>
<style lang="scss" scopted>
</style>

@ -8,7 +8,7 @@
<a class="item" v-for="(item,index) in tabs" :key="index" :class="{active: index == activeName}" @click="tabChange(index)">{{item}}</a>
</div>
<div class="header">
<div class="header" >
<p>实验记录明细</p>
<el-button round type="primary" @click="exportData" v-preventReClick>导出</el-button>
</div>
@ -16,8 +16,11 @@
<div class="score-table" v-if="activeName == 'first'">
<fictitiouslist></fictitiouslist>
</div>
<div class="score-table" v-else>
<teachinglist></teachinglist>
<div class="score-table" v-if="activeName == 'second'">
<competitionList></competitionList>
</div>
<div class="score-table" v-if="activeName == 'three'">
<teachinglist @handleSelect="handleSelect"></teachinglist>
</div>
</div>
</template>
@ -25,6 +28,8 @@
<script>
import fictitiouslist from './FictitiousList.vue';
import teachinglist from './TeachingList.vue';
import competitionList from './competitionList.vue';
import { constants } from 'zlib';
export default {
data() {
return {
@ -32,13 +37,16 @@ export default {
userId: this.$store.state.userId,
tabs: {
first: '练习模式',
second: '考核模式'
}
second: '竞赛模式',
three: '考核模式'
},
multipleSelection: []
};
},
components: {
fictitiouslist,
teachinglist
teachinglist,
competitionList
},
created() {
// this.$refs.message.href = `http://liuwanr.cn:8080/attendance/exportPractice?studentId=${this.studentId}&courseId=${this.$store.state.courseId}&titles=%E5%BA%8F%E5%8F%B7,%E9%A1%B9%E7%9B%AE%E5%90%8D%E7%A7%B0,%E5%AE%9E%E9%AA%8C%E9%A1%B9%E7%9B%AE,%E8%80%83%E5%8B%A4%E8%AE%B0%E5%BD%95,%E7%AD%BE%E5%88%B0%E6%97%B6%E9%97%B4`;
@ -47,12 +55,22 @@ export default {
exportData() {
if(this.activeName == 'first'){
location.href = `${this.api.exportProjectRecord}?userId=${this.userId}`
}else{
}else if(this.activeName == 'second'){
location.href = `${this.api.exportExperimentProjectRecord}?userId=${this.userId}`
}else{
if(this.multipleSelection.length != 0){
let arr = this.multipleSelection.map(e => e.reportId).join()
location.href = `${this.api.exportKdTeachReport}?reportIds=${arr}&userId=${this.userId}`
}else{
this.$message.error('请先选择数据再进行导出 !');
}
}
},
tabChange(index){
this.activeName = index
},
handleSelect(val){
this.multipleSelection = val;
}
}
};

@ -58,6 +58,7 @@ export default {
fictitiousRecord: `${host}/evaluation/fictitious/projectrecord/user/kdRecord`, //用户端实验记录
exportProjectRecord: `${host}/evaluation/fictitious/projectrecord/user/exportProjectRecord`, //虚拟实验记录导出
exportExperimentProjectRecord: `${host}/evaluation/fictitious/projectrecord/user/exportExperimentProjectRecord`, //个人实验记录导出
exportKdTeachReport: `${host}/evaluation/fictitious/projectrecord/user/exportKdTeachReport`, //个人教学实验记录导出(新考核)
fictitiousScore: `${host}/evaluation/fictitious/projectrecord/user/score`, //个人实验概览
experimentRecord: `${host}/evaluation/fictitious/projectrecord/user/experimentRecord`, //用户端教学实验记录
reportSignature:`${host}/evaluation/signature/reportSignature`,

Loading…
Cancel
Save