pull/43/head
pangdundun 2023-11-18 22:07:59 +08:00
parent cc2378663b
commit 0d2b98af85
2 changed files with 34 additions and 14 deletions

View File

@ -770,13 +770,6 @@ export default {
},
beforeDestroy() {
clearInterval(this.timer_) && this.timer_;
if (this.player) {
// this.player.dispose();
this.player.stop();
this.player.destroy();
this.player = null;
}
},
methods: {
// id
@ -892,7 +885,7 @@ export default {
// Copy
getVideoData(cameraid, channelid, index) {
this.api.camera_gethls(cameraid, channelid).then((res) => {
console.log("获取摄像头得地址 Copy", res);
// console.log(" Copy", res);
if (res.data.code == 200) {
// this.url = res.data.data.ezopen
this.createVideoNew(
@ -1039,7 +1032,7 @@ export default {
} else {
this.timer_ = setTimeout(() => {
this.$router.push({ path: "/largeScreen1" });
}, 10000);
}, 20000);
}
},
@ -1053,7 +1046,7 @@ export default {
localStorage.setItem("autoPlay", JSON.stringify(this.autoPlay));
this.timer_ = setTimeout(() => {
this.$router.push({ path: "/largeScreen1" });
}, 10000);
}, 20000);
},
createVideoNew(accessToken, url, index) {

View File

@ -9,11 +9,11 @@
<div class="calendar">
<img src="../../assets/img/calendar.png" alt="" />
<span>2023.10.30</span>
<span>{{ getNowTime() }}</span>
<span class="line"></span>
<span>星期一</span>
<span>{{ time.week }}</span>
<span class="line"></span>
<span>14:17</span>
<span>{{ time.time }}</span>
</div>
<div class="content">
@ -184,6 +184,7 @@
</template>
<script>
import { getnowtime } from "../../assets/js/nowTime";
export default {
name: "largeScreen1",
data() {
@ -233,6 +234,8 @@ export default {
//
autoPlay: false, //false true
time: "", //
typeList: [
{
label: "无意义的传感器",
@ -594,6 +597,12 @@ export default {
this.drag_boxHandler();
this.login();
this.getTime();
setInterval(() => {
this.getNowTime();
}, 1000);
},
beforeDestroy() {
clearInterval(this.timer2) && this.timer2;
@ -602,7 +611,7 @@ export default {
// id
dataInit(userid) {
this.api.Bigdata_getAllControl(userid).then((res) => {
console.log("根据用户id查询对应的设备大数据信息", res);
// console.log("id", res);
this.popContentList = res.data.data;
this.popContentList = this.popContentList.map((item) => {
return {
@ -690,6 +699,24 @@ export default {
}
},
getTime() {
this.time = getnowtime();
// console.log(this.time);
const that = this;
setInterval(() => {
that.time = getnowtime();
}, 1000);
},
getNowTime() {
const now = new Date();
const year = now.getFullYear();
const month = (now.getMonth() + 1).toString().padStart(2, "0");
const day = now.getDate().toString().padStart(2, "0");
const formattedDate = `${year}.${month}.${day}`;
return formattedDate;
},
cancelHandler() {
this.popContentCurrent = -1;
let that = this;