createSuccess.vue 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. <template>
  2. <div class="create-success">
  3. <p class="tips">教材编辑项目《{{ project_name }}》创建成功,请切换到“教材管理” > “我的项目”进行管理。</p>
  4. <div class="btns">
  5. <el-button type="primary" @click="$router.push('/create_project/create')">创建新的项目</el-button>
  6. <el-button type="primary" @click="$router.push('/personal_workbench/project')">
  7. 跳转到“教材管理” > “我的项目”
  8. </el-button>
  9. </div>
  10. </div>
  11. </template>
  12. <script>
  13. import { GetProjectBaseInfo } from '@/api/project';
  14. export default {
  15. name: 'CreateSuccess',
  16. data() {
  17. return {
  18. id: this.$route.query.id,
  19. project_name: '',
  20. };
  21. },
  22. created() {
  23. this.getProjectBaseInfo();
  24. },
  25. methods: {
  26. async getProjectBaseInfo() {
  27. const { project_info } = await GetProjectBaseInfo({ id: this.id });
  28. this.project_name = project_info.name;
  29. },
  30. },
  31. };
  32. </script>
  33. <style lang="scss" scoped>
  34. @use '@/styles/mixin.scss' as *;
  35. .create-success {
  36. @include page-base;
  37. justify-content: space-between;
  38. padding-top: 18%;
  39. .tips {
  40. font-size: 16px;
  41. color: #333;
  42. text-align: center;
  43. }
  44. .btns {
  45. display: flex;
  46. align-items: center;
  47. justify-content: end;
  48. .el-button {
  49. padding: 12px 24px;
  50. }
  51. }
  52. }
  53. </style>