Commit bdca8a75 authored by Mac's avatar Mac

修改

parent e75bc48e
......@@ -51,6 +51,10 @@
<q-input @input="resetSearch" clearable standout="bg-primary text-white" v-model="msg.GuestName" label="学生名称"
@clear="resetSearch" maxlength="20" />
</div>
<div class="col-3">
<q-select @input="resetSearch" standout="bg-primary text-white" option-value="Id" option-label="Name" clearable
v-model="msg.CheckStatus" :options="AttendanceList" emit-value map-options label="出勤状态" />
</div>
</div>
</div>
<div class="page-content">
......@@ -107,9 +111,9 @@
<template v-slot:body-cell-optioned="props">
<q-td :props="props" >
<div v-for="x in props.row.GuestList">
<div class="border-bottom" >
<div class="border-bottom" v-if='iseditjurisdiction'>
<q-btn flat size="xs" icon="edit" color="accent" style="font-weight:400" label="编辑"
@click="EditCourse(props.row, 1)" />
@click="EditCourse(x,props.row)" />
</div>
</div>
......@@ -119,14 +123,32 @@
</q-table>
</div>
<!-- 修改状态 -->
<q-dialog v-model="IsShowDialog" persistent transition-show="scale"
transition-hide="scale">
<q-card style="width: 400px;max-width:500px;">
<q-card-section>
<div class="text-h6">修改出勤状态</div>
</q-card-section>
<q-card-section class="q-pt-none scroll" style="max-height: 70vh">
<q-select standout="bg-primary text-white" option-value="Id" option-label="Name"
v-model="editMsg.CheckStatus" :options="AttendanceList" emit-value map-options label="出勤状态" />
</q-card-section>
<q-separator />
<q-card-actions align="right" class="bg-white">
<q-btn label="取消" flat color="grey-10" style="font-weight:400 !important" @click="IsShowDialog=false" />
<q-btn label="立即提交" color="accent" class="q-px-md" style="font-weight:400 !important"
@click="saveAttendance" />
</q-card-actions>
</q-card>
</q-dialog>
</div>
</template>
<script>
import {
queryCoursePage,
queryCourseCategoryTree,
deleteCourseInfo
} from "../../api/course/index";
addClassCheck
} from '../../api/course/class';
import {
queryCourseDropdownList,
} from '../../api/course/index' //课程下拉
......@@ -239,7 +261,9 @@
ClassId:0,
OrderGuestId:'',
GuestName:'',
CheckStatus:'',
},
IsShowDialog:false,
//课程分类树形列表
TreeCategoryList: [],
returnString: [], //默认值
......@@ -247,17 +271,29 @@
AllCourseList: [],
ClassList: [], //班级下拉
allClassList: [],
AttendanceList:[{Name:'正常',Id:0},{Name:'缺席',Id:1},{Name:'请假',Id:2},],
option:{
disabledDate:(time)=> {
return time.getTime() > Date.now()
}
},
schoolList: [],
editMsg:{//修改的对象
CheckStatus:0,
StudyNum:0,
},
iseditjurisdiction:false,
};
},
mounted() {
let userinfo = this.getLocalStorage();
userinfo.ActionMenuList.map(x=>{//判断权限
if(x.FunctionCode == "Student_Attendance"){//判断是否有修改状态的权限
this.iseditjurisdiction = true;
}
})
let d = new Date();
let year = d.getFullYear();
let month = d.getMonth() + 1;
......@@ -349,18 +385,7 @@
}
})
},
schoolChange(){
},
getCategorytree() {
this.TreeCategoryList = [];
var qMsg = {};
queryCourseCategoryTree(qMsg).then(res => {
this.TreeCategoryList = res.Data;
});
},
//重新查询
resetSearch() {
this.getlist();
......@@ -382,15 +407,43 @@
refreshPage() {
this.getlist();
},
EditCourse(){
EditCourse(x,row){
console.log(row)
this.editMsg.CheckStatus = x.CheckStatus;
this.editMsg.StudyNum = x.StudyNum;
this.editMsg.ClassDate = row.ClassDate ;
this.editMsg.ClassRoomId = row.ClassRoomId ;
this.editMsg.ClassTimeId = x.ClassTimeId ;
this.editMsg.OrderGuestId = x.OrderGuestId ;
this.editMsg.School_Id = row.School_Id ;
this.editMsg.TeacherId = row.TeacherId ;
this.editMsg.classId = row.ClassId ;
this.IsShowDialog = true
},
//跳转至我的课程
goMycourse(obj) {
var tempStr = window.location.origin +"/#/course/courseinfo?CourseId=" + obj.CourseId;
openURL(tempStr)
},
saveAttendance(){//修改出勤状态
let signMsg = []
signMsg.push(this.editMsg)
addClassCheck(signMsg).then(res => {
if (res.Code == 1) {
this.getlist();
this.IsShowDialog = false
this.$q.notify({
icon: 'iconfont icon-chenggong',
color: 'accent',
timeout: 2000,
message: '操作成功',
position: 'top'
})
}
})
},
}
};
......
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