123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336 |
- <template>
- <div class="mark-detail-marker">
- <div class="part-box part-box-filter part-box-flex">
- <el-form ref="FilterForm" label-position="left" label-width="85px" inline>
- <el-form-item label="评阅题目">
- <el-select
- v-model="filter.groupNumber"
- placeholder="评阅题目"
- clearable
- >
- <el-option
- v-for="group in questions"
- :key="group.groupNumber"
- :value="group.groupNumber"
- :label="group.groupQuestions"
- ></el-option>
- </el-select>
- </el-form-item>
- <el-form-item label="评卷员">
- <el-input
- v-model.trim="filter.loginName"
- placeholder="评卷员姓名"
- clearable
- >
- </el-input>
- </el-form-item>
- <el-form-item label="班级">
- <el-input
- v-model.trim="filter.className"
- placeholder="班级"
- clearable
- >
- </el-input>
- </el-form-item>
- <el-form-item label-width="0px">
- <el-button type="primary" @click="search">查询</el-button>
- </el-form-item>
- </el-form>
- <div class="part-box-action">
- <el-button type="primary" @click="toBind"> 绑定评卷员 </el-button>
- <el-button
- type="primary"
- :disabled="!multipleSelection.length"
- @click="toBatchRecycle"
- >
- 回收
- </el-button>
- <el-button
- type="primary"
- :disabled="!multipleSelection.length"
- @click="toSetTaskCount(multipleSelection, {})"
- >
- 设置评卷数
- </el-button>
- </div>
- </div>
- <div class="part-box part-box-pad">
- <el-table
- ref="TableList"
- :data="dataList"
- @selection-change="handleSelectionChange"
- >
- <el-table-column
- type="selection"
- width="55"
- align="center"
- ></el-table-column>
- <el-table-column prop="courseName" label="评卷员" min-width="100">
- <template slot-scope="scope">
- <el-tag size="medium" type="info">
- {{ scope.row.name }}({{ scope.row.orgName }})
- </el-tag>
- </template>
- </el-table-column>
- <el-table-column
- prop="groupQuestions"
- label="评阅题目"
- min-width="200"
- ></el-table-column>
- <el-table-column prop="markedCount" label="已评数量" width="100">
- <span slot-scope="scope">
- {{ scope.row.resetting ? "--" : scope.row.markedCount }}
- </span>
- </el-table-column>
- <el-table-column prop="currentCount" label="正在评卷" width="100">
- <span slot-scope="scope">
- {{ scope.row.resetting ? "--" : scope.row.currentCount }}
- </span>
- </el-table-column>
- <el-table-column
- prop="topCount"
- label="设置评卷数"
- width="100"
- ></el-table-column>
- <el-table-column
- class-name="action-column"
- label="操作"
- width="140"
- fixed="right"
- >
- <template slot-scope="scope">
- <el-button
- class="btn-primary"
- type="text"
- :disabled="scope.row.resetting"
- @click="toReset(scope.row)"
- >{{ scope.row.resetting ? "重置中" : "重置" }}</el-button
- >
- <el-button
- class="btn-primary"
- type="text"
- @click="toUnbind(scope.row)"
- >解绑</el-button
- >
- <el-button
- class="btn-primary"
- type="text"
- @click="toSimpleRecycle(scope.row)"
- >回收</el-button
- >
- <el-button
- class="btn-primary"
- type="text"
- @click="toSetTaskCount([scope.row.markUserGroupId], scope.row)"
- >设置评卷数</el-button
- >
- </template>
- </el-table-column>
- </el-table>
- <div class="part-page">
- <el-pagination
- background
- layout="total, sizes, prev, pager, next, jumper"
- :pager-count="5"
- :current-page="current"
- :total="total"
- :page-size="size"
- @current-change="toPage"
- @size-change="pageSizeChange"
- >
- </el-pagination>
- </div>
- <p class="tips-info">
- 说明:<br />
- 1.评卷过程发现某些试题评卷工作任务重需要增加评卷员,可以选择对应评阅题目后绑定评卷员;<br />
- 2.重置 - 将评卷员已评任务删除; <br />
- 3.解绑 - 将该评卷员与这个分组关系解除绑定,他不能评这个分组; <br />
- 4.回收 - 将评卷员已领未评的任务,放到未评池中。
- </p>
- </div>
- <!-- ModifyMarkerTaskCount -->
- <modify-marker-task-count
- ref="ModifyMarkerTaskCount"
- :ids="curIds"
- :top-count="curRow.topCount"
- @modified="getList"
- ></modify-marker-task-count>
- <!-- ModifyMarkerBind -->
- <modify-marker-bind
- ref="ModifyMarkerBind"
- :courseCode="baseInfo.courseCode"
- :data="curData"
- @modified="markerSelected"
- ></modify-marker-bind>
- </div>
- </template>
- <script>
- import {
- markMarkerListPage,
- markMarkerReset,
- markMarkerUnbind,
- markMarkerRecycle,
- markGroupQuestions,
- markMarkerBind,
- } from "../../api";
- import ModifyMarkerTaskCount from "./ModifyMarkerTaskCount.vue";
- import ModifyMarkerBind from "./ModifyMarkerBind.vue";
- export default {
- name: "mark-detail-marker",
- props: {
- baseInfo: {
- type: Object,
- default() {
- return {};
- },
- },
- },
- components: { ModifyMarkerTaskCount, ModifyMarkerBind },
- data() {
- return {
- filter: {
- groupNumber: "",
- loginName: "",
- className: "",
- },
- current: 1,
- size: this.GLOBAL.pageSize,
- total: 0,
- dataList: [],
- curRow: {},
- curIds: [],
- curData: {},
- questions: [],
- multipleSelection: [],
- downloading: false,
- userParams: {},
- };
- },
- mounted() {
- this.filter.className = this.$ls.get("preset-className", "");
- this.filter.groupNumber = this.$ls.get("preset-groupNumber", "");
- this.$ls.remove("preset-className");
- this.$ls.remove("preset-groupNumber");
- this.getQuestions();
- this.toPage(1);
- },
- methods: {
- async getQuestions() {
- const res = await markGroupQuestions({
- examId: this.baseInfo.examId,
- paperNumber: this.baseInfo.paperNumber,
- });
- this.questions = res || [];
- },
- async getList() {
- const datas = {
- ...this.filter,
- examId: this.baseInfo.examId,
- paperNumber: this.baseInfo.paperNumber,
- pageNumber: this.current,
- pageSize: this.size,
- };
- const data = await markMarkerListPage(datas);
- this.dataList = data.records;
- this.total = data.total;
- },
- toPage(page) {
- this.current = page;
- this.getList();
- },
- search() {
- this.toPage(1);
- },
- handleSelectionChange(val) {
- this.multipleSelection = val.map((item) => item.markUserGroupId);
- },
- toBind() {
- if (!this.filter.groupNumber) {
- this.$message.error("请选择评阅题目");
- return;
- }
- this.curData = {
- examId: this.baseInfo.examId,
- paperNumber: this.baseInfo.paperNumber,
- groupNumber: this.filter.groupNumber,
- };
- this.$refs.ModifyMarkerBind.open();
- },
- async markerSelected(users) {
- if (!users.length) return;
- const datas = { ...this.curData, userIds: users.map((item) => item.id) };
- const res = await markMarkerBind(datas).catch(() => {});
- if (!res) return;
- this.$message.success("绑定成功!");
- this.getList();
- },
- // reset marker
- async toReset(row) {
- const confirm = await this.$confirm("确定要重置当前评卷员?", "提示", {
- type: "warning",
- }).catch(() => {});
- if (confirm !== "confirm") return;
- await markMarkerReset({
- markUserGroupId: row.markUserGroupId,
- });
- this.$message.success("操作成功!");
- this.getList();
- },
- // unbind marker
- async toUnbind(row) {
- const confirm = await this.$confirm("确定要解绑当前评卷员?", "提示", {
- type: "warning",
- }).catch(() => {});
- if (confirm !== "confirm") return;
- await markMarkerUnbind({
- markUserGroupId: row.markUserGroupId,
- });
- this.$message.success("操作成功!");
- this.getList();
- },
- // recycle marker
- async toBatchRecycle() {
- if (!this.multipleSelection.length) return;
- const confirm = await this.$confirm("确定要回收选中的评卷员?", "提示", {
- type: "warning",
- }).catch(() => {});
- if (confirm !== "confirm") return;
- this.toRecycle(this.multipleSelection);
- },
- async toSimpleRecycle(row) {
- const confirm = await this.$confirm("确定要回收当前评卷员?", "提示", {
- type: "warning",
- }).catch(() => {});
- if (confirm !== "confirm") return;
- this.toRecycle([row.markUserGroupId]);
- },
- async toRecycle(markUserGroupIds) {
- if (!markUserGroupIds.length) return;
- await markMarkerRecycle({
- markUserGroupIds,
- });
- this.$message.success("操作成功!");
- this.getList();
- },
- // set task count
- toSetTaskCount(ids, row) {
- if (!ids.length) return;
- this.curIds = ids;
- this.curRow = row;
- this.$refs.ModifyMarkerTaskCount.open();
- },
- },
- };
- </script>
|