| | |
| | | { |
| | | "globals": { |
| | | "AppLocalConfig": true, |
| | | "AppType": true, |
| | | "AreaType": true, |
| | | "AuthorizeType": true, |
| | |
| | | "EnumRoleWebApiDataPower": true, |
| | | "EnumRoleWebApiDataPowerText": true, |
| | | "EnumRoleWebApiDataPowerTextForFilter": true, |
| | | "EnumUserInfoStatus": true, |
| | | "EnumUserType": true, |
| | | "EnumUserTypeText": true, |
| | | "ExtractDefaultPropTypes": true, |
| | |
| | | "FlexWorkerEleSignEnumText": true, |
| | | "Gender": true, |
| | | "GenderText": true, |
| | | "GlobalEvent": true, |
| | | "GlobalEventContext": true, |
| | | "GlobalEventListener": true, |
| | | "InjectionKey": true, |
| | | "MaybeRef": true, |
| | | "MaybeRefOrGetter": true, |
| | |
| | | "WritableComputedRef": true, |
| | | "acceptHMRUpdate": true, |
| | | "computed": true, |
| | | "copyTextToClipboard": true, |
| | | "createApp": true, |
| | | "createPinia": true, |
| | | "customRef": true, |
| | |
| | | "defineComponent": true, |
| | | "defineStore": true, |
| | | "effectScope": true, |
| | | "eventKey": true, |
| | | "getActivePinia": true, |
| | | "getCurrentInstance": true, |
| | | "getCurrentScope": true, |
| | | "globalEventContextKey": true, |
| | | "h": true, |
| | | "inject": true, |
| | | "isProxy": true, |
| | |
| | | "toValue": true, |
| | | "triggerRef": true, |
| | | "unref": true, |
| | | "useAccess": true, |
| | | "useAllRoleList": true, |
| | | "useAttrs": true, |
| | | "useClearSubModule": true, |
| | | "useCopyToClipboard": true, |
| | | "useCssModule": true, |
| | | "useCssVars": true, |
| | | "useGlobalEventContext": true, |
| | | "useGlobalEventProvide": true, |
| | | "useGroupColumns": true, |
| | | "useGroupOperationBtns": true, |
| | | "useId": true, |
| | | "useIsSystemAdmin": true, |
| | | "useLink": true, |
| | | "useLoading": true, |
| | | "useMenu": true, |
| | | "useMenus": true, |
| | | "useModel": true, |
| | | "useOmit": true, |
| | | "useOmitProps": true, |
| | | "useResizeHander": true, |
| | | "useRoute": true, |
| | | "useRouteView": true, |
| | | "useRouter": true, |
| | | "useSetReactive": true, |
| | | "useSlots": true, |
| | | "useTemplateRef": true, |
| | | "useUser": true, |
| | | "useVModel": true, |
| | | "useVModels": true, |
| | | "watch": true, |
| | | "watchEffect": true, |
| | | "watchPostEffect": true, |
| | |
| | | // biome-ignore lint: disable |
| | | export {} |
| | | declare global { |
| | | const AppLocalConfig: typeof import('./src/constants/app')['AppLocalConfig'] |
| | | const AppType: typeof import('./src/constants/app')['AppType'] |
| | | const AreaType: typeof import('./src/constants/enum')['AreaType'] |
| | | const AuthorizeType: typeof import('./src/constants/enum')['AuthorizeType'] |
| | |
| | | const EnumRoleWebApiDataPower: typeof import('./src/constants/apiEnum')['EnumRoleWebApiDataPower'] |
| | | const EnumRoleWebApiDataPowerText: typeof import('./src/constants/apiEnumText')['EnumRoleWebApiDataPowerText'] |
| | | const EnumRoleWebApiDataPowerTextForFilter: typeof import('./src/constants/apiEnumText')['EnumRoleWebApiDataPowerTextForFilter'] |
| | | const EnumUserInfoStatus: typeof import('./src/constants/apiEnum')['EnumUserInfoStatus'] |
| | | const EnumUserType: typeof import('./src/constants/apiEnum')['EnumUserType'] |
| | | const EnumUserTypeText: typeof import('./src/constants/apiEnumText')['EnumUserTypeText'] |
| | | const EnumWebApiMethod: typeof import('./src/constants/apiEnum')['EnumWebApiMethod'] |
| | |
| | | const VerifyStatusText: typeof import('./src/constants/enterprise')['VerifyStatusText'] |
| | | const acceptHMRUpdate: typeof import('pinia')['acceptHMRUpdate'] |
| | | const computed: typeof import('vue')['computed'] |
| | | const copyTextToClipboard: typeof import('./src/hooks/useCopyToClipboard')['copyTextToClipboard'] |
| | | const createApp: typeof import('vue')['createApp'] |
| | | const createPinia: typeof import('pinia')['createPinia'] |
| | | const customRef: typeof import('vue')['customRef'] |
| | |
| | | const defineComponent: typeof import('vue')['defineComponent'] |
| | | const defineStore: typeof import('pinia')['defineStore'] |
| | | const effectScope: typeof import('vue')['effectScope'] |
| | | const eventKey: typeof import('./src/hooks/useEvent')['eventKey'] |
| | | const getActivePinia: typeof import('pinia')['getActivePinia'] |
| | | const getCurrentInstance: typeof import('vue')['getCurrentInstance'] |
| | | const getCurrentScope: typeof import('vue')['getCurrentScope'] |
| | | const globalEventContextKey: typeof import('./src/hooks/useEvent')['globalEventContextKey'] |
| | | const h: typeof import('vue')['h'] |
| | | const inject: typeof import('vue')['inject'] |
| | | const isProxy: typeof import('vue')['isProxy'] |
| | |
| | | const toValue: typeof import('vue')['toValue'] |
| | | const triggerRef: typeof import('vue')['triggerRef'] |
| | | const unref: typeof import('vue')['unref'] |
| | | const useAccess: typeof import('./src/hooks/useAccess')['useAccess'] |
| | | const useAllRoleList: typeof import('./src/hooks/useUser')['useAllRoleList'] |
| | | const useAttrs: typeof import('vue')['useAttrs'] |
| | | const useClearSubModule: typeof import('./src/hooks/useAccess')['useClearSubModule'] |
| | | const useCopyToClipboard: typeof import('./src/hooks/useCopyToClipboard')['useCopyToClipboard'] |
| | | const useCssModule: typeof import('vue')['useCssModule'] |
| | | const useCssVars: typeof import('vue')['useCssVars'] |
| | | const useGlobalEventContext: typeof import('./src/hooks/useEvent')['useGlobalEventContext'] |
| | | const useGlobalEventProvide: typeof import('./src/hooks/useEvent')['useGlobalEventProvide'] |
| | | const useGroupColumns: typeof import('./src/hooks/useAccess')['useGroupColumns'] |
| | | const useGroupOperationBtns: typeof import('./src/hooks/useAccess')['useGroupOperationBtns'] |
| | | const useId: typeof import('vue')['useId'] |
| | | const useIsSystemAdmin: typeof import('./src/hooks/useUser')['useIsSystemAdmin'] |
| | | const useLink: typeof import('vue-router')['useLink'] |
| | | const useLoading: typeof import('@/hooks/global')['useLoading'] |
| | | const useLoading: typeof import('./src/hooks/global/useLoading')['useLoading'] |
| | | const useMenu: typeof import('./src/hooks/menu')['useMenu'] |
| | | const useMenus: typeof import('./src/hooks/menu')['useMenus'] |
| | | const useModel: typeof import('vue')['useModel'] |
| | | const useOmit: typeof import('./src/hooks/help')['useOmit'] |
| | | const useOmitProps: typeof import('./src/hooks/help')['useOmitProps'] |
| | | const useResizeHander: typeof import('./src/hooks/useResizeHander')['useResizeHander'] |
| | | const useRoute: typeof import('vue-router')['useRoute'] |
| | | const useRouteView: typeof import('./src/hooks/useRouteView')['useRouteView'] |
| | | const useRouter: typeof import('vue-router')['useRouter'] |
| | | const useSetReactive: typeof import('@/hooks/global')['useSetReactive'] |
| | | const useSetReactive: typeof import('./src/hooks/global/helper')['useSetReactive'] |
| | | const useSlots: typeof import('vue')['useSlots'] |
| | | const useTemplateRef: typeof import('vue')['useTemplateRef'] |
| | | const useUser: typeof import('./src/hooks/useUser')['useUser'] |
| | | const useVModel: typeof import('./src/hooks/help')['useVModel'] |
| | | const useVModels: typeof import('./src/hooks/help')['useVModels'] |
| | | const watch: typeof import('vue')['watch'] |
| | | const watchEffect: typeof import('vue')['watchEffect'] |
| | | const watchPostEffect: typeof import('vue')['watchPostEffect'] |
| | |
| | | export type { Component, Slot, Slots, ComponentPublicInstance, ComputedRef, DirectiveBinding, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, MaybeRef, MaybeRefOrGetter, VNode, WritableComputedRef } from 'vue' |
| | | import('vue') |
| | | // @ts-ignore |
| | | export type { EnumClientType, EnumMenuType, EnumMenuVisitLevel, EnumPagedListOrder, EnumResourceController, EnumResourceMethod, EnumRoleWebApiDataPower, EnumUserType, EnumClientType, EnumMenuType, EnumMenuVisitLevel, EnumPagedListOrder, EnumResourceController, EnumResourceMethod, EnumRoleWebApiDataPower, EnumUserType } from './src/constants/apiEnum' |
| | | export type { EnumClientType, EnumMenuType, EnumMenuVisitLevel, EnumPagedListOrder, EnumResourceController, EnumResourceMethod, EnumRoleWebApiDataPower, EnumUserInfoStatus, EnumUserType, EnumClientType, EnumMenuType, EnumMenuVisitLevel, EnumPagedListOrder, EnumResourceController, EnumResourceMethod, EnumRoleWebApiDataPower, EnumUserInfoStatus, EnumUserType } from './src/constants/apiEnum' |
| | | import('./src/constants/apiEnum') |
| | | // @ts-ignore |
| | | export type { FlexWorkerEleSignEnum, FlexTaskWorkerHireEnum, FlexWorkerEleSignEnum, FlexTaskWorkerHireEnum } from './src/constants/cPerson' |
| | |
| | | // @ts-ignore |
| | | export type { RoleClientType, RoleClientType } from './src/constants/role' |
| | | import('./src/constants/role') |
| | | // @ts-ignore |
| | | export type { GlobalEvent, GlobalEventListener, GlobalEventContext } from './src/hooks/useEvent' |
| | | import('./src/hooks/useEvent') |
| | | } |
| | | |
| | | // for vue template auto import |
| | |
| | | declare module 'vue' { |
| | | interface GlobalComponents {} |
| | | interface ComponentCustomProperties { |
| | | readonly AppLocalConfig: UnwrapRef<typeof import('./src/constants/app')['AppLocalConfig']> |
| | | readonly AppType: UnwrapRef<typeof import('./src/constants/app')['AppType']> |
| | | readonly AreaType: UnwrapRef<typeof import('./src/constants/enum')['AreaType']> |
| | | readonly AuthorizeType: UnwrapRef<typeof import('./src/constants/enum')['AuthorizeType']> |
| | |
| | | readonly EnumRoleWebApiDataPower: UnwrapRef<typeof import('./src/constants/apiEnum')['EnumRoleWebApiDataPower']> |
| | | readonly EnumRoleWebApiDataPowerText: UnwrapRef<typeof import('./src/constants/apiEnumText')['EnumRoleWebApiDataPowerText']> |
| | | readonly EnumRoleWebApiDataPowerTextForFilter: UnwrapRef<typeof import('./src/constants/apiEnumText')['EnumRoleWebApiDataPowerTextForFilter']> |
| | | readonly EnumUserInfoStatus: UnwrapRef<typeof import('./src/constants/apiEnum')['EnumUserInfoStatus']> |
| | | readonly EnumUserType: UnwrapRef<typeof import('./src/constants/apiEnum')['EnumUserType']> |
| | | readonly EnumUserTypeText: UnwrapRef<typeof import('./src/constants/apiEnumText')['EnumUserTypeText']> |
| | | readonly FastButtonMap: UnwrapRef<typeof import('./src/constants/module')['FastButtonMap']> |
| | |
| | | readonly VerifyStatusText: UnwrapRef<typeof import('./src/constants/enterprise')['VerifyStatusText']> |
| | | readonly acceptHMRUpdate: UnwrapRef<typeof import('pinia')['acceptHMRUpdate']> |
| | | readonly computed: UnwrapRef<typeof import('vue')['computed']> |
| | | readonly copyTextToClipboard: UnwrapRef<typeof import('./src/hooks/useCopyToClipboard')['copyTextToClipboard']> |
| | | readonly createApp: UnwrapRef<typeof import('vue')['createApp']> |
| | | readonly createPinia: UnwrapRef<typeof import('pinia')['createPinia']> |
| | | readonly customRef: UnwrapRef<typeof import('vue')['customRef']> |
| | |
| | | readonly defineComponent: UnwrapRef<typeof import('vue')['defineComponent']> |
| | | readonly defineStore: UnwrapRef<typeof import('pinia')['defineStore']> |
| | | readonly effectScope: UnwrapRef<typeof import('vue')['effectScope']> |
| | | readonly eventKey: UnwrapRef<typeof import('./src/hooks/useEvent')['eventKey']> |
| | | readonly getActivePinia: UnwrapRef<typeof import('pinia')['getActivePinia']> |
| | | readonly getCurrentInstance: UnwrapRef<typeof import('vue')['getCurrentInstance']> |
| | | readonly getCurrentScope: UnwrapRef<typeof import('vue')['getCurrentScope']> |
| | | readonly globalEventContextKey: UnwrapRef<typeof import('./src/hooks/useEvent')['globalEventContextKey']> |
| | | readonly h: UnwrapRef<typeof import('vue')['h']> |
| | | readonly inject: UnwrapRef<typeof import('vue')['inject']> |
| | | readonly isProxy: UnwrapRef<typeof import('vue')['isProxy']> |
| | |
| | | readonly toValue: UnwrapRef<typeof import('vue')['toValue']> |
| | | readonly triggerRef: UnwrapRef<typeof import('vue')['triggerRef']> |
| | | readonly unref: UnwrapRef<typeof import('vue')['unref']> |
| | | readonly useAccess: UnwrapRef<typeof import('./src/hooks/useAccess')['useAccess']> |
| | | readonly useAllRoleList: UnwrapRef<typeof import('./src/hooks/useUser')['useAllRoleList']> |
| | | readonly useAttrs: UnwrapRef<typeof import('vue')['useAttrs']> |
| | | readonly useClearSubModule: UnwrapRef<typeof import('./src/hooks/useAccess')['useClearSubModule']> |
| | | readonly useCopyToClipboard: UnwrapRef<typeof import('./src/hooks/useCopyToClipboard')['useCopyToClipboard']> |
| | | readonly useCssModule: UnwrapRef<typeof import('vue')['useCssModule']> |
| | | readonly useCssVars: UnwrapRef<typeof import('vue')['useCssVars']> |
| | | readonly useGlobalEventContext: UnwrapRef<typeof import('./src/hooks/useEvent')['useGlobalEventContext']> |
| | | readonly useGlobalEventProvide: UnwrapRef<typeof import('./src/hooks/useEvent')['useGlobalEventProvide']> |
| | | readonly useGroupColumns: UnwrapRef<typeof import('./src/hooks/useAccess')['useGroupColumns']> |
| | | readonly useGroupOperationBtns: UnwrapRef<typeof import('./src/hooks/useAccess')['useGroupOperationBtns']> |
| | | readonly useId: UnwrapRef<typeof import('vue')['useId']> |
| | | readonly useIsSystemAdmin: UnwrapRef<typeof import('./src/hooks/useUser')['useIsSystemAdmin']> |
| | | readonly useLink: UnwrapRef<typeof import('vue-router')['useLink']> |
| | | readonly useLoading: UnwrapRef<typeof import('@/hooks/global')['useLoading']> |
| | | readonly useLoading: UnwrapRef<typeof import('./src/hooks/global/useLoading')['useLoading']> |
| | | readonly useMenu: UnwrapRef<typeof import('./src/hooks/menu')['useMenu']> |
| | | readonly useMenus: UnwrapRef<typeof import('./src/hooks/menu')['useMenus']> |
| | | readonly useModel: UnwrapRef<typeof import('vue')['useModel']> |
| | | readonly useOmit: UnwrapRef<typeof import('./src/hooks/help')['useOmit']> |
| | | readonly useOmitProps: UnwrapRef<typeof import('./src/hooks/help')['useOmitProps']> |
| | | readonly useResizeHander: UnwrapRef<typeof import('./src/hooks/useResizeHander')['useResizeHander']> |
| | | readonly useRoute: UnwrapRef<typeof import('vue-router')['useRoute']> |
| | | readonly useRouteView: UnwrapRef<typeof import('./src/hooks/useRouteView')['useRouteView']> |
| | | readonly useRouter: UnwrapRef<typeof import('vue-router')['useRouter']> |
| | | readonly useSetReactive: UnwrapRef<typeof import('@/hooks/global')['useSetReactive']> |
| | | readonly useSetReactive: UnwrapRef<typeof import('./src/hooks/global/helper')['useSetReactive']> |
| | | readonly useSlots: UnwrapRef<typeof import('vue')['useSlots']> |
| | | readonly useTemplateRef: UnwrapRef<typeof import('vue')['useTemplateRef']> |
| | | readonly useUser: UnwrapRef<typeof import('./src/hooks/useUser')['useUser']> |
| | | readonly useVModel: UnwrapRef<typeof import('./src/hooks/help')['useVModel']> |
| | | readonly useVModels: UnwrapRef<typeof import('./src/hooks/help')['useVModels']> |
| | | readonly watch: UnwrapRef<typeof import('vue')['watch']> |
| | | readonly watchEffect: UnwrapRef<typeof import('vue')['watchEffect']> |
| | | readonly watchPostEffect: UnwrapRef<typeof import('vue')['watchPostEffect']> |
| | |
| | | |
| | | AutoImport({ |
| | | resolvers: [ElementPlusResolver()], |
| | | dirs: ['./src/constants'], |
| | | dirs: ['./src/constants/**', './src/hooks/**'], |
| | | // dirsScanOptions: { |
| | | // fileFilter: (file) => file.endsWith('.ts'), // Filter files |
| | | // types: true, |
| | | // }, |
| | | vueTemplate: true, |
| | | imports: [ |
| | | 'vue', |
| | | 'pinia', |
| | | 'vue-router', |
| | | { |
| | | '@/hooks/global': Object.keys(hooks), |
| | | }, |
| | | ], |
| | | imports: ['vue', 'pinia', 'vue-router'], |
| | | eslintrc: { |
| | | enabled: true, // Default `false` |
| | | filepath: './.eslintrc-auto-import.json', // Default `./.eslintrc-auto-import.json` |
| | |
| | | Resource = 3, |
| | | /**用户角色 */ |
| | | Role = 4, |
| | | /**用户信息 */ |
| | | UserInfo = 5, |
| | | /**企业信息 */ |
| | | Enterprise = 6, |
| | | } |
| | | |
| | | /** 资源请求方式 */ |
| | |
| | | All = 999, |
| | | } |
| | | |
| | | /** 用户信息状态 */ |
| | | export enum EnumUserInfoStatus { |
| | | /**正常 */ |
| | | Normal = 10, |
| | | /**禁用 */ |
| | | Disabled = 100, |
| | | } |
| | | |
| | | /** 用户类型 */ |
| | | export enum EnumUserType { |
| | | /**个人 */ |
| | |
| | | export const AppType = import.meta.env.VITE_AppType || 'one'; |
| | | |
| | | export const AppLocalConfig = { |
| | | userType: EnumUserType.Operation, |
| | | clientType: EnumClientType.PcWeb, |
| | | }; |
| | |
| | | // @ts-ignore |
| | | import { request } from '@/utils/request'; |
| | | |
| | | /** 删除字典类别 DELETE /api/main/dictionary/deleteDictionaryCategory */ |
| | | export async function deleteDictionaryCategory( |
| | | body: API.DeleteDictionaryCategoryCommand, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<number>('/api/main/dictionary/deleteDictionaryCategory', { |
| | | method: 'DELETE', |
| | | headers: { |
| | | 'Content-Type': 'application/json-patch+json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 查询字典类别分页列表数据 POST /api/main/dictionary/getDictionaryCategories */ |
| | | export async function getDictionaryCategories( |
| | | body: API.GetDictionaryCategoriesQuery, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<API.PagedListQueryResultGetDictionaryCategoriesQueryResultItem>( |
| | | '/api/main/dictionary/getDictionaryCategories', |
| | | { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json-patch+json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | } |
| | | ); |
| | | } |
| | | |
| | | /** 获取字典数据分页列表 POST /api/main/dictionary/getDictionaryDatas */ |
| | | export async function getDictionaryDatas( |
| | | body: API.GetDictionaryDatasQuery, |
| | |
| | | } |
| | | ); |
| | | } |
| | | |
| | | /** 保存字典类别 POST /api/main/dictionary/saveDictionaryCategory */ |
| | | export async function saveDictionaryCategory( |
| | | body: API.SaveDictionaryCategoryCommand, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<string>('/api/main/dictionary/saveDictionaryCategory', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json-patch+json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 保存字典数据 POST /api/main/dictionary/saveDictionaryData */ |
| | | export async function saveDictionaryData( |
| | | body: API.SaveDictionaryDataCommand, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<string>('/api/main/dictionary/saveDictionaryData', { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json-patch+json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 设置字典数据是否禁用 PUT /api/main/dictionary/setDictionaryDataIsDisabled */ |
| | | export async function setDictionaryDataIsDisabled( |
| | | body: API.SetDictionaryDataIsDisabledCommand, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<number>('/api/main/dictionary/setDictionaryDataIsDisabled', { |
| | | method: 'PUT', |
| | | headers: { |
| | | 'Content-Type': 'application/json-patch+json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
New file |
| | |
| | | /* eslint-disable */ |
| | | // @ts-ignore |
| | | import { request } from '@/utils/request'; |
| | | |
| | | /** 查询企业信息分页列表数据 POST /api/user/enterprise/getEnterprises */ |
| | | export async function getEnterprises(body: API.GetEnterprisesQuery, options?: API.RequestConfig) { |
| | | return request<API.PagedListQueryResultGetEnterprisesQueryResultItem>( |
| | | '/api/user/enterprise/getEnterprises', |
| | | { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json-patch+json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | } |
| | | ); |
| | | } |
| | |
| | | // API 唯一标识: |
| | | import * as dictionary from './dictionary'; |
| | | import * as auth from './auth'; |
| | | import * as enterprise from './enterprise'; |
| | | import * as menu from './menu'; |
| | | import * as resource from './resource'; |
| | | import * as role from './role'; |
| | | import * as userInfo from './userInfo'; |
| | | export default { |
| | | dictionary, |
| | | auth, |
| | | enterprise, |
| | | menu, |
| | | resource, |
| | | role, |
| | | userInfo, |
| | | }; |
| | |
| | | }); |
| | | } |
| | | |
| | | /** 查询角色用户列表 GET /api/user/role/getRoleUserInfos */ |
| | | export async function getRoleUserInfos( |
| | | // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) |
| | | params: API.APIgetRoleUserInfosParams, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<API.GetRoleUserInfosQueryResultItem[]>('/api/user/role/getRoleUserInfos', { |
| | | method: 'GET', |
| | | params: { |
| | | ...params, |
| | | }, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 保存角色 POST /api/user/role/saveRole */ |
| | | export async function saveRole(body: API.SaveRoleCommand, options?: API.RequestConfig) { |
| | | return request<string>('/api/user/role/saveRole', { |
| | |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 设置角色是否禁用 PUT /api/user/role/setRoleIsDisabled */ |
| | | export async function setRoleIsDisabled( |
| | | body: API.SetRoleIsDisabledCommand, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<number>('/api/user/role/setRoleIsDisabled', { |
| | | method: 'PUT', |
| | | headers: { |
| | | 'Content-Type': 'application/json-patch+json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 设置角色用户 PUT /api/user/role/setRoleUserInfos */ |
| | | export async function setRoleUserInfos( |
| | | body: API.SetRoleUserInfosCommand, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<number>('/api/user/role/setRoleUserInfos', { |
| | | method: 'PUT', |
| | | headers: { |
| | | 'Content-Type': 'application/json-patch+json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | |
| | | id?: string; |
| | | } |
| | | |
| | | interface APIgetRoleUserInfosParams { |
| | | /** 角色Id */ |
| | | roleId?: string; |
| | | } |
| | | |
| | | interface APIgetUserInfoRolesParams { |
| | | /** 用户Id */ |
| | | userInfoId?: string; |
| | | /** 客户端类型 */ |
| | | clientType?: EnumClientType; |
| | | } |
| | | |
| | | interface DeleteDictionaryCategoryCommand { |
| | | ids: string[]; |
| | | } |
| | | |
| | | interface DeleteMenuCommand { |
| | | ids: string[]; |
| | | } |
| | |
| | | Resource = 3, |
| | | /**用户角色 */ |
| | | Role = 4, |
| | | /**用户信息 */ |
| | | UserInfo = 5, |
| | | /**企业信息 */ |
| | | Enterprise = 6, |
| | | } |
| | | |
| | | enum EnumResourceMethod { |
| | |
| | | CurrentEnterprise = 30, |
| | | /**查询所有 */ |
| | | All = 999, |
| | | } |
| | | |
| | | enum EnumUserInfoStatus { |
| | | /**正常 */ |
| | | Normal = 10, |
| | | /**禁用 */ |
| | | Disabled = 100, |
| | | } |
| | | |
| | | enum EnumUserType { |
| | |
| | | timestamp?: number; |
| | | } |
| | | |
| | | interface FriendlyResultListGetRoleUserInfosQueryResultItem { |
| | | /** 跟踪Id */ |
| | | traceId?: string; |
| | | /** 状态码 */ |
| | | code?: number; |
| | | /** 错误码 */ |
| | | errorCode?: string; |
| | | /** 数据 */ |
| | | data?: GetRoleUserInfosQueryResultItem[]; |
| | | /** 执行成功 */ |
| | | success?: boolean; |
| | | /** 错误信息 */ |
| | | msg?: any; |
| | | /** 附加数据 */ |
| | | extras?: any; |
| | | /** 时间戳 */ |
| | | timestamp?: number; |
| | | } |
| | | |
| | | interface FriendlyResultListGetUserInfoRolesQueryResultItem { |
| | | /** 跟踪Id */ |
| | | traceId?: string; |
| | | /** 状态码 */ |
| | | code?: number; |
| | | /** 错误码 */ |
| | | errorCode?: string; |
| | | /** 数据 */ |
| | | data?: GetUserInfoRolesQueryResultItem[]; |
| | | /** 执行成功 */ |
| | | success?: boolean; |
| | | /** 错误信息 */ |
| | | msg?: any; |
| | | /** 附加数据 */ |
| | | extras?: any; |
| | | /** 时间戳 */ |
| | | timestamp?: number; |
| | | } |
| | | |
| | | interface FriendlyResultPagedListQueryResultGetDictionaryCategoriesQueryResultItem { |
| | | /** 跟踪Id */ |
| | | traceId?: string; |
| | | /** 状态码 */ |
| | | code?: number; |
| | | /** 错误码 */ |
| | | errorCode?: string; |
| | | data?: PagedListQueryResultGetDictionaryCategoriesQueryResultItem; |
| | | /** 执行成功 */ |
| | | success?: boolean; |
| | | /** 错误信息 */ |
| | | msg?: any; |
| | | /** 附加数据 */ |
| | | extras?: any; |
| | | /** 时间戳 */ |
| | | timestamp?: number; |
| | | } |
| | | |
| | | interface FriendlyResultPagedListQueryResultGetDictionaryDatasQueryResultItem { |
| | | /** 跟踪Id */ |
| | | traceId?: string; |
| | |
| | | /** 错误码 */ |
| | | errorCode?: string; |
| | | data?: PagedListQueryResultGetDictionaryDatasQueryResultItem; |
| | | /** 执行成功 */ |
| | | success?: boolean; |
| | | /** 错误信息 */ |
| | | msg?: any; |
| | | /** 附加数据 */ |
| | | extras?: any; |
| | | /** 时间戳 */ |
| | | timestamp?: number; |
| | | } |
| | | |
| | | interface FriendlyResultPagedListQueryResultGetEnterprisesQueryResultItem { |
| | | /** 跟踪Id */ |
| | | traceId?: string; |
| | | /** 状态码 */ |
| | | code?: number; |
| | | /** 错误码 */ |
| | | errorCode?: string; |
| | | data?: PagedListQueryResultGetEnterprisesQueryResultItem; |
| | | /** 执行成功 */ |
| | | success?: boolean; |
| | | /** 错误信息 */ |
| | | msg?: any; |
| | | /** 附加数据 */ |
| | | extras?: any; |
| | | /** 时间戳 */ |
| | | timestamp?: number; |
| | | } |
| | | |
| | | interface FriendlyResultPagedListQueryResultGetOperationUserInfosQueryResultItem { |
| | | /** 跟踪Id */ |
| | | traceId?: string; |
| | | /** 状态码 */ |
| | | code?: number; |
| | | /** 错误码 */ |
| | | errorCode?: string; |
| | | data?: PagedListQueryResultGetOperationUserInfosQueryResultItem; |
| | | /** 执行成功 */ |
| | | success?: boolean; |
| | | /** 错误信息 */ |
| | |
| | | |
| | | type GetCurrentLogierMenusQuery = Record<string, any>; |
| | | |
| | | interface GetDictionaryDatasQuery { |
| | | interface GetDictionaryCategoriesQuery { |
| | | pageModel?: PagedListQueryPageModel; |
| | | /** 关键字 */ |
| | | keywords?: string; |
| | | } |
| | | |
| | | type GetDictionaryDatasQueryResultItem = Record<string, any>; |
| | | interface GetDictionaryCategoriesQueryResultItem { |
| | | /** Id */ |
| | | id?: string; |
| | | /** 编号 */ |
| | | code?: string; |
| | | /** 名称 */ |
| | | name?: string; |
| | | /** 字段名(逗号隔开) */ |
| | | fieldNames?: string; |
| | | /** 排序 */ |
| | | sort?: number; |
| | | } |
| | | |
| | | interface GetDictionaryDatasQuery { |
| | | pageModel?: PagedListQueryPageModel; |
| | | /** 类别Id */ |
| | | categoryId?: string; |
| | | /** 关键字 */ |
| | | keywords?: string; |
| | | } |
| | | |
| | | interface GetDictionaryDatasQueryResultItem { |
| | | /** Id */ |
| | | id?: string; |
| | | /** 类别Id */ |
| | | categoryId?: string; |
| | | /** 上级Id */ |
| | | parentId?: string; |
| | | /** 编号 */ |
| | | code?: string; |
| | | /** 显示内容 */ |
| | | content: string; |
| | | /** 字段1 */ |
| | | field1?: string; |
| | | /** 字段2 */ |
| | | field2?: string; |
| | | /** 字段3 */ |
| | | field3?: string; |
| | | /** 字段4 */ |
| | | field4?: string; |
| | | /** 字段5 */ |
| | | field5?: string; |
| | | /** 排序 */ |
| | | sort?: number; |
| | | /** 是否禁用 */ |
| | | isDisabled?: boolean; |
| | | } |
| | | |
| | | interface GetEnterprisesQuery { |
| | | pageModel?: PagedListQueryPageModel; |
| | | /** 关键字 */ |
| | | keywords?: string; |
| | | /** 是否已配置 */ |
| | | isConfigured?: boolean; |
| | | } |
| | | |
| | | interface GetEnterprisesQueryResultItem { |
| | | /** Id */ |
| | | id?: string; |
| | | /** 企业全称 */ |
| | | enterpriseName?: string; |
| | | /** 法人姓名 */ |
| | | legalPerson?: string; |
| | | /** 统一社会信用代码 */ |
| | | societyCreditCode?: string; |
| | | /** 联系人 */ |
| | | contacts?: string; |
| | | /** 联系电话 */ |
| | | contactNumber?: string; |
| | | } |
| | | |
| | | interface GetMenuQueryResult { |
| | | /** Id */ |
| | |
| | | remark?: string; |
| | | } |
| | | |
| | | interface GetOperationUserInfosQuery { |
| | | pageModel?: PagedListQueryPageModel; |
| | | /** 关键字 */ |
| | | keywords?: string; |
| | | } |
| | | |
| | | interface GetOperationUserInfosQueryResultItem { |
| | | /** Id */ |
| | | id?: string; |
| | | /** 姓名 */ |
| | | name?: string; |
| | | /** 用户名 */ |
| | | userName?: string; |
| | | /** 手机号 */ |
| | | phoneNumber?: string; |
| | | /** 备注 */ |
| | | remark?: string; |
| | | /** 角色 */ |
| | | roles?: GetOperationUserInfosQueryResultItemRole[]; |
| | | status?: EnumUserInfoStatus; |
| | | } |
| | | |
| | | interface GetOperationUserInfosQueryResultItemRole { |
| | | /** 用户Id */ |
| | | userInfoId?: string; |
| | | /** 角色Id */ |
| | | id?: string; |
| | | /** 名称 */ |
| | | name?: string; |
| | | } |
| | | |
| | | interface GetResourceFieldsQueryResultItem { |
| | | /** 编号 */ |
| | | code?: string; |
| | |
| | | pageModel?: PagedListQueryPageModel; |
| | | userType?: EnumUserType; |
| | | clientType?: EnumClientType; |
| | | /** 关键字 */ |
| | | keywords?: string; |
| | | } |
| | | |
| | | interface GetRolesQueryResultItem { |
| | |
| | | dataPower?: EnumRoleWebApiDataPower; |
| | | /** 备注 */ |
| | | remark?: string; |
| | | /** 是否禁用 */ |
| | | isDisabled?: boolean; |
| | | /** 用户数量 */ |
| | | userCount?: number; |
| | | } |
| | | |
| | | interface GetRoleUserInfosQueryResultItem { |
| | | /** 用户Id */ |
| | | id?: string; |
| | | /** 姓名 */ |
| | | name?: string; |
| | | /** 用户名 */ |
| | | userName?: string; |
| | | /** 是否选中 */ |
| | | isChecked?: boolean; |
| | | } |
| | | |
| | | interface GetUserInfoRolesQueryResultItem { |
| | | /** 角色Id */ |
| | | id?: string; |
| | | /** 名称 */ |
| | | name?: string; |
| | | /** 备注 */ |
| | | remark?: string; |
| | | /** 是否选中 */ |
| | | isChecked?: boolean; |
| | | } |
| | | |
| | | interface PagedListQueryPageModel { |
| | |
| | | order?: EnumPagedListOrder; |
| | | } |
| | | |
| | | interface PagedListQueryResultGetDictionaryCategoriesQueryResultItem { |
| | | pageModel?: PagedListQueryResultPageModel; |
| | | /** 数据 */ |
| | | data?: GetDictionaryCategoriesQueryResultItem[]; |
| | | } |
| | | |
| | | interface PagedListQueryResultGetDictionaryDatasQueryResultItem { |
| | | pageModel?: PagedListQueryResultPageModel; |
| | | /** 数据 */ |
| | | data?: GetDictionaryDatasQueryResultItem[]; |
| | | } |
| | | |
| | | interface PagedListQueryResultGetEnterprisesQueryResultItem { |
| | | pageModel?: PagedListQueryResultPageModel; |
| | | /** 数据 */ |
| | | data?: GetEnterprisesQueryResultItem[]; |
| | | } |
| | | |
| | | interface PagedListQueryResultGetOperationUserInfosQueryResultItem { |
| | | pageModel?: PagedListQueryResultPageModel; |
| | | /** 数据 */ |
| | | data?: GetOperationUserInfosQueryResultItem[]; |
| | | } |
| | | |
| | | interface PagedListQueryResultGetRolesQueryResultItem { |
| | |
| | | accessToken?: string; |
| | | /** 刷新令牌 */ |
| | | refreshToken?: string; |
| | | } |
| | | |
| | | interface SaveDictionaryCategoryCommand { |
| | | id?: string; |
| | | /** 编号 */ |
| | | code: string; |
| | | /** 名称 */ |
| | | name: string; |
| | | /** 字段名(逗号隔开) */ |
| | | fieldNames?: string; |
| | | /** 排序 */ |
| | | sort?: number; |
| | | } |
| | | |
| | | interface SaveDictionaryDataCommand { |
| | | id?: string; |
| | | /** 类别Id */ |
| | | categoryId?: string; |
| | | /** 上级Id */ |
| | | parentId?: string; |
| | | /** 编号 */ |
| | | code?: string; |
| | | /** 显示内容 */ |
| | | content: string; |
| | | /** 字段1 */ |
| | | field1?: string; |
| | | /** 字段2 */ |
| | | field2?: string; |
| | | /** 字段3 */ |
| | | field3?: string; |
| | | /** 字段4 */ |
| | | field4?: string; |
| | | /** 字段5 */ |
| | | field5?: string; |
| | | /** 排序 */ |
| | | sort?: number; |
| | | /** 是否禁用 */ |
| | | isDisabled?: boolean; |
| | | } |
| | | |
| | | interface SaveMenuButtonCommand { |
| | |
| | | resources?: GetRoleQueryResultResource[]; |
| | | } |
| | | |
| | | interface SetDictionaryDataIsDisabledCommand { |
| | | /** Id */ |
| | | ids?: string[]; |
| | | /** 是否禁用 */ |
| | | isDisabled?: boolean; |
| | | } |
| | | |
| | | interface SetMenuSwitchCommand { |
| | | /** Id */ |
| | | ids?: string[]; |
| | |
| | | /** 是否缓存(null时不更新) */ |
| | | isCache?: boolean; |
| | | } |
| | | |
| | | interface SetRoleIsDisabledCommand { |
| | | /** Id */ |
| | | ids: string[]; |
| | | /** 是否禁用 */ |
| | | isDisabled?: boolean; |
| | | } |
| | | |
| | | interface SetRoleUserInfosCommand { |
| | | /** 角色Id */ |
| | | roleId?: string; |
| | | /** 用户Id */ |
| | | userInfoIds?: string[]; |
| | | } |
| | | |
| | | interface SetUserInfoRolesCommand { |
| | | /** 用户Id */ |
| | | userInfoId?: string; |
| | | /** 角色Id */ |
| | | roleIds?: string[]; |
| | | } |
| | | |
| | | interface SetUserInfoStatusCommand { |
| | | /** Id */ |
| | | ids?: string[]; |
| | | status?: EnumUserInfoStatus; |
| | | } |
| | | } |
New file |
| | |
| | | /* eslint-disable */ |
| | | // @ts-ignore |
| | | import { request } from '@/utils/request'; |
| | | |
| | | /** 查询运营端用户分页列表数据 POST /api/user/userInfo/getOperationUserInfos */ |
| | | export async function getOperationUserInfos( |
| | | body: API.GetOperationUserInfosQuery, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<API.PagedListQueryResultGetOperationUserInfosQueryResultItem>( |
| | | '/api/user/userInfo/getOperationUserInfos', |
| | | { |
| | | method: 'POST', |
| | | headers: { |
| | | 'Content-Type': 'application/json-patch+json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | } |
| | | ); |
| | | } |
| | | |
| | | /** 查询用户角色列表 GET /api/user/userInfo/getUserInfoRoles */ |
| | | export async function getUserInfoRoles( |
| | | // 叠加生成的Param类型 (非body参数swagger默认没有生成对象) |
| | | params: API.APIgetUserInfoRolesParams, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<API.GetUserInfoRolesQueryResultItem[]>('/api/user/userInfo/getUserInfoRoles', { |
| | | method: 'GET', |
| | | params: { |
| | | ...params, |
| | | }, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 设置用户信息角色 PUT /api/user/userInfo/setUserInfoRoles */ |
| | | export async function setUserInfoRoles( |
| | | body: API.SetUserInfoRolesCommand, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<number>('/api/user/userInfo/setUserInfoRoles', { |
| | | method: 'PUT', |
| | | headers: { |
| | | 'Content-Type': 'application/json-patch+json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | | |
| | | /** 设置用户信息状态 PUT /api/user/userInfo/setUserInfoStatus */ |
| | | export async function setUserInfoStatus( |
| | | body: API.SetUserInfoStatusCommand, |
| | | options?: API.RequestConfig |
| | | ) { |
| | | return request<number>('/api/user/userInfo/setUserInfoStatus', { |
| | | method: 'PUT', |
| | | headers: { |
| | | 'Content-Type': 'application/json-patch+json', |
| | | }, |
| | | data: body, |
| | | ...(options || {}), |
| | | }); |
| | | } |
| | |
| | | return new Promise<Route[]>(async (resolve, reject) => { |
| | | try { |
| | | const params: API.APIgetMenusParams = { |
| | | userType: EnumUserType.Operation, |
| | | clientType: EnumClientType.PcWeb, |
| | | userType: AppLocalConfig.userType, |
| | | clientType: AppLocalConfig.clientType, |
| | | }; |
| | | const res = await myClient.fetchQuery({ |
| | | queryKey: ['menuServices/getMenus', params], |
| | |
| | | return state.userInfo; |
| | | }, |
| | | |
| | | // userId(state) { |
| | | // return state.accountInfo.sub; |
| | | // }, |
| | | userId(state) { |
| | | //TODO |
| | | return ''; |
| | | }, |
| | | }, |
| | | actions: { |
| | | setToken(token: string) { |
| | |
| | | { |
| | | ...params, |
| | | password: md5Encrypt(params.password), |
| | | type: EnumUserType.Operation, |
| | | clientType: EnumClientType.PcWeb, |
| | | type: AppLocalConfig.userType, |
| | | clientType: AppLocalConfig.clientType, |
| | | }, |
| | | { |
| | | showLoading: false, |
| | |
| | | </template> |
| | | |
| | | <script lang="ts" setup> |
| | | import { useAccess } from '@/hooks'; |
| | | |
| | | const { checkSubModuleItemShow, column, operationBtns } = useAccess({}); |
| | | </script> |
| | |
| | | // member: { emits: { onClick: (role) => openMemberDialog(role) } }, |
| | | disabledBtn: { |
| | | emits: { onClick: (role) => roleEnableOrForbid(role) }, |
| | | props: { type: 'danger' }, |
| | | extraProps: { |
| | | hide: (row) => row.isLocked, |
| | | hide: (row) => row.isDisabled, |
| | | }, |
| | | }, |
| | | enableBtn: { |
| | | emits: { onClick: (role) => roleEnableOrForbid(role) }, |
| | | extraProps: { |
| | | hide: (row) => !row.isLocked, |
| | | hide: (row) => !row.isDisabled, |
| | | }, |
| | | }, |
| | | }; |
| | |
| | | |
| | | async function roleEnableOrForbid(row: API.GetRolesQueryResultItem) { |
| | | try { |
| | | // await Message.tipMessage(`是否${!row.isEnable ? '启用' : '禁用'}角色`); |
| | | // let res = await userServices.roleEnableOrForbid({ |
| | | // id: row.id, |
| | | // isEnable: !row.isEnable, |
| | | // }); |
| | | // if (res) { |
| | | // Message.successMessage('操作成功'); |
| | | // getList(paginationState.pageIndex); |
| | | // refetch({ type: 'inactive' }); |
| | | // return !!res; |
| | | // } |
| | | await Message.tipMessage(`是否${row.isDisabled ? '启用' : '禁用'}角色`); |
| | | let res = await roleServices.setRoleIsDisabled({ |
| | | ids: [row.id], |
| | | isDisabled: !row.isDisabled, |
| | | }); |
| | | if (res) { |
| | | Message.successMessage('操作成功'); |
| | | getList(paginationState.pageIndex); |
| | | return !!res; |
| | | } |
| | | } catch (error) {} |
| | | } |
| | | |