| | |
| | | <img src="../../../assets/images/signMachineNest/machineRight/name.png" alt="" />{{ item.creator_name || '' }} |
| | | </div> |
| | | </div> |
| | | <div class="right"> |
| | | <img src="../../../assets/images/signMachineNest/machineRight/return.png" alt=""> |
| | | <div class="right" v-if="tabIndex===1" @click="returnImmediately(item.id)"> |
| | | <span>立即返航</span> |
| | | <img src="../../../assets/images/signMachineNest/machineRight/return-fly.png" alt=""> |
| | | </div> |
| | | <div class="right" v-else @click="reExecute(item.dock_sn)"> |
| | | <span>再次执行</span> |
| | | <img src="../../../assets/images/signMachineNest/machineRight/return-fly.png" alt=""> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | <script setup> |
| | | import { Search } from '@element-plus/icons-vue'; |
| | | import CommonTitle from '@/components/CommonTitle.vue'; |
| | | import { getBeforeJob, getTodayJob } from '@/api/home' |
| | | import { getBeforeJob, getTodayJob, flyByJobId, returnHome } from '@/api/home'; |
| | | import { useStore } from 'vuex'; |
| | | |
| | | const store = useStore(); |
| | | // 单个机巢信息 |
| | | const singleUavHome = computed(() => store.state.home.singleUavHome); |
| | | |
| | | const isMore = ref(true); |
| | | // 控制加载状态 |
| | |
| | | const getJobList = async () => { |
| | | const params = { |
| | | area_code: '', |
| | | device_sn: '', |
| | | device_sn: singleUavHome.value.device_sn, |
| | | job_name: searchText.value, |
| | | current: pageParams.value.current, |
| | | size: pageParams.value.size, |
| | |
| | | // 搜索数据 |
| | | const searchNickName = () => { |
| | | clearData(); |
| | | }; |
| | | |
| | | // 立即返航 |
| | | const returnImmediately = (id) => { |
| | | flyByJobId(id).then(result => { |
| | | if (result.data.code === 0) { |
| | | ElMessage.success('返航成功'); |
| | | } else { |
| | | ElMessage.error(result.data.message); |
| | | } |
| | | }); |
| | | }; |
| | | // 重新执行 |
| | | const reExecute = (dock_sn) => { |
| | | returnHome(dock_sn).then(result => { |
| | | if (result.data.code === 0) { |
| | | ElMessage.success('执行成功'); |
| | | } else { |
| | | ElMessage.error(result.data.message); |
| | | } |
| | | }); |
| | | }; |
| | | |
| | | onMounted(() => { |
| | |
| | | } |
| | | } |
| | | .right { |
| | | cursor: pointer; |
| | | position: relative; |
| | | span { |
| | | position: absolute; |
| | | display: inline-block; |
| | | top: 12px; |
| | | left: 12px; |
| | | width: 26px; |
| | | line-height: 12px; |
| | | font-size: 12px; |
| | | font-family: YouSheBiaoTiHei, YouSheBiaoTiHei, serif; |
| | | color: rgb(4,18,44) |
| | | } |
| | | img { |
| | | width: 46px; |
| | | height: 46px |