|
@@ -0,0 +1,199 @@
|
|
|
+<template>
|
|
|
+ <div class="home">
|
|
|
+ <div class="listBox">
|
|
|
+ <banner class="lists"></banner>
|
|
|
+ <threeList parentCode="02" class="listItem" :imgUrl="newsImgUrl" :data="news" :isImg="false" title="社科要闻" code="021"></threeList>
|
|
|
+ <threeList parentCode="10" :imgUrl="threeImggg" :data="threeDatagg" :isImg="false" title="通知公告" code="101"></threeList>
|
|
|
+ </div>
|
|
|
+ <div class="listBox">
|
|
|
+ <lists parentCode="03" title="社会组织建设" code="031" :imgUrl="corporationimgUrl" :tabsList="corporationList" :tabsType="null" :data="corporation" isImg @tabClick="btnClick({ ...$event, type: 'corporation' })"></lists>
|
|
|
+ <lists parentCode="04" title="社会科学普及" class="listItem" :imgUrl="prizeImgUrl" :tabsList="prizeList" :tabsType="null" :data="prize" isImg @tabClick="btnClick({ ...$event, type: 'prize' })"></lists>
|
|
|
+ <threeList parentCode="07" :imgUrl="threeImg" :data="threeData" code="07"></threeList>
|
|
|
+ </div>
|
|
|
+ <div class="listBox">
|
|
|
+ <lists parentCode="05" title="智库基金项目" :imgUrl="buildsImgUrl" :tabsList="buildsList" tabsType="border-card" :data="builds" @tabClick="btnClick({ ...$event, type: 'builds', limit: 6 })"></lists>
|
|
|
+ <lists parentCode="06" title="社会科学评奖" class="listItem" :imgUrl="universalImgUrl" :tabsList="universalList" tabsType="border-card" :data="universal" @tabClick="btnClick({ ...$event, type: 'universal', limit: 6 })"></lists>
|
|
|
+ <div class="xzbox">
|
|
|
+ <threeList parentCode="09" class="three" :imgUrl="threeImgzc" :data="threeDatazc"></threeList>
|
|
|
+ <el-image :src="xzUrl" class="xz" @click="imgClick('11', '11')"></el-image>
|
|
|
+ </div>
|
|
|
+ </div>
|
|
|
+ <div class="listBox">
|
|
|
+ <el-image :src="sknj" class="sknj"></el-image>
|
|
|
+ <el-image :src="szsklUrl" class="szskl" @click="imgClick('08', '08')"></el-image>
|
|
|
+ </div>
|
|
|
+ <links></links>
|
|
|
+ </div>
|
|
|
+</template>
|
|
|
+
|
|
|
+<script>
|
|
|
+import { mapState, mapActions } from 'vuex';
|
|
|
+import banner from '../components/banner/banner.vue';
|
|
|
+import lists from '../components/list/index';
|
|
|
+import threeList from '../components/list/threeList';
|
|
|
+import links from '../components/link/index';
|
|
|
+export default {
|
|
|
+ name: 'Home',
|
|
|
+ components: {
|
|
|
+ banner,
|
|
|
+ lists,
|
|
|
+ threeList,
|
|
|
+ links
|
|
|
+ },
|
|
|
+ computed: {
|
|
|
+ ...mapState(['menusall'])
|
|
|
+ },
|
|
|
+ data() {
|
|
|
+ return {
|
|
|
+ sknj: require('../assets/sknj.jpg'),
|
|
|
+ xzUrl: require('../assets/xz.jpg'),
|
|
|
+ szsklUrl: require('../assets/szskl.jpg'),
|
|
|
+ // 社团
|
|
|
+ corporation: [],
|
|
|
+ corporationimgUrl: require('../assets/icon1.png'),
|
|
|
+ corporationList: [
|
|
|
+ { title: '社会组织党建', code: '031' },
|
|
|
+ { title: '社会组织活动', code: '032' }
|
|
|
+ // { title: '社会组织简介', code: '033' }
|
|
|
+ ],
|
|
|
+ // 社科普及
|
|
|
+ prize: [],
|
|
|
+ prizeImgUrl: require('../assets/icon3.png'),
|
|
|
+ prizeList: [
|
|
|
+ { title: '科普讲座', code: '041' },
|
|
|
+ { title: '科普活动', code: '042' },
|
|
|
+ { title: '科普周', code: '043' }
|
|
|
+ ],
|
|
|
+ // 社科奖项
|
|
|
+ universal: [],
|
|
|
+ universalImgUrl: require('../assets/icon3.png'),
|
|
|
+ universalList: [
|
|
|
+ { title: '评奖信息', code: '061' },
|
|
|
+ { title: '获奖成果', code: '062' },
|
|
|
+ { title: '网上申报', code: '064' }
|
|
|
+ ],
|
|
|
+ // 智库建设
|
|
|
+ builds: [],
|
|
|
+ buildsImgUrl: require('../assets/icon4.png'),
|
|
|
+ buildsList: [
|
|
|
+ { title: '申报评审', code: '051' },
|
|
|
+ { title: '立项管理', code: '052' },
|
|
|
+ { title: '服务平台', code: '053' }
|
|
|
+ ],
|
|
|
+ // 社科要闻
|
|
|
+ news: [],
|
|
|
+ newsImgUrl: require('../assets/icon5.png'),
|
|
|
+ // 成果发布
|
|
|
+ threeImg: require('../assets/cg.jpg'),
|
|
|
+ threeData: [],
|
|
|
+ // 政策法规
|
|
|
+ threeImgzc: require('../assets/zc.jpg'),
|
|
|
+ threeDatazc: [],
|
|
|
+ // 通知公告
|
|
|
+ threeImggg: require('../assets/gg.png'),
|
|
|
+ threeDatagg: []
|
|
|
+ };
|
|
|
+ },
|
|
|
+ async mounted() {
|
|
|
+ // 社会组织建设
|
|
|
+ await this.btnClick({ name: '031', type: 'corporation' });
|
|
|
+ // 社科普及
|
|
|
+ await this.btnClick({ name: '041', type: 'prize', parentCode: true });
|
|
|
+ // 科学评奖
|
|
|
+ await this.btnClick({ name: '061', type: 'universal', limit: 6 });
|
|
|
+ // 智库基金
|
|
|
+ await this.btnClick({ name: '051', type: 'builds', limit: 6 });
|
|
|
+ // 社科要闻
|
|
|
+ await this.btnClick({ name: '02', type: 'news', limit: 4, parentCode: true });
|
|
|
+ // 成果发布
|
|
|
+ await this.btnClick({ name: '07', type: 'threeData', limit: 5, parentCode: true });
|
|
|
+ // 政策法规
|
|
|
+ await this.btnClick({ name: '09', type: 'threeDatazc', limit: 3, parentCode: true });
|
|
|
+ // 通知公告
|
|
|
+ await this.btnClick({ name: '10', type: 'threeDatagg', limit: 4, parentCode: true });
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ ...mapActions(['contentsQuery']),
|
|
|
+ async btnClick(e) {
|
|
|
+ const filter = { bind: e?.name };
|
|
|
+ if (e?.parentCode) filter.parentCode = e?.name;
|
|
|
+ if (e?.limit) filter.limit = e?.limit;
|
|
|
+ const res = await this.contentsQuery({ ...filter });
|
|
|
+ if (res.errcode == 0) {
|
|
|
+ switch (e?.type) {
|
|
|
+ case 'prize':
|
|
|
+ this.prize = res.data;
|
|
|
+ break;
|
|
|
+ case 'corporation':
|
|
|
+ this.corporation = res.data;
|
|
|
+ break;
|
|
|
+ case 'universal':
|
|
|
+ this.universal = res.data;
|
|
|
+ break;
|
|
|
+ case 'builds':
|
|
|
+ this.builds = res.data;
|
|
|
+ break;
|
|
|
+ case 'news':
|
|
|
+ this.news = res.data;
|
|
|
+ break;
|
|
|
+ case 'threeData':
|
|
|
+ this.threeData = res.data;
|
|
|
+ break;
|
|
|
+ case 'threeDatazc':
|
|
|
+ this.threeDatazc = res.data;
|
|
|
+ break;
|
|
|
+ case 'threeDatagg':
|
|
|
+ this.threeDatagg = res.data;
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ },
|
|
|
+ // 图片点击
|
|
|
+ imgClick(code, parentCode) {
|
|
|
+ const item = this.$last({ menus: this.menusall, code: code });
|
|
|
+ this.$setParentsetSession({ menus: this.menusall, iscode: item });
|
|
|
+ this.$router.push(`/list/${code}?parentCode=${parentCode}`);
|
|
|
+ }
|
|
|
+ }
|
|
|
+};
|
|
|
+</script>
|
|
|
+<style lang="scss" scoped>
|
|
|
+.home {
|
|
|
+ width: 100%;
|
|
|
+ .top {
|
|
|
+ width: 100%;
|
|
|
+ }
|
|
|
+ .listBox {
|
|
|
+ width: 70%;
|
|
|
+ margin: 3% auto;
|
|
|
+ display: flex;
|
|
|
+ .listItem {
|
|
|
+ margin: 0 5%;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .sknj {
|
|
|
+ width: 65%;
|
|
|
+ display: block;
|
|
|
+ margin-right: 5%;
|
|
|
+ }
|
|
|
+ .szskl {
|
|
|
+ width: 30%;
|
|
|
+ display: block;
|
|
|
+ }
|
|
|
+ // .twoList {
|
|
|
+ // width: 71%;
|
|
|
+ // }
|
|
|
+ .xzbox {
|
|
|
+ width: 30%;
|
|
|
+ position: relative;
|
|
|
+ .three {
|
|
|
+ width: 100%;
|
|
|
+ }
|
|
|
+ .xz {
|
|
|
+ width: 100%;
|
|
|
+ position: absolute;
|
|
|
+ bottom: 0;
|
|
|
+ }
|
|
|
+ }
|
|
|
+}
|
|
|
+</style>
|