|
@@ -1,133 +1,135 @@
|
|
|
<template>
|
|
<template>
|
|
|
- <div class="control-panel">
|
|
|
|
|
- <div class="changeGridBar">
|
|
|
|
|
- <div class="changeGrid">
|
|
|
|
|
- <el-tooltip class="box-item" effect="dark" content="一屏" placement="bottom">
|
|
|
|
|
- <img
|
|
|
|
|
- :src="currentGrid === GridType.oneGrid ? oneGrid_selected : oneGrid"
|
|
|
|
|
- class="changeGridIcon"
|
|
|
|
|
- :class="currentGrid === GridType.oneGrid ? 'selectedGridIcon' : ''"
|
|
|
|
|
- @click="changeGridType(GridType.oneGrid)"
|
|
|
|
|
- />
|
|
|
|
|
- </el-tooltip>
|
|
|
|
|
- </div>
|
|
|
|
|
-
|
|
|
|
|
- <div class="changeGrid">
|
|
|
|
|
- <el-tooltip effect="dark" content="四屏" placement="bottom">
|
|
|
|
|
- <img
|
|
|
|
|
- :src="currentGrid === GridType.fourGrids ? fourGrids_selected : fourGrids"
|
|
|
|
|
- class="changeGridIcon"
|
|
|
|
|
- :class="currentGrid === GridType.fourGrids ? 'selectedGridIcon' : ''"
|
|
|
|
|
- @click="changeGridType(GridType.fourGrids)"
|
|
|
|
|
- />
|
|
|
|
|
- </el-tooltip>
|
|
|
|
|
- </div>
|
|
|
|
|
-
|
|
|
|
|
- <div class="changeGrid">
|
|
|
|
|
- <el-tooltip class="box-item" effect="dark" content="九屏" placement="bottom">
|
|
|
|
|
- <img
|
|
|
|
|
- :src="currentGrid === GridType.nineGrids ? nineGrids_selected : nineGrids"
|
|
|
|
|
- class="changeGridIcon"
|
|
|
|
|
- :class="currentGrid === GridType.nineGrids ? 'selectedGridIcon' : ''"
|
|
|
|
|
- @click="changeGridType(GridType.nineGrids)"
|
|
|
|
|
- />
|
|
|
|
|
- </el-tooltip>
|
|
|
|
|
- </div>
|
|
|
|
|
-
|
|
|
|
|
- <div class="changeGrid">
|
|
|
|
|
- <el-tooltip class="box-item" effect="dark" content="十六屏" placement="bottom">
|
|
|
|
|
- <img
|
|
|
|
|
- :src="currentGrid === GridType.sixteenGrids ? sixteenGrids_selected : sixteenGrids"
|
|
|
|
|
- class="changeGridIcon"
|
|
|
|
|
- :class="currentGrid === GridType.sixteenGrids ? 'selectedGridIcon' : ''"
|
|
|
|
|
- @click="changeGridType(GridType.sixteenGrids)"
|
|
|
|
|
- />
|
|
|
|
|
- </el-tooltip>
|
|
|
|
|
- </div>
|
|
|
|
|
-
|
|
|
|
|
- <div>|</div>
|
|
|
|
|
- </div>
|
|
|
|
|
-
|
|
|
|
|
- <div class="controlBtns">
|
|
|
|
|
- <div class="lockAndSetTime">
|
|
|
|
|
- <div class="pausePlay" @click="handleClickLock">
|
|
|
|
|
- <el-tooltip class="box-item" effect="dark" :content="isPaused ? '恢复轮播' : '取消轮播'" placement="bottom">
|
|
|
|
|
- <div v-if="isPaused">
|
|
|
|
|
- <img src="@/assets/icons/nine-square-grid/lock.png" />
|
|
|
|
|
- </div>
|
|
|
|
|
- <div v-else>
|
|
|
|
|
- <img src="@/assets/icons/nine-square-grid/unlock.png" />
|
|
|
|
|
- </div>
|
|
|
|
|
|
|
+ <div class="toolbar">
|
|
|
|
|
+ <div class="control-row">
|
|
|
|
|
+ <div style="display: flex">
|
|
|
|
|
+ <div class="grid-switch">
|
|
|
|
|
+ <el-tooltip effect="dark" content="一屏" placement="bottom">
|
|
|
|
|
+ <img
|
|
|
|
|
+ :src="currentGrid === GridType.oneGrid ? oneGrid_selected : oneGrid"
|
|
|
|
|
+ class="grid-icon"
|
|
|
|
|
+ :class="{ selected: currentGrid === GridType.oneGrid }"
|
|
|
|
|
+ @click="handleChange(GridType.oneGrid)"
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-tooltip>
|
|
|
|
|
+ <el-tooltip effect="dark" content="四屏" placement="bottom">
|
|
|
|
|
+ <img
|
|
|
|
|
+ :src="currentGrid === GridType.fourGrids ? fourGrids_selected : fourGrids"
|
|
|
|
|
+ class="grid-icon"
|
|
|
|
|
+ :class="{ selected: currentGrid === GridType.fourGrids }"
|
|
|
|
|
+ @click="handleChange(GridType.fourGrids)"
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-tooltip>
|
|
|
|
|
+ <el-tooltip effect="dark" content="九屏" placement="bottom">
|
|
|
|
|
+ <img
|
|
|
|
|
+ :src="currentGrid === GridType.nineGrids ? nineGrids_selected : nineGrids"
|
|
|
|
|
+ class="grid-icon"
|
|
|
|
|
+ :class="{ selected: currentGrid === GridType.nineGrids }"
|
|
|
|
|
+ @click="handleChange(GridType.nineGrids)"
|
|
|
|
|
+ />
|
|
|
|
|
+ </el-tooltip>
|
|
|
|
|
+ <el-tooltip effect="dark" content="十六屏" placement="bottom">
|
|
|
|
|
+ <img
|
|
|
|
|
+ :src="currentGrid === GridType.sixteenGrids ? sixteenGrids_selected : sixteenGrids"
|
|
|
|
|
+ class="grid-icon"
|
|
|
|
|
+ :class="{ selected: currentGrid === GridType.sixteenGrids }"
|
|
|
|
|
+ @click="handleChange(GridType.sixteenGrids)"
|
|
|
|
|
+ />
|
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
- <div class="setIntervalTime" v-show="isPlaying && !isPaused">
|
|
|
|
|
- <div>相机轮播时间间隔:</div>
|
|
|
|
|
- <el-input
|
|
|
|
|
- v-model="playIntervalTime"
|
|
|
|
|
- ref="inputRef"
|
|
|
|
|
- placeholder="默认60"
|
|
|
|
|
- class="intervalTimeInputBar"
|
|
|
|
|
- @blur="handelStartPlay"
|
|
|
|
|
- @keyup.enter="handelStartPlay"
|
|
|
|
|
- >
|
|
|
|
|
- <template #append>
|
|
|
|
|
- <div>秒</div>
|
|
|
|
|
- </template>
|
|
|
|
|
- </el-input>
|
|
|
|
|
|
|
+ <div class="play-control">
|
|
|
|
|
+ <div class="lock-btn" @click="handleClickLock">
|
|
|
|
|
+ <el-tooltip effect="dark" :content="isPaused ? '恢复轮播' : '取消轮播'" placement="bottom">
|
|
|
|
|
+ <img v-if="isPaused" src="@/assets/icons/nine-square-grid/lock.png" />
|
|
|
|
|
+ <img v-else src="@/assets/icons/nine-square-grid/unlock.png" />
|
|
|
|
|
+ </el-tooltip>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <div v-show="isPlaying && !isPaused" class="interval-input">
|
|
|
|
|
+ <span>轮播间隔</span>
|
|
|
|
|
+ <el-input
|
|
|
|
|
+ v-model="playIntervalTime"
|
|
|
|
|
+ ref="inputRef"
|
|
|
|
|
+ placeholder="默认60"
|
|
|
|
|
+ class="input"
|
|
|
|
|
+ @blur="handelStartPlay"
|
|
|
|
|
+ @keyup.enter="handelStartPlay"
|
|
|
|
|
+ >
|
|
|
|
|
+ <template #append>
|
|
|
|
|
+ <div>秒</div>
|
|
|
|
|
+ </template>
|
|
|
|
|
+ </el-input>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
- <div class="RoundAndFullScreen">
|
|
|
|
|
- <div class="controlRound">
|
|
|
|
|
|
|
+ <div style="display: flex">
|
|
|
|
|
+ <div class="control-round">
|
|
|
<div
|
|
<div
|
|
|
- class="previousRound"
|
|
|
|
|
- :class="currentRound === 1 || currentRound === 0 ? 'disableChangeRound' : ''"
|
|
|
|
|
|
|
+ class="previous-round"
|
|
|
|
|
+ :class="displayCurrentRound <= 1 ? 'disable-change-round' : ''"
|
|
|
@click="playPreviousRound"
|
|
@click="playPreviousRound"
|
|
|
>
|
|
>
|
|
|
- <el-tooltip class="box-item" effect="dark" content="上一轮" placement="bottom">
|
|
|
|
|
|
|
+ <el-tooltip effect="dark" content="上一轮" placement="bottom">
|
|
|
<ArrowLeft />
|
|
<ArrowLeft />
|
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div class="rounds">
|
|
<div class="rounds">
|
|
|
- <div class="currentRound">{{ currentRound }}</div>
|
|
|
|
|
- <div class="totalRound">/{{ totalRound }}</div>
|
|
|
|
|
|
|
+ <div class="current-round">{{ displayCurrentRound }}</div>
|
|
|
|
|
+ <div class="total-round">/{{ displayTotalRound }}</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
<div
|
|
<div
|
|
|
- class="nextRound"
|
|
|
|
|
|
|
+ class="next-round"
|
|
|
|
|
+ :class="displayCurrentRound >= displayTotalRound ? 'disable-change-round' : ''"
|
|
|
@click="playNextRound"
|
|
@click="playNextRound"
|
|
|
- :class="currentRound === totalRound ? 'disableChangeRound' : ''"
|
|
|
|
|
>
|
|
>
|
|
|
- <el-tooltip class="box-item" effect="dark" content="下一轮" placement="bottom">
|
|
|
|
|
|
|
+ <el-tooltip effect="dark" content="下一轮" placement="bottom">
|
|
|
<ArrowRight />
|
|
<ArrowRight />
|
|
|
</el-tooltip>
|
|
</el-tooltip>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
|
|
|
|
|
- <el-tooltip class="box-item" effect="dark" content="全屏" placement="bottom">
|
|
|
|
|
- <img
|
|
|
|
|
- src="@/assets/icons/nine-square-grid/fullScreen2.png"
|
|
|
|
|
- class="fullScreenIcon"
|
|
|
|
|
- @click="isFullScreen ? exitFullscreen() : fullScreen('video-grid', 'all')"
|
|
|
|
|
- />
|
|
|
|
|
- </el-tooltip>
|
|
|
|
|
|
|
+ <div class="full-screen" @click="isFullScreen ? exitFullscreen() : fullScreen('video-grid', 'all')">
|
|
|
|
|
+ <el-tooltip effect="dark" content="全屏" placement="bottom">
|
|
|
|
|
+ <img src="@/assets/icons/nine-square-grid/fullScreen2.png" class="full-screen-icon" />
|
|
|
|
|
+ </el-tooltip>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <div class="stats-row">
|
|
|
|
|
+ <div class="stats">
|
|
|
|
|
+ <div class="stat stat-blue">
|
|
|
|
|
+ <div class="label">● 在线率</div>
|
|
|
|
|
+ <div class="value">{{ groupStats.onlineRate }}</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="stat stat-orange">
|
|
|
|
|
+ <div class="label">● 异常</div>
|
|
|
|
|
+ <div class="value">{{ groupStats.exceptionCount }}</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="stat stat-green">
|
|
|
|
|
+ <div class="label">● 离线</div>
|
|
|
|
|
+ <div class="value">{{ groupStats.outlineCount }}</div>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div class="stat stat-red">
|
|
|
|
|
+ <div class="label">● 故障</div>
|
|
|
|
|
+ <div class="value">{{ groupStats.failureCount }}</div>
|
|
|
|
|
+ </div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</div>
|
|
</div>
|
|
|
</template>
|
|
</template>
|
|
|
|
|
|
|
|
<script setup lang="ts">
|
|
<script setup lang="ts">
|
|
|
- import { ref, watch } from 'vue';
|
|
|
|
|
|
|
+ import { computed, ref, toRefs, watch } from 'vue';
|
|
|
import { storeToRefs } from 'pinia';
|
|
import { storeToRefs } from 'pinia';
|
|
|
import { ElInput, ElTooltip } from 'element-plus';
|
|
import { ElInput, ElTooltip } from 'element-plus';
|
|
|
import { ArrowLeft, ArrowRight } from '@element-plus/icons-vue';
|
|
import { ArrowLeft, ArrowRight } from '@element-plus/icons-vue';
|
|
|
- import { userGridType } from '@/store/modules/userGridType';
|
|
|
|
|
- import { GridType } from '@/views/disaster/monitor/splitScreenRetrieval/type';
|
|
|
|
|
import { userSplitScreenFullScreen } from '@/store/modules/userSplitScreenFullScreen';
|
|
import { userSplitScreenFullScreen } from '@/store/modules/userSplitScreenFullScreen';
|
|
|
import { useCameraGroupList } from '@/store/modules/useCameraGroupList';
|
|
import { useCameraGroupList } from '@/store/modules/useCameraGroupList';
|
|
|
- import { modifyCameraGroupApi } from '@/api/nine-square-grid';
|
|
|
|
|
|
|
+ import { updateSensorGroupApi } from '@/api/sensor-group';
|
|
|
import oneGrid from '@/assets/icons/nine-square-grid/oneGrid.png';
|
|
import oneGrid from '@/assets/icons/nine-square-grid/oneGrid.png';
|
|
|
import oneGrid_selected from '@/assets/icons/nine-square-grid/oneGrid-selected.png';
|
|
import oneGrid_selected from '@/assets/icons/nine-square-grid/oneGrid-selected.png';
|
|
|
import fourGrids from '@/assets/icons/nine-square-grid/fourGrids.png';
|
|
import fourGrids from '@/assets/icons/nine-square-grid/fourGrids.png';
|
|
@@ -136,199 +138,320 @@
|
|
|
import nineGrids_selected from '@/assets/icons/nine-square-grid/nineGrids-selected.png';
|
|
import nineGrids_selected from '@/assets/icons/nine-square-grid/nineGrids-selected.png';
|
|
|
import sixteenGrids from '@/assets/icons/nine-square-grid/sixteenGrids.png';
|
|
import sixteenGrids from '@/assets/icons/nine-square-grid/sixteenGrids.png';
|
|
|
import sixteenGrids_selected from '@/assets/icons/nine-square-grid/sixteenGrids-selected.png';
|
|
import sixteenGrids_selected from '@/assets/icons/nine-square-grid/sixteenGrids-selected.png';
|
|
|
|
|
+ import type { SensorGroupStats } from './useSensorRealtime';
|
|
|
|
|
|
|
|
- const inputRef = ref();
|
|
|
|
|
|
|
+ export type LocalGridType = 1 | 4 | 9 | 16;
|
|
|
|
|
+
|
|
|
|
|
+ const GridType = {
|
|
|
|
|
+ oneGrid: 1,
|
|
|
|
|
+ fourGrids: 4,
|
|
|
|
|
+ nineGrids: 9,
|
|
|
|
|
+ sixteenGrids: 16,
|
|
|
|
|
+ } as const;
|
|
|
|
|
+
|
|
|
|
|
+ const props = defineProps<{
|
|
|
|
|
+ currentGrid: LocalGridType;
|
|
|
|
|
+ isPlaying: boolean;
|
|
|
|
|
+ isPaused: boolean;
|
|
|
|
|
+ playIntervalTime: number;
|
|
|
|
|
+ currentRound: number;
|
|
|
|
|
+ totalRound: number;
|
|
|
|
|
+ realtimeGroupStats?: SensorGroupStats;
|
|
|
|
|
+ }>();
|
|
|
|
|
+
|
|
|
|
|
+ const { currentGrid, isPlaying, isPaused, currentRound, totalRound } = toRefs(props);
|
|
|
|
|
|
|
|
- const { currentGrid } = storeToRefs(userGridType());
|
|
|
|
|
- const { changeGridType } = userGridType();
|
|
|
|
|
|
|
+ const emit = defineEmits<{
|
|
|
|
|
+ (event: 'update:currentGrid', value: LocalGridType): void;
|
|
|
|
|
+ (event: 'update:playIntervalTime', value: number): void;
|
|
|
|
|
+ (event: 'prev-round'): void;
|
|
|
|
|
+ (event: 'next-round'): void;
|
|
|
|
|
+ (event: 'toggle-pause'): void;
|
|
|
|
|
+ }>();
|
|
|
|
|
+
|
|
|
|
|
+ const inputRef = ref();
|
|
|
|
|
|
|
|
const { isFullScreen } = storeToRefs(userSplitScreenFullScreen());
|
|
const { isFullScreen } = storeToRefs(userSplitScreenFullScreen());
|
|
|
const { fullScreen, exitFullscreen } = userSplitScreenFullScreen();
|
|
const { fullScreen, exitFullscreen } = userSplitScreenFullScreen();
|
|
|
|
|
+ const { playingGroup, cameraGroupList } = storeToRefs(useCameraGroupList());
|
|
|
|
|
|
|
|
- const { playingGroup, isPlaying, isPaused, playIntervalTime, totalRound, currentRound } = storeToRefs(
|
|
|
|
|
- useCameraGroupList(),
|
|
|
|
|
- );
|
|
|
|
|
- const { groupStartPlay, continuePlay, pausePlay, playPreviousRound, playNextRound } = useCameraGroupList();
|
|
|
|
|
|
|
+ function syncGroupState(payload: { refreshIntervalSec?: number; isPaused?: 0 | 1 }) {
|
|
|
|
|
+ if (!playingGroup.value?.id) return;
|
|
|
|
|
|
|
|
- function handelStartPlay() {
|
|
|
|
|
- // 如果输入为0或非数字则返回
|
|
|
|
|
- if (playIntervalTime.value === null || playIntervalTime.value === 0 || !Number(playIntervalTime.value)) {
|
|
|
|
|
- inputRef.value.blur();
|
|
|
|
|
- playIntervalTime.value = 60;
|
|
|
|
|
- return;
|
|
|
|
|
|
|
+ Object.assign(playingGroup.value as any, payload);
|
|
|
|
|
+ const target = (cameraGroupList.value as any[]).find((x) => x.id === playingGroup.value?.id);
|
|
|
|
|
+ if (target) {
|
|
|
|
|
+ Object.assign(target, payload);
|
|
|
}
|
|
}
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
- inputRef.value.blur();
|
|
|
|
|
- playingGroup.value!.playIntervalSec = Number(playIntervalTime.value);
|
|
|
|
|
- groupStartPlay(Number(playIntervalTime.value));
|
|
|
|
|
- // inputRef.value.focus();
|
|
|
|
|
- modifyCameraGroupApi({
|
|
|
|
|
- groupId: playingGroup.value?.id!,
|
|
|
|
|
- playIntervalSec: playIntervalTime.value,
|
|
|
|
|
- });
|
|
|
|
|
|
|
+ const groupStats = computed(() => {
|
|
|
|
|
+ const g = playingGroup.value as any;
|
|
|
|
|
+ const realtime = props.realtimeGroupStats;
|
|
|
|
|
+ return {
|
|
|
|
|
+ onlineRate: realtime?.onlineRate ?? g?.onlineRate ?? '--',
|
|
|
|
|
+ exceptionCount: realtime?.exceptionCount ?? g?.exceptionCount ?? '--',
|
|
|
|
|
+ outlineCount: realtime?.outlineCount ?? g?.outlineCount ?? '--',
|
|
|
|
|
+ failureCount: realtime?.failureCount ?? g?.failureCount ?? '--',
|
|
|
|
|
+ };
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ const playIntervalTime = computed({
|
|
|
|
|
+ get: () => props.playIntervalTime,
|
|
|
|
|
+ set: (value: number | string) => {
|
|
|
|
|
+ const numValue = Number(value);
|
|
|
|
|
+ emit('update:playIntervalTime', Number.isNaN(numValue) ? 60 : numValue);
|
|
|
|
|
+ },
|
|
|
|
|
+ });
|
|
|
|
|
+
|
|
|
|
|
+ function handleChange(value: LocalGridType) {
|
|
|
|
|
+ emit('update:currentGrid', value);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- function handleClickLock() {
|
|
|
|
|
- isPaused.value = !isPaused.value;
|
|
|
|
|
- if (isPaused.value) {
|
|
|
|
|
- pausePlay();
|
|
|
|
|
- } else {
|
|
|
|
|
- continuePlay();
|
|
|
|
|
|
|
+ async function handelStartPlay() {
|
|
|
|
|
+ if (playIntervalTime.value === null || playIntervalTime.value === 0 || !Number(playIntervalTime.value)) {
|
|
|
|
|
+ inputRef.value?.blur();
|
|
|
|
|
+ emit('update:playIntervalTime', 60);
|
|
|
|
|
+ return;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- if (isPlaying.value) {
|
|
|
|
|
- playingGroup.value!.isPaused = isPaused.value;
|
|
|
|
|
- modifyCameraGroupApi({
|
|
|
|
|
- groupId: playingGroup.value?.id!,
|
|
|
|
|
- isPaused: Number(isPaused.value),
|
|
|
|
|
|
|
+ if (playingGroup.value?.id) {
|
|
|
|
|
+ const interval = Number(playIntervalTime.value);
|
|
|
|
|
+ await updateSensorGroupApi({
|
|
|
|
|
+ groupId: playingGroup.value.id,
|
|
|
|
|
+ refreshIntervalSec: interval,
|
|
|
|
|
+ });
|
|
|
|
|
+ syncGroupState({ refreshIntervalSec: interval });
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ inputRef.value?.blur();
|
|
|
|
|
+ emit('update:playIntervalTime', Number(playIntervalTime.value));
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ async function handleClickLock() {
|
|
|
|
|
+ if (playingGroup.value?.id && isPlaying.value) {
|
|
|
|
|
+ const nextIsPaused = (isPaused.value ? 1 : 0) as 0 | 1;
|
|
|
|
|
+ await updateSensorGroupApi({
|
|
|
|
|
+ groupId: playingGroup.value.id,
|
|
|
|
|
+ isPaused: nextIsPaused,
|
|
|
});
|
|
});
|
|
|
|
|
+ syncGroupState({ isPaused: nextIsPaused });
|
|
|
}
|
|
}
|
|
|
|
|
+ emit('toggle-pause');
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ function playPreviousRound() {
|
|
|
|
|
+ emit('prev-round');
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ function playNextRound() {
|
|
|
|
|
+ emit('next-round');
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
watch(
|
|
watch(
|
|
|
() => isPlaying.value,
|
|
() => isPlaying.value,
|
|
|
- (newValue) => {
|
|
|
|
|
- if (newValue) {
|
|
|
|
|
- inputRef.value.focus();
|
|
|
|
|
- inputRef.value.select();
|
|
|
|
|
|
|
+ (value) => {
|
|
|
|
|
+ if (value) {
|
|
|
|
|
+ inputRef.value?.focus();
|
|
|
|
|
+ inputRef.value?.select();
|
|
|
}
|
|
}
|
|
|
},
|
|
},
|
|
|
);
|
|
);
|
|
|
|
|
+
|
|
|
|
|
+ const displayCurrentRound = computed(() => (currentRound.value <= 0 ? 1 : currentRound.value));
|
|
|
|
|
+ const displayTotalRound = computed(() => (totalRound.value <= 0 ? 1 : totalRound.value));
|
|
|
</script>
|
|
</script>
|
|
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
|
- .control-panel {
|
|
|
|
|
- height: 54px;
|
|
|
|
|
|
|
+ .toolbar {
|
|
|
|
|
+ min-height: 148px;
|
|
|
width: 100%;
|
|
width: 100%;
|
|
|
background: #f4f7ff;
|
|
background: #f4f7ff;
|
|
|
display: flex;
|
|
display: flex;
|
|
|
- justify-content: space-between;
|
|
|
|
|
- font-size: 12px;
|
|
|
|
|
|
|
+ flex-direction: column;
|
|
|
|
|
+ justify-content: flex-start;
|
|
|
|
|
+ gap: 10px;
|
|
|
|
|
+ padding: 10px 12px;
|
|
|
border-radius: 4px 4px 0 0;
|
|
border-radius: 4px 4px 0 0;
|
|
|
|
|
|
|
|
- .changeGridBar {
|
|
|
|
|
|
|
+ .control-row {
|
|
|
|
|
+ width: 100%;
|
|
|
display: flex;
|
|
display: flex;
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
- padding-left: 10px;
|
|
|
|
|
- margin-right: 19px;
|
|
|
|
|
- .changeGrid {
|
|
|
|
|
- margin-right: 32px;
|
|
|
|
|
- .changeGridIcon {
|
|
|
|
|
- width: 25px;
|
|
|
|
|
- color: white;
|
|
|
|
|
- }
|
|
|
|
|
- .changeGridIcon:hover {
|
|
|
|
|
- outline: 1px solid #1777ff;
|
|
|
|
|
- color: #1777ff;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ justify-content: space-between;
|
|
|
|
|
+ min-height: 46px;
|
|
|
|
|
+ border: 1px solid #d8e3f6;
|
|
|
|
|
+ border-radius: 4px;
|
|
|
|
|
+ background: linear-gradient(180deg, #ffffff 0%, #fbfdff 100%);
|
|
|
|
|
+ padding: 0 10px;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .grid-switch {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ gap: 12px;
|
|
|
|
|
+
|
|
|
|
|
+ .grid-icon {
|
|
|
|
|
+ width: 24px;
|
|
|
|
|
+ height: 24px;
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
+ border-radius: 4px;
|
|
|
|
|
+ transition: all 0.2s;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .grid-icon:hover,
|
|
|
|
|
+ .grid-icon.selected {
|
|
|
|
|
+ outline: 1px solid #1777ff;
|
|
|
|
|
+ background: #f2f7ff;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- .controlBtns {
|
|
|
|
|
- width: 100%;
|
|
|
|
|
|
|
+ .play-control {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
- justify-content: space-between;
|
|
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
- .lockAndSetTime {
|
|
|
|
|
|
|
+ gap: 12px;
|
|
|
|
|
+ margin-left: 20px;
|
|
|
|
|
+
|
|
|
|
|
+ .lock-btn {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
- justify-content: space-between;
|
|
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
- .pausePlay {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- justify-content: space-between;
|
|
|
|
|
- align-items: center;
|
|
|
|
|
- margin-right: 19px;
|
|
|
|
|
- img {
|
|
|
|
|
- height: 24px;
|
|
|
|
|
- width: 24px;
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- .setIntervalTime {
|
|
|
|
|
- width: 230px;
|
|
|
|
|
- display: flex;
|
|
|
|
|
- justify-content: space-between;
|
|
|
|
|
- align-items: center;
|
|
|
|
|
- .intervalTimeInputBar {
|
|
|
|
|
- margin-left: 10px;
|
|
|
|
|
- width: 110px;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
+
|
|
|
|
|
+ img {
|
|
|
|
|
+ width: 24px;
|
|
|
|
|
+ height: 24px;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
- .RoundAndFullScreen {
|
|
|
|
|
|
|
+ .interval-input {
|
|
|
display: flex;
|
|
display: flex;
|
|
|
- justify-content: space-between;
|
|
|
|
|
align-items: center;
|
|
align-items: center;
|
|
|
- .controlRound {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- justify-content: space-between;
|
|
|
|
|
- align-items: center;
|
|
|
|
|
- margin-right: 69px;
|
|
|
|
|
- .previousRound,
|
|
|
|
|
- .nextRound {
|
|
|
|
|
- width: 15px;
|
|
|
|
|
- display: flex;
|
|
|
|
|
- justify-content: space-between;
|
|
|
|
|
- align-items: center;
|
|
|
|
|
- color: #000;
|
|
|
|
|
- border-radius: 4px;
|
|
|
|
|
- margin-right: 14px;
|
|
|
|
|
- cursor: pointer;
|
|
|
|
|
- &:hover {
|
|
|
|
|
- background-color: rgba(255, 255, 255, 0.2);
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
- .disableChangeRound {
|
|
|
|
|
- color: #909399;
|
|
|
|
|
- pointer-events: none;
|
|
|
|
|
- }
|
|
|
|
|
- .rounds {
|
|
|
|
|
- display: flex;
|
|
|
|
|
- line-height: 59px;
|
|
|
|
|
- color: #ffffff;
|
|
|
|
|
- font-weight: 400;
|
|
|
|
|
- font-size: 20px;
|
|
|
|
|
- margin-right: 14px;
|
|
|
|
|
- .currentRound {
|
|
|
|
|
- color: #1777ff;
|
|
|
|
|
- }
|
|
|
|
|
- .totalRound {
|
|
|
|
|
- color: rgb(0, 0, 0, 0.3);
|
|
|
|
|
- }
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ gap: 8px;
|
|
|
|
|
+ color: #355a9b;
|
|
|
|
|
+
|
|
|
|
|
+ .input {
|
|
|
|
|
+ width: 130px;
|
|
|
}
|
|
}
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .control-round {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ gap: 8px;
|
|
|
|
|
+
|
|
|
|
|
+ .previous-round,
|
|
|
|
|
+ .next-round {
|
|
|
|
|
+ width: 18px;
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ justify-content: center;
|
|
|
|
|
+ color: #3a4f73;
|
|
|
|
|
+ border-radius: 4px;
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
|
|
|
- .fullScreenIcon {
|
|
|
|
|
- width: 25px;
|
|
|
|
|
- color: white;
|
|
|
|
|
- margin-right: 20px;
|
|
|
|
|
|
|
+ &:hover {
|
|
|
|
|
+ background-color: #eef5ff;
|
|
|
}
|
|
}
|
|
|
- .fullScreenIcon:hover {
|
|
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .disable-change-round {
|
|
|
|
|
+ color: #b7c2d6;
|
|
|
|
|
+ pointer-events: none;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .rounds {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: baseline;
|
|
|
|
|
+ min-width: 58px;
|
|
|
|
|
+ justify-content: center;
|
|
|
|
|
+
|
|
|
|
|
+ .current-round {
|
|
|
color: #1777ff;
|
|
color: #1777ff;
|
|
|
|
|
+ font-weight: 600;
|
|
|
|
|
+ font-size: 16px;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .total-round {
|
|
|
|
|
+ color: #9aacbf;
|
|
|
|
|
+ font-size: 14px;
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
- }
|
|
|
|
|
|
|
|
|
|
- :deep(.el-input) {
|
|
|
|
|
- background-color: #f4f7ff;
|
|
|
|
|
- }
|
|
|
|
|
- :deep(.el-input__inner) {
|
|
|
|
|
- color: #333333;
|
|
|
|
|
- border: 0px;
|
|
|
|
|
- }
|
|
|
|
|
- :deep(.el-input__wrapper) {
|
|
|
|
|
- background-color: #f4f7ff;
|
|
|
|
|
- }
|
|
|
|
|
- :deep(.el-input-group__append) {
|
|
|
|
|
- width: 0px;
|
|
|
|
|
- background-color: #f4f7ff;
|
|
|
|
|
- }
|
|
|
|
|
- :deep(.el-input.is-disabled .el-input__wrapper) {
|
|
|
|
|
- background-color: #f4f7ff;
|
|
|
|
|
|
|
+ .full-screen {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ align-items: center;
|
|
|
|
|
+ cursor: pointer;
|
|
|
|
|
+ margin-left: 20px;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .full-screen-icon {
|
|
|
|
|
+ width: 22px;
|
|
|
|
|
+ height: 22px;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .stats-row {
|
|
|
|
|
+ width: 100%;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .stats {
|
|
|
|
|
+ display: flex;
|
|
|
|
|
+ gap: 10px;
|
|
|
|
|
+
|
|
|
|
|
+ .stat {
|
|
|
|
|
+ width: 160px;
|
|
|
|
|
+ height: 78px;
|
|
|
|
|
+ border: 1px solid #d8e3f6;
|
|
|
|
|
+ border-radius: 4px;
|
|
|
|
|
+ padding: 10px 14px;
|
|
|
|
|
+ background: linear-gradient(180deg, #ffffff 0%, #f7fbff 100%);
|
|
|
|
|
+ box-shadow: 0 1px 6px rgba(23, 119, 255, 0.06);
|
|
|
|
|
+
|
|
|
|
|
+ .label {
|
|
|
|
|
+ font-size: 16px;
|
|
|
|
|
+ line-height: 1;
|
|
|
|
|
+ font-weight: 500;
|
|
|
|
|
+ margin-bottom: 8px;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .value {
|
|
|
|
|
+ font-size: 30px;
|
|
|
|
|
+ line-height: 1;
|
|
|
|
|
+ font-weight: 600;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .stat-blue {
|
|
|
|
|
+ color: #4b84ff;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .stat-orange {
|
|
|
|
|
+ color: #f4a13e;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .stat-green {
|
|
|
|
|
+ color: #1fb45a;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .stat-red {
|
|
|
|
|
+ color: #ff5f5f;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
- :deep(.el-tooltip__trigger) {
|
|
|
|
|
- outline: none;
|
|
|
|
|
- border: none;
|
|
|
|
|
|
|
+
|
|
|
|
|
+ @media screen and (max-width: 1380px) {
|
|
|
|
|
+ .toolbar {
|
|
|
|
|
+ .stats {
|
|
|
|
|
+ flex-wrap: wrap;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ .control-row {
|
|
|
|
|
+ flex-wrap: wrap;
|
|
|
|
|
+ height: auto;
|
|
|
|
|
+ padding: 8px 10px;
|
|
|
|
|
+ gap: 8px;
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
</style>
|
|
</style>
|