|
@@ -25,6 +25,11 @@
|
|
<el-button type="primary" link icon="View"> 终止 </el-button>
|
|
<el-button type="primary" link icon="View"> 终止 </el-button>
|
|
</template>
|
|
</template>
|
|
</el-popconfirm>
|
|
</el-popconfirm>
|
|
|
|
+ <el-popconfirm title="确定暂停此任务吗?" @confirm="pauseDataAugmentation(scope.row)" v-if="scope.row.status == '1'">
|
|
|
|
+ <template #reference>
|
|
|
|
+ <el-button type="primary" link icon="View"> 暂停 </el-button>
|
|
|
|
+ </template>
|
|
|
|
+ </el-popconfirm>
|
|
<el-button type="primary" link icon="View" @click="compareDataAugmentation(scope.row)" v-if="scope.row.status == '2'"> 预览 </el-button>
|
|
<el-button type="primary" link icon="View" @click="compareDataAugmentation(scope.row)" v-if="scope.row.status == '2'"> 预览 </el-button>
|
|
<el-button type="primary" link icon="View" @click="downloadFile(scope.row)" v-if="scope.row.status == '2'"> 导出 </el-button>
|
|
<el-button type="primary" link icon="View" @click="downloadFile(scope.row)" v-if="scope.row.status == '2'"> 导出 </el-button>
|
|
<el-button type="primary" link icon="View" @click="openMetricDialog(scope.row.id)" v-if="scope.row.status == '2'"> 指标 </el-button>
|
|
<el-button type="primary" link icon="View" @click="openMetricDialog(scope.row.id)" v-if="scope.row.status == '2'"> 指标 </el-button>
|
|
@@ -110,7 +115,8 @@ import {
|
|
getCompareImageCountApi,
|
|
getCompareImageCountApi,
|
|
getDialogApi,
|
|
getDialogApi,
|
|
getTaskDictData,
|
|
getTaskDictData,
|
|
- getMetricApi
|
|
|
|
|
|
+ getMetricApi,
|
|
|
|
+ pauseDataAugmentationApi
|
|
} from '@/api/modules/demo/dataAugmentation'
|
|
} from '@/api/modules/demo/dataAugmentation'
|
|
// import { } from '@/api/modules/system/dictData'
|
|
// import { } from '@/api/modules/system/dictData'
|
|
|
|
|
|
@@ -229,7 +235,15 @@ const stopDataAugmentation = async (params: any) => {
|
|
}
|
|
}
|
|
proTable.value?.getTableList()
|
|
proTable.value?.getTableList()
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+const pauseDataAugmentation = async (params: any) => {
|
|
|
|
+ const res = await pauseDataAugmentationApi(params.id)
|
|
|
|
+ if (res.code === 200) {
|
|
|
|
+ ElMessage.success('任务暂停成功')
|
|
|
|
+ } else {
|
|
|
|
+ ElMessage.error('任务暂停失败!')
|
|
|
|
+ }
|
|
|
|
+ proTable.value?.getTableList()
|
|
|
|
+}
|
|
const loadImageData = async (taskId: string, imageIdx: number) => {
|
|
const loadImageData = async (taskId: string, imageIdx: number) => {
|
|
const res: any = await getCompareImageApi(taskId, imageIdx)
|
|
const res: any = await getCompareImageApi(taskId, imageIdx)
|
|
// imageBase64List.value.origin = res.origin
|
|
// imageBase64List.value.origin = res.origin
|