2023-08-10 01:16:23 +08:00
|
|
|
import Vue from 'vue'
|
|
|
|
import Api from '../api/index'
|
|
|
|
import dayjs from 'dayjs'
|
|
|
|
import './style/index.less'
|
2023-08-15 23:08:27 +08:00
|
|
|
import dayfilter from '@/utils/dayfilter'
|
2023-08-20 00:25:52 +08:00
|
|
|
import {tryToJson} from '../utils/tools'
|
2023-08-26 22:19:33 +08:00
|
|
|
import H265Player from '../components/h265-player/index'
|
2023-09-10 00:56:59 +08:00
|
|
|
import { Loading } from 'element-ui';
|
2023-09-17 23:29:27 +08:00
|
|
|
import BorderBox6 from './components/BorderBox6.vue'
|
|
|
|
import moduleOne11 from '../components/module/module-one-1-1.vue'
|
2023-09-10 00:56:59 +08:00
|
|
|
Loading.install(Vue);
|
2023-08-26 22:19:33 +08:00
|
|
|
H265Player.install(Vue);
|
2023-08-15 23:08:27 +08:00
|
|
|
dayfilter(Vue);
|
2023-08-28 00:01:37 +08:00
|
|
|
const vue=new Vue();
|
2023-09-17 23:29:27 +08:00
|
|
|
Vue.component("border-box6",BorderBox6)
|
|
|
|
Vue.component("module-one-1-1",moduleOne11)
|
2023-08-10 01:16:23 +08:00
|
|
|
Vue.prototype.$api=Api;
|
2023-08-28 00:01:37 +08:00
|
|
|
Vue.prototype.$bus=vue;
|
2023-08-10 01:16:23 +08:00
|
|
|
Vue.prototype.$apiPath="/jhapi"
|
|
|
|
Vue.prototype.$dt=dayjs;
|
2023-08-20 00:25:52 +08:00
|
|
|
Vue.prototype.$tryToJson=tryToJson
|
2023-08-27 22:39:11 +08:00
|
|
|
Vue.prototype.$toggleFullScreen=(el)=>{
|
|
|
|
if(document.fullscreenElement==el){
|
|
|
|
let screen = document.cancelFullScreen || document.webkitCancelFullScreen || document.mozCancelFullScreen || document.exitFullScreen
|
|
|
|
if (typeof screen != "undefined" && screen) {
|
|
|
|
screen.call(document);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
}else{
|
|
|
|
let screen = el.requestFullScreen || el.webkitRequestFullScreen || el.mozRequestFullScreen || el.msRequestFullScreen
|
|
|
|
if (typeof screen != "undefined" && screen) {
|
|
|
|
screen.call(el);
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2023-08-28 00:01:37 +08:00
|
|
|
window.__isfull__=false;
|
|
|
|
window.fullscreenInterval=setInterval(()=>{
|
|
|
|
if(document.fullscreenElement){
|
|
|
|
if(!window.__isfull__){
|
|
|
|
vue.$emit("fullscreen",true);
|
|
|
|
window.__isfull__=true;
|
|
|
|
}
|
|
|
|
}else{
|
|
|
|
if(window.__isfull__){
|
|
|
|
vue.$emit("fullscreen",false);
|
|
|
|
window.__isfull__=false;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
},500);
|
2023-08-23 00:03:22 +08:00
|
|
|
window.jhcaches={};
|
|
|
|
/*
|
|
|
|
Api.project.getInfo().then(d=>{
|
|
|
|
if(d.code==200){
|
|
|
|
window.__info__=d;
|
|
|
|
}
|
|
|
|
})
|
|
|
|
*/
|