可信代码库-编程语言接口对接
This commit is contained in:
@@ -362,12 +362,10 @@ export function uploadImage(file: File) {
|
|||||||
|
|
||||||
// 获取字典
|
// 获取字典
|
||||||
export function basicDict(data) {
|
export function basicDict(data) {
|
||||||
return axios.request({
|
|
||||||
url: '/gateway/basic/dict/children/list',
|
return request({
|
||||||
method: 'POST',
|
url: `dict/children/list`,
|
||||||
|
method: 'post',
|
||||||
data: data,
|
data: data,
|
||||||
headers: {
|
|
||||||
Authorization: 'Bearer ' + localStorage.getItem('access_token')
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -102,7 +102,8 @@ const props = defineProps({
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
const emit = defineEmits(['submit', 'cancel', 'update:modelValue']);
|
const emit = defineEmits(['submit', 'cancel', 'update:modelValue']);
|
||||||
const languageList = ref([]);
|
// const languageList = ref([]);
|
||||||
|
const languageList = globalInfo.languageList;
|
||||||
|
|
||||||
const formData = ref({ ...props.modelValue });
|
const formData = ref({ ...props.modelValue });
|
||||||
|
|
||||||
@@ -152,7 +153,7 @@ const getLanguageList = async () => {
|
|||||||
languageList.value = res.data.data;
|
languageList.value = res.data.data;
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
getLanguageList();
|
// getLanguageList();
|
||||||
|
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
const _searchForm = localStorage.getItem('searchForm');
|
const _searchForm = localStorage.getItem('searchForm');
|
||||||
|
|||||||
@@ -52,7 +52,6 @@ export const injectRouter = (router) => {
|
|||||||
// 判断命名空间类型
|
// 判断命名空间类型
|
||||||
const globalStore = useGlobalInfoStore();
|
const globalStore = useGlobalInfoStore();
|
||||||
globalStore.setNamespaceType(-1); // 重置namespaceType,防止非组织路由请求组织信息
|
globalStore.setNamespaceType(-1); // 重置namespaceType,防止非组织路由请求组织信息
|
||||||
debugger
|
|
||||||
globalStore.setLanguageList();
|
globalStore.setLanguageList();
|
||||||
if (to.meta.pageType === 'userOrOrg') {
|
if (to.meta.pageType === 'userOrOrg') {
|
||||||
const { namespace } = to.params;
|
const { namespace } = to.params;
|
||||||
|
|||||||
@@ -86,6 +86,15 @@ export const useGlobalInfoStore = defineStore('globalInfo', () => {
|
|||||||
const res = await basicDict({
|
const res = await basicDict({
|
||||||
parentId: 184
|
parentId: 184
|
||||||
});
|
});
|
||||||
|
if(res.data.code===200) {
|
||||||
|
languageList.value = res.data.data.map(i=>{
|
||||||
|
return {
|
||||||
|
id: i.id,
|
||||||
|
label: i.dictKey,
|
||||||
|
value: i.dictValue
|
||||||
|
}
|
||||||
|
})
|
||||||
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
const updateHeaderSearch = (data: any) => {
|
const updateHeaderSearch = (data: any) => {
|
||||||
@@ -148,6 +157,7 @@ export const useGlobalInfoStore = defineStore('globalInfo', () => {
|
|||||||
setGlobalTheme,
|
setGlobalTheme,
|
||||||
updateHeaderSearch,
|
updateHeaderSearch,
|
||||||
industryList,
|
industryList,
|
||||||
setLanguageList
|
setLanguageList,
|
||||||
|
languageList
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -250,8 +250,9 @@ const countryVisible = ref(false);
|
|||||||
const orgVisible = ref(false);
|
const orgVisible = ref(false);
|
||||||
const allTableData = ref([]);
|
const allTableData = ref([]);
|
||||||
const tableData = ref([]);
|
const tableData = ref([]);
|
||||||
const languageList = ref([]);
|
// const languageList = ref([]);
|
||||||
const globalInfo = useGlobalInfoStore();
|
const globalInfo = useGlobalInfoStore();
|
||||||
|
const languageList = globalInfo.languageList;
|
||||||
const headerSearch = ref(globalInfo.headerSearch);
|
const headerSearch = ref(globalInfo.headerSearch);
|
||||||
const industryList = ref(globalInfo.industryList);
|
const industryList = ref(globalInfo.industryList);
|
||||||
const newFormData = ref({
|
const newFormData = ref({
|
||||||
@@ -518,7 +519,7 @@ const getLanguageList = async () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
onMounted(async () => {
|
onMounted(async () => {
|
||||||
await getLanguageList();
|
// await getLanguageList();
|
||||||
newFormData.value.softwareName = route.query.softwareName || '';
|
newFormData.value.softwareName = route.query.softwareName || '';
|
||||||
newFormData.value.searchType = route.query.searchType || '';
|
newFormData.value.searchType = route.query.searchType || '';
|
||||||
newFormData.value.softwareVersion = route.query.softwareVersion || '';
|
newFormData.value.softwareVersion = route.query.softwareVersion || '';
|
||||||
|
|||||||
Reference in New Issue
Block a user