|
@@ -18,10 +18,18 @@
|
|
|
<el-col :span="24" class="main">
|
|
|
<div class="w_1200">
|
|
|
<el-col :span="5" class="left">
|
|
|
- 左侧列表
|
|
|
+ <el-col :span="24" class="top">
|
|
|
+ <i class="el-icon-s-unfold"></i>
|
|
|
+ <span>新闻咨询</span>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24" class="menu">
|
|
|
+ <el-col class="menuList" :span="24" v-for="(item, index) in menuList" :key="index">
|
|
|
+ <p @click="changeMenu(item.name, index)" :style="`color:${menuIndex == index ? menuColor : ''}`">{{ item.name }}</p>
|
|
|
+ </el-col>
|
|
|
+ </el-col>
|
|
|
</el-col>
|
|
|
<el-col :span="18" class="right">
|
|
|
- 右侧详情
|
|
|
+ <listDetails></listDetails>
|
|
|
</el-col>
|
|
|
</div>
|
|
|
</el-col>
|
|
@@ -36,21 +44,45 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import listDetails from './parts/listDetail.vue';
|
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
export default {
|
|
|
name: 'listDetail',
|
|
|
props: {},
|
|
|
- components: {},
|
|
|
+ components: {
|
|
|
+ listDetails, //列表+详情
|
|
|
+ },
|
|
|
data: function() {
|
|
|
- return {};
|
|
|
+ return {
|
|
|
+ menuList: [{ name: '科技资讯' }, { name: '技术前沿' }, { name: '工作动态' }, { name: '通知通告' }],
|
|
|
+ menuColor: 'rgb(254, 149, 14)',
|
|
|
+ menuIndex: '0',
|
|
|
+ };
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.searchInfo();
|
|
|
+ },
|
|
|
+ methods: {
|
|
|
+ searchInfo() {
|
|
|
+ if (this.col_name == '科技资讯') this.changeMenu(this.$route.query.col_name, 0);
|
|
|
+ if (this.col_name == '技术前沿') this.changeMenu(this.$route.query.col_name, 1);
|
|
|
+ if (this.col_name == '工作动态') this.changeMenu(this.$route.query.col_name, 2);
|
|
|
+ if (this.col_name == '通知通告') this.changeMenu(this.$route.query.col_name, 3);
|
|
|
+ },
|
|
|
+ changeMenu(name, index) {
|
|
|
+ this.menuIndex = index;
|
|
|
+ this.columnName = name;
|
|
|
+ this.menuColor = 'rgb(254, 149, 14)';
|
|
|
+ },
|
|
|
},
|
|
|
- created() {},
|
|
|
- methods: {},
|
|
|
computed: {
|
|
|
...mapState(['user']),
|
|
|
pageTitle() {
|
|
|
return `${this.$route.meta.title}`;
|
|
|
},
|
|
|
+ col_name() {
|
|
|
+ return this.$route.query.col_name;
|
|
|
+ },
|
|
|
},
|
|
|
metaInfo() {
|
|
|
return { title: this.$route.meta.title };
|
|
@@ -81,6 +113,22 @@ export default {
|
|
|
min-height: 600px;
|
|
|
background: #fff;
|
|
|
margin: 0 10px 0 0;
|
|
|
+ .top {
|
|
|
+ height: 60px;
|
|
|
+ line-height: 60px;
|
|
|
+ background-color: #054982;
|
|
|
+ color: #fff;
|
|
|
+ font-size: 25px;
|
|
|
+ font-weight: 600;
|
|
|
+ letter-spacing: 2px;
|
|
|
+ text-align: center;
|
|
|
+ }
|
|
|
+ .menuList {
|
|
|
+ height: 50px;
|
|
|
+ line-height: 50px;
|
|
|
+ text-align: center;
|
|
|
+ border-bottom: 1px solid #ccc;
|
|
|
+ }
|
|
|
}
|
|
|
.right {
|
|
|
width: 78%;
|