diff --git a/src/api/media/channel.ts b/src/api/media/channel.ts index b603cd03..e7b53af3 100644 --- a/src/api/media/channel.ts +++ b/src/api/media/channel.ts @@ -16,6 +16,9 @@ export default { // 删除 del: (id: string) => server.remove(`/media/channel/${id}`), + // 查询树形数据 + queryTree: (id: string, data?: any) => server.post(`/media/device/${id}/catalog/_query/tree`, data), + // ========== 视频播放 ========== // 开始直播 ptzStart: (deviceId: string, channelId: string, type: string) => diff --git a/src/views/media/Device/Channel/Tree/index.vue b/src/views/media/Device/Channel/Tree/index.vue new file mode 100644 index 00000000..4aa6160d --- /dev/null +++ b/src/views/media/Device/Channel/Tree/index.vue @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + diff --git a/src/views/media/Device/Channel/index.less b/src/views/media/Device/Channel/index.less new file mode 100644 index 00000000..ee596623 --- /dev/null +++ b/src/views/media/Device/Channel/index.less @@ -0,0 +1,48 @@ +.device-channel-warp { + display: flex; + + .left-warp { + position: relative; + margin-right: 16px; + padding: 20px; + background-color: #fff; + border-radius: 2px; + + .left-content { + width: 0; + height: 100%; + overflow: hidden; + + &.active { + width: 260px; + } + } + + .left-warp--btn { + position: absolute; + top: 50%; + right: 0; + padding: 20px 4px; + color: rgba(#000, 0.3); + background-color: rgba(#f0f0f0, 6); + border-radius: ~'100% 0 0 100% / 50% 0 0 50%'; + cursor: pointer; + + &:hover { + color: rgba(#000, 0.5); + background-color: rgba(#f0f0f0, 8); + } + + &.active { + right: 50%; + background-color: transparent; + border-radius: 0; + transform: translateX(50%) rotate(180deg); + } + } + } + + .right { + flex: 1; + } +} diff --git a/src/views/media/Device/Channel/index.vue b/src/views/media/Device/Channel/index.vue index 94d5b9c6..b39e302a 100644 --- a/src/views/media/Device/Channel/index.vue +++ b/src/views/media/Device/Channel/index.vue @@ -1,82 +1,102 @@ - - - - - + + + + + - 新增 - - - 新增 - - - - - - - - - - - + + + + + + + + - - - - + 新增 + + + 新增 - - - - + + + + + + + + + + + + + + + + + + + + + f.key !== 'delete') : actions; }; + +// 左侧树 +const show = ref(false); +const deviceId = computed(() => route.query.id as string); +const handleSelect = (key: string) => { + if (key === deviceId.value && listRef.value?.reload) { + listRef.value?.reload(); + } else { + params.value = { + terms: [ + { + column: 'parentId', + value: key, + }, + ], + }; + } +}; + diff --git a/src/views/notice/Config/index.vue b/src/views/notice/Config/index.vue index 5ea89785..0ba66bc8 100644 --- a/src/views/notice/Config/index.vue +++ b/src/views/notice/Config/index.vue @@ -257,9 +257,7 @@ const columns = [ * @param params */ const handleSearch = (e: any) => { - console.log('handleSearch:', e); params.value = e; - console.log('params.value: ', params.value); }; /**