【新增】生成笔试试卷按钮,细节修改
This commit is contained in:
@@ -54,7 +54,14 @@
|
||||
plain
|
||||
@click="openSet"
|
||||
>
|
||||
<Icon icon="ep:plus" class="mr-5px" /> 试卷调整
|
||||
<Icon icon="ep:set-up" class="mr-5px" /> 抽卷调整
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
plain
|
||||
@click="openDown"
|
||||
>
|
||||
<Icon icon="ep:files" class="mr-5px" /> 生成笔试试卷
|
||||
</el-button>
|
||||
<!-- 批量删除按钮 -->
|
||||
<!-- <el-button
|
||||
@@ -279,7 +286,25 @@ const openSet = () => {
|
||||
taskSetRef.value?.open();
|
||||
});
|
||||
};
|
||||
/** 表格选中数据 */
|
||||
const selections = ref([]);
|
||||
const openDown = async () => {
|
||||
|
||||
try {
|
||||
const rows = selections.value;
|
||||
if (!rows.length) {
|
||||
message.error('请至少选择一条数据');
|
||||
return;
|
||||
}
|
||||
|
||||
selectedRows.value = rows.map((d: any) => d.paperId); // 保存选中的行数据
|
||||
await PaperApi.openDown(selectedRows.value)
|
||||
message.success(t('common.delSuccess'))
|
||||
// 刷新列表
|
||||
await getList()
|
||||
} catch {}
|
||||
|
||||
};
|
||||
// 打开编辑弹窗
|
||||
const openEdit = (type: string, row?: object) => {
|
||||
showEdit.value = true;
|
||||
|
Reference in New Issue
Block a user