Browse Source

chore: optimize types

main
刘凯 1 year ago
parent
commit
dfa9bf9281
  1. 2
      src/components/Cropper/src/CropperAvatar.vue
  2. 2
      src/components/Form/src/BasicForm.vue
  3. 7
      src/components/Form/src/components/ApiCascader.vue
  4. 9
      src/components/Form/src/components/ApiRadioGroup.vue
  5. 2
      src/components/Form/src/components/ApiTree.vue
  6. 2
      src/components/Form/src/components/ApiTreeSelect.vue
  7. 2
      src/components/Form/src/components/FileUpload.vue
  8. 3
      src/components/Form/src/components/ImageUpload.vue
  9. 18
      src/components/Form/src/types/form.ts
  10. 133
      src/components/Form/src/types/index.ts
  11. 1
      src/components/SimpleMenu/src/components/useSimpleMenuContext.ts
  12. 2
      src/components/Table/src/types/table.ts
  13. 2
      src/layouts/default/content/useContentViewHeight.ts
  14. 2
      src/layouts/default/header/components/Breadcrumb.vue
  15. 2
      src/layouts/default/sider/index.vue
  16. 2
      src/router/types.ts
  17. 2
      src/store/modules/permission.ts
  18. 7
      src/types/global.d.ts
  19. 2
      src/utils/auth/index.ts
  20. 2
      src/utils/dict.ts
  21. 4
      src/utils/domUtils.ts
  22. 2
      src/utils/http/axios/Axios.ts
  23. 2
      src/utils/http/axios/axiosRetry.ts
  24. 2
      src/utils/index.ts
  25. 4
      src/utils/tongji.ts
  26. 2
      src/views/base/profile/BaseSetting.vue
  27. 2
      src/views/bpm/group/GroupModal.vue
  28. 2
      src/views/bpm/group/group.data.ts
  29. 2
      src/views/bpm/model/ModelModal.vue
  30. 8
      src/views/bpm/model/model.data.ts
  31. 2
      src/views/bpm/oa/leave/create.vue
  32. 4
      src/views/bpm/oa/leave/leave.data.ts
  33. 2
      src/views/bpm/processInstance/processInstance.data.ts
  34. 2
      src/views/infra/apiAccessLog/apiAccessLog.data.ts
  35. 2
      src/views/infra/apiErrorLog/apiErrorLog.data.ts
  36. 2
      src/views/infra/codegen/codegen.data.ts
  37. 4
      src/views/infra/codegen/components/data.ts
  38. 2
      src/views/infra/config/ConfigModal.vue
  39. 6
      src/views/infra/config/config.data.ts
  40. 2
      src/views/infra/dataSourceConfig/DataSourceConfigModal.vue
  41. 4
      src/views/infra/fileConfig/ficleConfig.data.ts
  42. 2
      src/views/infra/job/JobModal.vue
  43. 2
      src/views/infra/job/job.data.ts
  44. 2
      src/views/infra/job/logger/jobLog.data.ts
  45. 2
      src/views/member/config/index.vue
  46. 2
      src/views/member/group/GroupModal.vue
  47. 4
      src/views/member/group/group.data.ts
  48. 2
      src/views/member/level/LevelModal.vue
  49. 4
      src/views/member/level/level.data.ts
  50. 2
      src/views/member/point/record/record.data.ts
  51. 2
      src/views/member/signin/config/config.data.ts
  52. 2
      src/views/member/tag/TagModal.vue
  53. 2
      src/views/member/user/UserModal.vue
  54. 2
      src/views/member/user/user.data.ts
  55. 2
      src/views/mp/message/message.data.ts
  56. 2
      src/views/pay/app/AppModal.vue
  57. 2
      src/views/pay/app/ChannelModal.vue
  58. 10
      src/views/pay/app/app.data.ts
  59. 2
      src/views/pay/demo/demo.data.ts
  60. 2
      src/views/pay/notify/notify.data.ts
  61. 2
      src/views/system/dept/DeptModal.vue
  62. 2
      src/views/system/dict/DictDataModal.vue
  63. 2
      src/views/system/dict/DictTypeModal.vue
  64. 2
      src/views/system/errorCode/ErrorCodeModal.vue
  65. 2
      src/views/system/menu/MenuModal.vue
  66. 2
      src/views/system/notice/NoticeModal.vue
  67. 2
      src/views/system/oauth2/client/ClientModal.vue
  68. 2
      src/views/system/role/RoleModal.vue
  69. 2
      src/views/system/role/RoleScopeModal.vue
  70. 2
      src/views/system/role/role.data.ts
  71. 2
      src/views/system/sensitiveWord/SensitiveWordModal.vue
  72. 2
      src/views/system/sms/channel/SmsChannelModal.vue
  73. 2
      src/views/system/sms/template/SmsTemplateModal.vue
  74. 2
      src/views/system/tenant/TenantModal.vue
  75. 2
      src/views/system/tenantPackage/TenantPackageModal.vue
  76. 1
      src/views/system/tenantPackage/tenantPackage.data.ts
  77. 2
      src/views/system/user/UserModal.vue
  78. 2
      tsconfig.json

2
src/components/Cropper/src/CropperAvatar.vue

@ -64,7 +64,7 @@ defineExpose({ openModal: openModal.bind(null, true), closeModal })
<template> <template>
<div :class="getClass" :style="getStyle"> <div :class="getClass" :style="getStyle">
<div :class="`${prefixCls}-image-wrapper`" :style="getImageWrapperStyle" @click="openModal"> <div :class="`${prefixCls}-image-wrapper`" :style="getImageWrapperStyle" @click="openModal()">
<div :class="`${prefixCls}-image-mask`" :style="getImageWrapperStyle"> <div :class="`${prefixCls}-image-mask`" :style="getImageWrapperStyle">
<Icon icon="ant-design:cloud-upload-outlined" :size="getIconWidth" :style="getImageWrapperStyle" color="#d6d6d6" /> <Icon icon="ant-design:cloud-upload-outlined" :size="getIconWidth" :style="getImageWrapperStyle" color="#d6d6d6" />
</div> </div>

2
src/components/Form/src/BasicForm.vue

