|
@@ -23,19 +23,19 @@
|
|
|
type="primary"
|
|
|
link
|
|
|
icon="View"
|
|
|
- v-auth="['demo:video2image:start']"
|
|
|
+ v-auth="['demo:ToInfrared:start']"
|
|
|
v-if="scope.row.status == '0' || scope.row.status == '3' || scope.row.status == '4'"
|
|
|
- ><!-- @click="startVideo2image(scope.row)" -->
|
|
|
- <!-- @confirm="stopVideo2image(scope.row)" -->
|
|
|
+ @click="startToInfrared(scope.row)"
|
|
|
+ >
|
|
|
开始
|
|
|
</el-button>
|
|
|
- <el-popconfirm title="确定终止此任务吗?" v-if="scope.row.status == '1'">
|
|
|
+ <el-popconfirm title="确定终止此任务吗?" @confirm="stopToInfrared(scope.row)" v-if="scope.row.status == '1'">
|
|
|
<template #reference>
|
|
|
<el-button type="primary" link icon="Delete"> 终止 </el-button>
|
|
|
</template>
|
|
|
</el-popconfirm>
|
|
|
- <el-button type="primary" link icon="View" v-auth="['demo:video2image:download']" v-if="scope.row.status == '2'">
|
|
|
- <!-- @click="dowloadVideo2image(scope.row)" -->
|
|
|
+ <el-button type="primary" link icon="View" v-auth="['demo:ToInfrared:download']" v-if="scope.row.status == '2'">
|
|
|
+ <!-- @click="dowloadToInfrared(scope.row)" -->
|
|
|
下载
|
|
|
</el-button>
|
|
|
<!-- <el-button type="primary" link icon="View" v-auth="['demo:toInfrared:query']" @click="openDialog(3, '查看', scope.row)"> 查看 </el-button> -->
|
|
@@ -61,7 +61,7 @@
|
|
|
import { ref, reactive } from 'vue'
|
|
|
import { useHandleData } from '@/hooks/useHandleData'
|
|
|
import { useDownload } from '@/hooks/useDownload'
|
|
|
-import { ElMessageBox } from 'element-plus'
|
|
|
+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'
|
|
@@ -79,8 +79,8 @@ import {
|
|
|
} from '@/api/modules/demo/toInfrared'
|
|
|
import statusEnums from '@/utils/status'
|
|
|
|
|
|
-const startVideo2image = async (params: any) => {
|
|
|
- const res = await startToInfraredApi(params.id)
|
|
|
+const startToInfrared = async (params: any) => {
|
|
|
+ const res: any = await startToInfraredApi(params.id)
|
|
|
if (res.code === 200) {
|
|
|
ElMessage.success('任务已开始,请等待完成!')
|
|
|
} else {
|
|
@@ -89,8 +89,8 @@ const startVideo2image = async (params: any) => {
|
|
|
proTable.value?.getTableList()
|
|
|
}
|
|
|
|
|
|
-const stopVideo2image = async (params: any) => {
|
|
|
- const res = await stopToInfraredApi(params.id)
|
|
|
+const stopToInfrared = async (params: any) => {
|
|
|
+ const res: any = await stopToInfraredApi(params.id)
|
|
|
if (res.code === 200) {
|
|
|
ElMessage.success('终止任务成功!')
|
|
|
} else {
|