From a1bde6dca09bac24a09023d177b2487cf22dd7fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=99=88=E7=BA=A2=E4=B8=BD?= <1181930680@qq.com> Date: Tue, 9 Jul 2024 18:34:42 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8=E6=88=B7=E7=AE=A1=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/system/user.ts | 17 +- src/components/ChinaArea/index.vue | 2 +- src/components/Upload/src/BasicUpload.vue | 2 +- src/views/system/user/edit.vue | 409 ++++++++-------------- src/views/system/user/index.vue | 42 ++- 5 files changed, 183 insertions(+), 289 deletions(-) diff --git a/src/api/system/user.ts b/src/api/system/user.ts index 8b5e06e..179cc70 100644 --- a/src/api/system/user.ts +++ b/src/api/system/user.ts @@ -116,6 +116,16 @@ export function userUpdate(data:any) { data }); } +/** + * @description: 重置密码 + */ +export function resetPwd(data:any) { + return http.request({ + url: '/user/resetPwd', + method: 'PUT', + data + }); +} /** * @description: 删除用户 */ @@ -147,12 +157,9 @@ export function userExport() { /** * @description: 城市列表 */ -export function getCityByList(params:any) { +export function getCityByList(pid:any) { return http.request({ - url: '/city/list', + url: '/city/getCityList/'+pid, method: 'get', - params:{ - ...params - } }); } \ No newline at end of file diff --git a/src/components/ChinaArea/index.vue b/src/components/ChinaArea/index.vue index 4ece9a4..579663c 100644 --- a/src/components/ChinaArea/index.vue +++ b/src/components/ChinaArea/index.vue @@ -36,7 +36,7 @@ const cascaderProps: CascaderProps = { } const getCityList= (pid:any, level:any, resolve:any)=> { - getCityByList({pid}).then(data => { + getCityByList(pid).then(data => { for (let i = 0; i < data.length; i++) { data[i].areaCode = parseInt(data[i].areaCode) data[i].hasChild = level >= props.type-1 ? true : false diff --git a/src/components/Upload/src/BasicUpload.vue b/src/components/Upload/src/BasicUpload.vue index 4dfdf52..bbd6261 100644 --- a/src/components/Upload/src/BasicUpload.vue +++ b/src/components/Upload/src/BasicUpload.vue @@ -176,7 +176,7 @@ //成功 if (code === ResultEnum.SUCCESS) { fileList.value = getResponseImgUrls(resFileList); - emit('uploadChange', fileList.value); + emit('uploadChange', res.data); } else { ElMessage({ message: msg, diff --git a/src/views/system/user/edit.vue b/src/views/system/user/edit.vue index a521235..68e4754 100644 --- a/src/views/system/user/edit.vue +++ b/src/views/system/user/edit.vue @@ -1,238 +1,108 @@