1
Surpriseplus
2022-09-16 a7e5110ef3f5fe3c9205f7d1a526b9fbbb55d826
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
<template>
  <div class="containerSFRight2">
    <div class="titleC"><span>园区生产企业总览</span></div>
    <div class="videoList" ref="Videopanel">
      <div
        class="ListItem"
        ref="Videopanel"
        v-for="(item, index) in videoList"
        :key="index"
        :class="
          item.name === '金泰科技-二氧化硫储罐间' && status ? 'riskBg' : ''
        "
      >
        <div class="vtitle">{{ item.name }}</div>
        <Myvideo
          class="video"
          :id="'player' + index"
          :url="item.liveUrl"
        ></Myvideo>
      </div>
    </div>
  </div>
</template>
 
<script>
import { axios_get, axios_post } from "@/until/request.js";
import Myvideo from "../../video/videoWMS1.vue";
export default {
  components: {
    Myvideo,
  },
  props: ["pid"],
  data() {
    return {
      status: false,
      videoList: [
        {
          liveUrl:
            "https://c32g3201.ply.univms.univdn.net:10443/10000051/uni0321122030208211775/uni0320031122070762218531.flv?group_id=uni0321122030208211775&v_codec=h265&key=694ae4700df9e8558de1acb5939179c6&time=1657187433",
          name: "金泰科技-二氧化硫储罐间",
        },
        {
          liveUrl:
            "https://c32g3201.ply.univms.univdn.net:10443/10000051/uni0321122030208211775/uni0320031122071779025206.flv?group_id=uni0321122030208211775&v_codec=h265&key=7c3b89ea8a4214b8de9be195381ecde0&time=1657188181",
          name: "金泰科技-压缩机",
        },
 
        {
          liveUrl:
            "https://c32g3201.ply.univms.univdn.net:10443/10000051/uni0321122030208211775/uni0320031122071140989616.flv?group_id=uni0321122030208211775&v_codec=h265&key=34d00d71d4679c4c2071bb9fbbc1f170&time=1657187615",
          name: "金泰科技-厂房",
        },
        {
          liveUrl:
            "https://c32g3201.ply.univms.univdn.net:10443/10000051/uni0321122030208211775/uni0320031122070205271489.flv?group_id=uni0321122030208211775&v_codec=h265&key=923422673a87e40a740c1e91f537ca5a&time=1657187558",
          name: "金泰科技-罐装间",
        },
 
        {
          liveUrl:
            "https://c32g3201.ply.univms.univdn.net:10443/10000051/uni0321122030208211775/uni0320031122071724415882.flv?group_id=uni0321122030208211775&v_codec=h265&key=87021d9337c765fb782b2d0d159b915d&time=1657188037",
          name: "金泰科技-生产区2",
        },
 
        {
          liveUrl:
            "https://c32g3201.ply.univms.univdn.net:10443/10000051/uni0321122030208211775/uni0320031122070201964761.flv?group_id=uni0321122030208211775&v_codec=h265&key=4614531e682f71e197eec57fd883af0b&time=1657187650",
          name: "金泰科技-电除雾器",
        },
      ],
      height: "",
    };
  },
  computed: {
    getmonitorData() {
      return this.$store.state.monitorData;
    },
  },
  watch: {
    getmonitorData(val) {
      if (val) {
        this.status = val.state;
      }
    },
  },
  methods: {
    GetVideoList() {
      //axios_get("/safe/getCorpCameras/1504302691707273218")
      axios_get("/safe/getCorpCameras/1531096777549819906").then((reponse) => {
        this.videoList = reponse.data;
        this.videoList = this.videoList.filter(function (list) {
          return list.name != "金泰科技-柠檬酸二氧化硫监控室";
        });
        // console.log(this.videoList,'this.videoList');
      });
    },
  },
  mounted() {
    this.GetVideoList();
 
    if (this.$store.state.monitorData) {
      this.status = this.$store.state.monitorData.state;
    }
  },
 
  // computed:{
  //     scrollerHeight(){
  //         //console.log(this.$refs.Videopanel.offsetHeight*0.3);
  //           return  (this.$refs.Videopanel.offsetHeight*0.3-110)+"px";
 
  //     }
 
  // }
};
</script>
 
<style  scoped="scoped"  lang="less">
.containerSFRight2 {
  height: 100%;
  width: 100%;
  .videoList {
    height: calc(100% - 72px);
    width: 100%;
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-around;
    .ListItem {
      // width: 888px;
      // height: 639px;
      width: 47%;
      height: 28%;
      display: flex;
      flex-direction: column;
      background-image: url(../../../assets/image/Right/water/water.png);
      background-size: 100% 100%;
      // background-color: red;
      .vtitle {
        height: 30px;
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #ffffff;
        font-size: 26px;
      }
      .video {
        margin: 0px 30px;
        //  height:calc(100% - 60px);
        width: calc(100% - 60px);
      }
    }
    .riskBg {
      // box-shadow: 0 0 30px red;
      animation: move 2s linear infinite;
    }
  }
}
@keyframes move {
  0% {
    box-shadow: 0 0 20px red;
  }
 
  50%,
  100% {
    box-shadow: 0 0 60px red;
  }
}
.titleC {
  width: 100%;
  height: 44px;
  background-image: url(../../../assets/images/titleC.png);
  background-size: 100% 100%;
  font-family: MytitileName;
  font-size: 36px;
  display: flex;
  align-items: center;
  color: #98deff;
  text-indent: 70px;
  letter-spacing: 3px;
}
</style>