|
|
@ -5,11 +5,14 @@ |
|
|
|
<ul class="filter"> |
|
|
|
<ul class="filter"> |
|
|
|
<li v-if="projectPermissions"> |
|
|
|
<li v-if="projectPermissions"> |
|
|
|
<label>时间</label> |
|
|
|
<label>时间</label> |
|
|
|
<el-radio-group v-model="month" @change="initData"> |
|
|
|
<el-radio-group v-model="month" |
|
|
|
<el-radio v-for="(item,index) in dateList" :key="index" :label="item.id" border>{{ item.name }}</el-radio> |
|
|
|
@change="initData"> |
|
|
|
|
|
|
|
<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 |
|
|
|
<el-date-picker v-model="date" |
|
|
|
v-model="date" |
|
|
|
|
|
|
|
@blur='pickerInput' |
|
|
|
@blur='pickerInput' |
|
|
|
align="right" |
|
|
|
align="right" |
|
|
|
unlink-panels |
|
|
|
unlink-panels |
|
|
@ -24,15 +27,19 @@ |
|
|
|
</li> |
|
|
|
</li> |
|
|
|
<li> |
|
|
|
<li> |
|
|
|
<label>实验项目分类</label> |
|
|
|
<label>实验项目分类</label> |
|
|
|
<el-radio-group v-model="projectPermissions" @change="perChange"> |
|
|
|
<el-radio-group v-model="projectPermissions" |
|
|
|
<el-radio v-for="(item,index) in projectType" :key="index" :label="item.id" border>{{ item.name }}</el-radio> |
|
|
|
@change="perChange"> |
|
|
|
|
|
|
|
<el-radio v-for="(item,index) in projectType" |
|
|
|
|
|
|
|
:key="index" |
|
|
|
|
|
|
|
:label="item.id" |
|
|
|
|
|
|
|
border>{{ item.name }}</el-radio> |
|
|
|
</el-radio-group> |
|
|
|
</el-radio-group> |
|
|
|
</li> |
|
|
|
</li> |
|
|
|
<li v-show="projectPermissions === 1"> |
|
|
|
<li v-show="projectPermissions === 1"> |
|
|
|
<label>班级</label> |
|
|
|
<label>班级</label> |
|
|
|
<el-select v-model="classId" @change="classChange"> |
|
|
|
<el-select v-model="classId" |
|
|
|
<el-option |
|
|
|
@change="classChange"> |
|
|
|
v-for="item in classList" |
|
|
|
<el-option v-for="item in classList" |
|
|
|
:key="item.id" |
|
|
|
:key="item.id" |
|
|
|
:label="item.className" |
|
|
|
:label="item.className" |
|
|
|
:value="item.id"> |
|
|
|
:value="item.id"> |
|
|
@ -41,10 +48,11 @@ |
|
|
|
</li> |
|
|
|
</li> |
|
|
|
<li> |
|
|
|
<li> |
|
|
|
<label>课程</label> |
|
|
|
<label>课程</label> |
|
|
|
<el-select v-model="curriculumId" @change="curriculumChange"> |
|
|
|
<el-select v-model="curriculumId" |
|
|
|
<el-option label="不限" value=""></el-option> |
|
|
|
@change="curriculumChange"> |
|
|
|
<el-option |
|
|
|
<el-option label="不限" |
|
|
|
v-for="item in curriculumList" |
|
|
|
value=""></el-option> |
|
|
|
|
|
|
|
<el-option v-for="item in curriculumList" |
|
|
|
:key="item.cid" |
|
|
|
:key="item.cid" |
|
|
|
:label="item.curriculumName" |
|
|
|
:label="item.curriculumName" |
|
|
|
:value="item.cid"> |
|
|
|
:value="item.cid"> |
|
|
@ -52,50 +60,98 @@ |
|
|
|
</el-select> |
|
|
|
</el-select> |
|
|
|
</li> |
|
|
|
</li> |
|
|
|
<li> |
|
|
|
<li> |
|
|
|
<el-input placeholder="请输入考核或项目名称" prefix-icon="el-icon-search" v-model="keyword" clearable></el-input> |
|
|
|
<el-input placeholder="请输入考核或项目名称" |
|
|
|
|
|
|
|
prefix-icon="el-icon-search" |
|
|
|
|
|
|
|
v-model="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 type="primary" @click="delAllData">批量删除</el-button> |
|
|
|
<el-button v-auth |
|
|
|
|
|
|
|
type="primary" |
|
|
|
|
|
|
|
@click="delAllData">批量删除</el-button> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
<el-table :data="listData" class="table" ref="table" stripe header-align="center" @selection-change="handleSelectionChange" row-key="id"> |
|
|
|
<el-table :data="listData" |
|
|
|
<el-table-column type="selection" width="55" align="center" :reserve-selection="true" :selectable="disabledSelection"></el-table-column> |
|
|
|
class="table" |
|
|
|
<el-table-column type="index" width="60" label="序号" align="center"> |
|
|
|
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"> |
|
|
|
<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="projectPermissions == 1"> |
|
|
|
<template v-if="projectPermissions == 1"> |
|
|
|
<el-table-column prop="className" label="班级" align="center" width="140"></el-table-column> |
|
|
|
<el-table-column prop="className" |
|
|
|
<el-table-column prop="experimentalName" label="考核名称" align="center"> |
|
|
|
label="班级" |
|
|
|
|
|
|
|
align="center" |
|
|
|
|
|
|
|
width="140"></el-table-column> |
|
|
|
|
|
|
|
<el-table-column prop="experimentalName" |
|
|
|
|
|
|
|
label="考核名称" |
|
|
|
|
|
|
|
align="center"> |
|
|
|
<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" label="项目名称" align="center"></el-table-column> |
|
|
|
<el-table-column prop="projectName" |
|
|
|
<el-table-column prop="projectPermissions" label="分类" align="center" width="100"> |
|
|
|
label="项目名称" |
|
|
|
|
|
|
|
align="center"></el-table-column> |
|
|
|
|
|
|
|
<el-table-column prop="projectPermissions" |
|
|
|
|
|
|
|
label="分类" |
|
|
|
|
|
|
|
align="center" |
|
|
|
|
|
|
|
width="100"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
{{ projectPermissions ? '考核' : '练习' }} |
|
|
|
{{ projectPermissions ? '考核' : '练习' }} |
|
|
|
</template> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column prop="experimentalNumber" label="成绩报告数量" align="center" :width="projectPermissions ? 120 : 230"></el-table-column> |
|
|
|
<el-table-column prop="experimentalNumber" |
|
|
|
<el-table-column prop="createTime" label="创建时间" align="center" :width="projectPermissions ? 160 : 230"> |
|
|
|
label="成绩报告数量" |
|
|
|
|
|
|
|
align="center" |
|
|
|
|
|
|
|
:width="projectPermissions ? 120 : 230"></el-table-column> |
|
|
|
|
|
|
|
<el-table-column prop="createTime" |
|
|
|
|
|
|
|
label="创建时间" |
|
|
|
|
|
|
|
align="center" |
|
|
|
|
|
|
|
:width="projectPermissions ? 160 : 230"> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
<el-table-column label="操作" align="center" :width="projectPermissions ? 150 : 230"> |
|
|
|
<el-table-column label="操作" |
|
|
|
|
|
|
|
align="center" |
|
|
|
|
|
|
|
:width="projectPermissions ? 150 : 230"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<template slot-scope="scope"> |
|
|
|
<el-button v-auth="'练习成绩管理'" type="text" @click="entry(scope.row)">成绩管理</el-button> |
|
|
|
<el-button v-auth="'练习成绩管理'" |
|
|
|
<el-button v-auth type="text" v-if="scope.row.canDel" @click="handleDelete(scope.row)" >删除</el-button> |
|
|
|
type="text" |
|
|
|
<el-button v-auth type="text" v-else style='color:#999' >删除</el-button> |
|
|
|
@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> |
|
|
|
</template> |
|
|
|
</el-table-column> |
|
|
|
</el-table-column> |
|
|
|
</el-table> |
|
|
|
</el-table> |
|
|
|
<div class="pagination"> |
|
|
|
<div class="pagination"> |
|
|
|
<el-pagination background layout="total, prev, pager, next" :total="total" @current-change="handleCurrentChange" :current-page="page"></el-pagination> |
|
|
|
<el-pagination background |
|
|
|
|
|
|
|
layout="total, prev, pager, next" |
|
|
|
|
|
|
|
:total="total" |
|
|
|
|
|
|
|
@current-change="handleCurrentChange" |
|
|
|
|
|
|
|
:current-page="page"></el-pagination> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
</template> |
|
|
|
</template> |
|
|
@ -105,7 +161,7 @@ import { Loading } from "element-ui"; |
|
|
|
import util from "@/libs/util"; |
|
|
|
import util from "@/libs/util"; |
|
|
|
export default { |
|
|
|
export default { |
|
|
|
name: "achievement", |
|
|
|
name: "achievement", |
|
|
|
data() { |
|
|
|
data () { |
|
|
|
return { |
|
|
|
return { |
|
|
|
classId: this.$route.query.class ? +this.$route.query.class : '', |
|
|
|
classId: this.$route.query.class ? +this.$route.query.class : '', |
|
|
|
classList: [], |
|
|
|
classList: [], |
|
|
@ -148,7 +204,7 @@ export default { |
|
|
|
}; |
|
|
|
}; |
|
|
|
}, |
|
|
|
}, |
|
|
|
watch: { |
|
|
|
watch: { |
|
|
|
month: function(val) { |
|
|
|
month: function (val) { |
|
|
|
if (val) { |
|
|
|
if (val) { |
|
|
|
let unit = 24 * 60 * 60 * 1000; |
|
|
|
let unit = 24 * 60 * 60 * 1000; |
|
|
|
this.date = [util.formatDate("yyyy-MM-dd", new Date(new Date().getTime() - unit * 30 * val)), util.formatDate("yyyy-MM-dd", new Date(new Date().getTime() + unit))]; |
|
|
|
this.date = [util.formatDate("yyyy-MM-dd", new Date(new Date().getTime() - unit * 30 * val)), util.formatDate("yyyy-MM-dd", new Date(new Date().getTime() + unit))]; |
|
|
@ -156,7 +212,7 @@ export default { |
|
|
|
this.date = []; |
|
|
|
this.date = []; |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
date: function(val) { |
|
|
|
date: function (val) { |
|
|
|
if (val) { |
|
|
|
if (val) { |
|
|
|
this.startingtime = val[0]; |
|
|
|
this.startingtime = val[0]; |
|
|
|
this.endTime = val[1]; |
|
|
|
this.endTime = val[1]; |
|
|
@ -167,35 +223,35 @@ export default { |
|
|
|
} |
|
|
|
} |
|
|
|
this.initData(); |
|
|
|
this.initData(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
keyword: function(val) { |
|
|
|
keyword: function (val) { |
|
|
|
clearTimeout(this.searchTimer); |
|
|
|
clearTimeout(this.searchTimer); |
|
|
|
this.searchTimer = setTimeout(() => { |
|
|
|
this.searchTimer = setTimeout(() => { |
|
|
|
this.initData(); |
|
|
|
this.initData(); |
|
|
|
}, 500); |
|
|
|
}, 500); |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
mounted() { |
|
|
|
mounted () { |
|
|
|
this.getschoolCourse(); |
|
|
|
this.getschoolCourse(); |
|
|
|
this.getClassData(); |
|
|
|
this.getClassData(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
methods: { |
|
|
|
methods: { |
|
|
|
pickerInput(){ |
|
|
|
pickerInput () { |
|
|
|
this.month = '6' |
|
|
|
this.month = '6' |
|
|
|
}, |
|
|
|
}, |
|
|
|
getschoolCourse() { // 获取课程下拉框数据 |
|
|
|
getschoolCourse () { // 获取课程下拉框数据 |
|
|
|
this.$get(this.api.schoolCourseByAchievement).then(res => { |
|
|
|
this.$get(this.api.schoolCourseByAchievement).then(res => { |
|
|
|
this.curriculumList = res.data; |
|
|
|
this.curriculumList = res.data; |
|
|
|
this.getData(); |
|
|
|
this.getData(); |
|
|
|
}).catch(err => { |
|
|
|
}).catch(err => { |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
getClassData() { // 获取班级下拉框数据 |
|
|
|
getClassData () { // 获取班级下拉框数据 |
|
|
|
this.$post(this.api.myClass).then(res => { |
|
|
|
this.$post(this.api.myClass).then(res => { |
|
|
|
this.classList = res.list; |
|
|
|
this.classList = res.list; |
|
|
|
}).catch(res => { |
|
|
|
}).catch(res => { |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
getData() { |
|
|
|
getData () { |
|
|
|
this.loadIns = Loading.service({ |
|
|
|
this.loadIns = Loading.service({ |
|
|
|
background: "rgba(255,255,255,.6)" |
|
|
|
background: "rgba(255,255,255,.6)" |
|
|
|
}); |
|
|
|
}); |
|
|
@ -216,10 +272,10 @@ export default { |
|
|
|
}; |
|
|
|
}; |
|
|
|
this.$post(this.api.getAchievementInfo, data).then(res => { |
|
|
|
this.$post(this.api.getAchievementInfo, data).then(res => { |
|
|
|
let list = [] |
|
|
|
let list = [] |
|
|
|
if(per == 0){ |
|
|
|
if (per == 0) { |
|
|
|
list = res.page |
|
|
|
list = res.page |
|
|
|
this.total = res.total |
|
|
|
this.total = res.total |
|
|
|
}else{ |
|
|
|
} else { |
|
|
|
list = res.page.records |
|
|
|
list = res.page.records |
|
|
|
this.total = res.page.total |
|
|
|
this.total = res.page.total |
|
|
|
} |
|
|
|
} |
|
|
@ -239,7 +295,7 @@ export default { |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 项目分类回调 |
|
|
|
// 项目分类回调 |
|
|
|
perChange(val) { |
|
|
|
perChange (val) { |
|
|
|
this.$router.push({ |
|
|
|
this.$router.push({ |
|
|
|
path: 'list', |
|
|
|
path: 'list', |
|
|
|
query: { |
|
|
|
query: { |
|
|
@ -250,7 +306,7 @@ export default { |
|
|
|
this.getData() |
|
|
|
this.getData() |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 班级回调 |
|
|
|
// 班级回调 |
|
|
|
classChange(val) { |
|
|
|
classChange (val) { |
|
|
|
this.$router.push({ |
|
|
|
this.$router.push({ |
|
|
|
path: 'list', |
|
|
|
path: 'list', |
|
|
|
query: { |
|
|
|
query: { |
|
|
@ -261,7 +317,7 @@ export default { |
|
|
|
this.getData() |
|
|
|
this.getData() |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 课程回调 |
|
|
|
// 课程回调 |
|
|
|
curriculumChange(val) { |
|
|
|
curriculumChange (val) { |
|
|
|
this.$router.push({ |
|
|
|
this.$router.push({ |
|
|
|
path: 'list', |
|
|
|
path: 'list', |
|
|
|
query: { |
|
|
|
query: { |
|
|
@ -271,20 +327,20 @@ export default { |
|
|
|
}) |
|
|
|
}) |
|
|
|
this.getData() |
|
|
|
this.getData() |
|
|
|
}, |
|
|
|
}, |
|
|
|
initData() { |
|
|
|
initData () { |
|
|
|
this.$refs.table.clearSelection(); |
|
|
|
this.$refs.table.clearSelection(); |
|
|
|
this.page = 1; |
|
|
|
this.page = 1; |
|
|
|
this.getData(); |
|
|
|
this.getData(); |
|
|
|
}, |
|
|
|
}, |
|
|
|
disabledSelection(row, index) { // 禁用勾选 |
|
|
|
disabledSelection (row, index) { // 禁用勾选 |
|
|
|
if (row.canDel) return true |
|
|
|
if (row.canDel) return true |
|
|
|
return false |
|
|
|
return false |
|
|
|
}, |
|
|
|
}, |
|
|
|
// 进入实验记录 |
|
|
|
// 进入实验记录 |
|
|
|
entry(row) { |
|
|
|
entry (row) { |
|
|
|
this.$router.push(`teach?id=${row.assessmentId || row.projectId}&projectName=${row.projectName}&permissions=${row.permissions}`) |
|
|
|
this.$router.push(`teach?id=${row.assessmentId || row.projectId}&projectName=${row.projectName}&permissions=${row.permissions || 0}`) |
|
|
|
}, |
|
|
|
}, |
|
|
|
handleDelete(row) { // 删除 |
|
|
|
handleDelete (row) { // 删除 |
|
|
|
this.$confirm("该项目下的所有成绩报告将会删除,是否继续?", "提示", { |
|
|
|
this.$confirm("该项目下的所有成绩报告将会删除,是否继续?", "提示", { |
|
|
|
type: "warning" |
|
|
|
type: "warning" |
|
|
|
}).then(() => { |
|
|
|
}).then(() => { |
|
|
@ -302,7 +358,7 @@ export default { |
|
|
|
}).catch(() => { |
|
|
|
}).catch(() => { |
|
|
|
}); |
|
|
|
}); |
|
|
|
}, |
|
|
|
}, |
|
|
|
delAllData() { // 批量删除 |
|
|
|
delAllData () { // 批量删除 |
|
|
|
if (this.multipleSelection.length) { |
|
|
|
if (this.multipleSelection.length) { |
|
|
|
this.$confirm("该项目下的所有成绩报告将会删除,是否继续?", "提示", { |
|
|
|
this.$confirm("该项目下的所有成绩报告将会删除,是否继续?", "提示", { |
|
|
|
type: "warning" |
|
|
|
type: "warning" |
|
|
@ -324,7 +380,7 @@ export default { |
|
|
|
this.getData(); |
|
|
|
this.getData(); |
|
|
|
}).catch(res => { |
|
|
|
}).catch(res => { |
|
|
|
}); |
|
|
|
}); |
|
|
|
if(this.multipleSelection.length === this.listData.length && this.pageNum>1) { |
|
|
|
if (this.multipleSelection.length === this.listData.length && this.pageNum > 1) { |
|
|
|
this.handleCurrentChange(this.pageNum - 1) |
|
|
|
this.handleCurrentChange(this.pageNum - 1) |
|
|
|
} |
|
|
|
} |
|
|
|
}).catch(() => { |
|
|
|
}).catch(() => { |
|
|
@ -333,10 +389,10 @@ export default { |
|
|
|
util.errorMsg("请先选择数据 !"); |
|
|
|
util.errorMsg("请先选择数据 !"); |
|
|
|
} |
|
|
|
} |
|
|
|
}, |
|
|
|
}, |
|
|
|
handleSelectionChange(val) { // 多选 |
|
|
|
handleSelectionChange (val) { // 多选 |
|
|
|
this.multipleSelection = val; |
|
|
|
this.multipleSelection = val; |
|
|
|
}, |
|
|
|
}, |
|
|
|
handleCurrentChange(val) { // 切换页码 |
|
|
|
handleCurrentChange (val) { // 切换页码 |
|
|
|
this.page = val |
|
|
|
this.page = val |
|
|
|
this.$router.push({ |
|
|
|
this.$router.push({ |
|
|
|
path: 'list', |
|
|
|
path: 'list', |
|
|
|