|
@@ -77,6 +77,15 @@
|
|
|
>
|
|
|
批量新增
|
|
|
</el-button>
|
|
|
+ <el-button
|
|
|
+ v-if="checkPrivilege('button', 'BatchAdd')"
|
|
|
+ icon="el-icon-delete"
|
|
|
+ type="danger"
|
|
|
+ :disabled="!multipleSelection.length"
|
|
|
+ @click="toBatchDelete"
|
|
|
+ >
|
|
|
+ 批量删除
|
|
|
+ </el-button>
|
|
|
</div>
|
|
|
<div>
|
|
|
<el-button
|
|
@@ -92,13 +101,12 @@
|
|
|
</div>
|
|
|
|
|
|
<div class="part-box part-box-pad">
|
|
|
- <el-table ref="TableList" :data="examTasks">
|
|
|
- <el-table-column
|
|
|
- type="index"
|
|
|
- label="序号"
|
|
|
- width="70"
|
|
|
- :index="indexMethod"
|
|
|
- ></el-table-column>
|
|
|
+ <el-table
|
|
|
+ ref="TableList"
|
|
|
+ :data="examTasks"
|
|
|
+ @selection-change="handleSelectionChange"
|
|
|
+ >
|
|
|
+ <el-table-column type="selection" width="50"></el-table-column>
|
|
|
<!-- <el-table-column prop="semesterName" label="学期" min-width="210">
|
|
|
</el-table-column>
|
|
|
<el-table-column
|
|
@@ -247,6 +255,7 @@ export default {
|
|
|
filter: {
|
|
|
semesterId: "",
|
|
|
examId: "",
|
|
|
+ openCollegeId: "",
|
|
|
status: "",
|
|
|
cardRuleId: "",
|
|
|
courseId: "",
|
|
@@ -261,6 +270,7 @@ export default {
|
|
|
size: this.GLOBAL.pageSize,
|
|
|
total: 0,
|
|
|
editType: "ADD",
|
|
|
+ multipleSelection: [],
|
|
|
ABLE_TYPE,
|
|
|
EXAM_TASK_STATUS,
|
|
|
examTasks: [],
|
|
@@ -283,6 +293,7 @@ export default {
|
|
|
...mapActions("exam", ["updateWaitTaskCount"]),
|
|
|
async getList() {
|
|
|
if (!this.checkPrivilege("list", "list")) return;
|
|
|
+ this.multipleSelection = [];
|
|
|
|
|
|
const datas = {
|
|
|
...this.filter,
|
|
@@ -303,6 +314,9 @@ export default {
|
|
|
this.current = page;
|
|
|
this.getList();
|
|
|
},
|
|
|
+ handleSelectionChange(val) {
|
|
|
+ this.multipleSelection = val.map((item) => item.id);
|
|
|
+ },
|
|
|
async toEnable(row) {
|
|
|
const msgs = [
|
|
|
[
|
|
@@ -364,6 +378,21 @@ export default {
|
|
|
this.getList();
|
|
|
this.updateWaitTaskCount();
|
|
|
},
|
|
|
+ async toBatchDelete() {
|
|
|
+ if (!this.multipleSelection.length) {
|
|
|
+ this.$message.error("请选择数据");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ const action = await this.$confirm(`确定要删除所选的命题任务吗`, "提示", {
|
|
|
+ type: "warning",
|
|
|
+ }).catch(() => {});
|
|
|
+ if (action !== "confirm") return;
|
|
|
+
|
|
|
+ await deleteExamTask(this.multipleSelection.join());
|
|
|
+ this.$message.success("操作成功!");
|
|
|
+ this.deletePageLastItem();
|
|
|
+ },
|
|
|
async toDelete(row) {
|
|
|
const result = await this.$confirm(`确定要删除命题任务吗?`, "提示", {
|
|
|
type: "warning",
|