Commit 5822595a authored by 罗超's avatar 罗超

end

parent 0483acf2
...@@ -47,7 +47,7 @@ module.exports = function(ctx) { ...@@ -47,7 +47,7 @@ module.exports = function(ctx) {
vueRouterMode: 'history', // available values: 'hash', 'history' vueRouterMode: 'history', // available values: 'hash', 'history'
env: ctx.dev ? { env: ctx.dev ? {
API: 'http://192.168.5.57:5001/api', API: 'http://192.168.5.46:8300/api',
// API: 'http://192.168.10.128:8300/api', // API: 'http://192.168.10.128:8300/api',
// API: 'https://eduapi.oytour.com/api', // API: 'https://eduapi.oytour.com/api',
API_ZC: 'http://192.168.5.238:8087/api', API_ZC: 'http://192.168.5.238:8087/api',
......
...@@ -137,12 +137,13 @@ ...@@ -137,12 +137,13 @@
'focus-box': coor[0] == i && coor[1] == yi, 'focus-box': coor[0] == i && coor[1] == yi,
'unchecked':y &&y.State==1, 'unchecked':y &&y.State==1,
'unstudy':y &&y.State==2, 'unstudy':y &&y.State==2,
'notFreeCancle':y &&y.State==6,
'onlineStudy':y &&y.State==3 && y.AttendanceMethod==2, 'onlineStudy':y &&y.State==3 && y.AttendanceMethod==2,
'notChecked':y &&y.State==3 && y.AttendanceMethod==3, 'notChecked':y &&y.State==3 && y.AttendanceMethod==3,
'study-normal':y &&y.State==3 && y.AttendanceMethod==1 'study-normal':y &&y.State==3 && y.AttendanceMethod==1
}" }"
> >
<template v-if="y&&y.State<3"> <template v-if="y&&(y.State<3||y.State==6)">
{{ y.StateName }} {{ y.StateName }}
</template> </template>
<template v-else-if="y&&y.State==3"> <template v-else-if="y&&y.State==3">
...@@ -190,7 +191,15 @@ ...@@ -190,7 +191,15 @@
<q-item <q-item
v-close-popup v-close-popup
clickable clickable
@click="confirmSub"
v-if="currentMenuState==1" v-if="currentMenuState==1"
>
<q-item-section>确认排课</q-item-section>
</q-item>
<q-item
v-close-popup
clickable
v-if="currentMenuState==1||currentMenuState==2"
@click="showDialogHandle(students[coor[1]], 4)" @click="showDialogHandle(students[coor[1]], 4)"
> >
<q-item-section>修改排课</q-item-section> <q-item-section>修改排课</q-item-section>
...@@ -199,9 +208,9 @@ ...@@ -199,9 +208,9 @@
v-close-popup v-close-popup
clickable clickable
v-if="currentMenuState==1||currentMenuState==2" v-if="currentMenuState==1||currentMenuState==2"
@click="showDialogHandle(students[coor[1]], 4)" @click="getPlan"
> >
<q-item-section>取消排课</q-item-section> <q-item-section class="text-negative">取消排课</q-item-section>
</q-item> </q-item>
<!-- <q-item <!-- <q-item
v-close-popup v-close-popup
...@@ -281,6 +290,21 @@ ...@@ -281,6 +290,21 @@
:save-obj="stuOption" :save-obj="stuOption"
@close="() => (stuInfoVisible = false)" @close="() => (stuInfoVisible = false)"
></studentRight-form> ></studentRight-form>
<q-dialog v-model="cancelConfirm" persistent>
<q-card>
<q-card-section class="row items-center">
<div>你正在执行取消已确认学员的上课计划,请确认以下操作</div>
<div class="q-mt-sm">
<q-radio v-model="adminCancelChosenOpera" checked-icon="task_alt" unchecked-icon="panorama_fish_eye" val="yes" label="扣除学员课时按缺勤处理" />
<q-radio v-model="adminCancelChosenOpera" checked-icon="task_alt" unchecked-icon="panorama_fish_eye" val="no" label="无损取消" />
</div>
</q-card-section>
<q-card-actions align="right">
<q-btn flat label="不执行此次操作" color="primary" v-close-popup />
<q-btn unelevated label="确认选择" @click="checkRemoveChosenHandle" :disable="adminCancelChosenOpera==''" color="primary" v-close-popup />
</q-card-actions>
</q-card>
</q-dialog>
</div> </div>
</template> </template>
...@@ -291,6 +315,7 @@ import { ...@@ -291,6 +315,7 @@ import {
queryChapterTree, queryChapterTree,
queryScheduleCourseStu queryScheduleCourseStu
} from "../../api/course/index"; } from "../../api/course/index";
import { SetSureAppointment } from "../../api/studyabroad/subscribe.js";
import { getStudentInfo } from "src/api/school/index"; import { getStudentInfo } from "src/api/school/index";
import { setGuestRemark } from "src/api/studentmsg/index"; import { setGuestRemark } from "src/api/studentmsg/index";
import setStudentTeacher from "./components/setStudentTeacher.vue"; import setStudentTeacher from "./components/setStudentTeacher.vue";
...@@ -299,6 +324,7 @@ import SetStudyStatus from "./components/setStudyStatus.vue"; ...@@ -299,6 +324,7 @@ import SetStudyStatus from "./components/setStudyStatus.vue";
import StudyHeader from "./components/studyHeader.vue"; import StudyHeader from "./components/studyHeader.vue";
import studentRightForm from "src/components/school/student/studentRight-form.vue"; import studentRightForm from "src/components/school/student/studentRight-form.vue";
import SetStudyPlan from "./components/setStudyPlan.vue"; import SetStudyPlan from "./components/setStudyPlan.vue";
import {getStuAppointPlan,cancelStuAppointment} from 'src/api/scheduling/schedu'
export default { export default {
components: { components: {
scrollBar, scrollBar,
...@@ -350,7 +376,10 @@ export default { ...@@ -350,7 +376,10 @@ export default {
coor: [-1, -1], coor: [-1, -1],
locationMenu: [0, 0], locationMenu: [0, 0],
currentMenuState:0, currentMenuState:0,
currentSchedu:null currentSchedu:null,
cancelConfirm:false,
adminCancelChosenOpera:'',
updatePlan:{}
}; };
}, },
methods: { methods: {
...@@ -401,10 +430,6 @@ export default { ...@@ -401,10 +430,6 @@ export default {
if (playload) if (playload)
this.queryParemeter = { ...this.queryParemeter, ...playload }; this.queryParemeter = { ...this.queryParemeter, ...playload };
console.log(
this.currentCourse.CourseRate,
this.queryParemeter.CourseRate
);
if (this.currentCourse.CourseRate != this.queryParemeter.CourseRate) { if (this.currentCourse.CourseRate != this.queryParemeter.CourseRate) {
this.queryParemeter.CourseRate = this.currentCourse.CourseRate; this.queryParemeter.CourseRate = this.currentCourse.CourseRate;
this.getStudentByStoreage(); this.getStudentByStoreage();
...@@ -597,6 +622,26 @@ export default { ...@@ -597,6 +622,26 @@ export default {
}); });
} }
}, },
confirmSub() {
this.$q.loading.show()
const msg = {
Date: this.currentSchedu.Date,
TeacherId: this.currentSchedu.TeacherId,
ShiftSort: this.currentSchedu.ShiftSort
};
SetSureAppointment(msg).then(res => {
this.$q.loading.hide()
if (res.Code == 1) {
this.$q.notify({
message: "操作成功",
position: "top",
type: "positive"
});
this.getStudentByStoreage()
}
});
},
contextMenuHandle(i, yi, e,y) { contextMenuHandle(i, yi, e,y) {
this.currentMenuState = y?y.State:0 this.currentMenuState = y?y.State:0
this.currentSchedu = y this.currentSchedu = y
...@@ -612,12 +657,82 @@ export default { ...@@ -612,12 +657,82 @@ export default {
? t.offsetTop - 48 ? t.offsetTop - 48
: top; : top;
//sptable-wrap //sptable-wrap
this.locationMenu = [t.offsetLeft + t.offsetWidth / 2, top]; this.locationMenu = [(t.offsetLeft + t.offsetWidth / 2)*this.zoom, top*this.zoom];
}, },
cancleCellHandle() { cancleCellHandle() {
this.coor = [-1, -1]; this.coor = [-1, -1];
this.locationMenu = [-1, -1]; this.locationMenu = [-1, -1];
} },
getPlan(){
const y = this.currentSchedu
this.$q.loading.show()
getStuAppointPlan({AccountId:y.AccountId,Date:y.Date,ShiftSort:y.ShiftSort}).then(r=>{
if(r.Code==1){
const d = r.Data
this.updatePlan = d
this.canclePlanClassHandler()
}else{
this.$q.loading.hide()
}
})
},
canclePlanClassHandler(){
if(this.currentSchedu.State==2){
this.adminCancelChosenOpera = ''
this.cancelConfirm=true
}else if(this.currentSchedu.State==1){
this.adminCancelChosenOpera = 'no'
this.cancelConfirm=false
this.removePlanHandle()
}
this.$q.loading.hide()
},
checkRemoveChosenHandle(){
if(this.adminCancelChosenOpera==''){
this.errorMsgHandle('请选择执行的内容')
return
}
this.cancelConfirm = false
this.removePlanHandle()
},
errorMsgHandle(msg){
this.$q.notify({
color: "negative",
message: msg,
position: "top"
});
},
removePlanHandle(){
this.$q.loading.show()
var chosenList = []
this.updatePlan.ChooseStuList.forEach(x=>{
chosenList.push({
AppointId:x.AppointmentId,
IsCalcStuCheck: this.adminCancelChosenOpera=='yes'?1:0
})
})
cancelStuAppointment({
AccountId:this.currentSchedu.AccountId,
Date:this.updatePlan.Date,
ShiftSort:this.updatePlan.ShiftSort,
ChooseStuList:chosenList
}).then(r=>{
this.$q.loading.hide()
if(r.Code==1){
this.getStudentByStoreage();
this.$q.notify({
icon: "iconfont icon-chenggong",
color: "accent",
timeout: 2000,
message: "取消成功!",
position: "top"
});
return
}
})
},
}, },
created() { created() {
this.getCourse(); this.getCourse();
...@@ -829,4 +944,7 @@ export default { ...@@ -829,4 +944,7 @@ export default {
.sptable .notChecked{ .sptable .notChecked{
background: #eb3b5a; background: #eb3b5a;
} }
.sptable .notFreeCancle{
background: #acacac;
}
</style> </style>
...@@ -83,10 +83,12 @@ ...@@ -83,10 +83,12 @@
</q-btn-dropdown> </q-btn-dropdown>
</div> </div>
<div class="bg-grey-2 q-pa-md rounded-borders q-mt-sm row" style="border:1px dashed #CFCFCF"> <div class="bg-grey-2 q-pa-md rounded-borders q-mt-sm row" style="border:1px dashed #CFCFCF">
<div class="text-small text-grey-8" v-if="planTime && planTime.State>0 && plan.checkedStus.length==0">暂无其它学员一同上课</div>
<q-chip square v-for="(x,i) in plan.checkedStus" :key="i" :removable="(planTime && planTime.State!=3)||!plantime" @remove="removeCheckedStusHandle(x)">{{ x.GuestName }}</q-chip> <q-chip square v-for="(x,i) in plan.checkedStus" :key="i" :removable="(planTime && planTime.State!=3)||!plantime" @remove="removeCheckedStusHandle(x)">{{ x.GuestName }}</q-chip>
</div> </div>
</div> </div>
<div class="q-mt-md text-right"> <div class="q-mt-md text-right">
<q-btn color="negative" label="取消约课" class="q-mr-md" :loading="subLoading" unelevated @click="canclePlanClassHandler" />
<q-btn label="保存" color="primary" class="q-mr-md" :loading="subLoading" @click="validateSubmit" unelevated /> <q-btn label="保存" color="primary" class="q-mr-md" :loading="subLoading" @click="validateSubmit" unelevated />
<q-btn label="关闭" @click="close" :disable="subLoading" unelevated /> <q-btn label="关闭" @click="close" :disable="subLoading" unelevated />
</div> </div>
...@@ -180,7 +182,8 @@ export default { ...@@ -180,7 +182,8 @@ export default {
updatePlan:null, updatePlan:null,
cancelConfirm:false, cancelConfirm:false,
adminCancelChosenOpera:'', adminCancelChosenOpera:'',
cancelStu:null cancelStu:null,
cancelPlan:false
}; };
}, },
methods: { methods: {
...@@ -323,6 +326,7 @@ export default { ...@@ -323,6 +326,7 @@ export default {
if(temp) temp.disable=true if(temp) temp.disable=true
}, },
removeCheckedStusHandle(item){ removeCheckedStusHandle(item){
this.cancelPlan = false
if(this.planTime){ if(this.planTime){
const stuIndex = this.updatePlan.ChooseStuList.findIndex(x=>x.StuId==item.StuId) const stuIndex = this.updatePlan.ChooseStuList.findIndex(x=>x.StuId==item.StuId)
if(stuIndex!=-1){ if(stuIndex!=-1){
...@@ -345,6 +349,17 @@ export default { ...@@ -345,6 +349,17 @@ export default {
const temp = this.recommendStus.find(x=>x.StuId==item.StuId) const temp = this.recommendStus.find(x=>x.StuId==item.StuId)
if(temp) temp.disable=false if(temp) temp.disable=false
}, },
canclePlanClassHandler(){
this.cancelPlan = true
if(this.planTime.State==2){
this.adminCancelChosenOpera = ''
this.cancelConfirm=true
}else if(this.planTime.State==1){
this.adminCancelChosenOpera = 'no'
this.cancelConfirm=false
this.removePlanHandle()
}
},
checkRemoveChosenHandle(){ checkRemoveChosenHandle(){
if(this.adminCancelChosenOpera==''){ if(this.adminCancelChosenOpera==''){
this.errorMsgHandle('请选择执行的内容') this.errorMsgHandle('请选择执行的内容')
...@@ -354,21 +369,38 @@ export default { ...@@ -354,21 +369,38 @@ export default {
this.removePlanHandle() this.removePlanHandle()
}, },
removePlanHandle(){ removePlanHandle(){
var chosenList = []
const stu = this.updatePlan.ChooseStuList[this.cancelStu] let tempList = []
console.log(stu) if(!this.cancelPlan){
tempList.push(this.updatePlan.ChooseStuList[this.cancelStu])
} else{
tempList.push(...this.updatePlan.ChooseStuList)
}
tempList.forEach(x=>{
chosenList.push({
AppointId:x.AppointmentId,
IsCalcStuCheck: this.adminCancelChosenOpera=='yes'?1:0
})
})
cancelStuAppointment({ cancelStuAppointment({
AccountId:this.planTime.AccountId, AccountId:this.planTime.AccountId,
Date:this.updatePlan.Date, Date:this.updatePlan.Date,
ShiftSort:this.updatePlan.ShiftSort, ShiftSort:this.updatePlan.ShiftSort,
ChooseStuList:[ ChooseStuList:chosenList
{
AppointId:stu.AppointmentId,
IsCalcStuCheck: this.adminCancelChosenOpera=='yes'?1:0
}
]
}).then(r=>{ }).then(r=>{
if(r.Code==1){ if(r.Code==1){
if(this.cancelPlan){
this.$q.notify({
icon: "iconfont icon-chenggong",
color: "accent",
timeout: 2000,
message: "取消成功!",
position: "top"
});
this.$emit("success");
return
}
this.updatePlan.ChooseStuList.splice(this.cancelStu,1) this.updatePlan.ChooseStuList.splice(this.cancelStu,1)
const removeObj = this.plan.checkedStus.find(x=>x.StuId==stu.StuId) const removeObj = this.plan.checkedStus.find(x=>x.StuId==stu.StuId)
if(removeObj) this.removeCheckedStusHandle(removeObj) if(removeObj) this.removeCheckedStusHandle(removeObj)
......
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