|
@@ -18,10 +18,29 @@
|
|
|
<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">
|
|
|
- 右侧详情
|
|
|
+ <el-col :span="24" class="top">
|
|
|
+ <span></span>
|
|
|
+ <span>{{ columnName }}</span>
|
|
|
+ </el-col>
|
|
|
+ <el-col :span="24" class="list">
|
|
|
+ <span v-if="display == '0'">
|
|
|
+ 列表
|
|
|
+ </span>
|
|
|
+ <span v-else-if="display == '1'">
|
|
|
+ 详情
|
|
|
+ </span>
|
|
|
+ </el-col>
|
|
|
</el-col>
|
|
|
</div>
|
|
|
</el-col>
|
|
@@ -36,21 +55,50 @@
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+import listDetails from './parts/listDetail.vue';
|
|
|
import { mapState, createNamespacedHelpers } from 'vuex';
|
|
|
export default {
|
|
|
name: 'listDetail',
|
|
|
props: {},
|
|
|
components: {},
|
|
|
data: function() {
|
|
|
- return {};
|
|
|
+ return {
|
|
|
+ menuList: [{ name: '科技资讯' }, { name: '技术前沿' }, { name: '工作动态' }, { name: '通知通告' }],
|
|
|
+ menuColor: 'rgb(254, 149, 14)',
|
|
|
+ menuIndex: '0',
|
|
|
+ columnName: '',
|
|
|
+ display: '',
|
|
|
+ };
|
|
|
+ },
|
|
|
+ created() {
|
|
|
+ this.$set(this, `display`, this.displays);
|
|
|
+ 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)';
|
|
|
+ this.display = '0';
|
|
|
+ },
|
|
|
},
|
|
|
- created() {},
|
|
|
- methods: {},
|
|
|
computed: {
|
|
|
...mapState(['user']),
|
|
|
pageTitle() {
|
|
|
return `${this.$route.meta.title}`;
|
|
|
},
|
|
|
+ col_name() {
|
|
|
+ return this.$route.query.col_name;
|
|
|
+ },
|
|
|
+ displays() {
|
|
|
+ return this.$route.query.display;
|
|
|
+ },
|
|
|
},
|
|
|
metaInfo() {
|
|
|
return { title: this.$route.meta.title };
|
|
@@ -81,11 +129,45 @@ 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%;
|
|
|
min-height: 600px;
|
|
|
background: #fff;
|
|
|
+ padding: 0 20px;
|
|
|
+ .top {
|
|
|
+ height: 35px;
|
|
|
+ margin: 20px 0;
|
|
|
+ border-bottom: 1px dashed #ccc;
|
|
|
+ span:first-child {
|
|
|
+ display: inline-block;
|
|
|
+ width: 4px;
|
|
|
+ height: 20px;
|
|
|
+ background: #005293;
|
|
|
+ margin: 0 10px -3px 0;
|
|
|
+ }
|
|
|
+ span:nth-child(2) {
|
|
|
+ font-size: 20px;
|
|
|
+ color: #005293;
|
|
|
+ font-weight: bold;
|
|
|
+ }
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
.foot {
|