Authored by 王涛

Merge branch 'master-v32-lushangqing' into 'master'

大屏及电子税务局页面样式修改,时间每秒刷新一次



See merge request !56
@@ -65,13 +65,13 @@ export default { @@ -65,13 +65,13 @@ export default {
65 }, 65 },
66 timelogoStyle () { // 左上角时间标志大小 66 timelogoStyle () { // 左上角时间标志大小
67 return { 67 return {
68 - width: this.titleFontSize / 2.5 + 'px',  
69 - height: this.titleFontSize / 2.5 + 'px' 68 + width: this.titleFontSize / 3 + 'px',
  69 + height: this.titleFontSize / 3 + 'px'
70 } 70 }
71 }, 71 },
72 datetimeStyle () { // 左上角日期时间大小 72 datetimeStyle () { // 左上角日期时间大小
73 return { 73 return {
74 - fontSize: this.titleFontSize / 3 + 'px', 74 + fontSize: this.titleFontSize / 3.5 + 'px',
75 marginLeft: this.titleFontSize / 5 + 'px' 75 marginLeft: this.titleFontSize / 5 + 'px'
76 } 76 }
77 }, 77 },
@@ -102,13 +102,20 @@ export default { @@ -102,13 +102,20 @@ export default {
102 // this.$refs.responseRef.getData(); 102 // this.$refs.responseRef.getData();
103 // this.$refs.bandwidthRef.getData(); 103 // this.$refs.bandwidthRef.getData();
104 104
105 - }  
106 }, 105 },
107 - mounted () { 106 + getDateTime(){
108 var that = this 107 var that = this
109 // 获取当前系统时间 108 // 获取当前系统时间
110 var myDate = new Date(); 109 var myDate = new Date();
111 - that.dateTime = myDate.getFullYear() + '-' + that.timeFormat(myDate.getMonth() + 1 + '') + '-' + that.timeFormat(myDate.getDate() + '') // + ' ' + that.timeFormat(myDate.getHours() + '') + ':' + that.timeFormat(myDate.getMinutes() + '') + ':' + that.timeFormat(myDate.getSeconds() + ''); 110 + that.dateTime = myDate.getFullYear() + '-' + that.timeFormat(myDate.getMonth() + 1 + '') + '-' + that.timeFormat(myDate.getDate() + '') + ' ' + that.timeFormat(myDate.getHours() + '') + ':' + that.timeFormat(myDate.getMinutes() + '') + ':' + that.timeFormat(myDate.getSeconds() + '');
  111 + }
  112 + },
  113 + mounted () {
  114 + var that = this
  115 + //定时器每秒调用一次fnDate()
  116 + setInterval(function(){
  117 + that.getDateTime();
  118 + },1000);
112 119
113 window.addEventListener('resize', this.screenAdapter) 120 window.addEventListener('resize', this.screenAdapter)
114 this.screenAdapter() 121 this.screenAdapter()
@@ -27,7 +27,7 @@ @@ -27,7 +27,7 @@
27 <el-dialog class="data-dialog" v-model="centerDialogVisible" :title="dialogMachineName" width="60%" > 27 <el-dialog class="data-dialog" v-model="centerDialogVisible" :title="dialogMachineName" width="60%" >
28 <div class="machine-video"> 28 <div class="machine-video">
29 <el-row> 29 <el-row>
30 - <el-col class="video-item" :span="12" v-for="i in 4"> 30 + <el-col class="video-item" :span="24" >
31 <iframe :src="'/zjdp/video.html?type='+dialogMachineName+'&access_token='+accessToken" frameborder="0"></iframe> 31 <iframe :src="'/zjdp/video.html?type='+dialogMachineName+'&access_token='+accessToken" frameborder="0"></iframe>
32 </el-col> 32 </el-col>
33 </el-row> 33 </el-row>
@@ -55,16 +55,24 @@ export default { @@ -55,16 +55,24 @@ export default {
55 55
56 // 挂载完 56 // 挂载完
57 Vue.onMounted(() => { 57 Vue.onMounted(() => {
  58 + //定时器每秒调用一次fnDate()
  59 + setInterval(function(){
  60 + getDateTime();
  61 + },1000);
  62 +
  63 + })
  64 + let getDateTime=()=>{
58 // 获取当前系统时间 65 // 获取当前系统时间
59 let myDate = new Date(); 66 let myDate = new Date();
60 proxy.dateTime = myDate.getFullYear() + '-' + proxy.timeFormat(myDate.getMonth() + 1 + '') + '-' + proxy.timeFormat(myDate.getDate() + '') + ' ' + proxy.timeFormat(myDate.getHours() + '') + ':' + proxy.timeFormat(myDate.getMinutes() + '') + ':' + proxy.timeFormat(myDate.getSeconds() + ''); 67 proxy.dateTime = myDate.getFullYear() + '-' + proxy.timeFormat(myDate.getMonth() + 1 + '') + '-' + proxy.timeFormat(myDate.getDate() + '') + ' ' + proxy.timeFormat(myDate.getHours() + '') + ':' + proxy.timeFormat(myDate.getMinutes() + '') + ':' + proxy.timeFormat(myDate.getSeconds() + '');
61 68
62 - }) 69 + }
63 70
64 71
65 return { 72 return {
66 datetimeStyle, 73 datetimeStyle,
67 - timeFormat 74 + timeFormat,
  75 + getDateTime
68 } 76 }
69 } 77 }
70 } 78 }