update code

dev-login
haha 2023-08-28 00:01:37 +08:00
parent 10f8a30a26
commit 29fc0e13c5
9 changed files with 388 additions and 10 deletions

5
src/App.vue 100644
View File

@ -0,0 +1,5 @@
<template>
<div id="app">
<router-view/>
</div>
</template>

View File

@ -48,7 +48,7 @@ Vue.component("screen-header", {
<span>11~25</span>
</div>
</div>
<i class="set-fullscreen set-font-size" style="margin-left: 16px;position: absolute;top: 4px;right: 16px;" @click="toggleFullScreen">
<i v-if="1==2" class="set-fullscreen set-font-size" style="margin-left: 16px;position: absolute;top: 4px;right: 16px;" @click="toggleFullScreen">
<svg class="icon" v-if="!isFullScreen" style="width: 24px; vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3304"><path d="M145.066667 85.333333h153.6c25.6 0 42.666667-17.066667 42.666666-42.666666S324.266667 0 298.666667 0H34.133333C25.6 0 17.066667 8.533333 8.533333 17.066667 0 25.6 0 34.133333 0 42.666667v256c0 25.6 17.066667 42.666667 42.666667 42.666666s42.666667-17.066667 42.666666-42.666666V145.066667l230.4 230.4c17.066667 17.066667 42.666667 17.066667 59.733334 0 17.066667-17.066667 17.066667-42.666667 0-59.733334L145.066667 85.333333z m170.666666 563.2L162.133333 802.133333l-76.8 76.8V725.333333C85.333333 699.733333 68.266667 682.666667 42.666667 682.666667s-42.666667 17.066667-42.666667 42.666666v256c0 25.6 17.066667 42.666667 42.666667 42.666667h256c25.6 0 42.666667-17.066667 42.666666-42.666667s-17.066667-42.666667-42.666666-42.666666H145.066667l76.8-76.8 153.6-153.6c17.066667-17.066667 17.066667-42.666667 0-59.733334-17.066667-17.066667-42.666667-17.066667-59.733334 0z m665.6 34.133334c-25.6 0-42.666667 17.066667-42.666666 42.666666v153.6l-76.8-76.8-153.6-153.6c-17.066667-17.066667-42.666667-17.066667-59.733334 0-17.066667 17.066667-17.066667 42.666667 0 59.733334l153.6 153.6 76.8 76.8H725.333333c-25.6 0-42.666667 17.066667-42.666666 42.666666s17.066667 42.666667 42.666666 42.666667h256c25.6 0 42.666667-17.066667 42.666667-42.666667v-256c0-25.6-17.066667-42.666667-42.666667-42.666666z m0-682.666667h-256c-25.6 0-42.666667 17.066667-42.666666 42.666667s17.066667 42.666667 42.666666 42.666666h153.6l-76.8 76.8-153.6 153.6c-17.066667 17.066667-17.066667 42.666667 0 59.733334 17.066667 17.066667 42.666667 17.066667 59.733334 0l153.6-153.6 76.8-76.8v153.6c0 25.6 17.066667 42.666667 42.666666 42.666666s42.666667-17.066667 42.666667-42.666666v-256c0-25.6-17.066667-42.666667-42.666667-42.666667z" fill="" p-id="3305"></path></svg>
<svg class="icon" v-else style="width: 24px; vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3952"><path d="M384 597.333333h-256c-25.6 0-42.666667 17.066667-42.666667 42.666667s17.066667 42.666667 42.666667 42.666667h153.6L17.066667 947.2c-17.066667 17.066667-17.066667 42.666667 0 59.733333 17.066667 17.066667 42.666667 17.066667 59.733333 0L341.333333 742.4v153.6c0 25.6 17.066667 42.666667 42.666667 42.666667s42.666667-17.066667 42.666667-42.666667v-256c0-25.6-17.066667-42.666667-42.666667-42.666667z m358.4 85.333334h153.6c25.6 0 42.666667-17.066667 42.666667-42.666667s-17.066667-42.666667-42.666667-42.666667h-256c-25.6 0-42.666667 17.066667-42.666667 42.666667v256c0 25.6 17.066667 42.666667 42.666667 42.666667s42.666667-17.066667 42.666667-42.666667V742.4l264.533333 264.533333c17.066667 17.066667 42.666667 17.066667 59.733333 0 17.066667-17.066667 17.066667-42.666667 0-59.733333L742.4 682.666667zM640 426.666667h256c25.6 0 42.666667-17.066667 42.666667-42.666667s-17.066667-42.666667-42.666667-42.666667H742.4L1006.933333 76.8c17.066667-17.066667 17.066667-42.666667 0-59.733333-17.066667-17.066667-42.666667-17.066667-59.733333 0L682.666667 281.6V128c0-25.6-17.066667-42.666667-42.666667-42.666667s-42.666667 17.066667-42.666667 42.666667v256c0 25.6 17.066667 42.666667 42.666667 42.666667z m-256-341.333334c-25.6 0-42.666667 17.066667-42.666667 42.666667v153.6L76.8 8.533333C59.733333 0 25.6 0 8.533333 8.533333 0 25.6 0 59.733333 8.533333 76.8L281.6 341.333333H128c-25.6 0-42.666667 17.066667-42.666667 42.666667s17.066667 42.666667 42.666667 42.666667h256c25.6 0 42.666667-17.066667 42.666667-42.666667v-256c0-25.6-17.066667-42.666667-42.666667-42.666667z" p-id="3953"></path></svg>
</i>

View File

@ -0,0 +1,229 @@
/**
* 顶部header
*/
import Vue from 'vue'
Vue.component("screen-header", {
template: `
<div :class="red?'head-title red-head':'head-title'">
<div class="head-title-label">
北跨泾河-产发工程数字管理平台
</div>
<div class="head-title-tab">
<div :class="nav==1?'head-nav active':'head-nav'" @click="pageJump(1,'#/')">项目概况</div>
<div :class="nav==2?'head-nav active':'head-nav'" @click="pageJump(2,'#/detail')">项目详情</div>
<div :class="nav==3?'head-nav active':'head-nav'" @click="pageJump(3,'#/safety')">安全管理</div>
<div :class="nav==4?'head-nav active':'head-nav'" @click="pageJump(4,'#/quality')">质量管理</div>
<div :class="nav==5?'head-nav active':'head-nav'" @click="pageJump(5,'#/progress')">进度管理</div>
<div :class="nav==6?'head-nav active':'head-nav'" @click="pageJump(6,'#/video')">视频管理</div>
<div :class="nav==7?'head-nav active':'head-nav'" @click="pageJump(7)">工程管理</div>
</div>
<div class="head-title-select" @mouseleave="hideScreenUlSel1" v-if="localStorage1">
<div class="head-select">
<input type="text" :value="dept1" @click="showScreenUlSel1" placeholder="请选择公司" readonly>
</div>
<el-collapse-transition>
<ul class="header-screen-ul" v-show="showSel1" ref="selectUl">
<li v-for="item in depts" @click="setScreenLiSel1(item)" :title="item.text" >{{item.text}}</li>
</ul>
</el-collapse-transition>
</div>
<div class="head-title-select" @mouseleave="hideScreenUlSel2" v-if="localStorage2">
<div class="head-select">
<input type="text" :value="dept2" @click="showScreenUlSel2" placeholder="请选择项目" readonly>
</div>
<el-collapse-transition>
<ul class="header-screen-ul" v-show="showSel2" ref="selectUl">
<li v-for="item in data" @click="setScreenLiSel2(item)" :title="item.text">{{item.text}}</li>
</ul>
</el-collapse-transition>
</div>
<div class="head-title-date">
<div class="head-title-time">
<div class="head-title-date-con">{{date}}</div>
<div class="head-title-time-con">{{time}}</div>
</div>
<div class="head-title-weather">
<img src="images/weather.png">
<span></span>
<span>11~25</span>
</div>
</div>
<i class="set-fullscreen set-font-size" style="margin-left: 16px;position: absolute;top: 4px;right: 16px;" @click="toggleFullScreen">
<svg class="icon" v-if="!isFullScreen" style="width: 24px; vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3304"><path d="M145.066667 85.333333h153.6c25.6 0 42.666667-17.066667 42.666666-42.666666S324.266667 0 298.666667 0H34.133333C25.6 0 17.066667 8.533333 8.533333 17.066667 0 25.6 0 34.133333 0 42.666667v256c0 25.6 17.066667 42.666667 42.666667 42.666666s42.666667-17.066667 42.666666-42.666666V145.066667l230.4 230.4c17.066667 17.066667 42.666667 17.066667 59.733334 0 17.066667-17.066667 17.066667-42.666667 0-59.733334L145.066667 85.333333z m170.666666 563.2L162.133333 802.133333l-76.8 76.8V725.333333C85.333333 699.733333 68.266667 682.666667 42.666667 682.666667s-42.666667 17.066667-42.666667 42.666666v256c0 25.6 17.066667 42.666667 42.666667 42.666667h256c25.6 0 42.666667-17.066667 42.666666-42.666667s-17.066667-42.666667-42.666666-42.666666H145.066667l76.8-76.8 153.6-153.6c17.066667-17.066667 17.066667-42.666667 0-59.733334-17.066667-17.066667-42.666667-17.066667-59.733334 0z m665.6 34.133334c-25.6 0-42.666667 17.066667-42.666666 42.666666v153.6l-76.8-76.8-153.6-153.6c-17.066667-17.066667-42.666667-17.066667-59.733334 0-17.066667 17.066667-17.066667 42.666667 0 59.733334l153.6 153.6 76.8 76.8H725.333333c-25.6 0-42.666667 17.066667-42.666666 42.666666s17.066667 42.666667 42.666666 42.666667h256c25.6 0 42.666667-17.066667 42.666667-42.666667v-256c0-25.6-17.066667-42.666667-42.666667-42.666666z m0-682.666667h-256c-25.6 0-42.666667 17.066667-42.666666 42.666667s17.066667 42.666667 42.666666 42.666666h153.6l-76.8 76.8-153.6 153.6c-17.066667 17.066667-17.066667 42.666667 0 59.733334 17.066667 17.066667 42.666667 17.066667 59.733334 0l153.6-153.6 76.8-76.8v153.6c0 25.6 17.066667 42.666667 42.666666 42.666666s42.666667-17.066667 42.666667-42.666666v-256c0-25.6-17.066667-42.666667-42.666667-42.666667z" fill="" p-id="3305"></path></svg>
<svg class="icon" v-else style="width: 24px; vertical-align: middle;fill: currentColor;overflow: hidden;" viewBox="0 0 1024 1024" version="1.1" xmlns="http://www.w3.org/2000/svg" p-id="3952"><path d="M384 597.333333h-256c-25.6 0-42.666667 17.066667-42.666667 42.666667s17.066667 42.666667 42.666667 42.666667h153.6L17.066667 947.2c-17.066667 17.066667-17.066667 42.666667 0 59.733333 17.066667 17.066667 42.666667 17.066667 59.733333 0L341.333333 742.4v153.6c0 25.6 17.066667 42.666667 42.666667 42.666667s42.666667-17.066667 42.666667-42.666667v-256c0-25.6-17.066667-42.666667-42.666667-42.666667z m358.4 85.333334h153.6c25.6 0 42.666667-17.066667 42.666667-42.666667s-17.066667-42.666667-42.666667-42.666667h-256c-25.6 0-42.666667 17.066667-42.666667 42.666667v256c0 25.6 17.066667 42.666667 42.666667 42.666667s42.666667-17.066667 42.666667-42.666667V742.4l264.533333 264.533333c17.066667 17.066667 42.666667 17.066667 59.733333 0 17.066667-17.066667 17.066667-42.666667 0-59.733333L742.4 682.666667zM640 426.666667h256c25.6 0 42.666667-17.066667 42.666667-42.666667s-17.066667-42.666667-42.666667-42.666667H742.4L1006.933333 76.8c17.066667-17.066667 17.066667-42.666667 0-59.733333-17.066667-17.066667-42.666667-17.066667-59.733333 0L682.666667 281.6V128c0-25.6-17.066667-42.666667-42.666667-42.666667s-42.666667 17.066667-42.666667 42.666667v256c0 25.6 17.066667 42.666667 42.666667 42.666667z m-256-341.333334c-25.6 0-42.666667 17.066667-42.666667 42.666667v153.6L76.8 8.533333C59.733333 0 25.6 0 8.533333 8.533333 0 25.6 0 59.733333 8.533333 76.8L281.6 341.333333H128c-25.6 0-42.666667 17.066667-42.666667 42.666667s17.066667 42.666667 42.666667 42.666667h256c25.6 0 42.666667-17.066667 42.666667-42.666667v-256c0-25.6-17.066667-42.666667-42.666667-42.666667z" p-id="3953"></path></svg>
</i>
</div>
`,
props: {
nav:{
type:Number
},
red:{
type:String
},
item:{
type:Number
},
},
data() {
return {
dept1:'',
dept2:'',
showSel1:false,
showSel2:false,
data:[],
depts:[],
timerID:undefined,
time: '',
date: '',
week:'',
selDept:'',
localStorage1: JSON.parse(localStorage.getItem("data1")),
localStorage2: JSON.parse(localStorage.getItem("data2")),
isFullScreen:false
}
},
mounted(){
this.timerID = setInterval(this.updateTime, 1000);
this.updateTime();
this.init()
this.$api.dept.list().then(d=>{
this.depts=[{text:'产发集团',id:0},...(d?.data||[]).map(it=>{
it.text=it.deptName;
it.id=it.deptId;
return it;
})]
this.deptChange();
});
},
methods: {
toggleFullScreen(){
let el=document.body;
this.$toggleFullScreen(el);
setTimeout(()=>{
this.isFullScreen=document.fullscreenElement==el;
},400);
},
init(){
try{
this.localStorage1=JSON.parse(localStorage.getItem("data1"))
this.localStorage2=JSON.parse(localStorage.getItem("data2"))
}catch(e){
}
if(!this.localStorage1){
this.localStorage1={
}
}
if(!this.localStorage2){
this.localStorage2={}
}
this.dept1=this.localStorage1?.text||'';
this.dept2=this.localStorage2?.text||'';
if(this.dept1){
this.loadProject(true);
}
},
deptChange(){
let tmps=this.depts.filter(d=>d.text==this.dept1);
if(tmps.length>0){
this.$bus.$emit("deptChange",tmps[0])
}
},
//页面条状
pageJump(n,url){
debugger
if(n != this.nav){
if(url){
location.href = url
}else{
this.$notify({
title: '提示',
message: '页面开发中,敬请期待!',
type: 'warning'
});
}
}
},
showScreenUlSel1(){
this.showSel1 = true
},
showScreenUlSel2(){
this.showSel2 = true
},
hideScreenUlSel1(){
this.showSel1 = false
},
hideScreenUlSel2(){
this.showSel2 = false
},
setScreenLiSel1(item){
localStorage.setItem("data1",JSON.stringify(item))
this.localStorage1=JSON.parse(localStorage.getItem("data1"))
this.$emit('itemdata',item);
this.showSel1 = false
this.dept1=item.text;
this.deptChange();
this.loadProject();
},
loadProject(init){
this.$api.project.findProjectByDept( this.localStorage1.id).then(d=>{
let objs=(d?.data||[]).map(it=>{
it.text=it.projectName;
return it;
}).filter(it=>+it.progressVisible==0);
this.data=[{id:0,text:'所有项目'},...objs];
this.$bus.$emit("loadProjects",this.data);
if(this.data.length>0){
this.setScreenLiSel2(this.data[0],init);
}else{
this.setScreenLiSel2(null);
}
});
},
setScreenLiSel2(item,init){
if(item){
this.showSel2 = false;
if(!init){
localStorage.setItem("data2",JSON.stringify(item))
this.localStorage2=JSON.parse(localStorage.getItem("data2"))
this.$emit('itemdata',item);
this.dept2=item.text;
}
this.$bus.$emit("projectChange",this.localStorage2);
}else{
localStorage.removeItem("data2");
this.localStorage2={};
this.showSel2 = false;
this.dept2='';
}
},
//时间方法
updateTime(){
var cd = new Date();
this.time = this.zeroPadding(cd.getHours(), 2) + ':' + this.zeroPadding(cd.getMinutes(), 2) + ':' + this.zeroPadding(cd.getSeconds(), 2);
this.date = this.zeroPadding(cd.getFullYear(), 4) + '年' + this.zeroPadding(cd.getMonth()+1, 2) + '月' + this.zeroPadding(cd.getDate(), 2)+'日';
},
zeroPadding(num, digit) {
var zero = '';
for(var i = 0; i < digit; i++) {
zero += '0';
}
return (zero + num).slice(-digit);
}
},
watch:{
}
})

11
src/main.js 100644
View File

@ -0,0 +1,11 @@
import Vue from 'vue'
import App from './App.vue'
import router from './router'
import './pages/init.js'
Vue.config.productionTip = false
new Vue({
router,
render: h => h(App)
}).$mount('#app')

View File

@ -0,0 +1,55 @@
<template>
<div class="iamge-preview" v-if="show">
<i class="el-icon-close btn-close" @click="show=false"></i>
<el-image :src="url" />
</div>
</template>
<script>
export default {
name: 'JhbigscreenImagePreview',
data() {
return {
url:'',
show:false
};
},
mounted() {
},
methods: {
showDialog(url){
this.url=url;
this.show=true;
},
hide(){
this.show=false;
}
},
};
</script>
<style lang="less" >
.iamge-preview{
position: fixed;
top: 0px;
width: 100%;
height: 100%;
background: rgba(0,0,0,0.8);
display: flex;
align-items: center;
justify-content: center;
z-index: 999999;
.btn-close{
font-size: 48px;
color: #fff;
position: absolute;
top: 48px;
right: 48px;
z-index: 100;
}
}
</style>

View File

@ -1,5 +1,5 @@
<template>
<div id="app">
<div class="main-index">
<!--大屏背景-->
<background-video></background-video>
<!--大屏内容-->
@ -899,7 +899,8 @@ export default {
}
</script>
<style lang="less">#app {
<style lang="less">
.main-index {
.center-image .screen-one-2-1 {
overflow: hidden;
}

View File

@ -7,8 +7,9 @@ import {tryToJson} from '../utils/tools'
import H265Player from '../components/h265-player/index'
H265Player.install(Vue);
dayfilter(Vue);
const vue=new Vue();
Vue.prototype.$api=Api;
Vue.prototype.$bus=new Vue();
Vue.prototype.$bus=vue;
Vue.prototype.$apiPath="/jhapi"
Vue.prototype.$dt=dayjs;
Vue.prototype.$tryToJson=tryToJson
@ -28,6 +29,20 @@ Vue.prototype.$toggleFullScreen=(el)=>{
}
}
}
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={};
/*
Api.project.getInfo().then(d=>{

View File

@ -18,8 +18,8 @@
</div>
</div>
</div>
</template>
<div class="font-size-tools">
<i class="set-font-size font-size2" @click="fontSize = 2" :class="fontSize==2?'active':''">
<svg class="icon svg-icon"
@ -77,7 +77,8 @@
<el-carousel height="500px" v-if="scheduleInfo && scheduleInfo.images && scheduleInfo.images.length > 0">
<el-carousel-item v-for="item in scheduleInfo.images" :key="item">
<div style="width: 100%;display: flex;align-items: center;justify-content: center;height: 500px;">
<el-image :src="$apiPath + item" style="width:100%" :preview-src-list="[$apiPath + item]"/>
<el-image v-if="isFullScreen" :src="$apiPath + item" style="width:100%" @click="doPreivew($apiPath + item)"/>
<el-image v-else :src="$apiPath + item" style="width:100%" :preview-src-list="[$apiPath + item]"></el-image>
</div>
</el-carousel-item>
</el-carousel>
@ -139,16 +140,18 @@
<div style="text-align: center;">暂无数据</div>
</div>
</div>
<ImagePreview ref="ip"></ImagePreview>
</MyDialog>
</template>
<script>
import '@/components/module/module-one-1-1'
import MyDialog from '../components/MyDialog'
import { TimeSelect } from 'element-ui';
import ImagePreview from '../components/ImagePreview.vue'
export default {
components: {
MyDialog,
ImagePreview
},
name: 'JhbigscreenIndexDlg1',
@ -174,10 +177,22 @@ export default {
// this.$api.project.getProgressProjects().then(d => {
// this.prjs = d.data || [];
// window.jhcaches.progressProjects = this.prjs;
// });
// });
this.$bus.$on('fullscreen',b=>{
setTimeout(()=>{
this.isFullScreen=b;
if(!b){
this.$refs.ip.hide();
}
},400);
})
},
methods: {
methods: {
doPreivew(url){
this.$refs.ip.showDialog(url);
},
toggleFullScreen(){
let el=this.$el.querySelector(".popup-project-introduction-min");
this.$toggleFullScreen(el);
@ -238,7 +253,7 @@ export default {
this.scheduleInfo = scheduleInfo;
this.localStorage2 = JSON.parse(localStorage.getItem("data2"))
this.dept2 = this.localStorage2.text;
this.show = true
this.show = true
//});
},
setScreenLiSel2(item) {

View File

@ -0,0 +1,47 @@
import Vue from 'vue'
import VueRouter from 'vue-router'
Vue.use(VueRouter)
const routes = [
{
path: '/',
name: 'index',
component: () => import(/* webpackChunkName: "index" */ '../pages/index.vue')
},
{
path: '/detail',
name: 'detail',
component: () => import(/* webpackChunkName: "detail" */ '../pages/projectDetail.vue')
},
{
path: '/progress',
name: 'progress',
component: () => import(/* webpackChunkName: "progress" */ '../pages/projectProgress.vue')
}
,
{
path: '/quality',
name: 'quality',
component: () => import(/* webpackChunkName: "quality" */ '../pages/projectQuality.vue')
}
,
{
path: '/safety',
name: 'safety',
component: () => import(/* webpackChunkName: "safety" */ '../pages/projectSafety.vue')
}
,
{
path: '/video',
name: 'video',
component: () => import(/* webpackChunkName: "video" */ '../pages/projectVideo.vue')
}
]
const router = new VueRouter({
mode: 'hash',
base: process.env.BASE_URL,
routes
})
export default router