增加视频监控页面
This commit is contained in:
@@ -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">
|
||||
|
Reference in New Issue
Block a user