增加视频监控页面

This commit is contained in:
15683799673
2025-07-21 03:38:19 +08:00
parent f18b3ae03e
commit ee1365cd4c
17 changed files with 403 additions and 106 deletions

View File

@@ -1,5 +1,4 @@
<script setup lang="ts">
import type { PropType } from 'vue';
import { onMounted, ref } from 'vue';
import { SyncOutlined } from '@ant-design/icons-vue';
import { InputSearch, Skeleton, Tree } from 'ant-design-vue';
@@ -11,21 +10,15 @@ defineOptions({ inheritAttrs: false });
withDefaults(defineProps<{ showSearch?: boolean }>(), { showSearch: true });
const emit = defineEmits<{
/**
* 点击刷新按钮的事件
*/
reload: [];
checked: [];
/**
* 点击节点的事件
*/
reload: [];
select: [];
}>();
const channelId = defineModel('channelId', {
required: true,
type: Array as PropType<string[]>,
});
const searchValue = defineModel('searchValue', {
type: String,
default: '',
@@ -39,7 +32,6 @@ const showTreeSkeleton = ref<boolean>(true);
async function loadChannelTree() {
showTreeSkeleton.value = true;
searchValue.value = '';
channelId.value = [];
const ret = await treeList();
channelTree.value = ret;
showTreeSkeleton.value = false;
@@ -85,14 +77,14 @@ onMounted(loadChannelTree);
<Tree
v-bind="$attrs"
v-if="channelTree.length > 0"
v-model:selected-keys="channelId"
:class="$attrs.class"
:field-names="{ title: 'label', key: 'id' }"
:show-line="{ showLeafIcon: false }"
:tree-data="channelTree"
:virtual="false"
default-expand-all
checkable
@select="$emit('select')"
@check="$emit('checked')"
>
<template #title="{ label }">
<span v-if="label.indexOf(searchValue) > -1">