index.vue 8.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311
  1. <template>
  2. <el-col :span="24" class="tongxingguanli modular">
  3. <el-col class="top" >
  4. <span class="biao"></span>
  5. <span class="title">通行管理</span>
  6. </el-col>
  7. <el-row class="wrap" :gutter="32">
  8. <el-col class="left" :span="12">
  9. <el-col class="top" :span="24">
  10. <el-col class="left" :span="6">
  11. <el-col class="top">今日总人流量</el-col>
  12. <el-col class="bottom" >
  13. <el-col class="num">{{data1.n1}}<span class="unit">人/次</span></el-col>
  14. </el-col>
  15. </el-col>
  16. <el-col class="middle middleRight" :span="9">
  17. <el-col class="top">
  18. <el-col class="attribute">今日考勤人数:<span class="num">{{data1.n2}}</span><span class="unit">人/次</span></el-col>
  19. </el-col>
  20. <el-col class="bottom" >
  21. <el-col class="attribute">今日访客通行:<span class="num">{{data1.n3}}</span><span class="unit">人/次</span></el-col>
  22. </el-col>
  23. </el-col>
  24. <el-col class="bottom middleRight" :span="9">
  25. <el-col class="top">
  26. <el-col class="attribute">无感考勤效率提升:<span class="num">{{data1.n4}}</span><span class="unit">%</span></el-col>
  27. </el-col>
  28. <el-col class="bottom" >
  29. <el-col class="attribute">访客通行效率提升:<span class="num">{{data1.n5}}</span><span class="unit">%</span></el-col>
  30. </el-col>
  31. </el-col>
  32. </el-col>
  33. <el-col class="bottom" :span="24">
  34. <el-col class="left" :span="6">
  35. <el-image :src="img9" fit="scale-down"/>
  36. <el-col class="title">人员通行</el-col>
  37. </el-col>
  38. <el-col class="right" ><lineE :resData="lineData"/></el-col>
  39. </el-col>
  40. </el-col>
  41. <el-col class="right" :span="12">
  42. <el-col class="top" :span="24">
  43. <el-col class="left" :span="6">
  44. <el-col class="top">今日总车流量</el-col>
  45. <el-col class="bottom" >
  46. <el-col class="num">{{data2.n1}}<span class="unit">辆/次</span></el-col>
  47. </el-col>
  48. </el-col>
  49. <el-col class="middle middleRight" :span="16">
  50. <el-col class="top" style="padding-left:0;">
  51. <el-col class="attribute">地下停车场流量:<span class="num">{{data2.n2}}</span><span class="unit">辆/次</span></el-col>
  52. </el-col>
  53. <el-col class="bottom" style="padding-left:0;">
  54. <el-col class="attribute">VIP停车场流量:<span class="num">{{data2.n3}}</span><span class="unit">辆/次</span></el-col>
  55. </el-col>
  56. </el-col>
  57. </el-col>
  58. <el-col class="bottom" :span="24">
  59. <el-col class="left" :span="6">
  60. <el-image :src="img10" fit="scale-down"/>
  61. <el-col class="title">无人值守车辆通行</el-col>
  62. </el-col>
  63. <el-col class="right" ><lineE2 :resData="lineData2"/></el-col>
  64. </el-col>
  65. </el-col>
  66. </el-row>
  67. </el-col>
  68. </template>
  69. <script>
  70. import axios from 'axios'
  71. import img9 from "@/assets/images/9.png";
  72. import img10 from "@/assets/images/10.png";
  73. import lineE from "@/components3/tongxingguanli/lineE.vue";
  74. import lineE2 from "@/components3/tongxingguanli/lineE2.vue";
  75. export default {
  76. name: "tongxingguanli",
  77. props:["resInfo"],
  78. components: {
  79. lineE,
  80. lineE2
  81. },
  82. data() {
  83. return {
  84. data1:{
  85. n1:0,
  86. n2:0,
  87. n3:0,
  88. n4:0,
  89. n5:0,
  90. },
  91. data2:{},
  92. img9:img9,
  93. img10:img10,
  94. lineData:[],
  95. lineData2:[],
  96. };
  97. },
  98. watch:{
  99. resInfo(val,old){
  100. // this.data1 = val.people.data
  101. this.data2 = val.car.data
  102. let data = [
  103. [],
  104. [],
  105. [],
  106. [],
  107. ]
  108. axios({
  109. method: 'get',
  110. url: 'http://10.21.39.6:8087/api/thirdparty/v1/openInterface/yunUserRequest',
  111. timeout: 10000,
  112. }).then(res =>{
  113. let total = 0
  114. if(res.data){
  115. for(let i=0;i<res.data.length;i++){
  116. data[0].push(res.data[i].access_time)
  117. data[1].push(res.data[i].card_number)
  118. data[2].push(val.people.line[0][i])
  119. data[3] = val.people.line[1]
  120. this.data1.n1 = this.data1.n1 + res.data[i].card_number
  121. }
  122. }
  123. this.lineData = data
  124. }).catch(err =>{
  125. })
  126. this.data1.n2 = val.people.data.n2
  127. this.data1.n3 = val.people.data.n3
  128. this.data1.n4 = val.people.data.n4
  129. this.data1.n5 = val.people.data.n5
  130. this.lineData2 = val.car.line
  131. }
  132. }
  133. };
  134. </script>
  135. <style lang="scss" scoped>
  136. @import '@/assets/styles/common.scss';
  137. .wrap{
  138. color:$white;
  139. box-sizing: border-box;
  140. padding: 0 24px;
  141. >div{
  142. margin-top:10px;
  143. }
  144. >.left{
  145. >.top{
  146. height:90px;
  147. background: rgba(77,85,101,0.25);
  148. padding:16px 0 16px 0px !important;
  149. >.left{
  150. >.top{
  151. font-size: 16px;
  152. padding:0 !important;
  153. }
  154. >.bottom{
  155. margin-top:6px;
  156. font-weight: 700;
  157. padding:0 !important;
  158. .num{
  159. font-size: 24px;
  160. .unit{
  161. font-size: 20px;
  162. }
  163. }
  164. }
  165. }
  166. >.middle{
  167. border-left:1px solid #fff;
  168. border-right:1px solid #fff;
  169. }
  170. >.middleRight{
  171. padding:0 !important;
  172. >.top{
  173. font-size: 16px;
  174. padding:0 !important;
  175. // background: red;
  176. .attribute{
  177. .num{
  178. font-size: 20px;
  179. font-weight: 700;
  180. }
  181. }
  182. }
  183. >.bottom{
  184. padding:0 !important;
  185. margin-top:6px;
  186. font-size: 16px;
  187. .attribute{
  188. .num{
  189. font-size: 20px;
  190. font-weight: 700;
  191. }
  192. }
  193. }
  194. }
  195. }
  196. >.bottom{
  197. position: relative;
  198. >.left{
  199. height:100px;
  200. margin:12px 0 0 -16px !important;
  201. text-align: center;
  202. background-image: linear-gradient(180deg, rgba(77,85,101,0.00) 0%, #4D5565 100%);
  203. font-weight: 700;
  204. font-size: 14px;
  205. .el-image{
  206. margin:-4px 0 10px;
  207. }
  208. }
  209. }
  210. }
  211. >.right{
  212. >.top{
  213. height:90px;
  214. background: rgba(77,85,101,0.25);
  215. padding:16px 0 16px 16px;
  216. >.left{
  217. padding:0 !important;
  218. >.top{
  219. font-size: 16px;
  220. padding:0 !important;
  221. }
  222. >.bottom{
  223. margin-top:6px;
  224. font-weight: 700;
  225. padding:0 !important;
  226. .num{
  227. font-size: 26px;
  228. .unit{
  229. font-size: 20px;
  230. }
  231. }
  232. }
  233. }
  234. >.middle{
  235. border-left:1px solid #fff;
  236. padding:0 !important;
  237. }
  238. >.middleRight{
  239. padding:0 12px;
  240. >.top{
  241. font-size: 16px;
  242. .attribute{
  243. .num{
  244. font-size: 20px;
  245. font-weight: 700;
  246. }
  247. }
  248. }
  249. >.bottom{
  250. margin-top:6px;
  251. font-size: 16px;
  252. .attribute{
  253. .num{
  254. font-size: 20px;
  255. font-weight: 700;
  256. }
  257. }
  258. }
  259. }
  260. }
  261. >.bottom{
  262. position: relative;
  263. >.left{
  264. height:100px;
  265. margin:12px 0 0 -16px;
  266. text-align: center;
  267. background-image: linear-gradient(180deg, rgba(77,85,101,0.00) 0%, #4D5565 100%);
  268. font-weight: 700;
  269. font-size: 14px;
  270. padding:0 !important;
  271. .title{
  272. padding:0 !important;
  273. }
  274. .el-image{
  275. margin:-4px 0 10px;
  276. }
  277. }
  278. }
  279. .content{
  280. margin-top:40px;
  281. .attribute{
  282. margin-top:-70px;
  283. vertical-align: middle;
  284. font-size: 20px;
  285. margin-left: 78px;
  286. .num {
  287. font-size: 30px;
  288. font-family: "微软雅黑";
  289. font-weight: 700;
  290. margin: 0.7vh 0 0 -2px;
  291. .unit {
  292. font-size: 24px;
  293. width: auto;
  294. margin:10px 0 0 0px;
  295. vertical-align: middle;
  296. }
  297. }
  298. }
  299. }
  300. }
  301. }
  302. .attribute{
  303. padding:0 0 0 16px !important;
  304. }
  305. .num{
  306. padding:0 !important;
  307. }
  308. </style>