2024-11-27 23:42:39 +08:00
|
|
|
import Vue from 'vue'
|
|
|
|
import Api from '../api/index'
|
|
|
|
import dayjs from 'dayjs'
|
|
|
|
import './style/index.less'
|
|
|
|
import dayfilter from '@/utils/dayfilter'
|
|
|
|
import {tryToJson} from '../utils/tools'
|
|
|
|
import { Loading } from 'element-ui';
|
|
|
|
|
|
|
|
import moduleOne11 from '../components/module/module-one-1-1.vue'
|
|
|
|
import moduleOne12 from '../components/module/module-one-1-2.vue'
|
|
|
|
import moduleOne13 from '../components/module/module-one-1-3.vue'
|
|
|
|
import moduleOne21 from '../components/module/module-one-2-1.vue'
|
|
|
|
import moduleOne22 from '../components/module/module-one-2-2.vue'
|
|
|
|
import moduleOne23 from '../components/module/module-one-2-3.vue'
|
2024-11-30 00:13:31 +08:00
|
|
|
import MyDialog from '@/components/MyDialog.vue'
|
2024-11-27 23:42:39 +08:00
|
|
|
//import projectOverviewChart from '../components/project-overview-chart.vue'
|
|
|
|
//import peopleNumber from '../components/people-number.vue'
|
|
|
|
import header from '../components/header.vue'
|
|
|
|
Loading.install(Vue);
|
|
|
|
//H265Player.install(Vue);
|
|
|
|
dayfilter(Vue);
|
|
|
|
const vue=new Vue();
|
|
|
|
Vue.component("screen-header",header)
|
|
|
|
Vue.component("module-one-1-1",moduleOne11)
|
|
|
|
Vue.component("module-one-1-2",moduleOne12)
|
|
|
|
Vue.component("module-one-1-3",moduleOne13)
|
|
|
|
Vue.component("module-one-2-1",moduleOne21)
|
|
|
|
Vue.component("module-one-2-2",moduleOne22)
|
|
|
|
Vue.component("module-one-2-3",moduleOne23)
|
2024-11-30 00:13:31 +08:00
|
|
|
Vue.component("MyDialog",MyDialog)
|
2024-11-27 23:42:39 +08:00
|
|
|
Vue.prototype.$bus=new Vue();
|
|
|
|
//Vue.component("people-number",peopleNumber)
|
|
|
|
//Vue.component("project-overview-chart",projectOverviewChart)
|
|
|
|
Vue.prototype.$api=Api;
|
|
|
|
Vue.prototype.$bus=vue;
|
|
|
|
Vue.prototype.$apiPath=process.env.VUE_APP_BASE_API
|
|
|
|
Vue.prototype.$dt=dayjs;
|
|
|
|
Vue.prototype.$tryToJson=tryToJson
|
|
|
|
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;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2024-12-02 00:05:10 +08:00
|
|
|
Vue.prototype.$dpi=()=>{
|
|
|
|
let w=document.querySelector(".main-app").clientWidth;
|
|
|
|
return w>2561?"4K":w<1920?"1K":"2K";
|
|
|
|
}
|
|
|
|
Vue.filter('toDate',d=>{
|
|
|
|
return dayjs(d).format("YYYY-MM-DD")
|
|
|
|
});
|
|
|
|
Vue.filter('toDateTime',d=>{
|
|
|
|
return dayjs(d).format("YYYY-MM-DD HH:mm:ss")
|
|
|
|
});
|
|
|
|
Vue.filter('toTime',d=>{
|
|
|
|
return dayjs(d).format("HH:mm:ss")
|
|
|
|
});
|
2024-11-27 23:42:39 +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);
|
|
|
|
window.jhcaches={};
|