退出功能
This commit is contained in:
@@ -1,5 +1,9 @@
|
|||||||
<template>
|
<template>
|
||||||
<header>
|
<header>
|
||||||
|
<div class="exit_btn" :style="expand ? {opacity: 1} : {opacity: 0.1}">
|
||||||
|
<div class="exit_txt" @click="$router.push('/setup')" :style="expand ? {width: '70px'} : {width: '0px'}">退出</div>
|
||||||
|
<div class="exit_arrow" v-text="!expand ? '>>' : '<<'" @click.stop="expand = !expand"></div>
|
||||||
|
</div>
|
||||||
<p>{{title}}</p>
|
<p>{{title}}</p>
|
||||||
<div class="data_box clearfix">
|
<div class="data_box clearfix">
|
||||||
<div class="date_item date">{{date}}</div>
|
<div class="date_item date">{{date}}</div>
|
||||||
@@ -21,6 +25,7 @@ export default {
|
|||||||
name: 'Header',
|
name: 'Header',
|
||||||
data () {
|
data () {
|
||||||
return {
|
return {
|
||||||
|
expand: false,
|
||||||
timer: null,
|
timer: null,
|
||||||
time: '',
|
time: '',
|
||||||
hours: '',
|
hours: '',
|
||||||
@@ -43,6 +48,9 @@ export default {
|
|||||||
})
|
})
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
expandTooltip () {
|
||||||
|
this.expand = !this.expand
|
||||||
|
},
|
||||||
updateTime () {
|
updateTime () {
|
||||||
let cd = new Date()
|
let cd = new Date()
|
||||||
let year = cd.getFullYear()
|
let year = cd.getFullYear()
|
||||||
@@ -107,4 +115,29 @@ header
|
|||||||
font-size 32px
|
font-size 32px
|
||||||
line-height 37px
|
line-height 37px
|
||||||
color #fff
|
color #fff
|
||||||
|
.exit_btn
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 30px;
|
||||||
|
height 50px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
.exit_txt
|
||||||
|
font-size: 20px;
|
||||||
|
line-height: 50px;
|
||||||
|
color: #e6e7e1;
|
||||||
|
text-align: center;
|
||||||
|
font-weight: bold;
|
||||||
|
transition width .3s ease
|
||||||
|
overflow hidden
|
||||||
|
background-color: rgba(30, 182, 203, 80%);
|
||||||
|
.exit_arrow
|
||||||
|
width: 46px;
|
||||||
|
font-size: 20px;
|
||||||
|
line-height: 50px;
|
||||||
|
color: #e6e7e1;
|
||||||
|
text-align: center;
|
||||||
|
background-color: rgba(30, 182, 203, 60%);
|
||||||
|
border-top-right-radius: 30px;
|
||||||
|
border-bottom-right-radius: 30px
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
loginname: '',
|
loginname: '',
|
||||||
password: '',
|
password: '',
|
||||||
options: [{value: '1', label: '主页'}],
|
options: [{value: '1', label: '大屏'}, {value: '2', label: '看板1'}, {value: '3', label: '看板2'}],
|
||||||
value: this.$store.getters.equipId,
|
value: this.$store.getters.equipId,
|
||||||
baseUrl: this.$store.getters.baseUrl,
|
baseUrl: this.$store.getters.baseUrl,
|
||||||
setTime: this.$store.getters.setTime / 1000,
|
setTime: this.$store.getters.setTime / 1000,
|
||||||
@@ -97,6 +97,10 @@ export default {
|
|||||||
this.$store.dispatch('setConfig', obj)
|
this.$store.dispatch('setConfig', obj)
|
||||||
if (this.value === '1') {
|
if (this.value === '1') {
|
||||||
this.$router.push('/home')
|
this.$router.push('/home')
|
||||||
|
} else if (this.value === '2') {
|
||||||
|
this.$router.push('/pressprod')
|
||||||
|
} else if (this.value === '3') {
|
||||||
|
this.$router.push('/SortWorkMonitor')
|
||||||
}
|
}
|
||||||
let element = document.documentElement
|
let element = document.documentElement
|
||||||
if (this.fullscreen) {
|
if (this.fullscreen) {
|
||||||
|
|||||||
@@ -4,10 +4,14 @@
|
|||||||
<div class="n_header_h1">
|
<div class="n_header_h1">
|
||||||
<h1>生产监控中心</h1>
|
<h1>生产监控中心</h1>
|
||||||
</div>
|
</div>
|
||||||
<div class="n_header_h2">
|
<div class="n_header_h2" >
|
||||||
<h2>宁德华弘新材料科技有限公司</h2>
|
<h2>宁德华弘新材料科技有限公司</h2>
|
||||||
</div>
|
</div>
|
||||||
<v-time></v-time>
|
<v-time></v-time>
|
||||||
|
<div class="exit_btn" :style="expand ? {opacity: 1} : {opacity: 0.1}">
|
||||||
|
<div class="exit_txt" @click="$router.push('/setup')" :style="expand ? {width: '70px'} : {width: '0px'}">退出</div>
|
||||||
|
<div class="exit_arrow" v-text="!expand ? '>>' : '<<'" @click.stop="expand = !expand"></div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="left_bg"></div>
|
<div class="left_bg"></div>
|
||||||
<div class="right_bg"></div>
|
<div class="right_bg"></div>
|
||||||
@@ -142,6 +146,7 @@ export default {
|
|||||||
return {
|
return {
|
||||||
interTime: this.$store.getters.setTime,
|
interTime: this.$store.getters.setTime,
|
||||||
timer: null,
|
timer: null,
|
||||||
|
expand: false,
|
||||||
todayMixProduction: {}, // 今日生产混料
|
todayMixProduction: {}, // 今日生产混料
|
||||||
todayPressProduction: {}, // 今日生产成型
|
todayPressProduction: {}, // 今日生产成型
|
||||||
todaySortProduction: {}, // 今日生产包装
|
todaySortProduction: {}, // 今日生产包装
|
||||||
@@ -184,9 +189,9 @@ export default {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
created () {
|
created () {
|
||||||
// this._homepageDataLeft()
|
this._homepageDataLeft()
|
||||||
// this._homepageDataRight()
|
this._homepageDataRight()
|
||||||
// this.refresh()
|
this.refresh()
|
||||||
},
|
},
|
||||||
beforeDestroy () {
|
beforeDestroy () {
|
||||||
clearInterval(this.timer)
|
clearInterval(this.timer)
|
||||||
@@ -196,6 +201,9 @@ export default {
|
|||||||
clearInterval(this.chart5Timer)
|
clearInterval(this.chart5Timer)
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
expandTooltip () {
|
||||||
|
this.expand = !this.expand
|
||||||
|
},
|
||||||
refresh () {
|
refresh () {
|
||||||
this.timer = setInterval(() => {
|
this.timer = setInterval(() => {
|
||||||
this._homepageDataLeft()
|
this._homepageDataLeft()
|
||||||
@@ -1456,4 +1464,29 @@ export default {
|
|||||||
.state_name
|
.state_name
|
||||||
width 100%
|
width 100%
|
||||||
height 20px
|
height 20px
|
||||||
|
.exit_btn
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
top: 30px;
|
||||||
|
height 50px;
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
.exit_txt
|
||||||
|
font-size: 20px;
|
||||||
|
line-height: 50px;
|
||||||
|
color: #e6e7e1;
|
||||||
|
text-align: center;
|
||||||
|
font-weight: bold;
|
||||||
|
transition width .3s ease
|
||||||
|
overflow hidden
|
||||||
|
background-color: rgba(30, 182, 203, 80%);
|
||||||
|
.exit_arrow
|
||||||
|
width: 46px;
|
||||||
|
font-size: 20px;
|
||||||
|
line-height: 50px;
|
||||||
|
color: #e6e7e1;
|
||||||
|
text-align: center;
|
||||||
|
background-color: rgba(30, 182, 203, 60%);
|
||||||
|
border-top-right-radius: 30px;
|
||||||
|
border-bottom-right-radius: 30px
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
@@ -1308,8 +1308,8 @@ export default {
|
|||||||
display flex
|
display flex
|
||||||
justify-content flex-start
|
justify-content flex-start
|
||||||
img
|
img
|
||||||
width 55px
|
width 27px
|
||||||
height 29.64px
|
height auto
|
||||||
.ggtj_wrap_1
|
.ggtj_wrap_1
|
||||||
left: 51%;
|
left: 51%;
|
||||||
top: 18%;
|
top: 18%;
|
||||||
|
|||||||
@@ -72,6 +72,7 @@ html, body {
|
|||||||
width: 1920px;
|
width: 1920px;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
min-height: 1080px;
|
min-height: 1080px;
|
||||||
|
/* height: 1200px; */
|
||||||
/* height: 1080px; 看板 */
|
/* height: 1080px; 看板 */
|
||||||
/* height: 1200px; 大屏 */
|
/* height: 1200px; 大屏 */
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ const baseUrl = process.env.NODE_ENV === 'development' ? 'http://192.168.81.59:8
|
|||||||
*/
|
*/
|
||||||
const state = {
|
const state = {
|
||||||
baseUrl: getStore('baseUrl') || baseUrl,
|
baseUrl: getStore('baseUrl') || baseUrl,
|
||||||
setTime: getStore('setTime') || 5000,
|
setTime: getStore('setTime') || 50000,
|
||||||
equipId: getStore('equipId') || '1'
|
equipId: getStore('equipId') || '1'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user