overviewCom.vue 8.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333
  1. <template>
  2. <div class="titleCom">
  3. <div class="titleRow">
  4. <van-cell v-for="i in list" :key="i.name">
  5. <!-- 使用 title 插槽来自定义标题 -->
  6. <template #title>
  7. <span class="custom-title">{{ i.name }}</span>
  8. </template>
  9. <div class="itemNum">{{ allData[i.key] }}</div>
  10. </van-cell>
  11. </div>
  12. <!-- 设备 -->
  13. <div class="equipment">
  14. <van-cell>
  15. <template #title>
  16. <span class="custom-title">大堂式自助设备</span>
  17. </template>
  18. <span class="itemNum">{{ allData['lobbyDeviceCount'] }}</span>
  19. </van-cell>
  20. <van-cell>
  21. <template #title>
  22. <span class="custom-title">穿墙式自助设备</span>
  23. </template>
  24. <span class="itemNum">{{ allData['throughwallDeviceCount'] }}</span>
  25. </van-cell>
  26. </div>
  27. <!-- 模块数据展示 -->
  28. <div class="businessModule">
  29. <div class="moduleCom">
  30. <div class="titleText"><span class="leftSty"></span><span>GA38-2021</span></div>
  31. <div class="complete">
  32. <div class="numCls wj-title-blue">
  33. {{ parseInt((allData.ga38['GA382021'].currentCompletedRate || 0) * 100) }}%
  34. </div>
  35. </div>
  36. <div class="moduleItem">
  37. <div>
  38. <div class="numCls wj-title-blue">{{ allData.ga38['GA382021'].currentCompletedCount }}</div>
  39. <div class="fontCls">当月新增数</div>
  40. </div>
  41. <div>
  42. <div class="numCls wj-title-blue tal ga38cls">
  43. <van-icon v-if="allData.ga38['GA382021'].compare > 0" name="play" class="wj-title-red rate270" />
  44. <van-icon v-else name="play" class="wj-title-green rate" />
  45. <span>{{ Math.abs(parseInt(allData.ga38['GA382021'].compare )) }}</span>
  46. </div>
  47. <div class="fontCls ">较上月增长数</div>
  48. </div>
  49. </div>
  50. </div>
  51. <div class="moduleCom">
  52. <div class="titleText"><span class="leftSty"></span><span>GA38-2015</span></div>
  53. <div class="complete">
  54. <div class="numCls wj-title-blue">{{ parseInt((allData.ga38['GA382015'].currentCompletedRate||0) * 100) }}%</div>
  55. </div>
  56. <div class="moduleItem">
  57. <div>
  58. <div class="numCls wj-title-blue">{{ allData.ga38['GA382015'].currentCompletedCount }}</div>
  59. <div class="fontCls">当月新增数</div>
  60. </div>
  61. <div>
  62. <div class="numCls wj-title-blue tal ga38cls">
  63. <van-icon v-if="allData.ga38['GA382015'].compare > 0" name="play" class="wj-title-red rate270" />
  64. <van-icon v-else name="play" class="wj-title-green rate" />
  65. <span>{{ Math.abs(parseInt(allData.ga38['GA382015'].compare ))}}</span>
  66. </div>
  67. <div class="fontCls ">较上月增长数</div>
  68. </div>
  69. </div>
  70. </div>
  71. </div>
  72. <div class="businessModule">
  73. <div class="moduleCom" v-for="(item, index) in Object.keys(allData.taskInfo)" :key="index">
  74. <div class="titleText">
  75. <span class="leftSty"></span><span>{{ Object.keys(allData.taskInfo)[index] }}</span>
  76. </div>
  77. <div class="complete">
  78. <div class="numCls wj-title-blue">
  79. {{ parseInt(allData.taskInfo[Object.keys(allData.taskInfo)[index]].currentCompletedRate * 100) }}%
  80. </div>
  81. </div>
  82. <div class="moduleItem">
  83. <div>
  84. <div class="numCls wj-title-blue">
  85. {{ allData.taskInfo[Object.keys(allData.taskInfo)[index]].currentCompletedCount }}
  86. </div>
  87. <div class="fontCls">{{Object.keys(allData.taskInfo)[index]=='预案演练'?'当季完成数':'当月完成数'}}</div>
  88. </div>
  89. <div>
  90. <div class="numCls wj-title-blue tal">
  91. <van-icon name="play" class="wj-title-green rate " />
  92. <span
  93. >{{ Math.abs(parseInt(allData.taskInfo[Object.keys(allData.taskInfo)[index]].compare * 100)) }}%</span
  94. >
  95. </div>
  96. <div class="fontCls">{{Object.keys(allData.taskInfo)[index]=='预案演练'?'完成率(较上季)':'完成率(较上月)'}}</div>
  97. </div>
  98. </div>
  99. </div>
  100. </div>
  101. </div>
  102. </template>
  103. <script>
  104. import { getOverview } from '@/api/cockpit.js'
  105. export default {
  106. name: 'SocAppOverviewCom',
  107. components: {},
  108. props: {
  109. orgId: ''
  110. },
  111. data() {
  112. return {
  113. list: [
  114. {
  115. name: '行社',
  116. key: 'hangsheCount'
  117. },
  118. {
  119. name: '营业网点',
  120. key: 'bankingCount'
  121. },
  122. {
  123. name: '中心业务库',
  124. key: 'centerStoreCount'
  125. },
  126. {
  127. name: '网点业务库',
  128. key: 'bankingStoreCount'
  129. },
  130. {
  131. name: '在行式自助银行',
  132. key: 'onlineATMCount'
  133. },
  134. {
  135. name: '离行式自助银行',
  136. key: 'offlineATMCount'
  137. }
  138. // {
  139. // name: '大堂式设备数量',
  140. // key: 'onlineATMCount'
  141. // },
  142. // {
  143. // name: '穿墙式设备数量',
  144. // key: 'throughwallDeviceCount'
  145. // }
  146. ],
  147. allData: {
  148. bankingCount: '',
  149. bankingStoreCount: '',
  150. centerStoreCount: '',
  151. hangsheCount: '',
  152. lobbyDeviceCount: '',
  153. offlineATMCount: '',
  154. onlineATMCount: '',
  155. throughwallDeviceCount: '',
  156. ga38: {
  157. GA382015: null,
  158. GA382021: null
  159. }
  160. } //总览数据对象
  161. }
  162. },
  163. created() {
  164. this.getAllList()
  165. //获取基础信息
  166. },
  167. mounted() {},
  168. watch: {
  169. orgId(val) {
  170. this.getAllList(val)
  171. }
  172. },
  173. methods: {
  174. // 获取总览数据
  175. getAllList(val) {
  176. getOverview({ orgId: val?val:this.orgId }).then(res => {
  177. let { data } = res
  178. this.allData = data
  179. // this.allData.bankingCount = this.remedyZero(this.allData.bankingCount)
  180. // this.allData.bankingStoreCount = this.remedyZero(this.allData.bankingStoreCount)
  181. // this.allData.centerStoreCount = this.remedyZero(this.allData.centerStoreCount)
  182. // this.allData.hangsheCount = this.remedyZero(this.allData.hangsheCount)
  183. // this.allData.lobbyDeviceCount = this.remedyZero(this.allData.lobbyDeviceCount)
  184. // this.allData.offlineATMCount = this.remedyZero(this.allData.offlineATMCount)
  185. // this.allData.onlineATMCount = this.remedyZero(this.allData.onlineATMCount)
  186. // this.allData.throughwallDeviceCount = this.remedyZero(this.allData.throughwallDeviceCount)
  187. })
  188. },
  189. //自动补0
  190. remedyZero(val) {
  191. let newVal = val || ''
  192. // let newVal = val + ''
  193. let num = newVal.length
  194. for (let index = 0; index < num; index++) {
  195. newVal = newVal[index]
  196. }
  197. return ('' + newVal).split('')
  198. }
  199. }
  200. }
  201. </script>
  202. <style lang="scss" scoped>
  203. ::v-deep.van-cell::after {
  204. border-bottom: 1px solid #008cd6;
  205. }
  206. .titleCom {
  207. // background-color: #f0f0f0;
  208. // margin: 10px;
  209. // box-shadow: 0 2px 10px #ccc;
  210. .titleRow {
  211. box-shadow: 0 2px 10px #ccc;
  212. margin-left: 12px;
  213. // margin-top: 10px;
  214. margin-right: 14px;
  215. }
  216. .itemNum {
  217. width: 100%;
  218. height: 40px;
  219. margin-left: 10px;
  220. font-size: 40px;
  221. //font-family: fantasy;
  222. text-align: left;
  223. // font-weight: bold;
  224. // border: 1px solid #ccc;
  225. // box-shadow: 0 2px 10px #ccc;
  226. color: #008cd6;
  227. display: inline-block;
  228. text-align: center;
  229. line-height: 40px;
  230. }
  231. }
  232. .equipment {
  233. margin-top: 20px;
  234. box-shadow: 0 2px 10px #ccc;
  235. margin-left: 12px;
  236. margin-right: 14px;
  237. }
  238. .bigModule {
  239. display: flex;
  240. flex-wrap: wrap;
  241. margin-bottom: 20px;
  242. }
  243. .tal {
  244. text-align: right;
  245. padding-right: 0px;
  246. }
  247. .moduleCom {
  248. width: 47%;
  249. height: 260px;
  250. background-color: #fff;
  251. margin-top: 20px;
  252. padding: 10px;
  253. box-shadow: 0 2px 10px #ccc;
  254. // border-left: 1px solid #008cd6;
  255. position: relative;
  256. .moduleItem {
  257. margin-top: 30px;
  258. display: flex;
  259. text-align: center;
  260. align-content: center;
  261. justify-content: space-around;
  262. line-height: 30px;
  263. .numCls {
  264. font-size: 30px;
  265. margin-bottom: 10px;
  266. .iconcls {
  267. font-size: 30px;
  268. }
  269. }
  270. .textCCls {
  271. text-align: right;
  272. }
  273. > div {
  274. width: 42%;
  275. }
  276. .fontCls {
  277. font-size: 20px;
  278. }
  279. .ga38cls{
  280. text-align: center;
  281. }
  282. }
  283. }
  284. .businessModule {
  285. display: flex;
  286. flex-wrap: wrap;
  287. }
  288. .businessModule {
  289. .moduleCom {
  290. margin: 10px;
  291. }
  292. }
  293. .rate {
  294. transform: rotate(90deg);
  295. }
  296. .rate270 {
  297. transform: rotate(270deg);
  298. }
  299. .titleText {
  300. font-size: 4vw;
  301. vertical-align: middle;
  302. .leftSty {
  303. display: inline-block;
  304. width: 10px;
  305. height: 4vw;
  306. vertical-align: text-top;
  307. margin-right: 10px;
  308. margin-left: 10px;
  309. background-color: #008cd6;
  310. }
  311. }
  312. .complete {
  313. text-align: center;
  314. font-size: 7vw;
  315. // font-family: fantasy;
  316. margin-top: 30px;
  317. }
  318. ::v-deep.van-icon-play {
  319. font-size: 40px;
  320. position: absolute;
  321. left: 49%;
  322. top: 62%;
  323. }
  324. </style>