123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333 |
- <template>
- <div id="technical">
- <el-col :span="24" class="main">
- <el-col :span="12" class="left">
- <el-col :span="1" class="leftTitle">
- <p>专<br />题<br />研<br />讨</p>
- <p></p>
- </el-col>
- <el-col :span="23" class="infoLeft">
- <el-col class="infoLeftList" :span="24" v-for="(item, index) in zhuantiList" :key="index">
- <p>{{ item.publish_time }}</p>
- <p>
- <span @click="clickzhuanti(item.id)" class="textOver">{{ item.title }}</span>
- <span>{{ item.content }}</span>
- </p>
- </el-col>
- </el-col>
- <el-col :span="24" class="leftListDown"><span></span><span @click="turnToList('专题研讨')">MORE</span></el-col>
- </el-col>
- <el-col :span="12" class="right">
- <el-col :span="24" class="rightListTop"><span @click="turnToList('技术问答')">MORE</span><span></span></el-col>
- <el-col :span="23" class="infoRight">
- <el-col class="infoRightList" :span="24" v-for="(item, index) in jishuList" :key="index">
- <p>
- <span class="textOver" @click="clickjishu(item.id)">{{ item.title }}</span
- ><span class="textOver">{{ item.publish_time }}</span>
- </p>
- </el-col>
- </el-col>
- <el-col :span="1" class="rightTitle">
- <p></p>
- <p>技<br />术<br />问<br />答</p>
- </el-col>
- </el-col>
- <el-col :span="24">
- <el-image :src="jishuImage" class="jishuImage"></el-image>
- </el-col>
- <el-col :span="12" class="left">
- <el-col :span="1" class="leftTitle">
- <p>行<br />业<br />研<br />究</p>
- <p></p>
- </el-col>
- <el-col :span="23" class="infoRight">
- <el-col class="infoRightList" :span="24" v-for="(item, index) in hangyeList" :key="index">
- <p>
- <span class="textOver" @click="clickhangye(item.id)">{{ item.title }}</span
- ><span class="textOver">{{ item.publish_time }}</span>
- </p>
- </el-col>
- </el-col>
- <el-col :span="24" class="leftListDown"><span></span><span @click="turnToList('行业研究')">MORE</span></el-col>
- </el-col>
- <el-col :span="12" class="right">
- <el-col :span="24" class="rightListTop"><span @click="turnToList('教育培训')">MORE</span><span></span></el-col>
- <el-col :span="23" class="infoLeft">
- <el-col class="infoLeftList" :span="24" v-for="(item, index) in jiaoyuList" :key="index">
- <p>{{ item.publish_time }}</p>
- <p>
- <span class="textOver" @click="clickjiaoyu(item.id)">{{ item.title }}</span>
- <span>{{ item.content }}</span>
- </p>
- </el-col>
- </el-col>
- <el-col :span="1" class="rightTitle">
- <p></p>
- <p>教<br />育<br />培<br />训</p>
- </el-col>
- </el-col>
- </el-col>
- </div>
- </template>
- <script>
- import _ from 'lodash';
- import { mapState, createNamespacedHelpers } from 'vuex';
- const { mapActions: news } = createNamespacedHelpers('news');
- export default {
- name: 'technical',
- props: {},
- components: {},
- data: () => ({
- jishuImage: require('@/assets/live/main2.png'),
- zhuantiList: [],
- jishuList: [],
- hangyeList: [],
- jiaoyuList: [],
- }),
- created() {
- this.searchInfo();
- },
- computed: {},
- methods: {
- ...news(['query']),
- async searchInfo() {
- let res = await this.query({ skip: 0, limit: 6, column_name: '专题研讨' });
- if (this.$checkRes(res)) this.$set(this, `zhuantiList`, res.data);
- res = await this.query({ skip: 0, limit: 10, column_name: '技术问答' });
- if (this.$checkRes(res)) this.$set(this, `jishuList`, res.data);
- res = await this.query({ skip: 0, limit: 10, column_name: '行业研究' });
- if (this.$checkRes(res)) this.$set(this, `hangyeList`, res.data);
- res = await this.query({ skip: 0, limit: 6, column_name: '教育培训' });
- if (this.$checkRes(res)) this.$set(this, `jiaoyuList`, res.data);
- },
- turnToList(column_name) {
- this.$router.push({ path: '/technical/list', query: { column_name: column_name } });
- },
- clickzhuanti(id) {
- this.$router.push({ path: '/live/detail', query: { id: id } });
- console.log(id);
- },
- clickjishu(id) {
- this.$router.push({ path: '/live/detail', query: { id: id } });
- console.log(id);
- },
- clickhangye(id) {
- this.$router.push({ path: '/live/detail', query: { id: id } });
- console.log(id);
- },
- clickjiaoyu(id) {
- this.$router.push({ path: '/live/detail', query: { id: id } });
- console.log(id);
- },
- },
- };
- </script>
- <style lang="less" scoped>
- .jishuImage {
- width: 100%;
- height: 100%;
- }
- .main {
- width: 80%;
- margin: 0 auto;
- float: none;
- }
- .left {
- float: left;
- height: 500px;
- margin: 30px 0 30px 0;
- overflow: hidden;
- }
- .leftTitle {
- text-align: center;
- position: relative;
- }
- .leftTitle p:first-child {
- font-size: 18px;
- color: #044b79;
- font-weight: bold;
- }
- .leftTitle p:last-child {
- float: left;
- width: 2px;
- height: 402px;
- background-color: #044b79;
- margin: 0 5px;
- position: absolute;
- left: 9px;
- }
- .infoLeft {
- height: 480px;
- padding: 0 10px;
- }
- .infoLeftList {
- float: left;
- width: 95%;
- border-bottom: 1px dashed #ccc;
- padding: 8px 0 8px 0;
- height: 80px;
- margin: 0 0 0 5px;
- }
- .infoLeftList:nth-child(6) {
- float: left;
- width: 95%;
- border-bottom: none;
- padding: 8px 0 8px 0;
- height: 81px;
- margin: 0 0 15px 5px;
- }
- .infoLeftList:hover p:last-child span:first-child {
- -webkit-transform: translateY(-3px);
- -ms-transform: translateY(-3px);
- transform: translateY(-3px);
- -webkit-box-shadow: 0 0 6px #999;
- box-shadow: 0 0 6px #999;
- -webkit-transition: all 0.5s ease-out;
- transition: all 0.5s ease-out;
- color: #005293;
- cursor: pointer;
- }
- .infoLeftList p:first-child {
- float: left;
- width: 20%;
- font-size: 15px;
- background: #044b79;
- text-align: center;
- color: #fff;
- font-weight: bold;
- padding: 4px 0px;
- margin: 0 0 0 5px;
- }
- .infoLeftList p:last-child {
- float: right;
- width: 70%;
- padding: 0 0 0 10px;
- }
- .infoLeftList p:last-child span:first-child {
- float: left;
- width: 90%;
- font-size: 18px;
- }
- .infoLeftList p:last-child span:last-child {
- float: left;
- width: 90%;
- font-size: 16px;
- overflow: hidden;
- text-overflow: ellipsis;
- -webkit-line-clamp: 2;
- word-break: break-all;
- display: -webkit-box;
- -webkit-box-orient: vertical;
- margin: 5px 0 0 0;
- color: #666;
- }
- .leftListDown {
- position: relative;
- }
- .leftListDown span:first-child {
- display: inline-block;
- width: 80%;
- height: 3px;
- background: rgba(4, 75, 121, 0.37);
- margin: 0 10px 0 0;
- position: absolute;
- left: -10px;
- top: 10px;
- }
- .leftListDown span:last-child {
- font-size: 16px;
- float: right;
- padding: 0 15px 0 0;
- color: #044b79;
- font-weight: 700;
- cursor: pointer;
- }
- .right {
- float: right;
- height: 500px;
- overflow: hidden;
- margin: 30px 0 30px 0;
- }
- .rightListTop {
- position: relative;
- }
- .rightListTop span:first-child {
- font-size: 16px;
- float: left;
- padding: 0 0 0 15px;
- color: #044b79;
- font-weight: 700;
- cursor: pointer;
- }
- .rightListTop span:last-child {
- display: inline-block;
- width: 80%;
- height: 3px;
- background: rgba(4, 75, 121, 0.37);
- margin: 0 10px 0 0;
- position: absolute;
- right: -10px;
- top: 10px;
- }
- .infoRight {
- height: 480px;
- padding: 0 10px;
- }
- .infoRightList {
- float: left;
- width: 95%;
- padding: 11px 0;
- }
- .infoRightList:nth-child(5) {
- border-bottom: 1px solid #ccc;
- padding: 0 0 17px 0;
- }
- .infoRightList:nth-child(6) {
- padding: 11px 0 0 0;
- }
- .infoRightList:hover p span:first-child {
- -webkit-transform: translateY(-3px);
- -ms-transform: translateY(-3px);
- transform: translateY(-3px);
- -webkit-box-shadow: 0 0 6px #999;
- box-shadow: 0 0 6px #999;
- -webkit-transition: all 0.5s ease-out;
- transition: all 0.5s ease-out;
- color: #005293;
- cursor: pointer;
- }
- .infoRightList p {
- font-size: 18px;
- }
- .infoRightList p span:first-child {
- display: inline-block;
- width: 70%;
- margin: 0 20px 0 10px;
- }
- .infoRightList p span:last-child {
- display: inline-block;
- width: 21%;
- text-align: center;
- font-size: 16px;
- }
- .rightTitle {
- text-align: center;
- }
- .rightTitle p:first-child {
- width: 2px;
- height: 370px;
- background: #044b79;
- position: relative;
- left: 10px;
- top: -20px;
- }
- .rightTitle p:last-child {
- font-size: 18px;
- font-weight: bold;
- color: #044b79;
- }
- </style>
|