|
@@ -28,6 +28,7 @@
|
|
|
<!-- <el-button type="primary" link icon="Delete" v-auth="['demo:traceMerge:remove']" @click="deleteTraceMerge(scope.row)"> 删除 </el-button>-->
|
|
|
<el-button type="primary" link icon="View" @click="execute(scope.row)"> 执行任务 </el-button>
|
|
|
<el-button type="primary" link icon="View" @click="display(scope.row)"> 展示结果 </el-button>
|
|
|
+ <el-button type="primary" link icon="View" @click="showLog(scope.row)"> 查看日志 </el-button>
|
|
|
</template>
|
|
|
</ProTable>
|
|
|
<FormDialog ref="formDialogRef" />
|
|
@@ -52,38 +53,58 @@
|
|
|
|
|
|
<el-dialog v-model="displayDialogVisible" title="执行结果">
|
|
|
<el-container direction="vertical">
|
|
|
- <el-container v-for="(item, index) in resultData" :key="index">
|
|
|
+ <el-container v-for="(item, index) in resultData" :key="index" direction="horizontal" style=" place-items: center center">
|
|
|
+ <span> {{ item.split('/')[item.split('/').length - 1] }} </span>
|
|
|
<el-image :src="'/api/profile' + item" style="max-width: 300px; max-height: 300px"></el-image>
|
|
|
</el-container>
|
|
|
</el-container>
|
|
|
</el-dialog>
|
|
|
+
|
|
|
+ <el-dialog v-model="logDialogVisible" title="查看日志">
|
|
|
+ <el-container direction="vertical">
|
|
|
+ <el-container v-for="(item, index) in logData" :key="index">
|
|
|
+ {{ item }}
|
|
|
+ </el-container>
|
|
|
+ </el-container>
|
|
|
+ </el-dialog>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script setup lang="tsx" name="TraceMerge">
|
|
|
-import { ref, reactive } from 'vue'
|
|
|
+import { reactive, ref } from 'vue'
|
|
|
import { useHandleData } from '@/hooks/useHandleData'
|
|
|
import { useDownload } from '@/hooks/useDownload'
|
|
|
import { ElMessage, ElMessageBox } from 'element-plus'
|
|
|
import ProTable from '@/components/ProTable/index.vue'
|
|
|
import ImportExcel from '@/components/ImportExcel/index.vue'
|
|
|
import FormDialog from '@/components/FormDialog/index.vue'
|
|
|
-import { ProTableInstance, ColumnProps } from '@/components/ProTable/interface'
|
|
|
+import { ColumnProps, ProTableInstance } from '@/components/ProTable/interface'
|
|
|
import {
|
|
|
- listTraceMergeApi,
|
|
|
- delTraceMergeApi,
|
|
|
addTraceMergeApi,
|
|
|
- updateTraceMergeApi,
|
|
|
- importTemplateApi,
|
|
|
- importTraceMergeDataApi,
|
|
|
+ delTraceMergeApi,
|
|
|
+ executeApi,
|
|
|
exportTraceMergeApi,
|
|
|
+ getResApi,
|
|
|
getTraceMergeApi,
|
|
|
- executeApi,
|
|
|
- getResApi
|
|
|
+ importTemplateApi,
|
|
|
+ importTraceMergeDataApi,
|
|
|
+ listTraceMergeApi,
|
|
|
+ updateTraceMergeApi
|
|
|
} from '@/api/modules/demo/traceMerge'
|
|
|
import File from '@/components/Upload/File.vue'
|
|
|
import { getDictsApi } from '@/api/modules/system/dictData'
|
|
|
+import http from '@/api'
|
|
|
|
|
|
+const logDialogVisible = ref(false)
|
|
|
+const logData = ref([])
|
|
|
+const showLog = async function (row) {
|
|
|
+ let path = row.resultPath.split('ObjectDetection_Web')
|
|
|
+ path = path[path.length - 1]
|
|
|
+ let res = await http.get('/profile' + path + '/fusion.log')
|
|
|
+ // let res = 'hello \r\n world!'
|
|
|
+ logData.value = res.split('\n')
|
|
|
+ logDialogVisible.value = true
|
|
|
+}
|
|
|
const createTaskDialogVisible = ref(false)
|
|
|
const params = ref({
|
|
|
preprocessPath: null,
|
|
@@ -102,8 +123,8 @@ const display = function (row) {
|
|
|
let arr = row.resultPath.split('ObjectDetection_Web')
|
|
|
let pathPrefix = arr[arr.length - 1]
|
|
|
resultData.value = []
|
|
|
- for (let i = 0; i < res.data.length; i++) {
|
|
|
- resultData.value.push(pathPrefix + '/' + res.data[i])
|
|
|
+ for (let i = 1; i < res.data[0]; i++) {
|
|
|
+ resultData.value.push(pathPrefix + '/number' + i + '.png')
|
|
|
}
|
|
|
console.log('resultData', resultData.value)
|
|
|
displayDialogVisible.value = true
|