<template>
  <div class="out">
    <div 
      class="box" 
      v-for="(item,index) in data" 
      :key="index+3000" 
      :style="
        !(item.arr&&item.arr.length!==0)||item.result==='审批未通过'||item.result==='审批不通过'
        ?{border:'none'}
        :(index==data.length-1)
        ?{marginBottom:'0px',}:
        {}
      " 
      :class="
        data[index+1]&&data[index+1].result==='审批中'
        ?'dashedbd'
        :''
      "
    >
      <div 
        class="circle" 
        :style="
          item.result == '审核通过'
          ?{backgroundColor:'#3759be',borderColor: '#3759be'}
          :{}
        "
      >
      </div>
      <div 
        class="line" 
        v-if="index == 0"
        :style="
          item.result == '审核通过'
          ?{backgroundColor:'#3759be'}
          :item.result==='审核未通过'||item.result==='审核不通过'
          ?{backgroundColor:'#de3b4b'}
          :{}
        "
      >
      </div>
      <div 
        class="line line_bottom" 
        v-if="index == 1"
        :style="
          item.result == '审核通过'
          ?{backgroundColor:'#3759be'}
          :{}
        "
      >
      </div>
      <div 
        class="card" 
        :style="
          item.result==='审批未通过'||item.result==='审批不通过'
          ?{backgroundColor:'#fcfafa'}
          :{}
        "
      >
        <p 
          class="card_title" 
          :style="
            !(item.arr&&item.arr.length!==0)
            ?{backgroundColor:'#fcefd6'}
            :{}
          "
        >
          <span 
            :style="
              !(item.arr&&item.arr.length!==0)
              ?{color:'#ef9433'}
              :item.result==='审批未通过'||item.result==='审批不通过'
              ?{color:'#e15260'}
              :{}
            "
          >
            {{item.result}}
          </span>
          <span>
            {{item.appro_time}}
          </span>
        </p>
        <div 
          class="card_contain" 
          v-if="item.arr&&item.arr.length!==0"
        >
          <info-list :list_arr="item.arr"></info-list>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
import infoList from './infoList.vue'
export default {
    props: ['data','type'],
    components: {
      infoList
    },
    data() {
      return {};
    },
    watch: {},
    computed: {},
    created() {},
    mounted() {},
    methods: {},
};
</script>

<style scoped>
.out{
    /* width: 820px; */
    margin-top: 15px;
}
.box{
  position: relative;
  /* border-left: 2px solid #e3e5ef; */
  /* padding-left: 28px; */
  margin-left: 28px;
  /* padding-bottom: 16px; */
  border: 1px solid #e3e4ef;
  margin-bottom: 16px;
}
.circle{
  width: 12px;
	height: 12px;
	background-color: #bcc1d0;
	border: solid 4px #bcc1d0;
  border-radius: 50%;
  position: absolute;
  top: 12px;
  left: -28px;
}
.line {
  position: absolute;
  top: 24px;
  left: -23px;
  height: 78px;
  background-color: #c1c7d7;
  width: 2px;
}
.line_bottom {
  top: -66px;
  background-color: #c1c7d7;
}
.card{
  /* width: 780px; */
	background-color: #fff;
	border-radius: 4px;
  overflow: hidden;
  margin: 0;
}
.card .card_title{
  height: 38px;
  line-height: 38px;
	background-color: #f9fafc;
  overflow: hidden;
  text-align: left;
  padding: 0 16px;
}
.card .card_title span{
  font-size: 14px;
  font-weight: 700;
  color: #242c43;
  text-align: left;
}
.card .card_title span:nth-of-type(1){
    float: left;
}
.card .card_title span:nth-of-type(2){
    float: right;
    color: #58617a;
    font-weight: normal;
}
.card_contain{
  padding: 9px 16px;
  text-align: left;
  font-size: 14px;
  color: #242c43;
}
.dashedbd{
  border-left-style:dashed;
}
</style>
