Commit 85be4f66 authored by 黄奎's avatar 黄奎
parents af175863 36ab9349
......@@ -333,4 +333,14 @@ export function SetClassLessPlan(data) {
    data
  });
}
\ No newline at end of file
/**
 * 获取备课模板
 */
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>
<q-page class="flex flex-center">
<div class="home" >
<!-- <img alt="Quasar logo" src="~assets/quasar-logo-full.svg"> -->
<img style="width:250px;" alt="Quasar logo" src="../assets/images/logo.png" />
</q-page>
<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" />
</div>
<div v-if="model=='two'" style="height: 750px;overflow: auto">
<teachplan></teachplan>
</div>
</div>
</template>
<script>
import teachplan from './course/teacherLesson'
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>
<style>
.home .box{
width: 100%;
height: 50px;
}
.home {
margin: 0;
}
::-webkit-scrollbar {
display: none; /* Chrome Safari */
}
.box .el-tabs__header{
margin: 0;
}
</style>
This diff is collapsed.
......@@ -79,6 +79,9 @@
font-size: 12px;
color: #111111;
}
.prepareclassDetails .text12-o p{
margin:0;
}
.prepareclassDetails .text12-n{
font-size: 12px;
color: #999999;
......@@ -131,7 +134,7 @@
<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-o " style="flex:1">{{item.CourseTitle}}</div>
<div class="text14-o " style="flex:1">{{item.CourseTitle}}</div>
</div>
</div>
......@@ -139,7 +142,13 @@
<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-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>
......@@ -147,10 +156,11 @@
<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-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="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">
<q-input
......@@ -169,7 +179,7 @@
</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>
......@@ -263,7 +273,7 @@
},
data:{},
CommentList:[],
AccountType:false
AccountType:true
}
},
created(){
......
......@@ -382,7 +382,6 @@
var Str = '';
this.dataList.forEach(x=>{
if(parseInt(x.DateDay)==parseInt(num)){
console.log(x.IsLessonStatus);
if(x.IsLessonStatus==0){
Str='未备课'
}
......
......@@ -670,7 +670,7 @@
</p>
</template>
<p>
集团名称<span class="_r_name _jump_page">{{emplyeeName}}</span>
业务员<span class="_r_name _jump_page">{{emplyeeName}}</span>
</p>
</div>
<div class="_explain">
......@@ -1961,7 +1961,7 @@
let userInfo = this.getLocalStorage();
this.department = userInfo.DeptName;
this.EmployeeId = userInfo.Id;
this.emplyeeName = userInfo.GroupName;
this.emplyeeName = userInfo.AccountName;
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.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