|
@@ -32,7 +32,11 @@
|
|
|
</ProTable>
|
|
|
<FormDialog ref="formDialogRef" />
|
|
|
<ImportExcel ref="dialogRef" />
|
|
|
- <el-dialog v-model="dialogVisible" :title="'图片对比: 第' + imageIdx + '张图片对比'" width="80%">
|
|
|
+ <el-dialog
|
|
|
+ v-model="dialogVisible"
|
|
|
+ :title="'图片对比: 第' + imageIdx + '张图片对比 共' + Math.min(inFileCount, outFileCount) + '张图片'"
|
|
|
+ width="80%"
|
|
|
+ >
|
|
|
<div class="image-dialog">
|
|
|
<el-image :src="'data:image/png;base64,' + imageBase64List.origin" style="width: 45%"></el-image>
|
|
|
<el-image :src="'data:image/png;base64,' + imageBase64List.stable" style="width: 45%"></el-image>
|
|
@@ -64,7 +68,8 @@ import {
|
|
|
exportVideoStableApi,
|
|
|
getVideoStableApi,
|
|
|
startVideoStableApi,
|
|
|
- getCompareImageApi
|
|
|
+ getCompareImageApi,
|
|
|
+ getCompareImageCountApi
|
|
|
} from '@/api/modules/demo/videoStable'
|
|
|
|
|
|
const dialogVisible = ref(false)
|
|
@@ -74,6 +79,8 @@ const imageBase64List = ref({
|
|
|
origin: '',
|
|
|
stable: ''
|
|
|
})
|
|
|
+const inFileCount = ref(0)
|
|
|
+const outFileCount = ref(0)
|
|
|
|
|
|
const startVideoStable = async (params: any) => {
|
|
|
const res = await startVideoStableApi(params.id)
|
|
@@ -93,6 +100,16 @@ const loadImageData = async (taskId: string, imageIdx: number) => {
|
|
|
const compareVideoStable = async (params: any) => {
|
|
|
taskId.value = params.id
|
|
|
imageIdx.value = 1
|
|
|
+
|
|
|
+ const resCount: any = await getCompareImageCountApi(params.id)
|
|
|
+ if (resCount.code === 200) {
|
|
|
+ inFileCount.value = resCount.data.inFileCount
|
|
|
+ outFileCount.value = resCount.data.outFileCount
|
|
|
+ } else {
|
|
|
+ ElMessage.error('获取图片对比数量失败')
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
await loadImageData(taskId.value, imageIdx.value)
|
|
|
|
|
|
dialogVisible.value = true
|