From 0dcce5161bc3fb5328882c32b91e1641a62a9d20 Mon Sep 17 00:00:00 2001 From: cwchen <1048842385@qq.com> Date: Tue, 30 Sep 2025 16:24:52 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E7=AE=A1=E7=90=86=E4=BF=AE?= =?UTF-8?q?=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/user.js | 4 +-- src/views/login.vue | 4 +-- src/views/system/user/config.js | 2 +- src/views/system/user/index.vue | 8 ++--- src/views/system/user/profile/index.vue | 37 ++++++++++++++++------ src/views/system/user/profile/resetPwd.vue | 4 +-- 6 files changed, 39 insertions(+), 20 deletions(-) diff --git a/src/api/system/user.js b/src/api/system/user.js index 162f7ae..620c09c 100644 --- a/src/api/system/user.js +++ b/src/api/system/user.js @@ -53,7 +53,7 @@ export function resetUserPwd(userId, password) { } return request({ url: '/smartArchives/system/user/resetPwd', - method: 'put', + method: 'post', data: data }) } @@ -96,7 +96,7 @@ export function updateUserPwd(oldPassword, newPassword) { } return request({ url: '/smartArchives/system/user/profile/updatePwd', - method: 'put', + method: 'post', data: data }) } diff --git a/src/views/login.vue b/src/views/login.vue index 5bf905d..744ed5d 100644 --- a/src/views/login.vue +++ b/src/views/login.vue @@ -76,8 +76,8 @@ export default { title: process.env.VUE_APP_TITLE, codeUrl: "", loginForm: { - username: "admin", - password: "admin123", + username: "", + password: "", rememberMe: false, code: "", uuid: "" diff --git a/src/views/system/user/config.js b/src/views/system/user/config.js index c7d64fc..c5cfd07 100644 --- a/src/views/system/user/config.js +++ b/src/views/system/user/config.js @@ -2,7 +2,7 @@ export const formLabel = [ { isShow: false, // 是否展示label f_type: 'ipt', - f_label: '用户名', + f_label: '用户账号', f_model: 'userName', f_max: 32, }, diff --git a/src/views/system/user/index.vue b/src/views/system/user/index.vue index d9b047a..82bb835 100644 --- a/src/views/system/user/index.vue +++ b/src/views/system/user/index.vue @@ -50,7 +50,8 @@ import Treeselect from "@riophae/vue-treeselect"; import "@riophae/vue-treeselect/dist/vue-treeselect.css"; import { listUser, - delUser + delUser, + resetUserPwd } from '@/api/system/user' import { getDeptSelectApi,getRoleSelectApi } from '@/api/select' import UserForm from './profile/userForm' @@ -89,7 +90,6 @@ export default { }); const item = this.formLabel.find(item => item.f_model === 'roleId'); await getRoleSelectApi().then(res => { - console.log(res.data) res.data.forEach(item => { item.label = item.name; item.value = item.id; @@ -174,11 +174,11 @@ export default { /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[^\w\d\s]).{8,20}$/, inputErrorMessage: '用户密码长度必须介于 8 和 20 之间,且包含大小写字母、数字和特殊字符', - inputValidator: (value) => { + /* inputValidator: (value) => { if (/<|>|"|'|\||\\/.test(value)) { return '不能包含非法字符:< > " \' \\\ |' } - }, + }, */ }) .then(({ value }) => { resetUserPwd(row.userId, value).then((response) => { diff --git a/src/views/system/user/profile/index.vue b/src/views/system/user/profile/index.vue index c070cd1..f289b22 100644 --- a/src/views/system/user/profile/index.vue +++ b/src/views/system/user/profile/index.vue @@ -7,25 +7,29 @@ 个人信息