IndexView_20230711122355.vue 17 KB

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