overviewCom.vue 9.4 KB

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