fix: bug
This commit is contained in:
@@ -87,9 +87,12 @@
|
||||
@click="openWarningDetail(item, index)"
|
||||
>
|
||||
<span>{{ item.subject }}</span>
|
||||
<d-tag v-if="item.importance" :color="tagMap[item.importance].color" size="sm">{{
|
||||
tagMap[item.importance].text
|
||||
}}</d-tag>
|
||||
<d-tag
|
||||
v-if="item.importance && tagMap[item.importance]"
|
||||
:color="tagMap[item.importance].color"
|
||||
size="sm"
|
||||
>{{ tagMap[item.importance].text }}</d-tag
|
||||
>
|
||||
</div>
|
||||
<div class="time-container">
|
||||
<d-icon name="icon-time"></d-icon>
|
||||
@@ -144,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'
|
||||
}
|
||||
@@ -184,9 +187,11 @@ 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 || '',
|
||||
@@ -195,9 +200,10 @@ 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 = () => {
|
||||
@@ -216,15 +222,19 @@ 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')
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user