Commit 4826855c authored by 罗超's avatar 罗超

调整课表

parent 7bf4e94a
......@@ -329,7 +329,7 @@
box-sizing: border-box;
margin: 4rpx;
}
.index-header-img {
width: 68rpx;
height: 68rpx;
......
......@@ -279,10 +279,21 @@
title:'绑定成功'
})
//重新获取
uni.setStorageSync('erpUserInfo',res.Data)
let erpStus=uni.getStorageSync('ErpStus')
erpStus.push(res.Data)
let flag=false
erpStus.forEach(x=>{
if(x.AccountId==res.Data.AccountId){
x.ClassInAccount=res.Data.ClassInAccount
flag=true
uni.setStorageSync('erpUserInfo',x)
}
})
if(flag){
erpStus.push(res.Data)
uni.setStorageSync('erpUserInfo',res.Data)
}
uni.setStorageSync('ErpStus',erpStus)
data.loading = true
uni.reLaunch({
url:'/pages/index/index'
......
......@@ -62,7 +62,54 @@
</view>
<van-empty description="暂无课程" v-if="dataList.length === 0" />
<view v-for="(item, index) in dataList" :key="index" v-if="dataList.length > 0">
<Item :data="item" />
<!-- <Item :data="item" /> -->
<view class="plan-box" v-for="(x,i) in item.PlanTimeList" :key="i">
<view class="left-time">
<view class="icon">
上课时间
</view>
<view class="time-text">
{{x.StartTime}}
</view>
<view class="guodu">
<text>·</text>
<text>·</text>
<text>·</text>
</view>
<view class="icon">
下课时间
</view>
<view class="time-text">
{{x.EndTime}}
</view>
</view>
<view class="right-info">
<view class="class-name">{{item.ClassName}}</view>
<view class="teacher-box">
<van-icon name="manager" />
<text style="margin:0 10rpx;">老师:</text>
<!-- <view class="teacher-head" v-if="!x.UserIcon"></view>
<image :src="x.UserIcon" class="teacher-head" v-else mode="widthFix"></image> -->
<view class="teacher-name">{{x.TeacherName}}</view>
</view>
<view class="teacher-box">
<van-icon name="wap-home" />
<text style="margin:0 10rpx;">教室:</text>
<text>{{item.RoomName}}</text>
</view>
<view class="teacher-box" style="margin-top: 30rpx;margin-bottom: 0;">
<van-icon name="underway" />
<text style="margin:0 10rpx;">出勤:</text>
<text v-if="x.IsCheck==0 && item.Finished==1" style="color:#282828">出勤</text>
<text v-else-if="x.IsCheck==2 && item.Finished==1" style="color:orange">请假</text>
<text v-else-if="item.Finished==1" style="color:red">缺勤</text>
<view style="width:1px;flex:1;text-align: right;display: flex;align-items: center;justify-content: flex-end;">
<text :style="{background:item.Finished==1?'#ddd':'#FFD694'}" style="display: inline-block;width: 26rpx;height: 26rpx;border-radius: 50%;margin-right: 10rpx;"></text>
<text :style="{color:item.Finished==1?'#ddd':'#282828'}">{{item.Finished==1?'已上课':'未上课'}}</text>
</view>
</view>
</view>
</view>
</view>
</view>
<van-toast id="van-toast" />
......@@ -240,16 +287,28 @@
VersionUpdate,
// 获取当天数据
async getData() {
if(data.msg.ClassId<=0) return
data.dataList=null
data.loading = true
let res = await getStundentPlanStatistical(data.msg);
data.loading = false
if (res) {
data.dataList = res.Data;
}
setTimeout(()=>{
data.dataList=[]
data.allData.forEach(x=>{
if(x.ClassDateStr==data.msg.StartTime){
data.dataList.push(x)
}
});
data.loading = false
},1000)
//if(data.msg.ClassId<=0) return
// data.loading = true
// let res = await getStundentPlanStatistical(data.msg);
// data.loading = false
// if (res) {
// data.dataList = res.Data;
// }
},
//获取当月数据
async getAllData() {
console.log(activeDay.value)
if(data.msg.ClassId<=0) return
loadingS()
try {
......@@ -257,8 +316,10 @@
Toast.clear()
if (data.timer) data.timer = null
if (res) {
data.dataList = res.Data;
//data.dataList = res.Data;
data.allData = res.Data;
data.msg.StartTime = currentDate.value + "-" + activeDay.value;
methods.getData()
}
} catch {
Toast.clear()
......@@ -602,4 +663,83 @@
width: 65px;
height: auto;
}
.plan-box{
border-radius: 20rpx;
background-color: #FFF;
box-shadow: 0 0 20rpx #D0D0D0;
padding:0;
display: flex;
align-items: flex-start;
margin:0 32rpx;
margin-bottom: 20rpx;
}
.plan-box .left-time{
border-top-left-radius: 20rpx;
border-bottom-left-radius: 20rpx;
background-color: #F5F5F5;
padding: 40rpx;
}
.plan-box .left-time .icon{
font-size: 18rpx;
color:#666;
}
.plan-box .left-time .time-text{
font-size: 40rpx;
font-weight:bolder;
color:#282828;
}
.plan-box .left-time .guodu{
text-align: center;
display: flex;
justify-content: center;
align-items: center;
flex-direction: column;
margin: 20rpx 0;
}
.plan-box .left-time .guodu text{
font-size: 60rpx;
color: #eee;
font-weight: bolder;
line-height: 20rpx;
}
.plan-box .right-info {
width: 1rpx;
flex: 1;
padding:40rpx;
}
.plan-box .right-info {
padding:40rpx;
}
.plan-box .right-info .class-name{
font-size: 32rpx;
color:#000;
text-overflow: -o-ellipsis-lastline;
overflow: hidden;
text-overflow: ellipsis;
display: -webkit-box;
line-clamp: 2;
}
.plan-box .right-info .teacher-box{
margin:20rpx 0;
display: flex;
align-items: center;
font-size: 24rpx;
color:#888;
}
.plan-box .right-info .teacher-head{
width:60rpx;
height: 60rpx;
border-radius: 50%;
margin-right: 20rpx;
background-color: #DDD;
}
.plan-box .right-info .teacher-name{
/* font-size: 24rpx;
color:#444; */
}
</style>
//请求教育接口
let host = ''
if (process.env.NODE_ENV === "development") {
//host = 'https://jjswapi.oytour.com/api'
host = 'http://192.168.10.206:5004/api'
host = 'https://jjswapi.oytour.com/api'
//host = 'http://192.168.10.206:5004/api'
//host = 'http://192.168.10.206:8800/api'
} else {
host = 'https://jjswapi.oytour.com/api'
......
//请求教育接口
let host = ''
if (process.env.NODE_ENV === "development") {
//host = 'https://jjswapi.oytour.com/api'
host = 'http://192.168.10.206:5005/api'
host = 'https://jjeduapi.oytour.com/api'
//host = 'http://192.168.10.206:5005/api'
//host = 'http://192.168.10.128:8900/api'
} else {
host = 'https://jjeduapi.oytour.com/api'
......
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