Merge branch 'master' of https://gitcode.com/hk_openRepo/OpenRepo_Portal into wsw
This commit is contained in:
@@ -147,19 +147,19 @@ const { isLogin } = useDiscussGetUserInfo();
|
|||||||
const homeSearch = ref(null);
|
const homeSearch = ref(null);
|
||||||
const dropdownWidth = ref(0);
|
const dropdownWidth = ref(0);
|
||||||
const tagMap = {
|
const tagMap = {
|
||||||
critical: {
|
Critical: {
|
||||||
text: '致命',
|
text: '致命',
|
||||||
color: '#c7000b'
|
color: '#c7000b'
|
||||||
},
|
},
|
||||||
high: {
|
High: {
|
||||||
text: '高',
|
text: '高',
|
||||||
color: '#f66f6a'
|
color: '#f66f6a'
|
||||||
},
|
},
|
||||||
medium: {
|
Medium: {
|
||||||
text: '中',
|
text: '中',
|
||||||
color: '#fac20a'
|
color: '#fac20a'
|
||||||
},
|
},
|
||||||
low: {
|
Low: {
|
||||||
text: '低',
|
text: '低',
|
||||||
color: '#5e7ce0'
|
color: '#5e7ce0'
|
||||||
},
|
},
|
||||||
@@ -203,11 +203,9 @@ const closeOutside = () => {
|
|||||||
};
|
};
|
||||||
|
|
||||||
const submit = (formData) => {
|
const submit = (formData) => {
|
||||||
debugger;
|
debugger
|
||||||
isOpen.value = false;
|
isOpen.value = false;
|
||||||
router.push({
|
router.push({ name: 'Search', query: {
|
||||||
name: 'Search',
|
|
||||||
query: {
|
|
||||||
softwareName: searchStr.value ? searchStr.value : '',
|
softwareName: searchStr.value ? searchStr.value : '',
|
||||||
searchType: getIndustryValue(searchType.value),
|
searchType: getIndustryValue(searchType.value),
|
||||||
softwareVersion: formData.softwareVersion || '',
|
softwareVersion: formData.softwareVersion || '',
|
||||||
@@ -216,10 +214,9 @@ const submit = (formData) => {
|
|||||||
industry: formData.industry || '',
|
industry: formData.industry || '',
|
||||||
licenseName: formData.licenseName || '',
|
licenseName: formData.licenseName || '',
|
||||||
dependentSoftware: formData.dependentSoftware || '',
|
dependentSoftware: formData.dependentSoftware || '',
|
||||||
releaseDateStart: formData.dateRange && formData.dateRange.length > 0 ? formData.dateRange[0] : '',
|
releaseDateStart: formData.dateRange&&formData.dateRange.length>0?formData.dateRange[0]:'',
|
||||||
releaseDateEnd: formData.dateRange && formData.dateRange.length > 0 ? formData.dateRange[1] : ''
|
releaseDateEnd: formData.dateRange&&formData.dateRange.length>0?formData.dateRange[1]:'',
|
||||||
}
|
} });
|
||||||
});
|
|
||||||
};
|
};
|
||||||
|
|
||||||
const inputFocus = () => {
|
const inputFocus = () => {
|
||||||
@@ -238,19 +235,15 @@ const updateDropdownWidth = () => {
|
|||||||
const globalInfo = useGlobalInfoStore();
|
const globalInfo = useGlobalInfoStore();
|
||||||
const industryList = globalInfo.industryList;
|
const industryList = globalInfo.industryList;
|
||||||
const getIndustryValue = (name) => {
|
const getIndustryValue = (name) => {
|
||||||
const industry = industryList.find((item) => item.name === name);
|
const industry = industryList.find(item => item.name === name);
|
||||||
return industry ? industry.value : ''; // 如果找不到,返回默认值
|
return industry ? industry.value : ''; // 如果找不到,返回默认值
|
||||||
};
|
};
|
||||||
|
|
||||||
const search = () => {
|
const search = () => {
|
||||||
// updateHeaderSearch({ searchWord: searchStr.value, searchType: selectedCate.value });
|
// updateHeaderSearch({ searchWord: searchStr.value, searchType: selectedCate.value });
|
||||||
router.push({
|
router.push({ name: 'Search', query: {
|
||||||
name: 'Search',
|
|
||||||
query: {
|
|
||||||
softwareName: searchStr.value ? searchStr.value : '',
|
softwareName: searchStr.value ? searchStr.value : '',
|
||||||
searchType: getIndustryValue(searchType.value)
|
searchType: getIndustryValue(searchType.value)} });
|
||||||
}
|
|
||||||
});
|
|
||||||
// window.open(`${import.meta.env.VITE_BASE_URL}repoList?softwareName=${searchStr.value ? searchStr.value : ''}&searchType=${getIndustryValue(searchType.value)}`, '_blank')
|
// window.open(`${import.meta.env.VITE_BASE_URL}repoList?softwareName=${searchStr.value ? searchStr.value : ''}&searchType=${getIndustryValue(searchType.value)}`, '_blank')
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -310,6 +303,7 @@ onBeforeUnmount(() => {
|
|||||||
|
|
||||||
const getNoticeList = async () => {
|
const getNoticeList = async () => {
|
||||||
const res: any = await getHomeNoticeList();
|
const res: any = await getHomeNoticeList();
|
||||||
|
debugger
|
||||||
if (!res.error) {
|
if (!res.error) {
|
||||||
infoList.value = res.data.data || [];
|
infoList.value = res.data.data || [];
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user