28968 7 månader sedan
förälder
incheckning
a4b77652fc

+ 5 - 1
src/api/modules/demo/dataAugmentation.ts

@@ -56,7 +56,7 @@ export const getDataAugmentationApi = (id: string | number) => {
  * @returns returns
  */
 export const addDataAugmentationApi = (data: DataAugmentationForm) => {
-  return http.post<any>('/demo/dataAugmentation', data, { loading: false })
+  return http.post<any>('/demo/dataAugmentation', data, { loading: true })
 }
 
 /**
@@ -124,3 +124,7 @@ export const getDialogApi = (id: String | Number) => {
 export const getMetricApi = (id: String | Number) => {
   return http.get('/demo/dataAugmentation/metric/' + id)
 }
+
+export const getVideoUrl = (id: String | Number) => {
+  return http.get('/demo/dataAugmentation/videoUrl/' + id)
+}

+ 1 - 1
src/components/DataAugmentationFormDialog/index.vue

@@ -161,7 +161,7 @@ const handleSubmit = () => {
         delete data.modelAddress
       }
       // console.log(data)
-      parameter.value.api!(data).then(res => {
+      parameter.value.api!(data, true).then(res => {
         if (res.code == 200) {
           proFormRef.value?.resetForm(formEl)
           ElMessage.success('操作成功')

+ 7 - 5
src/views/demo/targetTrack/index.vue

@@ -114,7 +114,8 @@ import {
   getCompareImageCountApi,
   getDialogApi,
   getTaskDictData,
-  getMetricApi
+  getMetricApi,
+  getVideoUrl
 } from '@/api/modules/demo/dataAugmentation'
 // import {  } from '@/api/modules/system/dictData'
 
@@ -136,10 +137,11 @@ const openMetricDialog = async (id: string | number) => {
 const dialogVisible = ref(false)
 const inputVideoUrl = ref()
 const outputVideoUrl = ref()
-const openResultDialog = (id: string | number) => {
-  inputVideoUrl.value = '/api/profile/upload/2024/11/17/schoolgirls_20241117233329A001_input/schoolgirls.mp4'
-  outputVideoUrl.value = '/api/profile/upload/2024/11/17/schoolgirls_20241117233329A001_input/schoolgirls.mp4'
-  //console.log(inputVideoUrl)
+const openResultDialog = async (id: string | number) => {
+  const res: any = await getVideoUrl(id)
+  inputVideoUrl.value = res.data.input
+  outputVideoUrl.value = res.data.output
+  console.log(inputVideoUrl)
   dialogVisible.value = true
 }
 const imageIdx = ref(0)