Browse Source

补充首页视频

pull/1/head
ljlong_2630 1 year ago
parent
commit
7c7954e17a
  1. 32
      src/views/index.vue
  2. 8
      src/views/model/alert/deviceparamalert.vue

32
src/views/index.vue

@ -1,13 +1,30 @@
<template>
<div class="app-container home">
<video autoplay loop muted id="bgvid" class="home-page-video">
<video ref="videoPlayer" autoplay loop muted id="bgvid" class="home-page-video">
<source src="../assets/video/homepage.mp4" type="video/mp4">
</video>
<div class="middlewight">欢迎使用运营管理平台</div>
</div>
</template>
<script setup name="Index">
import { onMounted, watch, ref } from 'vue';
import { useRoute } from 'vue-router';
const { proxy } = getCurrentInstance();
const version = ref('3.8.5')
const route = useRoute();
const videoElement = ref(null);
onMounted(() => {
videoElement.value = proxy.$refs.videoPlayer;
if (videoElement.value) {
videoElement.value.play();
}
});
watch(() => route.path, () => {
if (videoElement.value) {
videoElement.value.play();
}
});
function goTarget(url) {
window.open(url, '__blank')
@ -87,8 +104,17 @@ function goTarget(url) {
transform: translateX(-50%) translateY(-50%);
z-index: -100;
}
.middlewight{
color:#eee;
position: absolute;
top: 50%;
left: 50%;
transform: translate(-50%, -50%);
font-size:88px;
font-family: cursive;
width: 100%;
text-align: center;
}
}
</style>

8
src/views/model/alert/deviceparamalert.vue

@ -847,13 +847,13 @@ function computeDelPolicy() {
oldPolicyRows.value.forEach(item=>{
let flag = false;
newSeletedRows.forEach(element=>{
if(item.id == element.id){
if(item.id == element.policyId){
flag = true;
}
})
if(!flag){
policyParams.value = policyParams.value.filter(element=>{
return item.id === element.id
return item.id === element.policyId
})
deletePolicyRows.value.push(item);
}
@ -865,13 +865,13 @@ function computeAddPolicy() {
newSeletedRows.forEach(item=>{
let flag = false;
oldPolicyRows.value.forEach(element=>{
if(item.id == element.id){
if(item.policyId == element.id){
flag = true;
}
})
if(!flag){
policyParams.value = policyParams.value.filter(element=>{
return item.id !== element.id;
return item.policyId !== element.id;
})
//id
let policyParam = {};

Loading…
Cancel
Save