mirror of
https://gitcode.com/yangzongzhuan/RuoYi-Vue3.git
synced 2026-05-22 10:58:38 +00:00
自动导入配置
This commit is contained in:
@@ -200,7 +200,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 form = computed(() => props.row || {})
|
||||
|
||||
|
||||
@@ -245,7 +245,7 @@ import { listJob, getJob, delJob, addJob, updateJob, runJob, changeJobStatus } f
|
||||
|
||||
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([])
|
||||
const open = ref(false)
|
||||
|
||||
@@ -143,7 +143,7 @@ import { getJob } from "@/api/monitor/job"
|
||||
import { listJobLog, delJobLog, cleanJobLog } from "@/api/monitor/jobLog"
|
||||
|
||||
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([])
|
||||
const open = ref(false)
|
||||
|
||||
@@ -128,7 +128,7 @@
|
||||
import { list, delLogininfor, cleanLogininfor, unlockLogininfor } from "@/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([])
|
||||
const loading = ref(true)
|
||||
|
||||
@@ -112,8 +112,6 @@
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
const { proxy } = getCurrentInstance()
|
||||
|
||||
const props = defineProps({
|
||||
visible: { type: Boolean, default: false },
|
||||
row: { type: Object, default: () => ({}) }
|
||||
@@ -127,10 +125,10 @@ const dialogVisible = computed({
|
||||
})
|
||||
|
||||
|
||||
const { sys_oper_type } = proxy.useDict('sys_oper_type')
|
||||
const { sys_oper_type } = useDict('sys_oper_type')
|
||||
|
||||
const form = computed(() => props.row || {})
|
||||
const typeLabel = computed(() => proxy.selectDictLabel(sys_oper_type.value, form.value.businessType) || '-')
|
||||
const typeLabel = computed(() => selectDictLabel(sys_oper_type.value, form.value.businessType) || '-')
|
||||
|
||||
function formatJson(str) {
|
||||
if (!str) return '(无数据)'
|
||||
|
||||
@@ -157,7 +157,7 @@ import OperlogDetail from './detail'
|
||||
import { list, delOperlog, cleanOperlog } from "@/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([])
|
||||
const detailVisible = ref(false)
|
||||
|
||||
@@ -168,7 +168,7 @@
|
||||
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([])
|
||||
const open = ref(false)
|
||||
|
||||
@@ -157,7 +157,7 @@
|
||||
import { listDept, getDept, delDept, addDept, updateDept, updateDeptSort, listDeptExcludeChild } from "@/api/system/dept"
|
||||
|
||||
const { proxy } = getCurrentInstance()
|
||||
const { sys_normal_disable } = proxy.useDict("sys_normal_disable")
|
||||
const { sys_normal_disable } = useDict("sys_normal_disable")
|
||||
|
||||
const deptList = ref([])
|
||||
const open = ref(false)
|
||||
|
||||
@@ -181,7 +181,7 @@ import { optionselect as getDictOptionselect, getType } from "@/api/system/dict/
|
||||
import { listData, getData, delData, addData, updateData } from "@/api/system/dict/data"
|
||||
|
||||
const { proxy } = getCurrentInstance()
|
||||
const { sys_normal_disable } = proxy.useDict("sys_normal_disable")
|
||||
const { sys_normal_disable } = useDict("sys_normal_disable")
|
||||
|
||||
const dataList = ref([])
|
||||
const open = ref(false)
|
||||
|
||||
@@ -186,7 +186,7 @@ import useDictStore from '@/store/modules/dict'
|
||||
import { listType, getType, delType, addType, updateType, refreshCache } from "@/api/system/dict/type"
|
||||
|
||||
const { proxy } = getCurrentInstance()
|
||||
const { sys_normal_disable } = proxy.useDict("sys_normal_disable")
|
||||
const { sys_normal_disable } = useDict("sys_normal_disable")
|
||||
|
||||
const typeList = ref([])
|
||||
const open = ref(false)
|
||||
|
||||
@@ -311,7 +311,7 @@ import SvgIcon from "@/components/SvgIcon"
|
||||
import IconSelect from "@/components/IconSelect"
|
||||
|
||||
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([])
|
||||
const open = ref(false)
|
||||
|
||||
@@ -162,7 +162,7 @@
|
||||
import { listNotice, getNotice, delNotice, addNotice, updateNotice } from "@/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([])
|
||||
const open = ref(false)
|
||||
|
||||
@@ -148,7 +148,7 @@
|
||||
import { listPost, addPost, delPost, getPost, updatePost } from "@/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([])
|
||||
const open = ref(false)
|
||||
|
||||
@@ -97,7 +97,7 @@ import { allocatedUserList, authUserCancel, authUserCancelAll } from "@/api/syst
|
||||
|
||||
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([])
|
||||
const loading = ref(true)
|
||||
|
||||
@@ -247,7 +247,7 @@ import { roleMenuTreeselect, treeselect as menuTreeselect } from "@/api/system/m
|
||||
|
||||
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([])
|
||||
const open = ref(false)
|
||||
|
||||
@@ -70,7 +70,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([])
|
||||
const visible = ref(false)
|
||||
|
||||
@@ -194,7 +194,7 @@ import { changeUserStatus, listUser, resetUserPwd, delUser, getUser, updateUser,
|
||||
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([])
|
||||
const open = ref(false)
|
||||
|
||||
@@ -133,11 +133,10 @@ const loading = ref(false)
|
||||
const info = reactive({})
|
||||
const postOptions = ref([])
|
||||
const roleOptions = ref([])
|
||||
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(() => {
|
||||
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: false
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user