123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172 |
- <template>
- <div class="yearmoney">
- <div class="boxmoney">
- <div class="slider">
- <div class="before" style="width:50%;left:0%;"></div>
- <div class="last" style="width:30%;left:50%;"></div>
- <div class="current" style="width:20%;left:80%;"></div>
- <div class="beforetitle" style="width:50%;left:0%;">
- <div class="money"><label class="ledfont">{{ beforeNextMonthPay }}</label><label>元</label></div>
- <div class="title">上月之前收费</div>
- </div>
- <div class="lasttitle" style="width:30%;left:50%;">
- <div class="money"><label class="ledfont">{{ nextMonthPay }}</label><label>元</label></div>
- <div class="title">上月收费</div>
- </div>
- </div>
- <div class="yeartitle">
- <div class="money"><label class="ledfont">{{ curYearPay }}</label><label>元</label></div>
- <div class="title">本年度收费</div>
- </div>
- </div>
- </div>
- </template>
- <script>
- import {getThisYearPay} from '@/api/comprehensive'
- import config from '@/views/config/requestConfig'
- export default {
- name: 'yearmoney',
- data() {
- return {
- beforeNextMonthPay:0,
- nextMonthPay:0,
- curYearPay:0,
- curMonthPay:0
- }
- },
- components: {
- },
- created(){
- getThisYearPay({token:config.token}).then(res=>{
- if(res.Code == 200){
- this.curYearPay = parseFloat(res.Result.ThisYearPay)
- this.curMonthPay = parseFloat(res.Result.ThismonthPay === '' ? 0 : res.Result.ThismonthPay)
- this.nextMonthPay = parseFloat(res.Result.lastmonthPay)
- this.beforeNextMonthPay = (this.curYearPay - this.curMonthPay - this.nextMonthPay).toFixed(2)
- }
- })
- },
- mounted() {
- this.drawChart()
- },
- methods: {
- drawChart() {
-
- },
- }
- }
- </script>
- <style lang="scss">
- .yearmoney{
- width: calc(100% - 16px);
- height: calc(100% - 16px);
- padding: 8px;
-
- .boxmoney{
- width: 100%;
- height: 100%;
- background: #062F50;
- border-radius: 4px;
- display: flex;
- flex-direction: row;
- justify-content: center ;
- align-items: center ;
-
- .slider{
- width: 76%;
- height: 10px;
- background: #0880EE;
-
- position: relative;
- display: flex;
- flex-direction: row;
- justify-content:flex-start;
-
- .before{
- height: 100%;
- background: #BEB56A;
- position: absolute;
-
-
- }
- .last{
- height: 100%;
- background: #D7CB69;
- position: absolute;
-
-
- }
- .current{
- height: 100%;
- background: #02B1C5;
- position: absolute;
-
-
- }
- .beforetitle{
- height: 40px;
- top:-46px;
- text-align: left;
- position: absolute;
-
-
- .money{
- color: #BEB56A;
- }
- }
- .lasttitle{
- height: 40px;
- top:10px;
- text-align: left;
- position: absolute;
-
-
- .money{
- color: #D7CB69;
- }
- }
- }
- .yeartitle{
- width: 20%;
- height: 40px;
- margin-left: 6px;
- text-align: left;
- overflow: hidden;
-
- .money{
- color: #0880EE;
- }
- }
- .ledfont{
- font-size: 20px;
- font-family: "myFont";
- }
- .money{
- width: 100%;
- font-size: 16px;
- font-weight: bold;
- }
- .title{
- width: 100%;
- font-size: 14px;
- font-weight: 400;
- color: #A4D9F9;
- }
- }
- }
- </style>
|