Commit 9c594f54 authored by 黄奎's avatar 黄奎

页面修改

parent c99aaf7a
......@@ -90,65 +90,11 @@
<q-tab :ripple="false" name="fourth" label="班级日志" />
</q-tabs>
<div v-if="tabCheck=='first'" style="margin:0 15px;">
<div style="text-align:right;">
<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,index) in selectedStudent" :key="index">
<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="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">
<span style="color:red;" v-if="props.row.IsRenew==0"></span>
<span style="color:green;" v-if="props.row.IsRenew==1"></span>
</q-td>
</template>
</q-table>
 <classstuForm :seting-obj="setingObj"></classstuForm>
</div>
<div v-if="tabCheck=='second'">
 <lessForm :seting-obj="setingObj"></lessForm>
 </div>
</div>
<div v-if="tabCheck=='third'">
<recordForm :seting-obj="setingObj"></recordForm>
</div>
......@@ -164,15 +110,10 @@
</template>
<script>
import {
queryClassStudent,
StudentDropOut,
GetStudentList,
AddClassStudent
} from '../../api/course/class';
import lessForm from '../course/lesson-form';
import recordForm from '../course/record-form';
import classlogForm from '../course/classlog-form';
import classstuForm from '../course/classstu-form';
export default {
props: {
setingObj: {
......@@ -183,110 +124,27 @@
components: {
lessForm,
recordForm,
classlogForm
classlogForm,
classstuForm
},
data() {
return {
persistent: true,
tabCheck: 'first', //默认选第一个
columns: [{
name: 'GuestName',
label: '姓名',
field: 'GuestName',
align: 'left',
},
{
name: 'SexStr',
label: '性别',
field: 'SexStr',
align: 'left',
},
{
name: 'Age',
label: '年龄',
field: 'Age',
align: 'left',
},
{
name: 'ClassHours',
label: '上课课时',
field: 'ClassHours',
align: 'left',
},
{
name: 'CreateTimeStr',
label: '加入时间',
field: 'CreateTimeStr',
align: 'left'
},
{
name: 'Mobile',
label: '联系电话',
align: 'left',
field: 'Mobile'
},
{
name: 'OrderId',
label: '关联订单',
field: 'OrderId',
align: 'left'
},
{
name: 'IsRenew',
label: '续费课程',
field: 'IsRenew',
align: 'left'
}
],
loading: false,
stuMsg: {
},
studentList: [], //学员信息数据
selectedStudent: [], //选中
dropMsg: {
ClassId: 0, //班级id
Ids: '', //学员id
DropOutRemark: '', //退课原因
StudentName: '' //学员名称
},
isShowDropPop: false,
ishowInvit: false,
invitationMsg: {
ClassId: 0, //班级id
GuestName: '', //学员名称
Sex: '', //性别
Mobile: '', //手机号
BirthDay: '', //生日
StudentId: 0
},
InvitationList: [], //学员下拉数据
checkedStudent: '', //选择学员
}
},
created() {
this.getStudentData();
},
mounted() {
this.getStudentList();
},
methods: {
closeShenheForm() {
this.persistent = false;
this.$emit('close');
},
//获取学员信息
getStudentData() {
queryClassStudent({
ClassId: this.setingObj.ClassId,
School_Id: this.setingObj.School_Id
}).then(res => {
if (res.Code == 1) {
this.studentList = res.Data;
}
})
},
//获取进度条
getProgress(num, total) {
if (num == 0 || total == 0) {
......@@ -294,88 +152,7 @@
}
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;
this.invitationMsg.StudentId = this.checkedStudent.StuId;
this.invitationMsg.School_Id = this.setingObj.School_Id;
AddClassStudent(this.invitationMsg).then(res => {
if (res.Code == 1) {
this.ishowInvit = false;
this.getStudentData();
}
})
}
}
},
}
}
</script>
<style>
</style>
......@@ -79,7 +79,6 @@
getClassLog() {
queryClassLogPageList(this.msg).then(res => {
if (res.Code == 1) {
console.log("res", res.Data);
this.dataList = res.Data.PageData;
}
})
......
<template>
<div>
<div style="text-align:right;">
<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,index) in selectedStudent" :key="index">
<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="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">
<span style="color:red;" v-if="props.row.IsRenew==0"></span>
<span style="color:green;" v-if="props.row.IsRenew==1"></span>
</q-td>
</template>
</q-table>
</div>
</template>
<script>
import {
queryClassStudent,
StudentDropOut,
GetStudentList,
AddClassStudent
} from '../../api/course/class';
export default {
props: {
setingObj: {
type: Object,
default: null
}
},
data() {
return {
loading: false, //加载
columns: [{
name: 'GuestName',
label: '姓名',
field: 'GuestName',
align: 'left',
},
{
name: 'SexStr',
label: '性别',
field: 'SexStr',
align: 'left',
},
{
name: 'Age',
label: '年龄',
field: 'Age',
align: 'left',
},
{
name: 'ClassHours',
label: '上课课时',
field: 'ClassHours',
align: 'left',
},
{
name: 'CreateTimeStr',
label: '加入时间',
field: 'CreateTimeStr',
align: 'left'
},
{
name: 'Mobile',
label: '联系电话',
align: 'left',
field: 'Mobile'
},
{
name: 'OrderId',
label: '关联订单',
field: 'OrderId',
align: 'left'
},
{
name: 'IsRenew',
label: '续费课程',
field: 'IsRenew',
align: 'left'
}
],
stuMsg: {
},
studentList: [], //学员信息数据
selectedStudent: [], //选中
dropMsg: {
ClassId: 0, //班级id
Ids: '', //学员id
DropOutRemark: '', //退课原因
StudentName: '' //学员名称
},
isShowDropPop: false,
ishowInvit: false,
invitationMsg: {
ClassId: 0, //班级id
GuestName: '', //学员名称
Sex: '', //性别
Mobile: '', //手机号
BirthDay: '', //生日
StudentId: 0
},
InvitationList: [], //学员下拉数据
checkedStudent: '', //选择学员
}
},
created() {
this.getStudentData();
this.getStudentList();
},
mounted() {},
methods: {
//获取学员信息
getStudentData() {
queryClassStudent({
ClassId: this.setingObj.ClassId,
School_Id: this.setingObj.School_Id
}).then(res => {
if (res.Code == 1) {
this.studentList = res.Data;
}
})
},
//获取学员信息
getStudentData() {
queryClassStudent({
ClassId: this.setingObj.ClassId,
School_Id: this.setingObj.School_Id
}).then(res => {
if (res.Code == 1) {
this.studentList = res.Data;
}
})
},
//退课
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;
this.invitationMsg.StudentId = this.checkedStudent.StuId;
this.invitationMsg.School_Id = this.setingObj.School_Id;
AddClassStudent(this.invitationMsg).then(res => {
if (res.Code == 1) {
this.ishowInvit = false;
this.getStudentData();
}
})
}
}
},
}
</script>
......@@ -456,8 +456,6 @@
this.getClassRoomList();
this.addMsg.TeacherId = this.setingObj.Teacher_Id;
this.addMsg.ClassDate = this.setingObj.OpenTime;
console.log(this.setingObj, 'setingObj');
},
methods: {
//获取第一个字
......
......@@ -242,8 +242,6 @@
},
created() {},
mounted() {
console.log("aaa", this.saveObj);
// this.Post_Id = this.saveObj.Post_Id
this.queryPostList();
this.getDepartList();
},
......
......@@ -153,7 +153,6 @@
if (res.Code == 1) {
this.remarkList = res.Data.PageData;
this.pageCount = res.Data.PageCount
console.log("res", res);
}
})
}
......
......@@ -140,7 +140,6 @@
queryEmployeeInfo(this.qMsg).then(res => {
if (res.Code == 1) {
this.empData = res.Data;
console.log("this.empData", this.empData);
}
})
}
......
......@@ -74,7 +74,6 @@
queryEmpChangeLog(this.qMsg).then(res => {
if (res.Code == 1) {
this.LogList = res.Data;
console.log(this.LogList,'lolist');
}
});
}
......
......@@ -191,7 +191,6 @@
},
methods: {
gotoOrder(item) {
console.log("item", item);
var tempStr = '/course/classorder?ClassId=' + item.ClassId;
this.$router.push({
path: tempStr
......
......@@ -75,7 +75,6 @@
if (this.data && this.data.OrderList && this.data.OrderList.CancelList) {
this.CancelList = this.data.OrderList.CancelList;
}
console.log("data", this.data);
}).catch(() => {
this.loading = false
})
......
......@@ -115,7 +115,6 @@ export default {
},
methods: {
gologin() {
console.log('aaaaa')
this.isLogining = true
this.$refs.account.validate()
this.$refs.pwd.validate()
......@@ -140,7 +139,6 @@ export default {
this.isLogining = false
})
} else {
console.log('dosomething')
}
setTimeout(() => {
this.isLogining = false
......
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