<template>
  <div>
    <Card style="width:100%">
      <div class="config_meta">
        <p class="fl">业务流程</p>
        <div class="fr">
          <Tooltip content="刷新" placement="left-start">
            <Icon @click="_request" type="ios-refresh" size="30" color="#2d8cf0" style="cursor:pointer;"></Icon>
          </Tooltip>
        </div>
        <div class="clear"></div>
      </div>
      <div style="width: 100%;height: 300px">
        <div class="flow-box">
          <div v-for="(item,index) in flowList" :key=index  class="flow-item">
            <div>{{item.title+' '+ item.num}}</div>
          </div>
        </div>
      </div>
    </Card>
  </div>
</template>

<script>
export default {
  data() {
    return {
      flowList: [
        {
          title: '试验委托登记',
          num: 1
        }
      ]
    }
  },
  mounted() {
    // this._request()
  },
  methods: {
    _request() {
      this.$store.dispatch('FoodContract/flowNum').then(() => {
        this.flowList = this.$store.state.FoodContract.list
      })
    }
  }
}
</script>

<style scoped>
.flow-box {
  display: flex;
  flex-wrap: wrap;
  font-size: 12px;
}

.flow-item {
  width: 120px;
  text-align: center;
  padding-left: 10px;
  margin-bottom: 15px;
}

.flow-item > div {
  background: #00a0e9;
  position: relative;
  padding: 5px 0 5px 12px;
  line-height: 20px;
  white-space: nowrap;
  color: #ffffff;
}

.flow-item > div:before,
.flow-item > div:after {
  content: ' ';
  display: block;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 15px 0 15px 15px;
  border-color: transparent transparent transparent #90a4ae;
  position: absolute;
  left: 0;
  top: 0;
}

.flow-item > div:before {
  border-left-color: #fff;
  z-index: 1;
}

.flow-item > div:after {
  border-left-color: #00a0e9;
  left: auto;
  right: -14px;
  z-index: 2;
}

.flow-item-reverse {
  width: 120px;
  text-align: center;
  padding-right: 5px;
  margin-bottom: 10px;
  justify-content: right;
}

.flow-item-reverse > div {
  background: #00a0e9;
  position: relative;
  padding: 5px 12px 5px 0;
  line-height: 20px;
  white-space: nowrap;
  color: #ffffff;
}

.flow-item-reverse > div:before,
.flow-item-reverse > div:after {
  content: ' ';
  display: block;
  width: 0;
  height: 0;
  border-style: solid;
  border-width: 15px 15px 15px 0;
  border-color: transparent transparent transparent #90a4ae;
  position: absolute;
  right: 0;
  top: 0;
}

.flow-item-reverse > div:before {
  border-right-color: #fff;
  z-index: 1;
}

.flow-item-reverse > div:after {
  border-right-color: #00a0e9;
  left: -14px;
  right: auto;
  z-index: 2;
}
</style>
