-
@@ -26,9 +37,14 @@ export default {
return {
libcode: '',
tabList: [],
- selectMenuIndex: 0
+ leftMenuList: [],
+ leftMenuIndex: 0,
+ selectMenuIndex: 0,
+ currentMenuType: 2
}
},
+ computed: {
+ },
created() {
const savedIndex = localStorage.getItem('selectIndex')
if (savedIndex !== null) {
@@ -36,50 +52,81 @@ export default {
}
this.getQueryTopicDetails()
},
+ mounted() {
+ },
methods: {
getQueryTopicDetails() {
const params = { 'id': this.$route.query.menuId }
FetchQueryTopicDetails(params).then(res => {
- console.log('接口返回数据:', res)
- if (res && res.queryTopicList && res.queryTopicList.length > 0) {
- this.tabList = res.queryTopicList
- this.libcode = res.queryMenu.libcode
- // this.$store.commit
- this.$store.commit('column/setColumnData', {
- tabList: this.tabList,
- libcode: this.libcode,
- selectMenuIndex: this.selectMenuIndex
- })
- console.log('Vuex设置成功:', this.$store.state.column.tabList)
+ this.currentMenuType = res.queryMenu?.type
+ this.libcode = res.queryMenu?.libcode || ''
+
+ if (this.currentMenuType === 1) {
+ if (res && res.queryMenu) {
+ this.leftMenuList = res.queryMenu.children || []
+
+ if (this.leftMenuList.length > 0) {
+ this.handleMenuClick(this.leftMenuList[this.leftMenuIndex], this.leftMenuIndex)
+ }
+ }
} else {
- console.error('接口返回的queryTopicList为空或格式错误')
+ if (res && res.queryTopicList && res.queryTopicList.length > 0) {
+ this.tabList = res.queryTopicList
+ this.$store.commit('column/setColumnData', {
+ tabList: this.tabList,
+ libcode: this.libcode,
+ selectMenuIndex: this.selectMenuIndex
+ })
+ } else {
+ console.error('接口返回的queryTopicList为空或格式错误')
+ }
}
}).catch(err => {
console.error('接口请求失败:', err)
this.$message.error('接口错误')
})
},
+ handleMenuClick(childMenu, index) {
+ this.leftMenuIndex = index
+ this.tabList = []
+
+ if (childMenu.queryMenuTopics && childMenu.queryMenuTopics.length > 0) {
+ childMenu.queryMenuTopics.forEach(menuTopic => {
+ if (menuTopic.queryTopic) {
+ this.tabList.push(menuTopic.queryTopic)
+
+ this.$store.commit('column/setColumnData', {
+ tabList: this.tabList,
+ libcode: this.libcode,
+ selectMenuIndex: this.selectMenuIndex
+ })
+
+ this.selectMenuChange(this.tabList[0], 0)
+ }
+ })
+ }
+ },
selectMenuChange(item, index) {
this.selectMenuIndex = index
localStorage.setItem('selectIndex', index)
this.$store.commit('column/setSelectMenuIndex', index)
- const targetRoute = {
- name: 'ColumnListMix',
- query: this.$route.query
+ this.$store.commit('column/updatePagination', { currentPage: 0 })
+
+ // 通知ColumnListMix组件重新加载数据
+ const listMixComponent = this.$children.find(child => child.$options.name === 'ColumnListMix')
+ if (listMixComponent) {
+ listMixComponent.infoList = []
+ listMixComponent.unbindScrollListener()
+ listMixComponent.getInitQueryTopicContext(item)
}
+
+ // 处理路由跳转
+ const targetRoute = { name: 'ColumnListMix', query: this.$route.query }
const currentRoute = this.$router.currentRoute
- if (currentRoute.name === targetRoute.name &&
- JSON.stringify(currentRoute.query) === JSON.stringify(targetRoute.query)) {
- if (this.$children.length > 0) {
- this.$children[0].getInitQueryTopicContext(item)
- }
- return
+ if (currentRoute.name !== targetRoute.name ||
+ JSON.stringify(currentRoute.query) !== JSON.stringify(targetRoute.query)) {
+ this.$router.push(targetRoute)
}
- this.$router.push(targetRoute).then(() => {
- if (this.$children.length > 0) {
- this.$children[0].getInitQueryTopicContext(item)
- }
- })
}
}
}
@@ -87,4 +134,39 @@ export default {
diff --git a/src/views/columnListMix.vue b/src/views/columnListMix.vue
index e784cc2..c54ee42 100644
--- a/src/views/columnListMix.vue
+++ b/src/views/columnListMix.vue
@@ -1,27 +1,36 @@
-
+
{{ detailData.overTitle }}
发布时间:{{ detailData.create_time }}
-
-
+
+
-
+
暂无相关数据
@@ -30,7 +39,7 @@
-
-
diff --git a/src/views/module/waterfall.vue b/src/views/module/waterfall.vue
index 38fa6a5..f4876ef 100644
--- a/src/views/module/waterfall.vue
+++ b/src/views/module/waterfall.vue
@@ -359,7 +359,7 @@ export default {
.waterfall-container {
position: relative;
width: calc(100%);
- height: 800px;
+ height: 780px;
overflow: hidden;
overflow-y: auto;
}
diff --git a/src/views/waterfallFlow.vue b/src/views/waterfallFlow.vue
index 19998e2..abae759 100644
--- a/src/views/waterfallFlow.vue
+++ b/src/views/waterfallFlow.vue
@@ -22,7 +22,6 @@
-