Commit 1812c884 authored by 罗超's avatar 罗超

22

parent bdf50cdf
...@@ -20,7 +20,7 @@ export default { ...@@ -20,7 +20,7 @@ export default {
</script> </script>
<style> <style>
@import url("//at.alicdn.com/t/font_2077629_bgk17xi4zj.css"); @import url("//at.alicdn.com/t/font_2077629_w1o8daso6r9.css");
@font-face{ @font-face{
font-family: 'din'; font-family: 'din';
src: url('./assets/font/DIN-Bold.otf') format('opentype'); src: url('./assets/font/DIN-Bold.otf') format('opentype');
......
...@@ -80,3 +80,11 @@ export function getEventLogPageList(data) { ...@@ -80,3 +80,11 @@ export function getEventLogPageList(data) {
data data
}) })
} }
// 设置学生跳课
export function setGuestStartChapter(data) {
return request({
url: '/Scroll/SetGuestStartChapter',
method: 'post',
data
})
}
\ No newline at end of file
<template>
<!-- 跳课 -->
<q-dialog
v-model="show"
content-class="bg-grey-1"
persistent
transition-show="scale"
transition-hide="scale"
>
<q-card style="width: 900px; max-width: 900px">
<q-card-section class="row items-center q-pb-none">
<div class="text-h6">跳课</div>
<q-space />
<q-btn icon="close" flat round dense @click="changeDig(false)" />
</q-card-section>
<q-card-section class="q-pt-none">
<div class="row col flex q-col-gutter-md">
<q-field filled label="姓名" readonly stack-label class="col-4">
<template v-slot:control>
<div>{{ saveObj.GuestName }}</div>
</template>
</q-field>
<!-- <q-field filled label="课程" readonly stack-label class="col-4">
<template v-slot:control>
<div>{{ saveObj.CourseName }}</div>
</template>
</q-field>
<q-field filled label="班级" readonly stack-label class="col-4">
<template v-slot:control>
<div>{{ saveObj.ClassName }}</div>
</template>
</q-field> -->
<q-field filled label="已上课次数" readonly stack-label class="col-4">
<template v-slot:control>
<div>{{ saveObj.CourseChapterNo }}</div>
</template>
</q-field>
<q-field filled label="预约次数" readonly stack-label class="col-4">
<template v-slot:control>
<div>{{ saveObj.AppointNum }}</div>
</template>
</q-field>
</div>
<div class="q-my-xs">
类型:
<q-radio
v-model="type"
val="a"
label="第一次课开始"
color="teal"
@input="changeType"
/>
<q-radio
v-model="type"
val="b"
label="中途已上课"
color="teal"
@input="changeType"
/>
<q-radio
v-model="type"
val="c"
label="后续未上课"
color="teal"
@input="changeType"
/>
</div>
<div class="row col q-col-gutter-md">
<q-input
filled
v-model.number="msg.SChapterNo"
label="跳课开始章节"
type="number"
class="col-4"
stack-label
:min="0"
v-if="type == 'b'"
@input="changeStartChapter"
/>
<q-input
filled
v-model.number="endSChapterNo"
label="跳课结束章节"
type="number"
class="col-4"
stack-label
:min="0"
@input="changeEndChapter"
/>
</div>
<div class="q-my-xs">跳课章节列表:{{ msg.ChapterNos }}</div>
</q-card-section>
<q-separator />
<q-card-actions align="right" class="bg-white">
<q-btn label="取消" flat color="grey-10" @click="changeDig(false)" />
<q-btn label="保存" color="accent q-px-md" @click="save" />
</q-card-actions>
</q-card>
</q-dialog>
</template>
<script>
import { setGuestStartChapter } from "../../api/stuMan/index.js";
export default {
model: {
prop: "show",
event: "changeshow"
},
props: {
show: {
type: Boolean,
default: false
},
saveObj: {
type: Object
}
},
watch: {
saveObj: {
handler(val) {
console.log(56, val);
},
deep: true
}
},
data() {
return {
type: "c",
saveLoading: false,
msg: {
StuId: 0,
GuestId: 0,
CourseId: 0,
ChapterNos: "",
SChapterNo: 0
},
endSChapterNo: 0
};
},
mounted() {},
methods: {
//开关弹窗
changeDig(val) {
this.$emit("changeshow", val);
},
changeType() {
this.msg.SChapterNo = 0;
this.msg.ChapterNos = "";
this.endSChapterNo = 0;
},
changeStartChapter() {
if (!this.msg.SChapterNo) {
this.msg.SChapterNo = 0;
}
this.changeEndChapter();
},
changeEndChapter() {
if (!this.endSChapterNo) {
this.endSChapterNo = 0;
}
const end = parseInt(this.endSChapterNo);
let arr = [];
if (this.type == "a") {
for (let i = 1; i <= end; i++) {
arr.push(i);
}
} else if (this.type == "b") {
for (let i = this.msg.SChapterNo; i <= end; i++) {
arr.push(i);
}
} else if (this.type == "c") {
let start = this.saveObj.CourseChapterNo + this.saveObj.AppointNum;
for (let i = start + 1; i <= end; i++) {
arr.push(i);
}
}
this.msg.ChapterNos = arr.toString();
},
save() {
this.msg.StuId=this.saveObj.Student_Id
this.msg.GuestId=this.saveObj.Id
this.msg.CourseId=this.saveObj.CourseId
setGuestStartChapter(this.msg).then(res => {
if (res.Code == 1) {
this.$q.notify({
message: '操作成功',
position: "top",
});
this.changeDig(false);
this.$emit("success");
}
});
}
}
};
</script>
...@@ -237,6 +237,7 @@ export default { ...@@ -237,6 +237,7 @@ export default {
position: "top", position: "top",
type: "positive" type: "positive"
}); });
// this.saveObj.AppointState = 2
this.$emit("close"); this.$emit("close");
} }
}); });
......
...@@ -80,7 +80,7 @@ ...@@ -80,7 +80,7 @@
map-options map-options
label="老师" label="老师"
class="col-12" class="col-12"
@input="getCanTeacherTimeList()" @input="getCanTeacherTimeList"
/> />
<q-field <q-field
filled filled
...@@ -150,7 +150,6 @@ ...@@ -150,7 +150,6 @@
:dense="false" :dense="false"
class="col-6" class="col-6"
@filter="filterStu" @filter="filterStu"
@input="addStu"
> >
<template v-slot:no-option> <template v-slot:no-option>
<q-item> <q-item>
...@@ -288,7 +287,7 @@ export default { ...@@ -288,7 +287,7 @@ export default {
addLoading: false, addLoading: false,
chapterList: [], //章节列表, chapterList: [], //章节列表,
checkChapter: {}, //选择的章节 checkChapter: {}, //选择的章节
returnString: [] //章节默认值 returnString: [], //章节默认值
}; };
}, },
mounted() { mounted() {
...@@ -345,6 +344,7 @@ export default { ...@@ -345,6 +344,7 @@ export default {
//获取老师的空闲上课时段 //获取老师的空闲上课时段
getCanTeacherTimeList() { getCanTeacherTimeList() {
this.teaClassMsg.Date = this.dateObj.date; this.teaClassMsg.Date = this.dateObj.date;
this.stuInfo = "";
if (this.teaClassMsg.TeacherId == 0) return; if (this.teaClassMsg.TeacherId == 0) return;
GetCanTeacherClassTimeList(this.teaClassMsg).then(res => { GetCanTeacherClassTimeList(this.teaClassMsg).then(res => {
this.teacherTimeList = res.Data; this.teacherTimeList = res.Data;
...@@ -374,7 +374,6 @@ export default { ...@@ -374,7 +374,6 @@ export default {
} }
}); });
}, },
addStu() {},
//获取章节 //获取章节
getChapterTree() { getChapterTree() {
if (this.teaClassMsg.CourseId == 0) return; if (this.teaClassMsg.CourseId == 0) return;
...@@ -449,6 +448,7 @@ export default { ...@@ -449,6 +448,7 @@ export default {
const totalTime = this.courseCheckList.reduce((pre, cur) => { const totalTime = this.courseCheckList.reduce((pre, cur) => {
return (pre += cur.Minutes); return (pre += cur.Minutes);
}, 0); }, 0);
console.log(452, this.courseCheckList, totalTime);
if (this.checkChapter.StudyMinutes !== totalTime) { if (this.checkChapter.StudyMinutes !== totalTime) {
this.$q.notify({ this.$q.notify({
message: "课时不匹配,请重新上课时段", message: "课时不匹配,请重新上课时段",
...@@ -503,11 +503,12 @@ export default { ...@@ -503,11 +503,12 @@ export default {
message: "操作成功", message: "操作成功",
position: "top" position: "top"
}); });
if (this.editType == 2) {
this.saveObj.GuestList.push({ this.saveObj.GuestList.push({
GuestName:this.stuInfo.StuName, GuestName: this.stuInfo.StuName,
AppointmentId:res.Data AppointmentId: res.Data
}) });
}
this.stuInfo = ""; this.stuInfo = "";
this.getStu(); this.getStu();
this.$emit("success"); this.$emit("success");
......
...@@ -384,9 +384,14 @@ ...@@ -384,9 +384,14 @@
@click="transferClass(props.row, 1)" /> @click="transferClass(props.row, 1)" />
<q-btn-dropdown flat size="xs" color="dark" label="更多" style="margin-left: 10px"> <q-btn-dropdown flat size="xs" color="dark" label="更多" style="margin-left: 10px">
<q-list> <q-list>
<q-item clickable v-close-popup @click="showAddEvent(props.row)"> <q-item dense clickable v-close-popup @click="showAddEvent(props.row)">
<q-item-section> <q-item-section>
<q-item-label>添加事件</q-item-label> <q-item-label overline>添加事件</q-item-label>
</q-item-section>
</q-item>
<q-item dense clickable v-close-popup @click="showChangeCourse(props.row)">
<q-item-section>
<q-item-label overline >跳课</q-item-label>
</q-item-section> </q-item-section>
</q-item> </q-item>
</q-list> </q-list>
...@@ -422,6 +427,8 @@ ...@@ -422,6 +427,8 @@
<studentRight-form v-if="isShowStuRight" :isJudgeTrans="isJudgeTrans" :BelongType="BelongType" :save-obj="stuOption" <studentRight-form v-if="isShowStuRight" :isJudgeTrans="isJudgeTrans" :BelongType="BelongType" :save-obj="stuOption"
@close="closeStuForm" @success="refreshStuList" @reload="refreshStuList"> @close="closeStuForm" @success="refreshStuList" @reload="refreshStuList">
</studentRight-form> </studentRight-form>
<!-- 跳课 -->
<JumpCourse v-model="isShowChangeCourse" :saveObj="ChangeCourseObj" @success="refreshPage" ></JumpCourse>
</div> </div>
</template> </template>
<script> <script>
...@@ -453,6 +460,7 @@ ...@@ -453,6 +460,7 @@
import list from "../../components/stuMan/makeUpHours.vue"; //可补课课时,缺勤次数,请假次数 import list from "../../components/stuMan/makeUpHours.vue"; //可补课课时,缺勤次数,请假次数
import eventLog from "../../components/stuMan/eventRecord.vue"; //事件记录 import eventLog from "../../components/stuMan/eventRecord.vue"; //事件记录
import studentRightForm from "../../components/school/student/studentRight-form"; import studentRightForm from "../../components/school/student/studentRight-form";
import JumpCourse from "../../components/stuMan/jumpCourse"
import { import {
queryEmployee queryEmployee
} from "../../api/users/user"; } from "../../api/users/user";
...@@ -469,7 +477,8 @@ ...@@ -469,7 +477,8 @@
myOrderForm, myOrderForm,
list, list,
eventLog, eventLog,
studentRightForm studentRightForm,
JumpCourse
}, },
data() { data() {
...@@ -644,6 +653,18 @@ ...@@ -644,6 +653,18 @@
field: "MakeUpHours", field: "MakeUpHours",
align: "left" align: "left"
}, },
{
name: "CourseChapterNo",
label: "已上课次数",
field: "CourseChapterNo",
align: "left"
},
{
name: "AppointNum",
label: "预约次数",
field: "AppointNum",
align: "left"
},
{ {
name: "AbsenceNum", name: "AbsenceNum",
label: "缺勤次数", label: "缺勤次数",
...@@ -742,7 +763,9 @@ ...@@ -742,7 +763,9 @@
TransListData: [], //转介人数据 TransListData: [], //转介人数据
MyTransListData: [], MyTransListData: [],
source: 0, //1:从课程列表进入 source: 0, //1:从课程列表进入
courseName: "" courseName: "",
isShowChangeCourse:false,
ChangeCourseObj:{}
}; };
}, },
created() { created() {
...@@ -1145,6 +1168,10 @@ ...@@ -1145,6 +1168,10 @@
}, },
refreshStuList() { refreshStuList() {
this.getList(); this.getList();
},
showChangeCourse(item){
this.isShowChangeCourse=true
this.ChangeCourseObj=item
} }
} }
}; };
......
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