@@ -20,9 +23,10 @@ import { mapActions } from 'vuex';
import LeftNav from '@/components/LeftNav/LeftNav.vue';
import RichText from '@/components/RichText/RichText.vue';
import Location from '@/components/Location/Location.vue';
+import ListPage from '@/components/ListPage/ListPage.vue';
export default {
- components: { LeftNav, RichText, Location },
+ components: { LeftNav, RichText, Location, ListPage },
data() {
return {
code: '0601',
@@ -97,6 +101,8 @@ export default {
},
],
},
+ year: '2022',
+ pageNum: 1,
content: {},
};
},
@@ -105,17 +111,25 @@ export default {
if (this.$route.path === this.list.url) {
this.code = val;
this.getDetault(val);
- this.getData(this.code);
+ if (this.code.length === 6 && ((this.code === '060101' || this.code === '060503'))) {
+ this.getContentData(this.code);
+ } else {
+ this.getData(this.code);
+ }
}
},
},
created() {
this.code = this.$route.query.code;
this.getDetault(this.code);
- this.getData(this.code);
+ if (this.code.length === 6 && ((this.code === '060101' || this.code === '060503'))) {
+ this.getContentData(this.code);
+ } else {
+ this.getData(this.code);
+ }
},
methods: {
- ...mapActions('home', ['getDetail']),
+ ...mapActions('home', ['getDetail', 'getContent']),
// 获取默认显示标题
getDetault(val) {
for (let i = 0; i < this.list.children.length; i++) {
@@ -144,12 +158,35 @@ export default {
this.content = data || {};
} catch (error) {}
},
+ async getContentData() {
+ try {
+ const params = {
+ showPage: this.code,
+ year: this.year,
+ showType: 0,
+ pageNum: this.pageNum,
+ pageSize: 10,
+ };
+ const data = await this.getContent(params);
+ console.log('data: ', data);
+ } catch (error) {}
+ },
resetData() {
- this.getData();
+ this.pageNum = 1;
+ this.getContentData();
+ },
+ getNumData(pageNum) {
+ console.log('pageNum: ', pageNum);
+ this.pageNum = pageNum;
+ this.getContentData();
},
- chanegCode(code) {
+ changeCode(code) {
this.code = code;
},
+ changeYear(year, code) {
+ this.year = year;
+ this.getContentData(code);
+ },
},
};
diff --git a/src/views/OtherPages/NoticeNotice.vue b/src/views/OtherPages/NoticeNotice.vue
index 4edd5e1..d64f34e 100644
--- a/src/views/OtherPages/NoticeNotice.vue
+++ b/src/views/OtherPages/NoticeNotice.vue
@@ -3,7 +3,7 @@
-
+
@@ -125,7 +125,7 @@ export default {
console.error('error: ', error);
}
},
- chanegCode(code) {
+ changeCode(code) {
this.code = code;
this.introId = '';
},
diff --git a/src/views/OtherPages/PartyBuilding.vue b/src/views/OtherPages/PartyBuilding.vue
index 4efa8e1..9b52a44 100644
--- a/src/views/OtherPages/PartyBuilding.vue
+++ b/src/views/OtherPages/PartyBuilding.vue
@@ -3,7 +3,7 @@
-
+
@@ -129,7 +129,7 @@ export default {
console.error('error: ', error);
}
},
- chanegCode(code) {
+ changeCode(code) {
this.code = code;
this.introId = '';
},
diff --git a/src/views/OtherPages/PilePages.vue b/src/views/OtherPages/PilePages.vue
index bbc1881..7aad110 100644
--- a/src/views/OtherPages/PilePages.vue
+++ b/src/views/OtherPages/PilePages.vue
@@ -3,7 +3,7 @@
-
+
@@ -93,7 +93,6 @@ export default {
pageSize: 10,
};
const data = await this.getContent(param);
- console.log('data: ', data);
this.content = data;
} catch (error) {}
},
@@ -114,7 +113,7 @@ export default {
console.error('error: ', error);
}
},
- chanegCode(code) {
+ changeCode(code) {
this.code = code;
this.introId = '';
},
diff --git a/src/views/OtherPages/SafeProduction.vue b/src/views/OtherPages/SafeProduction.vue
index 0436bd9..177f40b 100644
--- a/src/views/OtherPages/SafeProduction.vue
+++ b/src/views/OtherPages/SafeProduction.vue
@@ -3,7 +3,7 @@
-
+
@@ -128,7 +128,7 @@ export default {
console.error('error: ', error);
}
},
- chanegCode(code) {
+ changeCode(code) {
this.code = code;
this.introId = '';
},
diff --git a/src/views/OtherPages/System.vue b/src/views/OtherPages/System.vue
index cfb78f1..0563b93 100644
--- a/src/views/OtherPages/System.vue
+++ b/src/views/OtherPages/System.vue
@@ -3,11 +3,14 @@