<template>
  <div class="dilog">
    <el-dialog :visible.sync="BatchOffShelfvisible" :before-close="close">
      <div class="img">
        <img
          src="	https://aiguovip2020.oss-cn-shenzhen.aliyuncs.com/erp_img/xianyu.png"
          alt=""
        />
        下架状态
      </div>
      <div v-if="BatchOffShelfsuccessdata.length">
        下架成功{{ BatchOffShelfsuccessdata.length }}台
      </div>
      <div v-else>
        <div>下架失败{{ BatchOffShelfErrordata.length }}台</div>
        <el-table :data="BatchOffShelfErrordata" height="300px">
          <el-table-column label="失败原因">
            <template slot-scope="{ row }">
              <span>
                {{ row.msg }}
              </span>
            </template>
          </el-table-column>

          <!-- <el-table-column property="status" label="下架状态">
        </el-table-column> -->
        </el-table>
      </div>
      <div slot="footer" class="dialog-footer">
        <el-button type="primary" @click="close">关 闭</el-button>
      </div>
    </el-dialog>
  </div>
</template>

<script>
export default {
  props: [
    "BatchOffShelfvisible",
    "BatchOffShelfsuccessdata",
    "BatchOffShelfErrordata",
  ],
  data() {
    return {};
  },

  methods: {
    close() {
      this.$emit("Batchdialogclose");
    },
  },
  mounted() {
    console.log(this.BatchOffShelfErrordata, "this.BatchOffShelfData");
  },
};
</script>

<style scoped lang='scss'>
::v-deep .el-dialog__header {
  padding: 0px !important;
}
::v-deep .el-dialog__body {
  padding: 0px 30px 20px !important;
}
.img {
  img {
    width: 60px !important;
  }
}
</style>