| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330 |
- <template>
- <div class="titleCom">
- <div class="titleRow">
- <van-cell v-for="i in list" :key="i.name">
- <!-- 使用 title 插槽来自定义标题 -->
- <template #title>
- <span class="custom-title">{{ i.name }}</span>
- </template>
- <div class="itemNum">{{ allData[i.key] }}</div>
- </van-cell>
- </div>
- <!-- 设备 -->
- <div class="equipment">
- <van-cell>
- <template #title>
- <span class="custom-title">大堂式自助设备</span>
- </template>
- <span class="itemNum">{{ allData['lobbyDeviceCount'] }}</span>
- </van-cell>
- <van-cell>
- <template #title>
- <span class="custom-title">穿墙式自助设备</span>
- </template>
- <span class="itemNum">{{ allData['throughwallDeviceCount'] }}</span>
- </van-cell>
- </div>
- <!-- 模块数据展示 -->
- <div class="businessModule">
- <div class="moduleCom">
- <div class="titleText"><span class="leftSty"></span><span>GA38-2021</span></div>
- <div class="complete">
- <div class="numCls wj-title-blue">
- {{ parseInt(allData.ga38['GA382021'].currentCompletedRate || 0 * 100) }}%
- </div>
- </div>
- <div class="moduleItem">
- <div>
- <div class="numCls wj-title-blue">{{ allData.ga38['GA382021'].currentCompletedCount }}</div>
- <div class="fontCls">当月完成数</div>
- </div>
- <div>
- <div class="numCls wj-title-blue tal">
- <van-icon v-if="allData.ga38['GA382021'].compare > 0" name="play" class="wj-title-red rate270" />
- <van-icon v-else name="play" class="wj-title-green rate" />
- <span>{{ Math.abs(parseInt(allData.ga38['GA382021'].compare * 100)) }}%</span>
- </div>
- <div class="fontCls">较上月</div>
- </div>
- </div>
- </div>
- <div class="moduleCom">
- <div class="titleText"><span class="leftSty"></span><span>GA38-2015</span></div>
- <div class="complete">
- <div class="numCls wj-title-blue">{{ parseInt(allData.ga38['GA382015'].currentCompletedRate * 100) }}%</div>
- </div>
- <div class="moduleItem">
- <div>
- <div class="numCls wj-title-blue">{{ allData.ga38['GA382015'].currentCompletedCount }}</div>
- <div class="fontCls">当月完成数</div>
- </div>
- <div>
- <div class="numCls wj-title-blue tal">
- <van-icon v-if="allData.ga38['GA382015'].compare > 0" name="play" class="wj-title-red rate270" />
- <van-icon v-else name="play" class="wj-title-green rate" />
- <span>{{ Math.abs(parseInt(allData.ga38['GA382015'].compare * 100)) }}%</span>
- </div>
- <div class="fontCls">较上月</div>
- </div>
- </div>
- </div>
- </div>
- <div class="businessModule">
- <div class="moduleCom" v-for="(item, index) in Object.keys(allData.taskInfo)" :key="index">
- <div class="titleText">
- <span class="leftSty"></span><span>{{ Object.keys(allData.taskInfo)[index] }}</span>
- </div>
- <div class="complete">
- <div class="numCls wj-title-blue">
- {{ parseInt(allData.taskInfo[Object.keys(allData.taskInfo)[index]].currentCompletedRate * 100) }}%
- </div>
-
- </div>
- <div class="moduleItem">
- <div>
- <div class="numCls wj-title-blue">
- {{ allData.taskInfo[Object.keys(allData.taskInfo)[index]].currentCompletedCount }}
- </div>
- <div class="fontCls">当月完成数</div>
- </div>
- <div>
- <div class="numCls wj-title-blue tal">
- <van-icon name="play" class="wj-title-green rate " />
- <span
- >{{ Math.abs(parseInt(allData.taskInfo[Object.keys(allData.taskInfo)[index]].compare * 100)) }}%</span
- >
- </div>
- <div class="fontCls">较上月</div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </template>
- <script>
- import { getOverview } from '@/api/cockpit.js'
- export default {
- name: 'SocAppOverviewCom',
- components: {},
- props: {
- orgId: ''
- },
- data() {
- return {
- list: [
- {
- name: '行社',
- key: 'hangsheCount'
- },
- {
- name: '营业网点',
- key: 'bankingCount'
- },
- {
- name: '中心业务库',
- key: 'centerStoreCount'
- },
- {
- name: '网点业务库',
- key: 'bankingStoreCount'
- },
- {
- name: '在行式自助银行',
- key: 'onlineATMCount'
- },
- {
- name: '离行式自助银行',
- key: 'offlineATMCount'
- }
- // {
- // name: '大堂式设备数量',
- // key: 'onlineATMCount'
- // },
- // {
- // name: '穿墙式设备数量',
- // key: 'throughwallDeviceCount'
- // }
- ],
- allData: {
- bankingCount: '',
- bankingStoreCount: '',
- centerStoreCount: '',
- hangsheCount: '',
- lobbyDeviceCount: '',
- offlineATMCount: '',
- onlineATMCount: '',
- throughwallDeviceCount: '',
- ga38: {
- GA382015: null,
- GA382021: null
- }
- } //总览数据对象
- }
- },
- created() {
- this.getAllList()
- //获取基础信息
- },
- mounted() {},
- watch: {
- orgId() {
- this.getAllList()
- }
- },
- methods: {
- // 获取总览数据
- getAllList() {
- getOverview({ orgId: this.orgId }).then(res => {
- let { data } = res
- this.allData = data
- // this.allData.bankingCount = this.remedyZero(this.allData.bankingCount)
- // this.allData.bankingStoreCount = this.remedyZero(this.allData.bankingStoreCount)
- // this.allData.centerStoreCount = this.remedyZero(this.allData.centerStoreCount)
- // this.allData.hangsheCount = this.remedyZero(this.allData.hangsheCount)
- // this.allData.lobbyDeviceCount = this.remedyZero(this.allData.lobbyDeviceCount)
- // this.allData.offlineATMCount = this.remedyZero(this.allData.offlineATMCount)
- // this.allData.onlineATMCount = this.remedyZero(this.allData.onlineATMCount)
- // this.allData.throughwallDeviceCount = this.remedyZero(this.allData.throughwallDeviceCount)
- })
- },
- //自动补0
- remedyZero(val) {
- let newVal = val || ''
- // let newVal = val + ''
- let num = newVal.length
- for (let index = 0; index < num; index++) {
- newVal = newVal[index]
- }
- return ('' + newVal).split('')
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- ::v-deep.van-cell::after {
- border-bottom: 1px solid #008cd6;
- }
- .titleCom {
- // background-color: #f0f0f0;
- // margin: 10px;
- // box-shadow: 0 2px 10px #ccc;
- .titleRow {
- box-shadow: 0 2px 10px #ccc;
- margin-left: 12px;
- // margin-top: 10px;
- margin-right: 14px;
- }
- .itemNum {
- width: 100%;
- height: 40px;
- margin-left: 10px;
- font-size: 40px;
- //font-family: fantasy;
- text-align: left;
- // font-weight: bold;
- // border: 1px solid #ccc;
- // box-shadow: 0 2px 10px #ccc;
- color: #008cd6;
- display: inline-block;
- text-align: center;
- line-height: 40px;
- }
- }
- .equipment {
- margin-top: 20px;
- box-shadow: 0 2px 10px #ccc;
- margin-left: 12px;
- margin-right: 14px;
- }
- .bigModule {
- display: flex;
- flex-wrap: wrap;
- margin-bottom: 20px;
- }
- .tal {
- text-align: right;
- padding-right: 0px;
- }
- .moduleCom {
- width: 47%;
- height: 260px;
- background-color: #fff;
- margin-top: 20px;
- padding: 10px;
- box-shadow: 0 2px 10px #ccc;
- // border-left: 1px solid #008cd6;
- position: relative;
- .moduleItem {
- margin-top: 30px;
- display: flex;
- text-align: center;
- align-content: center;
- justify-content: space-around;
- line-height: 30px;
- .numCls {
- font-size: 30px;
- margin-bottom: 10px;
- .iconcls {
- font-size: 30px;
- }
- }
- .textCCls {
- text-align: right;
- }
- > div {
- width: 40%;
- }
- .fontCls {
- font-size: 20px;
- }
- }
- }
- .businessModule {
- display: flex;
- flex-wrap: wrap;
- }
- .businessModule {
- .moduleCom {
- margin: 10px;
- }
- }
- .rate {
- transform: rotate(90deg);
- }
- .rate270 {
- transform: rotate(270deg);
- }
- .titleText {
- font-size: 4vw;
- vertical-align: middle;
- .leftSty {
- display: inline-block;
- width: 10px;
- height: 4vw;
- vertical-align: text-top;
- margin-right: 10px;
- margin-left: 10px;
- background-color: #008cd6;
- }
- }
- .complete {
- text-align: center;
- font-size: 7vw;
- // font-family: fantasy;
- margin-top: 30px;
- }
- ::v-deep.van-icon-play {
- font-size: 40px;
- position: absolute;
- left: 62%;
- top: 62%;
- }
- </style>
|