CZTJ.vue 4.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178
  1. <template>
  2. <div class="cztj" >
  3. <div class="godetail" @click="chanzhitongji"><img src="../../assets/bargound/shuangjiantou.png" alt="">&nbsp;产值统计</div>
  4. <dv-scroll-board :config="cztj_data" style="width:94%;height:30%;text-align: center;margin: 12px auto;flex: 1;" />
  5. <div class="klfxtwosmallbox">
  6. <div class="klfxtwosmallbox1">
  7. <p @click="ruchangtaici">入场台次</p>
  8. <p><span style="color: rgb(44,214,204);font-size: 1.2rem;">{{tc_data.total}}</span>台</p>
  9. <span class="iconfont icon-cheliangshuliang" style="font-size: 2.8rem;"></span>
  10. </div>
  11. <div class="klfxtwosmallbox2">
  12. <p @click="ruchangchanzhi">入厂产值</p>
  13. <p><span style="color: rgb(209,177,50);font-size: 1.2rem;">{{tc_data.total_amount}}</span>万</p>
  14. <span class="iconfont icon-xindiantu" style="font-size: 3.5rem;"></span>
  15. </div>
  16. </div>
  17. <div id="cztjchart">
  18. <div>
  19. <p><span>首保</span><span>{{tc_data.sb_count}}</span></p>
  20. <p><span>索赔</span><span>{{tc_data.sp_count}}</span></p>
  21. <p><span>定保</span><span>{{tc_data.db_count}}</span></p>
  22. <p><span>一般维修</span><span>{{tc_data.ws_count}}</span></p>
  23. <p><span>事故</span><span>{{tc_data.bp_count}}</span></p>
  24. </div>
  25. <div>
  26. <p><span>首保</span><span>{{tc_data.sb_amount}}万</span></p>
  27. <p><span>索赔</span><span>{{tc_data.sp_amount}}万</span></p>
  28. <p><span>定保</span><span>{{tc_data.db_amount}}万</span></p>
  29. <p><span>一般维修</span><span>{{tc_data.ws_amount}}万</span></p>
  30. <p><span>事故</span><span>{{tc_data.bp_amount}}万</span></p>
  31. </div>
  32. </div>
  33. </div>
  34. </template>
  35. <script>
  36. import { cztjchartInfo, rctcchartInfo } from "../../servuces/prove";
  37. export default {
  38. data () {
  39. return {
  40. cztj_data: {
  41. header: ['/', '索赔', '一般维修', '定保', '事故', '首保'],
  42. data: [],
  43. rowNum: 3,
  44. headerBGC: 'rgb(19,54,84)',
  45. headerHeight: 28,
  46. align: 'center',
  47. evenRowBGC: 'rgb(8,27,43)',
  48. oddRowBGC: 'rgb(19,54,84)',
  49. },
  50. tc_data: {}
  51. }
  52. },
  53. mounted () {
  54. this.getCZTJData();
  55. this.getTCData();
  56. },
  57. methods: {
  58. getCZTJData () {
  59. cztjchartInfo().then(res => {
  60. const keyindex = {
  61. 'name': 0,
  62. 'sp': 1,
  63. 'wx': 2,
  64. 'db': 3,
  65. 'bp': 4,
  66. 'sb': 5
  67. };
  68. let item_values = [];
  69. res.data.map(obj => {
  70. let item_value = [];
  71. for (let key in obj) {
  72. let index = keyindex[key]
  73. item_value[index] = obj[key] + ''
  74. }
  75. item_values.push(item_value)
  76. });
  77. this.cztj_data.data = item_values;
  78. this.cztj_data = { ...this.cztj_data }
  79. })
  80. },
  81. getTCData () {
  82. rctcchartInfo().then(res => {
  83. this.tc_data = res.data;
  84. })
  85. },
  86. chanzhitongji(){
  87. this.$router.push('/chanzhitongjidetail')
  88. },
  89. ruchangtaici(){
  90. this.$router.push('/ruchangtaicidetail')
  91. },
  92. ruchangchanzhi(){
  93. this.$router.push('/ruchangchanzhidetail')
  94. }
  95. }
  96. }
  97. </script>
  98. <style scoped lang="scss">
  99. .cztj {
  100. width: 100%;
  101. height: 100%;
  102. display: flex;
  103. flex-direction: column;
  104. justify-content: space-between;
  105. .klfxtwosmallbox {
  106. display: flex;
  107. justify-content: space-around;
  108. font-size: 1rem;
  109. .klfxtwosmallbox1,
  110. .klfxtwosmallbox2 {
  111. width: 44%;
  112. padding: 2%;
  113. border: 1px solid rgb(69, 166, 196);
  114. position: relative;
  115. .icon-cheliangshuliang {
  116. position: absolute;
  117. right: 5%;
  118. top: 15%;
  119. color: rgb(47, 218, 226);
  120. }
  121. .icon-xindiantu {
  122. position: absolute;
  123. right: 5%;
  124. top: 5%;
  125. color: rgb(47, 218, 226);
  126. }
  127. }
  128. }
  129. #cztjchart {
  130. width: 100%;
  131. height: 34%;
  132. display: flex;
  133. justify-content: space-around;
  134. div {
  135. width: 46%;
  136. height: 100%;
  137. background-image: url(../../assets//bargound//chanzhitongjibiankuang.png);
  138. background-repeat: no-repeat;
  139. background-size: 100% 100%;
  140. padding: 3% 3% 10px 4%;
  141. font-size: .6rem;
  142. display: flex;
  143. justify-content: space-between;
  144. flex-direction: column;
  145. p {
  146. display: flex;
  147. justify-content: space-between;
  148. span:nth-child(1) {
  149. width: 50%;
  150. }
  151. span:nth-child(2) {
  152. max-width: 40%;
  153. min-width: 15%;
  154. }
  155. }
  156. }
  157. }
  158. }
  159. </style>