Commit c8e173e5 authored by Mac's avatar Mac
parents e465e28f ccc57c5c
......@@ -511,4 +511,31 @@ export function deleteClassCourse(data) {
})
}
/**
* 获取章节导入选择
* @param {JSON对象} data
*/
export function GetCourseChaperDate(data) {
return request({
url: '/course/GetAllCourseChapterCount',
method: 'post',
data
})
}
/**
* 保存选择 以导入
* @param {JSON对象} data
*/
export function SetImportCourse(data) {
return request({
url: '/course/SetImportCourseChapter',
method: 'post',
data
})
}
\ No newline at end of file
<template>
<q-dialog v-model="persistent" content-class="bg-grey-1" persistent transition-show="scale" transition-hide="scale">
<q-card style="width: 800px;max-width:900px;">
<q-card-section>
<div class="text-h6">选择章节</div>
</q-card-section>
<div class="col row wrap q-mr-lg q-col-gutter-md" style="margin:20px 0;">
<div class="col-6">
<q-input @input="filterCourseFn" filled clearable v-model="CourseName" label="课程名称" @clear="filterCourseTWo"
maxlength="20" />
</div>
</div>
<q-card-section class="q-pt-none scroll" style="max-height:60vh">
<q-table :loading="loading" no-data-label="暂无相关数据" flat style="height:400px" selection="multiple"
:selected.sync="selected" class="sticky-column-table sticky-header-table no-bottom-table" separator="none"
:pagination="initialPagination" :data="fiterDataList" :columns="columns" hide-bottom row-key="CourseId">
</q-table>
</q-card-section>
<q-separator />
<q-card-actions align="right" class="bg-white">
<q-btn label="取消" flat color="grey-10" style="font-weight:400 !important" @click="closeSaveForm" />
<q-btn label="立即提交" color="accent q-px-md" style="font-weight:400 !important" :loading="saveLoading"
@click="saveChapter" />
</q-card-actions>
</q-card>
</q-dialog>
</template>
<script>
import {
GetCourseChaperDate,
SetImportCourse
} from '../../api/course/index'
export default {
props: {
CourseId: {
type: String,
default: null
},
MyChapterNo: {
type: Number,
default: null
}
},
data() {
return {
persistent: true,
optionTitle: "",
saveLoading: false,
loading: false,
CourseName: '', //课程名称
dataList: [], //章节选择数据
fiterDataList: [],
initialPagination: {
rowsPerPage: 1000
},
columns: [{
name: 'CourseName',
label: '课程名称',
field: 'CourseName',
align: 'left',
}, {
name: 'ChapterCount',
label: '章节',
field: 'ChapterCount',
align: 'left',
}, {
name: 'UnitCount',
label: '单元',
field: 'UnitCount',
align: 'left',
}],
selected: [],
}
},
mounted() {
this.initObj()
},
methods: {
//初始化表单
initObj() {
let msg = {
CourseId: this.CourseId
}
GetCourseChaperDate(msg).then(res => {
if (res.Code == 1) {
this.dataList = res.Data;
this.fiterDataList = res.Data;
}
})
},
//课程筛选
filterCourseFn() {
this.fiterDataList = [];
this.dataList.forEach(x => {
if (x.CourseName.indexOf(this.CourseName) > -1) {
this.fiterDataList.push(x);
}
})
},
filterCourseTWo() {
this.fiterDataList = this.dataList;
},
//关闭弹窗
closeSaveForm() {
this.$emit('close')
this.persistent = false
},
//保存
saveChapter() {
if (this.selected.length == 0) {
this.$q.notify({
type: 'negative',
position: "top",
message: `请选择课程`
})
return
}
let msg = {
CourseIds: '',
MaxLength: this.MyChapterNo,
NewCourseId: this.CourseId
}
let ckedArr = [];
if (this.selected && this.selected.length > 0) {
this.selected.forEach(x => {
ckedArr.push(x.CourseId);
})
}
msg.CourseIds = ckedArr.toString();
SetImportCourse(msg).then(res => {
if (res.Code == 1) {
this.$emit('success')
this.closeSaveForm();
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '数据保存成功!',
position: 'top'
})
}
})
}
}
}
</script>
<style lang="sass">
@import url('~assets/css/table.sass')
</style>
......@@ -14,11 +14,7 @@
icon="iconfont icon-up"></q-btn>
<q-btn color="primary" size="xs" title="向下移动" :disable="!canDown" @click="moveDown" outline
icon="iconfont icon-down1"></q-btn>
<q-btn color="primary" size="xs" unelevated label="导入 ...">
<q-tooltip>
此功能正在开发中。。。
</q-tooltip>
</q-btn>
<q-btn color="primary" size="xs" unelevated label="导入 ..." @click="getImport()"></q-btn>
</div>
<div class="q-mt-lg" style="height:calc(100% - 140px)">
<q-scroll-area :thumb-style="thumbStyle" :content-style="contentStyle"
......@@ -95,11 +91,15 @@
<q-spinner-ios />
</template>
</q-btn>
<chapter-form v-if="isShowChapter" :CourseId="courseId" :MyChapterNo="MyChapterNo" @close="closeChapterForm"
@success="refreshPage">
</chapter-form>
</div>
</template>
<script>
import editor from "../../components/editor/UeEditor";
import chapterForm from "../../components/course/chapter-form";
import {
queryChapterTree,
saveChapter,
......@@ -121,7 +121,8 @@
title: "课程章节详情"
},
components: {
editor
editor,
chapterForm
},
directives: {
focus: {
......@@ -177,7 +178,10 @@
opacity: 0.75
},
defaultChapterId: 0,
splitterModel: 30 //左侧默认占据多大
splitterModel: 30, //左侧默认占据多大
isShowChapter: false, //是否显示导入
chapterObj:{},
MyChapterNo:0
};
},
created() {
......@@ -214,6 +218,7 @@
})
},
changeNode(data, node, ev) {
console.log(data,'data');
if (this.chapter && this.chapter.ChapterId > 0) {
if (this.defauRateObj.Id != 0) {
this.chapter.CourseRate = this.defauRateObj.Id
......@@ -513,6 +518,7 @@
this.changeNode(t.data, t, null)
}, 1000);
}
this.MyChapterNo = this.dataList.length;
});
},
......@@ -520,10 +526,10 @@
if (this.canOptions) return;
let name = ""
if (pid == 0) {
name = `第${this.toChinesNum(no)}单元`
name = `第${this.toChinesNum(no)}次课`
} else {
let d = no.split('.')
name = `第${this.toChinesNum(d[d.length-1])}课时`
name = `第${this.toChinesNum(d[d.length-1])}章节`
}
return {
ChapterId: 0,
......@@ -583,6 +589,17 @@
batchUpdateChapterNo(this.updateChapters).then(r => {
console.log(x)
})
},
//点击导入
getImport(){
this.isShowChapter=true;
},
closeChapterForm(){
this.isShowChapter=false;
},
refreshPage(){
this.initTree();
this.getCourseInfo();
}
}
};
......
This diff is collapsed.
......@@ -101,13 +101,102 @@
.comment::-webkit-scrollbar {
display: none;
}
.prepareclassDetails .width70{
width: 70px;
.prepareclassDetails .width50{
width: 50px;
}
.prepareTopTitle{
display: flex;
align-items: center;
font-size: 12px;
}
.prePare_Line {
width: 3px;
height: 14px;
background-color: #3FC4FF;
margin-right: 10px;
}
.preSecond{
font-size:36px;
color:#000000;
position: relative;
margin:20px 0;
}
.preSecond:after{
position: absolute;
content: '';
display: inline-block;
width: 120px;
height: 14px;
background: #3FC4FF;
position: absolute;
left:0;
top:34px;
opacity: 0.8;
}
.prePare_Content{
width:430px;
min-height:100px;
height:auto;
background-color: #F0F5FB;
padding:20px;
margin:20px auto;
}
</style>
<template>
<div class="row prepareclassDetails">
<div class="page-body col">
<div class="prepareTopTitle q-table__title">
<div class="prePare_Line"></div>
<div>0到N3直通车</div>
</div>
<div class="preSecond">
~を皮切りに
</div>
<div class="prepareTopTitle q-table__title">
<div class="prePare_Line" style="background-color:#2961FE"></div>
<div>章节学习内容</div>
</div>
<div class="prePare_Content">
まるごと』第3課「どうぞ よろしく」。まるごと』第3課ど
うぞ よろしく」まるごと』第3課「どうぞ よろしく」。ま
るごと』第3課どうぞ よろしく」まるごと』第3課「どうぞ
よろしく」。まるごと』第3課どうぞ よろしく」まるごと』
第3課「どうぞ よろしく」。まるごと』第3課どうぞ よろ
しく」。
まるごと』第3課「どうぞ よろしく」。まるごと』第3課ど
うぞ よろしく」まるごと』第3課「どうぞ よろしく」。ま
るごと』第3課どうぞ よろしく」まるごと』第3課「どうぞ
よろしく」。まるごと』第3課どうぞ よろしく」まるごと』
第3課「どうぞ よろしく」。まるごと』第3課どうぞ よろ
しく」。
</div>
<div class="prepareTopTitle q-table__title">
<div class="prePare_Line" style="background-color:#2961FE"></div>
<div>教学目标</div>
</div>
<div class="prePare_Content" style="background:#F7F0FB">
まるごと』第3課「どうぞ よろしく」。まるごと』第3課ど
うぞ よろしく」まるごと』第3課「どうぞ よろしく」。ま
るごと』第3課どうぞ よろしく」まるごと』第3課「どうぞ
よろしく」。まるごと』第3課どうぞ よろしく」まるごと』
第3課「どうぞ よろしく」。まるごと』第3課どうぞ よろ
しく」。
</div>
<div class="prepareTopTitle q-table__title">
<div class="prePare_Line" style="background:#2961FE"></div>
<div>学生学习要求</div>
</div>
<div class="prePare_Content" style="background:#FBF6F0">
まるごと』第3課「どうぞ よろしく」。まるごと』第3課ど
うぞ よろしく」まるごと』第3課「どうぞ よろしく」。ま
るごと』第3課どうぞ よろしく」まるごと』第3課「どうぞ
よろしく」。まるごと』第3課どうぞ よろしく」まるごと』
第3課「どうぞ よろしく」。まるごと』第3課どうぞ よろ
しく」。
</div>
</div>
<div class="page-body col">
<div class="q-table__title">备课内容</div>
<div style="width: 100%;">
......@@ -133,7 +222,7 @@
<div class="marginl-15 margint-15 ">
<div class="text-title">指導内容</div>
<div class="marginl-15 margint-15 row" style="align-items: flex-start" v-for="(item,index) in data.LessonPlanList" :key="index">
<div class="text12-n width70">{{item.CourseName}}</div>
<div class="text12-n width50">{{item.CourseName}}</div>
<div class="text14-o " style="flex:1">{{item.CourseTitle}}</div>
</div>
......@@ -141,7 +230,7 @@
<div class="marginl-15 margint-15 ">
<div class="text-title">指導項目</div>
<div class="marginl-15 margint-15 row" style="align-items: flex-start" v-for="(item,index) in data.LessonPlanList" :key="index">
<div class="text12-n width70">{{item.CourseName}}</div>
<div class="text12-n width50">{{item.CourseName}}</div>
<div class="text14-o" style="flex:1" v-for="(x,y) in item.LessonPlanProjectsList" :key="y" >
<div v-html="x.ProjectContent">
......@@ -154,7 +243,7 @@
<div class="marginl-15 margint-15 ">
<div class="text-title">上课内容</div>
<div class="marginl-15 margint-15 row" style="align-items: flex-start;flex-wrap: nowrap" v-for="(item,index) in data.LessonPlanList" :key="index">
<div class="text12-n width70">{{item.CourseName}}</div>
<div class="text12-n width50">{{item.CourseName}}</div>
<div class="text14-o" style="flex:1">
<div class="column" v-for="(x,y) in item.LessonPlanDetailsList" :key="y">
<div class="text14-l">{{x.Duration}}分钟-{{x.DurationEndTime}}</div>
......@@ -192,7 +281,6 @@
<div class="col-3" style="position: relative;overflow: hidden;border-radius: 6px;background: #FFF;margin: 5px;height: 800px">
<div class="q-table__title" style="padding: 15px;">评价</div>
<div class="comment" >
<div class="row" style="width: 100%;height: 50px;align-items: center;justify-content: center;font-size: 16px;color: #999999" v-if="CommentList.length==0">
暂无评论
......
......@@ -264,6 +264,9 @@
{{item.ClassName.substr(0,1)}}
</li>
</div>
<div style="display:none;">
<span>单元名:</span><span style="margin-left:30px;">课程名:</span>
</div>
<div class="TeacherContent">
{{item.GuestStr}}
</div>
......
......@@ -173,6 +173,11 @@ const routes = [{
component: () =>
import("pages/course/course.vue")
},
{
path: "/course/lessonNotes", //课程教案
component: () =>
import("pages/course/lessonNotes.vue")
},
{
path: "/course/classManage", //班级管理
component: () =>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment