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 dropdownWidth = ref(0);
|
||||
const tagMap = {
|
||||
critical: {
|
||||
Critical: {
|
||||
text: '致命',
|
||||
color: '#c7000b'
|
||||
},
|
||||
high: {
|
||||
High: {
|
||||
text: '高',
|
||||
color: '#f66f6a'
|
||||
},
|
||||
medium: {
|
||||
Medium: {
|
||||
text: '中',
|
||||
color: '#fac20a'
|
||||
},
|
||||
low: {
|
||||
Low: {
|
||||
text: '低',
|
||||
color: '#5e7ce0'
|
||||
},
|
||||
@@ -203,11 +203,9 @@ const closeOutside = () => {
|
||||
};
|
||||
|
||||
const submit = (formData) => {
|
||||
debugger;
|
||||
debugger
|
||||
isOpen.value = false;
|
||||
router.push({
|
||||
name: 'Search',
|
||||
query: {
|
||||
router.push({ name: 'Search', query: {
|
||||
softwareName: searchStr.value ? searchStr.value : '',
|
||||
searchType: getIndustryValue(searchType.value),
|
||||
softwareVersion: formData.softwareVersion || '',
|
||||
@@ -216,10 +214,9 @@ const submit = (formData) => {
|
||||
industry: formData.industry || '',
|
||||
licenseName: formData.licenseName || '',
|
||||
dependentSoftware: formData.dependentSoftware || '',
|
||||
releaseDateStart: formData.dateRange && formData.dateRange.length > 0 ? formData.dateRange[0] : '',
|
||||
releaseDateEnd: formData.dateRange && formData.dateRange.length > 0 ? formData.dateRange[1] : ''
|
||||
}
|
||||
});
|
||||
releaseDateStart: formData.dateRange&&formData.dateRange.length>0?formData.dateRange[0]:'',
|
||||
releaseDateEnd: formData.dateRange&&formData.dateRange.length>0?formData.dateRange[1]:'',
|
||||
} });
|
||||
};
|
||||
|
||||
const inputFocus = () => {
|
||||
@@ -238,19 +235,15 @@ const updateDropdownWidth = () => {
|
||||
const globalInfo = useGlobalInfoStore();
|
||||
const industryList = globalInfo.industryList;
|
||||
const getIndustryValue = (name) => {
|
||||
const industry = industryList.find((item) => item.name === name);
|
||||
const industry = industryList.find(item => item.name === name);
|
||||
return industry ? industry.value : ''; // 如果找不到,返回默认值
|
||||
};
|
||||
|
||||
const search = () => {
|
||||
// updateHeaderSearch({ searchWord: searchStr.value, searchType: selectedCate.value });
|
||||
router.push({
|
||||
name: 'Search',
|
||||
query: {
|
||||
router.push({ name: 'Search', query: {
|
||||
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')
|
||||
};
|
||||
|
||||
@@ -310,6 +303,7 @@ onBeforeUnmount(() => {
|
||||
|
||||
const getNoticeList = async () => {
|
||||
const res: any = await getHomeNoticeList();
|
||||
debugger
|
||||
if (!res.error) {
|
||||
infoList.value = res.data.data || [];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user