add.vue 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <template>
  2. <div>
  3. <el-button size="small" type="primary" @click="onSubmit">新 建</el-button>
  4. <!-- <p>创建通告中....</p>-->
  5. </div>
  6. </template>
  7. <script>
  8. export default {
  9. components:{
  10. },
  11. data () {
  12. return {
  13. defaultData:{},
  14. folderid:JSON.parse(sessionStorage.getItem('folderid')).appfolderid,
  15. form:{
  16. "sat_noticeid":0,
  17. "sat_notice_classid": '9999' + JSON.parse(sessionStorage.getItem('active_account')).userid,
  18. "title": "",
  19. "summary": "",
  20. "content": "",
  21. "issecret": 1,
  22. "begdate":(new Date()).toLocaleDateString(),
  23. "enddate":'',
  24. "isontop":0
  25. }
  26. }
  27. },
  28. methods:{
  29. onChecked () {},
  30. async onSubmit () {
  31. const res = await this.$api.requested({
  32. "id": "20221101094803",
  33. "content": this.form
  34. })
  35. this.$store.dispatch('DrawerShowChange',true)
  36. res.code === 1?this.$router.push({path:'/notice_add',query:{id:res.data.sat_noticeid}}):''
  37. },
  38. },
  39. mounted () {
  40. /*this.onSubmit()*/
  41. }
  42. }
  43. </script>
  44. <style>
  45. </style>