CreateTask.vue 25 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828
  1. <template>
  2. <div class="task">
  3. <step-bar :step-number="2" />
  4. <!-- 课程基本信息 -->
  5. <div class="task-course-info">
  6. <div class="cover"><el-image fit="contain" :src="picture_url" alt="封面" /></div>
  7. <div class="info">
  8. <div class="name">{{ name }}</div>
  9. <div class="date">{{ begin_date }}<span>-</span>{{ end_date }}</div>
  10. </div>
  11. </div>
  12. <!-- 按钮 -->
  13. <div class="task-button">
  14. <el-button class="prev-step" @click="preStep"><i class="el-icon-back" />选择教材</el-button>
  15. <el-button @click="$router.push(closeLink)">关闭</el-button>
  16. </div>
  17. <!-- 任务课节 -->
  18. <div class="task-item">
  19. <!-- 课节列表 -->
  20. <div class="task-item-list">
  21. <template v-if="cs_item_list.length > 0">
  22. <div
  23. v-for="item in cs_item_list"
  24. :key="item.id"
  25. :class="['task-item-list-title', { selected: item.id === curItemID }]"
  26. @click="curItemID = item.id"
  27. >
  28. <span class="nowrap-ellipsis task-item-name" :title="item.name">{{ item.name }}</span>
  29. <!-- 课节下拉框 -->
  30. <el-dropdown placement="bottom" trigger="click" @command="handleCSItem">
  31. <i class="el-icon-more" />
  32. <el-dropdown-menu slot="dropdown">
  33. <el-dropdown-item class="dropdown-menu" :command="{ id: item.id, type: 'edit' }">
  34. <span>编辑</span><svg-icon icon-class="edit" />
  35. </el-dropdown-item>
  36. <el-dropdown-item class="dropdown-menu" :command="{ id: item.id, type: 'delete' }">
  37. <span>删除</span><svg-icon icon-class="delete" />
  38. </el-dropdown-item>
  39. </el-dropdown-menu>
  40. </el-dropdown>
  41. </div>
  42. </template>
  43. <div v-else class="task-item-list-title">新课节</div>
  44. <el-button class="create-item selected" type="primary" @click="dialogVisible = true">
  45. <svg-icon icon-class="create-white" /> 创建新课节
  46. </el-button>
  47. </div>
  48. <!-- 课节信息 -->
  49. <div class="task-item-container">
  50. <div class="item-info">
  51. <div class="title">课节信息</div>
  52. <div class="item-info-name">
  53. <div>课节名称</div>
  54. <el-input v-model="itemInfoBox.name" readonly />
  55. </div>
  56. <div class="item-info-date">
  57. <div>时间</div>
  58. <el-date-picker
  59. v-model="itemInfoBox.date"
  60. readonly
  61. type="datetimerange"
  62. range-separator="~"
  63. value-format="yyyy-MM-dd HH:mm:ss"
  64. unlink-panels
  65. />
  66. </div>
  67. </div>
  68. <div class="item-task">
  69. <div class="title">
  70. <span class="number-tag">{{ taskLength }}</span>
  71. <span>课节任务</span>
  72. </div>
  73. <div class="item-task-pre task-container">
  74. <!-- 课前任务 -->
  75. <div class="item-task-pre-title">
  76. <span class="number-tag pre">{{ itemInfoBox.pre_task_list.length }}</span>
  77. <span>课前任务</span>
  78. </div>
  79. <div class="item-task-pre-list item-task-list">
  80. <el-card v-for="(item, i) in itemInfoBox.pre_task_list" :key="item.id">
  81. <el-collapse>
  82. <el-collapse-item>
  83. <template slot="title">
  84. <div class="card-title">
  85. <div class="name">{{ i + 1 }}. {{ item.name }}</div>
  86. <div class="info">
  87. {{ item.time_space_view_txt }}
  88. <!-- 任务下拉框 -->
  89. <el-dropdown placement="bottom" @command="handleTask">
  90. <i class="el-icon-more" />
  91. <el-dropdown-menu slot="dropdown">
  92. <el-dropdown-item
  93. class="dropdown-menu"
  94. :command="{ id: item.id, type: 'edit', time_type: 0 }"
  95. >
  96. <span>编辑</span><svg-icon icon-class="edit" />
  97. </el-dropdown-item>
  98. <el-dropdown-item
  99. class="dropdown-menu"
  100. :command="{ id: item.id, type: 'delete', time_type: 0 }"
  101. >
  102. <span>删除</span><svg-icon icon-class="delete" />
  103. </el-dropdown-item>
  104. </el-dropdown-menu>
  105. </el-dropdown>
  106. </div>
  107. </div>
  108. </template>
  109. <div class="task-info">
  110. <div>
  111. <span class="label">要求</span>
  112. <div>{{ item.content }}</div>
  113. </div>
  114. <div>
  115. <span class="label">课件</span>
  116. <div>
  117. <el-tag v-for="li in item.courseware_list" :key="li.courseware_id" color="#fff">
  118. {{ li.courseware_name }}
  119. </el-tag>
  120. </div>
  121. </div>
  122. <div>
  123. <span class="label">其他文件</span>
  124. <div>
  125. <el-tag v-for="li in item.accessory_list" :key="li.file_id" color="#fff">
  126. <a target="_blank" :href="li.file_url">
  127. {{ li.file_name }}
  128. </a>
  129. </el-tag>
  130. </div>
  131. </div>
  132. </div>
  133. </el-collapse-item>
  134. </el-collapse>
  135. </el-card>
  136. <el-button @click="newTask(0)"><i class="el-icon-plus" /> 新建任务</el-button>
  137. </div>
  138. </div>
  139. <!-- 课中任务 -->
  140. <div class="item-task-mid task-container">
  141. <div class="item-task-mid-title">
  142. <span class="number-tag mid">{{ itemInfoBox.mid_task_list.length }}</span>
  143. <span>课中任务</span>
  144. </div>
  145. <div class="item-task-mid-list item-task-list">
  146. <el-card v-for="(item, i) in itemInfoBox.mid_task_list" :key="item.id">
  147. <el-collapse>
  148. <el-collapse-item>
  149. <template slot="title">
  150. <div class="card-title">
  151. <div class="name">{{ itemInfoBox.pre_task_list.length + i + 1 }}. {{ item.name }}</div>
  152. <div class="info">
  153. {{ item.time_space_view_txt }}
  154. <el-dropdown placement="bottom" @command="handleTask">
  155. <i class="el-icon-more" />
  156. <el-dropdown-menu slot="dropdown">
  157. <el-dropdown-item
  158. class="dropdown-menu"
  159. :command="{ id: item.id, type: 'edit', time_type: 1 }"
  160. >
  161. <span>编辑</span><svg-icon icon-class="edit" />
  162. </el-dropdown-item>
  163. <el-dropdown-item
  164. class="dropdown-menu"
  165. :command="{ id: item.id, type: 'delete', time_type: 1 }"
  166. >
  167. <span>删除</span><svg-icon icon-class="delete" />
  168. </el-dropdown-item>
  169. </el-dropdown-menu>
  170. </el-dropdown>
  171. </div>
  172. </div>
  173. </template>
  174. <div class="task-info">
  175. <div>
  176. <span class="label">要求</span>
  177. <div>{{ item.content }}</div>
  178. </div>
  179. <div>
  180. <span class="label">课件</span>
  181. <div>
  182. <el-tag v-for="li in item.courseware_list" :key="li.courseware_id" color="#fff">
  183. {{ li.courseware_name }}
  184. </el-tag>
  185. </div>
  186. </div>
  187. <div>
  188. <span class="label">其他文件</span>
  189. <div>
  190. <el-tag v-for="li in item.accessory_list" :key="li.file_id" color="#fff">
  191. <a target="_blank" :href="li.file_url">
  192. {{ li.file_name }}
  193. </a>
  194. </el-tag>
  195. </div>
  196. </div>
  197. </div>
  198. </el-collapse-item>
  199. </el-collapse>
  200. </el-card>
  201. <el-button @click="newTask(1)"><i class="el-icon-plus" /> 新建任务</el-button>
  202. </div>
  203. </div>
  204. <!-- 课后任务 -->
  205. <div class="item-task-after task-container">
  206. <div class="item-task-after-title">
  207. <span class="number-tag after">{{ itemInfoBox.after_task_list.length }}</span>
  208. <span>课后任务</span>
  209. </div>
  210. <div class="item-task-after-list item-task-list">
  211. <el-card v-for="(item, i) in itemInfoBox.after_task_list" :key="item.id">
  212. <el-collapse>
  213. <el-collapse-item>
  214. <template slot="title">
  215. <div class="card-title">
  216. <div class="name">
  217. {{ itemInfoBox.pre_task_list.length + itemInfoBox.mid_task_list.length + i + 1 }}.
  218. {{ item.name }}
  219. </div>
  220. <div class="info">
  221. {{ item.time_space_view_txt }}
  222. <el-dropdown placement="bottom" @command="handleTask">
  223. <i class="el-icon-more" />
  224. <el-dropdown-menu slot="dropdown">
  225. <el-dropdown-item
  226. class="dropdown-menu"
  227. :command="{ id: item.id, type: 'edit', time_type: 2 }"
  228. >
  229. <span>编辑</span><svg-icon icon-class="edit" />
  230. </el-dropdown-item>
  231. <el-dropdown-item
  232. class="dropdown-menu"
  233. :command="{ id: item.id, type: 'delete', time_type: 2 }"
  234. >
  235. <span>删除</span><svg-icon icon-class="delete" />
  236. </el-dropdown-item>
  237. </el-dropdown-menu>
  238. </el-dropdown>
  239. </div>
  240. </div>
  241. </template>
  242. <div class="task-info">
  243. <div>
  244. <span class="label">要求</span>
  245. <div>{{ item.content }}</div>
  246. </div>
  247. <div>
  248. <span class="label">课件</span>
  249. <div>
  250. <el-tag v-for="li in item.courseware_list" :key="li.courseware_id" color="#fff">
  251. {{ li.courseware_name }}
  252. </el-tag>
  253. </div>
  254. </div>
  255. <div>
  256. <span class="label">其他文件</span>
  257. <div>
  258. <el-tag v-for="li in item.accessory_list" :key="li.file_id" color="#fff">
  259. <a target="_blank" :href="li.file_url">
  260. {{ li.file_name }}
  261. </a>
  262. </el-tag>
  263. </div>
  264. </div>
  265. </div>
  266. </el-collapse-item>
  267. </el-collapse>
  268. </el-card>
  269. <el-button @click="newTask(2)"><i class="el-icon-plus" /> 新建任务</el-button>
  270. </div>
  271. </div>
  272. </div>
  273. <div class="learning-materials">
  274. <div class="title">学习资料</div>
  275. <div>
  276. <el-upload action="no" :http-request="upload" multiple :show-file-list="false" accept="*">
  277. <el-button><svg-icon icon-class="upload" /> 上传文件</el-button>
  278. </el-upload>
  279. </div>
  280. <div class="tag-list">
  281. <el-tag
  282. v-for="(item, i) in itemInfoBox.learning_material_list"
  283. :key="item.file_id"
  284. color="#fff"
  285. closable
  286. :title="item.file_name"
  287. @close="deleteMaterialFile(i, item.file_id)"
  288. >
  289. <span>{{ item.file_name }}</span>
  290. </el-tag>
  291. </div>
  292. </div>
  293. </div>
  294. </div>
  295. <!-- 课节弹出页 -->
  296. <add-item
  297. :id="itemId"
  298. :course-id="id"
  299. :type="type"
  300. :dialog-visible="dialogVisible"
  301. @dialogClose="dialogClose"
  302. @dialogConfirm="dialogConfirm"
  303. />
  304. </div>
  305. </template>
  306. <script>
  307. import StepBar from '@/components/StepBar';
  308. import AddItem from './AddItem.vue';
  309. import { fileUpload } from '@/api/app';
  310. import {
  311. GetCourseInfo_ContainCSItem,
  312. GetCSItemInfoBox,
  313. DeleteCSItem,
  314. AddLearningMaterialToCSItem,
  315. DeleteLearningMaterialFromCSItem,
  316. DeleteTask
  317. } from '@/api/course';
  318. export default {
  319. name: 'CreateTask',
  320. components: {
  321. StepBar,
  322. AddItem
  323. },
  324. data() {
  325. let is_template = 'is_template' in this.$route.query ? this.$route.query.is_template === 'true' : false;
  326. return {
  327. id: this.$route.params.id,
  328. is_template,
  329. name: '',
  330. closeLink: JSON.parse(is_template) ? '/main?tab=TemplateList' : '/create_course',
  331. picture_url: '',
  332. begin_date: '',
  333. end_date: '',
  334. cs_item_list: [],
  335. curItemID: '',
  336. dialogVisible: false,
  337. type: 'add',
  338. itemId: '',
  339. itemInfoBox: {
  340. name: '',
  341. date: [],
  342. pre_task_list: [],
  343. mid_task_list: [],
  344. after_task_list: [],
  345. learning_material_list: []
  346. }
  347. };
  348. },
  349. computed: {
  350. taskLength() {
  351. return (
  352. this.itemInfoBox.pre_task_list.length +
  353. this.itemInfoBox.mid_task_list.length +
  354. this.itemInfoBox.after_task_list.length
  355. );
  356. }
  357. },
  358. watch: {
  359. curItemID() {
  360. this.getCSItemInfoBox();
  361. }
  362. },
  363. created() {
  364. this.getCourseInfo();
  365. },
  366. methods: {
  367. getCourseInfo() {
  368. GetCourseInfo_ContainCSItem({ id: this.id }).then(({ name, picture_url, begin_date, end_date, cs_item_list }) => {
  369. this.name = name;
  370. this.picture_url = picture_url;
  371. this.begin_date = begin_date;
  372. this.end_date = end_date;
  373. this.cs_item_list = cs_item_list;
  374. if (cs_item_list.length > 0) {
  375. this.curItemID = cs_item_list[cs_item_list.length - 1].id;
  376. }
  377. });
  378. },
  379. preStep() {
  380. this.$router.push({
  381. path: `/create_course_step_table/select_book/${this.id}?is_template=${this.is_template}`
  382. });
  383. },
  384. // 课节处理
  385. handleCSItem({ id, type }) {
  386. if (type === 'delete') {
  387. this.$confirm('您确定要删除该课节吗?', '提示', {
  388. confirmButtonText: '确定',
  389. cancelButtonText: '取消',
  390. type: 'warning'
  391. }).then(() => {
  392. DeleteCSItem({ id }).then(() => {
  393. this.$message.success('删除课节成功!');
  394. this.getCourseInfo();
  395. });
  396. });
  397. }
  398. if (type === 'edit') {
  399. this.dialogVisible = true;
  400. this.itemId = id;
  401. this.type = 'edit';
  402. }
  403. },
  404. dialogConfirm(type) {
  405. this.dialogVisible = false;
  406. this.type = 'add';
  407. if (type === 'add') {
  408. this.getCourseInfo();
  409. } else {
  410. this.getCSItemInfoBox();
  411. }
  412. },
  413. dialogClose() {
  414. this.dialogVisible = false;
  415. this.type = 'add';
  416. },
  417. getCSItemInfoBox() {
  418. GetCSItemInfoBox({ id: this.curItemID }).then(
  419. ({ name, begin_time, end_time, pre_task_list, mid_task_list, after_task_list, learning_material_list }) => {
  420. this.itemInfoBox.name = name;
  421. this.itemInfoBox.date = [begin_time, end_time];
  422. this.itemInfoBox.pre_task_list = pre_task_list;
  423. this.itemInfoBox.mid_task_list = mid_task_list;
  424. this.itemInfoBox.after_task_list = after_task_list;
  425. this.itemInfoBox.learning_material_list = learning_material_list;
  426. }
  427. );
  428. },
  429. upload(file) {
  430. fileUpload('Open', file).then(({ file_info_list }) => {
  431. if (file_info_list.length > 0) {
  432. AddLearningMaterialToCSItem({
  433. cs_item_id: this.curItemID,
  434. file_id: file_info_list[0].file_id
  435. }).then(({ file_id, file_name, file_url }) => {
  436. this.itemInfoBox.learning_material_list.push({ file_id, file_name, file_url });
  437. });
  438. }
  439. });
  440. },
  441. deleteMaterialFile(i, file_id) {
  442. this.$confirm('您确定要删除这个文件吗?', '提示', {
  443. confirmButtonText: '确定',
  444. cancelButtonText: '取消',
  445. type: 'warning'
  446. }).then(() => {
  447. DeleteLearningMaterialFromCSItem({ cs_item_id: this.curItemID, file_id }).then(() => {
  448. this.$message.success('删除文件成功');
  449. this.itemInfoBox.learning_material_list.splice(i, 1);
  450. });
  451. });
  452. },
  453. // 任务处理
  454. newTask(time_type) {
  455. if (!this.curItemID) {
  456. this.$message.warning('请先创建新课节');
  457. return;
  458. }
  459. this.$router.push({
  460. path: `/create_course_step_table/new_task/${time_type}/${this.id}/${this.curItemID}?is_template=${this.is_template}`
  461. });
  462. },
  463. handleTask({ id, type, time_type }) {
  464. if (type === 'edit') {
  465. this.$router.push({
  466. path: `/create_course_step_table/new_task/${time_type}/${this.id}/${this.curItemID}?is_template=${this.is_template}`,
  467. query: {
  468. task_id: id
  469. }
  470. });
  471. }
  472. if (type === 'delete') {
  473. DeleteTask({ id }).then(() => {
  474. this.$message.success('删除任务成功');
  475. this.getCSItemInfoBox();
  476. });
  477. }
  478. }
  479. }
  480. };
  481. </script>
  482. <style lang="scss">
  483. @import '~@/styles/mixin';
  484. .task {
  485. @include container;
  486. margin-top: $step-h;
  487. // 上部的课程信息
  488. &-course-info {
  489. display: flex;
  490. width: 100%;
  491. height: 120px;
  492. background-color: #fff;
  493. border-radius: 8px;
  494. .cover {
  495. width: 192px;
  496. height: 100%;
  497. border-right: 1px solid #e5e5e5;
  498. .el-image {
  499. width: 100%;
  500. height: 100%;
  501. }
  502. }
  503. .info {
  504. padding: 26px 32px;
  505. .name {
  506. font-size: 24px;
  507. }
  508. .date {
  509. margin-top: 16px;
  510. font-size: 14px;
  511. color: #6b6b6b;
  512. span {
  513. margin: 0 24px;
  514. }
  515. }
  516. }
  517. }
  518. // 中间的按钮
  519. &-button {
  520. display: flex;
  521. justify-content: flex-end;
  522. margin: 16px 0;
  523. .el-button + .el-button {
  524. margin-left: 16px;
  525. }
  526. .prev-step .el-icon-back {
  527. margin-right: 12px;
  528. }
  529. .preserve .svg-icon {
  530. margin-right: 8px;
  531. }
  532. }
  533. // 下部的课节
  534. &-item {
  535. display: flex;
  536. align-items: stretch;
  537. border-radius: 8px;
  538. &-list {
  539. flex: 3;
  540. background-color: #eee;
  541. &-title {
  542. display: flex;
  543. justify-content: space-between;
  544. height: 56px;
  545. padding: 16px 24px;
  546. line-height: 24px;
  547. cursor: pointer;
  548. background-color: #eee;
  549. &.selected {
  550. background-color: #fff;
  551. }
  552. > .task-item-name {
  553. width: 275px;
  554. }
  555. }
  556. .create-item {
  557. width: calc(100% - 48px);
  558. padding: 11px 20px;
  559. margin: 24px;
  560. font-size: 16px;
  561. }
  562. }
  563. &-container {
  564. flex: 7;
  565. background-color: #fff;
  566. box-shadow: 0 2px 4px rgba(0, 0, 0, 12%), 0 0 6px rgba(0, 0, 0, 4%);
  567. // 学习资料
  568. %learning-materials,
  569. .learning-materials {
  570. padding: 24px 32px;
  571. .title {
  572. margin-bottom: 24px;
  573. font: {
  574. size: 18px;
  575. weight: 700;
  576. }
  577. }
  578. .tag-list {
  579. margin-top: 6px;
  580. .el-tag {
  581. margin-top: 6px;
  582. margin-right: 8px;
  583. }
  584. }
  585. }
  586. .item-info {
  587. @extend %learning-materials;
  588. border-bottom: 1px solid #d9d9d9;
  589. &-name,
  590. &-date {
  591. display: flex;
  592. margin-top: 16px;
  593. > :first-child {
  594. width: 110px;
  595. min-width: 120px;
  596. line-height: 40px;
  597. }
  598. .el-input {
  599. width: 600px;
  600. }
  601. }
  602. }
  603. // 课节任务
  604. .item-task {
  605. @extend %learning-materials;
  606. border-bottom: 1px solid #d9d9d9;
  607. .title {
  608. margin-bottom: 24px;
  609. }
  610. .number-tag {
  611. display: inline-block;
  612. padding: 12px 9px;
  613. margin-right: 8px;
  614. font-size: 12px;
  615. line-height: 0;
  616. color: #fff;
  617. vertical-align: bottom;
  618. background-color: #000;
  619. border-radius: 50%;
  620. }
  621. .task-container {
  622. .number-tag {
  623. padding: 10px 7px;
  624. }
  625. .item-task-list {
  626. .el-card {
  627. margin-bottom: 16px;
  628. border-radius: 8px;
  629. .card-title {
  630. display: flex;
  631. justify-content: space-between;
  632. width: 100%;
  633. .name {
  634. font-weight: 600;
  635. }
  636. .info {
  637. color: #929292;
  638. .el-dropdown {
  639. margin-left: 16px;
  640. }
  641. }
  642. }
  643. }
  644. .el-card,
  645. .el-collapse-item__wrap {
  646. background-color: #f7f7f7;
  647. .el-collapse-item__content {
  648. padding: 15px 24px 9px;
  649. color: #000;
  650. background-color: #fff;
  651. .task-info > div {
  652. display: flex;
  653. align-items: center;
  654. padding: 8px 0;
  655. span.label {
  656. width: 80px;
  657. min-width: 80px;
  658. margin-right: 16px;
  659. }
  660. .el-tag {
  661. max-width: 275px;
  662. margin-right: 16px;
  663. overflow: hidden;
  664. color: #000;
  665. text-overflow: ellipsis;
  666. white-space: nowrap;
  667. border-color: #dbdbdb;
  668. }
  669. }
  670. }
  671. }
  672. .el-card.is-always-shadow,
  673. .el-card.is-hover-shadow:focus,
  674. .el-card.is-hover-shadow:hover {
  675. box-shadow: 0 0;
  676. }
  677. .el-card__body {
  678. padding: 0;
  679. background-color: #f7f7f7;
  680. .el-collapse-item__header {
  681. height: 22px;
  682. line-height: 22px;
  683. background-color: #f9f9f9;
  684. border-bottom-width: 0;
  685. .el-collapse-item__arrow {
  686. display: none;
  687. }
  688. &.focusing:focus:not(:hover) {
  689. color: #000;
  690. }
  691. }
  692. .el-collapse-item > div:first-child {
  693. padding: 10px 20px;
  694. background-color: #f9f9f9;
  695. border-bottom: 1px solid #e7e7e7;
  696. }
  697. }
  698. }
  699. }
  700. // 课前任务
  701. &-pre {
  702. &-title {
  703. .pre {
  704. background-color: #4a99ea;
  705. }
  706. }
  707. &-list {
  708. padding-left: 19px;
  709. margin: 16px 9px;
  710. border-left: 2px solid #4a99ea;
  711. }
  712. }
  713. // 课中任务
  714. &-mid {
  715. &-title {
  716. .mid {
  717. background-color: $basic-color;
  718. }
  719. }
  720. &-list {
  721. padding-left: 19px;
  722. margin: 16px 9px;
  723. border-left: 2px solid $basic-color;
  724. }
  725. }
  726. // 课后任务
  727. &-after {
  728. &-title {
  729. .after {
  730. background-color: #2ece5b;
  731. }
  732. }
  733. &-list {
  734. padding-left: 19px;
  735. margin: 16px 9px;
  736. border-left: 2px solid #2ece5b;
  737. }
  738. }
  739. }
  740. }
  741. }
  742. }
  743. .el-dropdown-menu {
  744. padding: 1px;
  745. .dropdown-menu {
  746. display: flex;
  747. align-items: center;
  748. justify-content: space-between;
  749. width: 128px;
  750. }
  751. }
  752. </style>