Commit 85be4f66 authored by 黄奎's avatar 黄奎
parents af175863 36ab9349
...@@ -334,3 +334,13 @@ export function SetClassLessPlan(data) { ...@@ -334,3 +334,13 @@ export function SetClassLessPlan(data) {
  });   });
} }
/**
 * 获取备课模板
 */
export function GetClassLessPlanList(data) {
  return request({
    url: '/Class/GetClassLessPlanList',
    method: 'post',
    data
  });
}
<template>
<q-dialog v-model="persistent" persistent transition-show="scale" transition-hide="scale">
<q-card style="width: 800px;max-width:900px;max-height:450px;">
<q-card-section>
<div class="text-h6">选择模板</div>
</q-card-section>
<el-table ref="multipleTable" :data="tableData" tooltip-effect="dark" highlight-current-row height="300"
style="width: 100%;" @selection-change="handleSelectionChange">
<el-table-column label="操作" width="55">
<template slot-scope="scope">
<el-checkbox v-model="scope.row.checked"></el-checkbox>
        <el-radio v-model="checked" :label="scope.row.ClassPlanId"></el-radio>
</template>
</el-table-column>
<el-table-column label="创建日期" width="200">
<template slot-scope="scope">{{ scope.row.CreateTime }}</template>
</el-table-column>
<el-table-column prop="name" label="模板名称">
<template slot-scope="scope">{{ scope.row.LessonPlan }}</template>
</el-table-column>
</el-table>
<q-card-actions align="right" class="bg-white">
<q-btn label="取消" flat color="grey-10" style="font-weight:400 !important" @click="closeCourseForm" />
<q-btn label="立即提交" color="accent q-px-md" style="font-weight:400 !important" :loading="saveCourseLoading"
@click="saveCourse" />
</q-card-actions>
</q-card>
</q-dialog>
</template>
<script>
import {
GetClassLessPlanList
} from '../../api/course/class'
export default {
data() {
return {
persistent: true,
optionTitle: "",
saveCourseLoading: false,
tableData: [],
checked: null, // 如果使用单选框,定义一个model值
currentSelectItem: {} // 当前选中的值
}
},
mounted() {
this.initObj()
},
methods: {
//初始化表单
initObj() {
GetClassLessPlanList({}).then(res => {
console.log(res, '数据来了');
if (res.Code == 1) {
this.tableData = res.Data;
this.tableData.forEach(x=>{
x.checked = false;
})
}
})
},
handleSelectionChange(row) {
// el-radio单选框,不需要这一步
this.tableData.forEach(item => {
// 排他,每次选择时把其他选项都清除
if (item.ClassPlanId !== row.ClassPlanId) {
item.checked = false
}
})
console.log(row)
// 如果使用单选框,这里可以把当前选中的这一项先保存起来
this.currentSelectItem = row
},
//选择保存
saveCourse() {
},
//关闭弹窗
closeCourseForm() {
this.$emit('close')
this.persistent = false
},
}
}
</script>
<template> <template>
<q-page class="flex flex-center"> <div class="home" >
<!-- <img alt="Quasar logo" src="~assets/quasar-logo-full.svg"> --> <!-- <img alt="Quasar logo" src="~assets/quasar-logo-full.svg"> -->
<div class="box" v-if="AccountType==2 || ispower==true">
<div style="margin: 0 auto;width: 130px;">
<el-tabs v-model="model" >
<el-tab-pane :label="item.label" :name="item.value" :key="item.value" v-for="(item, index) in options"></el-tab-pane>
</el-tabs>
</div>
</div>
<div v-if="model=='one'" class="flex flex-center" style="flex: 1;min-height: 750px">
<img style="width:250px;" alt="Quasar logo" src="../assets/images/logo.png" /> <img style="width:250px;" alt="Quasar logo" src="../assets/images/logo.png" />
</q-page> </div>
<div v-if="model=='two'" style="height: 750px;overflow: auto">
<teachplan></teachplan>
</div>
</div>
</template> </template>
<script> <script>
import teachplan from './course/teacherLesson'
export default { export default {
name: 'PageIndex' components:{
teachplan
},
name: 'PageIndex',
data(){
return{
options:[
{label: 'OKR', value: 'one'},
],
model: 'one',
AccountType:1,
ispower:false,//是否显示备课管理
}
},
created() {
},
mounted() {
let userInfo = this.getLocalStorage();
this.AccountType = userInfo.AccountType
if(userInfo.AccountType && userInfo.AccountType==2){ //是否是教师1不是 2是
this.options=[
{label: 'OKR', value: 'one'},
{label: '备课管理', value: 'two'},
];
}
this.ispower = false;
if(userInfo.MenuList.length>0){
this.getMapList(userInfo.MenuList)//判断菜单权限是否有
}
if(this.ispower==true){
this.options=[
{label: 'OKR', value: 'one'},
{label: '备课管理', value: 'two'},
];
}
},
methods:{
getMapList(list){
list.forEach(x=>{
if(x.MenuUrl == '/course/teacherLesson'){
this.ispower=true
}
if(x.SubList.length>0){
this.getMapList(x.SubList)
}
})
}
}
} }
</script> </script>
<style>
.home .box{
width: 100%;
height: 50px;
}
.home {
margin: 0;
}
::-webkit-scrollbar {
display: none; /* Chrome Safari */
}
.box .el-tabs__header{
margin: 0;
}
</style>
...@@ -81,13 +81,45 @@ ...@@ -81,13 +81,45 @@
text-align: center; text-align: center;
line-height: 30px; line-height: 30px;
border-radius: 50%; border-radius: 50%;
display: inline-block;
cursor: pointer; cursor: pointer;
margin-top:5px; margin-top:5px;
margin-left: 8px;
position: absolute;
right: -10px;
top: -10px;
display: none;
} }
.Less_Delete:hover{ .Less_Delete:hover{
opacity: 0.6; opacity: 0.6;
} }
.w60{
width:60px!important;
}
.lessonPreparation .addbtn{
width: 100%;
height: 45px;
border-radius: 5px;
border: 1px dashed #E2E2E2;
margin-top: 10px;
cursor: pointer;
}
.lessonPreparation .cont{
padding: 1px;
border: 1px dashed #FFF;
position: relative;
}
.lessonPreparation .cont:hover{
border: 1px dashed #E2E2E2;
}
.lessonPreparation .cont .q-gutter-y-xs > *, .q-gutter-xs > *{
margin: 0;
}
.lessonPreparation .cont:hover .Less_Delete{
display: inline-block;
}
.lessonPreparation .edui-editor{
z-index:99!important;
}
</style> </style>
<template> <template>
<div class="page-body lessonPreparation"> <div class="page-body lessonPreparation">
...@@ -96,8 +128,11 @@ ...@@ -96,8 +128,11 @@
<div style="margin:20px 0;"> <div style="margin:20px 0;">
<span class="Less_LeftIcon"></span> <span class="Less_LeftIcon"></span>
教案名称:<el-input v-model="addMsg.LessonPlan" placeholder="教案名称" class="w260"></el-input> 教案名称:<el-input v-model="addMsg.LessonPlan" placeholder="教案名称" class="w260"></el-input>
<span style="margin-left:30px;">第几课:</span> <span style="margin-left:30px;">
<el-input v-model="addMsg.CourseNum" placeholder="第几课" class="w180"></el-input> <el-input v-model="addMsg.CourseNum" style="margin:0 5px;" placeholder="第几课" @keyup.native="checkInteger(addMsg,'CourseNum')" class="w60"></el-input></span>
<span style="float:right;display:inline-block;">
<q-btn color="accent" size="sm" class="q-mr-md" icon="add" label="选择模板" @click="getModule()" />
</span>
</div> </div>
<div style="display:flex;"> <div style="display:flex;">
<div> <div>
...@@ -110,62 +145,98 @@ ...@@ -110,62 +145,98 @@
</div> </div>
</div> </div>
<div class="teach_Content"> <div class="teach_Content">
教案详情 指導内容
</div>
<div class="teach_Lessback">
<q-btn color="accent" size="sm" class="q-mr-md" icon="add" label="新增教案" @click="addPlanList()" />
<!-- <q-btn label="新增教案" color="accent q-px-md" style="font-weight:400 !important" @click="addPlanList()" /> -->
<!-- <span class="add_Lesson" @click="addPlanList()" title="新增教案">
<i class="iconfont icon-add"></i>
</span> -->
</div> </div>
<div style="margin-top:20px;" v-for="(item,index) in addMsg.LessonPlanList"> <div style="" v-for="(item,index) in addMsg.LessonPlanList">
<div class="row" style="width:908px;">
<q-input filled stack-label maxlength="20" v-model="item.CourseName" :dense="false"
class="col-3 q-pr-lg q-pb-lg" label="课程名称" />
<q-input filled stack-label maxlength="50" v-model="item.CourseTitle" :dense="false" <q-input filled stack-label maxlength="50" v-model="item.CourseTitle" :dense="false"
class="col-8 q-pb-lg" label="课程标题" /> class="col-12 q-pb-lg" :label="item.CourseName+'項目'" />
<span class="Less_Delete" style="margin:10px 0 0 20px;" title="删除详情" @click="delLessOne(index)">
<i class="iconfont icon-shanchu"></i>
</span>
</div> </div>
<div class="teach_Lessback" style="min-width:832px;"> <div class="teach_Content">
<span class="add_Lesson" @click="addPlanDetailsList(index)" title="新增教案详情"> 指導項目
<i class="iconfont icon-add"></i> </div>
</span> <div style="" v-for="(item,index) in addMsg.LessonPlanList">
<div style="margin-top: 10px">{{item.CourseName}}</div>
<UeEditor class="col-8" v-model="item.LessonPlanProjectsList[0].ProjectContent" :config="config"></UeEditor>
</div> </div>
<div class="row" v-for="(subItem,subIndex) in item.LessonPlanDetailsList" <div style="" v-for="(item,index) in addMsg.LessonPlanList">
style="margin-top:20px;align-items: self-end;"> <div class="teach_Content">
<UeEditor class="col-8" v-model="subItem.ProjectContent" :config="config"></UeEditor> {{item.CourseName}}上课内容
<q-input filled stack-label maxlength="20" v-model="subItem.Duration" style="margin-left:10px;margin-top:5px;" </div>
:dense="false" class="col-2 q-pr-lg q-pb-lg" label="时长" /> <div class="row q-gutter-xs cont" v-for="(subItem,subIndex) in item.LessonPlanDetailsList"
<span class="Less_Delete" title="删除详情" @click="delLessInfo(index,subIndex)"> style="margin-top:20px;align-items: self-end;width:100%;">
<q-input filled stack-label maxlength="20" v-model="subItem.Duration" @keyup.native="checkInteger(subItem,'Duration')" style="width: 100%;"
:dense="false" class=" " label="时长" suffix="分钟"/>
<UeEditor class="" style="width: 100%;" v-model="subItem.ProjectContent" :config="config"></UeEditor>
<div class="Less_Delete " title="删除详情" @click="delLessInfo(index,subIndex)">
<i class="iconfont icon-shanchu"></i> <i class="iconfont icon-shanchu"></i>
</span>
</div> </div>
<div style="margin-top:20px;border-bottom:1px dashed #d1d1d1;padding-bottom:20px;margin-right:90px;"> </div>
<el-tag :key="tag" style="margin-right:10px;" v-for="tag in item.LessonPlanProjectsList[0].ProjectContentList"
closable :disable-transitions="false" @close="handleClose(tag,index)"> <div class="addbtn flex flex-center" @click="addPlanDetailsList(index)">
{{tag}} <i class="iconfont icon-add"></i>
</el-tag>
<el-input class="input-new-tag w260" v-if="item.isShow" v-model="item.isValue" ref="saveTagInput" size="small"
@keyup.enter.native="handleInputConfirm(item,index)" @blur="handleInputConfirm(item,index)">
</el-input>
<el-button v-else class="button-new-tag" size="small" @click="showInput(item)">
新增教案项目</el-button>
</div> </div>
</div> </div>
<!-- <div class="teach_Content">-->
<!-- 教案详情-->
<!-- </div>-->
<!-- <div class="teach_Lessback">-->
<!-- <q-btn color="accent" size="sm" class="q-mr-md" icon="add" label="新增教案" @click="addPlanList()" />-->
<!-- </div>-->
<!-- <div style="margin-top:20px;" v-for="(item,index) in addMsg.LessonPlanList">-->
<!-- <div class="row" style="width:908px;">-->
<!-- <q-input filled stack-label maxlength="20" v-model="item.CourseName" :dense="false"-->
<!-- class="col-3 q-pr-lg q-pb-lg" label="课程名称" />-->
<!-- <q-input filled stack-label maxlength="50" v-model="item.CourseTitle" :dense="false"-->
<!-- class="col-8 q-pb-lg" label="课程标题" />-->
<!-- <span class="Less_Delete" style="margin:10px 0 0 20px;" title="删除详情" @click="delLessOne(index)">-->
<!-- <i class="iconfont icon-shanchu"></i>-->
<!-- </span>-->
<!-- </div>-->
<!-- <div class="teach_Lessback" style="min-width:832px;">-->
<!-- <span class="add_Lesson" @click="addPlanDetailsList(index)" title="新增教案详情">-->
<!-- <i class="iconfont icon-add"></i>-->
<!-- </span>-->
<!-- </div>-->
<!-- <div class="row" v-for="(subItem,subIndex) in item.LessonPlanDetailsList"-->
<!-- style="margin-top:20px;align-items: self-end;width:908px;">-->
<!-- <UeEditor class="col-8" v-model="subItem.ProjectContent" :config="config"></UeEditor>-->
<!-- <q-input filled stack-label maxlength="20" v-model="subItem.Duration" @keyup.native="checkInteger(subItem,'Duration')" style="margin-left:10px;margin-top:5px;"-->
<!-- :dense="false" class="col-2 q-pr-lg q-pb-lg" label="时长" />-->
<!-- <span class="Less_Delete" title="删除详情" @click="delLessInfo(index,subIndex)">-->
<!-- <i class="iconfont icon-shanchu"></i>-->
<!-- </span>-->
<!-- </div>-->
<!-- <div style="margin-top:20px;border-bottom:1px dashed #d1d1d1;padding-bottom:20px;margin-right:90px;">-->
<!-- <el-tag :key="tag" style="margin-right:10px;" v-for="tag in item.LessonPlanProjectsList[0].ProjectContentList"-->
<!-- closable :disable-transitions="false" @close="handleClose(tag,index)">-->
<!-- {{tag}}-->
<!-- </el-tag>-->
<!-- <el-input class="input-new-tag w260" v-if="item.isShow" v-model="item.isValue" ref="saveTagInput" size="small"-->
<!-- @keyup.enter.native="handleInputConfirm(item,index)" @blur="handleInputConfirm(item,index)">-->
<!-- </el-input>-->
<!-- <el-button v-else class="button-new-tag" size="small" @click="showInput(item)">-->
<!-- 新增教案项目</el-button>-->
<!-- </div>-->
<!-- </div>-->
<div style="margin-top:30px;"> <div style="margin-top:30px;">
<span class="beikeModule" @click="saveInfo(1)">存为模板</span> <span class="beikeModule" @click="saveInfo(1)">存为模板</span>
<q-btn label="提交" size="md" color="accent q-px-md" @click="saveInfo()" /> <q-btn label="提交" size="md" color="accent q-px-md" @click="saveInfo()" />
<!-- <span class="beikeBtn" @click="saveInfo(0)">提交</span> -->
</div> </div>
<lessoncheck-form v-if="IsShowLessForm" @close="closeTeachSaveForm"
@success="refreshPage">
</lessoncheck-form>
</div> </div>
</div> </div>
</template> </template>
<script> <script>
import UeEditor from '../../components/editor/UeEditor' import UeEditor from '../../components/editor/UeEditor'
import lessoncheckForm from '../../components/course/lessoncheck-form'
import { import {
SetClassLessPlan, SetClassLessPlan,
GetClassLessPlan GetClassLessPlan
...@@ -176,7 +247,8 @@ ...@@ -176,7 +247,8 @@
}, },
props: {}, props: {},
components: { components: {
UeEditor UeEditor,
lessoncheckForm
}, },
data() { data() {
return { return {
...@@ -200,8 +272,7 @@ ...@@ -200,8 +272,7 @@
initialFrameWidth: null, initialFrameWidth: null,
initialFrameHeight: 150, initialFrameHeight: 150,
}, },
inputVisible: false, IsShowLessForm: false,
inputValue: ''
} }
}, },
created() {}, created() {},
...@@ -229,6 +300,11 @@ ...@@ -229,6 +300,11 @@
this.addMsg.LessonPlanList = []; this.addMsg.LessonPlanList = [];
} else { } else {
this.addMsg.LessonPlanList = data.LessonPlanList; this.addMsg.LessonPlanList = data.LessonPlanList;
this.addMsg.LessonPlanList.forEach(x=>{
x.LessonPlanProjectsList.push({
ProjectContent:''
})
})
} }
this.TeacherName = data.TeacherName; this.TeacherName = data.TeacherName;
this.WorkDate = data.WorkDate; this.WorkDate = data.WorkDate;
...@@ -273,6 +349,7 @@ ...@@ -273,6 +349,7 @@
Duration: '' Duration: ''
} }
this.addMsg.LessonPlanList[index].LessonPlanDetailsList.push(obj); this.addMsg.LessonPlanList[index].LessonPlanDetailsList.push(obj);
console.log(this.addMsg.LessonPlanList)
}, },
//删除教案详情 //删除教案详情
delLessInfo(index,subIndex){ delLessInfo(index,subIndex){
...@@ -282,6 +359,18 @@ ...@@ -282,6 +359,18 @@
delLessOne(index){ delLessOne(index){
this.addMsg.LessonPlanList.splice(index,1); this.addMsg.LessonPlanList.splice(index,1);
}, },
//关闭弹窗
closeTeachSaveForm() {
this.IsShowLessForm = false
},
//选择模板
getModule(){
this.IsShowLessForm=true;
},
//获取选择模板数据
refreshPage(val){
console.log(val,'val');
},
//提交 //提交
saveInfo(num) { saveInfo(num) {
this.addMsg.IsTemplate = num; this.addMsg.IsTemplate = num;
......
...@@ -79,6 +79,9 @@ ...@@ -79,6 +79,9 @@
font-size: 12px; font-size: 12px;
color: #111111; color: #111111;
} }
.prepareclassDetails .text12-o p{
margin:0;
}
.prepareclassDetails .text12-n{ .prepareclassDetails .text12-n{
font-size: 12px; font-size: 12px;
color: #999999; color: #999999;
...@@ -131,7 +134,7 @@ ...@@ -131,7 +134,7 @@
<div class="text-title">指導内容</div> <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="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 width70">{{item.CourseName}}</div>
<div class="text12-o " style="flex:1">{{item.CourseTitle}}</div> <div class="text14-o " style="flex:1">{{item.CourseTitle}}</div>
</div> </div>
</div> </div>
...@@ -139,7 +142,13 @@ ...@@ -139,7 +142,13 @@
<div class="text-title">指導項目</div> <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="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 width70">{{item.CourseName}}</div>
<div class="text12-o" style="flex:1" v-for="(x,y) in item.LessonPlanProjectsList" :key="y">{{x.ProjectContent}}</div> <!-- <div class="text12-o" style="margin-right:10px;" v-for="(x,y) in item.LessonPlanProjectsList[0].ProjectContentList" :key="y">{{x}}</div>-->
<div class="text14-o" style="flex:1" v-for="(x,y) in item.LessonPlanProjectsList" :key="y" >
<div v-for="(xx,yy) in x.ProjectContentList" :key="yy">
{{yy+1}}{{xx}}
</div>
</div>
</div> </div>
</div> </div>
...@@ -147,10 +156,11 @@ ...@@ -147,10 +156,11 @@
<div class="text-title">上课内容</div> <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="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 width70">{{item.CourseName}}</div>
<div class="text12-o" style="flex:1"> <div class="text14-o" style="flex:1">
<div class="column" v-for="(x,y) in item.LessonPlanDetailsList" :key="y"> <div class="column" v-for="(x,y) in item.LessonPlanDetailsList" :key="y">
<div class="text14-l">{{x.Duration}}分钟-{{x.DurationEndTime}}</div> <div class="text14-l">{{x.Duration}}分钟-{{x.DurationEndTime}}</div>
<div class="text12-o">{{x.ProjectContent}}</div> <div class="text14-o" v-html="x.ProjectContent"></div>
<div style="width: 100%;background: #F0F5FB;border-radius: 5px;margin: 10px 0"> <div style="width: 100%;background: #F0F5FB;border-radius: 5px;margin: 10px 0">
<q-input <q-input
...@@ -169,7 +179,7 @@ ...@@ -169,7 +179,7 @@
</div> </div>
</div> </div>
</div> </div>
<q-btn color="accent" size="sm" class="q-mr-md marginl-15 margint-15" label="提交" @click="saveOrderInfo()" :loading="Dloading" /> <q-btn color="accent" size="sm" class="q-mr-md marginl-15 margint-15" label="提交" @click="saveOrderInfo()" :loading="Dloading" v-if="AccountType==false"/>
</div> </div>
...@@ -263,7 +273,7 @@ ...@@ -263,7 +273,7 @@
}, },
data:{}, data:{},
CommentList:[], CommentList:[],
AccountType:false AccountType:true
} }
}, },
created(){ created(){
......
...@@ -382,7 +382,6 @@ ...@@ -382,7 +382,6 @@
var Str = ''; var Str = '';
this.dataList.forEach(x=>{ this.dataList.forEach(x=>{
if(parseInt(x.DateDay)==parseInt(num)){ if(parseInt(x.DateDay)==parseInt(num)){
console.log(x.IsLessonStatus);
if(x.IsLessonStatus==0){ if(x.IsLessonStatus==0){
Str='未备课' Str='未备课'
} }
......
...@@ -670,7 +670,7 @@ ...@@ -670,7 +670,7 @@
</p> </p>
</template> </template>
<p> <p>
集团名称<span class="_r_name _jump_page">{{emplyeeName}}</span> 业务员<span class="_r_name _jump_page">{{emplyeeName}}</span>
</p> </p>
</div> </div>
<div class="_explain"> <div class="_explain">
...@@ -1961,7 +1961,7 @@ ...@@ -1961,7 +1961,7 @@
let userInfo = this.getLocalStorage(); let userInfo = this.getLocalStorage();
this.department = userInfo.DeptName; this.department = userInfo.DeptName;
this.EmployeeId = userInfo.Id; this.EmployeeId = userInfo.Id;
this.emplyeeName = userInfo.GroupName; this.emplyeeName = userInfo.AccountName;
this.DepartIDs = this.msg.RB_Depart_Id = userInfo.DeptId; this.DepartIDs = this.msg.RB_Depart_Id = userInfo.DeptId;
this.RB_Branch_id = this.departmentMsg.RB_Branch_Id = this.msg.RB_Branch_Id = userInfo.School_Id; this.RB_Branch_id = this.departmentMsg.RB_Branch_Id = this.msg.RB_Branch_Id = userInfo.School_Id;
this.companyMsg.RB_Group_Id = this.departmentMsg.RB_Group_Id = userInfo.Group_Id; this.companyMsg.RB_Group_Id = this.departmentMsg.RB_Group_Id = userInfo.Group_Id;
......
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