CreateTask.vue 25 KB

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