Commit 322069a7 authored by 黄奎's avatar 黄奎

页面修改

parent 3bc29c1e
...@@ -188,7 +188,7 @@ ...@@ -188,7 +188,7 @@
} }
</style> </style>
<template> <template>
<div v-if="!isShowSign"> <div v-if="!isShowSignForm">
<div class="lesson_Form"> <div class="lesson_Form">
<div class="calenderHeader"> <div class="calenderHeader">
<div> <div>
...@@ -200,7 +200,7 @@ ...@@ -200,7 +200,7 @@
<div> <div>
<q-btn color="accent" size="sm" class="q-mr-md" icon="add" label="新增日程" v-if="isShowBtn" @click="addNew()"> <q-btn color="accent" size="sm" class="q-mr-md" icon="add" label="新增日程" v-if="isShowBtn" @click="addNew()">
<q-popup-proxy> <q-popup-proxy>
<q-banner v-if="isShowMenu"> <q-banner v-if="isShowAddForm">
<div class="calenderDialog"> <div class="calenderDialog">
<div style="margin:10px 0 15px 0;">新增课程安排</div> <div style="margin:10px 0 15px 0;">新增课程安排</div>
<q-select filled stack-label option-value="TId" option-label="TeacherName" v-model="addMsg.TeacherId" <q-select filled stack-label option-value="TId" option-label="TeacherName" v-model="addMsg.TeacherId"
...@@ -267,7 +267,7 @@ ...@@ -267,7 +267,7 @@
</div> </div>
</template> </template>
<q-card-actions align="right" class="bg-white"> <q-card-actions align="right" class="bg-white">
<q-btn label="取消" flat color="grey-10" @click="isShowMenu=false" <q-btn label="取消" flat color="grey-10" @click="isShowAddForm=false"
style="font-weight:400 !important" /> style="font-weight:400 !important" />
<q-btn label="确认" color="accent q-px-md" style="font-weight:400 !important" @click="saveSteps" /> <q-btn label="确认" color="accent q-px-md" style="font-weight:400 !important" @click="saveSteps" />
</q-card-actions> </q-card-actions>
...@@ -318,10 +318,10 @@ ...@@ -318,10 +318,10 @@
</template> </template>
<template v-slot:body-cell-optioned="props" v-if="isShowBtn"> <template v-slot:body-cell-optioned="props" v-if="isShowBtn">
<q-td :props="props" style="width:130px;"> <q-td :props="props" style="width:130px;">
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400;" label="编辑" <q-btn v-if="isShowEdit(props.row) " flat size="xs" icon="edit" color="accent" style="font-weight:400;"
@click="getInfo(props.row)"> label="编辑" @click="getInfo(props.row)">
<q-popup-proxy> <q-popup-proxy>
<q-banner v-if="isShowEdit"> <q-banner v-if="isShowEditForm">
<div class="calenderDialog"> <div class="calenderDialog">
<div style="margin:10px 0 15px 0;">{{props.row.ClassDateStr}}课程安排</div> <div style="margin:10px 0 15px 0;">{{props.row.ClassDateStr}}课程安排</div>
<q-select filled stack-label option-value="TId" option-label="TeacherName" <q-select filled stack-label option-value="TId" option-label="TeacherName"
...@@ -388,7 +388,7 @@ ...@@ -388,7 +388,7 @@
</div> </div>
</template> </template>
<q-card-actions align="right" class="bg-white"> <q-card-actions align="right" class="bg-white">
<q-btn label="取消" flat color="grey-10" @click="isShowEdit=false" <q-btn label="取消" flat color="grey-10" @click="isShowEditForm=false"
style="font-weight:400 !important" /> style="font-weight:400 !important" />
<q-btn label="确认" color="accent q-px-md" style="font-weight:400 !important" <q-btn label="确认" color="accent q-px-md" style="font-weight:400 !important"
@click="saveSteps" /> @click="saveSteps" />
...@@ -416,9 +416,10 @@ ...@@ -416,9 +416,10 @@
<div class="calendarTop"> <div class="calendarTop">
<div>{{item.RoomName}}</div> <div>{{item.RoomName}}</div>
<div> <div>
<i v-if="!item.IsEndDate&&isShowBtn" class="iconfont icon-edit Lessicon_Edit" style="display:none;" @click.stop="getInfo(item)"> <i v-if="!item.IsEndDate&&isShowBtn" class="iconfont icon-edit Lessicon_Edit" style="display:none;"
@click.stop="getInfo(item)">
<q-popup-proxy> <q-popup-proxy>
<q-banner v-if="isShowEdit"> <q-banner v-if="isShowEditForm">
<div class="calenderDialog"> <div class="calenderDialog">
<div style="margin:10px 0 15px 0;">{{item.ClassDateStr}}课程安排</div> <div style="margin:10px 0 15px 0;">{{item.ClassDateStr}}课程安排</div>
<q-select filled stack-label option-value="TId" option-label="TeacherName" <q-select filled stack-label option-value="TId" option-label="TeacherName"
...@@ -487,7 +488,7 @@ ...@@ -487,7 +488,7 @@
</div> </div>
</template> </template>
<q-card-actions align="right" class="bg-white"> <q-card-actions align="right" class="bg-white">
<q-btn label="取消" flat color="grey-10" @click="isShowEdit=false" <q-btn label="取消" flat color="grey-10" @click="isShowEditForm=false"
style="font-weight:400 !important" /> style="font-weight:400 !important" />
<q-btn label="确认" color="accent q-px-md" style="font-weight:400 !important" <q-btn label="确认" color="accent q-px-md" style="font-weight:400 !important"
@click="saveSteps" /> @click="saveSteps" />
...@@ -526,7 +527,7 @@ ...@@ -526,7 +527,7 @@
<div v-else> <div v-else>
<div> <div>
<div class="Show_SignBack"> <div class="Show_SignBack">
<span @click="isShowSign=false" style="cursor:pointer;"><i class="iconfont icon-zuo1"></i>返回</span> <span @click="isShowSignForm=false" style="cursor:pointer;"><i class="iconfont icon-zuo1"></i>返回</span>
</div> </div>
<div class="StudentInfo_List" style="color:#000;"> <div class="StudentInfo_List" style="color:#000;">
<div> <div>
...@@ -612,9 +613,8 @@ ...@@ -612,9 +613,8 @@
</div> </div>
</div> </div>
</div> </div>
<!--&&isSigned-->
<q-card-actions align="right" class="bg-white" v-if="isShowSignBtn" style="margin:20px 10px 100px 0;"> <q-card-actions align="right" class="bg-white" v-if="isShowSignBtn" style="margin:20px 10px 100px 0;">
<q-btn label="取消" flat color="grey-10" style="font-weight:400 !important" @click="isShowSign=false" /> <q-btn label="取消" flat color="grey-10" style="font-weight:400 !important" @click="isShowSignForm=false" />
<q-btn label="确认" color="accent q-px-md" style="font-weight:400 !important" @click="saveSign()" /> <q-btn label="确认" color="accent q-px-md" style="font-weight:400 !important" @click="saveSign()" />
</q-card-actions> </q-card-actions>
</div> </div>
...@@ -674,7 +674,6 @@ ...@@ -674,7 +674,6 @@
isSetMore: 1, //是否显示更多设置 isSetMore: 1, //是否显示更多设置
isSetMoreTwo: 1, isSetMoreTwo: 1,
ClassRoomList: [], //教室下拉数据 ClassRoomList: [], //教室下拉数据
dayMsg: { //获取某一天的计划信息请求 dayMsg: { //获取某一天的计划信息请求
ClassPlanId: 0, ClassPlanId: 0,
School_Id: 0, School_Id: 0,
...@@ -682,14 +681,12 @@ ...@@ -682,14 +681,12 @@
ClassTimeId: 0, //签到的第几节课 ClassTimeId: 0, //签到的第几节课
}, },
dayObj: {}, dayObj: {},
comChecked: { comChecked: {
ClassDate: "", ClassDate: "",
ClassRoomId: 0, ClassRoomId: 0,
TeacherId: 0, TeacherId: 0,
ClassTimeId: 0, ClassTimeId: 0,
}, //点击选中复制 },
isSigned: true,
columns: [{ columns: [{
name: 'RoomName', name: 'RoomName',
label: '教室名称', label: '教室名称',
...@@ -771,9 +768,9 @@ ...@@ -771,9 +768,9 @@
} }
], ],
isShowBtn: true, isShowBtn: true,
isShowMenu: false, //是否显示弹出 isShowAddForm: false, //是否显示新增上课计划表单
isShowEdit: false, //是否显示修改弹出 isShowEditForm: false, //是否显示修改上课计划表单
isShowSign: false, isShowSignForm: false, //是否显示签到表单
isShowSignBtn: false, //是否显示签到提交按钮 isShowSignBtn: false, //是否显示签到提交按钮
currentUser: {}, currentUser: {},
} }
...@@ -798,6 +795,18 @@ ...@@ -798,6 +795,18 @@
this.getClassPlan(); this.getClassPlan();
}, },
methods: { methods: {
//是否显示编辑按钮
isShowEdit(item) {
var flag = true;
if (item.IsEndDate) {
if (this.currentUser.Id == 1) {
flag = true;
} else {
flag = false;
}
}
return flag;
},
initData() { initData() {
this.$nextTick(() => { this.$nextTick(() => {
// 点击上个月、 // 点击上个月、
...@@ -867,7 +876,7 @@ ...@@ -867,7 +876,7 @@
}, },
//点击新增 //点击新增
addNew() { addNew() {
this.isShowMenu = true; this.isShowAddForm = true;
var d = new Date(); var d = new Date();
var seperator1 = "-"; var seperator1 = "-";
var year = d.getFullYear(); var year = d.getFullYear();
...@@ -924,8 +933,8 @@ ...@@ -924,8 +933,8 @@
} }
setClassPlan(this.addMsg).then(res => { setClassPlan(this.addMsg).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
this.isShowMenu = false; this.isShowAddForm = false;
this.isShowEdit = false; this.isShowEditForm = false;
var d = new Date(this.value); var d = new Date(this.value);
var datetime = d.getFullYear() + '-' + (d.getMonth() + 1); var datetime = d.getFullYear() + '-' + (d.getMonth() + 1);
this.getClassPlan(); this.getClassPlan();
...@@ -934,7 +943,7 @@ ...@@ -934,7 +943,7 @@
}, },
//日历点击修改 //日历点击修改
getInfo(item) { getInfo(item) {
this.isShowEdit = true; this.isShowEditForm = true;
var Obj = JSON.parse(JSON.stringify(item)); var Obj = JSON.parse(JSON.stringify(item));
this.addMsg.ClassPlanId = Obj.ClassPlanId; this.addMsg.ClassPlanId = Obj.ClassPlanId;
this.addMsg.ClassId = Obj.ClassId; this.addMsg.ClassId = Obj.ClassId;
...@@ -970,7 +979,7 @@ ...@@ -970,7 +979,7 @@
}, },
//点击日历 //点击日历
getClicked(item, subItem) { getClicked(item, subItem) {
this.isShowSign = true; this.isShowSignForm = true;
this.dayMsg.ClassPlanId = item.ClassPlanId; this.dayMsg.ClassPlanId = item.ClassPlanId;
this.dayMsg.School_Id = this.setingObj.School_Id; this.dayMsg.School_Id = this.setingObj.School_Id;
this.dayMsg.ClassId = this.setingObj.ClassId; this.dayMsg.ClassId = this.setingObj.ClassId;
...@@ -1001,11 +1010,7 @@ ...@@ -1001,11 +1010,7 @@
x.StudyNum = this.dayObj.DefaultMinutes; x.StudyNum = this.dayObj.DefaultMinutes;
} }
}) })
if (count == this.dayObj.GuestList.length) {
this.isSigned = true;
} else {
this.isSigned = false;
}
this.dayObj.GuestList.forEach(x => { this.dayObj.GuestList.forEach(x => {
if (this.isShowSignBtn && x.IsCheck == -1) { if (this.isShowSignBtn && x.IsCheck == -1) {
x.IsCheck = 0; x.IsCheck = 0;
...@@ -1043,7 +1048,7 @@ ...@@ -1043,7 +1048,7 @@
}) })
addClassCheck(signMsg).then(res => { addClassCheck(signMsg).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
this.isShowSign = false; this.isShowSignForm = false;
this.getClassPlan(); this.getClassPlan();
} }
}) })
......
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