|
|
@@ -11,15 +11,22 @@
|
|
|
</template>
|
|
|
</el-table-column>
|
|
|
</el-table>
|
|
|
+ <div v-show="showInfoWindow">
|
|
|
+ <div class="infoWindowContent">
|
|
|
+ <div class="close-button" @click="close"></div>
|
|
|
+ <Player ref="playercontainer"/>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
</div>
|
|
|
</template>
|
|
|
|
|
|
<script setup name="Dc">
|
|
|
import {useRoute} from "vue-router";
|
|
|
import axios from "axios";
|
|
|
+import Player from '../../components/player.vue'
|
|
|
|
|
|
const {proxy} = getCurrentInstance();
|
|
|
-
|
|
|
+const showInfoWindow = ref(false);
|
|
|
const route = useRoute();
|
|
|
const drList = ref([]);
|
|
|
const open = ref(false);
|
|
|
@@ -30,7 +37,7 @@ const single = ref(true);
|
|
|
const multiple = ref(true);
|
|
|
const total = ref(0);
|
|
|
const title = ref("");
|
|
|
-
|
|
|
+const playercontainer = ref(null);
|
|
|
const data = reactive({
|
|
|
form: {},
|
|
|
queryParams: {
|
|
|
@@ -58,7 +65,7 @@ function getList() {
|
|
|
const device = route.query.device;
|
|
|
const channel = route.query.channel;
|
|
|
const start = new Date().getTime() - 1000 * 60 * 60 * 24;
|
|
|
- axios.get(`http://47.108.159.150:8080/gb28181/api/records/${device}/${channel}?start=${start}`).then(response => {
|
|
|
+ axios.get(window.VideoServerUrl+ `/gb28181/api/records/${device}/${channel}?start=${start}`).then(response => {
|
|
|
drList.value=response.data.data;
|
|
|
})
|
|
|
loading.value=false;
|
|
|
@@ -70,9 +77,60 @@ function handleVideo(row) {
|
|
|
const gb = "gb_" + new Date().getTime();
|
|
|
const start = new Date(row.startTime).getTime()/1000;
|
|
|
const end = new Date(row.endTime).getTime();
|
|
|
- const url = `http://47.108.159.150:8080/flv/${gb}/${device}/${channel}?start=${start}&end=${end}`;
|
|
|
- console.log(url);
|
|
|
+ const url = window.VideoServerUrl+ `/flv/${gb}/${device}/${channel}?start=${start}&end=${end}`;
|
|
|
+ showInfoWindow.value=true;
|
|
|
+ playercontainer.value.play(url);
|
|
|
+}
|
|
|
+
|
|
|
+const close=()=>{
|
|
|
+ playercontainer.value.destroy();
|
|
|
+ showInfoWindow.value = false;
|
|
|
}
|
|
|
|
|
|
getList();
|
|
|
</script>
|
|
|
+<style>
|
|
|
+.infoWindowContent{
|
|
|
+ border: 2px solid #fff;
|
|
|
+ position: absolute;
|
|
|
+ left:50%;
|
|
|
+ top:50%;
|
|
|
+ width: 880px;
|
|
|
+ height: 360px;
|
|
|
+ margin-top: -180px;
|
|
|
+ margin-left: -440px;
|
|
|
+ border-radius: 5px;
|
|
|
+ background: #0000003b;
|
|
|
+ background-image: url('/images/video_bg.png');
|
|
|
+ background-size: contain;
|
|
|
+ z-index: 10;
|
|
|
+ .close-button {
|
|
|
+ position: absolute;
|
|
|
+ width: 24px;
|
|
|
+ height: 24px;
|
|
|
+ cursor: pointer;
|
|
|
+ display: inline-block;
|
|
|
+ z-index: 9;
|
|
|
+ right: 6px;
|
|
|
+ top: 6px;
|
|
|
+ }
|
|
|
+
|
|
|
+ .close-button::before,
|
|
|
+ .close-button::after {
|
|
|
+ content: '';
|
|
|
+ position: absolute;
|
|
|
+ width: 10px; /* 图标宽度 */
|
|
|
+ height: 2px; /* 图标厚度 */
|
|
|
+ background-color: #fff; /* 图标颜色 */
|
|
|
+ top: 9px; /* 垂直居中 */
|
|
|
+ }
|
|
|
+
|
|
|
+ .close-button::before {
|
|
|
+ transform: rotate(45deg);
|
|
|
+ }
|
|
|
+
|
|
|
+ .close-button::after {
|
|
|
+ transform: rotate(-45deg);
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|