<template>
  <div>
    <p>创建提报中....</p>
  </div>
</template>

<script>
export default {
  components: {
  },
  data() {
    return {
      defaultData: {},
      folderid: JSON.parse(sessionStorage.getItem('folderid')).appfolderid,
      form: {
        "title": "",
        "notes": '初始化数据' + JSON.parse(sessionStorage.getItem('active_account')).userid,
        "istextrequired": 1,
        "isattrequired": 1,
        "onceonly": 1,
        "sat_submiteditmodelid": "0",
        "begdate": (new Date()).toLocaleDateString(),
        "enddate": (new Date()).toLocaleDateString()
      }
    }
  },
  methods: {
    onChecked() { },
    async onSubmit() {
      const res = await this.$api.requested({
        "classname": "webmanage.saletool.submitedit.submitedit",
        "method": "insertorupdate",
        "content": this.form
      })
      res.code === 1 ? this.$router.replace({ path: '/submit_edit', query: { id: res.data.sat_submiteditmodelid } }) : ''
    },

  },
  mounted() {
    this.onSubmit()
  }
}

</script>
<style>
</style>