index.php 44 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154
  1. <?php
  2. /**
  3. * @link:http://www.gdqijianshi.com/
  4. * @copyright: Copyright (c) 2020 广东七件事集团
  5. * Created by PhpStorm
  6. * Author: hp
  7. * Date: 2020年7月6日
  8. * Time: 15:40
  9. */
  10. use common\helpers\ComponentHelper;
  11. defined('YII_ENV') or exit('Access Denied');
  12. $urlManager = Yii::$app->urlManager;
  13. ComponentHelper::loadComponentView('com-count-up');
  14. ComponentHelper::loadComponentView('overvier/com-funnel');
  15. ComponentHelper::loadComponentView('components/screen-contain', __DIR__);
  16. ComponentHelper::loadComponentView('components/full-see', __DIR__);
  17. ComponentHelper::loadComponentView('components/header-time', __DIR__);
  18. ?>
  19. <style scoped>
  20. .el-card {
  21. overflow: visible;
  22. min-width: 1620px;
  23. }
  24. .app-main {
  25. width: 100%;
  26. /*height: 100%;*/
  27. /*background-size: cover;*/
  28. /*background-repeat: no-repeat;*/
  29. }
  30. .app-main .data-screen {
  31. width: 100%;
  32. margin: 0 auto;
  33. min-width: 1620px;
  34. }
  35. .data-screen .title {
  36. width: 100%;
  37. height: 86px;
  38. font-size: 32px;
  39. line-height: 86px;
  40. text-align: center;
  41. font-weight: bold;
  42. background-size: 100%;
  43. background-repeat: no-repeat;
  44. color: #FFFFFF;
  45. }
  46. .data-screen-content{
  47. margin-top: 8px;
  48. }
  49. .dflex{
  50. display: flex;
  51. justify-content: space-between;
  52. margin: 10px 15px;
  53. }
  54. .data-statistics {
  55. color: #FFFFFF;
  56. width: 80%;
  57. }
  58. .new-guidance .data-statistics-title{
  59. margin: 12px 0;
  60. }
  61. .new-guidance .guidance-items{
  62. width: 300px;
  63. height: 505px;
  64. overflow-y: auto;
  65. }
  66. .new-guidance .guidance-items ul{
  67. list-style: none;
  68. border: 1px solid #13276f;
  69. margin:0 10px
  70. }
  71. .new-guidance .guidance-items ul li{
  72. display:flex;
  73. justify-content: space-between;
  74. align-items: center;
  75. padding:16px 24px;
  76. border-bottom: 1px solid #13276f;
  77. }
  78. .new-guidance .guidance-items ul li .video_play{
  79. display: flex;
  80. align-items: center;
  81. cursor: pointer;
  82. }
  83. .new-guidance .guidance-items ul li .video_play > img{
  84. width: 22px;
  85. height: 22px;
  86. }
  87. .new-guidance .guidance-items ul li .video_play > div{
  88. writing-mode: horizontal-tb;
  89. color:#FFF;
  90. font-size:17px;
  91. padding-left: 8px;
  92. }
  93. .new-guidance .guidance-items ul li .video_play >.study_state_name{
  94. color:#CBCBCB;
  95. }
  96. .new-guidance .guidance-items ul li .completion_status{
  97. font-size:17px;
  98. color:red;
  99. }
  100. .new-guidance .guidance-items ul li .study_state{
  101. color:#c5c6c6;
  102. }
  103. .new-guidance .guidance-btn{
  104. text-align: center;
  105. padding:20px;
  106. font-size:18px
  107. }
  108. .new-guidance .guidance-btn>div{
  109. padding:8px 6px;
  110. border:1px solid #042482;
  111. cursor: pointer;
  112. }
  113. .new-guidance .guidance-btn .download{
  114. color: #FFFFFF;
  115. padding:22px;
  116. margin-bottom:12px;
  117. display: flex;
  118. justify-content: space-between;
  119. align-items: center;
  120. }
  121. .new-guidance .guidance-btn .download .download_address{
  122. font-weight: 600;
  123. font-size:20px;
  124. }
  125. .new-guidance .guidance-btn .download >img{
  126. width: 25px;
  127. height: 25px;
  128. }
  129. .new-guidance .guidance-btn .customer-service{
  130. background-color: #002390;
  131. color:#fff;
  132. font-weight: 600;
  133. font-size:14px;
  134. padding:16px 0;
  135. height: 190px;
  136. }
  137. .new-guidance .guidance-btn .customer-service .service-top{
  138. display: flex;
  139. align-items: center;
  140. padding:6px 12px
  141. }
  142. .new-guidance .guidance-btn .customer-service .service-top >img{
  143. width: 80px;
  144. height: 80px;
  145. }
  146. .new-guidance .guidance-btn .customer-service .number{
  147. font-size:14px;
  148. width: 220px;
  149. border: 1px solid #fff;
  150. margin: 12px auto;
  151. padding: 10px 0;
  152. }
  153. .video_dialog{
  154. text-align: center;
  155. }
  156. .data-statistics .statistic {
  157. display: flex;
  158. justify-content: space-between;
  159. margin-bottom: 25px;
  160. }
  161. .data-statistics-title {
  162. height: 22px;
  163. font-size: 22px;
  164. font-weight: 500;
  165. color: #FFFFFF;
  166. line-height: 22px;
  167. text-align: center;
  168. margin-bottom: 12px;
  169. }
  170. .statistic .item .icon {
  171. width: 62px;
  172. height: 62px;
  173. background: #002390;
  174. border-radius: 50%;
  175. margin-right: 20px;
  176. margin-left: 44px;
  177. font-size: 40px;
  178. text-align: center;
  179. line-height: 62px;
  180. }
  181. .user-data-statistics .item {
  182. color: #FFFFFF;
  183. margin-bottom: 20px;
  184. }
  185. .user-data-statistics .item .text {
  186. font-size: 15px;
  187. margin-right: 8px;
  188. }
  189. .user-data-statistics .item .status {
  190. width: 63px;
  191. height: 15px;
  192. font-size: 10px;
  193. background: linear-gradient(90deg, #1D5FFF 0%, #03299B 100%);
  194. border-radius: 7px;
  195. line-height: 15px;
  196. text-align: center;
  197. }
  198. .user-data-statistics .item .num {
  199. font-size: 23px;
  200. }
  201. .user-data-statistics .item .last-day {
  202. color: #7D7D7D;
  203. font-size: 12px;
  204. }
  205. .user-data-statistics .need-to-know .complete{
  206. padding:4px 8px;
  207. border: 1px solid red;
  208. font-size:14px;
  209. border-radius:12px;
  210. }
  211. .goods-data-statistics .items {
  212. padding: 0 13px;
  213. color: #FFFFFF;
  214. }
  215. .goods-data-statistics .items .table-head {
  216. color: #FFFFFF;
  217. font-size: 18px;
  218. font-weight: 500;
  219. }
  220. .goods-data-statistics .items .scroll_box {
  221. overflow-y: auto;
  222. overflow-x: auto;
  223. height: 360px;
  224. }
  225. .goods-data-statistics .item {
  226. height: 65px;
  227. border-bottom: 1px solid #152B79;
  228. }
  229. .goods-data-statistics .item:last-child,
  230. .app-message .notice .item:last-child {
  231. border-bottom: 0;
  232. }
  233. .goods-data-statistics .item .goods-id {
  234. /*width: 68px;*/
  235. width: 38px;
  236. margin: 0 20px 0 12px;
  237. line-height: 65px;
  238. text-align: center;
  239. font-size: 18px;
  240. }
  241. .goods-data-statistics .item .goods-img {
  242. width: 37px;
  243. height: 37px;
  244. margin-right: 10px;
  245. }
  246. .goods-data-statistics .item .goods-name {
  247. font-size: 12px;
  248. line-height: 15px;
  249. max-width: 113px;
  250. overflow: hidden;
  251. text-overflow: ellipsis;
  252. display: -webkit-box;
  253. -webkit-box-orient: vertical;
  254. -webkit-line-clamp: 2;
  255. margin-right: 35px;
  256. }
  257. .goods-data-statistics .item .goods-num {
  258. font-size: 18px;
  259. line-height: 20px;
  260. font-weight: 500;
  261. text-align: center;
  262. }
  263. .map-transaction {
  264. padding: 30px 20px 0;
  265. max-width: 646px;
  266. }
  267. .map-transaction .num-text {
  268. font-size: 21px;
  269. }
  270. .map-transaction-sum {
  271. width: 100%;
  272. margin-bottom: 15px;
  273. }
  274. .map-transaction-item-num {
  275. font-size: 35px;
  276. line-height: 35px;
  277. margin-bottom: 15px;
  278. }
  279. .map-transaction-item-text {
  280. font-size: 16px;
  281. }
  282. .app-main .app-message {
  283. width: 315px;
  284. padding: 68px 0 45px;
  285. background: #0A1236;
  286. }
  287. .app-message .container {
  288. height: 100%;
  289. width: 100%;
  290. padding: 10px 25px;
  291. border-left: 1px solid #253986;
  292. color: #FFFFFF;
  293. }
  294. .app-message .phone {
  295. /*width:261px;*/
  296. height: 60px;
  297. border: 2px solid #14276E;
  298. }
  299. .app-message .notice {
  300. padding: 20px 14px;
  301. margin-bottom: 14px;
  302. }
  303. .app-message .notice .item {
  304. font-size: 15px;
  305. line-height: 24px;
  306. font-weight: 500;
  307. padding: 25px 0;
  308. border-bottom: 1px solid #162B7A;
  309. }
  310. .app-message .product-notice .item {
  311. border-bottom: 0;
  312. padding: 0;
  313. }
  314. .system-notice .item .text {
  315. overflow: hidden;
  316. text-overflow: ellipsis;
  317. display: -webkit-box;
  318. -webkit-box-orient: vertical;
  319. -webkit-line-clamp: 2;
  320. }
  321. .notice .data-statistics-title {
  322. margin-bottom: 0;
  323. display: flex;
  324. align-items: center;
  325. }
  326. .notice .data-statistics-title>span {
  327. margin: 0 10px;
  328. }
  329. .notice .data-statistics-title .here {
  330. color: #22A3E6;
  331. font-size: 13px;
  332. line-height: 13px;
  333. }
  334. .notice .data-statistics-title .iconfont {
  335. font-size: 30px;
  336. }
  337. .notice .items {
  338. overflow-y: auto;
  339. overflow-x: auto;
  340. height: 200px;
  341. }
  342. .phone>span {
  343. font-size: 20px;
  344. font-weight: 400;
  345. }
  346. .regards {
  347. font-size: 12px;
  348. }
  349. .regards .text {
  350. max-width: 128px;
  351. margin-bottom: 15px;
  352. line-height: 21px;
  353. }
  354. .regards .btn {
  355. padding: 5px 0;
  356. border: 1px solid rgb(255, 255, 255);
  357. }
  358. .box-1 {
  359. padding: 20px 0;
  360. width: 22%;
  361. height: 495px;
  362. background-image: url("<?= Yii::$app->request->baseUrl ?>/resources/img/mall/data-screen/box-1.png");
  363. background-size: 100% 100%;
  364. background-repeat: no-repeat;
  365. }
  366. .box-2 {
  367. width: 22%;
  368. height: 306px;
  369. background-image: url("<?= Yii::$app->request->baseUrl ?>/resources/img/mall/data-screen/box-2.png");
  370. background-size: 100% 100%;
  371. background-repeat: no-repeat;
  372. }
  373. .box-3 {
  374. width: 731px;
  375. height: 306px;
  376. background-image: url("<?= Yii::$app->request->baseUrl ?>/resources/img/mall/data-screen/box-3.png");
  377. background-size: 100% 100%;
  378. background-repeat: no-repeat;
  379. }
  380. .box-4 {
  381. width: 261px;
  382. height: 249px;
  383. background-image: url("<?= Yii::$app->request->baseUrl ?>/resources/img/mall/data-screen/box-4.png");
  384. background-size: 100% 100%;
  385. background-repeat: no-repeat;
  386. }
  387. .box-5 {
  388. padding: 10px 0;
  389. width: 300px;
  390. height: 880px;
  391. background-image: url("<?= Yii::$app->request->baseUrl ?>/resources/img/mall/data-screen/box-1.png");
  392. background-size: 100% 100%;
  393. background-repeat: no-repeat;
  394. }
  395. .goods_box {
  396. display: flex;
  397. justify-content: space-between;
  398. align-items: center;
  399. flex: 1;
  400. }
  401. .goods_box_c {
  402. display: flex;
  403. align-items: center;
  404. }
  405. .text-status {
  406. align-items: center;
  407. }
  408. .level_scrool_box {
  409. overflow-y: auto;
  410. overflow-x: auto;
  411. height: 420px;
  412. }
  413. .item_a {
  414. color: #FFFFFF;
  415. text-decoration: none;
  416. }
  417. .com-funnel .item:nth-child(2) .center {
  418. z-index: 999 !important;
  419. white-space: nowrap !important;
  420. }
  421. </style>
  422. <div id="app" v-cloak>
  423. <screen-contain text-left="" >
  424. <template v-slot:left>
  425. <full-see :display.sync="isDisplay"></full-see>
  426. </template>
  427. <template v-slot:right>
  428. <!-- <div class="sub-title" flex>
  429. <div class="sub-title-text">总线下门店:562310</div>
  430. <div class="sub-title-text">总线上门店:31235</div>
  431. </div> -->
  432. <header-time :display.sync="isDisplay"></header-time>
  433. </template>
  434. <el-card v-loading="loading" shadow="never" style="border:0" body-style="background-color: #f3f3f3;padding:0;">
  435. <div class="app-main" flex style="background-image: url('<?= Yii::$app->request->baseUrl ?>/resources/img/mall/data-screen/data-bg.jpg')">
  436. <div class="data-screen">
  437. <div class="title" style="background-image: url('<?= Yii::$app->request->baseUrl ?>/resources/img/mall/data-screen/data-title.png')">
  438. <span @click="$navigate({r: 'mall/data-census/driving-window'})">大数据平台</span>
  439. </div>
  440. <div class="data-screen-content" :class="{dflex:is_show_video_tutorials}">
  441. <div class="data-statistics">
  442. <div class="statistic up user-map-goods">
  443. <div class="user-data-statistics box-1">
  444. <div class="data-statistics-title">用户数据统计</div>
  445. <!-- <div class="need-to-know">
  446. <div class="icon">
  447. <i class="el-icon-s-opportunity"></i>
  448. 新人须知
  449. </div>
  450. <div class="complete">已完成</div>
  451. </div> -->
  452. <div class="items">
  453. <div class="level_scrool_box">
  454. <div class="item" flex="main:center">
  455. <div class="icon iconfont iconfangkeshu"></div>
  456. <!-- 访客量 -->
  457. <div class="centent" flex="dir:top main:center" flex-box="1">
  458. <div class="text-status" flex>
  459. <div class="text">访客量</div>
  460. <!-- <div class="status">{{item.type | type_status}}{{item.percent}}</div> -->
  461. <!-- v-if="detail_data.visitor_proportion != 0" -->
  462. <div style="display: flex;margin-top:4px;" v-if="detail_data.visitor_proportion != 0">
  463. <div class="status">{{detail_data.visitor_proportion | type_status}}{{Math.abs(parseInt(detail_data.visitor_proportion))}}%</div>
  464. <i class="text-status-icon iconfont" :class="detail_data.visitor_proportion>0 ? 'iconshangsheng' : 'iconxiajiang'" :style="detail_data.visitor_proportion<0 ? `color:#DC0113` : `color:#37A86D`"></i>
  465. </div>
  466. </div>
  467. <div class="num">{{detail_data.today_visitor_num}}</div>
  468. <div class="last-day">昨日全天: {{detail_data.yesterday_visitor_num}}</div>
  469. </div>
  470. </div>
  471. <!-- 浏览量 -->
  472. <div class="item" flex="main:center">
  473. <div class="icon iconfont iconliulanliang"></div>
  474. <div class="centent" flex="dir:top main:center" flex-box="1">
  475. <div class="text-status" flex>
  476. <div class="text">浏览量</div>
  477. <div style="display: flex;margin-top:4px;" v-if="detail_data.browse_proportion != 0">
  478. <div class="status">{{detail_data.browse_proportion | type_status}}{{Math.abs(parseInt(detail_data.browse_proportion))}}%</div>
  479. <i class="text-status-icon iconfont" :class="detail_data.browse_proportion>0 ? 'iconshangsheng' : 'iconxiajiang'" :style="detail_data.browse_proportion<0 ? `color:#DC0113` : `color:#37A86D`"></i>
  480. </div>
  481. </div>
  482. <div class="num">{{detail_data.today_browse_num}}</div>
  483. <div class="last-day">昨日全天: {{detail_data.yesterday_browse_num}}</div>
  484. </div>
  485. </div>
  486. <!-- 等级遍历 -->
  487. <div class="item" v-for="(item,i) in detail_data.level_list" :key="i" flex="main:center">
  488. <div class="icon iconfont iconliulanliang"></div>
  489. <div class="centent" flex="dir:top main:center" flex-box="1">
  490. <div class="text-status" flex>
  491. <div class="text">{{item.name}}</div>
  492. <div style="display: flex;margin-top:4px;" v-if="item.proportion != 0">
  493. <div class="status">{{item.proportion | type_status}}{{Math.abs(parseInt(item.proportion))}}%</div>
  494. <i class="text-status-icon iconfont" :class="item.proportion > 0 ? 'iconshangsheng' : 'iconxiajiang'" :style="item.proportion < 0 ? `color:#DC0113` : `color:#37A86D`"></i>
  495. </div>
  496. </div>
  497. <div class="num">{{item.today_num}}</div>
  498. <div class="last-day">昨日全天: {{item.yesterday_num}}</div>
  499. </div>
  500. </div>
  501. </div>
  502. <!-- <div class="item">
  503. <div class="icon"></div>
  504. <div class="centent" flex="dir:top main:center" flex-box="1">
  505. <div class="text-status" flex>
  506. <div class="text">{{item.name}}</div>
  507. <div class="status">{{item.type | type_status}}{{item.percent}}</div>
  508. <i class="text-status-icon iconfont" :class="item.type == 1 ? 'iconshangsheng' : 'iconxiajiang'" :style="item.type == 1 ? `color:#DC0113` : `color:#37A86D`"></i>
  509. </div>
  510. <div class="num">{{item.num}}</div>
  511. <div class="last-day">昨日全天: {{item.last_day_num}}</div>
  512. </div>
  513. </div> -->
  514. </div>
  515. </div>
  516. <div class="map-transaction" flex-box="1" flex="dir:top cross:center">
  517. <div class="map-transaction-num" flex="cross:center" style="margin-bottom: 45px;">
  518. <div class="num-text">总交易额:</div>
  519. <div v-if="detail_data">
  520. <com-count-up :count="detail_data.total_transactions" :end_datetime="endTime(detail_data.update_time)"></com-count-up>
  521. </div>
  522. </div>
  523. <div class="map-transaction-sum" flex="main:justify">
  524. <div class="map-transaction-item" v-for="(item,i) in map_transaction_sum_data" :key="i" flex="dir:top cross:center">
  525. <div class="map-transaction-item-num">{{item.num}}</div>
  526. <div class="map-transaction-item-text">{{item.text}}</div>
  527. </div>
  528. </div>
  529. <div id="map-echarts" style="width:100%;height:343px;"></div>
  530. </div>
  531. <div class="goods-data-statistics box-1">
  532. <div class="data-statistics-title">商品热销排行榜</div>
  533. <div class="items">
  534. <div class="table-head" flex>
  535. <div class="label" flex-box="0" style="margin: 0 20px 0 12px;">排行</div>
  536. <div class="label" flex-box="1" style="flex-basis: 165px">商品名称</div>
  537. <div class="label" flex-box="0" style="margin: 0 12px 0 20px;">销量</div>
  538. </div>
  539. <div class="scroll_box">
  540. <div class="item" flex="cross:center" v-for="(item,i) in detail_data.goods_list" :key="i">
  541. <div class="goods-id">{{i + 1}}</div>
  542. <div class="goods_box">
  543. <div class="goods_box_c">
  544. <img class="goods-img" :src="item.cover_pic">
  545. <div class="goods-name">{{item.goods_name}}</div>
  546. </div>
  547. <div class="goods-num">{{item.sales_num}}</div>
  548. </div>
  549. </div>
  550. </div>
  551. </div>
  552. </div>
  553. </div>
  554. <div class="statistic down user-order">
  555. <div class="total-data box-2" style="padding: 20px 10px">
  556. <div class="data-statistics-title">转化率统计</div>
  557. <!-- <div id="total-funnel-echarts" style="width: 100%;height:207px;"></div>-->
  558. <com-funnel :data-list="funnel_total_list"></com-funnel>
  559. </div>
  560. <div class="user-data box-3" style="padding: 20px 0;margin:0 8px" flex>
  561. <div class="user-buy" flex-box="1" style="max-width: 49%">
  562. <div class="data-statistics-title">用户购买力</div>
  563. <div id="user-buy-echarts" style="height: 220px;"></div>
  564. </div>
  565. <div class="user-source" flex-box="1" style="max-width: 49%">
  566. <div class="data-statistics-title">用户来源</div>
  567. <div id="user-source-echarts" style="height: 220px;"></div>
  568. </div>
  569. </div>
  570. <div class="order-data box-2" style="padding: 20px 10px">
  571. <div class="data-statistics-title">下单统计</div>
  572. <!-- <div id="order-funnel-echarts" style="width: 100%;height:207px;"></div>-->
  573. <com-funnel :data-list="funnel_order_list"></com-funnel>
  574. </div>
  575. </div>
  576. </div>
  577. <div class="new-guidance box-5" v-if="is_show_video_tutorials">
  578. <div class="data-statistics-title">新手指引</div>
  579. <div class="guidance-items">
  580. <ul>
  581. <li v-for="(item,index) in video_tutorials" v-if="item.url">
  582. <div class="video_play" @click="open_video(item)">
  583. <img src="resources/img/mall/play.png" alt="">
  584. <div :class="{study_state_name:item.study_state}">{{item.name}}</div>
  585. </div>
  586. <div class="completion_status" :class="{study_state:item.study_state}">
  587. {{item.study_state ? '已完成' : '待学习'}}
  588. </div>
  589. </li>
  590. </ul>
  591. </div>
  592. <div class="guidance-btn">
  593. <div class="download" @click="download">
  594. <div class="download_address">
  595. 谷歌浏览器下载
  596. </div>
  597. <img src="resources/img/mall/download.png" alt="">
  598. </div>
  599. <div class="customer-service">
  600. <div class="service-top" @click="opendAiService">
  601. <img :src="ai_img">
  602. <div>点击咨询在线客服</div>
  603. </div>
  604. <div class="number" v-if="contact_tel">
  605. 咨询电话:{{contact_tel}}
  606. </div>
  607. </div>
  608. </div>
  609. </div>
  610. <el-dialog
  611. :title="title"
  612. :visible.sync="dialogVisible"
  613. width="60%"
  614. v-if="dialogVisible"
  615. class="video_dialog"
  616. :close-on-click-modal="false"
  617. :before-close="handleClose">
  618. <video id="video" width="100%" controls autoplay>
  619. <source :src="video_url" type="video/mp4">
  620. </video>
  621. <span slot="footer" class="dialog-footer">
  622. <el-button @click="dialogVisible = false">取 消</el-button>
  623. <el-button type="primary" @click="dialogVisible = false">确 定</el-button>
  624. </span>
  625. </el-dialog>
  626. </div>
  627. </div>
  628. </div>
  629. </el-card>
  630. </screen-contain>
  631. </div>
  632. <script>
  633. const app = new Vue({
  634. el: '#app',
  635. data() {
  636. return {
  637. ai_img: '/resources/img/mall/overview/ai-unclick.gif',
  638. ai_click_status: false,
  639. title:'',
  640. isDisplay:1,
  641. dialogVisible: false,
  642. video_url:'',
  643. completion_status:false,
  644. is_show_video_tutorials:0,
  645. services_url: '',
  646. contact_tel:"",
  647. video_tutorials:[],
  648. // 加载动画
  649. loading: false,
  650. end_datetime: '',
  651. map_transaction_sum_data: [],
  652. detail_data: "",
  653. map_data_list: [],
  654. // 蛛网一
  655. spider_arr: [],
  656. spider_indicator: [],
  657. spider_max: [],
  658. // 蛛网二
  659. spider_arr2: [],
  660. spider_indicator2: [],
  661. spider_max2: [],
  662. is_services_show: false,
  663. funnel_total_list: [{
  664. text: '浏览量',
  665. num: 0
  666. }, {
  667. text: '访客量',
  668. num: 0
  669. }, {
  670. text: '关注',
  671. num: 0
  672. }],
  673. funnel_order_list: [{
  674. text: '访问量',
  675. num: 0
  676. }, {
  677. text: '下单',
  678. num: 0
  679. }, {
  680. text: '支付',
  681. num: 0
  682. }]
  683. };
  684. },
  685. mounted() {
  686. this.getData();
  687. // this.getService();
  688. },
  689. computed: {
  690. endTime() {
  691. return function(time) {
  692. let date = new Date(time * 1000);
  693. let Y = date.getFullYear();
  694. let m = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1);
  695. let d = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate());
  696. let H = (date.getHours() < 10 ? '0' + date.getHours() : date.getHours());
  697. let i = (date.getMinutes() < 10 ? '0' + date.getMinutes() : date.getMinutes());
  698. let s = (date.getSeconds() < 10 ? '0' + date.getSeconds() : date.getSeconds());
  699. return `${Y}-${m}-${d} ${H}:${i}:${s}`;
  700. }
  701. },
  702. fomentDate() {
  703. return function(time) {
  704. let date = new Date(time * 1000);
  705. let m = (date.getMonth() + 1 < 10 ? '0' + (date.getMonth() + 1) : date.getMonth() + 1);
  706. let d = (date.getDate() < 10 ? '0' + (date.getDate()) : date.getDate());
  707. return `${m}-${d}`;
  708. }
  709. }
  710. },
  711. methods: {
  712. getService() {
  713. // request({
  714. // params: {
  715. // r: 'mall/overview/mall-header',
  716. // },
  717. // method: 'get',
  718. // }).then(e => {
  719. // this.serviceData = e.data.data;
  720. // if (this.serviceData.services.length != 0) {
  721. // this.services_url = decodeURIComponent(data.services.web_service_url.value);
  722. // this.is_services_show = true;
  723. // }
  724. // })
  725. },
  726. open_video(data){
  727. let that = this
  728. this.title = data.name,
  729. this.video_url = data.url,
  730. this.dialogVisible = true
  731. setTimeout(() => {
  732. var video = document.getElementById('video');
  733. video.addEventListener("timeupdate",function(){
  734. var timeDisplay;
  735. // timeDisplay = Math.floor(video.currentTime);
  736. timeDisplay = video.currentTime
  737. if (timeDisplay >= 20 && timeDisplay<20.3) {
  738. that.video_progress(data.id)
  739. }
  740. },false);
  741. }, 800);
  742. },
  743. video_progress(id) {
  744. this.loading = true;
  745. let data = {
  746. video_tutorials_id:id,
  747. is_complete:1,
  748. view_times:20
  749. }
  750. request({
  751. params: {
  752. r: 'mall/overview/add-video-tutorials-log',
  753. },
  754. method: 'post',
  755. data
  756. }).then(e => {
  757. this.loading = false;
  758. if (e.data.code == 0) {
  759. localStorage.setItem("study_"+id,1);
  760. }
  761. })
  762. },
  763. handleClose(done) {
  764. this.$confirm('确认关闭?')
  765. .then(_ => {
  766. done();
  767. })
  768. .catch(_ => {});
  769. },
  770. getData() {
  771. this.loading = true;
  772. request({
  773. params: {
  774. r: 'mall/overview/index',
  775. },
  776. method: 'get',
  777. }).then(e => {
  778. this.loading = false;
  779. if (e.data.code == 0) {
  780. this.detail_data = e.data.data;
  781. // 新手视频数据
  782. let is_open_video = false;
  783. this.detail_data.video_tutorials.map((e,index)=>{
  784. e.study_state = localStorage.getItem("study_"+e.id) == 1
  785. if (e.url && index == 0) is_open_video = true
  786. })
  787. this.is_show_video_tutorials = this.detail_data.is_show_video_tutorials
  788. this.video_tutorials = this.detail_data.video_tutorials
  789. if (this.is_show_video_tutorials && this.detail_data.is_watch_first_video_tutorial == 0) {
  790. // 第一次打开视频,添加设置
  791. let header_data = localStorage.getItem("mall_header_data");
  792. if (!isEmpty(header_data)) {
  793. header_data = JSON.parse(header_data)
  794. localStorage.setItem("is_show_video", header_data.user.id);
  795. }
  796. if (is_open_video) this.open_video(this.detail_data.video_tutorials[0])
  797. }
  798. this.contact_tel = this.splitPhone(this.detail_data.contact_tel)
  799. // 转化率统计数据
  800. this.funnel_total_list[0].num = this.detail_data.conversion_browse_num;
  801. this.funnel_total_list[1].num = this.detail_data.conversion_visitor_num;
  802. this.funnel_total_list[2].num = this.detail_data.follow_num;
  803. // 下单统计数据
  804. this.funnel_order_list[0].num = this.detail_data.order_visit_num;
  805. this.funnel_order_list[1].num = this.detail_data.order_num;
  806. this.funnel_order_list[2].num = this.detail_data.pay_num;
  807. // 顶部数据,交易金额下面
  808. this.map_transaction_sum_data = [{
  809. num: this.detail_data.today_earnings,
  810. text: '今日收益'
  811. }, {
  812. num: this.detail_data.add_user,
  813. text: '新增用户'
  814. }, {
  815. num: this.detail_data.user_sum,
  816. text: '总用户数量'
  817. }];
  818. // 地图数据
  819. this.detail_data.province_list.forEach(item => {
  820. delete item.id;
  821. delete item.level;
  822. delete item.parent_id;
  823. item.value = item.pay_money;
  824. delete item.order;
  825. item.name = item.name.split('省')[0];
  826. item.name = item.name.split('市')[0];
  827. item.name = item.name.split('特别行政区')[0];
  828. item.name = item.name.split('壮族自治区')[0];
  829. item.name = item.name.split('回族自治区')[0];
  830. item.name = item.name.split('维吾尔自治区')[0];
  831. item.name = item.name.split('自治区')[0];
  832. this.map_data_list.push(item);
  833. })
  834. this.map_data_list.push({
  835. name: "南海诸岛",
  836. value: 0,
  837. itemStyle: {
  838. normal: {
  839. opacity: 1,
  840. label: {
  841. show: false
  842. }
  843. }
  844. }
  845. })
  846. // 蜘蛛网1
  847. this.detail_data.user_source.forEach(item => {
  848. this.spider_arr.push(item.num);
  849. })
  850. this.spider_max = Math.max.apply(null, this.spider_arr) ? Math.max.apply(null, this.spider_arr) : 1; //取最大值
  851. this.detail_data.user_source.forEach(item => {
  852. this.spider_indicator.push({
  853. 'text': item.name,
  854. 'max': this.spider_max
  855. })
  856. })
  857. // 蜘蛛网2
  858. this.detail_data.purchasing_power.forEach(item => {
  859. this.spider_arr2.push(item.num);
  860. })
  861. this.spider_max2 = Math.max.apply(null, this.spider_arr2) ? Math.max.apply(null, this.spider_arr2) : 1; //取最大值
  862. this.detail_data.purchasing_power.forEach(item => {
  863. this.spider_indicator2.push({
  864. 'text': item.name,
  865. 'max': this.spider_max2
  866. })
  867. })
  868. this.form();
  869. }
  870. this.load = true;
  871. })
  872. },
  873. splitPhone(str) {
  874. let phone = str.toString()
  875. if (phone.length !== 11) return phone
  876. var arr = phone.split('')
  877. arr.splice(3, 0, '-');
  878. arr.splice(8, 0, '-');
  879. return arr.join("");
  880. },
  881. // 生成图表
  882. form(data) {
  883. let that = this;
  884. // 地图
  885. var mapChart = echarts.init(document.getElementById('map-echarts'));
  886. mapChart.setOption({
  887. tooltip: {
  888. trigger: 'item',
  889. formatter: '{b}: {c}',
  890. },
  891. visualMap: {
  892. mix: 0,
  893. max: 500,
  894. inRange: {
  895. color: ['#1e60ff', '#0540c3', '#0032c1', '#002390']
  896. },
  897. textStyle: {
  898. color: '#ffffff'
  899. }
  900. },
  901. series: [{
  902. type: 'map',
  903. mapType: 'china',
  904. roam: false,
  905. label: {
  906. normal: {
  907. show: false,
  908. },
  909. emphasis: {
  910. show: true,
  911. textStyle: {
  912. color: 'rgb(249, 249, 249)'
  913. }
  914. }
  915. },
  916. data: that.map_data_list
  917. }]
  918. });
  919. // 蜘蛛网
  920. var userBuyEcharts = echarts.init(document.getElementById('user-source-echarts'));
  921. var userSourceEcharts = echarts.init(document.getElementById('user-buy-echarts'));
  922. let option = {
  923. tooltip: {
  924. trigger: 'axis'
  925. },
  926. radar: [{
  927. name: {
  928. show: true, // 是否显示工艺等文字
  929. formatter: null, // 工艺等文字的显示形式
  930. textStyle: {
  931. color: '#ffffff' // 工艺等文字颜色
  932. }
  933. },
  934. indicator: this.spider_indicator2,
  935. // center: ['25%', '40%'],
  936. radius: 80,
  937. splitArea: {
  938. show: true,
  939. areaStyle: {
  940. color: ["transparent"] // 图表背景网格的颜色
  941. }
  942. },
  943. }],
  944. series: [{
  945. type: 'radar',
  946. symbol: "none", // 取消拐点
  947. itemStyle: {
  948. normal: {
  949. color: "rgba(0,0,0,0)",
  950. lineStyle: {
  951. color: "#1E60FF" // 图表中各个图区域的边框线颜色
  952. },
  953. }
  954. },
  955. tooltip: {
  956. trigger: 'item'
  957. },
  958. data: [{
  959. value: this.spider_arr2,
  960. name: '用户购买力',
  961. itemStyle: {
  962. normal: {
  963. areaStyle: {
  964. type: 'default',
  965. opacity: 1, // 图表中各个图区域的透明度
  966. color: "#1E60FF" // 图表中各个图区域的颜色
  967. }
  968. }
  969. },
  970. }]
  971. }]
  972. };
  973. // let option_copy = JSON.parse(JSON.stringify(option));
  974. let option_copy = {
  975. tooltip: {
  976. trigger: 'axis'
  977. },
  978. radar: [{
  979. name: {
  980. show: true,
  981. textStyle: {
  982. color: '#ffffff'
  983. }
  984. },
  985. indicator: this.spider_indicator,
  986. radius: 80,
  987. splitArea: {
  988. show: true,
  989. areaStyle: {
  990. color: ["transparent"] // 图表背景网格的颜色
  991. }
  992. },
  993. }],
  994. series: [{
  995. type: 'radar',
  996. symbol: "none",
  997. tooltip: {
  998. trigger: 'item'
  999. },
  1000. itemStyle: {
  1001. normal: {
  1002. color: "rgba(0,0,0,0)",
  1003. lineStyle: {
  1004. color: "#1E60FF"
  1005. },
  1006. }
  1007. },
  1008. data: [{
  1009. value: this.spider_arr,
  1010. name: '用户来源',
  1011. itemStyle: {
  1012. normal: {
  1013. areaStyle: {
  1014. type: 'default',
  1015. opacity: 1,
  1016. color: '#1E60FF'
  1017. }
  1018. }
  1019. }
  1020. }]
  1021. }]
  1022. };
  1023. userBuyEcharts.setOption(option_copy);
  1024. userSourceEcharts.setOption(option);
  1025. },
  1026. download(){
  1027. window.open('https://www.google.cn/chrome/index.html');
  1028. },
  1029. opendAiService() {
  1030. if (this.ai_click_status == true) return;
  1031. this.ai_click_status = true;
  1032. this.ai_img = '/resources/img/mall/overview/ai-click.gif';
  1033. request({
  1034. params: {
  1035. r: 'mall/overview/get-ai-service'
  1036. },
  1037. method: 'get'
  1038. }).then(e => {
  1039. this.loading = false;
  1040. if (e.data.code == 0) {
  1041. let url = e.data.data
  1042. window.open(url, '_blank', 'width=500,height=700');
  1043. this.ai_img = '/resources/img/mall/overview/ai-unclick.gif';
  1044. this.ai_click_status = false;
  1045. } else {
  1046. this.ai_img = '/resources/img/mall/overview/ai-unclick.gif';
  1047. this.$message.error(e.data.message);
  1048. this.ai_click_status = false;
  1049. }
  1050. }).catch(e => {
  1051. this.ai_img = '/resources/img/mall/overview/ai-unclick.gif';
  1052. this.ai_click_status = false;
  1053. });
  1054. }
  1055. },
  1056. filters: {
  1057. type_status(value) {
  1058. return value > 0 ? '上升' : '下降';
  1059. }
  1060. }
  1061. })
  1062. </script>