update: 头部搜索能力补全
This commit is contained in:
@@ -144,7 +144,7 @@ const headerSearch = ref(globalInfo.headerSearch)
|
||||
const newFormData = ref({
|
||||
licenseName: '',
|
||||
searchType: headerSearch.value.searchType ? headerSearch.value.searchType : 'software',
|
||||
searchWord: '',
|
||||
softwareName: '',
|
||||
softwareVersion: '',
|
||||
dependentSoftware: '',
|
||||
programmingLanguage: '',
|
||||
@@ -155,7 +155,9 @@ const newFormData = ref({
|
||||
|
||||
watch(() => globalInfo.headerSearch, (newVal: any) => {
|
||||
headerSearch.value = newVal;
|
||||
console.log(newVal)
|
||||
newFormData.value.searchType = newVal.searchType;
|
||||
newFormData.value.softwareName = newVal.softwareName;
|
||||
getReleaseList();
|
||||
}, { deep: true })
|
||||
|
||||
@@ -211,7 +213,7 @@ const clear = () => {
|
||||
newFormData.value = {
|
||||
licenseName: '',
|
||||
searchType: headerSearch.value.searchType ? headerSearch.value.searchType : 'software',
|
||||
searchWord: '',
|
||||
softwareName: '',
|
||||
softwareVersion: '',
|
||||
dependentSoftware: '',
|
||||
programmingLanguage: '',
|
||||
@@ -321,10 +323,8 @@ const signCla = (row: any) => {
|
||||
};
|
||||
|
||||
const getReleaseList = async() => {
|
||||
console.log(newFormData.value.searchWord, headerSearch.value.searchWord)
|
||||
const { data, error } = await releasePage({
|
||||
...newFormData.value,
|
||||
searchWord: newFormData.value.searchWord ? newFormData.value.searchWord : headerSearch.value.searchWord,
|
||||
releaseDateStart: newFormData.value.dateRange&&newFormData.value.dateRange.length>0?newFormData.value.dateRange[0]:'',
|
||||
releaseDateEnd: newFormData.value.dateRange&&newFormData.value.dateRange.length>0?newFormData.value.dateRange[1]:'',
|
||||
current: pager.value.pageIndex,
|
||||
@@ -333,11 +333,13 @@ const getReleaseList = async() => {
|
||||
if (!error && data) {
|
||||
tableData.value = data.data.records;
|
||||
pager.value.total = data.data.total;
|
||||
|
||||
console.log(tableData.value)
|
||||
}
|
||||
};
|
||||
|
||||
onMounted(async() => {
|
||||
getReleaseList();
|
||||
// getReleaseList();
|
||||
});
|
||||
|
||||
onMounted(() => {
|
||||
|
||||
Reference in New Issue
Block a user