From c101c2e06299dd4e89ea6a9fb6dbf9577be26088 Mon Sep 17 00:00:00 2001
From: lihang <lihang@vci-tech.com>
Date: 星期三, 12 七月 2023 17:28:31 +0800
Subject: [PATCH] Merge branch 'master' of http://dev.vci-tech.com:1065/r/ubcs
---
Source/UBCS-WEB/dist/src/page/lock/index.vue | 108 ++++++++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 108 insertions(+), 0 deletions(-)
diff --git a/Source/UBCS-WEB/dist/src/page/lock/index.vue b/Source/UBCS-WEB/dist/src/page/lock/index.vue
new file mode 100644
index 0000000..2e227d3
--- /dev/null
+++ b/Source/UBCS-WEB/dist/src/page/lock/index.vue
@@ -0,0 +1,108 @@
+<template>
+ <div class="lock-container">
+ <div class="lock-form animated bounceInDown">
+ <div class="animated"
+ :class="{'shake':passwdError,'bounceOut':pass}">
+ <h3 class="title">{{userInfo.username}}</h3>
+ <el-input placeholder="璇疯緭鍏ョ櫥褰曞瘑鐮�"
+ type="password"
+ class="input-with-select animated"
+ v-model="passwd"
+ @keyup.enter.native="handleLogin">
+ <el-button slot="append"
+ icon="icon-bofangqi-suoping"
+ @click="handleLogin"></el-button>
+ <el-button slot="append"
+ icon="icon-tuichu"
+ @click="handleLogout"></el-button>
+ </el-input>
+ </div>
+
+ </div>
+ </div>
+</template>
+<script>
+import { mapGetters, mapState } from "vuex";
+export default {
+ name: "lock",
+ data() {
+ return {
+ passwd: "",
+ passwdError: false,
+ pass: false
+ };
+ },
+ created() {},
+ mounted() {},
+ computed: {
+ ...mapState({
+ userInfo: state => state.user.userInfo
+ }),
+ ...mapGetters(["tag", "lockPasswd"])
+ },
+ props: [],
+ methods: {
+ handleLogout() {
+ this.$confirm("鏄惁閫�鍑虹郴缁�, 鏄惁缁х画?", "鎻愮ず", {
+ confirmButtonText: "纭畾",
+ cancelButtonText: "鍙栨秷",
+ type: "warning"
+ }).then(() => {
+ this.$store.dispatch("LogOut").then(() => {
+ this.$router.push({ path: "/login" });
+ });
+ });
+ },
+ handleLogin() {
+ if (this.passwd !== this.lockPasswd) {
+ this.passwd = "";
+ this.$message({
+ message: "瑙i攣瀵嗙爜閿欒,璇烽噸鏂拌緭鍏�",
+ type: "error"
+ });
+ this.passwdError = true;
+ setTimeout(() => {
+ this.passwdError = false;
+ }, 1000);
+ return;
+ }
+ this.pass = true;
+ setTimeout(() => {
+ this.$store.commit("CLEAR_LOCK");
+ this.$router.push({
+ path: this.$router.$avueRouter.getPath({ src: this.tag.value })
+ });
+ }, 1000);
+ }
+ },
+ components: {}
+};
+</script>
+
+<style lang="scss">
+.lock-container {
+ height: 100%;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+ position: relative;
+ .title {
+ margin-bottom: 8px;
+ color: #333;
+ }
+}
+.lock-container::before {
+ z-index: -999;
+ content: "";
+ position: absolute;
+ left: 0;
+ top: 0;
+ width: 100%;
+ height: 100%;
+ background-image: url("/public/img/bg/login.png");
+ background-size: cover;
+}
+.lock-form {
+ width: 300px;
+}
+</style>
--
Gitblit v1.10.0