| | |
| | | :disabled="selectedIds.length === 0" |
| | | @click="handleBatchProcess" |
| | | > |
| | | 批量处理 ({{ selectedIds.length }}) |
| | | 批量处理 |
| | | </el-button> |
| | | <el-button type="info" icon="el-icon-download" @click="handleExport"> |
| | | 导出异常数据 |
| | |
| | | return; |
| | | } |
| | | |
| | | // 跳转到批量处理页面 |
| | | // 跳转到批量处理页面(scriptids 以集合形式传递) |
| | | this.$router.push({ |
| | | path: "/Intelligentcenter/batch", |
| | | query: { |
| | | questionIds: this.selectedIds.join(","), |
| | | scriptids: this.selectedIds, |
| | | type: this.queryParams.templateType, |
| | | }, |
| | | }); |
| | |
| | | this.$message.success("数据已刷新"); |
| | | }, |
| | | |
| | | // 处理选择变化 |
| | | // 处理选择变化:每行 scriptids 是集合,需扁平化合并为一个数组 |
| | | handleSelectionChange(selection) { |
| | | this.selectedIds = selection.map((item) => item.scriptid); |
| | | this.selectedIds = selection.reduce( |
| | | (acc, item) => acc.concat(item.scriptids || []), |
| | | [] |
| | | ); |
| | | }, |
| | | |
| | | // 处理单个题目批量处理 |
| | | handleBatchQuestion(row) { |
| | | console.log(row); |
| | | |
| | | this.$router.push({ |
| | | path: "/Intelligentcenter/batch", |
| | | query: { |
| | | questionId: row.scriptid, |
| | | scriptids: row.scriptids, |
| | | type: this.queryParams.templateType, |
| | | }, |
| | | }); |