|
|
@@ -10,11 +10,12 @@
|
|
|
|
|
|
<!-- <error-log class="errLog-container right-menu-item hover-effect" />-->
|
|
|
|
|
|
- <screenfull id="screenfull" class="right-menu-item hover-effect" />
|
|
|
+ <!-- <screenfull id="screenfull" class="right-menu-item hover-effect" /> -->
|
|
|
|
|
|
- <el-tooltip :content="$t('navbar.size')" effect="dark" placement="bottom">
|
|
|
+ <!-- <el-tooltip :content="$t('navbar.size')" effect="dark" placement="bottom">
|
|
|
<size-select id="size-select" class="right-menu-item hover-effect" />
|
|
|
- </el-tooltip>
|
|
|
+ </el-tooltip> -->
|
|
|
+ <div style="float:left;"> 当前时间:{{ nowDateTime }} 当前期数:{{periodNum}} </div>
|
|
|
|
|
|
<lang-select class="right-menu-item hover-effect" />
|
|
|
|
|
|
@@ -62,6 +63,7 @@ import Screenfull from '@/components/Screenfull'
|
|
|
import SizeSelect from '@/components/SizeSelect'
|
|
|
import LangSelect from '@/components/LangSelect'
|
|
|
import Search from '@/components/HeaderSearch'
|
|
|
+import baseInfo from '@/utils/baseInfo'
|
|
|
|
|
|
export default {
|
|
|
components: {
|
|
|
@@ -73,18 +75,25 @@ export default {
|
|
|
LangSelect,
|
|
|
Search
|
|
|
},
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ periodNum: baseInfo.nowPeriodNum(),
|
|
|
+ nowTime: this.getTime()
|
|
|
+ }
|
|
|
+ },
|
|
|
computed: {
|
|
|
+ nowDateTime() {
|
|
|
+ return this.$moment(this.nowTime * 1000).utcOffset('+0100' ).format('YYYY-MM-DD HH:mm:ss') + ' (WAT)'
|
|
|
+ },
|
|
|
...mapGetters([
|
|
|
'sidebar',
|
|
|
'avatar',
|
|
|
'device'
|
|
|
- ])
|
|
|
+ ]),
|
|
|
+ },
|
|
|
+ mounted(){
|
|
|
+ this.calcTime()
|
|
|
},
|
|
|
- data() {
|
|
|
- return {
|
|
|
-
|
|
|
- }
|
|
|
- },
|
|
|
methods: {
|
|
|
toggleSideBar() {
|
|
|
this.$store.dispatch('app/toggleSideBar')
|
|
|
@@ -92,7 +101,18 @@ export default {
|
|
|
async logout() {
|
|
|
await this.$store.dispatch('user/logout')
|
|
|
this.$router.push(`/login?redirect=${this.$route.fullPath}`)
|
|
|
- }
|
|
|
+ },
|
|
|
+ getTime() {
|
|
|
+ let dateObj = new Date()
|
|
|
+ return Math.round(dateObj.getTime() / 1000 + (0 * 86400))
|
|
|
+ },
|
|
|
+ calcTime () {
|
|
|
+ let obj = this
|
|
|
+ setInterval(function () {
|
|
|
+ obj.nowTime += 1
|
|
|
+ }, 1000)
|
|
|
+ },
|
|
|
+
|
|
|
}
|
|
|
}
|
|
|
</script>
|