diff --git a/ruoyi-ui/src/views/home.vue b/ruoyi-ui/src/views/home.vue index e1b67b3..64fbb72 100644 --- a/ruoyi-ui/src/views/home.vue +++ b/ruoyi-ui/src/views/home.vue @@ -60,7 +60,7 @@
-
+
@@ -295,11 +295,12 @@ export default { query:{ id: '1813829868593483776' } }); }, - golist(id){ - console.log('跳转',id) + golist(row){ + // console.log('跳转',id) + console.log(row) this.$router.push({ name: 'list', - query:{ id: id } + query:{ id: row.id, categoryTitle: row.categoryName } }); }, tabClick(item){ diff --git a/ruoyi-ui/src/views/officialWebsite/Components/page/index.vue b/ruoyi-ui/src/views/officialWebsite/Components/page/index.vue index 1578856..ac820ab 100644 --- a/ruoyi-ui/src/views/officialWebsite/Components/page/index.vue +++ b/ruoyi-ui/src/views/officialWebsite/Components/page/index.vue @@ -26,23 +26,36 @@ export default { defaultValue: undefined, required: false }, + pageSize: { + type: Number, + defaultValue: 10, + required: false + }, + pageNum: { + type: Number, + defaultValue: 1, + required: false + } }, watch: { categoryId(newVal) { - this.queryParams = { - pageNum: 1, - pageSize: 10, - categoryId: newVal, - } + this.queryParams.categoryId = newVal + this.queryParams.pageNum = 1 this.initPageData() }, + pageSize(newVal){ + this.queryParams.pageSize = newVal + }, + pageNum(newVal){ + this.queryParams.pageSize = newVal + }, }, data () { return{ queryParams: { categoryId:"", - pageNum: 1, - pageSize: 10, + pageNum: this.pageNum || 1, + pageSize: this.pageSize || 10, }, total: 0 } @@ -50,6 +63,7 @@ export default { methods : { initPageData() { // console.log(1, this.queryParams) + // console.log(this.queryParams.pageNum) getPageData(this.queryParams).then(res => { // console.log('列表',res) this.listinfo = res.data.list; diff --git a/ruoyi-ui/src/views/officialWebsite/list.vue b/ruoyi-ui/src/views/officialWebsite/list.vue index 8f3670a..649de08 100644 --- a/ruoyi-ui/src/views/officialWebsite/list.vue +++ b/ruoyi-ui/src/views/officialWebsite/list.vue @@ -9,6 +9,7 @@
+
{{categoryTitle}}
{{item.contentTitle || '暂无标题' }}
{{item.createTime || 0.00 }}
@@ -70,6 +71,7 @@ export default { content: "", leaderList: "", + categoryTitle: this.$route.query.categoryTitle, } }, computed: { @@ -106,7 +108,8 @@ export default { }, initPageData() { // console.log("传参id", this.$route.query.id); - console.log(this.queryParams) + // console.log(this.queryParams) + if (!this.queryParams.categoryId) return; getPageData(this.queryParams).then(res => { console.log('列表',res) this.listinfo = res.data.list; diff --git a/ruoyi-ui/src/views/officialWebsite/practice.vue b/ruoyi-ui/src/views/officialWebsite/practice.vue index 68ce878..33820ea 100644 --- a/ruoyi-ui/src/views/officialWebsite/practice.vue +++ b/ruoyi-ui/src/views/officialWebsite/practice.vue @@ -26,8 +26,8 @@
-
-
+
+
@@ -35,38 +35,37 @@
-
-
-
-
- -
-
{{ item.contentTitle }}
-
- {{ item.summary }} -
-
{{ item.publishDate }}
-
-
+ + + + + + + + + + + + -
-
-
- -
-
{{ item.contentTitle }}
- + + + + + + + + + -
+ -
+
@@ -78,6 +77,9 @@
+
+ +
@@ -153,12 +155,14 @@ import "swiper/css/swiper.min.css"; import { getPageData, getPageColumn } from "@/api/officialWebsite/getPageData"; import footers from '@/views/officialWebsite/Components/footer.vue' import headers from '@/views/officialWebsite/Components/header.vue' +import PageUtil from '@/views/officialWebsite/Components/page' export default { components: { headers, footers, Swiper, SwiperSlide, + PageUtil, }, name: 'HelloWorld', props: { @@ -173,6 +177,8 @@ export default { teachingAchievements2: [], teachingAchievements3: [], pageContextList: [], + categoryId: "", + pageNum: 1, input4: "", show_search: true, nav: [ @@ -194,7 +200,7 @@ export default {


-

` +

`, } }, mounted() { @@ -216,6 +222,10 @@ export default { if (this.currentActive == value) { return } + if (value !== 0){ + this.categoryId = this.nav[value].id + this.pageNum = 1 + } this.currentActive = value; this.isShowDetails = false; }, @@ -236,29 +246,49 @@ export default { }); this.pageContextList.push(context); - //实践平台 - if (cloumnItem.id == "1813831828977618944") { - cloumnItem.children.list.forEach(element => { - this.teachingAchievements.push(element); - }); - } - //实践项目 - if (cloumnItem.id == "1813831932748894208") { - cloumnItem.children.list.forEach(element => { - this.teachingAchievements2.push(element); - }); - } - //自制仪器设备 - if (cloumnItem.id == "1813832045458231296") { - cloumnItem.children.list.forEach(element => { - this.teachingAchievements3.push(element); - }); - } + // //实践平台 + // if (cloumnItem.id == "1813831828977618944") { + // cloumnItem.children.list.forEach(element => { + // this.teachingAchievements.push(element); + // }); + // } + // //实践项目 + // if (cloumnItem.id == "1813831932748894208") { + // cloumnItem.id + // cloumnItem.children.list.forEach(element => { + // this.teachingAchievements2.push(element); + // }); + // } + // //自制仪器设备 + // if (cloumnItem.id == "1813832045458231296") { + // cloumnItem.children.list.forEach(element => { + // this.teachingAchievements3.push(element); + // }); + // } // cloumnItem.categoryName }); }); }, + handleDataFromPage(data){ + if (this.currentActive !== 0){ + this.teachingAchievements = data + } + // if (this.currentActive === 2 || this.currentActive == 4){ + // this.nav[this.currentActive].children.list = data + // } + // if (this.currentActive === 5){ + // this.noticeList = data + // } + }, + toDetail(id){ + if (id){ + this.$router.push({ + name: 'details', + query:{ id: id } + }); + } + } } } @@ -615,7 +645,7 @@ export default { display: flex; flex-wrap: wrap; - justify-content: space-between; + /*justify-content: space-between;*/ margin-top: 0px; } @@ -891,7 +921,7 @@ export default { margin: 30px auto; display: flex; flex-wrap: wrap; - justify-content: space-between; + /*justify-content: space-between;*/ margin-top: 50px; } diff --git a/ruoyi-ui/src/views/officialWebsite/team.vue b/ruoyi-ui/src/views/officialWebsite/team.vue index ce8cfbf..0f6db9c 100644 --- a/ruoyi-ui/src/views/officialWebsite/team.vue +++ b/ruoyi-ui/src/views/officialWebsite/team.vue @@ -66,7 +66,9 @@
- +
+ +
@@ -79,12 +81,15 @@ import "swiper/css/swiper.min.css"; import { getPageData, getPageColumn } from "@/api/officialWebsite/getPageData"; import footers from '@/views/officialWebsite/Components/footer.vue' import headers from '@/views/officialWebsite/Components/header.vue' +import PageUtil from "@/views/officialWebsite/Components/page" + export default { components: { headers, footers, Swiper, SwiperSlide, + PageUtil, }, name: 'HelloWorld', props: { @@ -103,7 +108,7 @@ export default { ], currentActive: 0, isMounted: false, - + categoryId: "0" } }, created() { @@ -127,6 +132,9 @@ export default { } this.currentActive = value this.isShowDetails = false; + if (value === 1){ + this.categoryId = this.nav[value].id + } }, initPageData() { @@ -161,6 +169,17 @@ export default { }); }, + handleDataFromPage(data){ + if (this.currentActive !== 0){ + this.teachingAchievements = data + } + // if (this.currentActive === 2 || this.currentActive == 4){ + // this.nav[this.currentActive].children.list = data + // } + // if (this.currentActive === 5){ + // this.noticeList = data + // } + }, } }