<template>
  <div id="tableWrap">
    <div>
      <ul class="main">
        <li class="item" v-for="item in tableData" :key="item.recordId">
          <span class="item-title">版本号:{{ item.operationVersion }}</span>
          <img style="margin-right:20px" src="~@/assets/images/lifecycle/dot.png" alt="">
          <div class="item-img">
            <div v-if="item.operationType==='0'" >
              <img src="~@/assets/images/lifecycle/add.png" alt="">
              <div style="color:#4189FA">新增</div>
            </div>
            <div v-if="item.operationType==='3'">
              <img src="~@/assets/images/lifecycle/stop.png" alt="">
              <div style="color:#DA4218">停用</div>
            </div>
            <div v-if="item.operationType==='2'">
              <img src="~@/assets/images/lifecycle/start.png" alt="">
              <div style="color:#5B98F7">启动</div>
            </div>
            <div v-if="item.operationType==='1'">
              <img src="~@/assets/images/lifecycle/change.png" alt="">
              <div style="color:#3BB4F1">变更</div>
            </div>
            <div v-if="item.operationType==='4'">
              <img src="~@/assets/images/lifecycle/file.png" alt="">
              <div style="color:#2FC6A8">归档</div>
            </div>
          </div>
          <div class="item-text">
            <div class="item-text-san">{{ item.createBy }} 提交于{{ item.createTime }} </div>
            <div class="item-text-san">{{ item.approver }} 审核于{{ item.updateTime }} </div>
          </div>
        </li>
      </ul>

    </div>

    <div class="footer-btn">
      <a-button class="closeBtn" type="work" @click="onClose">
        取消
      </a-button>
      <a-button class="submitBtn" type="add" @click="onClose">
        确定
      </a-button>
    </div>

  </div>
</template>

<script>

export default {
  date() {
    return {
      showdate: '',
      showLifecycle: true
    }
  },
 props: {
    tableData: {
      type: Array,
      required: true
    }
  },
  methods: {
    onClose() {
      this.showLifecycle = false
      this.$emit('getShowLifecyclel', this.showLifecycle)
    }
  }

}
</script>

<style  lang="less" scoped>
#tableWrap{
  box-sizing: border-box;
  padding: 25px 30px;
  .footer-btn{
    text-align: center;
    .ant-btn{
      margin: 0 20px;

    }
  }
  .main{
    background: url(~@/assets/images/lifecycle/timeBg.png)no-repeat;
    background-position: 33.1% 103%;
    .item{
    display:flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0px;
    .item-text{
      padding: 0px 20px;
      width: 372px;
      height: 67px;
      line-height: 33px;
      background: #FFFFFF;
      border: 1px solid #E8E9F0;
      box-shadow: 0px 1px 15px 0px #EBF0F7;
      border-radius: 3px;
      text-align: left;
      background-position: -18px -13px ;
      .item-text-san{
      overflow: hidden; // 文本超出范围隐藏
      white-space: nowrap; // 文本超出范围强制不换行
      text-overflow: ellipsis; //文本超出范围显示三个点
      }

    }
    .item-img{
      text-align: center;
      margin-right:20px
    }
    .item-title{
      font-size: 16px;
      font-family: Microsoft YaHei;
      font-weight: bold;
      color: #000000;
      line-height: 80px;
      opacity: 0.6;
      margin-right:20px
    }
  }
}
}
</style>
