|
@@ -19,7 +19,7 @@
|
|
|
<el-col :span="3">
|
|
|
<el-button size="mini" type="primary" @click="downloadTemplate">下载上传教师评分模板</el-button>
|
|
|
</el-col>
|
|
|
- <el-col :span="3">
|
|
|
+ <el-col :span="2">
|
|
|
<el-button size="mini" type="primary" @click="selectDisplay">选择显示</el-button>
|
|
|
</el-col>
|
|
|
<el-col :span="3">
|
|
@@ -27,8 +27,11 @@
|
|
|
<el-button size="mini" type="primary">点击上传教师评分</el-button>
|
|
|
</el-upload>
|
|
|
</el-col>
|
|
|
+ <el-col :span="2">
|
|
|
+ <el-button type="primary" size="mini" @click="toIntegral"></el-button>
|
|
|
+ </el-col>
|
|
|
</el-row>
|
|
|
- <data-table :fields="fields" :data="list" :opera="opera" @share="share" @edit="toEdit" @delete="toDelete" @select="toSelect">
|
|
|
+ <data-table :fields="fields" :data="list" :opera="opera" @share="share" @edit="toEdit" @delete="toDelete" @select="toSelect" @star="toStar">
|
|
|
<template #custom="{item,row}">
|
|
|
<template v-if="item.prop === 'is_bind'">
|
|
|
<span :style="{ color: `${row[item.prop] ? '#67C23A' : '#F56C6C'}` }">{{ row[item.prop] ? '已激活' : '未激活' }}</span>
|
|
@@ -60,12 +63,7 @@
|
|
|
<span v-for="(i, index) in selectModel" :key="`select-${index}`" style="padding-right:15px;zoom:1.1">
|
|
|
<el-link type="primary" v-if="index === selectIndex && index !== 0" icon="el-icon-back" @click="toChangePos(i, -1)"></el-link>
|
|
|
<el-link @click="toDisplayPos(index)">{{ i }}</el-link>
|
|
|
- <el-link
|
|
|
- type="primary"
|
|
|
- v-if="index === selectIndex && index !== selectModel.length - 1"
|
|
|
- icon="el-icon-right"
|
|
|
- @click="toChangePos(i, 1)"
|
|
|
- ></el-link>
|
|
|
+ <el-link type="primary" v-if="index === selectIndex && index !== selectModel.length - 1" icon="el-icon-right" @click="toChangePos(i, 1)"></el-link>
|
|
|
</span>
|
|
|
</el-col>
|
|
|
</el-row>
|
|
@@ -89,6 +87,25 @@
|
|
|
</el-row>
|
|
|
</template>
|
|
|
</el-dialog>
|
|
|
+ <el-dialog title="往期评分" center :visible.sync="StarDialog">
|
|
|
+ <el-table :data="StarList" border stripe style="width: 100%">
|
|
|
+ <el-table-column align="center" prop="name" label="教师名称"> </el-table-column>
|
|
|
+ <el-table-column align="center" prop="create_time" label="归档时间"> </el-table-column>
|
|
|
+ <el-table-column align="center" prop="xsscore" label="学生评分"> </el-table-column>
|
|
|
+ </el-table>
|
|
|
+ <el-pagination
|
|
|
+ style="text-align: right; margin: 10px 0 0 0;"
|
|
|
+ background
|
|
|
+ layout="sizes,total, prev, pager, next"
|
|
|
+ :page-sizes="[10, 50, 100, 150, 200]"
|
|
|
+ :total="StarTotal"
|
|
|
+ :page-size="limit"
|
|
|
+ :current-page.sync="currentPage"
|
|
|
+ @current-change="changePage"
|
|
|
+ @size-change="sizeChange"
|
|
|
+ >
|
|
|
+ </el-pagination>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
@@ -100,6 +117,7 @@ import dataForm from '@frame/components/form';
|
|
|
import { createNamespacedHelpers } from 'vuex';
|
|
|
const { mapActions } = createNamespacedHelpers('teacher');
|
|
|
const { mapActions: util } = createNamespacedHelpers('util');
|
|
|
+const { mapActions: document } = createNamespacedHelpers('document');
|
|
|
export default {
|
|
|
name: 'index',
|
|
|
props: {},
|
|
@@ -142,6 +160,11 @@ export default {
|
|
|
return item.status === '1' || item.status === '2' || item.status === '3';
|
|
|
},
|
|
|
},
|
|
|
+ {
|
|
|
+ label: '往期评分',
|
|
|
+ icon: 'el-icon-star-on',
|
|
|
+ method: 'star',
|
|
|
+ },
|
|
|
],
|
|
|
fields: [],
|
|
|
list: [],
|
|
@@ -221,6 +244,13 @@ export default {
|
|
|
models: {},
|
|
|
selectModel: [],
|
|
|
selectIndex: '',
|
|
|
+ // 往期评分
|
|
|
+ skip: 0,
|
|
|
+ limit: 10,
|
|
|
+ StarList: [],
|
|
|
+ StarTotal: 0,
|
|
|
+ StarDialog: false,
|
|
|
+ currentPage: 1,
|
|
|
}),
|
|
|
created() {
|
|
|
this.$set(this, `fields`, this.columns);
|
|
@@ -236,6 +266,7 @@ export default {
|
|
|
methods: {
|
|
|
...util(['findModel']),
|
|
|
...mapActions(['query', 'delete', 'scoreImport', 'status', 'create', 'toExport']),
|
|
|
+ ...document({ dCreate: 'create', dQuery: 'queryTeacher' }),
|
|
|
async search({ skip = 0, limit = 10, ...info } = {}) {
|
|
|
const res = await this.query({ skip, limit, ...info });
|
|
|
if (this.$checkRes(res)) {
|
|
@@ -356,6 +387,42 @@ export default {
|
|
|
msg.close();
|
|
|
this.$checkRes(res, '任务已执行,请在 "菜单 - 待办事项" 中查看执行进度');
|
|
|
},
|
|
|
+ // 往期评分
|
|
|
+ async toStar({ data }) {
|
|
|
+ const res = await this.dQuery({ skip: this.skip, limit: this.limit, teacher: data.id || data._id });
|
|
|
+ if (this.$checkRes(res)) {
|
|
|
+ this.$set(this, `StarList`, res.data);
|
|
|
+ this.$set(this, `StarTotal`, res.total);
|
|
|
+ this.$set(this, `StarDialog`, true);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 分页
|
|
|
+ changePage(page = this.currentPage) {
|
|
|
+ this.toStar({ skip: (page - 1) * this.limit, limit: this.limit });
|
|
|
+ },
|
|
|
+ sizeChange(limit) {
|
|
|
+ this.limit = limit;
|
|
|
+ this.currentPage = 1;
|
|
|
+ this.toStar({ skip: 0, limit: this.limit });
|
|
|
+ },
|
|
|
+ // 教师积分归档
|
|
|
+ toIntegral() {
|
|
|
+ this.$confirm('此操作将教师积分清零并且积分归档, 是否继续?', '提示', {
|
|
|
+ confirmButtonText: '确定',
|
|
|
+ cancelButtonText: '取消',
|
|
|
+ type: 'warning',
|
|
|
+ })
|
|
|
+ .then(async () => {
|
|
|
+ const res = await this.dCreate({});
|
|
|
+ this.$checkRes(res, `积分归档成功`, res.errmsg || '积分归档失败');
|
|
|
+ })
|
|
|
+ .catch(() => {
|
|
|
+ this.$message({
|
|
|
+ type: 'info',
|
|
|
+ message: '已取消',
|
|
|
+ });
|
|
|
+ });
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|