list.vue 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381
  1. <template>
  2. <div id="list">
  3. <el-col :span="24" class="main">
  4. <el-col :span="5" class="menu">
  5. <el-image :src="squareImage"></el-image>
  6. <span>Menu</span>
  7. <el-col class="menuList" :span="24" v-for="(item, index) in menuList" :key="index">
  8. <p @click="changeMenu(item.name, index)" :style="`color:${menuIndex == index ? menuColor : ''}`">{{ item.name }}</p>
  9. </el-col>
  10. </el-col>
  11. <el-col v-if="menuIndex == '0'" :span="19" class="info">
  12. <el-col class="leftInfo">
  13. <el-col :span="24" class="leftTop">
  14. <span>|</span> <span>{{ menuName }}</span>
  15. </el-col>
  16. <el-col class="infoLeftList" :span="24" v-for="(item, index) in zhuantiList" :key="index">
  17. <p>{{ item.publish_time }}</p>
  18. <p>
  19. <span class="textOver">{{ item.title }}</span>
  20. <span>{{ item.content }}</span>
  21. </p>
  22. </el-col>
  23. </el-col>
  24. <el-col class="page">
  25. <el-pagination
  26. background
  27. @size-change="handleSizeChange"
  28. @current-change="handleCurrentChange"
  29. :current-page.sync="currentPage"
  30. :page-size="10"
  31. layout="total,prev, pager, next, jumper"
  32. :total="1000"
  33. >
  34. </el-pagination>
  35. </el-col>
  36. </el-col>
  37. <el-col v-if="menuIndex == '1'" :span="19" class="info">
  38. <el-col class="leftInfo">
  39. <el-col :span="24" class="leftTop">
  40. <span>|</span> <span>{{ menuName }}</span>
  41. </el-col>
  42. <el-col class="infoRightList" :span="24" v-for="(item, index) in hangyeList" :key="index">
  43. <p>
  44. <span class="textOver">{{ item.title }}</span
  45. ><span class="textOver">{{ item.publish_time }}</span>
  46. </p>
  47. </el-col>
  48. </el-col>
  49. <el-col class="page">
  50. <el-pagination
  51. background
  52. @size-change="handleSizeChange"
  53. @current-change="handleCurrentChange"
  54. :current-page.sync="currentPage"
  55. :page-size="10"
  56. layout="total,prev, pager, next, jumper"
  57. :total="1000"
  58. >
  59. </el-pagination>
  60. </el-col>
  61. </el-col>
  62. <el-col v-if="menuIndex == '2'" :span="19" class="info">
  63. <el-col class="leftInfo">
  64. <el-col :span="24" class="leftTop">
  65. <span>|</span> <span>{{ menuName }}</span>
  66. </el-col>
  67. <el-col class="infoRightList" :span="24" v-for="(item, index) in hangyeList" :key="index">
  68. <p>
  69. <span class="textOver">{{ item.title }}</span
  70. ><span class="textOver">{{ item.publish_time }}</span>
  71. </p>
  72. </el-col>
  73. </el-col>
  74. <el-col class="page">
  75. <el-pagination
  76. background
  77. @size-change="handleSizeChange"
  78. @current-change="handleCurrentChange"
  79. :current-page.sync="currentPage"
  80. :page-size="10"
  81. layout="total,prev, pager, next, jumper"
  82. :total="1000"
  83. >
  84. </el-pagination>
  85. </el-col>
  86. </el-col>
  87. <el-col v-if="menuIndex == '3'" :span="19" class="info">
  88. <el-col class="leftInfo">
  89. <el-col :span="24" class="leftTop">
  90. <span>|</span> <span>{{ menuName }}</span>
  91. </el-col>
  92. <el-col class="infoLeftList" :span="24" v-for="(item, index) in zhuantiList" :key="index">
  93. <p>{{ item.publish_time }}</p>
  94. <p>
  95. <span class="textOver">{{ item.title }}</span>
  96. <span>{{ item.content }}</span>
  97. </p>
  98. </el-col>
  99. </el-col>
  100. <el-col class="page">
  101. <el-pagination
  102. background
  103. @size-change="handleSizeChange"
  104. @current-change="handleCurrentChange"
  105. :current-page.sync="currentPage"
  106. :page-size="10"
  107. layout="total,prev, pager, next, jumper"
  108. :total="1000"
  109. >
  110. </el-pagination>
  111. </el-col>
  112. </el-col>
  113. </el-col>
  114. </div>
  115. </template>
  116. <script>
  117. export default {
  118. name: 'list',
  119. props: {},
  120. components: {},
  121. data: () => ({
  122. squareImage: require('@/assets/live/square_big.png'),
  123. menuList: [{ name: '专题研讨' }, { name: '技术问答' }, { name: '行业研究' }, { name: '教育培训' }],
  124. menuIndex: '0',
  125. menuName: '专题研讨',
  126. menuColor: 'rgb(254, 149, 14)',
  127. currentPage: 1,
  128. zhuantiList: [
  129. {
  130. publish_time: '2020-05-01',
  131. title: '第六届创新创业大赛总决赛圆满结束第六届创新创业大赛总决赛圆满结束',
  132. content:
  133. '第六届创新创业大赛总决赛圆满结束第六届创新创业大赛总决赛圆满结束第六届创新创业大赛总决赛圆满结束第六届创新创业大赛总决赛圆满结束第六届创新创业大赛总决赛圆满结束第六届创新创业大赛总决赛圆满结束',
  134. },
  135. { publish_time: '2020-05-01', title: '五条数据', content: '五条数据' },
  136. { publish_time: '2020-05-01', title: '第六届创新创业大赛总决赛圆满结束', content: '第六届创新创业大赛总决赛圆满结束' },
  137. { publish_time: '2020-05-01', title: '第六届创新创业大赛总决赛圆满结束', content: '第六届创新创业大赛总决赛圆满结束' },
  138. { publish_time: '2020-05-01', title: '第六届创新创业大赛总决赛圆满结束', content: '第六届创新创业大赛总决赛圆满结束' },
  139. { publish_time: '2020-05-01', title: '第六届创新创业大赛总决赛圆满结束', content: '第六届创新创业大赛总决赛圆满结束' },
  140. ],
  141. jishuList: [
  142. { publish_time: '2020-05-01', title: '第六届创新创业大赛总决赛圆满结束第六届创新创业大赛总决赛圆满结束' },
  143. { publish_time: '2020-05-01', title: '十条数据' },
  144. { publish_time: '2020-05-01', title: '第六届创新创业大赛总决赛圆满结束' },
  145. { publish_time: '2020-05-01', title: '第六届创新创业大赛总决赛圆满结束' },
  146. { publish_time: '2020-05-01', title: '第六届创新创业大赛总决赛圆满结束' },
  147. { publish_time: '2020-05-01', title: '第六届创新创业大赛总决赛圆满结束' },
  148. { publish_time: '2020-05-01', title: '第六届创新创业大赛总决赛圆满结束' },
  149. { publish_time: '2020-05-01', title: '第六届创新创业大赛总决赛圆满结束' },
  150. { publish_time: '2020-05-01', title: '第六届创新创业大赛总决赛圆满结束' },
  151. { publish_time: '2020-05-01', title: '第六届创新创业大赛总决赛圆满结束' },
  152. { publish_time: '2020-05-01', title: '第六届创新创业大赛总决赛圆满结束' },
  153. ],
  154. hangyeList: [
  155. { publish_time: '2020-05-01', title: '第六届创新创业大赛总决赛圆满结束第六届创新创业大赛总决赛圆满结束' },
  156. { publish_time: '2020-05-01', title: '十条数据' },
  157. { publish_time: '2020-05-01', title: '第六届创新创业大赛总决赛圆满结束' },
  158. { publish_time: '2020-05-01', title: '第六届创新创业大赛总决赛圆满结束' },
  159. { publish_time: '2020-05-01', title: '第六届创新创业大赛总决赛圆满结束' },
  160. { publish_time: '2020-05-01', title: '第六届创新创业大赛总决赛圆满结束' },
  161. { publish_time: '2020-05-01', title: '第六届创新创业大赛总决赛圆满结束' },
  162. { publish_time: '2020-05-01', title: '第六届创新创业大赛总决赛圆满结束' },
  163. { publish_time: '2020-05-01', title: '第六届创新创业大赛总决赛圆满结束' },
  164. { publish_time: '2020-05-01', title: '第六届创新创业大赛总决赛圆满结束' },
  165. { publish_time: '2020-05-01', title: '第六届创新创业大赛总决赛圆满结束' },
  166. ],
  167. jiaoyuList: [
  168. {
  169. publish_time: '2020-05-01',
  170. title: '第六届创新创业大赛总决赛圆满结束第六届创新创业大赛总决赛圆满结束',
  171. content: '第六届创新创业大赛总决赛圆满结束第六届创新创业大赛总决赛圆满结束第六届创新创业大赛总决赛圆满结束',
  172. },
  173. { publish_time: '2020-05-01', title: '六条数据', content: '六条数据' },
  174. { publish_time: '2020-05-01', title: '第六届创新创业大赛总决赛圆满结束', content: '第六届创新创业大赛总决赛圆满结束' },
  175. { publish_time: '2020-05-01', title: '第六届创新创业大赛总决赛圆满结束', content: '第六届创新创业大赛总决赛圆满结束' },
  176. { publish_time: '2020-05-01', title: '第六届创新创业大赛总决赛圆满结束', content: '第六届创新创业大赛总决赛圆满结束' },
  177. { publish_time: '2020-05-01', title: '第六届创新创业大赛总决赛圆满结束', content: '第六届创新创业大赛总决赛圆满结束' },
  178. ],
  179. }),
  180. created() {
  181. this.searchList();
  182. },
  183. computed: {},
  184. methods: {
  185. async searchList({ skip = 0, limit = 10, ...info } = {}) {
  186. if (this.$route.query.column_name == '专题研讨') {
  187. this.changeMenu(this.$route.query.column_name, 0);
  188. } else if (this.$route.query.column_name == '技术问答') {
  189. this.changeMenu(this.$route.query.column_name, 1);
  190. } else if (this.$route.query.column_name == '行业研究') {
  191. this.changeMenu(this.$route.query.column_name, 2);
  192. } else if (this.$route.query.column_name == '教育培训') {
  193. this.changeMenu(this.$route.query.column_name, 3);
  194. }
  195. },
  196. changeMenu(name, index) {
  197. console.log(name);
  198. console.log(index);
  199. this.menuIndex = index;
  200. this.menuColor = 'rgb(254, 149, 14)';
  201. this.menuName = name;
  202. },
  203. handleSizeChange(val) {
  204. console.log(`每页 ${val} 条`);
  205. },
  206. handleCurrentChange(val) {
  207. console.log(`当前页: ${val}`);
  208. },
  209. },
  210. };
  211. </script>
  212. <style lang="less" scoped>
  213. .main {
  214. width: 80%;
  215. margin: 5px auto;
  216. float: none;
  217. }
  218. .menu {
  219. float: left;
  220. height: 450px;
  221. width: 20%;
  222. background: no-repeat bottom right;
  223. background-image: url(../../assets/live/menu_back.jpg);
  224. margin: 10px 0;
  225. padding: 10px 0 0 10px;
  226. box-sizing: border-box;
  227. box-shadow: 0 0 10px #bbbaba;
  228. }
  229. .menu .el-image {
  230. width: 30px;
  231. display: inline-table;
  232. margin: 10px 5px;
  233. }
  234. .menu span {
  235. font-size: 24px;
  236. color: #92959a;
  237. font-weight: 600;
  238. margin-left: 3px;
  239. position: relative;
  240. top: 10px;
  241. }
  242. .menuList p {
  243. line-height: 60px;
  244. font-size: 18px;
  245. cursor: pointer;
  246. border-bottom: 1px solid #2d64b3;
  247. color: #044b79;
  248. font-weight: 600;
  249. }
  250. .info {
  251. width: 77%;
  252. float: right;
  253. margin: 10px 0 10px 2px;
  254. height: 585px;
  255. box-shadow: 0 0 10px #2d64b3;
  256. overflow: hidden;
  257. right: 0px;
  258. background: #ffffff;
  259. }
  260. .leftInfo {
  261. height: 500px;
  262. overflow: hidden;
  263. }
  264. .leftTop {
  265. font-size: 18px;
  266. width: 96%;
  267. height: 41px;
  268. line-height: 35px;
  269. border-bottom: 1px solid #e5e5e5;
  270. position: relative;
  271. bottom: 1px;
  272. margin: 10px;
  273. font-weight: 600;
  274. color: #22529a;
  275. }
  276. .infoLeftList {
  277. float: left;
  278. width: 95%;
  279. border-bottom: 1px dashed #ccc;
  280. padding: 8px 0 8px 0;
  281. height: 85px;
  282. margin: 0 0 0 5px;
  283. }
  284. .infoLeftList:last-child {
  285. float: left;
  286. width: 95%;
  287. border-bottom: none;
  288. padding: 15px 0 15px 0;
  289. height: 80px;
  290. margin: 0 0 0 5px;
  291. }
  292. .infoLeftList:hover p:last-child span:first-child {
  293. -webkit-transform: translateY(-3px);
  294. -ms-transform: translateY(-3px);
  295. transform: translateY(-3px);
  296. -webkit-box-shadow: 0 0 6px #999;
  297. box-shadow: 0 0 6px #999;
  298. -webkit-transition: all 0.5s ease-out;
  299. transition: all 0.5s ease-out;
  300. color: #005293;
  301. cursor: pointer;
  302. }
  303. .infoLeftList p:first-child {
  304. float: left;
  305. width: 20%;
  306. font-size: 15px;
  307. background: #044b79;
  308. text-align: center;
  309. color: #fff;
  310. font-weight: bold;
  311. padding: 4px 0px;
  312. margin: 0 0 0 5px;
  313. }
  314. .infoLeftList p:last-child {
  315. float: right;
  316. width: 70%;
  317. padding: 0 0 0 10px;
  318. }
  319. .infoLeftList p:last-child span:first-child {
  320. float: left;
  321. width: 90%;
  322. font-size: 18px;
  323. }
  324. .infoLeftList p:last-child span:last-child {
  325. float: left;
  326. width: 90%;
  327. font-size: 16px;
  328. overflow: hidden;
  329. text-overflow: ellipsis;
  330. -webkit-line-clamp: 2;
  331. word-break: break-all;
  332. display: -webkit-box;
  333. -webkit-box-orient: vertical;
  334. margin: 5px 0 0 0;
  335. color: #666;
  336. }
  337. .page {
  338. text-align: center;
  339. margin: 10px 0;
  340. }
  341. .infoRightList {
  342. float: left;
  343. width: 95%;
  344. padding: 11px 0;
  345. }
  346. .infoRightList:nth-child(5n) {
  347. border-bottom: 1px solid #ccc;
  348. padding: 0 0 17px 0;
  349. }
  350. .infoRightList:nth-child(6) {
  351. padding: 11px 0 0 0;
  352. }
  353. .infoRightList:hover p span:first-child {
  354. -webkit-transform: translateY(-3px);
  355. -ms-transform: translateY(-3px);
  356. transform: translateY(-3px);
  357. -webkit-box-shadow: 0 0 6px #999;
  358. box-shadow: 0 0 6px #999;
  359. -webkit-transition: all 0.5s ease-out;
  360. transition: all 0.5s ease-out;
  361. color: #005293;
  362. cursor: pointer;
  363. }
  364. .infoRightList p {
  365. font-size: 18px;
  366. }
  367. .infoRightList p span:first-child {
  368. display: inline-block;
  369. width: 70%;
  370. margin: 0 20px 0 10px;
  371. }
  372. .infoRightList p span:last-child {
  373. display: inline-block;
  374. width: 21%;
  375. text-align: center;
  376. font-size: 16px;
  377. }
  378. </style>