From 80790ccc8b8ee6ac8db201f0f6c2d136fefd5a69 Mon Sep 17 00:00:00 2001
From: chenyao <1219716595@qq.com>
Date: Sat, 12 Apr 2025 08:52:59 +0800
Subject: [PATCH] Merge branch 'master' of http://139.196.74.78:10010/r/drone/command-center-dashboard
---
src/views/TaskManage/TaskIntermediateContent/TaskIntermediateContent.vue | 45 ++++++++++++++++++++-------------------------
1 files changed, 20 insertions(+), 25 deletions(-)
diff --git a/src/views/TaskManage/TaskIntermediateContent/TaskIntermediateContent.vue b/src/views/TaskManage/TaskIntermediateContent/TaskIntermediateContent.vue
index f6b3f34..299a8f3 100644
--- a/src/views/TaskManage/TaskIntermediateContent/TaskIntermediateContent.vue
+++ b/src/views/TaskManage/TaskIntermediateContent/TaskIntermediateContent.vue
@@ -5,7 +5,7 @@
<el-table :data="jobListData" style="width: 100%" height="calc(100vh - 180px)">
<el-table-column label="序号" width="60">
<template #default="scope">
- {{ (jobListParams.page - 1) * jobListParams.limit + scope.$index + 1 }}
+ {{ (jobListParams.current - 1) * jobListParams.size + scope.$index + 1 }}
</template>
</el-table-column>
<el-table-column prop="job_info_num" label="任务编号" />
@@ -13,7 +13,7 @@
<el-table-column prop="dept_name" label="所属部门" />
<el-table-column prop="device_names" label="所属机巢" />
<el-table-column prop="ai_type_str" label="关联算法" />
- <el-table-column prop="status" label="任务状态" >
+ <el-table-column label="任务状态" >
<template #default="scope">
{{ scope.row.status ? getStatusText(scope.row.status) : '' }}
</template>
@@ -30,8 +30,8 @@
</el-table>
<div class="pagination">
<el-pagination
- v-model:current-page="jobListParams.page"
- v-model:page-size="jobListParams.limit"
+ v-model:current-page="jobListParams.current"
+ v-model:page-size="jobListParams.size"
:page-sizes="[10, 20, 30, 50]"
layout="total, sizes, prev, pager, next"
:total="total"
@@ -40,17 +40,21 @@
/>
</div>
</div>
+ <!-- 添加任务 -->
<AddTask v-model:show="isShowAddTask" @refresh="searchClick"/>
+ <!-- 当前任务详情 -->
+ <CurrentTaskDetails v-model:show="isShowCurrentTaskDetails" :rowData="rowData"/>
</template>
<script setup>
import SearchBox from '../SearchBox.vue';
import AddTask from './AddTask.vue';
+import CurrentTaskDetails from './CurrentTaskDetails.vue';
import { jobList } from '@/api/home/task';
const jobListParams = reactive({
- page: 1,
- limit: 10,
+ current: 1,
+ size: 10,
searchParams:{}
});
const jobListData = ref([]);
@@ -73,42 +77,33 @@
4: '已取消',
5: '执行失败'
};
- return statusMap[status] || '未知';
+ return statusMap[status] || '-';
};
-// 状态标签类型
-const getStatusType = (status) => {
- const typeMap = {
- 1: 'info',
- 2: 'warning',
- 3: 'success',
- 4: '',
- 5: 'danger'
- };
- return typeMap[status] || '';
-};
-
-// 查看详情
+// 查看当前任务详情 如果是一台机则显示详情 如果是多台机则进入集群调度(暂未开发)
+let isShowCurrentTaskDetails = ref(false);
+let rowData = ref({});
const handleDetail = (row) => {
- console.log('查看详情', row);
+ isShowCurrentTaskDetails.value = true;
+ rowData.value = row? row : {};
};
// 分页大小改变
const handleSizeChange = (val) => {
- jobListParams.limit = val;
+ jobListParams.size = val;
getJobList();
};
// 页码改变
const handleCurrentChange = (val) => {
- jobListParams.page = val;
+ jobListParams.current = val;
getJobList();
};
// 传参查询条件
const searchClick = (params) => {
- jobListParams.page = 1;
- jobListParams.limit = 10;
+ jobListParams.current = 1;
+ jobListParams.size = 10;
jobListParams.searchParams = params;
getJobList();
};
--
Gitblit v1.9.3