<template>
  <div class="school-set-data">
    <el-button type="primary" @click="toClear">清除基础数据</el-button>
    <p class="tips-info tips-error mt-1">
      注意：执行该操作，会将该单位下配置的基础数据全部清除，进入初始状态，请谨慎操作，该操作不可恢复！
    </p>

    <!-- DataClearTipsDialog -->
    <data-clear-tips-dialog
      ref="DataClearTipsDialog"
      :school="school"
    ></data-clear-tips-dialog>
  </div>
</template>

<script>
import DataClearTipsDialog from "./DataClearTipsDialog.vue";

export default {
  name: "school-set-data",
  components: {
    DataClearTipsDialog,
  },
  props: {
    school: {
      type: Object,
      default() {
        return {};
      },
    },
  },
  data() {
    return {
      loading: false,
    };
  },
  methods: {
    toClear() {
      this.$refs.DataClearTipsDialog.open();
    },
  },
};
</script>
