|
@@ -8,9 +8,8 @@
|
|
|
<el-button class="custom-button" type="primary" plain>通讯录</el-button>
|
|
|
<el-button class="custom-button" type="primary" plain>启动预警</el-button>
|
|
|
<el-button class="custom-button" type="primary" plain>知识库</el-button>
|
|
|
+ <el-button class="custom-button" type="primary" plain @click="goToHome">返回首页</el-button>
|
|
|
</div>
|
|
|
- <div class="duration">{{ formattedDuration }}</div>
|
|
|
- <el-button class="custom-button" type="danger" plain>结束处理</el-button>
|
|
|
</div>
|
|
|
<div class="card-header">
|
|
|
<div>视频监控</div>
|
|
@@ -46,21 +45,11 @@
|
|
|
import Dialog from '@/components/Dialog/index.vue';
|
|
|
import HKVideo from '@/components/HKVideo/index.vue';
|
|
|
import DynamicMessages from './DynamicMessages.vue';
|
|
|
+import router from '@/router';
|
|
|
|
|
|
-const duration = ref(0);
|
|
|
-const formattedDuration = ref('');
|
|
|
-
|
|
|
-const updateDuration = () => {
|
|
|
- duration.value += 1;
|
|
|
- const days = Math.floor(duration.value / (24 * 3600));
|
|
|
- const hours = Math.floor((duration.value % (24 * 3600)) / 3600);
|
|
|
- const minutes = Math.floor((duration.value % 3600) / 60);
|
|
|
- const seconds = duration.value % 60;
|
|
|
- formattedDuration.value = `持续时长:${days}天${hours}小时${minutes}分${seconds}秒`;
|
|
|
+const goToHome = () => {
|
|
|
+ router.push({ path: '/' });
|
|
|
};
|
|
|
-onMounted(() => {
|
|
|
- setInterval(updateDuration, 1000);
|
|
|
-});
|
|
|
// 视频监控
|
|
|
const videoUrl = reactive([
|
|
|
{ label: '摄像头一', img: '', url: 'https://vjs.zencdn.net/v/oceans.mp4', time: '17:14' },
|
|
@@ -115,6 +104,7 @@ const handleClose = () => {
|
|
|
display: flex;
|
|
|
justify-content: space-around; /* 使按钮在div内均匀分布 */
|
|
|
align-items: center; /* 使按钮垂直居中 */
|
|
|
+ width: 100%;
|
|
|
}
|
|
|
|
|
|
.custom-button {
|
|
@@ -123,18 +113,6 @@ const handleClose = () => {
|
|
|
font-size: 14px;
|
|
|
}
|
|
|
|
|
|
- .duration {
|
|
|
- height: 80px;
|
|
|
- width: 300px;
|
|
|
- font-size: 14px;
|
|
|
- padding: 10px;
|
|
|
- border: 2px solid black; /*设置黑色边框*/
|
|
|
- margin-left: auto;
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- justify-content: center;
|
|
|
- }
|
|
|
-
|
|
|
.card-header {
|
|
|
width: 100%;
|
|
|
display: flex;
|