|
@@ -5,14 +5,59 @@
|
|
|
<span> 重点监控区域 </span>
|
|
<span> 重点监控区域 </span>
|
|
|
<img class="close-btn" src="@/assets/images/institute-safety/close.png" alt="" @click="emits('close')" />
|
|
<img class="close-btn" src="@/assets/images/institute-safety/close.png" alt="" @click="emits('close')" />
|
|
|
</header>
|
|
</header>
|
|
|
- <main> </main>
|
|
|
|
|
|
|
+ <main class="surveillance-list-main">
|
|
|
|
|
+ <div class="surveillance-group" v-for="group in surveillanceAreaList" :key="group.id">
|
|
|
|
|
+ <div class="group-title">
|
|
|
|
|
+ {{ group.groupName }}
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div
|
|
|
|
|
+ class="surveillance-camera"
|
|
|
|
|
+ :class="{ 'surveillance-camera_active': cam.code === curCamCode }"
|
|
|
|
|
+ v-for="cam in group.children"
|
|
|
|
|
+ :key="cam.id"
|
|
|
|
|
+ @click="emits('change-camera', cam.code)"
|
|
|
|
|
+ >
|
|
|
|
|
+ <img class="camera-preview" :src="cam.pushStreamDTO.imageUrl" alt="" />
|
|
|
|
|
+ <div class="camera-info">
|
|
|
|
|
+ <div class="camera-name">
|
|
|
|
|
+ <img src="@/assets/images/institute-safety/camera.png" alt="" />
|
|
|
|
|
+ <el-tooltip placement="top" :content="cam.name">
|
|
|
|
|
+ <span class="camera-name-text">{{ cam.name }}</span>
|
|
|
|
|
+ </el-tooltip>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </main>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
|
|
|
+ import { ElTooltip } from 'element-plus';
|
|
|
|
|
+ import { getSurveillanceAreaList } from '@/api/security-confidentiality-position';
|
|
|
|
|
+ import type { PositionMonitorCameraListRes } from '@/api/security-confidentiality-position';
|
|
|
|
|
+ import { onMounted, ref } from 'vue';
|
|
|
|
|
+
|
|
|
|
|
+ const props = defineProps<{
|
|
|
|
|
+ curCamCode: string | null;
|
|
|
|
|
+ }>();
|
|
|
|
|
+
|
|
|
const emits = defineEmits<{
|
|
const emits = defineEmits<{
|
|
|
(e: 'close'): void;
|
|
(e: 'close'): void;
|
|
|
|
|
+ (e: 'change-camera', code: string): void;
|
|
|
}>();
|
|
}>();
|
|
|
|
|
+
|
|
|
|
|
+ const surveillanceAreaList = ref<PositionMonitorCameraListRes[]>([]);
|
|
|
|
|
+
|
|
|
|
|
+ const getListData = () => {
|
|
|
|
|
+ getSurveillanceAreaList({ groupName: '', cameraName: '' }).then((res) => {
|
|
|
|
|
+ surveillanceAreaList.value = res;
|
|
|
|
|
+ });
|
|
|
|
|
+ };
|
|
|
|
|
+
|
|
|
|
|
+ onMounted(() => {
|
|
|
|
|
+ getListData();
|
|
|
|
|
+ });
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style scoped>
|
|
<style scoped>
|
|
@@ -45,4 +90,69 @@
|
|
|
.close-btn {
|
|
.close-btn {
|
|
|
cursor: pointer;
|
|
cursor: pointer;
|
|
|
}
|
|
}
|
|
|
|
|
+ .surveillance-list-main {
|
|
|
|
|
+ padding: 0 16px;
|
|
|
|
|
+ height: 623px;
|
|
|
|
|
+ overflow: auto;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .surveillance-group {
|
|
|
|
|
+ margin-top: 20px;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .group-title {
|
|
|
|
|
+ width: 86px;
|
|
|
|
|
+ height: 28px;
|
|
|
|
|
+ line-height: 26px;
|
|
|
|
|
+ background: rgba(0, 0, 0, 0.5);
|
|
|
|
|
+ border-radius: 4px;
|
|
|
|
|
+ border: 1px solid #000000;
|
|
|
|
|
+
|
|
|
|
|
+ font-weight: 400;
|
|
|
|
|
+ font-size: 14px;
|
|
|
|
|
+ color: #ffffff;
|
|
|
|
|
+ text-align: center;
|
|
|
|
|
+ }
|
|
|
|
|
+ .surveillance-camera {
|
|
|
|
|
+ position: relative;
|
|
|
|
|
+ margin-top: 16px;
|
|
|
|
|
+ width: 249px;
|
|
|
|
|
+ height: 142px;
|
|
|
|
|
+ border-radius: 4px;
|
|
|
|
|
+ border: 1px solid rgba(255, 255, 255, 0.8);
|
|
|
|
|
+ }
|
|
|
|
|
+ .surveillance-camera_active {
|
|
|
|
|
+ border: 1px solid #409eff;
|
|
|
|
|
+ box-shadow: 0px 0px 5px 5px rgba(64, 158, 255, 0.44);
|
|
|
|
|
+ }
|
|
|
|
|
+ .camera-preview {
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ }
|
|
|
|
|
+ .camera-info {
|
|
|
|
|
+ position: absolute;
|
|
|
|
|
+ bottom: 0;
|
|
|
|
|
+ width: 248px;
|
|
|
|
|
+ height: 80px;
|
|
|
|
|
+ background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.8) 100%);
|
|
|
|
|
+
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: flex-end;
|
|
|
|
|
+ justify-content: flex-start;
|
|
|
|
|
+ padding: 8px 12px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .camera-name {
|
|
|
|
|
+ font-weight: 500;
|
|
|
|
|
+ font-size: 12px;
|
|
|
|
|
+ color: #ffffff;
|
|
|
|
|
+
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ gap: 4px;
|
|
|
|
|
+ }
|
|
|
|
|
+ .camera-name-text {
|
|
|
|
|
+ max-width: 200px;
|
|
|
|
|
+ white-space: nowrap; /* 防止文本换行 */
|
|
|
|
|
+ overflow: hidden; /* 隐藏溢出的文本 */
|
|
|
|
|
+ text-overflow: ellipsis; /* 显示省略号 */
|
|
|
|
|
+ }
|
|
|
</style>
|
|
</style>
|