Commit 825b0cac authored by 罗超's avatar 罗超

1

parent 33dcd21e
......@@ -35,3 +35,27 @@ export function getClassRoomTimeList(data) {
data
})
}
/**
* 获取教室使用记录类型1详情
* @param {JSON参数} data
*/
export function getClassRoomLogDetail(data) {
return request({
url: '/ClassRoom/GetRoomUseLogDetails',
method: 'post',
data
})
}
/**
* 根据排课时间id获取详情
* @param {JSON参数} data
*/
export function getTimeDetail(data) {
return request({
url: '/ClassRoom/GetTimeDetaild',
method: 'post',
data
})
}
\ No newline at end of file
......@@ -4,13 +4,16 @@
<div class="school-name">{{item.SchoolName}}</div>
<div class="classroom-box">
<div v-for="(_item,_index) in item.RoomList" :key="item.RoomId" >
<div class="classroom-item q-mr-lg q-mb-lg" :class="{'classroom-item-noUse':_item.UserRate===1}">
<el-image class="classroom-img" :src="_item.RoomPicList[0]" fit="contain">
<div class="classroom-item q-mr-lg q-mb-lg" :class="{'classroom-item-noUse':_item.UserRate===1}" >
<div @click="goUrl">
<el-image class="classroom-img" :src="_item.RoomPicList[0]" fit="contain" >
<div slot="error" class="image-slot">
<i class="el-icon-picture-outline"></i>
</div>
</el-image>
<div class="classroom-name" @click="goUrl">{{_item.RoomName}}
</div>
<div class="classroom-name" >{{_item.RoomName}}
<!-- <img src="../../assets/images/classroom/warning.png" class="q-ml-sm" v-if="_item.warn">
<img src="../../assets/images/classroom/normal.png" class="q-ml-sm" v-if="!_item.warn"> -->
</div>
......@@ -44,7 +47,7 @@
control-type="regular"
>
<q-carousel-slide v-for="(slide,slideIndex) in _item.TimeList" :key="slideIndex" :name="slideIndex">
<div class="info-box" @click="goUrl">
<div class="info-box">
<div class="time">{{ slide.StartTime }}</div>
<div class="info">{{slide.ClassName}}</div>
</div>
......@@ -97,6 +100,7 @@ import {
},
methods:{
goUrl(){
console.log('tag', '1111')
this.$router.push({
path:"/classroom/useRecord",
query:{
......
......@@ -203,23 +203,25 @@ var lunarCalendar = {
}
var objDate = new Date();
var endDate = new Date();
if (dateStr) {
console.log(dateStr)
let d = Date.parse(dateStr)
let res = new Date(d);
console.log(res, 'res');
objDate = res
endDate = res
}
console.log(211, objDate.getTime(), objDate)
endDate.setDate(endDate.getDate() + dayNum);
console.log(222, endDate.getTime(), endDate)
// if (dateStr) {
// console.log(dateStr)
// let d = Date.parse(dateStr)
// let res = new Date(d);
// console.log(res, 'res');
// objDate = res
// endDate = res
// }
console.log(endDate.getTime() - objDate.getTime(), 'time');
endDate.setDate(endDate.getDate() + dayNum);
// let x1 = objDate.getTime();
// console.log(211, x1, objDate)
// let x2 = endDate.getTime();
// console.log(222, x2, endDate)
// let x = x2 - x1
// console.log(x1 == x2, x, 'time');
//修正ymd参数
var m = objDate.getMonth() + 1, d = objDate.getDate();
......
......@@ -86,15 +86,15 @@
</el-timeline-item>
</el-timeline>
</td>
<td v-for="(item,index) in tbodayData" :class="{'td-bg':index%2==0}">
<td v-for="(item,index) in tbodayData" :class="{'td-bg':index%2==0}" >
<div v-for="(_item,_index) in item.InfoList" class="absolute" :style="{'top':_item.offSetTop+'px','z-index':_index}">
<div class="td-item" v-if="_item.Type===0" >
<div class="td-item" v-if="_item.Type===0" @click="goCourseInfo(_item)">
<img src="../../../assets/images/classroom/useing.png" alt="" class="ClassStatus" v-if="_item.ClassStatus===1">
<img src="../../../assets/images/classroom/not-use.png" alt="" class="ClassStatus" v-if="_item.ClassStatus!==1">
<span class="name">{{_item.Title}}</span>
<div class="time">{{_item.StartTime}}-{{_item.EndTime}}</div>
</div>
<div class="td-item" v-if="_item.Type===1">
<div class="td-item" v-if="_item.Type===1" @click="taggleUserHistory(_item)">
<span class="name">{{_item.Title}}</span>
<div class="time">{{_item.StartTime}}-{{_item.EndTime}}</div>
</div>
......@@ -106,12 +106,14 @@
</table>
</div>
<UserHistory ref="history" :classroomId="classroomUserId" ></UserHistory>
</div>
</template>
<script>
import lunarCalendar from "./js/lunarCalendar"
import UserHistory from "./userHistory"
export default {
props:{
tbodayData:{
......@@ -123,6 +125,9 @@ export default {
default:''
}
},
components:{
UserHistory
},
watch:{
tbodayData:{
handler(val){
......@@ -143,22 +148,21 @@ export default {
},
startT:{
handler(val){
if(val){
this.msg.StartDate=val;
let startYear = this.msg.StartDate.split("-")[0];
let startMonth = this.msg.StartDate.split("-")[1];
var data = lunarCalendar.initLunar(
startYear,
startMonth,
this.dayNum,
val
);
console.log(156,data)
this.CalendarDataArray = data;
this.QStartDate = data[0].CurrentDate;
this.QEndDate = data[data.length - 1].CurrentDate;
this.Calendar = this.CalendarDataArray.slice(0,7);
console.log(158,this.Calendar)
if(val){
// this.msg.StartDate=val;
// let startYear = this.msg.StartDate.split("-")[0];
// let startMonth = this.msg.StartDate.split("-")[1];
// var data = lunarCalendar.initLunar(
// startYear,
// startMonth,
// this.dayNum,
// val
// );
// console.log(156,data)
// this.CalendarDataArray = data;
// this.QStartDate = data[0].CurrentDate;
// this.QEndDate = data[data.length - 1].CurrentDate;
// this.Calendar = this.CalendarDataArray.slice(0,7);
}
}
......@@ -293,10 +297,23 @@ export default {
},{
timestamp: '21:30'
},],
classroomUserId:""
};
},
methods: {
taggleUserHistory(i){
this.classroomUserId=i.Id
this.$refs.history.changeShow()
},
goCourseInfo(i){
this.$router.push({
path:"/classroom/courseInfo",
query:{
id:i.Id
}
})
},
//初始化日历数据
initData() {
let startYear = this.msg.StartDate.split("-")[0];
......
<style>
.Sctop_Last {
position: absolute;
right: 10px;
bottom: 10px;
}
.Sctop_Last>div {
display: inline-block;
width: 100px;
height: 30px;
background-color: #D4DFFF;
color: #2966FE;
text-align: center;
font-size: 14px;
line-height: 30px;
border-radius: 10px;
font-weight: bold;
cursor: pointer;
}
.sche_rightTop{
width: 100%;
padding: 20px 0;
background-color: #fff;
position: relative;
}
</style>
<template>
<div class="sche_rightTop">
<!-- <div v-if="dataList.Status!=2" class="sche_Topflex" style="display:flex;">
<div class="Sctop_Color Scdu_benci" style="position:relative;">本次上课信息</div>
<div class="Sctop_Color">
<span class="Scotop_little">校区</span>{{dataList.SchoolName}}
</div>
<div class="Sctop_Color" style="width:33%;">
<span class="Scotop_little">计划时间</span>
<span v-if="dataList.PlanDate">{{dataList.PlanDate.replaceAll('-','.')}}</span>
<span v-if="dataList.WeekDay"> {{dataList.WeekDay.replace('星期','周')}}</span>
{{dataList.StartTime}}-{{dataList.EndTime}}
</div>
<div class="Sctop_Color" style="width:15%">
<span class="Scotop_little">课程名称</span>{{dataList.ShiftName}}
</div>
</div> -->
<!-- <div class="Sctop_Last">
<div @click="isShowJiedai=true"><i style="margin-right:5px;" class="iconfont icon-liuchengguanliqi"></i>接待流程
</div>
</div> -->
<table style="width:100%;margin:0 20px;font-size:18px;color:#000000;">
<tr>
<td style="width:11%">
<span class="Sch_MainColor">本次上课信息</span>
</td>
<td style="width:15%">
<span class="Scotop_little">班级:</span>{{dataList.ClassName}}
</td>
<td style="width:15%;">
<span class="Scotop_little">计划时间:</span>{{dataList.PlanTime}}
</td>
<td style="width:23%;">
<span class="Scotop_little">课程名称:</span>{{dataList.CourseName}}
</td>
<td>
<span class="Scotop_little">当前状态:</span>
<span v-if="dataList.ClassStatus===0">待上课</span>
<span v-if="dataList.ClassStatus===1">上课中</span>
<span v-if="dataList.ClassStatus===2">下课</span>
</td>
</tr>
<tr>
<td></td>
<td>
<span class="Scotop_little">老师:</span>{{dataList.TeacherName}}
</td>
<td>
<span class="Scotop_little">实际时间:</span>{{dataList.ActualTime}}
</td>
<td>
<span class="Scotop_little">出勤人数:</span>{{dataList.AttendanceNum}}
</td>
</tr>
</table>
</div>
</template>
<script>
export default {
props: {
dataList: {
type: Object,
default: null
},
},
}
</script>
<style>
.schedulVisit {
min-height: calc(100% - 30px);
padding: 15px;
margin-top: 30px;
border-radius: 8px;
background: #fff;
}
.schedulVisit .fangkeTitle {
color: #000000;
font-size: 18px;
font-weight: bold;
}
.schedulVisit .fangkeNumb {
display: inline-block;
background-color: #BCCEFD;
color: #2966FE;
font-size: 15px;
border-radius: 6px;
text-align: center;
line-height: 22px;
margin-left: 15px;
padding: 0px 6px;
}
.schedulVisit .visit_Date {
margin-left: 60px;
color: #000000;
font-size: 16px;
}
.schedulVisit .visit_Date i {
color: #B4B4B4;
margin-right: 10px;
}
.page-option .el-input__inner {
background-color: #F1F3F5;
border: 0;
height: 34px;
line-height: 34px;
border-radius: 10px;
}
.page-option .el-input__icon {
line-height: 34px;
}
.schedul_Vtable tr th {
color: #8E8E8E;
}
.schedul_Vtable tr td {
color: #2D2D2D;
}
.visit_FORM .el-input__inner {
background: #F0F2F5;
border-radius: 10px;
height: 34px;
line-height: 34px;
border: 0;
}
.visit_FORM .el-input__icon {
line-height: 34px;
}
.schedulVisit .q-table {
padding-bottom: 5px;
}
.schedulVisit .q-table tbody td:before {
background: '' !important;
}
.schedulVisit .q-table tbody tr:hover {
box-shadow: 0px 2px 20px 0px #E4E7FB;
background: #fff;
border-radius: 16px
}
.schedulVisit .q-table tbody td:before {
background: transparent !important;
}
.scheduVipop .el-textarea__inner {
background: #F0F2F5 !important;
border: 0;
}
</style>
<template>
<div class="schedulVisit">
<div class="page-content">
<q-table :pagination="msg" :loading="loading" no-data-label="暂无相关数据" flat
class="stickycreatInsertStr-column-table schedul_Vtable" separator="none" :data="data" :columns="columns"
row-key="name" >
<template v-slot:top="props">
<div class="fangkeTitle" ref="fkdj">学员出勤记录</div>
<span class="fangkeNumb">{{data.length}}</span>
<q-space />
</template>
<template v-slot:body-cell-IsCheck="props">
<q-td :props="props">
<div v-if="props.row.IsCheck===0">正常</div>
<div v-if="props.row.IsCheck===1" style="color:#ff0000">缺勤</div>
<div v-if="props.row.IsCheck===2">未签到</div>
</q-td>
</template>
<template v-slot:bottom>
<!-- <q-pagination class="full-width justify-end" v-model="msg.pageIndex" color="primary" :max="pageCount"
:input="true" @input="changePage" /> -->
</template>
</q-table>
</div>
</div>
</template>
<script>
export default {
props: {
tabledata: {
type: Array,
default: []
},
},
watch: {
tabledata:{
handler(val){
if(val){
this.data=val
this.loading=false;
let page= val.length/this.msg.rowsPerPage
this.pageCount=Math.ceil(page)
}
},
deep:true
}
},
data() {
return {
columns: [{
name: 'GuestName',
label: '姓名',
required: true,
field: 'GuestName',
align: 'left'
},
{
name: 'Mobile',
field: 'Mobile',
label: '电话',
align: 'left',
},
{
name: 'CourseName',
field: 'CourseName',
label: '课程',
align: 'left'
},
{
name: 'TotalHours',
label: '总课时',
field: 'TotalHours',
align: 'left'
},
{
name: 'SurplusHours',
label: '剩余课时',
field: 'SurplusHours',
align: 'left'
},
{
name: 'IsCheck',
label: '状态',
field: 'IsCheck',
align: 'left'
},
],
data: [],
loading: false,
pageCount: 1,
msg: {
pageIndex: 1,
pageSize: 100,
rowsPerPage: 100,
PlanId: 0,
KeyWords: "",
},
}
},
created() {
},
mounted() {
},
methods: {
//初始化权限信息
initAuth() {
if (this.authObj) {
if (this.authObj.isShowAdd != null && !this.authObj.isShowAdd) {
this.DutyAuthObj.isShowAdd = this.authObj.isShowAdd;
}
if (this.authObj.isShowEdit != null && !this.authObj.isShowEdit) {
this.DutyAuthObj.isShowEdit = this.authObj.isShowEdit;
}
}
},
// //翻页
changePage(val) {
let start=0
if(this.pageCount===1){
start=0
}
let end =this.msg.pageSize*val
start=end-this.msg.pageSize
this.data=this.tabledata.slice(start,end)
},
}
}
</script>
<style lang="sass">
@import url('~assets/css/table.sass')
</style>
<template>
<q-dialog v-model="persistent" maximized full-height position="right" ref="historyDialog" @hide="" class="flex ">
<div class="con">
<div class="header">
<img class="img-head" src="../../../assets/images/classroom/admin.png" mode="" />
<div>
{{details.ErrorTitle}}
</div>
<img class="img-head-close" src="../../../assets/images/classroom/close.png" mode="" @click="hideDialog"/>
</div>
<div class="info-box">
<div class="user-info">
<div class="user-item">
<div class="user-label">姓名:</div><span class="user-con">{{details.ManageName}}</span>
</div>
<div class="user-item">
<div class="user-label">值班时间:</div><span class="user-con">{{details.StartTime}}-{{details.EndTime}}</span>
</div>
</div>
<div class="use">
<div class="use-title">用途</div>
<div class="use-con">{{details.ErrorContent}}</div>
</div>
<div class="use">
<div class="use-title">现场照片</div>
<div class="img-con">
<div v-for="(item,index) in details.LogPicList" :key="index" class="classroom-img-item">
<el-image :src="item" fit="contain" />
</div>
</div>
</div>
<div class="use">
<div class="use-title">参与人员</div>
<div class="img-con">
<div v-for="(item,index) in details.ParticipantsList" :key="index" class="classroom-img-item">
<el-image :src="item" fit="contain" />
</div>
</div>
</div>
</div>
</div>
</q-dialog>
</template>
<script>
import {getClassRoomLogDetail} from '../../../api/classroom/index';
export default {
props: {
classroomId:{
type:[Number,String]
},
},
watch:{
classroomId(val,oldVal){
if(val!==oldVal){
this.getClassRoomDetail(val)
}
},
},
components: {
},
data() {
return {
persistent: false,
details:{}
}
},
methods: {
getClassRoomDetail(id){
getClassRoomLogDetail({ID:id}).then((res)=>{
console.log(51,res)
if(res.Code===1){
this.details=res.Data
}
})
},
changeShow(){
this.persistent=true
},
hideDialog(){
this.$refs.historyDialog.hide()
}
},
}
</script>
<style lang="scss" scoped>
._scrollbar::-webkit-scrollbar {
width: 6px;
height: 8px;
}
._scrollbar::-webkit-scrollbar-thumb {
border-radius: 2px;
box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.5);
background: rgba(0, 0, 0, 0.5);
}
._scrollbar::-webkit-scrollbar-track {
box-shadow: inset 0 0 2px rgba(0, 0, 0, 0.2);
border-radius: 4px;
background: transparent;
display: none;
}
.gonggao-bg {
position: absolute;
left: -10%;
width: 120%;
height: 130px;
}
.gonggao-bg img {
width: 120%;
height: 120%;
/* filter: blur(20px); */
overflow: hidden;
margin-top: -8%;
margin-left: -5%;
}
.notifyLoadMore {
text-align: right;
cursor: pointer;
font-size: 12px;
color: #2961FE;
}
.con{
width: 500px;
height: 1080px;
background: #FFFFFF;
box-shadow: 0px 0px 76px 0px rgba(2, 44, 66, 0.2);
.header{
width: 500px;
height: 56px;
background-color: #F0F5FB;
padding: 0 20px;
display: flex;
align-items: center;
position: relative;
.img-head{
width: 35px;
height: 35px;
border-radius: 50%;
background-color: #B0C9FC;
margin-right: 10px;
}
.img-head-close{
width: 15px;
height: 15px;
margin-right: 10px;
position: absolute;
top: 50%;
transform: translateY(-50%);
right: 15px;
}
}
.info-box{
box-sizing: border-box;
padding: 20px;
.user-info{
height: 100px;
border-bottom: 1px solid #E2E2E2;
font-size: 12px;
font-family: Microsoft YaHei;
font-weight: 400;
.user-item{
width: 500px;
display: flex;
margin-top: 20px;
.user-label{
width: 100px;
color: #999999;
}
.user-con{
color: #111111;
}
}
}
.use{
padding: 30px 0;
border-bottom: 1px solid #E2E2E2;
.use-title{
font-size: 12px;
font-family: Microsoft YaHei;
font-weight: bold;
color: #111111;
margin-bottom: 20px;
}
.use-con{
font-size: 12px;
font-family: Microsoft YaHei;
font-weight: 400;
color: #999999;
}
.img-con{
display: flex;
.classroom-img-item{
display: flex;
width: 145px;
height: 80px;
border-radius: 4px;
margin-right: 10px;
margin-bottom: 10px;
.classroom-img{
width: 100%;
height: 100%;
}
}
}
}
}
}
</style>
<style>
.scheduInfo {
height: 100%;
width: 100%;
padding: 15px;
background-color: #f2f4f7;
overflow: hidden;
}
.scheduInfo .schedu_left {
width: 248px;
flex: 0 0 auto;
position: relative;
background-image: url(../../assets/images/sched_bg.png);
background-repeat: no-repeat;
background-size: 100% auto;
height: 100%;
}
.scheduInfo .okr-menu-active {
color: var(--q-color-primary);
font-weight: bold;
background: #ecf1ff;
}
.mySched {
border-radius: 8px;
overflow: hidden;
height: 100%;
background-color: #fff;
}
.schedu_ImgDiv {
width: 68px;
height: 68px;
border-radius: 20px;
overflow: hidden;
margin: 75px auto 0;
}
.schedu_ImgDiv img {
width: 100%;
height: 100%;
}
.schedu_Name {
color: #fff;
font-size: 16px;
margin-top: 26px;
text-align: center;
}
.schedu_Status {
font-size: 12px;
color: #fff;
text-align: center;
margin-top: 15px;
}
.schedu_st {
display: inline-block;
width: 10px;
height: 10px;
border-radius: 50%;
margin-right: 5px;
position: relative;
top: 1px;
}
.zbz {
background-color: #00DB4E;
}
.xxz {
background-color: #DBDBDB;
}
.wdk {
background-color: #FE4475;
}
.clockon_Duty {
width: 120px;
height: 34px;
background: linear-gradient(90deg, #00BDD3, #00D761);
border-radius: 10px;
margin: 100px auto 24px;
text-align: center;
line-height: 31px;
color: #fff;
font-size: 14px;
cursor: pointer;
}
.sche_daka {
font-size: 18px;
position: relative;
left: 5px;
top: 2px;
}
.schedu_jiaojie {
width: 120px;
height: 34px;
line-height: 34px;
text-align: center;
border-radius: 10px;
border: 1px solid #91AEFF;
color: #C4D4FF;
font-size: 14px;
margin: auto;
cursor: pointer;
}
.scheInfo_rightTop {
width: 100%;
/* height: 80px; */
padding: 20px 0;
background-color: #fff;
}
.schScroll {
background-color: #F6F8FA;
}
.scheInfo_Topflex {
display: flex;
/* width: 90%; */
/* height: 80px; */
align-items: center;
}
.Sctop_Color {
font-size: 18px;
color: #000000;
width: 246px;
text-align: center;
}
.Scotop_little {
color: #AAAAAA;
font-size: 14px;
margin-right: 15px;
display: inline-block;
text-align: right;
width: 60px;
}
.Scdu_benci::after {
content: "";
position: absolute;
height: 29px;
width: 2px;
background: #EBEBEB;
right: 0;
}
.sche_mid {
display: flex;
width: 100%;
justify-content: space-between;
}
.sche_midList {
width: 31.6%;
height: 300px;
background: #fff;
border-radius: 16px;
border: 1px solid #EBEBEB;
box-shadow: 0px 1px 1px 0px #E4E7FB;
overflow: hidden;
font-family: 'MicrosoftYaHei';
position: relative;
}
.Sche_Bottom {
margin: 26px 40px 0 40px;
}
.scheList_TOP {
width: 100%;
height: 107px;
border-radius: 16px;
overflow: hidden;
position: relative;
}
.scheList_TOP img {
width: 100%;
height: 100%;
}
.word_sche {
color: #fff;
font-size: 20px;
position: absolute;
top: 25px;
left: 32px;
}
.word_scheNumber {
display: inline-block;
width: 36px;
height: 36px;
color: #fff;
background-color: #FE4475;
position: absolute;
top: 30px;
left: 130px;
text-align: center;
line-height: 36px;
border-radius: 8px;
font-size: 25px;
}
.scheList_Bottom {
margin: 15px 20px 0 20px;
font-size: 14px;
color: #000000;
height: 46px;
padding-bottom: 10px;
border-bottom: 1px solid #F3F3F3;
}
.sche_Dian {
display: inline-block;
width: 6px;
height: 6px;
background-color: #6D97FF;
border-radius: 50%;
margin-right: 10px;
}
.schScroll::-webkit-scrollbar {
display: none;
}
.Sch_MainColor {
font-size: 18px;
color: #000000;
}
</style>
<template>
<div class="scheduInfo">
<div class="flex row mySched">
<div class="col scroll schScroll">
<schedulHead :dataList="dataList"></schedulHead>
<div class="Sche_Bottom">
<schedulVisit :tabledata="dataList.GuestList"></schedulVisit>
</div>
</div>
</div>
</div>
</template>
<script>
import {getTimeDetail} from '../../api/classroom/index'
import schedulVisit from './components/schedul-visit'
import schedulHead from './components/schedul-head'
export default {
props: {},
components: {
schedulVisit,
schedulHead,
},
data() {
return {
dataList: {},
}
},
created() {
if (this.$route.query.id) {
this.id = this.$route.query.id;
this.getdata();
}
},
methods: {
getdata(){
getTimeDetail({id:this.id}).then(res=>{
if(res.Code===1){
this.dataList=res.Data
}
console.log(319,res)
})
}
},
}
</script>
<template>
<div class="page-body con">
<div class="left">
<div class="dateModel col-5 q-mb-sm cursor-pointer shadow-1">
<!-- <div class="dateModel col-5 q-mb-sm cursor-pointer shadow-1">
<div class="q-mb-sm">开始日期:{{dateModel}}</div>
<q-btn label="重新选择" color="primary" size="sm" >
<q-popup-proxy transition-show="scale" transition-hide="scale">
......@@ -12,7 +12,7 @@
</q-date>
</q-popup-proxy>
</q-btn>
</div>
</div> -->
<ClassroomNav :NavData="navData" :activeNav="msg.RoomId" @success="successNav"/>
</div>
<div class="right">
......
......@@ -749,6 +749,11 @@ const routes = [{
component: () =>
import("pages/classroom/useRecord")
},
{
path: "/classroom/courseInfo", //教室本次上课信息
component: () =>
import("pages/classroom/courseInfo")
},
],
},
......
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