8 files modified
2 files renamed
| | |
| | | <basic-container> |
| | | <el-form ref="queryParamsRef" :model="searchParams" class="ztzf-page-history-search"> |
| | | <el-form-item label="场景名称" prop="sceneName"> |
| | | <el-input class="ztzf-data-cockpit-search-input" v-model="searchParams.sceneName" placeholder="请输入" |
| | | clearable @clear="handleSearch" /> |
| | | <el-input |
| | | class="ztzf-data-cockpit-search-input" |
| | | v-model="searchParams.sceneName" |
| | | placeholder="请输入" |
| | | clearable |
| | | @clear="handleSearch" |
| | | /> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="场景类型" prop="sceneType"> |
| | | <el-select class="ztzf-data-cockpit-select" popper-class="ztzf-data-cockpit-select-popper" |
| | | v-model="searchParams.sceneType" placeholder="请选择" clearable @change="handleSearch"> |
| | | <el-option v-for="item in dictObj.sceneType" :key="item.dictKey" :label="item.dictValue" |
| | | :value="item.dictKey" /> |
| | | <el-select |
| | | class="ztzf-data-cockpit-select" |
| | | popper-class="ztzf-data-cockpit-select-popper" |
| | | v-model="searchParams.sceneType" |
| | | placeholder="请选择" |
| | | clearable |
| | | @change="handleSearch" |
| | | > |
| | | <el-option |
| | | v-for="item in dictObj.sceneType" |
| | | :key="item.dictKey" |
| | | :label="item.dictValue" |
| | | :value="item.dictKey" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="场景状态" prop="status"> |
| | | <el-select class="ztzf-data-cockpit-select" popper-class="ztzf-data-cockpit-select-popper" |
| | | v-model="searchParams.status" placeholder="请选择" clearable @change="handleSearch"> |
| | | <el-option v-for="item in statusOptions" :key="item.value" :label="item.label" :value="item.value" /> |
| | | <el-select |
| | | class="ztzf-data-cockpit-select" |
| | | popper-class="ztzf-data-cockpit-select-popper" |
| | | v-model="searchParams.status" |
| | | placeholder="请选择" |
| | | clearable |
| | | @change="handleSearch" |
| | | > |
| | | <el-option |
| | | v-for="item in dictObj.sceneStatus" |
| | | :key="item.dictKey" |
| | | :label="item.dictValue" |
| | | :value="item.dictKey" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | |
| | | </div> |
| | | |
| | | <div class="ztzf-table-pagination"> |
| | | <el-pagination popper-class="ztzf-data-cockpit-select-popper" |
| | | v-model:current-page="searchParams.current" v-model:page-size="searchParams.size" |
| | | layout="total, prev, pager, next, sizes" :total="total" @change="getList" /> |
| | | <el-pagination |
| | | popper-class="ztzf-data-cockpit-select-popper" |
| | | v-model:current-page="searchParams.current" |
| | | v-model:page-size="searchParams.size" |
| | | layout="total, prev, pager, next, sizes" |
| | | :total="total" |
| | | @change="getList" |
| | | /> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | const queryParamsRef = ref(null) // 查询表单实例 |
| | | const dialogRef = ref(null) // 弹框实例 |
| | | const dialogVisible = ref(false) |
| | | |
| | | const statusOptions = ref([ |
| | | { label: '正常', value: 0 }, |
| | | { label: '停用', value: 1 }, |
| | | ]) |
| | | |
| | | // 获取列表 |
| | | async function getList () { |
| | |
| | | sceneType: [], // 场景类型 |
| | | deviceMode: [], // 设备模式 |
| | | areaType: [], // 区域类型 |
| | | sceneStatus: [], // 场景状态 |
| | | }) |
| | | provide('dictObj', dictObj) |
| | | |
| | | // 获取字典 |
| | | function getDictList () { |
| | | getDictionaryByCode('sceneType,deviceMode,areaType').then(res => { |
| | | getDictionaryByCode('sceneType,deviceMode,areaType,sceneStatus').then(res => { |
| | | dictObj.value = res.data.data |
| | | }) |
| | | } |
| | |
| | | <basic-container> |
| | | <el-form ref="queryParamsRef" :model="searchParams" class="ztzf-page-history-search"> |
| | | <el-form-item label="名称" prop="deviceName"> |
| | | <el-input class="ztzf-data-cockpit-search-input" v-model="searchParams.deviceName" placeholder="请输入" |
| | | clearable @clear="handleSearch" /> |
| | | <el-input |
| | | class="ztzf-data-cockpit-search-input" |
| | | v-model="searchParams.deviceName" |
| | | placeholder="请输入" |
| | | clearable |
| | | @clear="handleSearch" |
| | | /> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="类型" prop="deviceType"> |
| | | <el-select class="ztzf-data-cockpit-select" popper-class="ztzf-data-cockpit-select-popper" |
| | | v-model="searchParams.deviceType" placeholder="请选择" clearable @change="handleSearch"> |
| | | <el-option v-for="item in dictObj.deviceType" :key="item.dictKey" :label="item.dictValue" |
| | | :value="item.dictKey" /> |
| | | <el-select |
| | | class="ztzf-data-cockpit-select" |
| | | popper-class="ztzf-data-cockpit-select-popper" |
| | | v-model="searchParams.deviceType" |
| | | placeholder="请选择" |
| | | clearable |
| | | @change="handleSearch" |
| | | > |
| | | <el-option |
| | | v-for="item in dictObj.deviceType" |
| | | :key="item.dictKey" |
| | | :label="item.dictValue" |
| | | :value="item.dictKey" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="部门" prop="belongDept"> |
| | | <el-tree-select class="ztzf-data-cockpit-select" popper-class="ztzf-data-cockpit-tree-select-popper" |
| | | v-model="searchParams.belongDept" :data="deptTree" :props="treeProps" node-key="id" check-strictly |
| | | clearable @change="handleSearch" /> |
| | | <el-tree-select |
| | | class="ztzf-data-cockpit-select" |
| | | popper-class="ztzf-data-cockpit-tree-select-popper" |
| | | v-model="searchParams.belongDept" |
| | | :data="deptTree" |
| | | :props="treeProps" |
| | | node-key="id" |
| | | check-strictly |
| | | clearable |
| | | @change="handleSearch" |
| | | /> |
| | | </el-form-item> |
| | | |
| | | <el-form-item label="时间"> |
| | | <el-date-picker popper-class="ztzf-data-cockpit-date-picker-popper" |
| | | class="ztzf-data-cockpit-date-picker" v-model="dateRange" type="daterange" range-separator="至" |
| | | start-placeholder="开始日期" end-placeholder="结束日期" value-format="YYYY-MM-DD HH:mm:ss" |
| | | @change="handleSearch" /> |
| | | <el-date-picker |
| | | popper-class="ztzf-data-cockpit-date-picker-popper" |
| | | class="ztzf-data-cockpit-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-form-item class="history-search-actions"> |
| | |
| | | <el-table-column prop="charger" show-overflow-tooltip width="100" label="负责人" /> |
| | | <el-table-column prop="yxzt" show-overflow-tooltip width="116" label="运行状态"> |
| | | <template v-slot="{ row }"> |
| | | {{ DEVICE_STATUS[row.status] || '-' }} |
| | | {{ getDictLabel(row.status, dictObj.deviceStatus) }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column label="操作" class-name="operation-btns"> |
| | |
| | | </div> |
| | | |
| | | <div class="ztzf-table-pagination"> |
| | | <el-pagination popper-class="ztzf-data-cockpit-select-popper" |
| | | v-model:current-page="searchParams.current" v-model:page-size="searchParams.size" |
| | | layout="total, prev, pager, next, sizes" :total="total" @change="getList" /> |
| | | <el-pagination |
| | | popper-class="ztzf-data-cockpit-select-popper" |
| | | v-model:current-page="searchParams.current" |
| | | v-model:page-size="searchParams.size" |
| | | layout="total, prev, pager, next, sizes" |
| | | :total="total" |
| | | @change="getList" |
| | | /> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | import { getDictionaryByCode } from '@/api/system/dictbiz' |
| | | import { getDeptTree } from '@/api/system/dept' |
| | | import { blobDownload, dateRangeFormat, getDictLabel, formatDateToSlash } from '@ztzf/utils' |
| | | import { DEVICE_STATUS } from '@ztzf/constants' |
| | | import DeviceTrackDiaLog from '@/views/basicManage/deviceStock/DeviceTrackDiaLog.vue' |
| | | import DeviceScrapDiaLog from '@/views/basicManage/deviceStock/DeviceScrapDiaLog.vue' |
| | | |
| | |
| | | |
| | | // 获取字典 |
| | | function getDictList () { |
| | | getDictionaryByCode('deviceType,deviceAtt').then(res => { |
| | | getDictionaryByCode('deviceType,deviceAtt,deviceStatus').then(res => { |
| | | dictObj.value = res.data.data |
| | | }) |
| | | } |
| | |
| | | <div>发现时间: {{ formData.findTime }}</div> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <div>反制效果: {{ getCounterEffectLabel(formData.counterEffect) }}</div> |
| | | <div>反制效果: {{ getDictLabel(formData.counterEffect, dictObj.counterEffect) }}</div> |
| | | </el-col> |
| | | <el-col :span="12"> |
| | | <div>反制方式: {{ getCounterWayLabel(formData.counterWay) }}</div> |
| | |
| | | <script setup> |
| | | import { computed, ref, inject } from 'vue' |
| | | import { fwEffectEvalDetailApi } from './countermeasureEvaluationApi' |
| | | import { getDictLabel } from '../../../../../../packages/utils' |
| | | |
| | | // 初始化表单数据 |
| | | const initForm = () => ({ |
| | |
| | | // 注入字典数据 |
| | | const dictObj = inject('dictObj') |
| | | // 注入反制效果选项 |
| | | const counterEffectOptions = inject('counterEffectOptions') |
| | | |
| | | const formData = ref(initForm()) // 表单数据 |
| | | const visible = defineModel() // 弹框显隐 |
| | |
| | | // 关闭弹框 |
| | | function handleCancel() { |
| | | visible.value = false |
| | | } |
| | | |
| | | // 获取反制效果标签 |
| | | function getCounterEffectLabel(value) { |
| | | const item = counterEffectOptions.find(opt => opt.value === value) |
| | | return item ? item.label : value |
| | | } |
| | | |
| | | // 获取反制方式标签 |
| | |
| | | <el-form-item label="反制效果" prop="counterEffect"> |
| | | <el-select v-model="searchParams.counterEffect" placeholder="请选择" clearable @change="handleSearch"> |
| | | <el-option |
| | | v-for="item in counterEffectOptions" |
| | | :key="item.value" |
| | | :label="item.label" |
| | | :value="item.value" |
| | | v-for="item in dictObj.counterEffect" |
| | | :key="item.dictKey" |
| | | :label="item.dictValue" |
| | | :value="item.dictKey" |
| | | /> |
| | | </el-select> |
| | | </el-form-item> |
| | |
| | | <el-table-column prop="findTime" label="发现时间" /> |
| | | <el-table-column prop="counterEffect" label="反制效果"> |
| | | <template v-slot="{ row }"> |
| | | {{ getCounterEffectLabel(row.counterEffect) }} |
| | | {{ getDictLabel(row.counterEffect, dictObj.counterEffect) }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="deviceName" label="反制设备名称" /> |
| | |
| | | const dialogVisible = ref(null) // 弹框显隐 |
| | | const dictObj = ref({ |
| | | deviceType: [], // 设备类型 |
| | | counterEffect: [], // 反制效果 |
| | | }) |
| | | |
| | | // 反制效果下拉选项 |
| | | const counterEffectOptions = [ |
| | | { value: 'fail', label: '失败' }, |
| | | { value: 'success', label: '成功' }, |
| | | ] |
| | | |
| | | // 注入字典和反制效果选项供FormDiaLog使用 |
| | | provide('dictObj', dictObj) |
| | | provide('counterEffectOptions', counterEffectOptions) |
| | | |
| | | // 获取列表 |
| | | async function getList() { |
| | |
| | | getList() |
| | | } |
| | | |
| | | // 获取反制效果标签 |
| | | function getCounterEffectLabel(value) { |
| | | const item = counterEffectOptions.find(opt => opt.value === value) |
| | | return item ? item.label : value |
| | | } |
| | | |
| | | // 获取工作模式标签 |
| | | function getWorkModeLabel(value) { |
| | |
| | | |
| | | // 获取字典 |
| | | function getDictList() { |
| | | getDictionaryByCode('deviceType').then(res => { |
| | | getDictionaryByCode('deviceType,counterEffect').then(res => { |
| | | dictObj.value = res.data.data |
| | | }) |
| | | } |
| File was renamed from applications/drone-command/src/views/detectionCountermeasure/detectionRange.vue |
| | |
| | | import { getDictionaryByCode } from '@/api/system/dictbiz' |
| | | import { getDictLabel } from '@ztzf/utils' |
| | | import { detectionRangePageApi, detectionRangeSubmitApi } from '@/api/detectionCountermeasure/detectionRange' |
| | | import DetectionRangeDialog from './components/DetectionRangeDialog.vue' |
| | | import DetectionRangeDialog from './DetectionRangeDialog.vue' |
| | | |
| | | const initSearchParams = () => ({ |
| | | deviceName: '', // 设备名称 |
| | |
| | | <el-table-column prop="deviceCode" show-overflow-tooltip width="140" label="设备编码" /> |
| | | <el-table-column prop="deviceStatus" show-overflow-tooltip width="100" label="设备状态"> |
| | | <template v-slot="{ row }"> |
| | | {{ getDeviceStatusLabel(row.deviceStatus) }} |
| | | {{ getDictLabel(row.deviceStatus, dictObj.deviceStatus) }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="areaDivideName" show-overflow-tooltip width="120" label="区域" /> |
| | |
| | | <el-table-column prop="dispatchContent" show-overflow-tooltip width="160" label="调度内容" /> |
| | | <el-table-column prop="dispatchResult" show-overflow-tooltip width="160" label="调度结果" /> |
| | | <el-table-column prop="disposeMeasure" show-overflow-tooltip width="160" label="处理措施" /> |
| | | <el-table-column label="操作" class-name="operation-btns" fixed="right" width="120"> |
| | | <!-- <el-table-column label="操作" class-name="operation-btns" fixed="right" width="120"> |
| | | <template v-slot="{ row }"> |
| | | <el-link @click="openForm('edit', row)">编辑</el-link> |
| | | <el-link @click="handleDelete(row)">删除</el-link> |
| | | </template> |
| | | </el-table-column> |
| | | </el-table-column>--> |
| | | </el-table> |
| | | </div> |
| | | |
| | |
| | | import { fwDeviceListApi } from '@/views/basicManage/deviceStock/fwDevice' |
| | | import { getDictionaryByCode } from '@/api/system/dictbiz' |
| | | import FormDiaLog from './FormDiaLog.vue' |
| | | import { getDictLabel } from '@ztzf/utils' |
| | | |
| | | // 初始化查询参数 |
| | | const initSearchParams = () => ({ |
| | |
| | | const dialogVisible = ref(false) |
| | | const dictObj = ref({ |
| | | deviceType: [], // 设备类型 |
| | | deviceStatus: [], // 设备状态 |
| | | }) |
| | | const sceneList = ref([]) // 场景列表 |
| | | const deviceList = ref([]) // 设备列表 |
| | | |
| | | // 注入字典到子组件 |
| | | provide('dictObj', dictObj) |
| | | |
| | | // 获取设备状态标签 |
| | | function getDeviceStatusLabel(status) { |
| | | const statusMap = { 0: '离线', 1: '在线' } |
| | | return statusMap[status] || status |
| | | } |
| | | |
| | | // 格式化调度日期 |
| | | function formatDispatchDate(row) { |
| | |
| | | |
| | | // 加载字典数据 |
| | | function getDictList() { |
| | | getDictionaryByCode('deviceType').then(res => { |
| | | getDictionaryByCode('deviceType,deviceStatus').then(res => { |
| | | dictObj.value = res.data.data |
| | | }) |
| | | } |
| | |
| | | {{ getDeviceTypeName(row.droneType) }} |
| | | </template> |
| | | </el-table-column> |
| | | <el-table-column prop="deviceCode" label="设备编码" /> |
| | | <el-table-column prop="deviceSn" label="设备编码" /> |
| | | <el-table-column label="设备状态"> |
| | | <template v-slot="{ row }"> |
| | | {{ getDeviceStatus(row) }} |
| | | {{ getDictLabel(row.deviceStatus, dictObj.deviceStatus) }} |
| | | </template> |
| | | </el-table-column> |
| | | </el-table> |
| | |
| | | import { getDictionaryByCode } from '@/api/system/dictbiz' |
| | | import { exportFwDroneAlarmRecordApi, fwDroneAlarmRecordPageApi } from './fwDroneAlarmRecord' |
| | | import FormDiaLog from './FormDiaLog.vue' |
| | | import { blobDownload, dateRangeFormat } from '@ztzf/utils' |
| | | import { blobDownload, dateRangeFormat, getDictLabel } from '@ztzf/utils' |
| | | |
| | | const initSearchParams = () => ({ |
| | | droneName: '', // 无人机名称 |
| | |
| | | getList() |
| | | } |
| | | |
| | | // 查看 |
| | | function handleView(row) { |
| | | dialogRef.value?.open({ mode: 'view', row: { ...row } }) |
| | | } |
| | | |
| | | function exportFile() { |
| | | exportLoading.value = true |
| | | exportFwDroneAlarmRecordApi() |
| | |
| | | }) |
| | | } |
| | | |
| | | function getDeviceStatus(row) { |
| | | return row.deviceStatus ?? row.status ?? '-' |
| | | } |
| | | |
| | | function getDeviceTypeName(value) { |
| | | return deviceTypeMap.value.get(value) || value || '-' |
| | | } |
| | | |
| | | // 获取字典 |
| | | function getDictList() { |
| | | getDictionaryByCode('deviceType').then(res => { |
| | | getDictionaryByCode('deviceType,deviceStatus').then(res => { |
| | | dictObj.value = res.data.data |
| | | }) |
| | | } |
| | |
| | | |
| | | // 设备状态 |
| | | export const DEVICE_STATUS = { |
| | | 0: '在线', |
| | | 1: '离线', |
| | | 2: '故障', |
| | | 3: '报废', |
| | | } |
| | | export const DEVICE_STATUS_LIST = Object.keys(DEVICE_STATUS).map(key => ({ value: key, label: DEVICE_STATUS[key] })) |
| | |
| | | |
| | | |
| | | export function getDictLabel(value, dictList) { |
| | | return dictList.find(item => item.dictKey === value)?.dictValue || value || '-' |
| | | return dictList.find(item => item.dictKey === String(value))?.dictValue || value || '' |
| | | } |
| | | |
| | | export function blobDownload(res) { |