zhibolist.vue 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269
  1. <template>
  2. <div id="list">
  3. <el-col :span="24" class="main">
  4. <el-col :span="24" class="info">
  5. <el-col>
  6. <el-col :span="24" class="leftTop">
  7. <span>|</span> <span>{{ menuName }}</span>
  8. </el-col>
  9. <el-col class="infoRightList" :span="24" v-for="(item, index) in hangyeList" :key="index">
  10. <p>
  11. <span class="textOver" @click="clickhangye(item.id)">{{ item.title }}</span
  12. ><span class="textOver">
  13. <el-button type="primary" class="duijie" @click="jinru()">进入对接会</el-button>
  14. <el-button type="primary" class="duijie" @click="apply(item.id)">申请对接会</el-button></span
  15. >
  16. </p>
  17. </el-col>
  18. </el-col>
  19. <el-col class="page">
  20. <el-pagination
  21. background
  22. @current-change="handleCurrentChange"
  23. :current-page.sync="currentPage"
  24. :page-size="pageSize"
  25. layout="total,prev, pager, next, jumper"
  26. :total="pageTotal"
  27. >
  28. </el-pagination>
  29. </el-col>
  30. </el-col>
  31. </el-col>
  32. </div>
  33. </template>
  34. <script>
  35. import _ from 'lodash';
  36. import { mapState, createNamespacedHelpers } from 'vuex';
  37. const { mapActions: dock } = createNamespacedHelpers('dock');
  38. export default {
  39. name: 'list',
  40. props: {},
  41. components: {},
  42. data: () => ({
  43. squareImage: require('@/assets/live/square_big.png'),
  44. menuIndex: '0',
  45. menuName: '直播列表',
  46. menuColor: 'rgb(254, 149, 14)',
  47. currentPage: 1,
  48. pageTotal: 0,
  49. pageSize: 10,
  50. limit: 10,
  51. hangyeList: [],
  52. }),
  53. created() {
  54. this.searchList();
  55. },
  56. computed: {},
  57. methods: {
  58. ...dock({ dockQuery: 'query' }),
  59. async searchList({ skip = 0, limit = 10, ...info } = {}) {
  60. console.log('ccc');
  61. let res = await this.dockQuery({});
  62. this.$set(this, `pageTotal`, res.total);
  63. console.log(res.data);
  64. if (res.errcode === 0) {
  65. this.$set(this, `hangyeList`, res.data);
  66. }
  67. },
  68. async initList({ name, skip = 0, limit = 10, ...info } = {}) {
  69. this.$set(this, `pageTotal`, res.total);
  70. },
  71. apply(id) {
  72. this.$router.push({ path: '/live/liveApply', query: { id: id } });
  73. },
  74. jinru() {
  75. window.location.href = '/static/liveIndex.html';
  76. },
  77. handleCurrentChange(val) {
  78. console.log(`当前页: ${val}`);
  79. this.limit = 5;
  80. this.initList({ skip: (val - 1) * this.limit, limit: this.limit });
  81. },
  82. },
  83. };
  84. </script>
  85. <style lang="less" scoped>
  86. .main {
  87. width: 1200px;
  88. margin: 0 auto;
  89. float: none;
  90. }
  91. .menu {
  92. float: left;
  93. height: 450px;
  94. width: 20%;
  95. background: no-repeat bottom right;
  96. background-image: url(../../assets/live/menu_back.jpg);
  97. margin: 30px 0;
  98. padding: 10px 0 0 10px;
  99. box-sizing: border-box;
  100. box-shadow: 0 0 10px #bbbaba;
  101. }
  102. .menu .el-image {
  103. width: 30px;
  104. display: inline-table;
  105. margin: 10px 5px;
  106. }
  107. .menu span {
  108. font-size: 24px;
  109. color: #92959a;
  110. font-weight: 600;
  111. margin-left: 3px;
  112. position: relative;
  113. top: 10px;
  114. }
  115. .menuList p {
  116. line-height: 60px;
  117. font-size: 18px;
  118. cursor: pointer;
  119. border-bottom: 1px solid #2d64b3;
  120. color: #044b79;
  121. font-weight: 600;
  122. }
  123. .info {
  124. width: 100%;
  125. float: right;
  126. margin: 30px 0 30px 2px;
  127. height: 585px;
  128. box-shadow: 0 0 10px #2d64b3;
  129. overflow: hidden;
  130. right: 0px;
  131. background: #ffffff;
  132. }
  133. .leftInfo {
  134. height: 500px;
  135. overflow: hidden;
  136. }
  137. .leftTop {
  138. font-size: 18px;
  139. width: 96%;
  140. height: 41px;
  141. line-height: 35px;
  142. border-bottom: 1px solid #e5e5e5;
  143. position: relative;
  144. bottom: 1px;
  145. margin: 10px;
  146. font-weight: 600;
  147. color: #22529a;
  148. }
  149. .infoLeftList {
  150. float: left;
  151. width: 95%;
  152. border-bottom: 1px dashed #ccc;
  153. padding: 10px 0 10px 10px;
  154. height: 87px;
  155. margin: 0 0 0 5px;
  156. }
  157. .infoLeftList:hover p:last-child span:first-child {
  158. -webkit-transform: translateY(-3px);
  159. -ms-transform: translateY(-3px);
  160. transform: translateY(-3px);
  161. -webkit-box-shadow: 0 0 6px #999;
  162. box-shadow: 0 0 6px #999;
  163. -webkit-transition: all 0.5s ease-out;
  164. transition: all 0.5s ease-out;
  165. color: #005293;
  166. cursor: pointer;
  167. }
  168. /deep/.infoRightList p span[data-v-64e7ce6c]:first-child {
  169. display: inline-block;
  170. width: 78%;
  171. margin: 0 20px 0 10px;
  172. }
  173. /deep/.infoRightList p span[data-v-64e7ce6c]:last-child {
  174. display: inline-block;
  175. width: 19%;
  176. text-align: center;
  177. font-size: 16px;
  178. }
  179. .infoLeftList p:first-child {
  180. float: left;
  181. width: 20%;
  182. font-size: 15px;
  183. background: #044b79;
  184. text-align: center;
  185. color: #fff;
  186. font-weight: bold;
  187. padding: 4px 0px;
  188. margin: 0 0 0 5px;
  189. }
  190. .infoLeftList p:last-child {
  191. float: right;
  192. width: 70%;
  193. padding: 0 0 0 10px;
  194. }
  195. .infoLeftList p:last-child span:first-child {
  196. float: left;
  197. width: 90%;
  198. font-size: 18px;
  199. }
  200. .infoLeftList p:last-child span:last-child {
  201. float: left;
  202. width: 90%;
  203. font-size: 16px;
  204. overflow: hidden;
  205. text-overflow: ellipsis;
  206. -webkit-line-clamp: 2;
  207. word-break: break-all;
  208. display: -webkit-box;
  209. -webkit-box-orient: vertical;
  210. margin: 5px 0 0 0;
  211. color: #666;
  212. }
  213. .page {
  214. text-align: center;
  215. margin: 10px 0;
  216. }
  217. .infoRightList {
  218. float: left;
  219. width: 95%;
  220. padding: 7px 0;
  221. margin: 0 0 0 5px;
  222. }
  223. .infoRightList:hover p span:first-child {
  224. -webkit-transform: translateY(-3px);
  225. -ms-transform: translateY(-3px);
  226. transform: translateY(-3px);
  227. -webkit-box-shadow: 0 0 6px #999;
  228. box-shadow: 0 0 6px #999;
  229. -webkit-transition: all 0.5s ease-out;
  230. transition: all 0.5s ease-out;
  231. color: #005293;
  232. cursor: pointer;
  233. }
  234. .infoRightList p {
  235. font-size: 18px;
  236. }
  237. .infoRightList p span:first-child {
  238. display: inline-block;
  239. width: 60%;
  240. margin: 0 20px 0 10px;
  241. }
  242. .infoRightList p span:last-child {
  243. display: inline-block;
  244. width: 15%;
  245. text-align: center;
  246. font-size: 16px;
  247. }
  248. .duijie {
  249. color: #fff;
  250. background-color: #ff8500;
  251. text-align: center;
  252. padding: 10px 15px 10px 15px;
  253. margin: 10px 0 0 10px;
  254. }
  255. .duijie:hover {
  256. background-color: #0279d5;
  257. }
  258. </style>