6 files modified
5 files renamed
1 files deleted
| | |
| | | /> |
| | | </el-form-item> |
| | | <el-form-item label="任务算法"> |
| | | <!-- <el-select v-model="searchForm.ai_type" placeholder="请选择算法" clearable> |
| | | <!-- <el-select v-model="searchForm.ai_types" placeholder="请选择算法" clearable> |
| | | <el-option v-for="item in taskAlgorithm" :key="item.id" :label="item.dictValue" :value="item.dictKey" /> |
| | | </el-select> --> |
| | | <TaskAlgorithmBusiness :showAlgorithm="true" @algorithmChange="algorithmChange"/> |
| | |
| | | |
| | | const dateRange = ref([]); |
| | | const searchForm = reactive({ |
| | | ai_type: '', // 算法类型 |
| | | ai_types: [], // 算法类型 |
| | | area_code: '', // 区域code |
| | | create_dept: '', // 创建部门 |
| | | date_enum: '', // 日期枚举,可用值:TODAY,CURRENT_WEEK,CURRENT_MONTH,CURRENT_YEAR |
| | |
| | | const handleSearch = () => { |
| | | emit('search', { |
| | | ...searchForm, |
| | | start_date: `${dateRange.value[0]} 00:00:00`, |
| | | end_date: `${dateRange.value[1]} 23:59:59` |
| | | start_date: dateRange.value.length ? `${dateRange.value[0]} 00:00:00` : '', |
| | | end_date: dateRange.value.length ? `${dateRange.value[1]} 23:59:59` : '' |
| | | }); |
| | | }; |
| | | |
| | |
| | | // }); |
| | | // }; |
| | | const algorithmChange = (val) => { |
| | | searchForm.ai_type = val; |
| | | searchForm.ai_types = val; |
| | | }; |
| | | |
| | | const businessChange = (val) => { |
| | |
| | | <style lang="scss" scoped> |
| | | .search-box { |
| | | position: absolute; |
| | | top: 120px; |
| | | left: 450px; |
| | | width: calc(100% - 400px - 400px - 100px); |
| | | top: 340px; |
| | | left: 40px; |
| | | width: calc(100% - 80px); |
| | | height: 60px; |
| | | line-height: 60px; |
| | | background: rgba(31, 62, 122, 0.95); |
| | | // padding: 10px 20px; |
| | | transition: all 0.3s; |
| | |
| | | } |
| | | .search-row { |
| | | display: flex; |
| | | justify-content: space-between; |
| | | // justify-content: space-between; |
| | | align-items: center; |
| | | |
| | | .search-items { |
| | |
| | | z-index: 10; |
| | | border-top: 1px solid rgba(255, 255, 255, 0.1); |
| | | box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3); |
| | | margin-bottom: 60px; // 为分页预留空间 |
| | | } |
| | | |
| | | :deep(.el-form) { |
| | |
| | | line-height: 18px; |
| | | } |
| | | } |
| | | :deep(.el-pagination) { |
| | | position: fixed; |
| | | bottom: 20px; |
| | | left: 50%; |
| | | transform: translateX(-50%); |
| | | background: rgba(31, 62, 122, 0.95); |
| | | padding: 15px 20px; |
| | | border-radius: 4px; |
| | | box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3); |
| | | } |
| | | } |
| | | </style> |
| | |
| | | <div class="left"> |
| | | <div class="search"> |
| | | <div class="item">任务名称:<el-input v-model="searchForm.name" placeholder="请输入任务名称"></el-input></div> |
| | | <div class="item">任务日期: |
| | | <div class="item"><span style="color: red;">*</span>任务日期: |
| | | <el-date-picker |
| | | v-model="searchForm.begin_time" |
| | | format="YYYY-MM-DD" |
| | |
| | | </template> |
| | | |
| | | <script setup> |
| | | import { ElMessage } from 'element-plus'; |
| | | import { pxToRem } from '@/utils/rem'; |
| | | import { getWaylineList, createTask } from '@/api/home/task'; |
| | | import TaskAlgorithmBusiness from '../components/TaskAlgorithmBusiness.vue'; |
| | |
| | | |
| | | const searchForm = reactive({ |
| | | name: '', |
| | | ai_type: [], |
| | | ai_types: [], |
| | | file_id: '', |
| | | begin_time: '', |
| | | end_time: '', |
| | |
| | | } |
| | | }; |
| | | const algorithmChange = (val) => { |
| | | searchForm.ai_type = val; |
| | | searchForm.ai_types = val; |
| | | }; |
| | | |
| | | // 获取航线文件 |
| | |
| | | const emit = defineEmits(['refresh']); |
| | | // 提交 |
| | | const submitClick = () => { |
| | | if (!searchForm.begin_time) { |
| | | ElMessage({ |
| | | message: '请选择任务日期', |
| | | type: 'warning' |
| | | }); |
| | | return; |
| | | } |
| | | searchForm.end_time = `${searchForm.begin_time} 23:59:59`; |
| | | searchForm.begin_time = `${searchForm.begin_time} 00:00:00`; |
| | | |
| | | createTask(searchForm).then((res) => { |
| | | console.log(res); |
| | | if (res.code === 0) { |
| | | if (res.data.code === 0) { |
| | | ElMessage.success('任务创建成功'); |
| | | // 关闭当前窗口,刷新任务管理列表 |
| | | isShowAddTask.value = false; |
| | |
| | | isShowAddTask.value = false; |
| | | // 清除搜索数据 |
| | | searchForm.name = ''; |
| | | searchForm.ai_type = []; |
| | | searchForm.ai_types = []; |
| | | searchForm.file_id = ''; |
| | | searchForm.begin_time = ''; |
| | | searchForm.end_time = ''; |
| | |
| | | :deep(.el-date-picker), |
| | | :deep(.el-time-picker) { |
| | | width: 240px; |
| | | margin-left: 10px; |
| | | // margin-left: 10px; |
| | | } |
| | | :deep(.el-date-editor.el-input__wrapper) { |
| | | width: 200px; // 调整日期选择器宽度 |
| | |
| | | } |
| | | .right { |
| | | width: 30%; |
| | | display: flex; |
| | | flex-direction: column; |
| | | justify-content: space-between; |
| | | |
| | | .btn { |
| | | margin-top: 20px; |
| | | text-align: center; |
| | | |
| | | .el-button { |
| | | margin: 0 10px; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | </style> |
| | |
| | | }; |
| | | // 状态文字 |
| | | const getStatusText = (status) => { |
| | | console.log('哒哒哒',status) |
| | | const statusMap = { |
| | | 1: '待执行', |
| | | 2: '执行中', |
| | |
| | | <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; |
| | |
| | | <template> |
| | | <el-table :data="tableData" style="width: 100%" height="400" @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55" /> |
| | | <el-table-column type="index" label="序号" width="60" /> |
| | | <el-table-column prop="nickname" label="机巢名称" /> |
| | | <el-table-column prop="estimated_arrival_time" label="预计到达时间" /> |
| | | <el-table-column prop="exe_distance" label="执行里程" /> |
| | | </el-table> |
| | | <div class="pagination"> |
| | | <el-pagination |
| | | v-model:current-page="pageParams.page" |
| | | v-model:page-size="pageParams.limit" |
| | | :page-sizes="[10, 20, 30]" |
| | | layout="total, sizes, prev, pager, next" |
| | | :total="total" |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | | /> |
| | | <div class="table-container"> |
| | | <el-table :data="tableData" style="width: 100%" height="400" @selection-change="handleSelectionChange"> |
| | | <el-table-column type="selection" width="55" /> |
| | | <el-table-column type="index" label="序号" width="60" /> |
| | | <el-table-column prop="nickname" label="机巢名称" /> |
| | | <el-table-column prop="estimated_arrival_time" label="预计到达时间" /> |
| | | <el-table-column prop="exe_distance" label="执行里程" /> |
| | | </el-table> |
| | | <div class="pagination"> |
| | | <el-pagination |
| | | v-model:current-page="pageParams.page" |
| | | v-model:page-size="pageParams.limit" |
| | | :page-sizes="[10, 20, 30]" |
| | | layout="total, sizes, prev, pager, next" |
| | | :total="total" |
| | | @size-change="handleSizeChange" |
| | | @current-change="handleCurrentChange" |
| | | /> |
| | | </div> |
| | | </div> |
| | | </template> |
| | | |
| | |
| | | const getNestList = async () => { |
| | | tableData.value = []; |
| | | const res = await getFlyingNestBy(pageParams); |
| | | |
| | | if (res.data.code === 0) { |
| | | console.log(res.data.data, '哒哒哒'); |
| | | tableData.value = res.data.data; |
| | | } |
| | | }; |
| | |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .table-container { |
| | | height: 500px; |
| | | // display: flex; |
| | | // flex-direction: column; |
| | | |
| | | .pagination { |
| | | margin-top: 10px; |
| | | } |
| | | |
| | | // :deep(.el-table) { |
| | | // flex: 1; |
| | | // background-color: transparent; |
| | | // --el-table-border-color: rgba(255, 255, 255, 0.1); |
| | | // --el-table-header-bg-color: rgba(31, 62, 122, 0.5); |
| | | // --el-table-header-text-color: #fff; |
| | | // --el-table-text-color: #fff; |
| | | // } |
| | | } |
| | | </style> |
| | |
| | | <script setup> |
| | | import TaskLeft from "@/views/TaskManage/TaskLeft/TaskLeft.vue"; |
| | | import TaskRight from "@/views/TaskManage/TaskRight/TaskRight.vue"; |
| | | import TaskTop from "@/views/TaskManage/TaskTop/TaskTop.vue"; |
| | | import TaskIntermediateContent from "@/views/TaskManage/TaskIntermediateContent/TaskIntermediateContent.vue"; |
| | | </script> |
| | | |
| | | <template> |
| | | <TaskLeft/> |
| | | <TaskTop/> |
| | | <TaskIntermediateContent /> |
| | | <TaskRight/> |
| | | </template> |
| | | |
| | | |
| File was renamed from src/views/TaskManage/TaskRight/TaskEvent.vue |
| | |
| | | <!-- 任务事件统计 --> |
| | | <template> |
| | | <common-title title="任务事件统计"></common-title> |
| | | <!-- <common-title title="任务事件统计"></common-title> --> |
| | | <div class="task-event"> |
| | | <div class="chart" ref="chartRef"></div> |
| | | </div> |
| | |
| | | <style lang="scss" scoped> |
| | | .task-event { |
| | | font-family: YouSheBiaoTiHei, YouSheBiaoTiHei; |
| | | margin-left: 29px; |
| | | padding: 16px 16px; |
| | | // margin-left: 29px; |
| | | // padding: 16px 16px; |
| | | width: 340px; |
| | | height: 400px; |
| | | height: 200px; |
| | | background: linear-gradient( |
| | | 270deg, |
| | | rgba(31, 62, 122, 0) 0%, |
| File was renamed from src/views/TaskManage/TaskLeft/TaskIndustry.vue |
| | |
| | | <!-- 业务统计 --> |
| | | <template> |
| | | <common-title title="行业统计" :style="{ marginLeft: pxToRem(14) }"></common-title> |
| | | <!-- <common-title title="行业统计" :style="{ marginLeft: pxToRem(14) }"></common-title> --> |
| | | <div class="task-industry"> |
| | | <div class="chart" ref="chartRef"></div> |
| | | </div> |
| | |
| | | <style lang="scss" scoped> |
| | | .task-industry { |
| | | font-family: YouSheBiaoTiHei, YouSheBiaoTiHei; |
| | | margin-left: 29px; |
| | | padding: 16px 16px; |
| | | // margin-left: 29px; |
| | | // padding: 16px 16px; |
| | | width: 340px; |
| | | height: 400px; |
| | | height: 200px; |
| | | background: linear-gradient( |
| | | 270deg, |
| | | rgba(31, 62, 122, 0) 0%, |
| File was renamed from src/views/TaskManage/TaskRight/TaskTime.vue |
| | |
| | | <!-- 任务事件统计 --> |
| | | <template> |
| | | <common-title title="任务时间统计"></common-title> |
| | | <!-- <common-title title="任务时间统计"></common-title> --> |
| | | <div class="task-time"> |
| | | <div class="chart" ref="chartRef"></div> |
| | | </div> |
| | |
| | | <style lang="scss" scoped> |
| | | .task-time { |
| | | font-family: YouSheBiaoTiHei, YouSheBiaoTiHei; |
| | | margin-left: 29px; |
| | | padding: 16px 16px; |
| | | // margin-left: 29px; |
| | | // padding: 16px 16px; |
| | | width: 340px; |
| | | height: 400px; |
| | | height: 200px; |
| | | background: linear-gradient( |
| | | 270deg, |
| | | rgba(31, 62, 122, 0) 0%, |
| File was renamed from src/views/TaskManage/TaskLeft/TaskLeft.vue |
| | |
| | | <div class="task-left"> |
| | | <TaskTotal /> |
| | | <TaskIndustry /> |
| | | <TaskTime /> |
| | | <TaskEvent /> |
| | | </div> |
| | | </template> |
| | | |
| | | <script setup> |
| | | import TaskTotal from './TaskTotal.vue'; |
| | | import TaskIndustry from './TaskIndustry.vue'; |
| | | import TaskTime from './TaskTime.vue'; |
| | | import TaskEvent from './TaskEvent.vue'; |
| | | </script> |
| | | |
| | | <style lang="scss" scoped> |
| | | .task-left { |
| | | // width: 300px; |
| | | position: relative; |
| | | top: 20px; |
| | | display: flex; |
| | | justify-content: space-between; |
| | | margin: 40px; |
| | | } |
| | | </style> |
| File was renamed from src/views/TaskManage/TaskLeft/TaskTotal.vue |
| | |
| | | <!-- 任务统计 --> |
| | | <template> |
| | | <common-title title="任务统计" :style="{ marginLeft: pxToRem(14) }"></common-title> |
| | | <!-- <common-title title="任务统计" :style="{ marginLeft: pxToRem(14) }"></common-title> --> |
| | | <div class="task-total"> |
| | | <div class="card" v-for="item in list"> |
| | | <div> |
| | |
| | | <style lang="scss" scoped> |
| | | .task-total { |
| | | font-family: YouSheBiaoTiHei, YouSheBiaoTiHei; |
| | | margin-left: 29px; |
| | | padding: 16px 16px; |
| | | // margin-left: 29px; |
| | | // padding: 16px 16px; |
| | | width: 340px; |
| | | height: 400px; |
| | | height: 200px; |
| | | left: 40px; |
| | | background: linear-gradient( |
| | | 270deg, |
| | | rgba(31, 62, 122, 0) 0%, |
| | |
| | | display: grid; |
| | | grid-template-columns: repeat(2, 1fr); |
| | | grid-template-rows: repeat(3, 1fr); |
| | | gap: 20px; |
| | | gap: 10px; |
| | | padding: 20px; |
| | | .card { |
| | | /* position: absolute; |
| | |
| | | <!-- 关联算法和综合业务 --> |
| | | <template> |
| | | <div class="task-algorithm" v-if="showAlgorithm"> |
| | | <el-select v-model="ai_type" multiple collapse-tags collapse-tags-tooltip placeholder="请选择算法" clearable @change="handleAlgorithmChange"> |
| | | <el-select v-model="ai_types" multiple collapse-tags collapse-tags-tooltip placeholder="请选择算法" clearable @change="handleAlgorithmChange"> |
| | | <el-option v-for="item in taskAlgorithm" :key="item.id" :label="item.dictValue" :value="item.dictKey" /> |
| | | </el-select> |
| | | </div> |
| | |
| | | }); |
| | | |
| | | // 算法 |
| | | let ai_type = ref(''); |
| | | let ai_types = ref(''); |
| | | let taskAlgorithm = ref([]); |
| | | // 综合业务 |
| | | let industry_type = ref(''); |