Commit 22452e13 authored by Mac's avatar Mac
parents a99709a3 dfb310e2
......@@ -69,3 +69,47 @@ export function RemoveClassPlan(data) {
});
}
/**
* 学员退课
*/
export function StudentDropOut(data) {
return request({
url: '/Class/UpdateClassStudentDropOut',
method: 'post',
data
});
}
/**
* 获取学员下拉数据
*/
export function GetStudentList(data) {
return request({
url: '/class/GetStudentList',
method: 'post',
data
});
}
/**
* 邀请学员
*/
export function AddClassStudent(data) {
return request({
url: '/class/AddClassStudent',
method: 'post',
data
});
}
/**
* 获取签到列表数据
*/
export function GetClassPlanLogPageList(data) {
return request({
url: '/class/GetClassPlanLogPageList',
method: 'post',
data
});
}
......@@ -233,7 +233,15 @@
</q-select>
</div>
</div>
<div class="row wrap" v-if="objOption.ClassStyle==2||objOption.ClassStyle==3">
<div class="row wrap" v-if="objOption.ClassStyle==2">
<div class="col-12">
<q-select filled stack-label multiple option-value="value" option-label="label" v-model="checkedDays"
ref="ClassStyle" :options="dayList" label="选择日期" :dense="false" class="col-6 q-pr-lg q-pr-lg" emit-value
map-options>
</q-select>
</div>
</div>
<div class="row wrap" v-if="objOption.ClassStyle==3">
<div class="col-12">
<q-date v-model="checkedDays" minimal multiple style="width:100%" />
</div>
......@@ -347,6 +355,7 @@
SchoolList: [], //关联校区下拉数据
ClassRoomList: [], //教室下拉数据
ladderPriceList: [], //阶梯定价数组
dayList: [], //日期数组1-31
//上课设置
classSetList: [{
Name: '按周排课',
......@@ -408,6 +417,7 @@
}
},
created() {
this.initDayList();
this.getSchool();
this.CourseList();
this.getClassRoomList();
......@@ -417,6 +427,16 @@
this.initObj()
},
methods: {
//初始化日期-天
initDayList() {
this.dayList = [];
for (var i = 1; i <= 31; i++) {
this.dayList.push({
label: i,
value: i,
});
}
},
//下拉选择改变
changeClassStyle(style) {
this.checkedDays = [];
......
......@@ -34,6 +34,10 @@
.classinfo_Dialog .normalInner {
color: #111111;
}
.drop_NameDown{
margin-top:20px;
width:300px;
}
</style>
<template>
<q-dialog v-model="persistent" maximized full-height seamless position="right" @hide="closeShenheForm">
......@@ -85,11 +89,55 @@
</q-tabs>
<div v-if="tabCheck=='first'" style="margin:0 15px;">
<div style="text-align:right;">
<q-btn outline color="black" label="退课" size="12px" style="margin-right:20px;" />
<q-btn color="primary" class="q-mr-md" size="12px" icon="add" label="邀请新学员" />
<q-btn outline color="black" label="退课" @click="dropClass()" size="12px" style="margin-right:20px;">
<q-popup-proxy>
<q-banner v-if="isShowDropPop">
<div class="dropClassDialog">
<div style="margin:10px 0 15px 0;">退课</div>
</div>
<q-input square filled v-model="dropMsg.DropOutRemark" borderless label="退课原因" ref="reason" type="textarea" counter
:rules="[val => !!val || '请填写退课原因']" maxlength="200" />
<div class="drop_NameDown">
<q-chip v-for="item in selectedStudent">
<q-avatar rounded size="sm" v-if="item.UserIcon">
<img :src="item.UserIcon" />
</q-avatar>
<q-avatar rounded size="sm" color="teal-10" text-color="white" v-if="!item.UserIcon">
{{item.GuestName[0]}}</q-avatar>
{{item.GuestName}}
</q-chip>
</div>
<q-card-actions align="right" class="bg-white">
<q-btn label="取消" flat color="grey-10"
style="font-weight:400 !important" @click="isShowDropPop=false" />
<q-btn label="确认" color="accent q-px-md" style="font-weight:400 !important"
@click="saveDrop()" />
</q-card-actions>
</q-banner>
</q-popup-proxy>
</q-btn>
<q-btn color="primary" class="q-mr-md" size="12px" icon="add" label="邀请新学员" @click="ishowInvit=true">
<q-popup-proxy>
<q-banner v-if="ishowInvit">
<div class="dropClassDialog">
<div style="margin:10px 0 15px 0;">邀请新学员</div>
</div>
<div class="drop_NameDown">
<q-select standout="bg-primary text-white" v-model="checkedStudent" :options="InvitationList"
option-value="StuId" option-label="StuName" label="选择学员" />
</div>
<q-card-actions align="right" class="bg-white" style="margin-top:20px;">
<q-btn label="取消" flat color="grey-10"
style="font-weight:400 !important" @click="ishowInvit=false" />
<q-btn label="确认" color="accent q-px-md" style="font-weight:400 !important"
@click="saveStudent()" />
</q-card-actions>
</q-banner>
</q-popup-proxy>
</q-btn>
</div>
<q-table :loading="loading" no-data-label="暂无相关数据" flat selection="multiple"
:selected.sync="selected" class="sticky-right-column-table sticky-tow-column-table" separator="none"
:selected.sync="selectedStudent" class="sticky-column-table" separator="none"
title="学员信息" :data="studentList" :columns="columns" hide-bottom row-key="Id">
<template v-slot:body-cell-IsRenew="props">
<q-td auto-width :props="props">
......@@ -102,6 +150,9 @@
<div v-if="tabCheck=='second'">
        <lessForm :seting-obj="setingObj"></lessForm>
      </div>
<div v-if="tabCheck=='third'">
<recordForm :seting-obj="setingObj"></recordForm>
</div>
</q-card>
<div class="dialog-out-close" @click="closeShenheForm"
style="height:40px !important;border-top-left-radius: 4px !important;border-bottom-left-radius: 4px !important;">
......@@ -113,8 +164,12 @@
<script>
import {
queryClassStudent,
StudentDropOut,
GetStudentList,
AddClassStudent
} from '../../api/course/class';
import lessForm from '../course/lesson-form';
import recordForm from '../course/record-form';
export default {
props: {
setingObj: {
......@@ -123,7 +178,8 @@
}
},
components: {
lessForm
lessForm,
recordForm
},
data() {
return {
......@@ -183,14 +239,32 @@
},
studentList: [], //学员信息数据
selected: [], //选中
selectedStudent: [], //选中
dropMsg:{
ClassId:0, //班级id
Ids:'', //学员id
DropOutRemark:'', //退课原因
StudentName:'' //学员名称
},
isShowDropPop:false,
ishowInvit:false,
invitationMsg:{
ClassId:0, //班级id
GuestName:'', //学员名称
Sex:'', //性别
Mobile:'', //手机号
BirthDay:'' //生日
},
InvitationList:[], //学员下拉数据
checkedStudent:'', //选择学员
}
},
created() {
this.getStudentData();
},
mounted() {
console.log("aaa", this.setingObj);
this.getStudentList();
},
methods: {
closeShenheForm() {
......@@ -214,6 +288,81 @@
}
return (Math.round(num / total * 100) / 100.00);
},
//退课
dropClass(){
if(this.selectedStudent.length==0){
this.$q.notify({
type: 'negative',
position: "top",
message: `请选择退课学员`
})
return;
}else{
this.isShowDropPop=true;
}
},
//保存退课信息
saveDrop(){
if(this.selectedStudent.length==0){
this.$q.notify({
type: 'negative',
position: "top",
message: `请选择退课学员`
})
return;
}else{
this.dropMsg.ClassId = this.setingObj.ClassId;
let StuArr = [];
let StrName = [];
this.selectedStudent.forEach(x=>{
StuArr.push(x.Id);
StrName.push(x.GuestName);
})
this.dropMsg.Ids = StuArr.toString();
this.dropMsg.StudentName = StrName.toString();
StudentDropOut(this.dropMsg).then(res => {
if (res.Code == 1) {
this.isShowDropPop = false;
this.dropMsg.DropOutRemark='';
this.selectedStudent=[];
this.getStudentData();
}
})
}
},
//获取学员下拉信息
getStudentList(){
GetStudentList({
SchoolId: this.setingObj.School_Id
}).then(res => {
if (res.Code == 1) {
this.InvitationList = res.Data;
}
})
},
//保存邀请新学员保存
saveStudent(){
if(this.checkedStudent==''){
this.$q.notify({
type: 'negative',
position: "top",
message: `请选择学员`
})
return;
}else{
this.invitationMsg.ClassId = this.setingObj.ClassId;
this.invitationMsg.GuestName = this.checkedStudent.StuName;
this.invitationMsg.Sex = this.checkedStudent.StuSex;
this.invitationMsg.Mobile = this.checkedStudent.StuTel;
this.invitationMsg.BirthDay = this.checkedStudent.StuBirthStr;
AddClassStudent(this.invitationMsg).then(res => {
if (res.Code == 1) {
this.ishowInvit = false;
this.getStudentData();
}
})
}
}
},
}
......
......@@ -89,12 +89,20 @@
}
.StudentInfo_List{
display: flex;
width:80%;
margin:auto;
justify-content: space-between;
}
.Show_SignBack{
margin:20px;
color:#2961FE;
}
.Lessicon_Edit:hover{
color:red;
}
.Less_Close:hover{
color:red;
}
</style>
<template>
<div v-if="!isShowSign">
......@@ -168,7 +176,7 @@
<div class="calendarTop">
<div>{{item.RoomName}}</div>
<div>
<i class="iconfont icon-edit" @click.stop="getInfo(item)">
<i class="iconfont icon-edit Lessicon_Edit" @click.stop="getInfo(item)">
<q-popup-proxy>
<q-banner v-if="isShowEdit">
<div class="calenderDialog">
......@@ -227,7 +235,7 @@
</q-banner>
</q-popup-proxy>
</i>
<i class="iconfont icon-guanbi" style="margin-left:5px;" @click.stop="delInfo(item)"></i>
<i class="iconfont icon-guanbi Less_Close" style="margin-left:5px;" @click.stop="delInfo(item)"></i>
</div>
</div>
<div class="calendarInner">
......@@ -254,7 +262,9 @@
</div>
<div v-else>
<div>
<div class="Show_SignBack" @click="isShowSign=false"><i class="iconfont icon-zuo1"></i>返回</div>
<div class="Show_SignBack">
<span @click="isShowSign=false" style="cursor:pointer;"><i class="iconfont icon-zuo1"></i>返回</span>
</div>
<div class="StudentInfo_List">
<div>
<div>授课老师</div>
......
<style>
#timeleft div {
height: 65px;
color: #333333;
}
#timecenter div {
height: 65px;
color: #333333;
}
#timeright div {
height: 65px;
color: #333333;
}
#timeright div p {
margin: 0 0 0px;
}
.cicle1 {
position: absolute;
top: 0px;
left: -10px;
border-radius: 10px;
list-style: none;
width: 20px;
height: 20px;
border: 1px solid #cccccc;
background: #ffffff;
}
.cicle2 {
position: absolute;
top: 70px;
left: -10px;
border-radius: 10px;
list-style: none;
width: 20px;
height: 20px;
border: 1px solid #cccccc;
background: #ffffff;
}
.cicle3 {
position: absolute;
top: 140px;
left: -10px;
border-radius: 10px;
list-style: none;
width: 20px;
height: 20px;
border: 1px solid #cccccc;
background: #ffffff;
}
.cicle4 {
position: absolute;
top: 210px;
left: -10px;
border-radius: 10px;
list-style: none;
width: 20px;
height: 20px;
border: 1px solid #cccccc;
background: #ffffff;
}
</style>
<template>
<div class="page-body">
<div class="page-content">
<div class="row wrap" style="display:flex;justify-content:flex-end">
<div class="col-3">
<q-select filled stack-label option-value="TId" @input="GetTeacherList()" option-label="TeacherName"
v-model="msg.TeacherId" ref="Teacher_Id" :options="TeacherList" label="关联教师" :dense="false"
class="col-6 q-pr-lg q-pb-lg" emit-value map-options />
</div>
</div>
<div>
<!-- <div class="q-px-lg q-pb-md">
<q-timeline color="secondary">
<q-timeline-entry :title="item.TeacherName" subtitle="February 22, 1986" v-for="item in dataList.resultList"
avatar="张" :body="body" />
</q-timeline>
</div> -->
<div class="col-10" style="margin-top:30px;display:flex;">
<div class="col-4" id="timeleft">
<div v-for="item in dataList.resultList">
{{item.YearStr}}-{{item.MonthStr}}-{{item.DayStr}}
</div>
</div>
<div class="col-4" id="timecenter">
<div style="height:70px; border-left:1px solid #366595; position:absolute; left:130px;">
<ul>
<!-- <li class="cicle1" v-for="item in dataList.resultList">
{{getFirst(item.TeacherName)}}
</li> -->
<li class="cicle1"></li>
<li class="cicle2"></li>
</ul>
</div>
</div>
<div class="col-4" id="timeright" style="margin-left:50px;">
<div v-for="item in dataList.resultList">
<p>{{item.TeacherName}}</p>
<p>学习1小时</p>
</div>
</div>
</div>
</div>
</div>
</div>
</template>
<script>
import {
getTeacherDropDownList
} from '../../api/school/index'
import {
GetClassPlanLogPageList
} from '../../api/course/class'
export default {
props: {
setingObj: {
type: Object,
default: null
}
},
components: {
},
data() {
return {
msg: {
TeacherId: 0,
PageIndex: 1,
PageSize: 12,
School_Id: 0,
ClassId: 0
},
dataList: {},
TeacherList: [], //关联老师下拉
body:'123'
}
},
created() {
this.msg.School_Id = this.setingObj.School_Id;
this.msg.ClassId = this.setingObj.ClassId;
this.getRecord();
},
mounted() {
this.GetTeacherList();
console.log(this.setingObj, 'setingObj');
},
methods: {
getRecord() {
GetClassPlanLogPageList(this.msg).then(res => {
if (res.Code == 1) {
console.log(res, '数据');
this.dataList = res.Data.PageData;
}
})
},
//获取教师下拉
GetTeacherList() {
getTeacherDropDownList({}).then(res => {
if (res.Code == 1) {
var obj = {
TId: 0,
TeacherName: '全部老师'
}
this.TeacherList = res.Data;
this.TeacherList.unshift(obj);
console.log(res, '数据');
}
})
},
getFirst(val){
if (val) {
return val.substr(0, 1);
}
}
},
}
</script>
<style lang="sass">
@import url('~assets/css/table.sass');
</style>
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