Administrator
2022-05-09 c7735db135f9c3c99224d8b5d2157926efde0977
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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
<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">
      <el-tabs v-model="activeName" @tab-click="handleClick">
        <el-tab-pane label="身份识别" name="first">
          <div class="examine_body_left">
            <div class="e_m_left">
              <forms></forms>
            </div>
            <div class="e_m_right">
              <tables></tables>
            </div>
          </div>
        </el-tab-pane>
        <el-tab-pane label="签到记录" name="second">
          <signIn v-if="activeName == 'second'"></signIn>
        </el-tab-pane>
      </el-tabs>
    </div>
  </div>
</template>
 
<script>
import { mapGetters } from "vuex";
import { resetRouter } from "@/router/router";
import tables from "./tables.vue";
import forms from "./forms.vue";
import signIn from "./signIn.vue";
 
export default {
  data() {
    return {
      tabs: "",
      userName: "",
      activeName: "first"
    };
  },
  components: {
    tables,
    forms,
    signIn
  },
  computed: {
    ...mapGetters(["userInfo"])
  },
  watch: {
    userInfo() {
      // console.log(userInfo);
    }
  },
  mounted() {
    this.userName = this.userInfo.account;
  },
  methods: {
    handleClick(tab, event) {
      // console.log(tab.name, 77777);
    },
    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);
    // border: 1px solid red;
    box-sizing: border-box;
  }
  .examine_body_left {
    width: 100%;
    height: calc(100% - 55px);
    // height: 100% !important;
    // border: 1px solid rgb(0, 26, 255);
    box-sizing: border-box;
    display: flex;
    // align-items: center;
    justify-content: center;
    position: relative;
    .e_m_left {
      width: 47%;
      height: 100%;
 
      box-sizing: border-box;
      overflow-x: hidden;
      overflow-y: scroll;
    }
    .e_m_right {
      width: 53%;
      height: 100%;
      // border: 1px solid rgb(0, 255, 64);
      // border: 1px solid red;
    }
  }
}
</style>