IndexView.vue 17 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562
  1. <template>
  2. <dv-full-screen-container>
  3. <div class="bigbox">
  4. <div class="top">
  5. <h2>
  6. 集团数据看板
  7. <div class="time">{{ currentTime }}</div>
  8. </h2>
  9. <dv-decoration-5 :color="['rgb(63, 150, 165)', 'yellow']" style="height:60px;margin: -25px auto;" />
  10. </div>
  11. <div class="container">
  12. <div class="left">
  13. <div class="smallbox">
  14. <dv-border-box-1 class="dv-border-box-1one">
  15. <router-link class="unline" :to="{ name: 'keliufenxidetails' }">
  16. 客流分析</router-link>
  17. <!-- <div class="lvlanbox">
  18. <div class="lv">
  19. <p>首次进店</p>
  20. <h4>
  21. <span>1068
  22. </span>人
  23. </h4>
  24. </div>
  25. <div class="lan">
  26. <p>首次进店</p>
  27. <h4>1068</h4>
  28. </div>
  29. </div> -->
  30. <!-- <div id="chartone"> -->
  31. <KLFX />
  32. <!-- </div> -->
  33. </dv-border-box-1>
  34. <dv-border-box-1 class="dv-border-box-1two"><router-link class="unline"
  35. :to="{ name: 'cheliangkucundetails' }">
  36. 车辆库存</router-link>
  37. <div class="lvlanbox">
  38. <div class="lv">
  39. <p>库存台次</p>
  40. <h4 style="overflow: hidden;">{{ clkcdata.stock_count }}<span>台</span></h4>
  41. </div>
  42. <div class="lan">
  43. <p>库存金额</p>
  44. <h4 style="overflow: hidden;height: 53px;">{{ (clkcdata.stock_amount / 10000).toFixed(2)
  45. }}<span>万</span></h4>
  46. </div>
  47. </div>
  48. <div class="whater">
  49. <dv-water-level-pond :config="chartConfig1" style="width:30%;height:100px" />
  50. <p>超180天</p>
  51. <dv-water-level-pond :config="chartConfig2" style="width:30%;height:100px" />
  52. <p>现金车</p>
  53. </div>
  54. </dv-border-box-1>
  55. </div>
  56. <p style="text-align: center;padding: 10px;font-size: 1.2rem;">销售分析</p>
  57. <div class="monthly">
  58. <dv-border-box-1 class="dv-border-box-1four"><router-link class="unline"
  59. :to="{ name: 'xiaoshoufenximondetails' }">
  60. 月度</router-link>
  61. <div class="monthlyboxs">
  62. <TCHB></TCHB>
  63. </div>
  64. </dv-border-box-1>
  65. <!-- <dv-border-box-1 class="dv-border-box-1five">年度
  66. <div class="monthlyboxs">
  67. <div class="monthlybox" style="padding-left: 20px;">
  68. <div class="mon1 lv">
  69. <p>首次进店</p>
  70. <h4><span>1068</span>人</h4>
  71. </div>
  72. <div class="mon2 lan">
  73. <p>首次进店</p>
  74. <h4><span>1068</span>人</h4>
  75. </div>
  76. <div class="mon3 huang">
  77. <p>首次进店</p>
  78. <h4><span>1068</span>人</h4>
  79. </div>
  80. </div>
  81. <div class="monthlybox" style="padding-top: 20px;">
  82. <p>台次环比</p>
  83. <TCHBY></TCHBY>
  84. <p style="margin-bottom: 20px;color: rgb(91, 211, 218);">完成率25</p>
  85. <div style="width: 80%;margin: 0 auto;"><el-progress :text-inside="true" define-back-color="gray"
  86. :stroke-width="12" color="rgb(12, 150, 120)" :percentage="70"></el-progress></div>
  87. </div>
  88. <div class="monthlybox" style="padding-top: 20px;">
  89. <p>台次环比</p>
  90. <LRHBY></LRHBY>
  91. <p style="margin-bottom: 20px;color: rgb(91, 211, 218);">完成率25</p>
  92. <div style="width: 80%;margin: 0 auto;"><el-progress :text-inside="true" define-back-color="gray"
  93. :stroke-width="12" color="rgb(150, 162, 60)" :percentage="70"></el-progress></div>
  94. </div>
  95. </div>
  96. </dv-border-box-1> -->
  97. <dv-border-box-1 class="dv-border-box-1five"><router-link class="unline" :to="{ name: 'fenqiyewudetails' }">
  98. 分期业务</router-link>
  99. <FQYW />
  100. <!-- <div style="width: 30%;">
  101. <div>
  102. <p style="margin: 20px 0;color: rgb(91, 211, 218);">高期限25</p>
  103. <div style="width: 100%;margin: 0 auto;"><el-progress :text-inside="true" define-back-color="gray"
  104. :stroke-width="20" color="rgb(80, 180, 210)" :percentage="70"></el-progress></div>
  105. </div>
  106. <div>
  107. <p style="margin: 20px 0;color: rgb(110, 211, 218);">渗透率25</p>
  108. <div style="width: 100%;margin: 0 auto;"><el-progress :text-inside="true" define-back-color="gray"
  109. :stroke-width="20" color="rgb(100, 233, 180)" :percentage="70"></el-progress></div>
  110. </div>
  111. </div> -->
  112. </dv-border-box-1>
  113. <dv-border-box-1 class="dv-border-box-1five"><router-link class="unline" :to="{ name: 'keyuanfenxidetails' }">
  114. 客源分析</router-link>
  115. <KYFX />
  116. </dv-border-box-1>
  117. <div class="chanyetj">
  118. <p style="text-align: center;margin:30px 0 30px 0;cursor: pointer;" @click="gojcdetail"><span
  119. class="unline">交车排名</span>
  120. </p>
  121. <JCPM></JCPM>
  122. <!-- <div><dv-scroll-board :config="jiaoche"
  123. style="width:600px;height:300px;text-align: center;margin: 0 auto;cursor: pointer;" />
  124. </div> -->
  125. </div>
  126. </div>
  127. </div>
  128. <div class="right">
  129. <div class="smallbox">
  130. <div style="width: 45%;cursor: pointer;" @click="gorctcdetail()">
  131. <dv-border-box-7 :color="['rgb(50,191,246)', 'rgb(131,191,246)']" class="taici">
  132. <div class="lv">
  133. <p>入厂台次</p>
  134. <h4><span>{{ rctcdata.total
  135. }}</span>台</h4>
  136. </div>
  137. <div class="shoubao1">
  138. <p><span>首保</span><span>{{ rctcdata.sb_count }}</span></p>
  139. <p><span>索赔</span><span>{{ rctcdata.sp_count }}</span></p>
  140. <p><span>定保</span><span>{{ rctcdata.db_count
  141. }}</span></p>
  142. <p><span>一般维修</span><span>{{ rctcdata.ws_count
  143. }}</span></p>
  144. <p><span>返喷</span><span>{{ rctcdata.bp_count
  145. }}</span></p>
  146. <p></p>
  147. </div>
  148. </dv-border-box-7>
  149. </div>
  150. <div style="width: 45%;cursor: pointer;" @click="gorcczdetail()">
  151. <!-- @click="gorcczdetail()" -->
  152. <dv-border-box-7 :color="['rgb(50,191,246)', 'rgb(131,191,246)']" class="chanzhi">
  153. <div class="lv">
  154. <p>入厂产值</p>
  155. <h4><span>{{ rctcdata.total_amount
  156. }}</span>万</h4>
  157. </div>
  158. <div class="shoubao2">
  159. <p><span>首保</span><span>{{ rctcdata.sb_amount }}</span></p>
  160. <p><span>索赔</span><span>{{ rctcdata.sp_amount }}</span></p>
  161. <p><span>定保</span><span>{{ rctcdata.db_amount
  162. }}</span></p>
  163. <p><span>一般维修</span><span>{{ rctcdata.ws_amount
  164. }}</span></p>
  165. <p><span>事故</span><span>{{ rctcdata.bp_amount
  166. }}</span></p>
  167. <p></p>
  168. </div>
  169. </dv-border-box-7>
  170. </div>
  171. </div>
  172. <div class="chanyetj">
  173. <p style="text-align: center;margin: 20px 0;" @click="goczdetail"><span class="unline">产值统计</span></p>
  174. <CZTJ></CZTJ>
  175. </div>
  176. <div class="chanyetj">
  177. <p style="text-align: center;margin: 30px 0 30px 0;" @click="gobxdetail">
  178. <span class="unline">保险承保核保</span>
  179. </p>
  180. <BXHB></BXHB>
  181. </div>
  182. <div style="width: 100%;">
  183. <p style="margin: 30px 0;text-align: center;cursor: pointer;" @click="gokcfxdetails"><span
  184. class="unline">库存分析</span></p>
  185. <KCFX />
  186. </div>
  187. <div style="width: 100%;">
  188. <p style="text-align: center;margin: 0 0 50px 0;"><router-link style="color: white;text-decoration: none;"
  189. :to="{ name: 'baokefenxidetails' }">
  190. <span class="unline">保客分析</span></router-link></p>
  191. <BKFX />
  192. </div>
  193. </div>
  194. </div>
  195. </div>
  196. </dv-full-screen-container>
  197. </template>
  198. <script>
  199. import KLFX from "./chart/KLFX.vue";//客流分析
  200. import FQYW from "./chart/FQYW.vue";//分期业务
  201. import KYFX from "./chart/KYFX.vue";//客源分析
  202. import KCFX from "./chart/KCFX.vue";//库存分析
  203. import BKFX from "./chart/BKFX.vue";//保客分析
  204. import TCHB from "./chart/TCHB.vue";//月度台次环比
  205. // import TCHBY from "./chart/TCHBY.vue";//台次环比
  206. // import LRHBY from "./chart/LRHBY.vue";//利润环比
  207. import JCPM from "./chart/JCPM.vue";//交车排名
  208. import CZTJ from "./chart/CZTJ.vue";//交车排名
  209. import BXHB from "./chart/BXHB.vue";//交车排名
  210. import { clkcchartInfo, rctcchartInfo, kcfxcompanInfo } from "../../servuces/prove";
  211. import { mapMutations } from "vuex";
  212. export default {
  213. data () {
  214. return {
  215. currentTime: "",//时间
  216. rctcdata: [],//首页入场台次数据
  217. clkcdata: [],//首页车辆库存数据
  218. //水位图
  219. chartConfig1: {
  220. data: [],
  221. colors: ['rgb(10,101,140)'],
  222. waveOpacity: 0.6
  223. },
  224. chartConfig2: {
  225. data: [],
  226. colors: ['rgb(10,101,140)'],
  227. waveOpacity: 0.6
  228. },
  229. };
  230. },
  231. mounted () {
  232. // 在组件创建时启动定时器,每秒更新一次时间
  233. this.updateTime();
  234. this.clkcchartapi()////首页车辆库存数据接口调取
  235. this.rctcchartapi()//首页入场台次数据接口调取
  236. this.kcfxcompanapi()//门店
  237. // //数字翻牌器定时器
  238. // setInterval(() => {
  239. // this.power(360);
  240. // }, 3000);
  241. },
  242. beforeDestroy () {
  243. // 在组件销毁前清除定时器,避免内存泄漏
  244. clearInterval(this.timer);
  245. },
  246. components: {
  247. KLFX,
  248. FQYW,
  249. KYFX,
  250. KCFX,
  251. BKFX,
  252. TCHB,
  253. JCPM,
  254. CZTJ,
  255. BXHB
  256. },
  257. methods: {
  258. ...mapMutations(['setData']),
  259. kcfxcompanapi () {
  260. kcfxcompanInfo().then(res => {
  261. const storefront = res.data
  262. this.setData(storefront)
  263. console.log('门店', res);
  264. sessionStorage.setItem('data', JSON.stringify(storefront))
  265. })
  266. },
  267. //首页入场台次数据接口调取
  268. rctcchartapi () {
  269. rctcchartInfo().then(res => {
  270. this.rctcdata = res.data
  271. })
  272. },
  273. //超过180
  274. //首页车辆库存数据接口调取
  275. clkcchartapi () {
  276. clkcchartInfo().then(res => {
  277. // const { chartConfig1 } = this
  278. // this.chartConfig1.data = res.data.cash_ratio
  279. this.chartConfig1.data = [(res.data.cash_ratio * 100).toFixed(2), 0]
  280. this.chartConfig2.data = [(res.data.overstock_ratio * 100).toFixed(2), 0]
  281. // 第一个参数最大值,第二个是默认值(默认为0就行了,字段拼成的数组)
  282. this.clkcdata = res.data
  283. this.chartConfig2 = { ...this.chartConfig2 }
  284. this.chartConfig1 = { ...this.chartConfig1 }
  285. })
  286. },
  287. //库存分析点击去详情
  288. gokcfxdetails () {
  289. this.$router.push('kucunfenxidetails')
  290. },
  291. //交车排行点击去详情
  292. gojcdetail () {
  293. this.$router.push('jiaochedetails')
  294. },
  295. //产值统计点击详情
  296. goczdetail () {
  297. this.$router.push('chanzhidetails')
  298. },
  299. //保险核保点击详情跳转
  300. gobxdetail () {
  301. this.$router.push('baoxiandetails')
  302. },
  303. //入场台次点击去产值统计
  304. gorctcdetail () {
  305. this.$router.push('ruchangtaicidetails')
  306. },
  307. //入场产值点击去产值统计
  308. gorcczdetail () {
  309. this.$router.push('ruchangchanzhidetails')
  310. },
  311. // //数字翻牌器
  312. // power(n) {
  313. // this.confignumber1.number[0] = Math.floor((Math.random() * n) + 1);
  314. // this.confignumber1 = { ...this.confignumber1 };//对象解构,更新props
  315. // },
  316. updateTime () {
  317. // 更新时间的方法
  318. this.currentTime = this.getCurrentTime();
  319. // 每秒更新一次时间
  320. this.timer = setInterval(() => {
  321. this.currentTime = this.getCurrentTime();
  322. }, 1000);
  323. },
  324. getCurrentTime () {
  325. // 获取当前时间的方法
  326. const now = new Date();
  327. const year = now.getFullYear();
  328. const month = String(now.getMonth() + 1).padStart(2, "0");
  329. const day = String(now.getDate()).padStart(2, "0");
  330. const hours = String(now.getHours()).padStart(2, "0");
  331. const minutes = String(now.getMinutes()).padStart(2, "0");
  332. const seconds = String(now.getSeconds()).padStart(2, "0");
  333. return `${year}-${month}-${day} ${hours}:${minutes}:${seconds}`;
  334. },
  335. },
  336. };
  337. </script>
  338. <style scoped lang="scss">
  339. ::-webkit-scrollbar {
  340. width: .3vw;
  341. background-color: rgba(30, 111, 200, 0.8)b;
  342. }
  343. ::-webkit-scrollbar-thumb {
  344. box-shadow: inset 0 0 6px rgba(0, 0, 0, .3);
  345. -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .3);
  346. border-radius: 5px;
  347. background-color: rgb(132, 153, 216);
  348. }
  349. ::-webkit-scrollbar-track {
  350. box-shadow: inset 0 0 5px rgba(0, 0, 0, 0.2);
  351. border-radius: 5px;
  352. background: rgba(30, 111, 200, 0.8);
  353. }
  354. #dv-full-screen-container {
  355. height: 100vh;
  356. overflow-y: auto;
  357. /* 当纵向内容溢出时显示滚动条 */
  358. /* 设置全屏高度 */
  359. }
  360. .bigbox {
  361. width: 96%;
  362. margin: 0 auto;
  363. .top {
  364. margin: 0 auto;
  365. width: 96%;
  366. h2 {
  367. padding-top: 10px;
  368. font-weight: 400;
  369. text-align: center;
  370. position: relative;
  371. .time {
  372. position: absolute;
  373. right: -30px;
  374. top: 33px;
  375. font-size: 16px;
  376. }
  377. }
  378. .dv-decoration-5 {
  379. polyline {
  380. margin-bottom: 20px;
  381. }
  382. }
  383. }
  384. .container {
  385. display: flex;
  386. justify-content: space-around;
  387. margin-top: 20px;
  388. .left {
  389. width: 40%;
  390. height: 300px;
  391. .smallbox {
  392. width: 100%;
  393. display: flex;
  394. justify-content: space-between;
  395. .dv-border-box-1one,
  396. .dv-border-box-1two {
  397. color: white;
  398. font-size: 1.2rem;
  399. text-align: center;
  400. width: 50%;
  401. height: 280px;
  402. #chartone {
  403. width: 200px;
  404. height: 150px;
  405. margin-left: 20px;
  406. }
  407. .lvlanbox {
  408. display: flex;
  409. justify-content: space-evenly;
  410. }
  411. .whater {
  412. display: flex;
  413. justify-content: space-evenly;
  414. margin-top: 30px;
  415. text-align: start;
  416. position: relative;
  417. width: 100%;
  418. p {
  419. color: white;
  420. text-align: center;
  421. position: absolute;
  422. font-size: 18px;
  423. }
  424. p:nth-child(2) {
  425. top: 60px;
  426. left: 20%;
  427. }
  428. p:nth-child(4) {
  429. top: 60px;
  430. right: 21%;
  431. }
  432. .dv-water-pond-level canvas {
  433. margin-left: 0 !important;
  434. }
  435. }
  436. }
  437. }
  438. .dv-border-box-1four,
  439. .dv-border-box-1five {
  440. width: 95%;
  441. height: 300px;
  442. text-align: center;
  443. font-size: 18px;
  444. margin: 0 auto;
  445. font-weight: 600;
  446. // .monthlyboxs {
  447. // display: flex;
  448. // justify-content: space-evenly;
  449. // font-weight: 400;
  450. // .monthlybox {
  451. // width: 33%;
  452. // ::v-deep .el-progress-bar__innerText {
  453. // display: block;
  454. // }
  455. // }
  456. // }
  457. }
  458. .dv-border-box-1five {
  459. margin-top: 30px;
  460. .fenqibox {
  461. display: flex;
  462. justify-content: space-around;
  463. }
  464. }
  465. }
  466. .right {
  467. width: 55%;
  468. padding-bottom: 150px;
  469. .smallbox {
  470. display: flex;
  471. justify-content: space-evenly;
  472. margin-top: 10px;
  473. .taici,
  474. .chanzhi {
  475. width: 100%;
  476. height: 320px;
  477. .shoubao1,
  478. .shoubao2 {
  479. width: 300px;
  480. height: 200px;
  481. margin: 30px auto;
  482. p {
  483. margin: 5px 0 0 32px;
  484. }
  485. p:nth-last-child(1) {
  486. margin-top: 15px;
  487. margin-left: 80px;
  488. }
  489. p:nth-child(4) {
  490. margin-left: 0px;
  491. }
  492. p span:nth-child(2) {
  493. margin-left: 128px;
  494. }
  495. }
  496. .lv {
  497. margin: 20px auto;
  498. }
  499. }
  500. }
  501. .chanyetj {
  502. p {
  503. cursor: pointer;
  504. }
  505. }
  506. }
  507. }
  508. }
  509. </style>