<template>
    <div class="home_wrapper">
        <div class="head_main">
            <div class="location">

              <div class="address"><i class="icon"></i>{{deptName}}</div>

              <div class="address">{{bookName}}</div>

            </div>
            <div class="exit_btn" @click="goOut">
                <p>{{userName}}</p>
                <i class="icon"></i>
            </div>
        </div>
      <img src="../../../static/images/sunVillage_info/code_new/sunVillage_info_index_code_right_header.png" style="display:block;width:94%;margin:0 auto;" alt="">
      <div class="index_info">
            <div class="nav_box">
              <p class="nav_tit">公示公开</p>
              <div class="nav_list">
                <router-link
                  :to="{name:'sunVillageInfoRevenueAndExpendituresNew',query:{}}"
                  class="nav_item"
                >
                  <img src="../../../static/images/sunVillage_info/code_new/1.png" style="display:block;" alt="">
                  <span>收支明细公开</span>
                </router-link>
                <router-link
                  :to="{name:'sunVillageInfoOperatingAssets',query:{}}"
                  class="nav_item"
                >
                  <img src="../../../static/images/sunVillage_info/code_new/2.png" style="display:block;" alt="">
                  <span>经营性资产情况</span>
                </router-link>
                <router-link
                  :to="{name:'otherOpenVisitIndexNew',query:{}}"
                  class="nav_item"
                >
                  <img src="../../../static/images/sunVillage_info/code_new/3.png" style="display:block;" alt="">
                  <span>其他公开</span>
                </router-link>
              </div>
            </div>
        </div>
        <div class="footer">
          {{tsdh}}
        </div>
    </div>
</template>
<script>
  import {bookInfo, webList} from "@/api/sunVillage_info/fixedAssets";
  import Cookies from "js-cookie";
  import {sysConfig} from "@/api/homesteadSurvey";
  export default {
    name: "certificateList",
    data() {
      return {
        wdqlList:[],
        qqbzList:[],
        deptIdOptions:[],
        villageVisbile:false,
        showBookList:false,
        deptName:'',
        //选中的值
        villageValue: "",
        //省市区区级list
        hcAreaInfoOption: [],
        hcAreaInfoFieldName: {
          text: "label",
          value: "value",
          children: "children",
        },
        bookName:'',
        queryParams: {
          pageNum: 1,
          pageSize: 100,
        },
        //账套列表
        bookVisbile:false,
        bookList:[],
        bookId:"",
        deptId:"",
        book:"",
        userName:"",
        tsdh:"",
      };
    },
    created() {
      this.deptId = Cookies.get('deptId')
      this.bookId = Cookies.get('bookId')
      if(this.bookId)
      {
        bookInfo(this.bookId).then((res) => {
          if (res.code == 200) {
            this.deptName = res.data.deptName;
            this.bookName = res.data.bookName;
          }
        });
      }
      if(Cookies.get('user')){
        this.userName = JSON.parse(Cookies.get('user')).memberName
      }
      webList().then((res) => {
        if (res.code == 200) {
          var content = res.rows;
          content.map(rr=>{
            if (rr.configKey == 'web.open.phone'){
              this.tsdh = rr.configValue;
            }
          })
        }
      });
    },
    methods: {
      goCode(){
        this.$router.push({path:'/sunVillage_info/login_code'})
      },
      goOut(){
        // Cookies.remove("memberName");
        // Cookies.remove("idcard");
        Cookies.remove("user");
        this.$router.push({name:'sunVillageInfoCodeLoginNew',query:{deptId:this.deptId,bookId:this.bookId}})
      }
    },
  }
</script>
<style scoped lang="scss">
  .fixed_btn{
    position: fixed;
    right: 0;
    width: 115PX;
    bottom: 15%;
    border-top-left-radius: 115PX;
    border-bottom-left-radius: 115PX;
    box-shadow: 0px 2px 5px #ccc;
  }
.home_wrapper{
    width: 100vw;
    min-height: 100vh;
    background: #F5F6F9 url('../../../static/images/sunVillage_info/page_bg.png') no-repeat top center;
    background-size: 100% auto;
    .head_main{
      position: relative;
      display: flex;
      align-items: self-start;
      justify-content: space-between;
      width: 94%;
      margin: 0 auto;
      padding: 2vh 0 0;
        .location{
          line-height: 42px;
          display: flex;
          flex-direction: column;
          align-items: self-start;
            .address{
              padding:0 18PX;
              background:rgba(255,255,255,0.75);
              border-radius: 42px;
              font-size: 28px;
              color: #3f3d56;
              margin-right: 12px;
              display: flex;
              align-items:center;
              margin-bottom: 10PX;
                .icon{
                  display: block;
                  width: 20px;
                  height: 26px;
                  background: url('../../../static/images/sunVillage_info/index_icon_1.png') no-repeat;
                  background-size: 100% 100%;
                  margin-right: 10PX;
                }
            }
          .user{
            .icon{
              width: 32px;
              height: 32px;
              background: url('../../assets/images/sunVillage_info/user_icon.png') no-repeat!important;
              background-size: 100% 100%;
            }
          }
        }
        .exit_btn{
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            p{
              background: #3f3d56;
              color: #ffffff;
              padding: 3PX 15PX;
              position: relative;
              right: -6PX;
              border-top-left-radius: 20PX;
              border-bottom-left-radius: 20PX;
              box-shadow: -3PX 2PX 4PX rgba(0,0,0,0.3);
            }
            .icon{
                width: 61px;
                height: 61px;
                background: url('../../assets/images/sunVillage_info/login_head_h_rights.png') no-repeat;
                background-size: 100% 100%;
                box-shadow: -3PX 2PX 4PX rgba(0,0,0,0.3);
                border-radius: 100%;
            }
        }
    }
    .index_info{
        /*padding-top: 4.1vh;*/
        .title{
            width: 521px;
            height: 52px;
            background: url('../../assets/images/sunVillage_info/index_title2_rights.png') no-repeat;
            background-size: 100% 100%;
            margin:0 auto;
        }
        .nav_box{
          margin: 0 auto;
          padding: 30px 30px 40px;
          .nav_tit{
            font-size: 35px;
            margin-bottom: 15PX;
            font-weight: bold;
          }
          .nav_list{
            display: flex;
            flex-flow: wrap;
            justify-content: space-between;
            .nav_item{
              font-size: 24px;
              text-align: center;
              width: 30%;
              position: relative;
              span{
                position: absolute;
                bottom: 20%;
                color: #ffffff;
                display: block;
                width: 100%;
                text-align: center;
              }
            }
          }
        }
    }
    .footer{
      position: absolute;
      bottom: 2vh;
      width: 100%;
      color: #707070;
      text-align: center;
    }
}
</style>
