|
@@ -96,13 +96,16 @@
|
|
|
import { computed, getCurrentInstance, onMounted, reactive } from 'vue'
|
|
|
import { useAppStore, useDialogStore, useDictionaryStore } from '@/stores'
|
|
|
import { useRoute, useRouter } from 'vue-router'
|
|
|
+import { sysDict } from '@/api/modules/global/dictionary'
|
|
|
+import { copy } from '@/utils/czr-util'
|
|
|
+import { ElMessage } from 'element-plus'
|
|
|
+import { loginChangeTenant, loginLogout } from '@/api/modules/global/login'
|
|
|
|
|
|
const AppStore = useAppStore()
|
|
|
const DictionaryStore = useDictionaryStore()
|
|
|
const DialogStore = useDialogStore()
|
|
|
const router = useRouter()
|
|
|
const route = useRoute()
|
|
|
-const { proxy } = getCurrentInstance()
|
|
|
const state: any = reactive({
|
|
|
drawer: false,
|
|
|
dictMap: new Map(),
|
|
@@ -113,20 +116,6 @@ const menusCpt: any = computed(
|
|
|
() => router.options.routes.filter((v) => v.name === 'root')[0],
|
|
|
)
|
|
|
|
|
|
-import { sysDict } from '@/api/modules/global/dictionary'
|
|
|
-import { copy } from '@/utils/czr-util'
|
|
|
-import { ElMessage } from 'element-plus'
|
|
|
-import { loginChangeTenant, loginLogout } from '@/api/modules/global/login'
|
|
|
-sysDict().then(({ data }: any) => {
|
|
|
- data.forEach((v) => {
|
|
|
- const d = state.dictMap.get(v.dictType)
|
|
|
- if (d) {
|
|
|
- d.children.push(v)
|
|
|
- } else {
|
|
|
- state.dictMap.set(v.dictType, { name: v.remark, children: [v] })
|
|
|
- }
|
|
|
- })
|
|
|
-})
|
|
|
const copyDict = (label, value) => {
|
|
|
try {
|
|
|
const key = value.replace(/_([a-z])/g, (match, letter) =>
|
|
@@ -167,7 +156,18 @@ const logout = () => {
|
|
|
},
|
|
|
})
|
|
|
}
|
|
|
-onMounted(() => {})
|
|
|
+onMounted(() => {
|
|
|
+ sysDict().then(({ data }: any) => {
|
|
|
+ data.forEach((v) => {
|
|
|
+ const d = state.dictMap.get(v.dictType)
|
|
|
+ if (d) {
|
|
|
+ d.children.push(v)
|
|
|
+ } else {
|
|
|
+ state.dictMap.set(v.dictType, { name: v.remark, children: [v] })
|
|
|
+ }
|
|
|
+ })
|
|
|
+ })
|
|
|
+})
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss" scoped>
|