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();
}
}
};
......
<template>
<div class="page-body">
<div class="page-search row items-center">
<div class="col row wrap q-mr-lg q-col-gutter-md">
<div class="col-3">
<q-input @input="resetSearch" clearable standout="bg-primary text-white" v-model="msg.CourseName" label="课程名称"
@clear="resetSearch" maxlength="20" />
</div>
<div class="col-3">
<select-tree :treeData="TreeCategoryList" :defaultArray="returnString" nodeKey="CateId" :multiple="true"
labelKey="CateName" childrenKey="ChildList" tipText="课程系列" @getChild="getChild"></select-tree>
</div>
<div class="col-3">
<q-select @input="resetSearch" standout="bg-primary text-white" v-model="msg.Status" :options="ShowOpts"
emit-value map-options label="状态" />
</div>
</div>
</div>
<div class="page-content">
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat
class="sticky-tow-column-table sticky-right-column-table" separator="none" :data="data" :columns="columns"
row-key="name">
<template v-slot:top="props">
<div class="col-2 q-table__title">课程信息</div>
<q-space />
</template>
<template v-slot:body-cell-CoverImg="props">
<q-td :props="props">
<q-img :src="props.value" spinner-color="white" style="height: 54px; max-width: 100px"
class="rounded-borders">
</q-img>
</q-td>
</template>
<template v-slot:body-cell-CourseIntro="props">
<q-td :props="props">
<span v-html="props.value"></span>
</q-td>
</template>
<!-- <template v-slot:body-cell-PreferentialList="props">
<q-td :props="props" style="padding-right:0px">
<div v-for="x in props.value">
<div class="border-bottom" v-if="x.PriceDiscountType == 1">
买{{ x.BuyNum }}送{{ x.SendNum }}
</div>
<div class="border-bottom" v-if="x.PriceDiscountType == 2">
单人报名享优惠{{x.PriceMoney }}%
</div>
<div class="border-bottom" v-if="x.PriceDiscountType == 3">
双人报名优惠{{x.PriceMoney }}%
</div>
<div class="border-bottom" v-if="x.PriceDiscountType == 4">
续费享优惠{{x.PriceMoney }}%
</div>
<div class="remark-font" v-if="x.PriceDiscountType == 0">
暂无优惠政策
</div>
</div>
<div v-if="!props.value || props.value.length == 0">
<div class="remark-font">暂无优惠政策</div>
</div>
</q-td>
</template> -->
<template v-slot:body-cell-PreferentialListSellCommission="props">
<q-td :props="props" style="padding-right:0px;padding-left:0px">
<div v-for="x in props.value">
<div class="border-bottom" style="padding-left: 16px;padding-right: 16px"
:class="{ 'text-red': x.SaleCommissionType == 1 }" v-if="x.PriceDiscountType != 0">
{{ x.SaleCommissionType == 1 ? "¥" : ""
}}{{ x.SaleCommissionMoney
}}{{ x.SaleCommissionType == 0 ? "%" : "" }}
</div>
<div v-if="x.PriceDiscountType == 0">
<div class="remark-font">暂无佣金信息</div>
</div>
</div>
<div v-if="!props.value || props.value.length == 0">
<div class="remark-font">暂无佣金信息</div>
</div>
</q-td>
</template>
<template v-slot:body-cell-PreferentialListB2BCommission="props">
<q-td :props="props" style="padding-left:0px">
<div v-for="x in props.value">
<div class="border-bottom" style="padding-left: 16px" :class="{ 'text-red': x.B2BCommissionType == 1 }"
v-if="x.PriceDiscountType != 0">
{{ x.B2BCommissionType == 1 ? "¥" : ""
}}{{ x.B2BCommissionMoney
}}{{ x.B2BCommissionType == 0 ? "%" : "" }}
</div>
<div v-if="x.PriceDiscountType == 0">
<div class="remark-font">暂无佣金信息</div>
</div>
</div>
<div v-if="!props.value || props.value.length == 0">
<div class="remark-font">暂无佣金信息</div>
</div>
</q-td>
</template>
<template v-slot:body-cell-EducationCommission="props">
<q-td :props="props" style="padding-left:0px">
<div v-for="x in props.value">
<div class="border-bottom" style="padding-left: 16px" :class="{ 'text-red': x.EduCommissionType == 1 }"
v-if="x.PriceDiscountType != 0">
{{ x.EduCommissionType == 1 ? "¥" : ""
}}{{ x.EduCommissionMoney
}}{{ x.EduCommissionType == 0 ? "%" : "" }}
</div>
<div v-if="x.PriceDiscountType == 0">
<div class="remark-font">暂无佣金信息</div>
</div>
</div>
<div v-if="!props.value || props.value.length == 0">
<div class="remark-font">暂无佣金信息</div>
</div>
</q-td>
</template>
<template v-slot:body-cell-Status="props">
<q-td :props="props">
<q-badge :color="props.value == 1 ? 'negative' : 'primary'" :label="props.value == 0 ? '正常' : '删除'" />
</q-td>
</template>
<template v-slot:bottom>
<q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="pageCount"
:input="true" @input="changePage" />
</template>
<template v-slot:body-cell-optioned="props">
<q-td :props="props">
<q-btn flat size="xs" icon="iconfont icon-view" color="accent" style="font-weight:400" label="课程详情"
@click="goMycourse(props.row)" />
</q-td>
</template>
</q-table>
</div>
</div>
</template>
<script>
import {
queryCoursePage,
queryCourseCategoryTree,
deleteCourseInfo
} from "../../api/course/index";
import selectTree from "../../components/common/select-tree";
import { openURL } from "quasar";
import {
mapState
} from "vuex";
export default {
meta: {
title: "课程教案"
},
components: {
selectTree
},
data() {
return {
currentUrl: "",
columns: [{
name: "CoverImg",
label: "课程封面",
field: "CoverImg",
align: "left"
},
{
name: "CourseName",
required: true,
label: "课程名称",
align: "left",
field: row => row.CourseName
},
{
name: "CateName",
required: true,
label: "系列",
align: "left",
field: row => row.CateName
},
// {
// name: "PreferentialList",
// required: true,
// label: "优惠政策",
// align: "left",
// field: row => row.PreferentialList
// },
// {
// name: "PreferentialListSellCommission",
// required: true,
// label: "销售佣金",
// align: "left",
// field: row => row.PreferentialList
// },
// {
// name: "PreferentialListB2BCommission",
// required: true,
// label: "同行佣金",
// align: "left",
// field: row => row.PreferentialList
// },
// {
// name: "EducationCommission",
// required: true,
// label: "教育同行佣金",
// align: "left",
// field: row => row.PreferentialList
// },
{
name: "ClassHours",
label: "课时长度",
field: "ClassHours",
align: "left",
format: (val, row) => `${val}课时`
},
{
name: "CreateByName",
label: "创建人",
field: "CreateByName",
align: "left"
},
{
name: "UpdateTimeStr",
label: "更新时间",
field: "UpdateTimeStr",
align: "left"
},
{
name: "Status",
label: "状态",
align: "left",
field: "Status"
},
{
name: "optioned",
label: "操作",
field: "CourseId"
}
],
data: [],
loading: true,
ShowOpts: [{
label: "全部",
value: "-1"
},
{
label: "正常",
value: "0"
},
{
label: "删除",
value: "1"
}
],
msg: {
pageIndex: 1,
pageSize: 12,
rowsPerPage: 12,
CourseName: "",
QCateIds: "",
IsQPrice: 1,
Status: "0"
},
//课程分类树形列表
TreeCategoryList: [],
returnString: [], //默认值
pageCount: 0,
};
},
mounted() {
if(this.$route.query && this.$route.query.Name){//从订单完成统计跳转过来的带的参数
this.msg.CourseName = this.$route.query.Name
}
this.getCategorytree();
this.currentUrl = this.$route.path;
this.getcourselist();
},
methods: {
gotoSub(obj, routeStr) {
var tempStr = "/course/" + routeStr + "?CourseId=" + obj.CourseId;
this.$router.push({
path: tempStr
});
},
//分类改变
getChild(cateObj) {
var tempStr = "";
if (cateObj && cateObj != "") {
tempStr = cateObj;
}
this.msg.QCateIds = tempStr;
this.msg.pageIndex = 1;
this.getcourselist();
},
getCategorytree() {
this.TreeCategoryList = [];
var qMsg = {};
queryCourseCategoryTree(qMsg).then(res => {
this.TreeCategoryList = res.Data;
});
},
//重新查询
resetSearch() {
this.msg.pageIndex = 1;
this.getcourselist();
},
//翻页
changePage(val) {
this.msg.pageIndex = val;
this.getcourselist();
},
//获取菜单分页列表
getcourselist() {
this.loading = true;
queryCoursePage(this.msg)
.then(res => {
this.loading = false;
this.data = res.Data.PageData;
this.pageCount = res.Data.PageCount;
})
.catch(() => {
this.loading = false;
});
},
//跳转至我的课程
goMycourse(obj) {
var tempStr = window.location.origin +"/#/course/courseinfo?CourseId=" + obj.CourseId;
// this.$router.push({
// path: tempStr
// });
openURL(tempStr)
}
}
};
</script>
<style scoped>
.border-bottom {
border-bottom: 1px dashed #EEE;
padding-bottom: 5px;
margin-bottom: 5px;
}
</style>
<style lang="sass">
@import url('~assets/css/table.sass')
</style>
......@@ -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