|
@@ -18,10 +18,10 @@
|
|
|
<!-- 按钮 -->
|
|
|
<div class="task-button">
|
|
|
<el-button class="prev-step" @click="preStep">
|
|
|
- <i class="el-icon-back" />选择教材
|
|
|
+ <i class="el-icon-back" />{{ $t('Key275') }}
|
|
|
</el-button>
|
|
|
<el-button @click="$router.push(closeLink)">
|
|
|
- 关闭
|
|
|
+ {{ $t('Key246') }}
|
|
|
</el-button>
|
|
|
</div>
|
|
|
<!-- 任务课节 -->
|
|
@@ -41,47 +41,47 @@
|
|
|
<i class="el-icon-more" />
|
|
|
<el-dropdown-menu slot="dropdown">
|
|
|
<el-dropdown-item class="dropdown-menu" :command="{ id: item.id, type: 'edit' }">
|
|
|
- <span>编辑</span><svg-icon icon-class="edit" />
|
|
|
+ <span>{{ $t('Key123') }}</span><svg-icon icon-class="edit" />
|
|
|
</el-dropdown-item>
|
|
|
<el-dropdown-item class="dropdown-menu" :command="{ id: item.id, type: 'delete' }">
|
|
|
- <span>删除</span><svg-icon icon-class="delete" />
|
|
|
+ <span>{{ $t('Key172') }}</span><svg-icon icon-class="delete" />
|
|
|
</el-dropdown-item>
|
|
|
</el-dropdown-menu>
|
|
|
</el-dropdown>
|
|
|
</div>
|
|
|
</template>
|
|
|
<div v-else class="task-item-list-title">
|
|
|
- 新课节
|
|
|
+ {{ $t('Key268') }}
|
|
|
</div>
|
|
|
<el-button class="create-item selected" type="primary" @click="dialogVisible = true">
|
|
|
- <svg-icon icon-class="create-white" /> 创建新课节
|
|
|
+ <svg-icon icon-class="create-white" /> {{ $t('Key269') }}
|
|
|
</el-button>
|
|
|
</div>
|
|
|
<!-- 课节信息 -->
|
|
|
<div class="task-item-container">
|
|
|
<div class="item-info">
|
|
|
<div class="title">
|
|
|
- 课节信息
|
|
|
+ {{ $t('Key352') }}
|
|
|
</div>
|
|
|
<div class="item-info-name">
|
|
|
- <div>课节名称</div>
|
|
|
+ <div>{{ $t('Key270') }}</div>
|
|
|
<el-input v-model="itemInfoBox.name" readonly />
|
|
|
</div>
|
|
|
<div class="item-info-date">
|
|
|
- <div>日期</div>
|
|
|
+ <div>{{ $t('Key311') }}</div>
|
|
|
<el-date-picker v-model="itemInfoBox.date" readonly type="daterange" range-separator="~" />
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="item-task">
|
|
|
<div class="title">
|
|
|
<span class="number-tag">{{ taskLength }}</span>
|
|
|
- <span>课节任务</span>
|
|
|
+ <span>{{ $t('Key272') }}</span>
|
|
|
</div>
|
|
|
<div class="item-task-pre task-container">
|
|
|
<!-- 课前任务 -->
|
|
|
<div class="item-task-pre-title">
|
|
|
<span class="number-tag pre">{{ itemInfoBox.pre_task_list.length }}</span>
|
|
|
- <span>课前任务</span>
|
|
|
+ <span>{{ $t('Key353') }}</span>
|
|
|
</div>
|
|
|
<div class="item-task-pre-list item-task-list">
|
|
|
<el-card v-for="(item, i) in itemInfoBox.pre_task_list" :key="item.id">
|
|
@@ -102,13 +102,13 @@
|
|
|
class="dropdown-menu"
|
|
|
:command="{ id: item.id, type: 'edit', time_type: 0 }"
|
|
|
>
|
|
|
- <span>编辑</span><svg-icon icon-class="edit" />
|
|
|
+ <span>{{ $t('Key123') }}</span><svg-icon icon-class="edit" />
|
|
|
</el-dropdown-item>
|
|
|
<el-dropdown-item
|
|
|
class="dropdown-menu"
|
|
|
:command="{ id: item.id, type: 'delete', time_type: 0 }"
|
|
|
>
|
|
|
- <span>删除</span><svg-icon icon-class="delete" />
|
|
|
+ <span>{{ $t('Key172') }}</span><svg-icon icon-class="delete" />
|
|
|
</el-dropdown-item>
|
|
|
</el-dropdown-menu>
|
|
|
</el-dropdown>
|
|
@@ -118,11 +118,11 @@
|
|
|
|
|
|
<div class="task-info">
|
|
|
<div>
|
|
|
- <span class="label">要求</span>
|
|
|
+ <span class="label">{{ $t('Key356') }}</span>
|
|
|
<div>{{ item.content }}</div>
|
|
|
</div>
|
|
|
<div>
|
|
|
- <span class="label">课件</span>
|
|
|
+ <span class="label">{{ $t('Key309') }}</span>
|
|
|
<div>
|
|
|
<el-tag v-for="li in item.courseware_list" :key="li.courseware_id" color="#fff">
|
|
|
{{ li.courseware_name }}
|
|
@@ -130,7 +130,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div>
|
|
|
- <span class="label">其他文件</span>
|
|
|
+ <span class="label">{{ $t('Key357') }}</span>
|
|
|
<div>
|
|
|
<el-tag v-for="li in item.accessory_list" :key="li.file_id" color="#fff">
|
|
|
<a target="_blank" :href="li.file_url">
|
|
@@ -144,7 +144,7 @@
|
|
|
</el-collapse>
|
|
|
</el-card>
|
|
|
<el-button @click="newTask(0)">
|
|
|
- <i class="el-icon-plus" /> 新建任务
|
|
|
+ <i class="el-icon-plus" /> {{ $t('Key273') }}
|
|
|
</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -152,7 +152,7 @@
|
|
|
<div class="item-task-mid task-container">
|
|
|
<div class="item-task-mid-title">
|
|
|
<span class="number-tag mid">{{ itemInfoBox.mid_task_list.length }}</span>
|
|
|
- <span>课中任务</span>
|
|
|
+ <span>{{ $t('Key354') }}</span>
|
|
|
</div>
|
|
|
<div class="item-task-mid-list item-task-list">
|
|
|
<el-card v-for="(item, i) in itemInfoBox.mid_task_list" :key="item.id">
|
|
@@ -172,13 +172,13 @@
|
|
|
class="dropdown-menu"
|
|
|
:command="{ id: item.id, type: 'edit', time_type: 1 }"
|
|
|
>
|
|
|
- <span>编辑</span><svg-icon icon-class="edit" />
|
|
|
+ <span>{{ $t('Key123') }}</span><svg-icon icon-class="edit" />
|
|
|
</el-dropdown-item>
|
|
|
<el-dropdown-item
|
|
|
class="dropdown-menu"
|
|
|
:command="{ id: item.id, type: 'delete', time_type: 1 }"
|
|
|
>
|
|
|
- <span>删除</span><svg-icon icon-class="delete" />
|
|
|
+ <span>{{ $t('Key172') }}</span><svg-icon icon-class="delete" />
|
|
|
</el-dropdown-item>
|
|
|
</el-dropdown-menu>
|
|
|
</el-dropdown>
|
|
@@ -188,11 +188,11 @@
|
|
|
|
|
|
<div class="task-info">
|
|
|
<div>
|
|
|
- <span class="label">要求</span>
|
|
|
+ <span class="label">{{ $t('Key356') }}</span>
|
|
|
<div>{{ item.content }}</div>
|
|
|
</div>
|
|
|
<div>
|
|
|
- <span class="label">课件</span>
|
|
|
+ <span class="label">{{ $t('Key309') }}</span>
|
|
|
<div>
|
|
|
<el-tag v-for="li in item.courseware_list" :key="li.courseware_id" color="#fff">
|
|
|
{{ li.courseware_name }}
|
|
@@ -200,7 +200,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div>
|
|
|
- <span class="label">其他文件</span>
|
|
|
+ <span class="label">{{ $t('Key357') }}</span>
|
|
|
<div>
|
|
|
<el-tag v-for="li in item.accessory_list" :key="li.file_id" color="#fff">
|
|
|
<a target="_blank" :href="li.file_url">
|
|
@@ -214,7 +214,7 @@
|
|
|
</el-collapse>
|
|
|
</el-card>
|
|
|
<el-button @click="newTask(1)">
|
|
|
- <i class="el-icon-plus" /> 新建任务
|
|
|
+ <i class="el-icon-plus" /> {{ $t('Key273') }}
|
|
|
</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
@@ -222,7 +222,7 @@
|
|
|
<div class="item-task-after task-container">
|
|
|
<div class="item-task-after-title">
|
|
|
<span class="number-tag after">{{ itemInfoBox.after_task_list.length }}</span>
|
|
|
- <span>课后任务</span>
|
|
|
+ <span>{{ $t('Key355') }}</span>
|
|
|
</div>
|
|
|
<div class="item-task-after-list item-task-list">
|
|
|
<el-card v-for="(item, i) in itemInfoBox.after_task_list" :key="item.id">
|
|
@@ -243,13 +243,13 @@
|
|
|
class="dropdown-menu"
|
|
|
:command="{ id: item.id, type: 'edit', time_type: 2 }"
|
|
|
>
|
|
|
- <span>编辑</span><svg-icon icon-class="edit" />
|
|
|
+ <span>{{ $t('Key123') }}</span><svg-icon icon-class="edit" />
|
|
|
</el-dropdown-item>
|
|
|
<el-dropdown-item
|
|
|
class="dropdown-menu"
|
|
|
:command="{ id: item.id, type: 'delete', time_type: 2 }"
|
|
|
>
|
|
|
- <span>删除</span><svg-icon icon-class="delete" />
|
|
|
+ <span>{{ $t('Key172') }}</span><svg-icon icon-class="delete" />
|
|
|
</el-dropdown-item>
|
|
|
</el-dropdown-menu>
|
|
|
</el-dropdown>
|
|
@@ -259,11 +259,11 @@
|
|
|
|
|
|
<div class="task-info">
|
|
|
<div>
|
|
|
- <span class="label">要求</span>
|
|
|
+ <span class="label">{{ $t('Key356') }}</span>
|
|
|
<div>{{ item.content }}</div>
|
|
|
</div>
|
|
|
<div>
|
|
|
- <span class="label">课件</span>
|
|
|
+ <span class="label">{{ $t('Key309') }}</span>
|
|
|
<div>
|
|
|
<el-tag v-for="li in item.courseware_list" :key="li.courseware_id" color="#fff">
|
|
|
{{ li.courseware_name }}
|
|
@@ -271,7 +271,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
<div>
|
|
|
- <span class="label">其他文件</span>
|
|
|
+ <span class="label">{{ $t('Key357') }}</span>
|
|
|
<div>
|
|
|
<el-tag v-for="li in item.accessory_list" :key="li.file_id" color="#fff">
|
|
|
<a target="_blank" :href="li.file_url">
|
|
@@ -285,18 +285,18 @@
|
|
|
</el-collapse>
|
|
|
</el-card>
|
|
|
<el-button @click="newTask(2)">
|
|
|
- <i class="el-icon-plus" /> 新建任务
|
|
|
+ <i class="el-icon-plus" /> {{ $t('Key273') }}
|
|
|
</el-button>
|
|
|
</div>
|
|
|
</div>
|
|
|
</div>
|
|
|
<div class="learning-materials">
|
|
|
<div class="title">
|
|
|
- 学习资料
|
|
|
+ {{ $t('Key274') }}
|
|
|
</div>
|
|
|
<div>
|
|
|
<el-upload action="no" :http-request="upload" multiple :show-file-list="false" accept="*">
|
|
|
- <el-button><svg-icon icon-class="upload" /> 上传文件</el-button>
|
|
|
+ <el-button><svg-icon icon-class="upload" /> {{ $t('Key152') }}</el-button>
|
|
|
</el-upload>
|
|
|
</div>
|
|
|
<div class="tag-list">
|
|
@@ -389,9 +389,44 @@ export default {
|
|
|
},
|
|
|
created() {
|
|
|
this.getCourseInfo();
|
|
|
+ this.updateWordPack({
|
|
|
+ word_key_list: [
|
|
|
+ 'Key275',
|
|
|
+ 'Key246',
|
|
|
+ 'Key123',
|
|
|
+ 'Key172',
|
|
|
+ 'Key268',
|
|
|
+ 'Key269',
|
|
|
+ 'Key352',
|
|
|
+ 'Key270',
|
|
|
+ 'Key311',
|
|
|
+ 'Key272',
|
|
|
+ 'Key353',
|
|
|
+ 'Key354',
|
|
|
+ 'Key355',
|
|
|
+ 'Key356',
|
|
|
+ 'Key309',
|
|
|
+ 'Key357',
|
|
|
+ 'Key273',
|
|
|
+ 'Key359',
|
|
|
+ 'Key274',
|
|
|
+ 'Key152',
|
|
|
+ 'Key352',
|
|
|
+ 'Key358',
|
|
|
+ 'Key83',
|
|
|
+ 'Key94',
|
|
|
+ 'Key360',
|
|
|
+ 'Key361',
|
|
|
+ 'Key362',
|
|
|
+ 'Key363',
|
|
|
+ 'Key364',
|
|
|
+ 'Key365',
|
|
|
+ 'Key366'
|
|
|
+ ]
|
|
|
+ });
|
|
|
},
|
|
|
methods: {
|
|
|
- getCourseInfo() {
|
|
|
+ getCourseInfo(isRefresh = false) {
|
|
|
GetCourseInfo_ContainCSItem({ id: this.id }).then(({ name, picture_url, begin_date, end_date, cs_item_list }) => {
|
|
|
this.name = name;
|
|
|
this.picture_url = picture_url;
|
|
@@ -399,6 +434,7 @@ export default {
|
|
|
this.end_date = end_date;
|
|
|
this.cs_item_list = cs_item_list;
|
|
|
if (cs_item_list.length <= 0) return;
|
|
|
+ if (isRefresh) return this.getCSItemInfoBox();
|
|
|
let curItemID = 'curItemID' in this.$route.query ? this.$route.query.curItemID : '';
|
|
|
this.curItemID = curItemID || cs_item_list[cs_item_list.length - 1].id;
|
|
|
});
|
|
@@ -413,13 +449,13 @@ export default {
|
|
|
// 课节处理
|
|
|
handleCSItem({ id, type }) {
|
|
|
if (type === 'delete') {
|
|
|
- this.$confirm('您确定要删除该课节吗?', '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- cancelButtonText: '取消',
|
|
|
+ this.$confirm(this.$i18n.t('Key360'), this.$i18n.t('Key361'), {
|
|
|
+ confirmButtonText: this.$i18n.t('Key94'),
|
|
|
+ cancelButtonText: this.$i18n.t('Key83'),
|
|
|
type: 'warning'
|
|
|
}).then(() => {
|
|
|
DeleteCSItem({ id }).then(() => {
|
|
|
- this.$message.success('删除课节成功!');
|
|
|
+ this.$message.success(this.$i18n.t('Key362'));
|
|
|
this.getCourseInfo();
|
|
|
});
|
|
|
});
|
|
@@ -437,8 +473,9 @@ export default {
|
|
|
this.type = 'add';
|
|
|
if (type === 'add') {
|
|
|
this.getCourseInfo();
|
|
|
- } else {
|
|
|
- this.getCSItemInfoBox();
|
|
|
+ }
|
|
|
+ if (type === 'edit') {
|
|
|
+ this.getCourseInfo(true);
|
|
|
}
|
|
|
},
|
|
|
|
|
@@ -474,13 +511,13 @@ export default {
|
|
|
},
|
|
|
|
|
|
deleteMaterialFile(i, file_id) {
|
|
|
- this.$confirm('您确定要删除这个文件吗?', '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- cancelButtonText: '取消',
|
|
|
+ this.$confirm(this.$i18n.t('Key363'), this.$i18n.t('Key361'), {
|
|
|
+ confirmButtonText: this.$i18n.t('Key94'),
|
|
|
+ cancelButtonText: this.$i18n.t('Key83'),
|
|
|
type: 'warning'
|
|
|
}).then(() => {
|
|
|
DeleteLearningMaterialFromCSItem({ cs_item_id: this.curItemID, file_id }).then(() => {
|
|
|
- this.$message.success('删除文件成功');
|
|
|
+ this.$message.success(this.$i18n.t('Key364'));
|
|
|
this.itemInfoBox.learning_material_list.splice(i, 1);
|
|
|
});
|
|
|
});
|
|
@@ -489,7 +526,7 @@ export default {
|
|
|
// 任务处理
|
|
|
newTask(time_type) {
|
|
|
if (!this.curItemID) {
|
|
|
- this.$message.warning('请先创建新课节');
|
|
|
+ this.$message.warning(this.$i18n.t('Key365'));
|
|
|
return;
|
|
|
}
|
|
|
this.$router.push({
|
|
@@ -507,13 +544,13 @@ export default {
|
|
|
});
|
|
|
}
|
|
|
if (type === 'delete') {
|
|
|
- this.$confirm('您确定要删除该任务吗?', '提示', {
|
|
|
- confirmButtonText: '确定',
|
|
|
- cancelButtonText: '取消',
|
|
|
+ this.$confirm('您确定要删除该任务吗?', this.$i18n.t('Key361'), {
|
|
|
+ confirmButtonText: this.$i18n.t('Key94'),
|
|
|
+ cancelButtonText: this.$i18n.t('Key83'),
|
|
|
type: 'warning'
|
|
|
}).then(() => {
|
|
|
DeleteTask({ id }).then(() => {
|
|
|
- this.$message.success('删除任务成功');
|
|
|
+ this.$message.success(this.$i18n.t('Key366'));
|
|
|
this.getCSItemInfoBox();
|
|
|
});
|
|
|
});
|