| | |
| | | </el-select> |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" width="300" align="center"> |
| | | <el-table-column label="操作" width="340" align="center"> |
| | | <template #default="scope"> |
| | | <el-button icon="el-icon-view" type="text" @click="handleDetail(scope.row)">查看</el-button> |
| | | <el-button icon="el-icon-view" type="text" v-if="!scope.row.isHL" @click="handleWarnInfo(scope.row)">警告</el-button> |
| | | <el-button icon="el-icon-delete" type="text" @click="handleDelete(scope.row)">删除</el-button> |
| | | <el-button type="text" @click="handleStar(scope.row)"> |
| | | <el-icon><Star /></el-icon> |
| | |
| | | <!-- </div> --> |
| | | </div> |
| | | </el-dialog> |
| | | <el-dialog class="ztzf-dialog" append-to-body v-model="isShowWarnView" title="查看警告信息" :width="pxToRem(1000)" :close-on-click-modal="false" :destroy-on-close="true"> |
| | | <el-table border :data="warningList" height="300"> |
| | | <el-table-column label="序号" type="index" width="60"></el-table-column> |
| | | <el-table-column prop="warn_info" label="内容" align="center" show-overflow-tooltip></el-table-column> |
| | | </el-table> |
| | | <template #footer> |
| | | <span class="dialog-footer"> |
| | | <el-button @click="isShowWarnView = false">取 消</el-button> |
| | | <el-button type="primary" @click="hlSubmit">忽略</el-button> |
| | | </span> |
| | | </template> |
| | | </el-dialog> |
| | | </template> |
| | | <script setup> |
| | | import { getHistoryTrack, cancelStar, addStar, updateDroneFlight, droneFlightLogInfoPage } from '@/api/logs'; |
| | |
| | | import { downloadXls } from '@/utils/util'; |
| | | import { exportBlob } from '@/api/common' |
| | | import { ElMessage, ElMessageBox, ElLoading } from 'element-plus'; |
| | | import { dateNow } from '@/utils/date'; |
| | | |
| | | const total = ref(0) |
| | | let rangTime = ref([]) |
| | |
| | | let tableList = ref([]) |
| | | |
| | | let isShowView = ref(false) |
| | | let isShowWarnView = ref(false) |
| | | let warningList = ref([]) |
| | | |
| | | let tabType = ref('全部') |
| | | |
| | |
| | | 23, 59, 59 |
| | | ).getTime() : '' |
| | | getHistoryTrack(params.value).then(res => { |
| | | tableList.value = res.data.data.list || [] |
| | | tableList.value = res.data.data.list.map(item => { |
| | | return { |
| | | ...item, |
| | | isHL: false, |
| | | children: [{ |
| | | id: item.id, |
| | | time: timeFormatConvert(dateNow()), |
| | | warn_info: '您今天误操作,今后请注意!' |
| | | }, |
| | | { |
| | | id: item.id, |
| | | time: timeFormatConvert(dateNow()), |
| | | warn_info: '您今天误操作,今后请注意!' |
| | | }], |
| | | } |
| | | }) |
| | | total.value = res.data.data.pagination.total || 0 |
| | | |
| | | }) |
| | | } |
| | | |
| | |
| | | detailTotal.value = res.data.data.total |
| | | }) |
| | | } |
| | | // 警告信息 |
| | | let saveId = ref('') |
| | | function handleWarnInfo(row) { |
| | | isShowWarnView.value = true |
| | | saveId.value = row.id |
| | | warningList.value = tableList.value.find(item => item.id === row.id).children |
| | | } |
| | | function hlSubmit() { |
| | | // 设置isHL为true |
| | | tableList.value.map(item => { |
| | | if (item.id === saveId.value) { |
| | | item.isHL = true |
| | | isShowWarnView.value = false |
| | | } |
| | | }) |
| | | } |
| | | // 分页 |
| | | function handleSizeChangeDetails(val) { |
| | | detailParams.value.size = val |