| | |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <el-form-item label="时间"> |
| | | <el-date-picker |
| | | popper-class="ztzf-date-picker-popper" |
| | | class="ztzf-date-picker" |
| | | v-model="dateRange" |
| | | type="daterange" |
| | | range-separator="至" |
| | | start-placeholder="开始日期" |
| | | end-placeholder="结束日期" |
| | | value-format="YYYY-MM-DD HH:mm:ss" |
| | | @change="handleSearch" |
| | | /> |
| | | </el-form-item> |
| | | </el-col> |
| | | <el-col :span="4"> |
| | | <el-form-item> |
| | | <el-button @click="resetForm">重置</el-button> |
| | | <el-button type="primary" @click="handleSearch">查询</el-button> |
| | |
| | | import { getDictionaryByCode } from '@/api/system/dictbiz' |
| | | import { exportFwDroneAlarmRecordApi, fwDroneAlarmRecordPageApi } from './fwDroneAlarmRecord' |
| | | import FormDiaLog from './FormDiaLog.vue' |
| | | import { blobDownload } from '@ztzf/utils' |
| | | import { blobDownload, dateRangeFormat } from '@ztzf/utils' |
| | | |
| | | const initSearchParams = () => ({ |
| | | droneName: '', // 无人机名称 |
| | |
| | | const queryParamsRef = ref(null) // 查询表单实例 |
| | | const dialogRef = ref(null) // 弹框实例 |
| | | const dictObj = ref({ |
| | | deviceType: [], |
| | | deviceType: [], //设备属性 |
| | | }) |
| | | const dateRange = ref([]) |
| | | const exportLoading = ref(false) |
| | | const deviceTypeMap = computed(() => { |
| | | const map = new Map() |
| | |
| | | |
| | | // 获取列表 |
| | | async function getList() { |
| | | const range = dateRangeFormat(dateRange.value) |
| | | loading.value = true |
| | | try { |
| | | const res = await fwDroneAlarmRecordPageApi(searchParams.value) |
| | | const params = { ...searchParams.value, start_time: range[0], end_time: range[1] } |
| | | const res = await fwDroneAlarmRecordPageApi(params) |
| | | list.value = res?.data?.data?.records ?? [] |
| | | total.value = res?.data?.data?.total ?? 0 |
| | | } finally { |