|
|
|
@ -1,159 +1,88 @@ |
|
|
|
|
<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 |
|
|
|
|
style="width: 300px"> |
|
|
|
|
<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" |
|
|
|
|
@change="curChange"></el-option> |
|
|
|
|
<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" |
|
|
|
|
:selectable="disabledSelection"></el-table-column> |
|
|
|
|
<el-table-column type="index" |
|
|
|
|
width="60" |
|
|
|
|
label="序号" |
|
|
|
|
align="center"> |
|
|
|
|
<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"> |
|
|
|
|
<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" |
|
|
|
|
: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="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> |
|
|
|
|
<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" |
|
|
|
|
: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> |
|
|
|
|
</template> |
|
|
|
@ -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("该项目下的所有成绩报告将会删除,是否继续?", "提示", { |
|
|
|
@ -392,10 +321,11 @@ export default { |
|
|
|
|
</script> |
|
|
|
|
|
|
|
|
|
<style lang="scss" scoped> |
|
|
|
|
.el-radio.is-bordered + .el-radio.is-bordered { |
|
|
|
|
margin-left: 0; |
|
|
|
|
.el-radio.is-bordered+.el-radio.is-bordered { |
|
|
|
|
margin-left: 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
.el-radio-group { |
|
|
|
|
white-space: nowrap; |
|
|
|
|
white-space: nowrap; |
|
|
|
|
} |
|
|
|
|
</style> |