liveCenter.vue 7.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268
  1. <template>
  2. <div id="liveCenter">
  3. <el-row>
  4. <el-col :span="24" class="main">
  5. <div class="w_1200">
  6. <el-col :span="24" class="info">
  7. <el-col :span="24" class="top">
  8. <el-col :span="24" class="one">
  9. <el-col :span="16" class="left textOver">
  10. <span>{{ dockInfo.title }}</span>
  11. <span>展会实况</span>
  12. </el-col>
  13. <el-col :span="8" class="right">
  14. <el-button class="btn1" @click="$router.push({ path: '/halltwo/directTwo', query: { id: dockInfo.id } })">返回展会进行页</el-button>
  15. <el-button class="btn2" @click="$router.push({ path: '/halltwo/detail', query: { dock_id: dockInfo.id } })">进入展会总结页</el-button>
  16. </el-col>
  17. </el-col>
  18. <el-col :span="24" class="two">
  19. <p>
  20. 最近更新时间:<span style="color:#000;">{{ statNum.date }}</span>
  21. </p>
  22. <p>
  23. 参加总人数<span>{{ statNum.zrs || 0 }}</span
  24. >人
  25. </p>
  26. <p>
  27. 对接<span>{{ statNum.jywc || 0 }}</span
  28. >次
  29. </p>
  30. <p>
  31. 产生意向<span>{{ statNum.qthz || 0 }}</span
  32. >次
  33. </p>
  34. <p>
  35. 达成意向<span>{{ statNum.dcyx || 0 }}</span
  36. >次
  37. </p>
  38. </el-col>
  39. <el-col :span="24" class="three">
  40. 滚动
  41. </el-col>
  42. </el-col>
  43. <el-col :span="24" class="down">
  44. <el-col :span="24" class="one">
  45. <el-col :span="4" class="left">
  46. 展会动态
  47. </el-col>
  48. <el-col :span="20" class="right">
  49. <marquee beavior="scroll">
  50. <span class="trainoneList" v-for="(item, index) in trainoneList" :key="index">
  51. {{ item.market_username }}与{{ item.username }} {{ item.status == '0' ? '产生意向' : item.status == '1' ? '达成意向' : '实现对接' }}</span
  52. >
  53. </marquee>
  54. </el-col>
  55. </el-col>
  56. <el-col :span="24" class="two">
  57. <p>
  58. <span>主办单位:</span><span>{{ dockInfo.sponsor }}</span>
  59. </p>
  60. <p>
  61. <span>承办单位:</span><span>{{ dockInfo.organizer }}</span>
  62. </p>
  63. <p><span>技术支持:</span><span>长春市福瑞科技有限公司</span></p>
  64. </el-col>
  65. </el-col>
  66. </el-col>
  67. </div>
  68. </el-col>
  69. </el-row>
  70. </div>
  71. </template>
  72. <script>
  73. import { mapState, createNamespacedHelpers } from 'vuex';
  74. import data from '../dynamic/parts/js/code';
  75. const { mapActions: dock } = createNamespacedHelpers('dock');
  76. const { mapActions: transaction } = createNamespacedHelpers('transaction');
  77. var moment = require('moment');
  78. export default {
  79. metaInfo() {
  80. return { title: this.$route.meta.title };
  81. },
  82. name: 'liveCenter',
  83. props: {},
  84. components: {},
  85. data: function() {
  86. return {
  87. // 展会详情
  88. dockInfo: {},
  89. // 统计数
  90. statNum: {},
  91. // 横向滚动
  92. trainoneList: [],
  93. };
  94. },
  95. async created() {
  96. await this.searchInfo();
  97. },
  98. methods: {
  99. ...dock({ dockQuery: 'query', dockFetch: 'fetch', goodsquery: 'goodsquery' }),
  100. ...transaction({ tquery: 'query' }),
  101. async searchInfo() {
  102. // 查询展会详情
  103. if (this.dock_id) {
  104. let res = await this.dockFetch(this.dock_id);
  105. if (this.$checkRes(res)) {
  106. this.$set(this, `dockInfo`, res.data);
  107. }
  108. // 查询数目
  109. let statNum = {};
  110. // 当前时间
  111. statNum.date = moment().format('yyyy-DD-mm');
  112. // 总人数
  113. statNum.zrs = res.data.apply.length;
  114. // 所有
  115. let trans = await this.tquery({ dock_id: this.id });
  116. if (this.$checkRes(res)) {
  117. this.$set(this, `trainoneList`, trans.data);
  118. }
  119. // 正在洽谈
  120. let qthe = await this.tquery({ status: 0, dock_id: this.dock_id });
  121. if (this.$checkRes(qthe)) {
  122. statNum.qthz = qthe.total;
  123. }
  124. // 达成意向
  125. let dcyx = await this.tquery({ status: 1, dock_id: this.dock_id });
  126. if (this.$checkRes(dcyx)) {
  127. statNum.dcyx = dcyx.total;
  128. }
  129. // 交易完成
  130. let jywc = await this.tquery({ status: 2, dock_id: this.dock_id });
  131. if (this.$checkRes(jywc)) {
  132. statNum.jywc = jywc.total;
  133. }
  134. this.$set(this, `statNum`, statNum);
  135. }
  136. },
  137. },
  138. computed: {
  139. ...mapState(['user']),
  140. dock_id() {
  141. return this.$route.query.dock_id;
  142. },
  143. },
  144. watch: {},
  145. };
  146. </script>
  147. <style lang="less" scoped>
  148. .main {
  149. .info {
  150. background-color: #2152cb;
  151. .top {
  152. .one {
  153. height: 143px;
  154. overflow: hidden;
  155. .left {
  156. padding: 0 15px;
  157. height: 143px;
  158. line-height: 143px;
  159. span:nth-child(1) {
  160. font-size: 35px;
  161. color: #fff;
  162. font-weight: bold;
  163. }
  164. span:nth-child(2) {
  165. color: #fee452;
  166. font-size: 41px;
  167. font-weight: bold;
  168. padding: 0 10px;
  169. text-shadow: 3px 3px 3px #000;
  170. }
  171. }
  172. .right {
  173. text-align: right;
  174. padding: 4% 1%;
  175. .btn1 {
  176. font-size: 16px;
  177. color: #fff;
  178. background: red;
  179. border: none;
  180. font-weight: bold;
  181. }
  182. .btn2 {
  183. font-size: 16px;
  184. color: #ff0000;
  185. border: 1px solid #ff0000;
  186. font-weight: bold;
  187. }
  188. }
  189. }
  190. .two {
  191. margin: 0 0 15px 0;
  192. p {
  193. float: left;
  194. width: 232px;
  195. height: 58px;
  196. margin: 0 10px 0 0;
  197. background-color: #fdb21e;
  198. text-align: center;
  199. line-height: 58px;
  200. span {
  201. color: blue;
  202. }
  203. }
  204. p:nth-child(1) {
  205. border-top-left-radius: 5px;
  206. border-bottom-left-radius: 5px;
  207. }
  208. p:nth-child(5) {
  209. margin: 0;
  210. border-top-right-radius: 5px;
  211. border-bottom-right-radius: 5px;
  212. }
  213. }
  214. .three {
  215. height: 500px;
  216. padding: 0 10px;
  217. }
  218. }
  219. .down {
  220. height: 220px;
  221. border-top: 1px solid #010e6b;
  222. background: -webkit-linear-gradient(top, #2152cb, #082e8b);
  223. padding: 15px;
  224. .one {
  225. height: 54px;
  226. border: 1px solid #fdb21e;
  227. .left {
  228. width: 120px;
  229. background: #fdb21e;
  230. border-radius: 5px;
  231. font-size: 18px;
  232. text-align: center;
  233. line-height: 40px;
  234. height: 40px;
  235. margin: 5px 0 0 5px;
  236. }
  237. .right {
  238. .trainoneList {
  239. display: inline-block;
  240. height: 54px;
  241. line-height: 54px;
  242. color: #fff;
  243. font-size: 16px;
  244. padding: 0 10px;
  245. }
  246. }
  247. }
  248. .two {
  249. p {
  250. padding: 10px 0;
  251. span:nth-child(1) {
  252. font-size: 20px;
  253. color: #fde350;
  254. letter-spacing: 15px;
  255. }
  256. span:nth-child(2) {
  257. font-size: 16px;
  258. color: #fff;
  259. }
  260. }
  261. }
  262. }
  263. }
  264. }
  265. </style>