|
@@ -25,7 +25,7 @@
|
|
|
:class="['task-item-list-title', { selected: item.id === curItemID }]"
|
|
|
@click="curItemID = item.id"
|
|
|
>
|
|
|
- <span>{{ item.name }}</span>
|
|
|
+ <span class="nowrap-ellipsis task-item-name">{{ item.name }}</span>
|
|
|
<!-- 课节下拉框 -->
|
|
|
<el-dropdown placement="bottom" trigger="click" @command="handleCSItem">
|
|
|
<i class="el-icon-more"></i>
|
|
@@ -115,11 +115,7 @@
|
|
|
<div>
|
|
|
<span class="label">课件</span>
|
|
|
<div>
|
|
|
- <el-tag
|
|
|
- v-for="li in item.courseware_list"
|
|
|
- :key="li.courseware_id"
|
|
|
- color="#fff"
|
|
|
- >
|
|
|
+ <el-tag v-for="li in item.courseware_list" :key="li.courseware_id" color="#fff">
|
|
|
{{ li.courseware_name }}
|
|
|
</el-tag>
|
|
|
</div>
|
|
@@ -153,9 +149,7 @@
|
|
|
<el-collapse-item>
|
|
|
<template slot="title">
|
|
|
<div class="card-title">
|
|
|
- <div class="name">
|
|
|
- {{ itemInfoBox.pre_task_list.length + i + 1 }}. {{ item.name }}
|
|
|
- </div>
|
|
|
+ <div class="name">{{ itemInfoBox.pre_task_list.length + i + 1 }}. {{ item.name }}</div>
|
|
|
<div class="info">
|
|
|
{{ item.time_space_view_txt }}
|
|
|
<el-dropdown placement="bottom" @command="handleTask">
|
|
@@ -187,11 +181,7 @@
|
|
|
<div>
|
|
|
<span class="label">课件</span>
|
|
|
<div>
|
|
|
- <el-tag
|
|
|
- v-for="li in item.courseware_list"
|
|
|
- :key="li.courseware_id"
|
|
|
- color="#fff"
|
|
|
- >
|
|
|
+ <el-tag v-for="li in item.courseware_list" :key="li.courseware_id" color="#fff">
|
|
|
{{ li.courseware_name }}
|
|
|
</el-tag>
|
|
|
</div>
|
|
@@ -226,12 +216,8 @@
|
|
|
<template slot="title">
|
|
|
<div class="card-title">
|
|
|
<div class="name">
|
|
|
- {{
|
|
|
- itemInfoBox.pre_task_list.length +
|
|
|
- itemInfoBox.mid_task_list.length +
|
|
|
- i +
|
|
|
- 1
|
|
|
- }}. {{ item.name }}
|
|
|
+ {{ itemInfoBox.pre_task_list.length + itemInfoBox.mid_task_list.length + i + 1 }}.
|
|
|
+ {{ item.name }}
|
|
|
</div>
|
|
|
<div class="info">
|
|
|
{{ item.time_space_view_txt }}
|
|
@@ -264,11 +250,7 @@
|
|
|
<div>
|
|
|
<span class="label">课件</span>
|
|
|
<div>
|
|
|
- <el-tag
|
|
|
- v-for="li in item.courseware_list"
|
|
|
- :key="li.courseware_id"
|
|
|
- color="#fff"
|
|
|
- >
|
|
|
+ <el-tag v-for="li in item.courseware_list" :key="li.courseware_id" color="#fff">
|
|
|
{{ li.courseware_name }}
|
|
|
</el-tag>
|
|
|
</div>
|
|
@@ -294,13 +276,7 @@
|
|
|
<div class="learning-materials">
|
|
|
<div class="title">学习资料</div>
|
|
|
<div>
|
|
|
- <el-upload
|
|
|
- action="no"
|
|
|
- :http-request="upload"
|
|
|
- multiple
|
|
|
- :show-file-list="false"
|
|
|
- accept="*"
|
|
|
- >
|
|
|
+ <el-upload action="no" :http-request="upload" multiple :show-file-list="false" accept="*">
|
|
|
<el-button><svg-icon icon-class="upload" /> 上传文件</el-button>
|
|
|
</el-upload>
|
|
|
</div>
|
|
@@ -352,8 +328,7 @@ export default {
|
|
|
AddItem
|
|
|
},
|
|
|
data() {
|
|
|
- let is_template =
|
|
|
- 'is_template' in this.$route.query ? this.$route.query.is_template === 'true' : false;
|
|
|
+ let is_template = 'is_template' in this.$route.query ? this.$route.query.is_template === 'true' : false;
|
|
|
|
|
|
return {
|
|
|
id: this.$route.params.id,
|
|
@@ -397,18 +372,16 @@ export default {
|
|
|
},
|
|
|
methods: {
|
|
|
getCourseInfo() {
|
|
|
- GetCourseInfo_ContainCSItem({ id: this.id }).then(
|
|
|
- ({ name, picture_url, begin_date, end_date, cs_item_list }) => {
|
|
|
- this.name = name;
|
|
|
- this.picture_url = picture_url;
|
|
|
- this.begin_date = begin_date;
|
|
|
- this.end_date = end_date;
|
|
|
- this.cs_item_list = cs_item_list;
|
|
|
- if (cs_item_list.length > 0) {
|
|
|
- this.curItemID = cs_item_list[cs_item_list.length - 1].id;
|
|
|
- }
|
|
|
+ GetCourseInfo_ContainCSItem({ id: this.id }).then(({ name, picture_url, begin_date, end_date, cs_item_list }) => {
|
|
|
+ this.name = name;
|
|
|
+ this.picture_url = picture_url;
|
|
|
+ this.begin_date = begin_date;
|
|
|
+ this.end_date = end_date;
|
|
|
+ this.cs_item_list = cs_item_list;
|
|
|
+ if (cs_item_list.length > 0) {
|
|
|
+ this.curItemID = cs_item_list[cs_item_list.length - 1].id;
|
|
|
}
|
|
|
- );
|
|
|
+ });
|
|
|
},
|
|
|
|
|
|
preStep() {
|
|
@@ -456,15 +429,7 @@ export default {
|
|
|
|
|
|
getCSItemInfoBox() {
|
|
|
GetCSItemInfoBox({ id: this.curItemID }).then(
|
|
|
- ({
|
|
|
- name,
|
|
|
- begin_time,
|
|
|
- end_time,
|
|
|
- pre_task_list,
|
|
|
- mid_task_list,
|
|
|
- after_task_list,
|
|
|
- learning_material_list
|
|
|
- }) => {
|
|
|
+ ({ name, begin_time, end_time, pre_task_list, mid_task_list, after_task_list, learning_material_list }) => {
|
|
|
this.itemInfoBox.name = name;
|
|
|
this.itemInfoBox.date = [begin_time, end_time];
|
|
|
this.itemInfoBox.pre_task_list = pre_task_list;
|
|
@@ -533,7 +498,7 @@ export default {
|
|
|
</script>
|
|
|
|
|
|
<style lang="scss">
|
|
|
-@import '~@/styles/mixin.scss';
|
|
|
+@import '~@/styles/mixin';
|
|
|
|
|
|
.task {
|
|
|
@include container;
|
|
@@ -567,9 +532,9 @@ export default {
|
|
|
}
|
|
|
|
|
|
.date {
|
|
|
- color: #6b6b6b;
|
|
|
- font-size: 14px;
|
|
|
margin-top: 16px;
|
|
|
+ font-size: 14px;
|
|
|
+ color: #6b6b6b;
|
|
|
|
|
|
span {
|
|
|
margin: 0 24px;
|
|
@@ -580,9 +545,9 @@ export default {
|
|
|
|
|
|
// 中间的按钮
|
|
|
&-button {
|
|
|
- margin: 16px 0;
|
|
|
display: flex;
|
|
|
justify-content: flex-end;
|
|
|
+ margin: 16px 0;
|
|
|
|
|
|
.el-button + .el-button {
|
|
|
margin-left: 16px;
|
|
@@ -610,22 +575,26 @@ export default {
|
|
|
&-title {
|
|
|
display: flex;
|
|
|
justify-content: space-between;
|
|
|
- padding: 16px 24px;
|
|
|
height: 56px;
|
|
|
+ padding: 16px 24px;
|
|
|
line-height: 24px;
|
|
|
- background-color: #eee;
|
|
|
cursor: pointer;
|
|
|
+ background-color: #eee;
|
|
|
|
|
|
&.selected {
|
|
|
background-color: #fff;
|
|
|
}
|
|
|
+
|
|
|
+ > .task-item-name {
|
|
|
+ width: 275px;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
.create-item {
|
|
|
+ width: calc(100% - 48px);
|
|
|
+ padding: 11px 20px;
|
|
|
margin: 24px;
|
|
|
font-size: 16px;
|
|
|
- padding: 11px 20px;
|
|
|
- width: calc(100% - 48px);
|
|
|
}
|
|
|
}
|
|
|
|
|
@@ -635,27 +604,30 @@ export default {
|
|
|
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.12), 0 0 6px rgba(0, 0, 0, 0.04);
|
|
|
|
|
|
// 学习资料
|
|
|
+ %learning-materials,
|
|
|
.learning-materials {
|
|
|
padding: 24px 32px;
|
|
|
|
|
|
.title {
|
|
|
- font-size: 18px;
|
|
|
- font-weight: 700;
|
|
|
margin-bottom: 24px;
|
|
|
+ font: {
|
|
|
+ size: 18px;
|
|
|
+ weight: 700;
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
.tag-list {
|
|
|
margin-top: 6px;
|
|
|
|
|
|
.el-tag {
|
|
|
- margin-right: 8px;
|
|
|
margin-top: 6px;
|
|
|
+ margin-right: 8px;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
|
|
|
.item-info {
|
|
|
- @extend .learning-materials;
|
|
|
+ @extend %learning-materials;
|
|
|
|
|
|
border-bottom: 1px solid #d9d9d9;
|
|
|
|
|
@@ -678,7 +650,7 @@ export default {
|
|
|
|
|
|
// 课节任务
|
|
|
.item-task {
|
|
|
- @extend .learning-materials;
|
|
|
+ @extend %learning-materials;
|
|
|
|
|
|
border-bottom: 1px solid #d9d9d9;
|
|
|
|
|
@@ -688,13 +660,13 @@ export default {
|
|
|
|
|
|
.number-tag {
|
|
|
display: inline-block;
|
|
|
- vertical-align: bottom;
|
|
|
- line-height: 0;
|
|
|
padding: 12px 9px;
|
|
|
margin-right: 8px;
|
|
|
font-size: 12px;
|
|
|
- background-color: #000;
|
|
|
+ line-height: 0;
|
|
|
color: #fff;
|
|
|
+ vertical-align: bottom;
|
|
|
+ background-color: #000;
|
|
|
border-radius: 50%;
|
|
|
}
|
|
|
|
|
@@ -705,8 +677,8 @@ export default {
|
|
|
|
|
|
.item-task-list {
|
|
|
.el-card {
|
|
|
- border-radius: 8px;
|
|
|
margin-bottom: 16px;
|
|
|
+ border-radius: 8px;
|
|
|
|
|
|
.card-title {
|
|
|
display: flex;
|
|
@@ -733,8 +705,8 @@ export default {
|
|
|
|
|
|
.el-collapse-item__content {
|
|
|
padding: 15px 24px 9px;
|
|
|
- background-color: #fff;
|
|
|
color: #000;
|
|
|
+ background-color: #fff;
|
|
|
|
|
|
.task-info > div {
|
|
|
display: flex;
|
|
@@ -749,12 +721,12 @@ export default {
|
|
|
|
|
|
.el-tag {
|
|
|
max-width: 275px;
|
|
|
- border-color: #dbdbdb;
|
|
|
margin-right: 16px;
|
|
|
- color: #000;
|
|
|
overflow: hidden;
|
|
|
+ color: #000;
|
|
|
text-overflow: ellipsis;
|
|
|
white-space: nowrap;
|
|
|
+ border-color: #dbdbdb;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -786,9 +758,9 @@ export default {
|
|
|
}
|
|
|
|
|
|
.el-collapse-item > div:first-child {
|
|
|
+ padding: 10px 20px;
|
|
|
background-color: #f9f9f9;
|
|
|
border-bottom: 1px solid #e7e7e7;
|
|
|
- padding: 10px 20px;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -803,9 +775,9 @@ export default {
|
|
|
}
|
|
|
|
|
|
&-list {
|
|
|
+ padding-left: 19px;
|
|
|
margin: 16px 9px;
|
|
|
border-left: 2px solid #4a99ea;
|
|
|
- padding-left: 19px;
|
|
|
}
|
|
|
}
|
|
|
// 课中任务
|
|
@@ -817,9 +789,9 @@ export default {
|
|
|
}
|
|
|
|
|
|
&-list {
|
|
|
+ padding-left: 19px;
|
|
|
margin: 16px 9px;
|
|
|
border-left: 2px solid $basicColor;
|
|
|
- padding-left: 19px;
|
|
|
}
|
|
|
}
|
|
|
// 课后任务
|
|
@@ -831,9 +803,9 @@ export default {
|
|
|
}
|
|
|
|
|
|
&-list {
|
|
|
+ padding-left: 19px;
|
|
|
margin: 16px 9px;
|
|
|
border-left: 2px solid #2ece5b;
|
|
|
- padding-left: 19px;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -845,10 +817,10 @@ export default {
|
|
|
padding: 1px;
|
|
|
|
|
|
.dropdown-menu {
|
|
|
- width: 128px;
|
|
|
display: flex;
|
|
|
- justify-content: space-between;
|
|
|
align-items: center;
|
|
|
+ justify-content: space-between;
|
|
|
+ width: 128px;
|
|
|
}
|
|
|
}
|
|
|
</style>
|