Commit aa4106f1 authored by 吴春's avatar 吴春
parents 799e1a16 cc52bc80
......@@ -164,7 +164,8 @@ module.exports = function(ctx) {
'Meta',
'Notify',
'Dialog',
'LoadingBar'
'LoadingBar',
'Loading'
]
},
......
......@@ -403,3 +403,19 @@ export function getToDayCoursePlanList(data) {
data: data
})
}
export function getStuAppointPlan(data) {
return request({
url: '/ScheduleCourse/GetStuAppointPlan',
method: 'post',
data: data
})
}
export function cancelStuAppointment(data) {
return request({
url: '/Scroll/CancelStuAppointment',
method: 'post',
data: data
})
}
\ No newline at end of file
......@@ -56,4 +56,26 @@ export function getAccountStudentList(data) {
method: 'post',
data
})
}
export function setGuestTeachingMethod(data) {
return request({
url: '/ScheduleCourse/SetGuestTeachingMethod',
method: 'post',
data
})
}
export function setGuestRemark(data) {
return request({
url: '/ScheduleCourse/SetGuestRemark',
method: 'post',
data
})
}
export function setGuestScheduleStatus(data) {
return request({
url: '/ScheduleCourse/SetGuestScheduleStatus',
method: 'post',
data
})
}
\ No newline at end of file
......@@ -120,6 +120,11 @@
.q-btn .q-icon, .q-btn .q-spinner{
font-size: max(12px, 1em) !important;
}
.text-small{
font-size: 12px;
font-family: microsoft yahei;
}
/* 控制下拉长度 */
/* .q-menu{
max-height: 29vh;
......
This diff is collapsed.
<template>
<q-card style="width: 450px" class="q-pa-md" v-loading="">
<div class="row items-center">
<div class="text-h6">设置班主任</div>
</div>
<q-card-section>
<q-input
filled
stack-label
maxlength="20"
:dense="false"
v-model="stuInfo.GuestName"
class=" q-pb-lg"
label="学员姓名"
readonly
/>
<template v-if="stuInfo.HeadMasterName && stuInfo.HeadMasterName != ''">
<q-input
filled
stack-label
maxlength="20"
:dense="false"
v-model="stuInfo.GuestName"
class="q-pb-lg"
label="班主任"
readonly
/>
<div class="q-mt-md text-negative">
当前班主任已经设置生效,如需修改请联系教学主管
</div>
</template>
<q-select
v-else
stack-label
color="primary"
filled
clearable
label="班主任"
option-value="Id"
option-label="EmployeeName"
:options="teachers"
v-model="teacherId"
ref="teacherRef"
map-options
:rules="[val => !!val || '请选择班主任信息']"
/>
<div class="q-mt-md text-right">
<q-btn
label="保存"
@click="setTeacher"
color="primary"
class="q-mr-md"
:loading="subLoading"
unelevated
v-if="!stuInfo.HeadMasterName || stuInfo.HeadMasterName == ''"
/>
<q-btn label="关闭" @click="close" unelevated />
</div>
</q-card-section>
</q-card>
</template>
<script>
import { queryEmployee } from "src/api/users/user";
import { SetStudentAssist } from "src/api/sale/sale";
export default {
props: {
stuInfo: {
type: Object,
required: true
}
},
data() {
return {
teacherId: null,
teachers: [],
loading: false,
subLoading: false
};
},
methods: {
close() {
this.$emit("close");
},
async getTeachers() {
if (this.loading) return;
this.loading = true;
const queryObj = {
IsLeave: 1,
UserRole: 0,
AccountTypeStr: "2"
};
const response = await queryEmployee(queryObj);
if (response.Code == 1) {
this.teachers = response.Data;
}
this.loading = false;
},
setTeacher() {
if (this.subLoading) return;
this.subLoading = true;
this.$refs.teacherRef.validate();
if (this.$refs.teacherRef.hasError) return;
SetStudentAssist({
StuId: this.stuInfo.GuestId,
Id: 0,
AssistId: this.teacherId.Id,
AssistType: 4
})
.then(r => {
if (r.Code == 1) {
this.$q.notify({
icon: "iconfont icon-chenggong",
color: "accent",
timeout: 2000,
message: "数据保存成功!",
position: "top"
});
this.$emit("success", {
HeadMasterId: this.teacherId.Id,
HeadMasterName: this.teacherId.EmployeeName
});
} else {
this.$q.notify({
color: "negative",
message: "操作失败",
position: "top"
});
}
this.subLoading = false;
})
.catch(e => {
this.subLoading = false;
});
}
},
created() {
this.getTeachers();
}
};
</script>
<style></style>
<template>
<q-card style="width: 450px" class="q-pa-md">
<div class="row items-center">
<div class="text-h6">设置上课方式</div>
</div>
<q-card-section>
<q-select
stack-label
color="primary"
filled
label="授课方式"
option-value="value"
option-label="label"
:options="methodTypes"
v-model="methodType"
map-options
/>
<div class="q-mt-md text-right">
<q-btn
label="保存"
@click="setStudyMethodHandle"
color="primary"
class="q-mr-md"
:loading="subLoading"
unelevated
/>
<q-btn label="关闭" @click="close" unelevated />
</div>
</q-card-section>
</q-card>
</template>
<script>
import { setGuestTeachingMethod } from "src/api/studentmsg/index";
import { SetStudentAssist } from "src/api/sale/sale";
export default {
props: {
stuInfo: {
type: Object,
required: true
}
},
data() {
return {
methodType: 1,
methodTypes:[{value:1,label:'面授'},{value:2,label:'线上'}],
subLoading:false
};
},
methods: {
close() {
this.$emit("close");
},
setStudyMethodHandle() {
if (this.subLoading) return;
this.subLoading = true;
setGuestTeachingMethod({
TeachingMethod: this.methodType.value,
GuestId: this.stuInfo.GuestId
}).then(r => {
if (r.Code == 1) {
this.$q.notify({
icon: "iconfont icon-chenggong",
color: "accent",
timeout: 2000,
message: "数据保存成功!",
position: "top"
});
this.$emit("success", this.methodType.value);
} else {
this.$q.notify({
color: "negative",
message: "操作失败",
position: "top"
});
}
this.subLoading = false;
})
.catch(e => {
this.subLoading = false;
});
}
},
created() {
this.methodType=this.stuInfo.TeachingMethod==-1?1:this.stuInfo.TeachingMethod
}
};
</script>
<style></style>
This diff is collapsed.
<template>
<q-card style="width: 450px" class="q-pa-md">
<div class="row items-center">
<div class="text-h6">设置排课状态</div>
</div>
<q-card-section>
<q-select
stack-label
color="primary"
filled
label="状态"
option-value="value"
option-label="label"
:options="studys"
v-model="studyStatus"
map-options
/>
<div class="row items-center q-mt-sm" v-if="studyStatus==1 || studyStatus.value==1">
<q-input filled v-model="endDate" mask="####-##-##" class="col" label="截至日期" :disable="unknow" readonly ref="StartTime" :rules="[val => !!val || '请选择截至日期']">
<template v-slot:append>
<q-icon name="event" class="cursor-pointer">
<q-popup-proxy ref="qDateProxy" transition-show="scale" transition-hide="scale">
<div class="q-gutter-md">
<q-date v-model="endDate" mask="YYYY-MM-DD"></q-date>
</div>
<q-btn v-close-popup label="关闭" color="primary" flat style="float:right" />
</q-popup-proxy>
</q-icon>
</template>
</q-input>
<q-checkbox v-model="unknow" label="未知" class="q-ml-md" dense @input="changeUnknowHandle" />
</div>
<div class="q-mt-sm" v-if="studyStatus==0 || studyStatus.value==0">
<q-input v-model="remark" type="textarea" label="排课备注" filled autogrow />
</div>
<div class="q-mt-md text-right">
<q-btn
label="保存"
@click="setStudySchedule"
color="primary"
class="q-mr-md"
:loading="subLoading"
unelevated
/>
<q-btn label="关闭" @click="close" unelevated />
</div>
</q-card-section>
</q-card>
</template>
<script>
import { setGuestScheduleStatus } from "src/api/studentmsg/index";
export default {
props: {
stuInfo: {
type: Object,
required: true
}
},
data() {
return {
methodType: 0,
studys:[{value:0,label:'正常排课'},{value:1,label:'暂停排课'}],
studyStatus:0,
subLoading:false,
endDate:'',
unknow:false,
remark:''
};
},
methods: {
close() {
this.$emit("close");
},
setStudyMethodHandle() {
if (this.subLoading) return;
this.subLoading = true;
},
changeUnknowHandle(){
if(this.unknow) this.endDate=''
},
setStudySchedule() {
if (this.subLoading) return;
this.subLoading = true;
const parameters = {
ScheduleStatus: this.studyStatus.label?this.studyStatus.value:this.studyStatus,
StopDeadline:this.endDate,
ScheduleRemark:this.remark,
GuestId: this.stuInfo.GuestId
}
setGuestScheduleStatus(parameters).then(r => {
if (r.Code == 1) {
this.$q.notify({
icon: "iconfont icon-chenggong",
color: "accent",
timeout: 2000,
message: "数据保存成功!",
position: "top"
});
this.$emit("success", parameters);
} else {
this.$q.notify({
color: "negative",
message: "操作失败",
position: "top"
});
}
this.subLoading = false;
})
.catch(e => {
this.subLoading = false;
});
}
},
created() {
this.studyStatus=this.stuInfo.ScheduleStatus==-1?0:this.stuInfo.ScheduleStatus
this.unknow = this.studyStatus==1? (this.stuInfo.StopDeadline==''):false
this.remark = this.stuInfo.ScheduleRemark
this.endDate = this.stuInfo.StopDeadline
}
};
</script>
<style></style>
<template>
<div class="rounded-borders row bg-white q-mb-sm"
style="border: 1px solid #c9ccd2;box-shadow:rgb(201, 204, 210) 0px 3px 5px 0px;margin-top: 5px; flex-direction: row-reverse;">
<q-btn-dropdown unelevated :label="`排课状态:${stuQueryMsg.schedule.name}`">
<q-list>
<q-item clickable v-close-popup @click="setScheduleStatus(x)" v-for="(x, i) in schedules" :key="i">
<q-item-section>
<q-item-label>{{ x.name }}</q-item-label>
</q-item-section>
</q-item>
</q-list>
</q-btn-dropdown>
<q-btn-dropdown unelevated :label="`结课状态:${stuQueryMsg.progress.name}`">
<q-list>
<q-item clickable v-close-popup @click="setProgressStatus(x)" v-for="(x, i) in progresss" :key="i">
<q-item-section>
<q-item-label>{{ x.name }}</q-item-label>
</q-item-section>
</q-item>
</q-list>
</q-btn-dropdown>
<q-btn-dropdown unelevated :label="`班主任:${stuQueryMsg.teacher.EmployeeName}`">
<q-list>
<q-item clickable v-close-popup @click="setTeacher(x)" v-for="(x, i) in teachers" :key="i">
<q-item-section>
<q-item-label>{{ x.EmployeeName }}</q-item-label>
</q-item-section>
</q-item>
</q-list>
</q-btn-dropdown>
<q-btn-dropdown unelevated :label="`上课方式:${stuQueryMsg.stuType.name}`">
<q-list>
<q-item clickable v-close-popup @click="setStuType(x)" v-for="(x, i) in stuTypes" :key="i">
<q-item-section>
<q-item-label>{{ x.name }}</q-item-label>
</q-item-section>
</q-item>
</q-list>
</q-btn-dropdown>
<q-input v-model="stuQueryMsg.stuName" dense type="text" standout placeholder="输入学员姓名,按回车查询" style="width:200px;" @keypress.enter="setChangeHandle" />
</div>
</template>
<script>
import { queryEmployee } from "src/api/users/user";
export default {
data() {
return {
stuQueryMsg: {
schedule: {},
progress: {},
teacher:{},
stuName:'',
stuType:{}
},
schedules: [{ id: -1, name: '全部' }, { id: 0, name: '正常排课' }, { id: 1, name: '暂停排课' }],
progresss: [{ id: -1, name: '全部' }, { id: 1, name: '未完结' }, { id: 7, name: '已完结' }],
stuTypes: [{ id: -1, name: '全部' }, { id: 0, name: '面授' }, { id: 1, name: '线上' }],
teachers:[]
}
},
methods: {
setScheduleStatus(schedule) {
if(schedule.id!=this.stuQueryMsg.schedule.id){
this.stuQueryMsg.schedule = schedule
this.setChangeHandle()
}
},
setProgressStatus(progress) {
if(progress.id!=this.stuQueryMsg.progress.id){
this.stuQueryMsg.progress = progress
this.setChangeHandle()
}
},
setTeacher(teacher) {
if(teacher.Id!=this.stuQueryMsg.teacher.Id){
this.stuQueryMsg.teacher = teacher
this.setChangeHandle()
}
},
setStuType(stuType) {
if(stuType.id!=this.stuQueryMsg.stuType.id){
this.stuQueryMsg.stuType = stuType
this.setChangeHandle()
}
},
async getTeachers() {
const queryObj = {
IsLeave: 1,
UserRole: 0,
AccountTypeStr: "2"
};
const response = await queryEmployee(queryObj);
if (response.Code == 1) {
this.teachers = response.Data;
this.teachers.splice(0,0,{Id:0,EmployeeName:'全部'})
this.stuQueryMsg.teacher = this.teachers[0]
}
},
setChangeHandle(){
const parameters = {
HeadMasterId:this.stuQueryMsg.teacher.Id,
GuestState:this.stuQueryMsg.progress.id,
ScheduleStatus:this.stuQueryMsg.schedule.id,
TeachingMethod:this.stuQueryMsg.stuType.id,
GuestName:this.stuQueryMsg.stuName
}
this.$emit('change',parameters)
},
resetQuery(){
this.stuQueryMsg.schedule = this.schedules[0]
this.stuQueryMsg.progress = this.progresss[0]
this.stuQueryMsg.stuType = this.stuTypes[0]
this.stuQueryMsg.stuName = ''
this.stuQueryMsg.teacher = this.teachers[0]
}
},
created() {
this.getTeachers()
this.stuQueryMsg.schedule = this.schedules[0]
this.stuQueryMsg.progress = this.progresss[0]
this.stuQueryMsg.stuType = this.stuTypes[0]
}
};
</script>
<style></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