<template>
  <div class="bi-report-work-form-layout">
    <div class="bi-report-work-form-layout__main">
      <div class="bi-report-work-form-layout__title">
        {{title}}
      </div>
      <div class="bi-report-work-form-layout__content">
        <slot></slot>
      </div>
    </div>
    <div class="bi-report-work-form-layout__sidebar">
      <slot name="sidebar"></slot>
    </div>
  </div>
</template>
<script>
export default {
  name: 'BiReportWorkFormLayout',
  props: {
    title: {
      type: String
    }
  }
}
</script>
<style lang="less">
.bi-report-work-form-layout{
  min-height: 100%;
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  position: relative;
  &:before {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    right: 240px;
    width: 1px;
    z-index: 5;
    background-color: #D5D8DC;
  }
  &:after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    right: 0;
    width: 240px;
    background-color: #FCFCFD;
  }
}
.bi-report-work-form-layout__main{
  padding: 22px 24px;
  flex: 1;
  min-width: 0;
}
.bi-report-work-form-layout__title{
  font-size: 18px;
  font-weight: bold;
  height: 32px;
  line-height: 32px;
  margin-bottom: 18px;
}
.bi-report-work-form-layout__sidebar{
  width: 242px;
  padding: 24px 12px;
  box-sizing: border-box;
  position: relative;
  z-index: 3;
  .el-form{
    .el-form-item__label{
      margin-left: 12px;
    }
    &.is-viewable {
      .el-form-item__content{
        margin-left: 12px;
      }
    }
  }
}
</style>
