| | |
| | | <!-- 任务统计表格 --> |
| | | <template> |
| | | <SearchBox @search="searchClick"></SearchBox> |
| | | <SearchBox @search="searchClick" @addTask="handleAddTask"></SearchBox> |
| | | <div class="task-intermediate-content"> |
| | | <el-table :data="jobListData" style="width: 100%" height="calc(100vh - 180px)"> |
| | | <el-table-column label="序号" width="60"> |
| | |
| | | /> |
| | | </div> |
| | | </div> |
| | | <AddTask v-model:show="isShowAddTask" @refresh="searchClick"/> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import SearchBox from '../SearchBox.vue'; |
| | | import AddTask from './AddTask.vue'; |
| | | import { jobList } from '@/api/home/task'; |
| | | |
| | | const jobListParams = reactive({ |
| | |
| | | }; |
| | | // 状态文字 |
| | | const getStatusText = (status) => { |
| | | console.log('哒哒哒',status) |
| | | const statusMap = { |
| | | 1: '待执行', |
| | | 2: '执行中', |
| | |
| | | getJobList(); |
| | | }; |
| | | |
| | | // 新建任务 |
| | | const isShowAddTask = ref(false); |
| | | const handleAddTask = () => { |
| | | isShowAddTask.value = true; |
| | | }; |
| | | |
| | | onMounted(() => { |
| | | getJobList(); |
| | | }); |
| | |
| | | <style lang="scss" scoped> |
| | | .task-intermediate-content { |
| | | position: absolute; |
| | | top: 200px; |
| | | width: calc(100% - 400px - 400px - 100px); |
| | | left: 450px; |
| | | height: 760px; |
| | | top: 400px; |
| | | width: calc(100% - 80px); |
| | | left: 40px; |
| | | height: 500px; |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: space-between; |