@ -236,7 +236,7 @@ function handleEnterPress(e: KeyboardEvent) {
} }
} }
const formActionType: Partial<FormActionType> = { const formActionType: FormActionType = {
getFieldsValue, getFieldsValue,
setFieldsValue, setFieldsValue,
resetFields, resetFields,

7
src/components/Form/src/components/ApiCascader.vue

@ -10,11 +10,12 @@ import { useRuleFormItem } from '@/hooks/component/useFormItem'
import { useI18n } from '@/hooks/web/useI18n' import { useI18n } from '@/hooks/web/useI18n'
interface Option { interface Option {
value: string value?: string
label: string label?: string
loading?: boolean loading?: boolean
isLeaf?: boolean isLeaf?: boolean
children?: Option[] children?: Option[]
[key: string]: any
} }
defineOptions({ name: 'ApiCascader' }) defineOptions({ name: 'ApiCascader' })
@ -24,7 +25,7 @@ const props = defineProps({
type: Array, type: Array,
}, },
api: { api: {
type: Function as PropType<(arg?: Recordable<any>) => Promise<Option[]>>, type: Function as PropType<(arg?: any) => Promise<Option[]>>,
default: null, default: null,
}, },
numberToString: propTypes.bool.def(false), numberToString: propTypes.bool.def(false),

9
src/components/Form/src/components/ApiRadioGroup.vue

@ -11,13 +11,18 @@ import { useRuleFormItem } from '@/hooks/component/useFormItem'
import { useAttrs } from '@/hooks/core/useAttrs' import { useAttrs } from '@/hooks/core/useAttrs'
import { propTypes } from '@/utils/propTypes' import { propTypes } from '@/utils/propTypes'
interface OptionsItem { label: string, value: string | number | boolean, disabled?: boolean, [name: string]: any } interface OptionsItem {
label?: string
value?: string | number | boolean
disabled?: boolean
[key: string]: any
}
defineOptions({ name: 'ApiRadioGroup' }) defineOptions({ name: 'ApiRadioGroup' })
const props = defineProps({ const props = defineProps({
api: { api: {
type: Function as PropType<(arg?: any | string) => Promise<OptionsItem[]>>, type: Function as PropType<(arg?: any) => Promise<OptionsItem[]>>,
default: null, default: null,
}, },
params: { params: {

2
src/components/Form/src/components/ApiTree.vue

@ -13,7 +13,7 @@ import { useRuleFormItem } from '@/hooks/component/useFormItem'
defineOptions({ name: 'ApiTree' }) defineOptions({ name: 'ApiTree' })
const props = defineProps({ const props = defineProps({
api: { type: Function as PropType<(arg?: Recordable<any>) => Promise<Recordable<any>>> }, api: { type: Function as PropType<(arg?: any) => Promise<Recordable<any>>> },
params: { type: Object }, params: { type: Object },
immediate: propTypes.bool.def(true), immediate: propTypes.bool.def(true),
resultField: propTypes.string.def(''), resultField: propTypes.string.def(''),

2
src/components/Form/src/components/ApiTreeSelect.vue

@ -11,7 +11,7 @@ import { handleTree as handleTreeFn } from '@/utils/tree'
defineOptions({ name: 'ApiTreeSelect' }) defineOptions({ name: 'ApiTreeSelect' })
const props = defineProps({ const props = defineProps({
api: { type: Function as PropType<(arg?: Recordable<any>) => Promise<Recordable<any>>> }, api: { type: Function as PropType<(arg?: any) => Promise<Recordable<any>>> },
params: { type: Object }, params: { type: Object },
immediate: propTypes.bool.def(true), immediate: propTypes.bool.def(true),
async: propTypes.bool.def(false), async: propTypes.bool.def(false),

2
src/components/Form/src/components/FileUpload.vue

@ -147,7 +147,7 @@ function onBeforeUpload(file) {
// //
function onRemove() { function onRemove() {
if (props.removeConfirm) { if (props.removeConfirm) {
return new Promise((resolve) => { return new Promise<boolean>((resolve) => {
createConfirm({ createConfirm({
title: '删除', title: '删除',
content: `确定要删除这${isImageMode.value ? '张图片' : '个文件'}吗?`, content: `确定要删除这${isImageMode.value ? '张图片' : '个文件'}吗?`,

3
src/components/Form/src/components/ImageUpload.vue

@ -123,8 +123,9 @@ function changeFileValue(value: any) {
function handleCancel() { function handleCancel() {
previewOpen.value = false previewOpen.value = false
} }
/** 查看图片 */ /** 查看图片 */
async function handlePreview(file: UploadProps['fileList'][number]) { async function handlePreview(file: Required<UploadFile<any>>) {
if (!file.url && !file.preview) if (!file.url && !file.preview)
file.preview = (await getBase64(file.originFileObj)) as string file.preview = (await getBase64(file.originFileObj)) as string

18
src/components/Form/src/types/form.ts

@ -2,7 +2,7 @@ import type { NamePath, RuleObject } from 'ant-design-vue/lib/form/interface'
import type { CSSProperties, VNode } from 'vue' import type { CSSProperties, VNode } from 'vue'
import type { RowProps } from 'ant-design-vue/lib/grid/Row' import type { RowProps } from 'ant-design-vue/lib/grid/Row'
import type { FormItem } from './formItem' import type { FormItem } from './formItem'
import type { ColEx, ComponentType } from './index' import type { ColEx, ComponentProps, ComponentType } from './index'
import type { ButtonProps as AntdButtonProps } from '@/components/Button' import type { ButtonProps as AntdButtonProps } from '@/components/Button'
import type { TableActionType } from '@/components/Table/src/types/table' import type { TableActionType } from '@/components/Table/src/types/table'
@ -129,7 +129,7 @@ export interface RenderOpts {
[key: string]: any [key: string]: any
} }
interface BaseFormSchema { interface BaseFormSchema<T extends ComponentType = any> {
// Field name // Field name
field: string field: string
// Extra Fields name[] // Extra Fields name[]
@ -160,8 +160,8 @@ interface BaseFormSchema {
tableAction: TableActionType tableAction: TableActionType
formActionType: FormActionType formActionType: FormActionType
formModel: Recordable formModel: Recordable
}) => Recordable) }) => ComponentProps[T])
| object | ComponentProps[T]
// Required // Required
required?: boolean | ((renderCallbackParams: RenderCallbackParams) => boolean) required?: boolean | ((renderCallbackParams: RenderCallbackParams) => boolean)
@ -221,9 +221,9 @@ interface BaseFormSchema {
dynamicRules?: (renderCallbackParams: RenderCallbackParams) => Rule[] dynamicRules?: (renderCallbackParams: RenderCallbackParams) => Rule[]
} }
export interface ComponentFormSchema extends BaseFormSchema { export interface ComponentFormSchema<T extends ComponentType = any> extends BaseFormSchema<T> {
// render component // render component
component: ComponentType component: T
} }
export interface SlotFormSchema extends BaseFormSchema { export interface SlotFormSchema extends BaseFormSchema {
@ -231,7 +231,11 @@ export interface SlotFormSchema extends BaseFormSchema {
slot: string slot: string
} }
export type FormSchema = ComponentFormSchema | SlotFormSchema type ComponentFormSchemaType<T extends ComponentType = ComponentType> = T extends any
? ComponentFormSchema<T>
: never
export type FormSchema = ComponentFormSchemaType | SlotFormSchema
export type FormSchemaInner = Partial<ComponentFormSchema> & Partial<SlotFormSchema> & BaseFormSchema export type FormSchemaInner = Partial<ComponentFormSchema> & Partial<SlotFormSchema> & BaseFormSchema

133
src/components/Form/src/types/index.ts

@ -1,3 +1,5 @@
import type { Component, VNodeProps } from 'vue'
type ColSpanType = number | string type ColSpanType = number | string
export interface ColEx { export interface ColEx {
style?: any style?: any
@ -80,43 +82,94 @@ export interface ColEx {
xxl?: { span: ColSpanType, offset: ColSpanType } | ColSpanType xxl?: { span: ColSpanType, offset: ColSpanType } | ColSpanType
} }
export type ComponentType = export type ComponentType = keyof ComponentProps
| 'Input'
| 'InputGroup' type MethodsNameToCamelCase<
| 'InputPassword' T extends string,
| 'InputSearch' M extends string = '',
| 'InputTextArea' > = T extends `${infer F}-${infer N}${infer Tail}`
| 'InputNumber' ? MethodsNameToCamelCase<Tail, `${M}${F}${Uppercase<N>}`>
| 'InputCountDown' : `${M}${T}`
| 'Select'
| 'ApiSelect' type MethodsNameTransform<T> = {
| 'TreeSelect' [K in keyof T as K extends `on${string}` ? MethodsNameToCamelCase<K> : never]: T[K];
| 'ApiTree' }
| 'ApiTreeSelect'
| 'ApiRadioGroup' type ExtractPropTypes<T extends Component> = T extends new (...args: any) => any
| 'RadioButtonGroup' ? Omit<InstanceType<T>['$props'], keyof VNodeProps>
| 'RadioGroup' : never
| 'Checkbox'
| 'CheckboxGroup' interface _CustomComponents {
| 'AutoComplete' ApiSelect: ExtractPropTypes<(typeof import('../components/ApiSelect.vue'))['default']>
| 'ApiCascader' ApiTree: ExtractPropTypes<(typeof import('../components/ApiTree.vue'))['default']>
| 'Cascader' ApiTreeSelect: ExtractPropTypes<(typeof import('../components/ApiTreeSelect.vue'))['default']>
| 'DatePicker' ApiRadioGroup: ExtractPropTypes<(typeof import('../components/ApiRadioGroup.vue'))['default']>
| 'MonthPicker' RadioButtonGroup: ExtractPropTypes<
| 'RangePicker' (typeof import('../components/RadioButtonGroup.vue'))['default']
| 'WeekPicker' >
| 'TimePicker' ApiCascader: ExtractPropTypes<(typeof import('../components/ApiCascader.vue'))['default']>
| 'TimeRangePicker' StrengthMeter: ExtractPropTypes<
| 'Switch' (typeof import('@/components/StrengthMeter/src/StrengthMeter.vue'))['default']
| 'StrengthMeter' >
| 'Upload' Upload: ExtractPropTypes<(typeof import('@/components/Upload/src/BasicUpload.vue'))['default']>
| 'ImageUpload' ImageUpload: ExtractPropTypes<
| 'IconPicker' (typeof import('@/components/Upload/src/components/ImageUpload.vue'))['default']
| 'Render' >
| 'Slider' IconPicker: ExtractPropTypes<(typeof import('@/components/Icon/src/IconPicker.vue'))['default']>
| 'Rate' ApiTransfer: ExtractPropTypes<(typeof import('../components/ApiTransfer.vue'))['default']>
| 'Divider' InputCountDown: ExtractPropTypes<
| 'ApiTransfer' (typeof import('@/components/CountDown/src/CountdownInput.vue'))['default']
| 'Editor' >
| 'FileUpload' FileUpload: ExtractPropTypes<(typeof import('../components/FileUpload.vue'))['default']>
| 'CronTab' Editor: ExtractPropTypes<(typeof import('@/components/Tinymce/src/Editor.vue'))['default']>
CronTab: ExtractPropTypes<(typeof import('@/components/CronTab/src/CronTabInput.vue'))['default']>
}
type CustomComponents<T = _CustomComponents> = {
[K in keyof T]: T[K] & MethodsNameTransform<T[K]>;
}
export interface ComponentProps {
Input: ExtractPropTypes<(typeof import('ant-design-vue/es/input'))['default']>
InputGroup: ExtractPropTypes<(typeof import('ant-design-vue/es/input'))['InputGroup']>
InputPassword: ExtractPropTypes<(typeof import('ant-design-vue/es/input'))['InputPassword']>
InputSearch: ExtractPropTypes<(typeof import('ant-design-vue/es/input'))['InputSearch']>
InputTextArea: ExtractPropTypes<(typeof import('ant-design-vue/es/input'))['Textarea']>
InputNumber: ExtractPropTypes<(typeof import('ant-design-vue/es/input-number'))['default']>
InputCountDown: CustomComponents['InputCountDown'] & ComponentProps['Input']
Select: ExtractPropTypes<(typeof import('ant-design-vue/es/select'))['default']>
ApiSelect: CustomComponents['ApiSelect'] & ComponentProps['Select']
TreeSelect: ExtractPropTypes<(typeof import('ant-design-vue/es/tree-select'))['default']>
ApiTree: CustomComponents['ApiTree'] &
ExtractPropTypes<(typeof import('ant-design-vue/es/tree'))['default']>
ApiTreeSelect: CustomComponents['ApiTreeSelect'] & ComponentProps['TreeSelect']
ApiRadioGroup: CustomComponents['ApiRadioGroup'] & ComponentProps['RadioGroup']
RadioButtonGroup: CustomComponents['RadioButtonGroup'] & ComponentProps['RadioGroup']
RadioGroup: ExtractPropTypes<(typeof import('ant-design-vue/es/radio'))['RadioGroup']>
Checkbox: ExtractPropTypes<(typeof import('ant-design-vue/es/checkbox'))['default']>
CheckboxGroup: ExtractPropTypes<(typeof import('ant-design-vue/es/checkbox'))['CheckboxGroup']>
AutoComplete: ExtractPropTypes<(typeof import('ant-design-vue/es/auto-complete'))['default']>
ApiCascader: CustomComponents['ApiCascader'] & ComponentProps['Cascader']
Cascader: ExtractPropTypes<(typeof import('ant-design-vue/es/cascader'))['default']>
DatePicker: ExtractPropTypes<(typeof import('ant-design-vue/es/date-picker'))['default']>
MonthPicker: ExtractPropTypes<(typeof import('ant-design-vue/es/date-picker'))['MonthPicker']>
RangePicker: ExtractPropTypes<(typeof import('ant-design-vue/es/date-picker'))['RangePicker']>
WeekPicker: ExtractPropTypes<(typeof import('ant-design-vue/es/date-picker'))['WeekPicker']>
TimePicker: ExtractPropTypes<(typeof import('ant-design-vue/es/time-picker'))['TimePicker']>
TimeRangePicker: ExtractPropTypes<
(typeof import('ant-design-vue/es/time-picker'))['TimeRangePicker']
>
Switch: ExtractPropTypes<(typeof import('ant-design-vue/es/switch'))['default']>
StrengthMeter: CustomComponents['StrengthMeter'] & ComponentProps['InputPassword']
Upload: CustomComponents['Upload']
ImageUpload: CustomComponents['ImageUpload']
IconPicker: CustomComponents['IconPicker']
Render: Record<string, any>
Slider: ExtractPropTypes<(typeof import('ant-design-vue/es/slider'))['default']>
Rate: ExtractPropTypes<(typeof import('ant-design-vue/es/rate'))['default']>
Divider: ExtractPropTypes<(typeof import('ant-design-vue/es/divider'))['default']>
ApiTransfer: CustomComponents['ApiTransfer'] & ExtractPropTypes<(typeof import('ant-design-vue/es/transfer'))['default']>
FileUpload: CustomComponents['FileUpload'] & ExtractPropTypes<(typeof import('ant-design-vue/es/upload'))['default']>
Editor: CustomComponents['Editor']
CronTab: CustomComponents['CronTab']
}

1
src/components/SimpleMenu/src/components/useSimpleMenuContext.ts

@ -16,6 +16,7 @@ export interface MenuEmitterEvents {
opened: boolean opened: boolean
} }
'on-update-active-name:submenu': number[] 'on-update-active-name:submenu': number[]
[key: string | symbol]: unknown
} }
export interface SimpleRootMenuContextProps { export interface SimpleRootMenuContextProps {

2
src/components/Table/src/types/table.ts

@ -416,7 +416,7 @@ export type CellFormat =
| ((text: string, record: Recordable, index: number) => string | number) | ((text: string, record: Recordable, index: number) => string | number)
| Map<string | number, any> | Map<string | number, any>
export interface BasicColumn extends ColumnProps<Recordable> { export interface BasicColumn extends Omit<ColumnProps<Recordable>, 'filters'> {
children?: BasicColumn[] children?: BasicColumn[]
filters?: { filters?: {
text: string text: string

2
src/layouts/default/content/useContentViewHeight.ts

@ -29,7 +29,7 @@ export function useContentViewHeight() {
{ wait: 100, immediate: true }, { wait: 100, immediate: true },
) )
function setPageHeight(height: number) { async function setPageHeight(height: number) {
pageHeight.value = height pageHeight.value = height
} }

2
src/layouts/default/header/components/Breadcrumb.vue

@ -1,4 +1,6 @@
<script lang="ts" setup> <script lang="ts" setup>
// eslint-disable-next-line ts/ban-ts-comment
// @ts-nocheck TODO: Breadcrumb type error
import type { RouteLocationMatched } from 'vue-router' import type { RouteLocationMatched } from 'vue-router'
import { useRouter } from 'vue-router' import { useRouter } from 'vue-router'
import { ref, watchEffect } from 'vue' import { ref, watchEffect } from 'vue'

2
src/layouts/default/sider/index.vue

@ -26,7 +26,7 @@ function handleClose() {
placement="left" placement="left"
:class="prefixCls" :class="prefixCls"
:width="getMenuWidth" :width="getMenuWidth"
:get-container="null" :get-container="false"
:open="!getCollapsed" :open="!getCollapsed"
@close="handleClose" @close="handleClose"
> >

2
src/router/types.ts

@ -4,7 +4,7 @@ import type { RoleEnum } from '@/enums/roleEnum'
export type Component<T = any> = ReturnType<typeof defineComponent> | (() => Promise<typeof import('*.vue')>) | (() => Promise<T>) export type Component<T = any> = ReturnType<typeof defineComponent> | (() => Promise<typeof import('*.vue')>) | (() => Promise<T>)
export interface AppRouteRecordRaw extends Omit<RouteRecordRaw, 'meta'> { export interface AppRouteRecordRaw extends Omit<RouteRecordRaw, 'meta' | 'children'> {
keepAlive?: boolean keepAlive?: boolean
visible?: boolean visible?: boolean
icon?: string icon?: string

2
src/store/modules/permission.ts

@ -102,7 +102,7 @@ export const usePermissionStore = defineStore('app-permission', {
}, },
// 构建路由 // 构建路由
buildRoutesAction(): Promise<AppRouteRecordRaw[]> { async buildRoutesAction(): Promise<AppRouteRecordRaw[]> {
const { t } = useI18n() const { t } = useI18n()
const userStore = useUserStore() const userStore = useUserStore()
const appStore = useAppStoreWithOut() const appStore = useAppStoreWithOut()

7
src/types/global.d.ts vendored

@ -10,10 +10,9 @@ declare global {
} }
lastBuildTime: string lastBuildTime: string
} }
// declare interface Window { declare interface Window {
// // Global vue app instance _hmt: [string, string][]
// __APP__: App<Element>; }
// }
interface Document { interface Document {
mozFullScreenElement?: Element mozFullScreenElement?: Element

2
src/utils/auth/index.ts

@ -22,7 +22,7 @@ export function setRefreshToken(value: string) {
return setAuthCache(REFRESH_TOKEN_KEY, value) return setAuthCache(REFRESH_TOKEN_KEY, value)
} }
export function getTenantId() { export function getTenantId(): string {
return getAuthCache(TENANT_ID_KEY) return getAuthCache(TENANT_ID_KEY)
} }

2
src/utils/dict.ts

@ -39,7 +39,7 @@ export function getDictOpts(dictType: string) {
return getDictDatas(dictType) return getDictDatas(dictType)
} }
export function getDictOptions(dictType: string, valueType?: 'string' | 'number' | 'boolean') { export function getDictOptions(dictType: string, valueType?: 'string' | 'number' | 'boolean'): any {
const dictOption: DictDataType[] = [] const dictOption: DictDataType[] = []
const dictOptions: DictDataType[] = getDictDatas(dictType) const dictOptions: DictDataType[] = getDictDatas(dictType)
if (dictOptions && dictOptions.length > 0) { if (dictOptions && dictOptions.length > 0) {

4
src/utils/domUtils.ts

@ -158,11 +158,15 @@ export function once(el: HTMLElement, event: string, fn: EventListener): void {
export function useRafThrottle<T extends FunctionArgs>(fn: T): T { export function useRafThrottle<T extends FunctionArgs>(fn: T): T {
let locked = false let locked = false
// eslint-disable-next-line ts/ban-ts-comment, ts/prefer-ts-expect-error
// @ts-ignore
return (...args: any[]) => { return (...args: any[]) => {
if (locked) if (locked)
return return
locked = true locked = true
window.requestAnimationFrame(() => { window.requestAnimationFrame(() => {
// eslint-disable-next-line ts/ban-ts-comment, ts/prefer-ts-expect-error
// @ts-ignore
fn.apply(this, args) fn.apply(this, args)
locked = false locked = false
}) })

2
src/utils/http/axios/Axios.ts

@ -55,7 +55,7 @@ export class VAxios {
} }
refreshToken() { refreshToken() {
axios.defaults.headers.common['tenant-id'] = getTenantId() as number axios.defaults.headers.common['tenant-id'] = getTenantId()
const refreshToken = getRefreshToken() const refreshToken = getRefreshToken()
return axios.post(`${globSetting.apiUrl}/system/auth/refresh-token?refreshToken=${refreshToken}`) return axios.post(`${globSetting.apiUrl}/system/auth/refresh-token?refreshToken=${refreshToken}`)
} }

2
src/utils/http/axios/axiosRetry.ts

@ -9,6 +9,8 @@ export class AxiosRetry {
* *
*/ */
retry(axiosInstance: AxiosInstance, error: AxiosError) { retry(axiosInstance: AxiosInstance, error: AxiosError) {
// eslint-disable-next-line ts/ban-ts-comment, ts/prefer-ts-expect-error
// @ts-ignore
const { config } = error.response const { config } = error.response
const { waitTime, count } = config?.requestOptions?.retryRequest ?? {} const { waitTime, count } = config?.requestOptions?.retryRequest ?? {}
config.__retryCount = config.__retryCount || 0 config.__retryCount = config.__retryCount || 0

2
src/utils/index.ts

@ -167,6 +167,8 @@ export function simpleDebounce(fn, delay = 100) {
clearTimeout(timer) clearTimeout(timer)
timer = setTimeout(() => { timer = setTimeout(() => {
// eslint-disable-next-line ts/ban-ts-comment, ts/prefer-ts-expect-error
// @ts-ignore
fn.apply(this, args) fn.apply(this, args)
}, delay) }, delay)
} }

4
src/utils/tongji.ts

@ -12,12 +12,12 @@ const HM_ID = import.meta.env.VITE_APP_BAIDU_CODE
const hm = document.createElement('script') const hm = document.createElement('script')
hm.src = `https://hm.baidu.com/hm.js?${HM_ID}` hm.src = `https://hm.baidu.com/hm.js?${HM_ID}`
const s = document.getElementsByTagName('script')[0] const s = document.getElementsByTagName('script')[0]
s.parentNode.insertBefore(hm, s) s.parentNode?.insertBefore(hm, s)
})() })()
router.afterEach((to) => { router.afterEach((to) => {
if (!HM_ID) if (!HM_ID)
return return
_hmt.push(['_trackPageview', to.fullPath]) window._hmt.push(['_trackPageview', to.fullPath])
}) })

2
src/views/base/profile/BaseSetting.vue

@ -39,7 +39,7 @@ async function updateAvatar({ data }) {
async function handleSubmit() { async function handleSubmit() {
try { try {
const values = await validate() const values = await validate()
await updateUserProfileApi(values) await updateUserProfileApi(values as any)
} }
finally { finally {
createMessage.success('更新成功!') createMessage.success('更新成功!')

2
src/views/bpm/group/GroupModal.vue

@ -34,7 +34,7 @@ const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data
async function handleSubmit() { async function handleSubmit() {
try { try {
const values = await validate() const values = await validate() as any
setModalProps({ confirmLoading: true }) setModalProps({ confirmLoading: true })
if (unref(isUpdate)) if (unref(isUpdate))
await updateUserGroup(values) await updateUserGroup(values)

2
src/views/bpm/group/group.data.ts

@ -80,7 +80,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'status', field: 'status',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getDictOptions(DICT_TYPE.COMMON_STATUS), options: getDictOptions(DICT_TYPE.COMMON_STATUS) as any,
}, },
colProps: { span: 8 }, colProps: { span: 8 },
}, },

2
src/views/bpm/model/ModelModal.vue

@ -34,7 +34,7 @@ const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data
async function handleSubmit() { async function handleSubmit() {
try { try {
const values = await validate() const values = await validate() as any
setModalProps({ confirmLoading: true }) setModalProps({ confirmLoading: true })
if (unref(isUpdate)) if (unref(isUpdate))
await updateModel(values) await updateModel(values)

8
src/views/bpm/model/model.data.ts

@ -87,7 +87,7 @@ export const columns: BasicColumn[] = [
onChange(checked: boolean) { onChange(checked: boolean) {
const newStatus = checked ? 0 : 1 const newStatus = checked ? 0 : 1
const { createMessage } = useMessage() const { createMessage } = useMessage()
updateModelState({ id: record.id, state: newStatus }) updateModelState(record.id, newStatus)
.then(() => { .then(() => {
record.status = newStatus record.status = newStatus
createMessage.success('已成功修改流程状态') createMessage.success('已成功修改流程状态')
@ -134,7 +134,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'category', field: 'category',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getDictOptions(DICT_TYPE.BPM_MODEL_CATEGORY), options: getDictOptions(DICT_TYPE.BPM_MODEL_CATEGORY) as any,
}, },
colProps: { span: 8 }, colProps: { span: 8 },
}, },
@ -166,7 +166,7 @@ export const formSchema: FormSchema[] = [
field: 'category', field: 'category',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getDictOptions(DICT_TYPE.BPM_MODEL_CATEGORY), options: getDictOptions(DICT_TYPE.BPM_MODEL_CATEGORY) as any,
}, },
}, },
{ {
@ -180,7 +180,7 @@ export const formSchema: FormSchema[] = [
component: 'Select', component: 'Select',
ifShow: ({ values }) => !!values.id, ifShow: ({ values }) => !!values.id,
componentProps: { componentProps: {
options: getDictOptions(DICT_TYPE.BPM_MODEL_FORM_TYPE), options: getDictOptions(DICT_TYPE.BPM_MODEL_FORM_TYPE) as any,
}, },
}, },
{ {

2
src/views/bpm/oa/leave/create.vue

@ -22,7 +22,7 @@ const [registerForm, { resetFields, validate }] = useForm({
async function handleSubmit() { async function handleSubmit() {
try { try {
const values = await validate() const values = await validate() as any
await createLeave(values) await createLeave(values)
} }
finally { finally {

4
src/views/bpm/oa/leave/leave.data.ts

@ -62,7 +62,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'type', field: 'type',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getDictOptions(DICT_TYPE.BPM_OA_LEAVE_TYPE), options: getDictOptions(DICT_TYPE.BPM_OA_LEAVE_TYPE) as any,
}, },
colProps: { span: 8 }, colProps: { span: 8 },
}, },
@ -96,7 +96,7 @@ export const formSchema: FormSchema[] = [
required: true, required: true,
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getDictOptions(DICT_TYPE.BPM_OA_LEAVE_TYPE), options: getDictOptions(DICT_TYPE.BPM_OA_LEAVE_TYPE) as any,
}, },
}, },
{ {

2
src/views/bpm/processInstance/processInstance.data.ts

@ -87,7 +87,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'category', field: 'category',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getDictOptions(DICT_TYPE.BPM_MODEL_CATEGORY), options: getDictOptions(DICT_TYPE.BPM_MODEL_CATEGORY) as any,
}, },
colProps: { span: 8 }, colProps: { span: 8 },
}, },

2
src/views/infra/apiAccessLog/apiAccessLog.data.ts

@ -78,7 +78,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'userType', field: 'userType',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getDictOptions(DICT_TYPE.USER_TYPE), options: getDictOptions(DICT_TYPE.USER_TYPE) as any,
}, },
colProps: { span: 8 }, colProps: { span: 8 },
}, },

2
src/views/infra/apiErrorLog/apiErrorLog.data.ts

@ -80,7 +80,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'userType', field: 'userType',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getDictOptions(DICT_TYPE.USER_TYPE), options: getDictOptions(DICT_TYPE.USER_TYPE) as any,
}, },
colProps: { span: 8 }, colProps: { span: 8 },
}, },

2
src/views/infra/codegen/codegen.data.ts

@ -103,7 +103,7 @@ export const formSchema: FormSchema[] = [
field: 'status', field: 'status',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getDictOptions(DICT_TYPE.COMMON_STATUS), options: getDictOptions(DICT_TYPE.COMMON_STATUS) as any,
}, },
}, },
{ {

4
src/views/infra/codegen/components/data.ts

@ -60,7 +60,7 @@ export const basicInfoSchemas: FormSchema[] = [
component: 'Select', component: 'Select',
defaultValue: '30', defaultValue: '30',
componentProps: { componentProps: {
options: getDictOptions(DICT_TYPE.INFRA_CODEGEN_TEMPLATE_TYPE), options: getDictOptions(DICT_TYPE.INFRA_CODEGEN_TEMPLATE_TYPE) as any,
}, },
colProps: { span: 12 }, colProps: { span: 12 },
}, },
@ -70,7 +70,7 @@ export const basicInfoSchemas: FormSchema[] = [
required: true, required: true,
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getDictOptions(DICT_TYPE.INFRA_CODEGEN_FRONT_TYPE), options: getDictOptions(DICT_TYPE.INFRA_CODEGEN_FRONT_TYPE) as any,
}, },
colProps: { span: 12 }, colProps: { span: 12 },
}, },

2
src/views/infra/config/ConfigModal.vue

@ -34,7 +34,7 @@ const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data
async function handleSubmit() { async function handleSubmit() {
try { try {
const values = await validate() const values = await validate() as any
setModalProps({ confirmLoading: true }) setModalProps({ confirmLoading: true })
if (unref(isUpdate)) if (unref(isUpdate))
await updateConfig(values) await updateConfig(values)

6
src/views/infra/config/config.data.ts

@ -77,7 +77,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'type', field: 'type',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getDictOptions(DICT_TYPE.INFRA_CONFIG_TYPE), options: getDictOptions(DICT_TYPE.INFRA_CONFIG_TYPE) as any,
}, },
colProps: { span: 8 }, colProps: { span: 8 },
}, },
@ -126,8 +126,8 @@ export const formSchema: FormSchema[] = [
component: 'RadioGroup', component: 'RadioGroup',
componentProps: { componentProps: {
options: [ options: [
{ key: true, label: '是', value: true }, { label: '是', value: true },
{ key: false, label: '否', value: false }, { label: '否', value: false },
], ],
}, },
}, },

2
src/views/infra/dataSourceConfig/DataSourceConfigModal.vue

@ -32,7 +32,7 @@ const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data
async function handleSubmit() { async function handleSubmit() {
try { try {
const values = await validate() const values = await validate() as any
setModalProps({ confirmLoading: true }) setModalProps({ confirmLoading: true })
if (unref(isUpdate)) if (unref(isUpdate))
await updateDataSourceConfig(values) await updateDataSourceConfig(values)

4
src/views/infra/fileConfig/ficleConfig.data.ts

@ -56,7 +56,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'storage', field: 'storage',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getDictOptions(DICT_TYPE.INFRA_FILE_STORAGE), options: getDictOptions(DICT_TYPE.INFRA_FILE_STORAGE) as any,
}, },
colProps: { span: 8 }, colProps: { span: 8 },
}, },
@ -88,7 +88,7 @@ export const formSchema: FormSchema[] = [
required: true, required: true,
dynamicDisabled: ({ values }) => !!values.id, dynamicDisabled: ({ values }) => !!values.id,
componentProps: { componentProps: {
options: getDictOptions(DICT_TYPE.INFRA_FILE_STORAGE), options: getDictOptions(DICT_TYPE.INFRA_FILE_STORAGE) as any,
}, },
}, },
{ {

2
src/views/infra/job/JobModal.vue

@ -57,7 +57,7 @@ const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data
async function handleSubmit() { async function handleSubmit() {
try { try {
const values = await validate() const values = await validate() as any
setModalProps({ confirmLoading: true }) setModalProps({ confirmLoading: true })
if (unref(isUpdate)) if (unref(isUpdate))
await updateJob(values) await updateJob(values)

2
src/views/infra/job/job.data.ts

@ -55,7 +55,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'status', field: 'status',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getDictOptions(DICT_TYPE.INFRA_JOB_STATUS), options: getDictOptions(DICT_TYPE.INFRA_JOB_STATUS) as any,
}, },
colProps: { span: 8 }, colProps: { span: 8 },
}, },

2
src/views/infra/job/logger/jobLog.data.ts

@ -83,7 +83,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'status', field: 'status',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getDictOptions(DICT_TYPE.INFRA_JOB_STATUS), options: getDictOptions(DICT_TYPE.INFRA_JOB_STATUS) as any,
}, },
colProps: { span: 8 }, colProps: { span: 8 },
}, },

2
src/views/member/config/index.vue

@ -75,7 +75,7 @@ async function getConfigPage() {
async function handleSubmit() { async function handleSubmit() {
try { try {
const values = await validate() const values = await validate() as any
await saveConfig(values) await saveConfig(values)
} }
finally { finally {

2
src/views/member/group/GroupModal.vue

@ -34,7 +34,7 @@ const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data
async function handleSubmit() { async function handleSubmit() {
try { try {
const values = await validate() const values = await validate() as any
setModalProps({ confirmLoading: true }) setModalProps({ confirmLoading: true })
if (unref(isUpdate)) if (unref(isUpdate))
await updateGroup(values) await updateGroup(values)

4
src/views/member/group/group.data.ts

@ -49,7 +49,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'status', field: 'status',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getDictOptions(DICT_TYPE.COMMON_STATUS), options: getDictOptions(DICT_TYPE.COMMON_STATUS) as any,
}, },
colProps: { span: 8 }, colProps: { span: 8 },
}, },
@ -73,7 +73,7 @@ export const formSchema: FormSchema[] = [
field: 'status', field: 'status',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getDictOptions(DICT_TYPE.COMMON_STATUS), options: getDictOptions(DICT_TYPE.COMMON_STATUS) as any,
}, },
}, },
{ {

2
src/views/member/level/LevelModal.vue

@ -34,7 +34,7 @@ const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data
async function handleSubmit() { async function handleSubmit() {
try { try {
const values = await validate() const values = await validate() as any
setModalProps({ confirmLoading: true }) setModalProps({ confirmLoading: true })
if (unref(isUpdate)) if (unref(isUpdate))
await updateLevel(values) await updateLevel(values)

4
src/views/member/level/level.data.ts

@ -65,7 +65,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'status', field: 'status',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getDictOptions(DICT_TYPE.COMMON_STATUS), options: getDictOptions(DICT_TYPE.COMMON_STATUS) as any,
}, },
colProps: { span: 8 }, colProps: { span: 8 },
}, },
@ -125,7 +125,7 @@ export const formSchema: FormSchema[] = [
field: 'status', field: 'status',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getDictOptions(DICT_TYPE.COMMON_STATUS), options: getDictOptions(DICT_TYPE.COMMON_STATUS) as any,
}, },
}, },
{ {

2
src/views/member/point/record/record.data.ts

@ -63,7 +63,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'bizType', field: 'bizType',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getDictOptions(DICT_TYPE.MEMBER_POINT_BIZ_TYPE), options: getDictOptions(DICT_TYPE.MEMBER_POINT_BIZ_TYPE) as any,
}, },
colProps: { span: 8 }, colProps: { span: 8 },
}, },

2
src/views/member/signin/config/config.data.ts

@ -78,7 +78,7 @@ export const formSchema: FormSchema[] = [
field: 'status', field: 'status',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getDictOptions(DICT_TYPE.COMMON_STATUS), options: getDictOptions(DICT_TYPE.COMMON_STATUS) as any,
}, },
}, },
] ]

2
src/views/member/tag/TagModal.vue

@ -34,7 +34,7 @@ const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data
async function handleSubmit() { async function handleSubmit() {
try { try {
const values = await validate() const values = await validate() as any
setModalProps({ confirmLoading: true }) setModalProps({ confirmLoading: true })
if (unref(isUpdate)) if (unref(isUpdate))
await updateMemberTag(values) await updateMemberTag(values)

2
src/views/member/user/UserModal.vue

@ -34,7 +34,7 @@ const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data
async function handleSubmit() { async function handleSubmit() {
try { try {
const values = await validate() const values = await validate() as any
setModalProps({ confirmLoading: true }) setModalProps({ confirmLoading: true })
if (unref(isUpdate)) if (unref(isUpdate))
await updateUser(values) await updateUser(values)

2
src/views/member/user/user.data.ts

@ -156,7 +156,7 @@ export const formSchema: FormSchema[] = [
field: 'status', field: 'status',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getDictOptions(DICT_TYPE.COMMON_STATUS), options: getDictOptions(DICT_TYPE.COMMON_STATUS) as any,
}, },
}, },
{ {

2
src/views/mp/message/message.data.ts

@ -145,7 +145,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'type', field: 'type',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getDictOptions(DICT_TYPE.MP_MESSAGE_TYPE, 'string'), options: getDictOptions(DICT_TYPE.MP_MESSAGE_TYPE, 'string') as any,
}, },
colProps: { span: 8 }, colProps: { span: 8 },
}, },

2
src/views/pay/app/AppModal.vue

@ -34,7 +34,7 @@ const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data
async function handleSubmit() { async function handleSubmit() {
try { try {
const values = await validate() const values = await validate() as any
setModalProps({ confirmLoading: true }) setModalProps({ confirmLoading: true })
if (unref(isUpdate)) if (unref(isUpdate))
await updateApp(values) await updateApp(values)

2
src/views/pay/app/ChannelModal.vue

@ -63,7 +63,7 @@ const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data
async function handleSubmit() { async function handleSubmit() {
try { try {
const values = await validate() const values = await validate() as any
setModalProps({ confirmLoading: true }) setModalProps({ confirmLoading: true })
values.config = JSON.stringify(values.payConfig) values.config = JSON.stringify(values.payConfig)
if (unref(isUpdate)) if (unref(isUpdate))

10
src/views/pay/app/app.data.ts

@ -132,7 +132,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'status', field: 'status',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getDictOptions(DICT_TYPE.COMMON_STATUS), options: getDictOptions(DICT_TYPE.COMMON_STATUS) as any,
}, },
colProps: { span: 8 }, colProps: { span: 8 },
}, },
@ -162,7 +162,7 @@ export const formSchema: FormSchema[] = [
field: 'status', field: 'status',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getDictOptions(DICT_TYPE.COMMON_STATUS), options: getDictOptions(DICT_TYPE.COMMON_STATUS) as any,
}, },
}, },
{ {
@ -232,7 +232,7 @@ export const aliPayFormSchema: FormSchema[] = [
component: 'RadioGroup', component: 'RadioGroup',
componentProps: { componentProps: {
options: [ options: [
{ value: 'RSA2', label: 'RSA2', key: 'RSA2' }, { value: 'RSA2', label: 'RSA2' },
], ],
}, },
}, },
@ -244,8 +244,8 @@ export const aliPayFormSchema: FormSchema[] = [
component: 'RadioGroup', component: 'RadioGroup',
componentProps: { componentProps: {
options: [ options: [
{ value: 1, label: '公钥模式', key: '1' }, { value: 1, label: '公钥模式' },
{ value: 2, label: '证书模式', key: '2' }, { value: 2, label: '证书模式' },
], ],
}, },
}, },

2
src/views/pay/demo/demo.data.ts

@ -85,7 +85,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'payed', field: 'payed',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getDictOptions(DICT_TYPE.INFRA_BOOLEAN_STRING), options: getDictOptions(DICT_TYPE.INFRA_BOOLEAN_STRING) as any,
}, },
colProps: { span: 8 }, colProps: { span: 8 },
}, },

2
src/views/pay/notify/notify.data.ts

@ -90,7 +90,7 @@ export const searchFormSchema: FormSchema[] = [
field: 'type', field: 'type',
component: 'Select', component: 'Select',
componentProps: { componentProps: {
options: getDictOptions(DICT_TYPE.PAY_NOTIFY_TYPE, 'number'), options: getDictOptions(DICT_TYPE.PAY_NOTIFY_TYPE, 'number') as any,
}, },
colProps: { span: 8 }, colProps: { span: 8 },
}, },

2
src/views/system/dept/DeptModal.vue

@ -34,7 +34,7 @@ const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data
async function handleSubmit() { async function handleSubmit() {
try { try {
const values = await validate() const values = await validate() as any
setModalProps({ confirmLoading: true }) setModalProps({ confirmLoading: true })
if (unref(isUpdate)) if (unref(isUpdate))
await updateDept(values) await updateDept(values)

2
src/views/system/dict/DictDataModal.vue

@ -39,7 +39,7 @@ const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data
async function handleSubmit() { async function handleSubmit() {
try { try {
const values = await validate() const values = await validate() as any
setModalProps({ confirmLoading: true }) setModalProps({ confirmLoading: true })
if (unref(isUpdate)) if (unref(isUpdate))
await updateDictData(values) await updateDictData(values)

2
src/views/system/dict/DictTypeModal.vue

@ -34,7 +34,7 @@ const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data
async function handleSubmit() { async function handleSubmit() {
try { try {
const values = await validate() const values = await validate() as any
setModalProps({ confirmLoading: true }) setModalProps({ confirmLoading: true })
if (unref(isUpdate)) if (unref(isUpdate))
await updateDictType(values) await updateDictType(values)

2
src/views/system/errorCode/ErrorCodeModal.vue

@ -34,7 +34,7 @@ const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data
async function handleSubmit() { async function handleSubmit() {
try { try {
const values = await validate() const values = await validate() as any
setModalProps({ confirmLoading: true }) setModalProps({ confirmLoading: true })
if (unref(isUpdate)) if (unref(isUpdate))
await updateErrorCode(values) await updateErrorCode(values)

2
src/views/system/menu/MenuModal.vue

@ -34,7 +34,7 @@ const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data
async function handleSubmit() { async function handleSubmit() {
try { try {
const values = await validate() const values = await validate() as any
setModalProps({ confirmLoading: true }) setModalProps({ confirmLoading: true })
if (unref(isUpdate)) if (unref(isUpdate))
await updateMenu(values) await updateMenu(values)

2
src/views/system/notice/NoticeModal.vue

@ -34,7 +34,7 @@ const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data
async function handleSubmit() { async function handleSubmit() {
try { try {
const values = await validate() const values = await validate() as any
setModalProps({ confirmLoading: true }) setModalProps({ confirmLoading: true })
if (unref(isUpdate)) if (unref(isUpdate))
await updateNotice(values) await updateNotice(values)

2
src/views/system/oauth2/client/ClientModal.vue

@ -34,7 +34,7 @@ const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data
async function handleSubmit() { async function handleSubmit() {
try { try {
const values = await validate() const values = await validate() as any
setModalProps({ confirmLoading: true }) setModalProps({ confirmLoading: true })
if (unref(isUpdate)) if (unref(isUpdate))
await updateOAuth2Client(values) await updateOAuth2Client(values)

2
src/views/system/role/RoleModal.vue

@ -34,7 +34,7 @@ const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data
async function handleSubmit() { async function handleSubmit() {
try { try {
const values = await validate() const values = await validate() as any
setModalProps({ confirmLoading: true }) setModalProps({ confirmLoading: true })
if (unref(isUpdate)) if (unref(isUpdate))
await updateRole(values) await updateRole(values)

2
src/views/system/role/RoleScopeModal.vue

@ -41,7 +41,7 @@ const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data
async function handleSubmit() { async function handleSubmit() {
try { try {
const values = await validate() const values = await validate() as any
setModalProps({ confirmLoading: true }) setModalProps({ confirmLoading: true })
await assignRoleDataScope(values) await assignRoleDataScope(values)
closeModal() closeModal()

2
src/views/system/role/role.data.ts

@ -143,7 +143,6 @@ export const menuScopeFormSchema: FormSchema[] = [
{ {
label: '菜单权限', label: '菜单权限',
field: 'menuIds', field: 'menuIds',
component: 'Input',
slot: 'menuIds', slot: 'menuIds',
}, },
] ]
@ -180,7 +179,6 @@ export const dataScopeFormSchema: FormSchema[] = [
label: '数据权限', label: '数据权限',
field: 'dataScopeDeptIds', field: 'dataScopeDeptIds',
ifShow: ({ values }) => values.dataScope === SystemDataScopeEnum.DEPT_CUSTOM, ifShow: ({ values }) => values.dataScope === SystemDataScopeEnum.DEPT_CUSTOM,
component: 'Input',
slot: 'dataScopeDeptIds', slot: 'dataScopeDeptIds',
}, },
] ]

2
src/views/system/sensitiveWord/SensitiveWordModal.vue

@ -34,7 +34,7 @@ const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data
async function handleSubmit() { async function handleSubmit() {
try { try {
const values = await validate() const values = await validate() as any
setModalProps({ confirmLoading: true }) setModalProps({ confirmLoading: true })
if (unref(isUpdate)) if (unref(isUpdate))
await updateSensitiveWord(values) await updateSensitiveWord(values)

2
src/views/system/sms/channel/SmsChannelModal.vue

@ -34,7 +34,7 @@ const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data
async function handleSubmit() { async function handleSubmit() {
try { try {
const values = await validate() const values = await validate() as any
setModalProps({ confirmLoading: true }) setModalProps({ confirmLoading: true })
if (unref(isUpdate)) if (unref(isUpdate))
await updateSmsChannel(values) await updateSmsChannel(values)

2
src/views/system/sms/template/SmsTemplateModal.vue

@ -34,7 +34,7 @@ const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data
async function handleSubmit() { async function handleSubmit() {
try { try {
const values = await validate() const values = await validate() as any
setModalProps({ confirmLoading: true }) setModalProps({ confirmLoading: true })
if (unref(isUpdate)) if (unref(isUpdate))
await updateSmsTemplate(values) await updateSmsTemplate(values)

2
src/views/system/tenant/TenantModal.vue

@ -34,7 +34,7 @@ const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data
async function handleSubmit() { async function handleSubmit() {
try { try {
const values = await validate() const values = await validate() as any
setModalProps({ confirmLoading: true }) setModalProps({ confirmLoading: true })
if (unref(isUpdate)) if (unref(isUpdate))
await updateTenant(values) await updateTenant(values)

2
src/views/system/tenantPackage/TenantPackageModal.vue

@ -67,7 +67,7 @@ const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data
async function handleSubmit() { async function handleSubmit() {
try { try {
const values = await validate() const values = await validate() as any
values.menuIds = [...menuKeys.value, ...menuHalfKeys.value] values.menuIds = [...menuKeys.value, ...menuHalfKeys.value]
setModalProps({ confirmLoading: true }) setModalProps({ confirmLoading: true })
if (unref(isUpdate)) if (unref(isUpdate))

1
src/views/system/tenantPackage/tenantPackage.data.ts

@ -77,7 +77,6 @@ export const formSchema: FormSchema[] = [
label: '菜单权限', label: '菜单权限',
field: 'menuIds', field: 'menuIds',
slot: 'menuIds', slot: 'menuIds',
component: 'Input',
}, },
{ {
label: '状态', label: '状态',

2
src/views/system/user/UserModal.vue

@ -34,7 +34,7 @@ const [registerModal, { setModalProps, closeModal }] = useModalInner(async (data
async function handleSubmit() { async function handleSubmit() {
try { try {
const values = await validate() const values = await validate() as any
setModalProps({ confirmLoading: true }) setModalProps({ confirmLoading: true })
if (unref(isUpdate)) if (unref(isUpdate))
await updateUser(values) await updateUser(values)

2
tsconfig.json

@ -37,5 +37,5 @@
"build/**/*.d.ts", "build/**/*.d.ts",
"vite.config.ts" "vite.config.ts"
], ],
"exclude": ["node_modules", "dist"] "exclude": ["node_modules", "dist", "./src/components/FormDesign/*"]
} }