Commit 19634a58 authored by 罗超's avatar 罗超

2

parent b6cce588
......@@ -170,4 +170,14 @@ export function cancelSureAppointment(data) {
method: 'post',
data
})
}
/**
* 调整上课教室
*/
export function SetScrollRoom(data) {
return request({
url: '/Scroll/SetScrollRoom',
method: 'post',
data
})
}
\ No newline at end of file
<template>
<div>
<q-dialog
v-model="show"
persistent
transition-show="scale"
transition-hide="scale"
@input="changeDig"
>
<q-card style="width: 400px;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 scroll" style="max-height: 70vh">
<q-select
filled
v-model="roomObj"
stack-label
option-value="RoomId"
option-label="RoomName"
:options="ClassRoomList"
label="教室列表"
class="col-10"
>
<template v-slot:no-option>
<q-item>
<q-item-section class="text-grey">
未找到相关数据
</q-item-section>
</q-item>
</template>
</q-select>
</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" @click="save" />
</q-card-actions>
</q-card>
</q-dialog>
</div>
</template>
<script>
import {
SetScrollRoom
} from "../../../api/studyabroad/subscribe.js";
import { queryClassRoomList } from "../../../api/school/index";
export default {
model: {
prop: "show",
event: "changeshow"
},
props: {
saveObj: {
type: Object,
default: null
},
date: {
type: String,
default: ""
},
show: {
type: Boolean,
default: false
},
room: {
type: [Number, String],
default: 0
}
},
data() {
return {
roomObj: {},
ClassRoomList: []
};
},
watch: {
show(val) {
if(val){
this.roomObj={
RoomName:this.saveObj.RoomName
}
}
}
},
mounted() {
this.getClassRoomList();
},
methods: {
//开关弹窗
changeDig(val) {
this.$emit("changeshow", val);
},
//获取教室下拉
getClassRoomList() {
queryClassRoomList({}).then(res => {
if (res.Code == 1) {
this.ClassRoomList = res.Data;
}
});
},
save() {
if (this.roomId == 0) {
this.$q.notify({
message: "请选择教室",
position: "top"
});
return;
}
const saveMsg = {
Date: this.date,
TeacherId: this.saveObj.Tid,
ShiftSort: this.saveObj.ShiftSort,
RoomId: this.roomObj.RoomId,
};
SetScrollRoom(saveMsg).then(res => {
if (res.Code == 1) {
this.$q.notify({
message: "操作成功",
position: "top"
});
this.$emit("success", this.roomObj.RoomName);
this.roomObj=""
this.changeDig(false)
}
});
}
}
};
</script>
......@@ -9,6 +9,7 @@
<q-field filled label="教室" stack-label class="col-6">
<template v-slot:control>
<div>{{ saveObj.RoomName }}</div>
<q-btn color="accent" size="xs" label="修改" v-if="auth.IsEdit" @click="modifyRoom" class="q-ml-md" />
</template>
</q-field>
<q-field filled label="课程" stack-label class="col-6">
......@@ -130,6 +131,7 @@
<ChangeCourse v-model="showChangeDig" :saveObj="CourseObj" @success="ChangeCourseSuccessHandle" />
<MakeUp v-model="showMakeUpDig" :saveObj="saveObj" :date="dateObj.date" @success="makeUpHandle"></MakeUp>
<CancelSub v-model="showCancelDig" :saveObj="saveObj" :date="dateObj.date" @success="cancelHandle"></CancelSub>
<Room v-model="showRoomDig" :room="saveObj.RoomId" :saveObj="saveObj" :date="dateObj.date" @success="roomHandle"></Room>
</div>
</template>
<script>
......@@ -140,11 +142,13 @@
import ChangeCourse from "./changeCourse";
import MakeUp from "./makeUp.vue"
import CancelSub from './deleteStu'
import Room from "./changeRoom.vue"
export default {
components: {
ChangeCourse,
MakeUp,
CancelSub
CancelSub,
Room
},
props: {
dateObj: {
......@@ -170,6 +174,7 @@
showChangeDig: false,
showMakeUpDig: false,
showCancelDig: false,
showRoomDig:false,
CourseObj: {}
};
},
......@@ -265,6 +270,10 @@
});
this.$emit("success");
},
roomHandle(val) {
this.$set(this.saveObj, "RoomName", val);
this.$emit("success");
},
isShowTag(arr, min) {
let n = 0;
arr.map(e => {
......@@ -277,6 +286,9 @@
} else {
return false;
}
},
modifyRoom(){
this.showRoomDig=true
}
}
};
......
......@@ -36,9 +36,16 @@
:defaultArray="returnString" nodeKey="ChapterId" labelKey="ChapterName" childrenKey="ChildList"
tipText="章节" @getChild="getChapter" class="col-12" ref="selectTree"></select-tree>
<q-select v-if="teaClassMsg.CourseId > 0 && editType == 1" filled v-model="teaClassMsg.TeacherId"
<div class="row col-12 q-col-gutter-md">
<q-select v-show="teaClassMsg.CourseId > 0 && editType == 1" filled v-model="teaClassMsg.TeacherId"
option-value="TId" option-label="TeacherName" :options="teacherList" emit-value map-options label="老师"
class="col-12" @input="getCanTeacherTimeList" />
class="col-6" @input="getCanTeacherTimeList" />
<q-select v-show="teaClassMsg.CourseId > 0 &&teaClassMsg.TeacherId&&teacherTimeList.length >0&& editType == 1" filled v-model="saveMsg.RoomId"
option-value="RoomId" option-label="RoomName" :options="ClassRoomList" emit-value map-options label="教室" :disable="addStuList.length>0"
class="col-6"/>
</div>
<q-field filled label-slot stack-label class="col-12" v-if="teaClassMsg.TeacherId > 0">
<template #label>
<div class="row flex">
......@@ -57,7 +64,7 @@
">
<div v-for="(_item, _index) in item.CourseTimeList" :key="_index" class="timeItem">
<q-checkbox v-model="courseCheckList" :val="_item">
{{ item.SchoolName }} {{ item.RoomName }}
{{ item.SchoolName }}
{{ _item.StartTime }}-{{ _item.EndTime }}
</q-checkbox>
</div>
......@@ -72,7 +79,7 @@
</div>
</template>
</q-field>
<div class="row col" v-show="(editType == 1&&checkChapter.ChapterId>0) ||(saveObj.ClassType == 3 && saveObj.AppointState == 1)">
<div class="row col-12" v-show="(editType == 1&&checkChapter.ChapterId>0) ||(saveObj.ClassType == 3 && saveObj.AppointState == 1)">
<div class="row col-6">
<q-input filled stack-label v-model="stuMsg_v2.StuName" label="学员姓名" @keyup.enter.native="getStu_V2" class="col-9"
hint="提示:需输入学员姓名查询学员列表" />
......@@ -138,6 +145,9 @@
queryCourseDropdownList,
queryChapterTree
} from "../../../api/course/index";
import {
queryClassRoomList,
} from '../../../api/school/index';
import selectTree from "./select-tree";
import Detail from "./detail.vue";
export default {
......@@ -227,7 +237,8 @@
GuestId: 0,
CourseId: 0,
CourseGradeId: 0,
CourseGradeNo: 0
CourseGradeNo: 0,
RoomId:0
},
stuInfo: "",
checkStuList: [],
......@@ -237,12 +248,22 @@
checkChapter: {}, //选择的章节
returnString: [], //章节默认值
addStuList: [], //新增时展示用
ClassRoomList:[],//教室下拉
};
},
mounted() {
this.getCourseList();
this.getClassRoomList();
},
methods: {
//获取教室下拉
getClassRoomList() {
queryClassRoomList({}).then(res => {
if (res.Code == 1) {
this.ClassRoomList = res.Data;
}
})
},
//开关弹窗
changeDig(val) {
this.$emit("changeshow", val);
......@@ -298,6 +319,12 @@
if (this.teaClassMsg.TeacherId == 0) return;
GetCanTeacherClassTimeList(this.teaClassMsg).then(res => {
this.teacherTimeList = res.Data;
if(res.Data.length>0){
this.saveMsg.RoomId=res.Data[0].RoomId
}else{
this.saveMsg.RoomId=0
}
});
},
//筛选学生
......
......@@ -801,7 +801,7 @@
@click="goassets2(GetDetail.ReFinanceId,GetDetail.OtherType)"> 员工人头奖励:{{GetDetail.ReFinanceId}}</span>
<span class="fr" style="text-decoration: underline;cursor: pointer;" v-if="GetDetail.OtherType==49 "
@click="goassets2(GetDetail.ReFinanceId,GetDetail.OtherType)"> 佣金/存折:{{GetDetail.ReFinanceId}}</span>
<span class="fr q-mr-sm" style="text-decoration: underline;cursor: pointer;" v-if="GetDetail.OtherType==33&&GetDetail.RelevanceFrId"
<span class="fr q-mr-sm" style="text-decoration: underline;cursor: pointer;" v-if="GetDetail.OtherType==33&&GetDetail.RelevanceFrId>0"
@click="goCoffeeOrder(GetDetail.RelevanceFrId)"> 商品订单:{{GetDetail.RelevanceFrId}}</span>
<span class="cursor-pointer q-mr-sm" style="color:#1273bc;text-decoration: underline;float: right;" @click="goCoffeeOrder(GetDetail.ReFinanceId2)"
v-if="GetDetail.OtherType===54">查看订单:{{GetDetail.ReFinanceId2}}</span>
......
......@@ -884,7 +884,7 @@
<span style="color:blue;cursor:pointer;text-decoration:underline;"
@click="showViewOrder">{{GetDetail.ReFinanceId}}</span>
</span>
<span class="fr q-mr-sm" style="text-decoration: underline;cursor: pointer;" v-if="GetDetail.OtherType==33&&GetDetail.RelevanceFrId"
<span class="fr q-mr-sm" style="text-decoration: underline;cursor: pointer;" v-if="GetDetail.OtherType==33&&GetDetail.RelevanceFrId>0"
@click="goCoffeeOrder(GetDetail.RelevanceFrId)"> 商品订单:{{GetDetail.RelevanceFrId}}</span>
<span class="cursor-pointer q-mr-sm" style="color:#1273bc;text-decoration: underline;float: right;" @click="goCoffeeOrder(GetDetail.ReFinanceId2)"
v-if="GetDetail.OtherType===54">查看订单:{{GetDetail.ReFinanceId2}}</span>
......
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