|
@@ -161,6 +161,10 @@
|
|
|
:disabled="selectedRows.length == 0"
|
|
|
>文件导出</el-button
|
|
|
>
|
|
|
+ <el-button type="danger" :disabled="selectedRows.length === 0" @click="endAnalysis()">
|
|
|
+ <!-- <i data-feather="stop-circle" style="width: 12px;"></i> -->
|
|
|
+ 终止选中任务
|
|
|
+ </el-button>
|
|
|
</div>
|
|
|
<!-- 添加选择提示区域 :title="selectionText"-->
|
|
|
<div class="selection-control" v-if="selectedRows.length > 0">
|
|
@@ -466,7 +470,8 @@ import {
|
|
|
categories,
|
|
|
literResult,
|
|
|
getSotaDetails,
|
|
|
- exportOutcoms
|
|
|
+ exportOutcoms,
|
|
|
+ literEndClear
|
|
|
} from "@/api/knowledge";
|
|
|
import axios from "axios";
|
|
|
// 状态映射表
|
|
@@ -1439,6 +1444,24 @@ export default {
|
|
|
percentFormat(percentage) {
|
|
|
return `${percentage}%`;
|
|
|
},
|
|
|
+ /*终止 */
|
|
|
+ async endAnalysis() {
|
|
|
+ const selectedIds = this.isAllDataSelected
|
|
|
+ ? await this.getAllDataIds()
|
|
|
+ : Array.from(this.allSelectedRows.keys());
|
|
|
+ if (selectedIds.length === 0) {
|
|
|
+ this.$message.warning("请选择需要终止的文献");
|
|
|
+ return;
|
|
|
+ }
|
|
|
+
|
|
|
+ literEndClear(selectedIds).then((res) => {
|
|
|
+ if (res.status !== 200) return;
|
|
|
+ // 更新选中行的状态并启动轮询
|
|
|
+ this.selectedRows = [];
|
|
|
+ this.clearSelection();
|
|
|
+ this.fetchGpuList();
|
|
|
+ });
|
|
|
+ },
|
|
|
},
|
|
|
// 在组件销毁时清理所有轮询
|
|
|
beforeDestroy() {
|