mirror of
https://gitcode.com/yangzongzhuan/RuoYi-Vue3.git
synced 2026-05-22 19:08:37 +00:00
自动导入配置
This commit is contained in:
@@ -206,7 +206,7 @@ const dialogVisible = computed({
|
||||
})
|
||||
|
||||
const { proxy } = getCurrentInstance()!
|
||||
const { sys_job_group } = proxy!.useDict('sys_job_group')
|
||||
const { sys_job_group } = useDict('sys_job_group')
|
||||
|
||||
const jobForm = computed<SysJob>(() => props.row as SysJob)
|
||||
const logForm = computed<SysJobLog>(() => props.row as SysJobLog)
|
||||
|
||||
@@ -246,7 +246,7 @@ import type { JobQueryParams, SysJob } from '@/types/api/monitor/job'
|
||||
|
||||
const router = useRouter()
|
||||
const { proxy } = getCurrentInstance()
|
||||
const { sys_job_group, sys_job_status } = proxy.useDict("sys_job_group", "sys_job_status")
|
||||
const { sys_job_group, sys_job_status } = useDict("sys_job_group", "sys_job_status")
|
||||
|
||||
const jobList = ref<SysJob[]>([])
|
||||
const open = ref<boolean>(false)
|
||||
|
||||
@@ -145,7 +145,7 @@ import type { SysJobLog, JobLogQueryParams } from '@/types/api/monitor/jobLog'
|
||||
import type { SysJob } from '@/types/api/monitor/job'
|
||||
|
||||
const { proxy } = getCurrentInstance()
|
||||
const { sys_common_status, sys_job_group } = proxy.useDict("sys_common_status", "sys_job_group")
|
||||
const { sys_common_status, sys_job_group } = useDict("sys_common_status", "sys_job_group")
|
||||
|
||||
const jobLogList = ref<SysJobLog[]>([])
|
||||
const open = ref<boolean>(false)
|
||||
|
||||
@@ -129,7 +129,7 @@ import { list, delLogininfor, cleanLogininfor, unlockLogininfor } from "@/api/mo
|
||||
import type { SysLogininfor, LogininforQueryParams } from '@/types/api/monitor/logininfor'
|
||||
|
||||
const { proxy } = getCurrentInstance()
|
||||
const { sys_common_status } = proxy.useDict("sys_common_status")
|
||||
const { sys_common_status } = useDict("sys_common_status")
|
||||
|
||||
const logininforList = ref<SysLogininfor[]>([])
|
||||
const loading = ref<boolean>(true)
|
||||
|
||||
@@ -127,10 +127,10 @@ const dialogVisible = computed({
|
||||
set: (val: boolean) => emit('update:visible', val)
|
||||
})
|
||||
|
||||
const { sys_oper_type } = proxy.useDict('sys_oper_type')
|
||||
const { sys_oper_type } = useDict('sys_oper_type')
|
||||
|
||||
const form = computed<SysOperLog>(() => props.row || {})
|
||||
const typeLabel = computed<string>(() => proxy.selectDictLabel(sys_oper_type.value, form.value.businessType) || '-')
|
||||
const typeLabel = computed<string>(() => selectDictLabel(sys_oper_type.value, form.value.businessType) || '-')
|
||||
|
||||
function formatJson(str?: string): string {
|
||||
if (!str) return '(无数据)'
|
||||
|
||||
@@ -158,7 +158,7 @@ import { list, delOperlog, cleanOperlog } from "@/api/monitor/operlog"
|
||||
import type { SysOperLog, OperlogQueryParams } from '@/types/api/monitor/operlog'
|
||||
|
||||
const { proxy } = getCurrentInstance()
|
||||
const { sys_oper_type, sys_common_status } = proxy.useDict("sys_oper_type", "sys_common_status")
|
||||
const { sys_oper_type, sys_common_status } = useDict("sys_oper_type", "sys_common_status")
|
||||
|
||||
const operlogList = ref<SysOperLog[]>([])
|
||||
const detailVisible = ref<boolean>(false)
|
||||
|
||||
@@ -169,7 +169,7 @@ import type { SysConfig, ConfigQueryParams } from '@/types/api/system/config'
|
||||
import { listConfig, getConfig, delConfig, addConfig, updateConfig, refreshCache } from "@/api/system/config"
|
||||
|
||||
const { proxy } = getCurrentInstance()
|
||||
const { sys_yes_no } = proxy.useDict("sys_yes_no")
|
||||
const { sys_yes_no } = useDict("sys_yes_no")
|
||||
|
||||
const configList = ref<SysConfig[]>([])
|
||||
const open = ref<boolean>(false)
|
||||
|
||||
@@ -159,7 +159,7 @@ import type { SysDept, DeptQueryParams } from '@/types/api/system/dept'
|
||||
import type { TreeSelect } from '@/types/api/common'
|
||||
|
||||
const { proxy } = getCurrentInstance()
|
||||
const { sys_normal_disable } = proxy.useDict("sys_normal_disable")
|
||||
const { sys_normal_disable } = useDict("sys_normal_disable")
|
||||
|
||||
const deptList = ref<any[]>([])
|
||||
const open = ref<boolean>(false)
|
||||
|
||||
@@ -187,7 +187,7 @@ interface ListClassOption {
|
||||
}
|
||||
|
||||
const { proxy } = getCurrentInstance()
|
||||
const { sys_normal_disable } = proxy.useDict("sys_normal_disable")
|
||||
const { sys_normal_disable } = useDict("sys_normal_disable")
|
||||
|
||||
const dataList = ref<SysDictData[]>([])
|
||||
const open = ref<boolean>(false)
|
||||
|
||||
@@ -187,7 +187,7 @@ import { listType, getType, delType, addType, updateType, refreshCache } from "@
|
||||
import type { SysDictType, DictTypeQueryParams } from '@/types/api/system/dict'
|
||||
|
||||
const { proxy } = getCurrentInstance()
|
||||
const { sys_normal_disable } = proxy.useDict("sys_normal_disable")
|
||||
const { sys_normal_disable } = useDict("sys_normal_disable")
|
||||
|
||||
const typeList = ref<SysDictType[]>([])
|
||||
const open = ref<boolean>(false)
|
||||
|
||||
@@ -312,7 +312,7 @@ import IconSelect from "@/components/IconSelect/index.vue"
|
||||
import type { SysMenu, MenuQueryParams } from '@/types/api/system/menu'
|
||||
|
||||
const { proxy } = getCurrentInstance()
|
||||
const { sys_show_hide, sys_normal_disable } = proxy.useDict("sys_show_hide", "sys_normal_disable")
|
||||
const { sys_show_hide, sys_normal_disable } = useDict("sys_show_hide", "sys_normal_disable")
|
||||
|
||||
const menuList = ref<any[]>([])
|
||||
const open = ref<boolean>(false)
|
||||
|
||||
@@ -163,7 +163,7 @@ import { listNotice, getNotice, delNotice, addNotice, updateNotice } from "@/api
|
||||
import type { SysNotice, NoticeQueryParams } from '@/types/api/system/notice'
|
||||
|
||||
const { proxy } = getCurrentInstance()
|
||||
const { sys_notice_status, sys_notice_type } = proxy.useDict("sys_notice_status", "sys_notice_type")
|
||||
const { sys_notice_status, sys_notice_type } = useDict("sys_notice_status", "sys_notice_type")
|
||||
|
||||
const noticeList = ref<SysNotice[]>([])
|
||||
const open = ref<boolean>(false)
|
||||
|
||||
@@ -149,7 +149,7 @@ import { listPost, addPost, delPost, getPost, updatePost } from "@/api/system/po
|
||||
import type { SysPost, PostQueryParams } from '@/types/api/system/post'
|
||||
|
||||
const { proxy } = getCurrentInstance()
|
||||
const { sys_normal_disable } = proxy.useDict("sys_normal_disable")
|
||||
const { sys_normal_disable } = useDict("sys_normal_disable")
|
||||
|
||||
const postList = ref<SysPost[]>([])
|
||||
const open = ref<boolean>(false)
|
||||
|
||||
@@ -98,7 +98,7 @@ import type { SysUser, AuthUserQueryParams } from '@/types/api/system/user'
|
||||
|
||||
const route = useRoute()
|
||||
const { proxy } = getCurrentInstance()
|
||||
const { sys_normal_disable } = proxy.useDict("sys_normal_disable")
|
||||
const { sys_normal_disable } = useDict("sys_normal_disable")
|
||||
|
||||
const userList = ref<SysUser[]>([])
|
||||
const loading = ref<boolean>(true)
|
||||
|
||||
@@ -251,7 +251,7 @@ import type { RoleMenuTreeselectResult } from '@/types/api/system/menu'
|
||||
|
||||
const router = useRouter()
|
||||
const { proxy } = getCurrentInstance()
|
||||
const { sys_normal_disable } = proxy.useDict("sys_normal_disable")
|
||||
const { sys_normal_disable } = useDict("sys_normal_disable")
|
||||
|
||||
const roleList = ref<SysRole[]>([])
|
||||
const open = ref<boolean>(false)
|
||||
|
||||
@@ -71,7 +71,7 @@ const props = defineProps({
|
||||
})
|
||||
|
||||
const { proxy } = getCurrentInstance()
|
||||
const { sys_normal_disable } = proxy.useDict("sys_normal_disable")
|
||||
const { sys_normal_disable } = useDict("sys_normal_disable")
|
||||
|
||||
const userList = ref<SysUser[]>([])
|
||||
const visible = ref<boolean>(false)
|
||||
|
||||
@@ -198,7 +198,7 @@ import type { TreeSelect, TableShowColumns, AjaxResult } from '@/types/api/commo
|
||||
const router = useRouter()
|
||||
const appStore = useAppStore()
|
||||
const { proxy } = getCurrentInstance()
|
||||
const { sys_normal_disable, sys_user_sex } = proxy.useDict("sys_normal_disable", "sys_user_sex")
|
||||
const { sys_normal_disable, sys_user_sex } = useDict("sys_normal_disable", "sys_user_sex")
|
||||
|
||||
const userList = ref<SysUser[]>([])
|
||||
const open = ref<boolean>(false)
|
||||
|
||||
@@ -138,9 +138,9 @@ const postOptions = ref<SysPost[]>([])
|
||||
const roleOptions = ref<SysRole[]>([])
|
||||
const { proxy } = getCurrentInstance()
|
||||
|
||||
const { sys_user_sex } = proxy.useDict("sys_user_sex")
|
||||
const { sys_user_sex } = useDict("sys_user_sex")
|
||||
|
||||
const sexLabel = computed(() => proxy.selectDictLabel(sys_user_sex.value, info.sex) || '-')
|
||||
const sexLabel = computed(() => selectDictLabel(sys_user_sex.value, info.sex) || '-')
|
||||
|
||||
const postNames = computed<string>(() => {
|
||||
if (!postOptions.value.length || !info.postIds) return ''
|
||||
|
||||
@@ -5,7 +5,11 @@ export default function createAutoImport() {
|
||||
imports: [
|
||||
'vue',
|
||||
'vue-router',
|
||||
'pinia'
|
||||
'pinia',
|
||||
{
|
||||
'@/utils/dict': ['useDict'],
|
||||
'@/utils/ruoyi': ['selectDictLabel']
|
||||
}
|
||||
],
|
||||
dts: true
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user