fix : 修复首页待立项等任务跳转及各种类型文章跳转显示对应数据
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<fvSearchForm :searchConfig="researchFundSearchConfig" @search="searchResearchFund"
|
||||
<fvSearchForm :searchConfig="articleSearchConfig" @search="searchArticle" searchProp="articleType" :searchValue="routeArticleType"
|
||||
style="margin-left: 16px"></fvSearchForm>
|
||||
<fvTable ref="tableIns" :tableConfig="researchFundTableConfig" @headBtnClick="headBtnClick">
|
||||
<fvTable ref="tableIns" :tableConfig="articleTableConfig" @headBtnClick="headBtnClick">
|
||||
<template #empty>
|
||||
<el-empty description="暂无数据"/>
|
||||
</template>
|
||||
@@ -14,7 +14,9 @@ import {deleteArticle} from "@/api/article";
|
||||
import fvSelect from '@/fvcomponents/fvSelect/index.vue'
|
||||
|
||||
const router = useRouter();
|
||||
const researchFundSearchConfig = reactive([
|
||||
const route = useRoute();
|
||||
const routeArticleType = ref(route.query.type)
|
||||
const articleSearchConfig = reactive([
|
||||
{
|
||||
label: '文章标题',
|
||||
prop: 'articleTitle',
|
||||
@@ -54,7 +56,7 @@ const researchFundSearchConfig = reactive([
|
||||
},
|
||||
])
|
||||
const tableIns = ref()
|
||||
const researchFundTableConfig = reactive({
|
||||
const articleTableConfig = reactive({
|
||||
columns: [
|
||||
{
|
||||
prop: 'index',
|
||||
@@ -142,16 +144,28 @@ const researchFundTableConfig = reactive({
|
||||
],
|
||||
params: {}
|
||||
})
|
||||
const searchResearchFund = (val) => {
|
||||
|
||||
const searchArticle = (val) => {
|
||||
let obj = {...val}
|
||||
if (obj.dateValue) {
|
||||
obj.startGenerationTime = obj.dateValue[0]
|
||||
obj.endGenerationTime = obj.dateValue[1]
|
||||
delete obj.dateValue
|
||||
}
|
||||
researchFundTableConfig.params = obj
|
||||
articleTableConfig.params = obj
|
||||
tableIns.value.refresh()
|
||||
}
|
||||
const init = async () => {
|
||||
if(routeArticleType.value){
|
||||
nextTick(()=>{
|
||||
console.info("🚀 ~method:articleSearchConfig -----", articleSearchConfig[1].component.props)
|
||||
searchArticle({articleType:routeArticleType.value})
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
init()
|
||||
|
||||
const headBtnClick = (key) => {
|
||||
switch (key) {
|
||||
case 'add':
|
||||
|
||||
Reference in New Issue
Block a user