list.vue 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  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 :span="19" class="info">
  12. <el-col v-if="menuIndex == '0'" class="leftInfo">
  13. <el-col :span="24" class="leftTop">
  14. <span>|</span> <span>{{ menuName }}</span>
  15. </el-col>
  16. <el-table :data="resultTable" stripe style="width: 96%" border>
  17. <el-table-column prop="time" label="时间"> </el-table-column>
  18. <el-table-column prop="name" label="项目名称" show-overflow-tooltip="true"> </el-table-column>
  19. <el-table-column prop="sell_unit" label="营销单位" show-overflow-tooltip="true"> </el-table-column>
  20. <el-table-column prop="buy_unit" label="采购单位" show-overflow-tooltip="true"> </el-table-column>
  21. </el-table>
  22. </el-col>
  23. <el-col v-if="menuIndex == '1'" class="leftInfo">
  24. <el-col :span="24" class="leftTop">
  25. <span>|</span> <span>{{ menuName }}</span>
  26. </el-col>
  27. <el-table :data="willTable" stripe style="width: 96%" border>
  28. <el-table-column prop="time" label="时间"> </el-table-column>
  29. <el-table-column prop="name" label="项目名称" show-overflow-tooltip="true"> </el-table-column>
  30. <el-table-column prop="sell_unit" label="营销单位" show-overflow-tooltip="true"> </el-table-column>
  31. <el-table-column prop="buy_unit" label="采购单位" show-overflow-tooltip="true"> </el-table-column>
  32. </el-table>
  33. </el-col>
  34. <el-col v-if="menuIndex == '2'" class="leftInfo">
  35. <el-col :span="24" class="leftTop">
  36. <span>|</span> <span>{{ menuName }}</span>
  37. </el-col>
  38. <el-table :data="cooperationTable" stripe style="width: 96%" border>
  39. <el-table-column prop="time" label="时间"> </el-table-column>
  40. <el-table-column prop="name" label="项目名称" show-overflow-tooltip="true"> </el-table-column>
  41. <el-table-column prop="sell_unit" label="营销单位" show-overflow-tooltip="true"> </el-table-column>
  42. <el-table-column prop="buy_unit" label="采购单位" show-overflow-tooltip="true"> </el-table-column>
  43. </el-table>
  44. </el-col>
  45. <el-col v-if="menuIndex == '3'" class="leftInfo">
  46. <el-col :span="24" class="leftTop">
  47. <span>|</span> <span>{{ menuName }}</span>
  48. </el-col>
  49. <el-table :data="demandTable" stripe style="width: 96%" border>
  50. <el-table-column prop="time" label="时间"> </el-table-column>
  51. <el-table-column prop="name" label="项目名称" show-overflow-tooltip="true"> </el-table-column>
  52. <el-table-column prop="sell_unit" label="营销单位" show-overflow-tooltip="true"> </el-table-column>
  53. <el-table-column prop="buy_unit" label="采购单位" show-overflow-tooltip="true"> </el-table-column>
  54. </el-table>
  55. </el-col>
  56. <el-col class="page">
  57. <el-pagination
  58. background
  59. @size-change="handleSizeChange"
  60. @current-change="handleCurrentChange"
  61. :current-page.sync="currentPage"
  62. :page-size="10"
  63. layout="total,prev, pager, next, jumper"
  64. :total="1000"
  65. >
  66. </el-pagination>
  67. </el-col>
  68. </el-col>
  69. </el-col>
  70. </div>
  71. </template>
  72. <script>
  73. export default {
  74. name: 'list',
  75. props: {},
  76. components: {},
  77. data: () => ({
  78. squareImage: require('@/assets/live/square_big.png'),
  79. menuList: [{ name: '展示成果' }, { name: '达成意愿' }, { name: '洽谈合作' }, { name: '发布需求' }],
  80. menuIndex: '0',
  81. menuName: '展示成果',
  82. menuColor: 'rgb(254, 149, 14)',
  83. currentPage: 1,
  84. resultTable: [
  85. { time: '2020-5-10', name: '测试项目名称测试项目名称', sell_unit: '营销单位营销单位', buy_unit: '采购单位采购单位' },
  86. { time: '2020-5-10', name: '测试项目名称', sell_unit: '营销单位', buy_unit: '采购单位' },
  87. { time: '2020-5-10', name: '测试项目名称', sell_unit: '营销单位', buy_unit: '采购单位' },
  88. { time: '2020-5-10', name: '测试项目名称', sell_unit: '营销单位', buy_unit: '采购单位' },
  89. { time: '2020-5-10', name: '测试项目名称', sell_unit: '营销单位', buy_unit: '采购单位' },
  90. { time: '2020-5-10', name: '测试项目名称', sell_unit: '营销单位', buy_unit: '采购单位' },
  91. { time: '2020-5-10', name: '测试项目名称', sell_unit: '营销单位', buy_unit: '采购单位' },
  92. { time: '2020-5-10', name: '测试项目名称', sell_unit: '营销单位', buy_unit: '采购单位' },
  93. { time: '2020-5-10', name: '测试项目名称', sell_unit: '营销单位', buy_unit: '采购单位' },
  94. { time: '2020-5-10', name: '测试项目名称', sell_unit: '营销单位', buy_unit: '采购单位' },
  95. ],
  96. willTable: [
  97. { time: '2020-5-10', name: '测试项目名称', sell_unit: '营销单位', buy_unit: '采购单位' },
  98. { time: '2020-5-10', name: '十条数据', sell_unit: '营销单位', buy_unit: '采购单位' },
  99. ],
  100. cooperationTable: [
  101. { time: '2020-5-10', name: '测试项目名称', sell_unit: '营销单位', buy_unit: '采购单位' },
  102. { time: '2020-5-10', name: '十条数据', sell_unit: '营销单位', buy_unit: '采购单位' },
  103. ],
  104. demandTable: [
  105. { time: '2020-5-10', name: '测试项目名称', sell_unit: '营销单位', buy_unit: '采购单位' },
  106. { time: '2020-5-10', name: '十条数据', sell_unit: '营销单位', buy_unit: '采购单位' },
  107. ],
  108. }),
  109. created() {
  110. this.searchList();
  111. },
  112. computed: {},
  113. methods: {
  114. async searchList({ skip = 0, limit = 10, ...info } = {}) {
  115. if (this.$route.query.column_name == '展示成果') {
  116. this.changeMenu(this.$route.query.column_name, 0);
  117. } else if (this.$route.query.column_name == '达成意愿') {
  118. this.changeMenu(this.$route.query.column_name, 1);
  119. } else if (this.$route.query.column_name == '洽谈合作') {
  120. this.changeMenu(this.$route.query.column_name, 2);
  121. } else if (this.$route.query.column_name == '发布需求') {
  122. this.changeMenu(this.$route.query.column_name, 3);
  123. }
  124. },
  125. changeMenu(name, index) {
  126. this.menuIndex = index;
  127. this.menuColor = 'rgb(254, 149, 14)';
  128. this.menuName = name;
  129. },
  130. handleSizeChange(val) {
  131. console.log(`每页 ${val} 条`);
  132. },
  133. handleCurrentChange(val) {
  134. console.log(`当前页: ${val}`);
  135. },
  136. },
  137. };
  138. </script>
  139. <style lang="less" scoped>
  140. .main {
  141. width: 80%;
  142. margin: 0 auto;
  143. float: none;
  144. }
  145. .menu {
  146. float: left;
  147. height: 450px;
  148. width: 20%;
  149. background: no-repeat bottom right;
  150. background-image: url(../../assets/live/menu_back.jpg);
  151. margin: 30px 0;
  152. padding: 10px 0 0 10px;
  153. box-sizing: border-box;
  154. box-shadow: 0 0 10px #bbbaba;
  155. }
  156. .menu .el-image {
  157. width: 30px;
  158. display: inline-table;
  159. margin: 10px 5px;
  160. }
  161. .menu span {
  162. font-size: 24px;
  163. color: #92959a;
  164. font-weight: 600;
  165. margin-left: 3px;
  166. position: relative;
  167. top: 10px;
  168. }
  169. .menuList p {
  170. line-height: 60px;
  171. font-size: 18px;
  172. cursor: pointer;
  173. border-bottom: 1px solid #2d64b3;
  174. color: #044b79;
  175. font-weight: 600;
  176. }
  177. .info {
  178. width: 77%;
  179. float: right;
  180. margin: 30px 0 30px 2px;
  181. height: 585px;
  182. box-shadow: 0 0 10px #2d64b3;
  183. overflow: hidden;
  184. right: 0px;
  185. background: #ffffff;
  186. }
  187. .leftInfo {
  188. height: 500px;
  189. overflow: hidden;
  190. }
  191. .leftTop {
  192. font-size: 18px;
  193. width: 96%;
  194. height: 41px;
  195. line-height: 35px;
  196. border-bottom: 1px solid #e5e5e5;
  197. position: relative;
  198. bottom: 1px;
  199. margin: 10px;
  200. font-weight: 600;
  201. color: #22529a;
  202. }
  203. .page {
  204. text-align: center;
  205. margin: 10px 0;
  206. }
  207. /deep/.el-table td {
  208. text-align: center;
  209. padding: 0;
  210. height: 38px;
  211. }
  212. /deep/.el-table th {
  213. text-align: center;
  214. padding: 0;
  215. height: 40px;
  216. }
  217. /deep/ .el-table {
  218. // min-height: 500px;
  219. margin: 0 10px 10px 10px;
  220. top: 10px;
  221. }
  222. </style>