forked from drone/command-center-dashboard

chenyao
2025-04-03 195c32c2280c0d4e9288b1c7d31603a3a819ac2e
src/views/TaskManage/components/TaskIntermediateContent/TaskIntermediateContent.vue
@@ -1,6 +1,6 @@
<!-- 任务统计表格 -->
<template>
  <SearchBox></SearchBox>
  <SearchBox @search="searchClick"></SearchBox>
  <div class="task-intermediate-content">
    <el-table :data="jobListData" style="width: 100%" height="calc(100vh - 180px)">
      <el-table-column label="序号" width="60">
@@ -51,13 +51,14 @@
const jobListParams = reactive({
  page: 1,
  limit: 10,
  searchParams:{}
});
const jobListData = ref([]);
const total = ref(0);
// 获取任务列表
const getJobList = () => {
  jobList({current:1,size:10}).then(res => {
  jobList(jobListParams).then(res => {
    if (res.data.code !== 0) return;
    jobListData.value = res.data.data.records;
    total.value = res.data.data.total;
@@ -104,6 +105,14 @@
  getJobList();
};
// 传参查询条件
const searchClick = (params) => {
  jobListParams.page = 1;
  jobListParams.limit = 10;
  jobListParams.searchParams = params;
  getJobList();
};
onMounted(() => {
  getJobList();
});
@@ -112,10 +121,10 @@
<style lang="scss" scoped>
.task-intermediate-content {
  position: absolute;
  top: 190px;
  top: 200px;
  width: calc(100% - 400px - 400px - 100px);
  left: 450px;
  height: 770px;
  height: 760px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;