| | |
| | | <el-table-column label="操作" width="200" align="center"> |
| | | <template #default="scope"> |
| | | <!-- <el-button icon="el-icon-view" type="text" @click="handleDetail(scope.row)">查看</el-button> --> |
| | | <!-- <el-button icon="el-icon-delete" type="text" @click="handleDelete">删除</el-button> --> |
| | | <el-button type="text" @click="handleStar(scope.row)"><el-icon><Star /></el-icon>收藏</el-button> |
| | | <!-- <el-button icon="el-icon-delete" type="text" @click="handleDelete">删除</el-button> --> |
| | | <el-button type="text" @click="handleStar(scope.row)"><el-icon><Star /></el-icon>{{ scope.row.is_favorite ? '取消收藏':'收藏' }}</el-button> |
| | | <el-button type="text" @click="handleExport(scope.row)"><el-icon><Download /></el-icon>导出</el-button> |
| | | </template> |
| | | </el-table-column> |
| | |
| | | </el-dialog> --> |
| | | </template> |
| | | <script setup> |
| | | import { getHistoryTrack, exportFlyLog, addStar, updateDroneFlight } from '@/api/logs'; |
| | | import { getHistoryTrack, cancelStar, addStar, updateDroneFlight } from '@/api/logs'; |
| | | import { flightLogPage } from '@/api/airspace/airspace'; |
| | | import { downloadXls } from '@/utils/util'; |
| | | import { exportBlob } from '@/api/common' |
| | |
| | | } |
| | | |
| | | function handleAll() { |
| | | params.value.isFavorite = false |
| | | params.value.page = 1 |
| | | tabType.value = '全部' |
| | | getList() |
| | | } |
| | | |
| | | function handleStartList() { |
| | |
| | | |
| | | // 收藏 |
| | | function handleStar(row) { |
| | | addStar({ flight_log_id: row.id }).then(res => { |
| | | getList() |
| | | }) |
| | | console.log(row, '5555') |
| | | if (row.is_favorite) { |
| | | cancelStar(row.id).then(res => { |
| | | ElMessage.success('取消收藏成功') |
| | | getList() |
| | | }) |
| | | } else { |
| | | addStar({ flight_log_id: row.id }).then(res => { |
| | | ElMessage.success('收藏成功') |
| | | getList() |
| | | }) |
| | | } |
| | | } |
| | | |
| | | // 打标签 |