pc-master #43
@ -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) {
 | 
			
		||||
 | 
			
		||||
@ -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;
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user