list.vue 9.5 KB

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