From b921e333300a26393291ffac44e9d9a2ed2d92ed Mon Sep 17 00:00:00 2001
From: wang1 <844966816@qq.com>
Date: 星期四, 13 七月 2023 18:18:49 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
Source/UBCS-WEB/dist/src/page/index/top/top-lock.vue | 72 ++++++++++++++++++++++++++++++++++++
1 files changed, 72 insertions(+), 0 deletions(-)
diff --git a/Source/UBCS-WEB/dist/src/page/index/top/top-lock.vue b/Source/UBCS-WEB/dist/src/page/index/top/top-lock.vue
new file mode 100644
index 0000000..bbc9132
--- /dev/null
+++ b/Source/UBCS-WEB/dist/src/page/index/top/top-lock.vue
@@ -0,0 +1,72 @@
+<template>
+ <span>
+ <i class="icon-suoping"
+ @click="handleLock"></i>
+ <el-dialog title="璁剧疆閿佸睆瀵嗙爜"
+ :visible.sync="box"
+ width="30%"
+ append-to-body>
+ <el-form :model="form"
+ ref="form"
+ label-width="80px">
+ <el-form-item label="閿佸睆瀵嗙爜"
+ prop="passwd"
+ :rules="[{ required: true, message: '閿佸睆瀵嗙爜涓嶈兘涓虹┖'}]">
+ <el-input v-model="form.passwd"
+ placeholder="璇疯緭鍏ラ攣灞忓瘑鐮�" />
+ </el-form-item>
+ </el-form>
+ <span slot="footer"
+ class="dialog-footer">
+ <el-button type="primary"
+ @click="handleSetLock">纭� 瀹�</el-button>
+ </span>
+ </el-dialog>
+ </span>
+</template>
+
+<script>
+import { validatenull } from "@/util/validate";
+import { mapGetters } from "vuex";
+export default {
+ name: "top-lock",
+ data() {
+ return {
+ box: false,
+ form: {
+ passwd: ""
+ }
+ };
+ },
+ created() {},
+ mounted() {},
+ computed: {
+ ...mapGetters(["lockPasswd"])
+ },
+ props: [],
+ methods: {
+ handleSetLock() {
+ this.$refs["form"].validate(valid => {
+ if (valid) {
+ this.$store.commit("SET_LOCK_PASSWD", this.form.passwd);
+ this.handleLock();
+ }
+ });
+ },
+ handleLock() {
+ if (validatenull(this.lockPasswd)) {
+ this.box = true;
+ return;
+ }
+ this.$store.commit("SET_LOCK");
+ setTimeout(() => {
+ this.$router.push({ path: "/lock" });
+ }, 100);
+ }
+ },
+ components: {}
+};
+</script>
+
+<style lang="scss" scoped>
+</style>
--
Gitblit v1.10.0