diff --git a/.env.development b/.env.development index b34f073..a5b855b 100644 --- a/.env.development +++ b/.env.development @@ -1,8 +1,8 @@ # 页面标题 VITE_APP_TITLE = 后台基础框架 # 接口请求地址,会设置到 axios 的 baseURL 参数上 -# VITE_APP_API_BASEURL = http://111.198.10.15:11309 -VITE_APP_API_BASEURL = http://111.198.10.15:21409 +VITE_APP_API_BASEURL = http://111.198.10.15:11309 +# VITE_APP_API_BASEURL = http://111.198.10.15:21409 # 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空 VITE_APP_DEBUG_TOOL = diff --git a/.env.development b/.env.development index b34f073..a5b855b 100644 --- a/.env.development +++ b/.env.development @@ -1,8 +1,8 @@ # 页面标题 VITE_APP_TITLE = 后台基础框架 # 接口请求地址,会设置到 axios 的 baseURL 参数上 -# VITE_APP_API_BASEURL = http://111.198.10.15:11309 -VITE_APP_API_BASEURL = http://111.198.10.15:21409 +VITE_APP_API_BASEURL = http://111.198.10.15:11309 +# VITE_APP_API_BASEURL = http://111.198.10.15:21409 # 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空 VITE_APP_DEBUG_TOOL = diff --git a/src/api/system/log.ts b/src/api/system/log.ts index fb4a0e7..c42a358 100644 --- a/src/api/system/log.ts +++ b/src/api/system/log.ts @@ -4,7 +4,7 @@ import request from '../index' const prefix = 'sys' // 操作日志查询 -export function getBizLogList(params) { +export function getBizLogList(params: object) { return request({ url: `${prefix}/log/biz/list`, method: 'get', @@ -19,7 +19,7 @@ }) } // 异常日志查询 -export function getErrorLogList(params) { +export function getErrorLogList(params: object) { return request({ url: `${prefix}/log/error/list`, method: 'get', @@ -58,7 +58,7 @@ } // 登录日志查询 -export function getLoginLogList(params) { +export function getLoginLogList(params: object) { return request({ url: `${prefix}/loginLog/list`, method: 'get', diff --git a/.env.development b/.env.development index b34f073..a5b855b 100644 --- a/.env.development +++ b/.env.development @@ -1,8 +1,8 @@ # 页面标题 VITE_APP_TITLE = 后台基础框架 # 接口请求地址,会设置到 axios 的 baseURL 参数上 -# VITE_APP_API_BASEURL = http://111.198.10.15:11309 -VITE_APP_API_BASEURL = http://111.198.10.15:21409 +VITE_APP_API_BASEURL = http://111.198.10.15:11309 +# VITE_APP_API_BASEURL = http://111.198.10.15:21409 # 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空 VITE_APP_DEBUG_TOOL = diff --git a/src/api/system/log.ts b/src/api/system/log.ts index fb4a0e7..c42a358 100644 --- a/src/api/system/log.ts +++ b/src/api/system/log.ts @@ -4,7 +4,7 @@ import request from '../index' const prefix = 'sys' // 操作日志查询 -export function getBizLogList(params) { +export function getBizLogList(params: object) { return request({ url: `${prefix}/log/biz/list`, method: 'get', @@ -19,7 +19,7 @@ }) } // 异常日志查询 -export function getErrorLogList(params) { +export function getErrorLogList(params: object) { return request({ url: `${prefix}/log/error/list`, method: 'get', @@ -58,7 +58,7 @@ } // 登录日志查询 -export function getLoginLogList(params) { +export function getLoginLogList(params: object) { return request({ url: `${prefix}/loginLog/list`, method: 'get', 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/.env.development b/.env.development index b34f073..a5b855b 100644 --- a/.env.development +++ b/.env.development @@ -1,8 +1,8 @@ # 页面标题 VITE_APP_TITLE = 后台基础框架 # 接口请求地址,会设置到 axios 的 baseURL 参数上 -# VITE_APP_API_BASEURL = http://111.198.10.15:11309 -VITE_APP_API_BASEURL = http://111.198.10.15:21409 +VITE_APP_API_BASEURL = http://111.198.10.15:11309 +# VITE_APP_API_BASEURL = http://111.198.10.15:21409 # 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空 VITE_APP_DEBUG_TOOL = diff --git a/src/api/system/log.ts b/src/api/system/log.ts index fb4a0e7..c42a358 100644 --- a/src/api/system/log.ts +++ b/src/api/system/log.ts @@ -4,7 +4,7 @@ import request from '../index' const prefix = 'sys' // 操作日志查询 -export function getBizLogList(params) { +export function getBizLogList(params: object) { return request({ url: `${prefix}/log/biz/list`, method: 'get', @@ -19,7 +19,7 @@ }) } // 异常日志查询 -export function getErrorLogList(params) { +export function getErrorLogList(params: object) { return request({ url: `${prefix}/log/error/list`, method: 'get', @@ -58,7 +58,7 @@ } // 登录日志查询 -export function getLoginLogList(params) { +export function getLoginLogList(params: object) { return request({ url: `${prefix}/loginLog/list`, method: 'get', 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/axios.d.ts b/src/axios.d.ts new file mode 100644 index 0000000..482c4dd --- /dev/null +++ b/src/axios.d.ts @@ -0,0 +1,7 @@ +import * as axios from 'axios' + +declare module 'axios' { + interface AxiosInstance { + (config: AxiosRequestConfig): Promise + } +} diff --git a/.env.development b/.env.development index b34f073..a5b855b 100644 --- a/.env.development +++ b/.env.development @@ -1,8 +1,8 @@ # 页面标题 VITE_APP_TITLE = 后台基础框架 # 接口请求地址,会设置到 axios 的 baseURL 参数上 -# VITE_APP_API_BASEURL = http://111.198.10.15:11309 -VITE_APP_API_BASEURL = http://111.198.10.15:21409 +VITE_APP_API_BASEURL = http://111.198.10.15:11309 +# VITE_APP_API_BASEURL = http://111.198.10.15:21409 # 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空 VITE_APP_DEBUG_TOOL = diff --git a/src/api/system/log.ts b/src/api/system/log.ts index fb4a0e7..c42a358 100644 --- a/src/api/system/log.ts +++ b/src/api/system/log.ts @@ -4,7 +4,7 @@ import request from '../index' const prefix = 'sys' // 操作日志查询 -export function getBizLogList(params) { +export function getBizLogList(params: object) { return request({ url: `${prefix}/log/biz/list`, method: 'get', @@ -19,7 +19,7 @@ }) } // 异常日志查询 -export function getErrorLogList(params) { +export function getErrorLogList(params: object) { return request({ url: `${prefix}/log/error/list`, method: 'get', @@ -58,7 +58,7 @@ } // 登录日志查询 -export function getLoginLogList(params) { +export function getLoginLogList(params: object) { return request({ url: `${prefix}/loginLog/list`, method: 'get', 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/axios.d.ts b/src/axios.d.ts new file mode 100644 index 0000000..482c4dd --- /dev/null +++ b/src/axios.d.ts @@ -0,0 +1,7 @@ +import * as axios from 'axios' + +declare module 'axios' { + interface AxiosInstance { + (config: AxiosRequestConfig): Promise + } +} diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue index 8f42da1..f947a47 100644 --- a/src/components/NormalTable/index.vue +++ b/src/components/NormalTable/index.vue @@ -1,5 +1,6 @@ @@ -109,21 +115,19 @@ - + diff --git a/.env.development b/.env.development index b34f073..a5b855b 100644 --- a/.env.development +++ b/.env.development @@ -1,8 +1,8 @@ # 页面标题 VITE_APP_TITLE = 后台基础框架 # 接口请求地址,会设置到 axios 的 baseURL 参数上 -# VITE_APP_API_BASEURL = http://111.198.10.15:11309 -VITE_APP_API_BASEURL = http://111.198.10.15:21409 +VITE_APP_API_BASEURL = http://111.198.10.15:11309 +# VITE_APP_API_BASEURL = http://111.198.10.15:21409 # 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空 VITE_APP_DEBUG_TOOL = diff --git a/src/api/system/log.ts b/src/api/system/log.ts index fb4a0e7..c42a358 100644 --- a/src/api/system/log.ts +++ b/src/api/system/log.ts @@ -4,7 +4,7 @@ import request from '../index' const prefix = 'sys' // 操作日志查询 -export function getBizLogList(params) { +export function getBizLogList(params: object) { return request({ url: `${prefix}/log/biz/list`, method: 'get', @@ -19,7 +19,7 @@ }) } // 异常日志查询 -export function getErrorLogList(params) { +export function getErrorLogList(params: object) { return request({ url: `${prefix}/log/error/list`, method: 'get', @@ -58,7 +58,7 @@ } // 登录日志查询 -export function getLoginLogList(params) { +export function getLoginLogList(params: object) { return request({ url: `${prefix}/loginLog/list`, method: 'get', 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/axios.d.ts b/src/axios.d.ts new file mode 100644 index 0000000..482c4dd --- /dev/null +++ b/src/axios.d.ts @@ -0,0 +1,7 @@ +import * as axios from 'axios' + +declare module 'axios' { + interface AxiosInstance { + (config: AxiosRequestConfig): Promise + } +} diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue index 8f42da1..f947a47 100644 --- a/src/components/NormalTable/index.vue +++ b/src/components/NormalTable/index.vue @@ -1,5 +1,6 @@ @@ -109,21 +115,19 @@ - + diff --git a/src/views/system/tenant/relateDept.vue b/src/views/system/tenant/relateDept.vue index d02c474..458d7ee 100644 --- a/src/views/system/tenant/relateDept.vue +++ b/src/views/system/tenant/relateDept.vue @@ -9,7 +9,7 @@ const dialogFormVisible = ref(false) // 对话框显示隐藏 const deptShowTop = ref(false) // 表单内容 -const dataForm = reactive({ +let dataForm = reactive({ tenantId: '', deptId: '', }) diff --git a/.env.development b/.env.development index b34f073..a5b855b 100644 --- a/.env.development +++ b/.env.development @@ -1,8 +1,8 @@ # 页面标题 VITE_APP_TITLE = 后台基础框架 # 接口请求地址,会设置到 axios 的 baseURL 参数上 -# VITE_APP_API_BASEURL = http://111.198.10.15:11309 -VITE_APP_API_BASEURL = http://111.198.10.15:21409 +VITE_APP_API_BASEURL = http://111.198.10.15:11309 +# VITE_APP_API_BASEURL = http://111.198.10.15:21409 # 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空 VITE_APP_DEBUG_TOOL = diff --git a/src/api/system/log.ts b/src/api/system/log.ts index fb4a0e7..c42a358 100644 --- a/src/api/system/log.ts +++ b/src/api/system/log.ts @@ -4,7 +4,7 @@ import request from '../index' const prefix = 'sys' // 操作日志查询 -export function getBizLogList(params) { +export function getBizLogList(params: object) { return request({ url: `${prefix}/log/biz/list`, method: 'get', @@ -19,7 +19,7 @@ }) } // 异常日志查询 -export function getErrorLogList(params) { +export function getErrorLogList(params: object) { return request({ url: `${prefix}/log/error/list`, method: 'get', @@ -58,7 +58,7 @@ } // 登录日志查询 -export function getLoginLogList(params) { +export function getLoginLogList(params: object) { return request({ url: `${prefix}/loginLog/list`, method: 'get', 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/axios.d.ts b/src/axios.d.ts new file mode 100644 index 0000000..482c4dd --- /dev/null +++ b/src/axios.d.ts @@ -0,0 +1,7 @@ +import * as axios from 'axios' + +declare module 'axios' { + interface AxiosInstance { + (config: AxiosRequestConfig): Promise + } +} diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue index 8f42da1..f947a47 100644 --- a/src/components/NormalTable/index.vue +++ b/src/components/NormalTable/index.vue @@ -1,5 +1,6 @@ @@ -109,21 +115,19 @@ - + diff --git a/src/views/system/tenant/relateDept.vue b/src/views/system/tenant/relateDept.vue index d02c474..458d7ee 100644 --- a/src/views/system/tenant/relateDept.vue +++ b/src/views/system/tenant/relateDept.vue @@ -9,7 +9,7 @@ const dialogFormVisible = ref(false) // 对话框显示隐藏 const deptShowTop = ref(false) // 表单内容 -const dataForm = reactive({ +let dataForm = reactive({ tenantId: '', deptId: '', }) diff --git a/src/views/system/tenant/tenant_interface.ts b/src/views/system/tenant/tenant_interface.ts index d13898d..2450883 100644 --- a/src/views/system/tenant/tenant_interface.ts +++ b/src/views/system/tenant/tenant_interface.ts @@ -5,11 +5,12 @@ order: string } export interface IdeviceForm { - id: string // 主键 + id?: string // 主键 tenantCode: string // 项目编码 tenantName: string // 项目名称 linkPerson: string // 联系人 tel: string // 联系电话 clearday: string // 清除时间 + deptName?: string } diff --git a/.env.development b/.env.development index b34f073..a5b855b 100644 --- a/.env.development +++ b/.env.development @@ -1,8 +1,8 @@ # 页面标题 VITE_APP_TITLE = 后台基础框架 # 接口请求地址,会设置到 axios 的 baseURL 参数上 -# VITE_APP_API_BASEURL = http://111.198.10.15:11309 -VITE_APP_API_BASEURL = http://111.198.10.15:21409 +VITE_APP_API_BASEURL = http://111.198.10.15:11309 +# VITE_APP_API_BASEURL = http://111.198.10.15:21409 # 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空 VITE_APP_DEBUG_TOOL = diff --git a/src/api/system/log.ts b/src/api/system/log.ts index fb4a0e7..c42a358 100644 --- a/src/api/system/log.ts +++ b/src/api/system/log.ts @@ -4,7 +4,7 @@ import request from '../index' const prefix = 'sys' // 操作日志查询 -export function getBizLogList(params) { +export function getBizLogList(params: object) { return request({ url: `${prefix}/log/biz/list`, method: 'get', @@ -19,7 +19,7 @@ }) } // 异常日志查询 -export function getErrorLogList(params) { +export function getErrorLogList(params: object) { return request({ url: `${prefix}/log/error/list`, method: 'get', @@ -58,7 +58,7 @@ } // 登录日志查询 -export function getLoginLogList(params) { +export function getLoginLogList(params: object) { return request({ url: `${prefix}/loginLog/list`, method: 'get', 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/axios.d.ts b/src/axios.d.ts new file mode 100644 index 0000000..482c4dd --- /dev/null +++ b/src/axios.d.ts @@ -0,0 +1,7 @@ +import * as axios from 'axios' + +declare module 'axios' { + interface AxiosInstance { + (config: AxiosRequestConfig): Promise + } +} diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue index 8f42da1..f947a47 100644 --- a/src/components/NormalTable/index.vue +++ b/src/components/NormalTable/index.vue @@ -1,5 +1,6 @@ @@ -109,21 +115,19 @@ - + diff --git a/src/views/system/tenant/relateDept.vue b/src/views/system/tenant/relateDept.vue index d02c474..458d7ee 100644 --- a/src/views/system/tenant/relateDept.vue +++ b/src/views/system/tenant/relateDept.vue @@ -9,7 +9,7 @@ const dialogFormVisible = ref(false) // 对话框显示隐藏 const deptShowTop = ref(false) // 表单内容 -const dataForm = reactive({ +let dataForm = reactive({ tenantId: '', deptId: '', }) diff --git a/src/views/system/tenant/tenant_interface.ts b/src/views/system/tenant/tenant_interface.ts index d13898d..2450883 100644 --- a/src/views/system/tenant/tenant_interface.ts +++ b/src/views/system/tenant/tenant_interface.ts @@ -5,11 +5,12 @@ order: string } export interface IdeviceForm { - id: string // 主键 + id?: string // 主键 tenantCode: string // 项目编码 tenantName: string // 项目名称 linkPerson: string // 联系人 tel: string // 联系电话 clearday: string // 清除时间 + deptName?: string } 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 @@ @@ -109,21 +115,19 @@ - + diff --git a/src/views/system/tenant/relateDept.vue b/src/views/system/tenant/relateDept.vue index d02c474..458d7ee 100644 --- a/src/views/system/tenant/relateDept.vue +++ b/src/views/system/tenant/relateDept.vue @@ -9,7 +9,7 @@ const dialogFormVisible = ref(false) // 对话框显示隐藏 const deptShowTop = ref(false) // 表单内容 -const dataForm = reactive({ +let dataForm = reactive({ tenantId: '', deptId: '', }) diff --git a/src/views/system/tenant/tenant_interface.ts b/src/views/system/tenant/tenant_interface.ts index d13898d..2450883 100644 --- a/src/views/system/tenant/tenant_interface.ts +++ b/src/views/system/tenant/tenant_interface.ts @@ -5,11 +5,12 @@ order: string } export interface IdeviceForm { - id: string // 主键 + id?: string // 主键 tenantCode: string // 项目编码 tenantName: string // 项目名称 linkPerson: string // 联系人 tel: string // 联系电话 clearday: string // 清除时间 + deptName?: string } 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/.env.development b/.env.development index b34f073..a5b855b 100644 --- a/.env.development +++ b/.env.development @@ -1,8 +1,8 @@ # 页面标题 VITE_APP_TITLE = 后台基础框架 # 接口请求地址,会设置到 axios 的 baseURL 参数上 -# VITE_APP_API_BASEURL = http://111.198.10.15:11309 -VITE_APP_API_BASEURL = http://111.198.10.15:21409 +VITE_APP_API_BASEURL = http://111.198.10.15:11309 +# VITE_APP_API_BASEURL = http://111.198.10.15:21409 # 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空 VITE_APP_DEBUG_TOOL = diff --git a/src/api/system/log.ts b/src/api/system/log.ts index fb4a0e7..c42a358 100644 --- a/src/api/system/log.ts +++ b/src/api/system/log.ts @@ -4,7 +4,7 @@ import request from '../index' const prefix = 'sys' // 操作日志查询 -export function getBizLogList(params) { +export function getBizLogList(params: object) { return request({ url: `${prefix}/log/biz/list`, method: 'get', @@ -19,7 +19,7 @@ }) } // 异常日志查询 -export function getErrorLogList(params) { +export function getErrorLogList(params: object) { return request({ url: `${prefix}/log/error/list`, method: 'get', @@ -58,7 +58,7 @@ } // 登录日志查询 -export function getLoginLogList(params) { +export function getLoginLogList(params: object) { return request({ url: `${prefix}/loginLog/list`, method: 'get', 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/axios.d.ts b/src/axios.d.ts new file mode 100644 index 0000000..482c4dd --- /dev/null +++ b/src/axios.d.ts @@ -0,0 +1,7 @@ +import * as axios from 'axios' + +declare module 'axios' { + interface AxiosInstance { + (config: AxiosRequestConfig): Promise + } +} diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue index 8f42da1..f947a47 100644 --- a/src/components/NormalTable/index.vue +++ b/src/components/NormalTable/index.vue @@ -1,5 +1,6 @@ @@ -109,21 +115,19 @@ - + diff --git a/src/views/system/tenant/relateDept.vue b/src/views/system/tenant/relateDept.vue index d02c474..458d7ee 100644 --- a/src/views/system/tenant/relateDept.vue +++ b/src/views/system/tenant/relateDept.vue @@ -9,7 +9,7 @@ const dialogFormVisible = ref(false) // 对话框显示隐藏 const deptShowTop = ref(false) // 表单内容 -const dataForm = reactive({ +let dataForm = reactive({ tenantId: '', deptId: '', }) diff --git a/src/views/system/tenant/tenant_interface.ts b/src/views/system/tenant/tenant_interface.ts index d13898d..2450883 100644 --- a/src/views/system/tenant/tenant_interface.ts +++ b/src/views/system/tenant/tenant_interface.ts @@ -5,11 +5,12 @@ order: string } export interface IdeviceForm { - id: string // 主键 + id?: string // 主键 tenantCode: string // 项目编码 tenantName: string // 项目名称 linkPerson: string // 联系人 tel: string // 联系电话 clearday: string // 清除时间 + deptName?: string } 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/.env.development b/.env.development index b34f073..a5b855b 100644 --- a/.env.development +++ b/.env.development @@ -1,8 +1,8 @@ # 页面标题 VITE_APP_TITLE = 后台基础框架 # 接口请求地址,会设置到 axios 的 baseURL 参数上 -# VITE_APP_API_BASEURL = http://111.198.10.15:11309 -VITE_APP_API_BASEURL = http://111.198.10.15:21409 +VITE_APP_API_BASEURL = http://111.198.10.15:11309 +# VITE_APP_API_BASEURL = http://111.198.10.15:21409 # 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空 VITE_APP_DEBUG_TOOL = diff --git a/src/api/system/log.ts b/src/api/system/log.ts index fb4a0e7..c42a358 100644 --- a/src/api/system/log.ts +++ b/src/api/system/log.ts @@ -4,7 +4,7 @@ import request from '../index' const prefix = 'sys' // 操作日志查询 -export function getBizLogList(params) { +export function getBizLogList(params: object) { return request({ url: `${prefix}/log/biz/list`, method: 'get', @@ -19,7 +19,7 @@ }) } // 异常日志查询 -export function getErrorLogList(params) { +export function getErrorLogList(params: object) { return request({ url: `${prefix}/log/error/list`, method: 'get', @@ -58,7 +58,7 @@ } // 登录日志查询 -export function getLoginLogList(params) { +export function getLoginLogList(params: object) { return request({ url: `${prefix}/loginLog/list`, method: 'get', 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/axios.d.ts b/src/axios.d.ts new file mode 100644 index 0000000..482c4dd --- /dev/null +++ b/src/axios.d.ts @@ -0,0 +1,7 @@ +import * as axios from 'axios' + +declare module 'axios' { + interface AxiosInstance { + (config: AxiosRequestConfig): Promise + } +} diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue index 8f42da1..f947a47 100644 --- a/src/components/NormalTable/index.vue +++ b/src/components/NormalTable/index.vue @@ -1,5 +1,6 @@ @@ -109,21 +115,19 @@ - + diff --git a/src/views/system/tenant/relateDept.vue b/src/views/system/tenant/relateDept.vue index d02c474..458d7ee 100644 --- a/src/views/system/tenant/relateDept.vue +++ b/src/views/system/tenant/relateDept.vue @@ -9,7 +9,7 @@ const dialogFormVisible = ref(false) // 对话框显示隐藏 const deptShowTop = ref(false) // 表单内容 -const dataForm = reactive({ +let dataForm = reactive({ tenantId: '', deptId: '', }) diff --git a/src/views/system/tenant/tenant_interface.ts b/src/views/system/tenant/tenant_interface.ts index d13898d..2450883 100644 --- a/src/views/system/tenant/tenant_interface.ts +++ b/src/views/system/tenant/tenant_interface.ts @@ -5,11 +5,12 @@ order: string } export interface IdeviceForm { - id: string // 主键 + id?: string // 主键 tenantCode: string // 项目编码 tenantName: string // 项目名称 linkPerson: string // 联系人 tel: string // 联系电话 clearday: string // 清除时间 + deptName?: string } 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/.env.development b/.env.development index b34f073..a5b855b 100644 --- a/.env.development +++ b/.env.development @@ -1,8 +1,8 @@ # 页面标题 VITE_APP_TITLE = 后台基础框架 # 接口请求地址,会设置到 axios 的 baseURL 参数上 -# VITE_APP_API_BASEURL = http://111.198.10.15:11309 -VITE_APP_API_BASEURL = http://111.198.10.15:21409 +VITE_APP_API_BASEURL = http://111.198.10.15:11309 +# VITE_APP_API_BASEURL = http://111.198.10.15:21409 # 调试工具,可设置 eruda 或 vconsole,如果不需要开启则留空 VITE_APP_DEBUG_TOOL = diff --git a/src/api/system/log.ts b/src/api/system/log.ts index fb4a0e7..c42a358 100644 --- a/src/api/system/log.ts +++ b/src/api/system/log.ts @@ -4,7 +4,7 @@ import request from '../index' const prefix = 'sys' // 操作日志查询 -export function getBizLogList(params) { +export function getBizLogList(params: object) { return request({ url: `${prefix}/log/biz/list`, method: 'get', @@ -19,7 +19,7 @@ }) } // 异常日志查询 -export function getErrorLogList(params) { +export function getErrorLogList(params: object) { return request({ url: `${prefix}/log/error/list`, method: 'get', @@ -58,7 +58,7 @@ } // 登录日志查询 -export function getLoginLogList(params) { +export function getLoginLogList(params: object) { return request({ url: `${prefix}/loginLog/list`, method: 'get', 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/axios.d.ts b/src/axios.d.ts new file mode 100644 index 0000000..482c4dd --- /dev/null +++ b/src/axios.d.ts @@ -0,0 +1,7 @@ +import * as axios from 'axios' + +declare module 'axios' { + interface AxiosInstance { + (config: AxiosRequestConfig): Promise + } +} diff --git a/src/components/NormalTable/index.vue b/src/components/NormalTable/index.vue index 8f42da1..f947a47 100644 --- a/src/components/NormalTable/index.vue +++ b/src/components/NormalTable/index.vue @@ -1,5 +1,6 @@ @@ -109,21 +115,19 @@ - + diff --git a/src/views/system/tenant/relateDept.vue b/src/views/system/tenant/relateDept.vue index d02c474..458d7ee 100644 --- a/src/views/system/tenant/relateDept.vue +++ b/src/views/system/tenant/relateDept.vue @@ -9,7 +9,7 @@ const dialogFormVisible = ref(false) // 对话框显示隐藏 const deptShowTop = ref(false) // 表单内容 -const dataForm = reactive({ +let dataForm = reactive({ tenantId: '', deptId: '', }) diff --git a/src/views/system/tenant/tenant_interface.ts b/src/views/system/tenant/tenant_interface.ts index d13898d..2450883 100644 --- a/src/views/system/tenant/tenant_interface.ts +++ b/src/views/system/tenant/tenant_interface.ts @@ -5,11 +5,12 @@ order: string } export interface IdeviceForm { - id: string // 主键 + id?: string // 主键 tenantCode: string // 项目编码 tenantName: string // 项目名称 linkPerson: string // 联系人 tel: string // 联系电话 clearday: string // 清除时间 + deptName?: string } 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 +}