SpareWorkplaceBacklog.vue 7.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284
  1. <template>
  2. <a-row :gutter="[20,30]">
  3. <a-col :span="14">
  4. <a-card title="总览">
  5. <a-row type="flex" justify="space-between" align="middle">
  6. <a-col :span="4">
  7. <div class="top-left">
  8. <div>
  9. <img src="@/assets/spare/1.png" width="63px" alt="">
  10. </div>
  11. <div>
  12. <div>备件总数</div>
  13. <div>
  14. <span>5</span>个
  15. </div>
  16. </div>
  17. <div class="top-left-bg" style="background:#F5F7FA"></div>
  18. </div>
  19. </a-col>
  20. <a-col :span="4">
  21. <div class="top-left">
  22. <div>
  23. <img src="@/assets/spare/2.png" width="63px" alt="">
  24. </div>
  25. <div>
  26. <div>备件类别</div>
  27. <div>
  28. <span>11</span>种
  29. </div>
  30. </div>
  31. <div class="top-left-bg" style="background:#F0F8FE"></div>
  32. </div>
  33. </a-col>
  34. <a-col :span="4">
  35. <div class="top-left">
  36. <div>
  37. <img src="@/assets/spare/3.png" width="63px" alt="">
  38. </div>
  39. <div>
  40. <div>重要备件</div>
  41. <div>
  42. <span>5</span>个
  43. </div>
  44. </div>
  45. <div class="top-left-bg" style="background:#FBF4E7"></div>
  46. </div>
  47. </a-col>
  48. <a-col :span="4">
  49. <div class="top-left">
  50. <div>
  51. <img src="@/assets/spare/4.png" width="63px" alt="">
  52. </div>
  53. <div>
  54. <div>专用备件</div>
  55. <div>
  56. <span>12</span>个
  57. </div>
  58. </div>
  59. <div class="top-left-bg" style="background:#FBE7E3"></div>
  60. </div>
  61. </a-col>
  62. <a-col :span="4">
  63. <div class="top-left">
  64. <div>
  65. <img src="@/assets/spare/5.png" width="63px" alt="">
  66. </div>
  67. <div>
  68. <div>总库存</div>
  69. <div>
  70. <span>5</span>个
  71. </div>
  72. </div>
  73. <div class="top-left-bg" style="background:#EBFEF1"></div>
  74. </div>
  75. </a-col>
  76. </a-row>
  77. </a-card>
  78. </a-col>
  79. <a-col :span="5">
  80. <a-card title="仓库地图">
  81. <div class="top-left hover" @click="$router.push('/sb/position/img')">
  82. <img src="@/assets/bgView/zidi.png" width="100%" height="100%" alt="">
  83. </div>
  84. </a-card>
  85. </a-col>
  86. <a-col :span="5">
  87. <a-card title="备件地图">
  88. <div class="top-left hover" @click="$router.push('/spare/view/map')">
  89. <img src="@/assets/bgView/xiandi.png" width="100%" height="100%" alt="">
  90. </div>
  91. </a-card>
  92. </a-col>
  93. <a-col :span="24">
  94. <a-card title="预警列表">
  95. <a-row :gutter="50">
  96. <a-col :span="5">
  97. <div class="middle-box">
  98. <div>更换预警</div>
  99. <span>126</span>
  100. </div>
  101. </a-col>
  102. <a-col :span="5">
  103. <div class="middle-box" style="border-color:#F59B00">
  104. <div>编号重复预警</div>
  105. <span>126</span>
  106. </div>
  107. </a-col>
  108. <a-col :span="5">
  109. <div class="middle-box" style="border-color:#F26264">
  110. <div>变更预警</div>
  111. <span>126</span>
  112. </div>
  113. </a-col>
  114. <a-col :span="5">
  115. <div class="middle-box" style="border-color:#73C747">
  116. <div>库存下限预警</div>
  117. <span>126</span>
  118. </div>
  119. </a-col>
  120. </a-row>
  121. </a-card>
  122. </a-col>
  123. <a-col :span="24">
  124. <a-card title="备件类型分布">
  125. <div slot="extra">
  126. <a-radio-group default-value="a" button-style="solid">
  127. <a-radio-button value="a">
  128. 全部
  129. </a-radio-button>
  130. <a-radio-button value="b">
  131. 再用
  132. </a-radio-button>
  133. <a-radio-button value="c">
  134. 闲置
  135. </a-radio-button>
  136. </a-radio-group>
  137. </div>
  138. <chart-view height="360px" :chartOption="chartOption" />
  139. </a-card>
  140. </a-col>
  141. </a-row>
  142. </template>
  143. <script>
  144. import * as echarts from 'echarts/core'
  145. export default {
  146. data () {
  147. return {
  148. lineData: []
  149. }
  150. },
  151. computed: {
  152. chartOption () {
  153. return {
  154. tooltip: {
  155. trigger: 'axis',
  156. axisPointer: {
  157. type: 'shadow'
  158. }
  159. },
  160. legend: {},
  161. grid: {
  162. left: '3%',
  163. right: '4%',
  164. bottom: '3%',
  165. containLabel: true
  166. },
  167. yAxis: {
  168. name: '',
  169. nameTextStyle: {
  170. color: 'rgba(0,0,0,0.5)'
  171. },
  172. type: 'value',
  173. min: 0,
  174. axisLine: {
  175. show: false
  176. },
  177. axisLabel: {
  178. color: '#979797',
  179. fontSize: 12
  180. },
  181. splitLine: {
  182. show: true,
  183. lineStyle: {
  184. type: 'dashed'
  185. // color: '#2b2b2b'
  186. }
  187. },
  188. axisTick: {
  189. show: false
  190. }
  191. },
  192. xAxis: {
  193. type: 'category',
  194. splitLine: {
  195. show: false
  196. },
  197. axisTick: {
  198. show: false
  199. },
  200. data: ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月']
  201. },
  202. series: [
  203. {
  204. name: '备件总数',
  205. type: 'bar',
  206. barWidth: 20,
  207. data: [10, 52, 200, 334, 390, 330, 220, 150, 82, 91, 34, 290],
  208. itemStyle: {
  209. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  210. { offset: 0, color: '#52C5FF' },
  211. { offset: 1, color: '#228FFE' }
  212. ])
  213. }
  214. },
  215. {
  216. name: '借出数量',
  217. barWidth: 20,
  218. type: 'bar',
  219. data: [10, 52, 200, 334, 390, 330, 220, 150, 82, 91, 34, 290],
  220. itemStyle: {
  221. color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
  222. { offset: 0, color: '#FF5252' },
  223. { offset: 1, color: '#FE2222' }
  224. ])
  225. }
  226. }
  227. ]
  228. }
  229. }
  230. }
  231. }
  232. </script>
  233. <style lang="less" scoped>
  234. .top-left {
  235. display: flex;
  236. font-family: PingFang SC;
  237. width: 100%;
  238. text-align: center;
  239. justify-content: space-around;
  240. font-size: 18px;
  241. color: #666666;
  242. position: relative;
  243. height: 110px;
  244. & > div {
  245. z-index: 1;
  246. }
  247. span {
  248. font-size: 30px;
  249. font-weight: 500;
  250. color: #333333;
  251. }
  252. .top-left-bg {
  253. width: 100%;
  254. height: 80px;
  255. opacity: 0.74;
  256. position: absolute;
  257. bottom: 0;
  258. left: 0;
  259. z-index: 0;
  260. }
  261. }
  262. .middle-box {
  263. height: 129px;
  264. width: 100%;
  265. background: #f4f6f9;
  266. border-radius: 10px;
  267. border-left: 6px solid #002c81;
  268. padding: 20px 25px;
  269. font-size: 24px;
  270. font-family: PingFang SC;
  271. color: #999999;
  272. span {
  273. font-size: 36px;
  274. line-height: 60px;
  275. color: #333333;
  276. }
  277. }
  278. .hover{
  279. cursor: pointer;
  280. }
  281. </style>