<template>
  <div class="sell" style="padding: 0.5em">
    <div class="label" style="padding-left:0.4%">
      <span class="font-title">收费</span>
    </div>
    <div id="sell_left">
      <table>
        <tr>
          <td class="td1"><img src="../../../static/NewManageHome/sell_1.png"  style="width: 29px"></td>
          <td><nobr><span>当年总售气量</span></nobr><br/>&nbsp;<nobr><span class="s1">{{ resdata1 > 10000 ? (resdata1/10000).toFixed(0) + '万' : resdata1 }}</span></nobr></td>
        </tr>
        <tr>
          <td class="td1"><img src="../../../static/NewManageHome/sell_2.png" style="width: 27px"></td>
          <td><nobr><span>上月总售气量<br/></span></nobr>&nbsp;<span class="s2">{{resdata > 10000 ? (resdata/10000).toFixed(0) + '万' : resdata}}</span></td>
        </tr>
      </table>
    </div>

    <!--</div>-->
  </div>
</template>

<script>
  import {HttpResetClass} from "vue-client";

  export default {
    name: 'sellEcharts',
    props: {
      listenheight: String,
      f_filiale: String
    },
    data() {
      return {
        xc: '',
        resdata: [],
        resdata1: [],
        totalstring: '',
        safedata: [{value: 0, name: '已完成'}, {value: 0, name: '未完成'}],
        safedatastring: [{value: "", name: '已完成'}, {value: "", name: '未完成'}],
        safeerrordata:[] ,
        hiddenuser:'',
        timer:'',
        timer1:'',
      }
    },
    ready () {
      this.resize()
    },
    methods:{
      async resize(){
        let http = new HttpResetClass()
        // 收费
        await http.load('post', '/api/af-revenue/sql/getSellSum', {data:{}}, {rejectMsg: null, resolveMsg: null}).then((res)=>{
          console.log('收费---------------',res)
          this.resdata = res.data[0].gas_day
          this.resdata1 = res.data[0].gas_year
          console.log('收费---------------')
          console.log('收费---------------')
        })
      }

    }
  }
</script>

<style scoped>
  .s1 {
    font-family: PingFang-SC-Bold;
    font-size: 26px;
    font-weight: bold;
    font-stretch: normal;
    line-height: 35px;
    letter-spacing: 0px;
    color: #35ffff;
  }
  .s2 {
    font-family: PingFang-SC-Bold;
    font-size: 26px;
    font-weight: bold;
    font-stretch: normal;
    line-height: 35px;
    letter-spacing: 0px;
    color: #e5925e;
  }
.label {
    margin-left: 6%;
    font-size: 1.85rem;
    float: left;
    color: #fff;
    height: 8%;
  }
    table {
      width: 100%;
      height: 80%;
      border-collapse: collapse;
    }
    td {
      /*width: 94px;*/
      /*height: 120px;*/
      font-size: 1.4rem;
      padding-left: 6%;
      width: 70%;
      height: 50%;
      color: #ffffff;
    }
    .td1 {
      width: 33%;
      text-align: right;
    }
    #sell_left {
      padding: 10% 13% 0% 17%;
      height: 100%;
      width: 100%;
    }
</style>
