| | |
| | | <el-input class="command-input" v-model="searchParams.areaName" placeholder="请输入" |
| | | clearable @clear="handleSearch" /> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="区域类型" prop="areaType"> |
| | | <el-form-item label="区域类型" prop="areaTypeKeys"> |
| | | <el-select class="command-select" popper-class="command-select-popper" |
| | | v-model="searchParams.areaType" placeholder="请选择" clearable @change="handleSearch"> |
| | | v-model="searchParams.areaTypeKeys" placeholder="请选择" clearable @change="handleSearch"> |
| | | <el-option v-for="item in dictObj.areaType" :key="item.dictKey" :label="item.dictValue" |
| | | :value="item.dictKey" /> |
| | | </el-select> |
| | |
| | | <el-table-column type="selection" width="46" /> |
| | | <el-table-column type="index" show-overflow-tooltip width="64" label="序号" /> |
| | | <el-table-column prop="areaName" show-overflow-tooltip width="150" label="区域名称" /> |
| | | <el-table-column show-overflow-tooltip width="160" label="区域位置"> |
| | | <el-table-column prop="areaTypeKeys" show-overflow-tooltip width="196" label="区域类型"> |
| | | <template v-slot="{ row }"> |
| | | {{ formatLocation(row) }} |
| | | {{ getDictLabel(row.areaTypeKeys, dictObj.areaType) }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="areaSize" show-overflow-tooltip width="130" label="区域面积(k㎡)" /> |
| | | <el-table-column prop="areaType" show-overflow-tooltip width="120" label="区域类型"> |
| | | <el-table-column prop="triggerCondition" show-overflow-tooltip label="触发条件"> |
| | | <template v-slot="{ row }"> |
| | | {{ getDictLabel(row.areaType, dictObj.areaType) }} |
| | | {{ getDictLabel(row.triggerCondition, dictObj.triggeringCondition) }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="triggerCondition" show-overflow-tooltip width="130" label="触发条件" /> |
| | | <el-table-column prop="responseMechanism" show-overflow-tooltip width="130" label="响应机制" /> |
| | | <el-table-column prop="controlLevel" show-overflow-tooltip width="120" label="管控级别"> |
| | | <el-table-column prop="responseMechanism" show-overflow-tooltip label="响应机制" /> |
| | | <el-table-column prop="controlLevel" show-overflow-tooltip label="管控级别"> |
| | | <template v-slot="{ row }"> |
| | | {{ getDictLabel(row.controlLevel, dictObj.controlLevel) }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="policeStationName" show-overflow-tooltip label="关联派出所" /> |
| | | <el-table-column show-overflow-tooltip label="可飞行时间段"> |
| | | <el-table-column show-overflow-tooltip width="300" label="可飞行时间段"> |
| | | <template v-slot="{ row }"> |
| | | {{ formatFlyDate(row) }} |
| | | </template> |
| | |
| | | import { fwAreaDividePageApi, fwAreaDivideRemoveApi } from './partitionApi' |
| | | import FormDiaLog from './FormDiaLog.vue' |
| | | import { getDictionaryByCode } from '@/api/system/dictbiz' |
| | | import { saveOperationLog } from '@ztzf/apis' |
| | | import { useRoute } from 'vue-router' |
| | | import { getDictLabel } from '@ztzf/utils' |
| | | |
| | | const initSearchParams = () => ({ |
| | | areaName: '', // 区域名称 |
| | | areaType: '', // 区域类型 |
| | | areaTypeKeys: '', // 区域类型 |
| | | current: 1, // 当前页 |
| | | size: 10, // 每页大小 |
| | | }) |
| | |
| | | const queryParamsRef = ref(null) // 查询表单实例 |
| | | const dialogRef = ref(null) // 弹框实例 |
| | | const dialogVisible = ref(false) |
| | | const route = useRoute() |
| | | |
| | | // 获取列表 |
| | | async function getList () { |
| | |
| | | // 删除 |
| | | async function handleDelete (row) { |
| | | const tips = row ? '该条' : '选中的项' |
| | | await ElMessageBox.confirm(`确认删除${tips}吗?`, '提示', { type: 'warning' }) |
| | | await ElMessageBox.confirm(`确认删除${tips}吗?`, '提示', { |
| | | type: 'warning', |
| | | customClass: 'command-page-view-message-box', |
| | | confirmButtonClass: 'command-message-box-confirm', |
| | | cancelButtonClass: 'command-message-box-cancel', |
| | | }) |
| | | const ids = row ? row.id : selectedIds.value.join(',') |
| | | await fwAreaDivideRemoveApi({ ids }) |
| | | saveOperationLog({ |
| | | requestUri: route.path, |
| | | title: `${route.name || '区域划分'}-删除`, |
| | | type: 1, |
| | | }) |
| | | ElMessage.success('删除成功') |
| | | selectedIds.value = [] |
| | | getList() |
| | |
| | | selectedIds.value = rows.map(item => item.id) |
| | | } |
| | | |
| | | function formatLocation (row) { |
| | | if (row?.longitude == null || row?.latitude == null) return '' |
| | | return `${row.longitude}, ${row.latitude}` |
| | | } |
| | | |
| | | function formatFlyDate (row) { |
| | | if (!row?.flyDateStart && !row?.flyDateEnd) return '' |
| | | return `${row.flyDateStart || '-'} ~ ${row.flyDateEnd || '-'}` |
| | |
| | | const dictObj = ref({ |
| | | areaType: [], //区域类型 |
| | | controlLevel: [], //管控级别 |
| | | triggeringCondition: [], //触发条件 |
| | | deviceType: [], |
| | | }) |
| | | provide('dictObj', dictObj) |
| | | |
| | | // 获取字典 |
| | | function getDictList() { |
| | | getDictionaryByCode('areaType,controlLevel,deviceType').then(res => { |
| | | getDictionaryByCode('areaType,controlLevel,deviceType,triggeringCondition').then(res => { |
| | | dictObj.value = res.data.data |
| | | }) |
| | | } |