徐景良 2025-07-23 10:27:25 +08:00
commit 0dd247039c
3 changed files with 11 additions and 4 deletions

View File

@ -28,10 +28,11 @@
</template> </template>
<script setup lang="ts"> <script setup lang="ts">
import {} from "vue" import { defineProps } from "vue"
import { BasicTable, useTable, TableAction } from '@/components/Table'; import { BasicTable, useTable, TableAction } from '@/components/Table';
import { columns, searchFormSchema, levelOptions, modelOptions } from './utils' import { columns, searchFormSchema, levelOptions, modelOptions } from './utils'
import { GetManageDeviceHmsList } from '@/api/demo/device' import { GetManageDeviceHmsList } from '@/api/demo/device'
const props = defineProps(['deviceWarningInfo'])
const [registerTable, { reload, expandAll, getForm}] = useTable({ const [registerTable, { reload, expandAll, getForm}] = useTable({
title: '告警信息', title: '告警信息',
api: GetManageDeviceHmsList, api: GetManageDeviceHmsList,
@ -55,6 +56,7 @@ const [registerTable, { reload, expandAll, getForm}] = useTable({
params.endTime = params.time[1] params.endTime = params.time[1]
} }
params.time = null params.time = null
params.getway = props.deviceWarningInfo.gateWay
return params return params
}, },
afterFetch(data) { afterFetch(data) {

View File

@ -25,7 +25,7 @@
icon: 'ant-design:file-search-outlined', icon: 'ant-design:file-search-outlined',
onClick: () => { onClick: () => {
console.log('deviceInfoList',deviceInfoList) console.log('deviceInfoList',deviceInfoList)
deviceWarningDrawer = true openDeviceWarningDrawer(record)
}, },
}, },
{ {
@ -55,7 +55,7 @@
<FeedbackDrawer /> <FeedbackDrawer />
</a-drawer> </a-drawer>
<a-drawer class="device-warning" v-model:open="deviceWarningDrawer" title="告警信息" width="70%" :closable="false"> <a-drawer class="device-warning" v-model:open="deviceWarningDrawer" title="告警信息" width="70%" :closable="false">
<DeviceWarning /> <DeviceWarning :deviceWarningInfo="deviceWarningInfo"/>
</a-drawer> </a-drawer>
<a-drawer class="feedback-drawer" title="设备运维" v-model:open="deviceControl" width="45%" style="background:#f0f1f2" :closable="false"> <a-drawer class="feedback-drawer" title="设备运维" v-model:open="deviceControl" width="45%" style="background:#f0f1f2" :closable="false">
<!-- <DeviceControl :deviceInfoList="deviceInfoList" :controlSN="controlSN" :controlChildSN="controlChildSN"/> --> <!-- <DeviceControl :deviceInfoList="deviceInfoList" :controlSN="controlSN" :controlChildSN="controlChildSN"/> -->
@ -136,6 +136,7 @@ const editDeviceModal = ref(false)
const editDeviceDate = ref({}) const editDeviceDate = ref({})
const controlChildSN = ref() const controlChildSN = ref()
const controlItemDetsils = ref() const controlItemDetsils = ref()
const deviceWarningInfo = ref()
watch(() => [afterFetch.value, props.connected], ([newAfterFetch, newConnected], [oldAfterFetch, oldConnected]) => { watch(() => [afterFetch.value, props.connected], ([newAfterFetch, newConnected], [oldAfterFetch, oldConnected]) => {
// console.log(newAfterFetch,newConnected) // console.log(newAfterFetch,newConnected)
// console.log(getDataSource()) // console.log(getDataSource())
@ -253,6 +254,10 @@ const delDevice = (record) => {
}, },
}); });
} }
const openDeviceWarningDrawer = (record) => {
deviceWarningInfo.value = record
deviceWarningDrawer.value = true
}
</script> </script>
<style lang="scss" scoped> <style lang="scss" scoped>

View File

@ -194,7 +194,7 @@
import { airPortStore } from '@/store/modules/airport'; import { airPortStore } from '@/store/modules/airport';
import { EventBus } from '@/utils/eventBus'; import { EventBus } from '@/utils/eventBus';
const uavStatus = ref(); const uavStatus = ref(0);
const airPortStoreVal = airPortStore(); const airPortStoreVal = airPortStore();
const uav = airPortStoreVal.getUAV; const uav = airPortStoreVal.getUAV;
const isTakeOff = ref(false); const isTakeOff = ref(false);