<template>
  <el-dialog
    :visible.sync="show"
    :before-close="close"
    :append-to-body="false"
    :modal-append-to-body="false"
  >
    <template #title>
      <div class="t-l"></div>
      <p>{{ title }}</p>
      <div class="t-r"></div>
    </template>
    <slot />
  </el-dialog>
</template>

<script>
export default {
  name: 'BigChart',
  props: {
    show: {
      type: Boolean,
      default: false
    },
    title: {
      type: String,
      default: '图表'
    },
    chartID: {
      type: String,
      default: ''
    }
  },
  methods: {
    close () {
      this.$emit('close-dialog', false)
    }
  }
}
</script>

<style lang="scss" scoped>
.el-dialog__wrapper ::v-deep {
  .el-dialog {
    display: flex;
    flex-direction: column;
    width: 1200px;
    height: 730px;
    .el-dialog__header {
      display: flex;
      justify-content: center;
      align-items: center;
      position: relative;
      width: 100%;
      height: 50px;
      padding: 0;
      background-color: #12407f;
      color: #fff;
      font-size: 20px;
      .el-dialog__headerbtn {
        top: 50%;
        transform: translateY(-50%);
        i {
          color: #fff;
        }
      }
      .t-l,
      .t-r {
        width: 24px;
        height: 16px;
        background-size: 100% 150%;
      }
      .t-l {
        background: url("~@/assets/images/common/title_left.png") no-repeat left
          center;
      }
      .t-r {
        background: url("~@/assets/images/common/title_right.png") no-repeat
          right center;
      }
      p {
        margin: 0 20px;
      }
    }
    .el-dialog__body {
      display: flex;
      flex-direction: column;
      align-items: center;
      width: 100%;
      flex: 1;
      // height: 680px;
      padding: 20px;
      background-color: #0c3061;
      color: #fff;
      .big-chart-btn-box {
        display: flex;
        justify-content: center;
        width: 100%;
        margin-bottom: 20px;
        button {
          width: 140px;
          height: 40px;
          margin-right: 50px;
          background-color: rgba(96, 255, 246, 0.5);
          color: #fff;
          &:hover {
            background-color: rgba(227, 133, 0, 0.6);
          }
          &.active {
            background-color: rgba(227, 133, 0, 0.6);
          }
        }
        button:last-child {
          margin-right: 0;
        }
      }
    }
    .el-dialog__footer {
      display: flex;
      justify-content: center;
      align-items: center;
      width: 100%;
      padding: 20px;
      background-color: pink;
    }
  }
}
</style>
