{"size": 955, "ext": "js", "max_stars_repo_path": "initsrc-ui/src/views/system/notice/js/indexExport.js", "max_stars_repo_name": "init-src/initsrc", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "initsrc-ui/src/views/system/notice/js/indexExport.js", "max_issues_repo_name": "init-src/initsrc", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "initsrc-ui/src/views/system/notice/js/indexExport.js", "max_forks_repo_name": "init-src/initsrc", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 22.2093023256, "max_line_length": 64, "alphanum_fraction": 0.5015706806}
const baseForm = {
  title: null,
  beginCreateTime: null,
  endCreateTime: null,
}
export default {
  name: "",
  data() {
    return {
      dialogFormVisible: false,
      loading: null,
      form: {
        ...baseForm
      },
    };
  },
  methods: {
    init() {
      this.dialogFormVisible = true;
    },
    save(formName) {
      let that = this;
      that.$refs[formName].validate((valid) => {
        if (valid) {
          that.loading = true;
          if (that.form.createTime != null) {
            that.form.beginCreateTime = that.form.createTime[0];
            that.form.endCreateTime = that.form.createTime[1];
          }
          that.$api.systemRequest.noticeExport(that.form)
            .then(res => {
              that.loading = false;
              that.common.fileDownloads(res, "xls");
              that.dialogFormVisible = false;
            })
        } else {
          return false;
        }
      });
    }
  }
};
