|
@@ -3,9 +3,9 @@
|
|
|
<index-detail
|
|
|
:info="info"
|
|
|
:map="map"
|
|
|
- :zixunList="zixunList"
|
|
|
- :noticeList="noticeList"
|
|
|
- :lawList="lawList"
|
|
|
+ :zixunList="gndtList"
|
|
|
+ :noticeList="tzggList"
|
|
|
+ :lawList="zhzczdList"
|
|
|
:xinpinList="xinpinList"
|
|
|
:chuangxinList="chuangxinList"
|
|
|
:linkList="linkList"
|
|
@@ -18,6 +18,10 @@ import indexDetail from '@/components/index.vue';
|
|
|
import { createNamespacedHelpers, mapGetters } from 'vuex';
|
|
|
const { mapActions: mapSite } = createNamespacedHelpers('site');
|
|
|
const { mapActions: mapLink } = createNamespacedHelpers('link');
|
|
|
+const { mapActions: mapAffairsColumn } = createNamespacedHelpers('affairsColumn');
|
|
|
+const { mapActions: mapAffairsNews } = createNamespacedHelpers('affairsNews');
|
|
|
+const { mapActions: mapPolicyColumn } = createNamespacedHelpers('policyColumn');
|
|
|
+const { mapActions: mapPolicyNews } = createNamespacedHelpers('policyNews');
|
|
|
export default {
|
|
|
name: 'index',
|
|
|
props: {},
|
|
@@ -27,27 +31,9 @@ export default {
|
|
|
data: () => ({
|
|
|
info: {},
|
|
|
map: require('@/assets/map.jpg'),
|
|
|
- zixunList: [
|
|
|
- {
|
|
|
- title: '尼日利亚传统领袖:尼应学习借鉴中国自贸区建设经验',
|
|
|
- date: '2019-12-25',
|
|
|
- },
|
|
|
- {
|
|
|
- title: '八条数据',
|
|
|
- date: '2019-12-25',
|
|
|
- },
|
|
|
- ],
|
|
|
- noticeList: [
|
|
|
- {
|
|
|
- title: '尼日利亚传统领袖:尼应学习借鉴中国自贸区建设经验',
|
|
|
- date: '2019-12-25',
|
|
|
- },
|
|
|
- {
|
|
|
- title: '八条数据',
|
|
|
- date: '2019-12-25',
|
|
|
- },
|
|
|
- ],
|
|
|
- lawList: [
|
|
|
+ gndtList: [],
|
|
|
+ tzggList: [],
|
|
|
+ zhzczdList: [
|
|
|
{
|
|
|
title: '尼日利亚传统领袖:尼应学习借鉴中国自贸区建设经验',
|
|
|
date: '2019-12-25',
|
|
@@ -60,7 +46,7 @@ export default {
|
|
|
linkList: [],
|
|
|
xinpinList: [
|
|
|
{
|
|
|
- title: '尼日利亚传统领袖:尼应学习借鉴中国自贸区建设经验',
|
|
|
+ title: '科技超市(产品)',
|
|
|
date: '2019-12-25',
|
|
|
},
|
|
|
{
|
|
@@ -70,7 +56,7 @@ export default {
|
|
|
],
|
|
|
chuangxinList: [
|
|
|
{
|
|
|
- title: '尼日利亚传统领袖:尼应学习借鉴中国自贸区建设经验',
|
|
|
+ title: '科技超市(产品)',
|
|
|
date: '2019-12-25',
|
|
|
},
|
|
|
{
|
|
@@ -82,11 +68,17 @@ export default {
|
|
|
created() {
|
|
|
this.searchSite();
|
|
|
this.searchLink();
|
|
|
+ this.searchAffairs();
|
|
|
+ this.searchPolicy();
|
|
|
},
|
|
|
computed: {},
|
|
|
methods: {
|
|
|
...mapSite(['showInfo']),
|
|
|
...mapLink(['query']),
|
|
|
+ ...mapAffairsColumn({ affairsColumnList: 'query', affairsColumnInfo: 'fetch' }),
|
|
|
+ ...mapAffairsNews({ affairsNews: 'query' }),
|
|
|
+ ...mapPolicyColumn({ policyColumnList: 'query', policyColumnInfo: 'fetch' }),
|
|
|
+ ...mapPolicyNews({ policyNews: 'query' }),
|
|
|
// 查询站点信息
|
|
|
async searchSite() {
|
|
|
let res = await this.showInfo();
|
|
@@ -104,6 +96,47 @@ export default {
|
|
|
this.$set(this, `linkList`, res.data);
|
|
|
}
|
|
|
},
|
|
|
+ // 最新資訊,通知公告(所属科技政务,国内动态,通知公告)
|
|
|
+ async searchAffairs({ ...info } = {}) {
|
|
|
+ const res = await this.affairsColumnList({ ...info });
|
|
|
+ for (const val of res.data) {
|
|
|
+ this.tpxwSearch({ column_id: val.id, site: val.site });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async tpxwSearch({ skip = 0, limit = 8, column_id, site } = {}) {
|
|
|
+ if (site === 'gndt') {
|
|
|
+ const res = await this.affairsNews({ skip, limit, column_id: column_id });
|
|
|
+ for (const val of res.data) {
|
|
|
+ const result = await this.affairsColumnInfo(val.column_id);
|
|
|
+ val.column_name = result.data.name;
|
|
|
+ }
|
|
|
+ this.$set(this, `${site}List`, res.data);
|
|
|
+ } else if (site === 'tzgg') {
|
|
|
+ const res = await this.affairsNews({ skip, limit, column_id: column_id });
|
|
|
+ for (const val of res.data) {
|
|
|
+ const result = await this.affairsColumnInfo(val.column_id);
|
|
|
+ val.column_name = result.data.name;
|
|
|
+ }
|
|
|
+ this.$set(this, `${site}List`, res.data);
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 政策法规(所属科技政策,综合政策指导)
|
|
|
+ async searchPolicy({ ...info } = {}) {
|
|
|
+ const res = await this.policyColumnList({ ...info });
|
|
|
+ for (const val of res.data) {
|
|
|
+ this.zhzcdPolicy({ column_id: val.id, site: val.site });
|
|
|
+ }
|
|
|
+ },
|
|
|
+ async zhzcdPolicy({ skip = 0, limit = 8, column_id, site } = {}) {
|
|
|
+ if (site === 'zhzczd') {
|
|
|
+ const res = await this.policyNews({ skip, limit, column_id: column_id });
|
|
|
+ for (const val of res.data) {
|
|
|
+ const result = await this.policyColumnInfo(val.column_id);
|
|
|
+ val.column_name = result.data.name;
|
|
|
+ }
|
|
|
+ this.$set(this, `${site}List`, res.data);
|
|
|
+ }
|
|
|
+ },
|
|
|
},
|
|
|
};
|
|
|
</script>
|