index.vue 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126
  1. <template>
  2. <div class="create-course">
  3. <div class="create-course-title">
  4. {{ $t('Key285') }}
  5. </div>
  6. <div class="create-course-container">
  7. <div class="create template">
  8. <div class="click" @click="selectTemplate">
  9. <i class="el-icon-plus" />
  10. </div>
  11. <div class="name">
  12. {{ $t('Key286') }}
  13. </div>
  14. </div>
  15. <div class="create build">
  16. <div class="click" @click="$router.push('/create_course_step_table')">
  17. <i class="el-icon-plus" />
  18. </div>
  19. <div class="name">
  20. {{ $t('Key287') }}
  21. </div>
  22. </div>
  23. </div>
  24. <!-- 选择模板 -->
  25. <select-template :dialog-visible="dialogVisible" @dialogClose="dialogClose" @confirmTemplate="confirmTemplate" />
  26. </div>
  27. </template>
  28. <script>
  29. import SelectTemplate from '@/components/select/SelectTemplate.vue';
  30. export default {
  31. components: { SelectTemplate },
  32. data() {
  33. return {
  34. dialogVisible: false
  35. };
  36. },
  37. created() {
  38. this.updateWordPack({
  39. word_key_list: ['Key285', 'Key286', 'Key287', 'Key279']
  40. });
  41. },
  42. methods: {
  43. selectTemplate() {
  44. this.dialogVisible = true;
  45. },
  46. dialogClose() {
  47. this.dialogVisible = false;
  48. },
  49. confirmTemplate(id) {
  50. this.dialogVisible = false;
  51. this.$router.push(`/create_course_step_table/course_info?is_use_template=true&template_id=${id}`);
  52. }
  53. }
  54. };
  55. </script>
  56. <style lang="scss" scoped>
  57. @import '~@/styles/mixin';
  58. .create-course {
  59. @include container;
  60. padding-top: 88px;
  61. &-title {
  62. width: 100%;
  63. text-align: center;
  64. font: {
  65. size: 24px;
  66. weight: 700;
  67. }
  68. }
  69. &-container {
  70. display: flex;
  71. justify-content: space-evenly;
  72. margin-top: 56px;
  73. .template > .click {
  74. background-color: #68cefa;
  75. }
  76. .build > .click {
  77. background-color: #5af0e7;
  78. }
  79. .create {
  80. width: 400px;
  81. height: 300px;
  82. border: 1px solid #ccc;
  83. border-radius: 8px;
  84. .click {
  85. position: relative;
  86. height: 236px;
  87. cursor: pointer;
  88. border-top-left-radius: 8px;
  89. border-top-right-radius: 8px;
  90. .el-icon-plus {
  91. position: absolute;
  92. top: 108px;
  93. left: 181px;
  94. color: #fff;
  95. font: {
  96. size: 36px;
  97. }
  98. }
  99. }
  100. .name {
  101. height: 64px;
  102. line-height: 64px;
  103. text-align: center;
  104. font: {
  105. size: 20px;
  106. weight: 700;
  107. }
  108. }
  109. }
  110. }
  111. }
  112. </style>