From 8e92b62c5cbaf3ee1f01fad1e272649ed747336d Mon Sep 17 00:00:00 2001 From: easy <1358086367@qq.com> Date: Fri, 10 Mar 2023 14:12:28 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E7=94=A8=E6=88=B7=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E8=87=AA=E6=B5=8B=E5=8F=8A=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/account/center.ts | 4 +- src/api/system/user.ts | 4 +- .../system/Department/components/LeftTree.vue | 18 ++++---- .../system/User/components/EditUserDialog.vue | 41 ++++++++++--------- src/views/system/User/index.vue | 22 +++++----- 5 files changed, 43 insertions(+), 46 deletions(-) diff --git a/src/api/account/center.ts b/src/api/account/center.ts index 4946c123..2d86af80 100644 --- a/src/api/account/center.ts +++ b/src/api/account/center.ts @@ -15,7 +15,7 @@ export const unBind_api = (appId: string) => server.post(`/application/sso/${app * @param type 类型 * @param name 值 */ -export const validateField_api = (type: 'username' | 'password', name: string) => server.post(`/user/${type}/_validate`,name,{ +export const validateField_api = (type: 'username' | 'password', name: string) => server.post(`/user/${type}/_validate`,name,{},{ headers: { 'Content-Type': 'text/plain' } @@ -24,7 +24,7 @@ export const validateField_api = (type: 'username' | 'password', name: string) * 校验旧密码是否正确 * @param password 旧密码 */ -export const checkOldPassword_api = (password:string) => server.post(`/user/me/password/_validate`,password,{ +export const checkOldPassword_api = (password:string) => server.post(`/user/me/password/_validate`,password,{},{ headers: { 'Content-Type': 'text/plain' } diff --git a/src/api/system/user.ts b/src/api/system/user.ts index 68c690ac..9b6a01c3 100644 --- a/src/api/system/user.ts +++ b/src/api/system/user.ts @@ -7,7 +7,7 @@ export const getUserType_api = () => server.get(`/user/detail/types`); export const getUserList_api = (data: object) => server.post(`/user/detail/_query`, data); // 校验字段合法性 -export const validateField_api = (type: 'username' | 'password', name: string) => server.post(`/user/${type}/_validate`, name, { +export const validateField_api = (type: 'username' | 'password', name: string) => server.post(`/user/${type}/_validate`, name,{}, { headers: { 'Content-Type': 'text/plain' } @@ -25,7 +25,7 @@ export const addUser_api = (data: object) => server.post(`/user/detail/_create`, // 更新用户 export const updateUser_api = (data: any) => server.put(`/user/detail/${data.id}/_update`, data); // 更新密码 -export const updatePassword_api = (data: { id: string, password: string }) => server.post(`/user/${data.id}/password/_reset`, data.password, { +export const updatePassword_api = (data: { id: string, password: string }) => server.post(`/user/${data.id}/password/_reset`, data.password,{}, { headers: { 'Content-Type': 'text/plain' } diff --git a/src/views/system/Department/components/LeftTree.vue b/src/views/system/Department/components/LeftTree.vue index bdc1dd9b..d7840c4d 100644 --- a/src/views/system/Department/components/LeftTree.vue +++ b/src/views/system/Department/components/LeftTree.vue @@ -14,7 +14,7 @@ 新增 @@ -31,7 +31,7 @@ {{ name }} @@ -91,7 +85,6 @@ - @@ -104,9 +97,8 @@ > @@ -128,9 +120,10 @@ @@ -235,7 +228,6 @@ const form = reactive({ rules: { checkUserName: (_rule: Rule, value: string): Promise => new Promise((resolve, reject) => { - console.log(_rule); if (props.type === 'edit') return resolve(''); if (!value) return reject('请输入用户名'); @@ -248,7 +240,7 @@ const form = reactive({ }), checkPassword: (_rule: Rule, value: string): Promise => new Promise((resolve, reject) => { - if (!value) return reject('请输入8~64位的密码'); + if (!value) return reject('请输入密码'); else if (value.length > 64) return reject('最多可输入64个字符'); else if (value.length < 8) return reject('密码不能少于8位'); validateField_api('password', value).then((resp: any) => { @@ -258,7 +250,7 @@ const form = reactive({ }); }), checkAgainPassword: (_rule: Rule, value: string): Promise => { - if (!value) return Promise.reject(''); + if (!value) return Promise.reject('请输入8~64位的密码'); return value === form.data.password ? Promise.resolve() : Promise.reject('两次密码输入不一致'); @@ -386,6 +378,15 @@ type optionType = { .ant-select { flex: 1; } + .ant-tooltip-disabled-compatible-wrapper { + .ant-btn { + color: rgba(0, 0, 0, 0.25); + border-color: #d9d9d9; + background: #f5f5f5; + text-shadow: none; + box-shadow: none; + } + } .ant-btn { width: 32px; height: 32px; diff --git a/src/views/system/User/index.vue b/src/views/system/User/index.vue index d9170f59..5aeb5edb 100644 --- a/src/views/system/User/index.vue +++ b/src/views/system/User/index.vue @@ -1,7 +1,10 @@