可信代码库-字典接口对接语言列表待补充
This commit is contained in:
@@ -359,3 +359,15 @@ export function uploadImage(file: File) {
|
|||||||
// }
|
// }
|
||||||
// });
|
// });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 获取字典
|
||||||
|
export function basicDict(data) {
|
||||||
|
return axios.request({
|
||||||
|
url: '/gateway/basic/dict/children/list',
|
||||||
|
method: 'POST',
|
||||||
|
data: data,
|
||||||
|
headers: {
|
||||||
|
Authorization: 'Bearer ' + localStorage.getItem('access_token')
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|||||||
@@ -52,6 +52,8 @@ export const injectRouter = (router) => {
|
|||||||
// 判断命名空间类型
|
// 判断命名空间类型
|
||||||
const globalStore = useGlobalInfoStore();
|
const globalStore = useGlobalInfoStore();
|
||||||
globalStore.setNamespaceType(-1); // 重置namespaceType,防止非组织路由请求组织信息
|
globalStore.setNamespaceType(-1); // 重置namespaceType,防止非组织路由请求组织信息
|
||||||
|
debugger
|
||||||
|
globalStore.setLanguageList();
|
||||||
if (to.meta.pageType === 'userOrOrg') {
|
if (to.meta.pageType === 'userOrOrg') {
|
||||||
const { namespace } = to.params;
|
const { namespace } = to.params;
|
||||||
const params = {
|
const params = {
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import menu from '@/constant/menu';
|
|||||||
import { type listType, type itemProps } from '@/components/NavTabs/types';
|
import { type listType, type itemProps } from '@/components/NavTabs/types';
|
||||||
import { useRoute, useRouter } from 'vue-router';
|
import { useRoute, useRouter } from 'vue-router';
|
||||||
import { getCustomMenuList } from '@/api/org/devIndex';
|
import { getCustomMenuList } from '@/api/org/devIndex';
|
||||||
|
import { basicDict } from '@/api/jyh';
|
||||||
|
|
||||||
export const useGlobalInfoStore = defineStore('globalInfo', () => {
|
export const useGlobalInfoStore = defineStore('globalInfo', () => {
|
||||||
const route = useRoute();
|
const route = useRoute();
|
||||||
@@ -30,6 +31,8 @@ export const useGlobalInfoStore = defineStore('globalInfo', () => {
|
|||||||
{ value: 'National_Defense', name: '国防' },
|
{ value: 'National_Defense', name: '国防' },
|
||||||
]);
|
]);
|
||||||
|
|
||||||
|
const languageList = ref([]);
|
||||||
|
|
||||||
const menuInfo = computed(() => {
|
const menuInfo = computed(() => {
|
||||||
// 当前菜单
|
// 当前菜单
|
||||||
return globalMenuInfo.value[menuType.value] || [];
|
return globalMenuInfo.value[menuType.value] || [];
|
||||||
@@ -78,6 +81,13 @@ export const useGlobalInfoStore = defineStore('globalInfo', () => {
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// TODO:获取语言列表,待开发
|
||||||
|
const setLanguageList = async() => {
|
||||||
|
const res = await basicDict({
|
||||||
|
parentId: 184
|
||||||
|
});
|
||||||
|
};
|
||||||
|
|
||||||
const updateHeaderSearch = (data: any) => {
|
const updateHeaderSearch = (data: any) => {
|
||||||
headerSearch.value = { ...data };
|
headerSearch.value = { ...data };
|
||||||
}
|
}
|
||||||
@@ -137,6 +147,7 @@ export const useGlobalInfoStore = defineStore('globalInfo', () => {
|
|||||||
setNamespaceType,
|
setNamespaceType,
|
||||||
setGlobalTheme,
|
setGlobalTheme,
|
||||||
updateHeaderSearch,
|
updateHeaderSearch,
|
||||||
industryList
|
industryList,
|
||||||
|
setLanguageList
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user