diff --git a/src/api/system/user.ts b/src/api/system/user.ts index 321cb97..dac3b84 100644 --- a/src/api/system/user.ts +++ b/src/api/system/user.ts @@ -1,4 +1,5 @@ import request from '../index' +import qs from 'qs' const prefix = 'sys/' // 修改密码 export function changePwd(data: { oldPwd: string; newPwd: string }) { @@ -48,7 +49,7 @@ } // 重置用户密码 -export function resetPwd(data: object) { +export function resetPwdApi(data: object) { return request({ url: 'sys/mgr/reset', method: 'post', @@ -57,16 +58,14 @@ } // 分配角色 -// export function roleAssign(userId: string, ids: string[]) { -// return request({ -// url: 'sys/mgr/roleAssign', -// method: 'post', -// data: { -// userId: userId, -// roleIds: ids -// }, -// // paramsSerializer: params => { -// // return qs.stringify(params, { indices: false }) -// // } -// }) -// } +export function roleAssign(userId: string, ids: string[]) { + return request({ + url: 'sys/mgr/roleAssign', + method: 'post', + data: { + userId: userId, + roleIds: ids + }, + // paramsSerializer: (params) => qs.stringify(params, { indices: false }) + }) +} diff --git a/src/api/system/user.ts b/src/api/system/user.ts index 321cb97..dac3b84 100644 --- a/src/api/system/user.ts +++ b/src/api/system/user.ts @@ -1,4 +1,5 @@ import request from '../index' +import qs from 'qs' const prefix = 'sys/' // 修改密码 export function changePwd(data: { oldPwd: string; newPwd: string }) { @@ -48,7 +49,7 @@ } // 重置用户密码 -export function resetPwd(data: object) { +export function resetPwdApi(data: object) { return request({ url: 'sys/mgr/reset', method: 'post', @@ -57,16 +58,14 @@ } // 分配角色 -// export function roleAssign(userId: string, ids: string[]) { -// return request({ -// url: 'sys/mgr/roleAssign', -// method: 'post', -// data: { -// userId: userId, -// roleIds: ids -// }, -// // paramsSerializer: params => { -// // return qs.stringify(params, { indices: false }) -// // } -// }) -// } +export function roleAssign(userId: string, ids: string[]) { + return request({ + url: 'sys/mgr/roleAssign', + method: 'post', + data: { + userId: userId, + roleIds: ids + }, + // paramsSerializer: (params) => qs.stringify(params, { indices: false }) + }) +} diff --git a/src/views/system/user/list.user.vue b/src/views/system/user/list.user.vue index f2875d2..3c8639a 100644 --- a/src/views/system/user/list.user.vue +++ b/src/views/system/user/list.user.vue @@ -1,9 +1,13 @@ + + diff --git a/src/api/system/user.ts b/src/api/system/user.ts index 321cb97..dac3b84 100644 --- a/src/api/system/user.ts +++ b/src/api/system/user.ts @@ -1,4 +1,5 @@ import request from '../index' +import qs from 'qs' const prefix = 'sys/' // 修改密码 export function changePwd(data: { oldPwd: string; newPwd: string }) { @@ -48,7 +49,7 @@ } // 重置用户密码 -export function resetPwd(data: object) { +export function resetPwdApi(data: object) { return request({ url: 'sys/mgr/reset', method: 'post', @@ -57,16 +58,14 @@ } // 分配角色 -// export function roleAssign(userId: string, ids: string[]) { -// return request({ -// url: 'sys/mgr/roleAssign', -// method: 'post', -// data: { -// userId: userId, -// roleIds: ids -// }, -// // paramsSerializer: params => { -// // return qs.stringify(params, { indices: false }) -// // } -// }) -// } +export function roleAssign(userId: string, ids: string[]) { + return request({ + url: 'sys/mgr/roleAssign', + method: 'post', + data: { + userId: userId, + roleIds: ids + }, + // paramsSerializer: (params) => qs.stringify(params, { indices: false }) + }) +} diff --git a/src/views/system/user/list.user.vue b/src/views/system/user/list.user.vue index f2875d2..3c8639a 100644 --- a/src/views/system/user/list.user.vue +++ b/src/views/system/user/list.user.vue @@ -1,9 +1,13 @@ + + diff --git a/src/views/system/user/select.tree.vue b/src/views/system/user/select.tree.vue new file mode 100644 index 0000000..9d0e751 --- /dev/null +++ b/src/views/system/user/select.tree.vue @@ -0,0 +1,183 @@ + + + + + + + + + diff --git a/src/api/system/user.ts b/src/api/system/user.ts index 321cb97..dac3b84 100644 --- a/src/api/system/user.ts +++ b/src/api/system/user.ts @@ -1,4 +1,5 @@ import request from '../index' +import qs from 'qs' const prefix = 'sys/' // 修改密码 export function changePwd(data: { oldPwd: string; newPwd: string }) { @@ -48,7 +49,7 @@ } // 重置用户密码 -export function resetPwd(data: object) { +export function resetPwdApi(data: object) { return request({ url: 'sys/mgr/reset', method: 'post', @@ -57,16 +58,14 @@ } // 分配角色 -// export function roleAssign(userId: string, ids: string[]) { -// return request({ -// url: 'sys/mgr/roleAssign', -// method: 'post', -// data: { -// userId: userId, -// roleIds: ids -// }, -// // paramsSerializer: params => { -// // return qs.stringify(params, { indices: false }) -// // } -// }) -// } +export function roleAssign(userId: string, ids: string[]) { + return request({ + url: 'sys/mgr/roleAssign', + method: 'post', + data: { + userId: userId, + roleIds: ids + }, + // paramsSerializer: (params) => qs.stringify(params, { indices: false }) + }) +} diff --git a/src/views/system/user/list.user.vue b/src/views/system/user/list.user.vue index f2875d2..3c8639a 100644 --- a/src/views/system/user/list.user.vue +++ b/src/views/system/user/list.user.vue @@ -1,9 +1,13 @@ + + diff --git a/src/views/system/user/select.tree.vue b/src/views/system/user/select.tree.vue new file mode 100644 index 0000000..9d0e751 --- /dev/null +++ b/src/views/system/user/select.tree.vue @@ -0,0 +1,183 @@ + + + + + + + + + diff --git a/src/views/system/user/user.add.vue b/src/views/system/user/user.add.vue index 9df400d..10b37e6 100644 --- a/src/views/system/user/user.add.vue +++ b/src/views/system/user/user.add.vue @@ -1,7 +1,14 @@ + diff --git a/src/api/system/user.ts b/src/api/system/user.ts index 321cb97..dac3b84 100644 --- a/src/api/system/user.ts +++ b/src/api/system/user.ts @@ -1,4 +1,5 @@ import request from '../index' +import qs from 'qs' const prefix = 'sys/' // 修改密码 export function changePwd(data: { oldPwd: string; newPwd: string }) { @@ -48,7 +49,7 @@ } // 重置用户密码 -export function resetPwd(data: object) { +export function resetPwdApi(data: object) { return request({ url: 'sys/mgr/reset', method: 'post', @@ -57,16 +58,14 @@ } // 分配角色 -// export function roleAssign(userId: string, ids: string[]) { -// return request({ -// url: 'sys/mgr/roleAssign', -// method: 'post', -// data: { -// userId: userId, -// roleIds: ids -// }, -// // paramsSerializer: params => { -// // return qs.stringify(params, { indices: false }) -// // } -// }) -// } +export function roleAssign(userId: string, ids: string[]) { + return request({ + url: 'sys/mgr/roleAssign', + method: 'post', + data: { + userId: userId, + roleIds: ids + }, + // paramsSerializer: (params) => qs.stringify(params, { indices: false }) + }) +} diff --git a/src/views/system/user/list.user.vue b/src/views/system/user/list.user.vue index f2875d2..3c8639a 100644 --- a/src/views/system/user/list.user.vue +++ b/src/views/system/user/list.user.vue @@ -1,9 +1,13 @@ + + diff --git a/src/views/system/user/select.tree.vue b/src/views/system/user/select.tree.vue new file mode 100644 index 0000000..9d0e751 --- /dev/null +++ b/src/views/system/user/select.tree.vue @@ -0,0 +1,183 @@ + + + + + + + + + diff --git a/src/views/system/user/user.add.vue b/src/views/system/user/user.add.vue index 9df400d..10b37e6 100644 --- a/src/views/system/user/user.add.vue +++ b/src/views/system/user/user.add.vue @@ -1,7 +1,14 @@ + diff --git a/src/views/system/user/user_interface.ts b/src/views/system/user/user_interface.ts index b312d97..e27a855 100644 --- a/src/views/system/user/user_interface.ts +++ b/src/views/system/user/user_interface.ts @@ -60,3 +60,7 @@ version: string } +export interface changePageType { + page?: number + size?: number +}