| | |
| | | deviceId: null, |
| | | taskDesc: '', |
| | | }) |
| | | // todo 时间线 |
| | | const dictObj = inject('dictObj') |
| | | |
| | | const emit = defineEmits(['success']) |
| | | const visible = defineModel() // 弹框显隐 |
| | | const dialogMode = ref('add') // 弹框模式 |
| | |
| | | workOrderList.value = res?.data?.data?.records ?? [] |
| | | } |
| | | |
| | | // 处理巡查任务类型变化 |
| | | async function handlePatrolTaskTypeChange(index, skilledTaskType) { |
| | | // 清空该行已选择的飞手 |
| | | taskList.value[index].recommendFlyerName = '' |
| | | // 获取对应的飞手列表 |
| | | await getFlyerList(index, skilledTaskType) |
| | | } |
| | | |
| | | // 获取飞手列表 |
| | | async function getFlyerList(index, skilledTaskType) { |
| | | const res = await gdFlyerPageApi({ |
| | |
| | | // 判断一行是否已填写(至少填写了任务名称) |
| | | function isTaskRowFilled(task) { |
| | | return !!(task.patrolTaskName || task.executeTime || task.patrolRouteUrl || task.recommendFlyerName || task.deviceId) |
| | | } |
| | | |
| | | // 判断一行是否完整填写(所有必填项都有值) |
| | | function isTaskRowComplete(task) { |
| | | return !!( |
| | | task.patrolTaskName && |
| | | task.patrolTaskType && |
| | | task.executeTime && |
| | | task.patrolRouteUrl && |
| | | task.recommendFlyerName && |
| | | task.deviceId |
| | | ) |
| | | } |
| | | |
| | | // 提交新增 |
| | |
| | | } |
| | | |
| | | .grayText { |
| | | color: #9f9f9f; |
| | | color: #9f9f9f !important; |
| | | } |
| | | </style> |