diff --git a/src/api/system/dict/data/types.ts b/src/api/system/dict/data/types.ts index a57b017..e4abb9b 100644 --- a/src/api/system/dict/data/types.ts +++ b/src/api/system/dict/data/types.ts @@ -1,7 +1,6 @@ export interface DictDataQuery extends PageQuery { dictName: string; dictType: string; - status: string; dictLabel: string; } @@ -12,7 +11,6 @@ export interface DictDataVO extends BaseEntity { cssClass: string; listClass: ElTagType; dictSort: number; - status: string; remark: string; } @@ -24,6 +22,5 @@ export interface DictDataForm { cssClass: string; listClass: ElTagType; dictSort: number; - status: string; remark: string; } diff --git a/src/api/system/dict/type/types.ts b/src/api/system/dict/type/types.ts index 9e52ac6..4987dbf 100644 --- a/src/api/system/dict/type/types.ts +++ b/src/api/system/dict/type/types.ts @@ -2,7 +2,6 @@ export interface DictTypeVO extends BaseEntity { dictId: number | string; dictName: string; dictType: string; - status: string; remark: string; } @@ -10,12 +9,10 @@ export interface DictTypeForm { dictId: number | string | undefined; dictName: string; dictType: string; - status: string; remark: string; } export interface DictTypeQuery extends PageQuery { dictName: string; dictType: string; - status: string; } diff --git a/src/api/system/user/index.ts b/src/api/system/user/index.ts index 21325c3..f00a0e3 100644 --- a/src/api/system/user/index.ts +++ b/src/api/system/user/index.ts @@ -169,6 +169,17 @@ export const updateAuthRole = (data: { userId: string; roleIds: string }) => { }); }; +/** + * 查询当前部门的所有用户信息 + * @param deptId + */ +export const listUserByDeptId = (deptId: string | number): AxiosPromise => { + return request({ + url: "/system/user/list/dept/" + deptId, + method: "get" + }); +}; + /** * 查询部门下拉树结构 */ @@ -193,5 +204,6 @@ export default { uploadAvatar, getAuthRole, updateAuthRole, - deptTreeSelect + deptTreeSelect, + listUserByDeptId }; diff --git a/src/components/Editor/index.vue b/src/components/Editor/index.vue index 9c61f3b..6aef16b 100644 --- a/src/components/Editor/index.vue +++ b/src/components/Editor/index.vue @@ -50,7 +50,7 @@ const props = defineProps({ const { proxy } = getCurrentInstance() as ComponentInternalInstance; const upload = reactive({ - headers: globalHeaders, + headers: globalHeaders(), url: import.meta.env.VITE_APP_BASE_API + '/resource/oss/upload' }) const myQuillEditor = ref(); diff --git a/src/components/FileUpload/index.vue b/src/components/FileUpload/index.vue index 260f43c..be99ac0 100644 --- a/src/components/FileUpload/index.vue +++ b/src/components/FileUpload/index.vue @@ -66,7 +66,7 @@ const uploadList = ref([]); const baseUrl = import.meta.env.VITE_APP_BASE_API; const uploadFileUrl = ref(baseUrl + "/resource/oss/upload"); // 上传文件服务器地址 -const headers = ref(globalHeaders); +const headers = ref(globalHeaders()); const fileList = ref([]); const showTip = computed( diff --git a/src/components/ImageUpload/index.vue b/src/components/ImageUpload/index.vue index 0c1e640..d8ed32b 100644 --- a/src/components/ImageUpload/index.vue +++ b/src/components/ImageUpload/index.vue @@ -70,7 +70,7 @@ const dialogVisible = ref(false); const baseUrl = import.meta.env.VITE_APP_BASE_API; const uploadImgUrl = ref(baseUrl + "/resource/oss/upload"); // 上传的图片服务器地址 -const headers = ref(globalHeaders); +const headers = ref(globalHeaders()); const fileList = ref([]); const showTip = computed( diff --git a/src/plugins/download.ts b/src/plugins/download.ts index b661457..25f0e35 100644 --- a/src/plugins/download.ts +++ b/src/plugins/download.ts @@ -16,7 +16,7 @@ export default { method: 'get', url: url, responseType: 'blob', - headers: globalHeaders, + headers: globalHeaders(), }); const isBlob = blobValidate(res.data); if (isBlob) { @@ -40,7 +40,7 @@ export default { method: 'get', url: url, responseType: 'blob', - headers: globalHeaders, + headers: globalHeaders(), }); const isBlob = blobValidate(res.data); if (isBlob) { diff --git a/src/utils/request.ts b/src/utils/request.ts index 5b8480b..4ade2f4 100644 --- a/src/utils/request.ts +++ b/src/utils/request.ts @@ -14,9 +14,11 @@ import { encrypt } from '@/utils/jsencrypt'; let downloadLoadingInstance: LoadingInstance; // 是否显示重新登录 export const isRelogin = { show: false }; -export const globalHeaders = { - Authorization: "Bearer " + getToken(), - clientid: import.meta.env.VITE_APP_CLIENT_ID +export const globalHeaders = () => { + return { + Authorization: "Bearer " + getToken(), + clientid: import.meta.env.VITE_APP_CLIENT_ID + } } axios.defaults.headers['Content-Type'] = 'application/json;charset=utf-8'; diff --git a/src/views/register.vue b/src/views/register.vue index 0716532..c2dd6a3 100644 --- a/src/views/register.vue +++ b/src/views/register.vue @@ -132,13 +132,14 @@ const handleRegister = () => { } const getCode = async () => { - const { data } = await getCodeImg(); + const res = await getCodeImg(); + const { data } = res; captchaEnabled.value = data.captchaEnabled === undefined ? true : data.captchaEnabled; if (captchaEnabled.value) { - codeUrl.value = "data:image/gif;base64," + data.img; + codeUrl.value = 'data:image/gif;base64,' + data.img; registerForm.value.uuid = data.uuid; } -} +}; const initTenantList = async () => { const { data } = await getTenantList(); diff --git a/src/views/system/dept/index.vue b/src/views/system/dept/index.vue index 12f7564..75f2843 100644 --- a/src/views/system/dept/index.vue +++ b/src/views/system/dept/index.vue @@ -97,7 +97,9 @@ - + + + @@ -114,7 +116,7 @@ {{ dict.label - }} + }} @@ -133,6 +135,8 @@