From 993e659704781947b215788415aca24a1f0e9cef Mon Sep 17 00:00:00 2001 From: maochaoying <925670706@qq.com> Date: Tue, 5 Sep 2023 15:21:56 +0800 Subject: [PATCH] =?UTF-8?q?=E9=A3=8E=E6=9C=BA=E7=89=88=E6=9C=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .env | 8 ++++---- src/components/Setting/components/User.vue | 26 ++++++++++++++++++++++---- src/components/Test.vue | 2 +- src/components/dialogs/UserModal.vue | 9 ++++++++- src/mock/command.js | 26 ++++++++++++++++++++++++++ 5 files changed, 61 insertions(+), 10 deletions(-) diff --git a/.env b/.env index fe3f0dd..c4ae906 100644 --- a/.env +++ b/.env @@ -1,5 +1,5 @@ -VITE_BASE_WS1_URL=ws://192.168.8.10:19001/ -VITE_BASE_WS2_URL=ws://192.168.8.10:19002/ +# VITE_BASE_WS1_URL=ws://192.168.8.10:19001/ +# VITE_BASE_WS2_URL=ws://192.168.8.10:19002/ -# VITE_BASE_WS1_URL=ws://127.0.0.1:19001/ -# VITE_BASE_WS2_URL=ws://127.0.0.1:19002/ \ No newline at end of file +VITE_BASE_WS1_URL=ws://127.0.0.1:19001/ +VITE_BASE_WS2_URL=ws://127.0.0.1:19002/ \ No newline at end of file diff --git a/src/components/Setting/components/User.vue b/src/components/Setting/components/User.vue index e35872f..2d46137 100644 --- a/src/components/Setting/components/User.vue +++ b/src/components/Setting/components/User.vue @@ -86,7 +86,7 @@
删除用户 @@ -94,7 +94,7 @@
设为管理员
@@ -110,6 +110,7 @@
@@ -130,7 +131,12 @@ import SimpleKeyboard from 'cpns/SimpleKeyboard' import Eye from '@/assets/img/login/eye.png' import Open from '@/assets/img/login/open.png' import { useUserStore, useWebSocketStore } from '@/store' -import { chpasswdJSON } from '@/mock/command' +import { + chpasswdJSON, + updateUserPermissionLevelJSON, + delUserJSON, + addUserJson, +} from '@/mock/command' const showkeyboard = ref(false) const hideKeyBoard = () => { @@ -212,13 +218,25 @@ const addUserFormShow = () => { } const userWarnInfo = ref('') -const showUserModal = info => { +const currDelUserId = ref('') +const userModalFlag = ref(1) +const showUserModal = (info, uid, f) => { + userModalFlag.value = f userWarnInfo.value = info + currDelUserId.value = uid userModalVisible.value = true } const hideUserModal = () => { userModalVisible.value = false } + +const handleOk = () => { + if (userModalFlag.value == 1) { + // 删除 + } else { + // 修改 + } +}