|
@@ -1,8 +1,11 @@
|
|
|
<template>
|
|
|
- <div class="home">
|
|
|
- <div class="top">
|
|
|
- <div class="time"><span class="iconfont icon-riqi"></span> {{ currentTime }}</div>
|
|
|
- </div>
|
|
|
+ <div class="home" >
|
|
|
+ <div class="top">
|
|
|
+ <div @click="logout()" style="float: left;">
|
|
|
+ <img src="../assets/bargound/logout1.png" style="height: 20px; width: 20px; margin-left: 20px;" alt="" ><span style="color: rgb(174, 201, 222);">退出</span>
|
|
|
+ </div>
|
|
|
+ <div class="time"><span class="iconfont icon-riqi"></span> {{ currentTime }}</div>
|
|
|
+ </div>
|
|
|
<div class="content">
|
|
|
<div class="left">
|
|
|
<div class="klfx modulbox leftbox1">
|
|
@@ -51,7 +54,8 @@ import JCPM from "../components/HomeChart/JCPM.vue";
|
|
|
import BXCBHB from "../components/HomeChart/BXCBHB.vue";
|
|
|
import KCFX from "../components/HomeChart/KCFX.vue";
|
|
|
import BKFX from "../components/HomeChart/BKFX.vue"
|
|
|
-import { kcfxcompanInfo } from "../servuces/prove";
|
|
|
+import { kcfxcompanInfo, userlogoutInfo } from "../servuces/prove";
|
|
|
+import { settoken } from "../servuces/token";
|
|
|
import { mapMutations } from "vuex";
|
|
|
export default {
|
|
|
name: 'HomeView',
|
|
@@ -95,6 +99,20 @@ export default {
|
|
|
const seconds = String(now.getSeconds()).padStart(2, "0");
|
|
|
return `${year}.${month}.${day} ${hours}:${minutes}:${seconds}`;
|
|
|
},
|
|
|
+ logout(){
|
|
|
+ userlogoutInfo().then(res => {
|
|
|
+
|
|
|
+ if (res.success) {
|
|
|
+ this.$router.replace('/login');
|
|
|
+ settoken('');
|
|
|
+ } else {
|
|
|
+ this.$vux.toast.show({
|
|
|
+ type: 'cancel',
|
|
|
+ text: res.errors
|
|
|
+ })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
},
|
|
|
components: {
|
|
|
KLFX, XSFX, FQYW, CZTJ, KYFX, JCPM, BXCBHB, KCFX, BKFX
|
|
@@ -109,7 +127,6 @@ export default {
|
|
|
padding: 1% 0 0 0;
|
|
|
|
|
|
.top {
|
|
|
- display: flex;
|
|
|
height: 7%;
|
|
|
justify-content: flex-end;
|
|
|
background-image: url(../assets/bargound/title.png);
|
|
@@ -118,6 +135,7 @@ export default {
|
|
|
box-sizing: border-box;
|
|
|
|
|
|
.time {
|
|
|
+ float: right;
|
|
|
color: rgb(174, 201, 222);
|
|
|
margin-right: 2%;
|
|
|
font-size: 16px;
|