| | |
| | | <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 |
| | | }) |
| | | } |