智慧保安打卡签到系统
+
liuyg
2021-11-22 0ebbd4a9d22dce39369a6ef9973e751ccfdbdda7
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
<template>
  <div id="examine">
    <div class="examine_heard">
      签到系统
      <div class="e_h_right">
        <img
          src="http://nx.baibaodun.cn:80/assets/images/username-person.png"
          alt=""
        />
        <span> {{ userName }} </span>
        <div @click="logout">退出登录</div>
      </div>
    </div>
    <div class="examine_body">
      <div class="e_m_left">
        <forms></forms>
      </div>
      <div class="e_m_right">
        <tables></tables>
      </div>
    </div>
  </div>
</template>
 
<script>
import { mapGetters } from "vuex";
import { resetRouter } from "@/router/router";
import tables from "./tables.vue";
import forms from "./forms.vue";
 
export default {
  data() {
    return {
      userName: "",
    };
  },
  components: {
    tables,
    forms,
  },
  computed: {
    ...mapGetters(["userInfo"]),
  },
  watch: {
    userInfo() {
      console.log(userInfo);
    },
  },
  mounted() {
    console.log((this.userName = this.userInfo.nick_name));
  },
  methods: {
    logout() {
      this.$confirm(this.$t("logoutTip"), this.$t("tip"), {
        confirmButtonText: this.$t("submitText"),
        cancelButtonText: this.$t("cancelText"),
        type: "warning",
      }).then(() => {
        this.$store.dispatch("LogOut").then(() => {
          resetRouter();
          this.$router.push({ path: "/login" });
        });
      });
    },
  },
};
</script>
<style lang="scss">
#examine {
  width: 100%;
  height: 100%;
  overflow: hidden;
  box-sizing: border-box;
  .examine_heard {
    background-color: #25aff3;
    width: 100%;
    padding-left: 30px;
    box-sizing: border-box;
    height: 50px;
    color: #ffffff;
    font-size: 24px;
    line-height: 50px;
    .e_h_right {
      float: right;
      margin-right: 20px;
      img {
        display: inline-block;
        vertical-align: middle;
      }
      span {
        font-style: normal;
        color: #ffffff;
        font-size: 16px;
        line-height: 50px;
        display: inline-block;
        margin: 0;
        padding-left: 4px;
      }
      div {
        display: inline;
        margin-left: 15px;
        color: #ffffff;
        font-size: 16px;
        line-height: 50px;
      }
    }
  }
  .examine_body {
    width: 100%;
    height: calc(100% - 50px);
    box-sizing: border-box;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    .e_m_left {
      width: 50%;
      height: 100%;
    }
    .e_m_right {
      width: 50%;
      height: 100%;
      // border: 1px solid red;
    }
  }
}
</style>