<template>
  <div class="top" @click.stop="onItemClick">
  <div class="list_style">
    <div class="flex_row">
      <p class="item_text">{{item.fbName}}</p>
      <p class="item_status" @click.stop="toScorePage">打分</p>
    </div>

    <div class="flex_row" style="margin-top: 6px" @click.stop="toScoreClick">
      <p class="item_gray_text_left">当前评分({{item.scoreTime}})</p>
      <p class="item_gray_text">{{item.scoreResult}}</p>
    </div>
  </div>
  </div>
</template>

<script>
    export default {
        name: "supplierItem",
        data(){
            return{

            }
        },
        props:{
            item:{
                type:Object,
                default:{}
            }
        },
        methods:{
            toScoreClick(){
                this.$emit('toScorePage',this.item.fbId,this.item.fbName)
            },
            onItemClick(){
                this.$emit('onItemClick')
            },
            toScorePage(){
                this.$emit('toScore',this.item.fbId,this.item.fbName);
            }
        }
    }
</script>

<style scoped lang="less">

  .top{
    margin: 10px 16px 10px 16px;
    border-bottom: 1px solid #eeeeee;
  }

  .list_style{
    margin: 0px 10px 10px 10px;
  }

  .flex_row{
    display: flex;flex-direction: row;align-items: center;justify-content: space-between;
  }

  .item_text{
    color: black;
    font-size: 16px;
    font-weight: bold;
  }

  .item_status{
    background: rgb(105,162,244);
    padding: 2px 14px 2px 14px;
    border-radius: 50px;
    color: white;
    font-size: 12px;
  }

  .item_gray_text{
    color: #888888;
    padding: 2px 14px 2px 14px;
    font-size: 12px;
  }

  .item_gray_text_left{
    color: #888888;
    font-size: 12px;
  }
</style>
