|
@@ -3,9 +3,12 @@
|
|
<dv-border-box1 ref="borderRef" style="width: 100%; height: 100%; margin: 0 auto">
|
|
<dv-border-box1 ref="borderRef" style="width: 100%; height: 100%; margin: 0 auto">
|
|
<div class="table-box">
|
|
<div class="table-box">
|
|
<ProTable ref="proTable" :columns="columns" row-key="id" :request-api="listITaskNewApi" :tool-button="false">
|
|
<ProTable ref="proTable" :columns="columns" row-key="id" :request-api="listITaskNewApi" :tool-button="false">
|
|
- <template #tableHeader="">
|
|
|
|
|
|
+ <template #tableHeader="scope">
|
|
<!-- <el-button type="primary" v-auth="['system:user:add']" :icon="CirclePlus" @click="createTask()"> 创建任务 </el-button>-->
|
|
<!-- <el-button type="primary" v-auth="['system:user:add']" :icon="CirclePlus" @click="createTask()"> 创建任务 </el-button>-->
|
|
<el-button type="primary" v-auth="['system:user:add']" :icon="CirclePlus" @click="createTaskNew()"> 创建任务 </el-button>
|
|
<el-button type="primary" v-auth="['system:user:add']" :icon="CirclePlus" @click="createTaskNew()"> 创建任务 </el-button>
|
|
|
|
+ <el-button type="danger" icon="Delete" plain :disabled="!scope.isSelected" @click="batchDelete(scope.selectedListIds)">
|
|
|
|
+ 批量删除
|
|
|
|
+ </el-button>
|
|
</template>
|
|
</template>
|
|
<!-- 表格操作 -->
|
|
<!-- 表格操作 -->
|
|
<template #operation="scope">
|
|
<template #operation="scope">
|
|
@@ -44,8 +47,9 @@ import { ColumnProps, ProTableInstance } from '@/components/ProTable/interface'
|
|
import { addUserApi, updateUserApi, deptTreeSelectApi } from '@/api/modules/system/user'
|
|
import { addUserApi, updateUserApi, deptTreeSelectApi } from '@/api/modules/system/user'
|
|
// import { getTaskApi } from '@/api/modules/taais/task'
|
|
// import { getTaskApi } from '@/api/modules/taais/task'
|
|
// import { listTaskApi, getTaskApi } from '@/api/modules/task/task'
|
|
// import { listTaskApi, getTaskApi } from '@/api/modules/task/task'
|
|
-import { listITaskNewApi, getITaskNewApi } from '@/api/modules/task/task'
|
|
|
|
|
|
+import { listITaskNewApi, getITaskNewApi, delTaskApi } from '@/api/modules/task/task'
|
|
import { getDictsApi } from '@/api/modules/system/dictData'
|
|
import { getDictsApi } from '@/api/modules/system/dictData'
|
|
|
|
+import { useHandleData } from '@/hooks/useHandleData'
|
|
// import taskDataList from '@/assets/mock/taskData.json'
|
|
// import taskDataList from '@/assets/mock/taskData.json'
|
|
// import { getDictsApi } from '@/api/modules/system/dictData'
|
|
// import { getDictsApi } from '@/api/modules/system/dictData'
|
|
onMounted(() => {
|
|
onMounted(() => {
|
|
@@ -65,6 +69,14 @@ const getTreeFilter = async () => {
|
|
treeFilterData.value = data
|
|
treeFilterData.value = data
|
|
initParam.deptId = treeFilterData.value[0].id
|
|
initParam.deptId = treeFilterData.value[0].id
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+// 批量删除多物体融合轨迹识别信息
|
|
|
|
+const batchDelete = async (ids: string[]) => {
|
|
|
|
+ await useHandleData(delTaskApi, ids, '删除所选任务')
|
|
|
|
+ proTable.value?.clearSelection()
|
|
|
|
+ proTable.value?.getTableList()
|
|
|
|
+}
|
|
|
|
+
|
|
// 查看详情
|
|
// 查看详情
|
|
const viewDetails = row => {
|
|
const viewDetails = row => {
|
|
console.log(row)
|
|
console.log(row)
|
|
@@ -109,7 +121,7 @@ const createTaskNew = () => {
|
|
}
|
|
}
|
|
// 表格配置项
|
|
// 表格配置项
|
|
const columns = reactive<ColumnProps<User.ResUserList>[]>([
|
|
const columns = reactive<ColumnProps<User.ResUserList>[]>([
|
|
- // { type: 'selection', fixed: 'left', width: 70 },
|
|
|
|
|
|
+ { type: 'selection', fixed: 'left', width: 70 },
|
|
{ prop: 'name', label: '任务名称' },
|
|
{ prop: 'name', label: '任务名称' },
|
|
// {
|
|
// {
|
|
// prop: 'status',
|
|
// prop: 'status',
|