| | |
| | | </el-table> |
| | | </div> |
| | | </div> |
| | | <div class="detail-title">设备列表</div> |
| | | <div class="command-table-container"> |
| | | <div class="command-table-content"> |
| | | <el-table |
| | | class="command-table" |
| | | :data="deviceList" |
| | | :loading="deviceLoading" |
| | | row-key="id" |
| | | > |
| | | <el-table-column prop="deviceName" show-overflow-tooltip label="设备名称" /> |
| | | <el-table-column prop="deviceType" show-overflow-tooltip label="设备类型" /> |
| | | </el-table> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <el-form |
| | |
| | | </el-table> |
| | | </el-form-item> |
| | | </div> |
| | | |
| | | <div class="detail-title">设备列表</div> |
| | | <div class="command-table-container"> |
| | | <div class="command-table-content"> |
| | | <el-table |
| | | class="command-table" |
| | | :data="deviceList" |
| | | :loading="deviceLoading" |
| | | row-key="id" |
| | | > |
| | | <el-table-column prop="deviceName" show-overflow-tooltip label="设备名称" /> |
| | | <el-table-column prop="deviceType" show-overflow-tooltip label="设备类型" /> |
| | | </el-table> |
| | | </div> |
| | | </div> |
| | | </el-form> |
| | | |
| | | <div class="footer"> |
| | |
| | | import CommonCesiumMap from '@/components/map-container/common-cesium-map.vue' |
| | | import * as Cesium from 'cesium' |
| | | import { fwAreaDivideDetailApi, fwAreaDivideListApi } from '../partition/partitionApi' |
| | | import { fwDeviceListApi } from '@/views/basicManage/deviceStock/fwDevice' |
| | | import { |
| | | addBufferRadiusLabelEntity, |
| | | buildEllipsePositions, |
| | |
| | | const searchName = ref('') |
| | | const areaList = ref([]) // 关联区域列表 |
| | | const selectedAreaRows = ref([]) //选中列表 |
| | | const deviceList = ref([]) // 设备列表 |
| | | const deviceLoading = ref(false) |
| | | const dictObj = inject('dictObj') |
| | | const mapRef = ref(null) |
| | | const route = useRoute() |
| | |
| | | if (areaList.value.length) return |
| | | const res = await fwAreaDivideListApi({ filterSelected: 1, sceneId: formData.value.id }) |
| | | areaList.value = res?.data?.data ?? [] |
| | | } |
| | | |
| | | async function loadDeviceListByAreaIds(areaIdsKey) { |
| | | if (!areaIdsKey) { |
| | | deviceList.value = [] |
| | | return |
| | | } |
| | | deviceLoading.value = true |
| | | try { |
| | | const res = await fwDeviceListApi({ areaIds: areaIdsKey }) |
| | | deviceList.value = res?.data?.data ?? [] |
| | | } finally { |
| | | deviceLoading.value = false |
| | | } |
| | | } |
| | | |
| | | // 关联区域变更 |
| | |
| | | } |
| | | |
| | | watch(() => selectedAreaRows.value, renderSelectedAreas) |
| | | const deviceAreaIdsKey = computed(() => |
| | | selectedAreaRows.value.map(item => item?.id).filter(Boolean).join(',') |
| | | ) |
| | | watch( |
| | | () => deviceAreaIdsKey.value, |
| | | val => { |
| | | loadDeviceListByAreaIds(val) |
| | | } |
| | | ) |
| | | watch( |
| | | () => visible.value, |
| | | val => { |