Commit 803dfdcc authored by youjie's avatar youjie

no message

parent fb316ae7
<template> <template>
<view class="classList-box"> <view class="classList-box">
<view class="classList-content-box" v-for="item in 5"> <view class="classList-content-box" v-for="(i,indexs) in classList" :key="indexs">
<view class="content-time"> <view class="content-time">
<view class="time-Wire"> <view class="time-Wire">
<view class="time-round"></view> <view class="time-round"></view>
</view> </view>
<view class="time-date"> <view class="time-date">
<view class="time-num"> <view class="time-num">
<view>01/</view> <view>{{i.DateStr.slice(5,7)}}/</view>
<view>05</view> <view>{{i.DateStr.slice(8,10)}}</view>
</view> </view>
<view class="time-text"> <view class="time-text">
星期一 {{i.Week}}
</view> </view>
</view> </view>
</view> </view>
<van-swipe-cell class="content-right activeOne" <van-swipe-cell class="content-right"
:class="{'activeOne':indexs==0,'activeTwo':indexs==1,
'activeThree':indexs==2,'activeFour':indexs==3,
'activeFive':indexs==4,'activeSix':indexs==5,
'activeSeven':indexs==6}"
id="swipe-cell" id="swipe-cell"
:right-width="116" :right-width="116"
async-close> async-close
:disabled="true">
<view class="content-text-box"> <view class="content-text-box">
<view class="right-box"> <view class="right-box">
<view v-for="(item,index) in 6" class="Festival-box activeOne"> <view v-for="(item,index) in i.SubList"
<view>第一节</view> :key="index"
class="Festival-box activeOne"
:class="{'activeOne':item.StartTime=='09:30','activeTwo':item.StartTime=='11:10',
'activeThree':item.StartTime=='13:30','activeFour':item.StartTime=='15:10',
'activeFive':item.StartTime=='16:50','activeSix':item.StartTime=='19:00'}">
<view>
<text v-if="item.StartTime=='09:30'"></text>
<text v-if="item.StartTime=='11:10'"></text>
<text v-if="item.StartTime=='13:30'"></text>
<text v-if="item.StartTime=='15:10'"></text>
<text v-if="item.StartTime=='16:50'"></text>
<text v-if="item.StartTime=='19:00'"></text>
</view>
<view> <view>
09:30 {{item.StartTime}}
</view> </view>
</view> </view>
</view> </view>
...@@ -49,7 +66,7 @@ ...@@ -49,7 +66,7 @@
components: { components: {
}, },
props: ['day'], props: ['classList'],
setup(props) { setup(props) {
const { const {
proxy proxy
...@@ -86,12 +103,16 @@ ...@@ -86,12 +103,16 @@
padding: 0 0 0 33rpx; padding: 0 0 0 33rpx;
} }
.classList-content-box:last-child .time-Wire{
/* background: #ffffff; */
}
.time-Wire{ .time-Wire{
width: 1rpx; width: 1rpx;
height: 100%; height: 100%;
background: #A9A9A9; background: #A9A9A9;
position: relative; position: relative;
flex-shrink: 0; flex-shrink: 0;
margin-top: 50rpx;
} }
.time-round{ .time-round{
width: 15rpx; width: 15rpx;
...@@ -100,7 +121,7 @@ ...@@ -100,7 +121,7 @@
border-radius: 50%; border-radius: 50%;
position: absolute; position: absolute;
left: -6rpx; left: -6rpx;
top: 50rpx; top: 0;
} }
.time-date{ .time-date{
display: flex; display: flex;
...@@ -153,6 +174,9 @@ ...@@ -153,6 +174,9 @@
.content-right.activeSix{ .content-right.activeSix{
background: #EDF8F9; background: #EDF8F9;
} }
.content-right.activeSeven{
background: #E5E6FA;
}
.right-box{ .right-box{
display: flex; display: flex;
flex-direction: row; flex-direction: row;
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
<view class="header-hint">点击方框选择计划上课时间</view> <view class="header-hint">点击方框选择计划上课时间</view>
<view class="header-content"> <view class="header-content">
<view class="header-title"> <view class="header-title">
<view class="header-moon">{{moon}}</view> <view class="header-moon">{{month}}</view>
<view class="header-Festival"> <view class="header-Festival">
<view>6</view> <view>6</view>
<view></view> <view></view>
...@@ -112,21 +112,7 @@ ...@@ -112,21 +112,7 @@
proxy proxy
} = getCurrentInstance() } = getCurrentInstance()
const data = reactive({ const data = reactive({
isShowCalendar: false, month:"",
showlay: false,
date: "2月1号",
dateStr: "",
year: "",
moon:"",
weekStr:"",
weekTime:"",
minDateStr: new Date().getTime(),
maxDateStr: new Date().getTime(),
current: 0,
msg: {
Date: props.day,
School_Id: '-1',
},
titleList:[], titleList:[],
lessonList:[], lessonList:[],
classList:[ classList:[
...@@ -134,34 +120,38 @@ ...@@ -134,34 +120,38 @@
StartTime:'9:30', StartTime:'9:30',
EndTime:"11:00", EndTime:"11:00",
id:1,list:[ id:1,list:[
// {status:false,Date:"",DetailsId:""},
// {status:false,Date:"",DetailsId:""},
// {status:false,Date:"",DetailsId:""},
// {status:false,Date:"",DetailsId:""},
// {status:false,Date:"",DetailsId:""},
// {status:false,Date:"",DetailsId:""},
// {status:false,Date:"",DetailsId:""},
]}, ]},
{name:'第二节', {name:'第二节',
StartTime:'11:10', StartTime:'11:10',
EndTime:"12:40", EndTime:"12:40",
id:2,list:[]}, id:2,list:[
]},
{name:'第三节', {name:'第三节',
StartTime:'13:30', StartTime:'13:30',
EndTime:"15:00", EndTime:"15:00",
id:3,list:[]}, id:3,list:[
]},
{name:'第四节', {name:'第四节',
StartTime:'15:10', StartTime:'15:10',
EndTime:"14:40", EndTime:"14:40",
id:4,list:[]}, id:4,list:[
]},
{name:'第五节', {name:'第五节',
StartTime:'16:50', StartTime:'16:50',
EndTime:"18:20", EndTime:"18:20",
id:5,list:[]}, id:5,list:[
]},
{name:'第六节', {name:'第六节',
StartTime:'19:00', StartTime:'19:00',
EndTime:"20:30", EndTime:"20:30",
id:6,list:[]}, id:6,list:[
]},
] ]
}) })
const methods = { const methods = {
...@@ -215,7 +205,7 @@ ...@@ -215,7 +205,7 @@
if (res.Code == 1) { if (res.Code == 1) {
res.Data.forEach((item,index)=>{ res.Data.forEach((item,index)=>{
if(index==0){ if(index==0){
data.moon = item.DateStr.slice(5,7) data.month = item.DateStr.slice(5,7)
} }
let datas = { let datas = {
name: methods.getDateData(item.DateStr), name: methods.getDateData(item.DateStr),
...@@ -228,19 +218,21 @@ ...@@ -228,19 +218,21 @@
data.lessonList.forEach((item,index)=>{ data.lessonList.forEach((item,index)=>{
data.classList.forEach((items,indexs)=>{ data.classList.forEach((items,indexs)=>{
item.TimeList.forEach((itemT,indexT)=>{ item.TimeList.forEach((itemT,indexT)=>{
if(indexs==0&&indexT==0){ if(indexs==indexT){
items.list.push(itemT)
}if(indexs==1&&indexT==1){
items.list.push(itemT)
}if(indexs==2&&indexT==2){
items.list.push(itemT)
}if(indexs==3&&indexT==3){
items.list.push(itemT)
}if(indexs==4&&indexT==4){
items.list.push(itemT)
}if(indexs==5&&indexT==5){
items.list.push(itemT) items.list.push(itemT)
} }
// if(indexs==1&&indexT==1){
// items.list.push(itemT)
// }if(indexs==2&&indexT==2){
// items.list.push(itemT)
// }if(indexs==3&&indexT==3){
// items.list.push(itemT)
// }if(indexs==4&&indexT==4){
// items.list.push(itemT)
// }if(indexs==5&&indexT==5){
// items.list.push(itemT)
// }
}) })
}) })
......
<template> <template>
<view class="index-box"> <view class="index-box">
<!-- <Navbar>
<view class="navbar">
<van-icon name="arrow-left" size="36rpx" @click="back" />
<view class="dateStr">
上课计划
</view>
</view>
</Navbar> -->
<view class="titleHeader"> <view class="titleHeader">
<view class="titleHeader-year"> <view class="titleHeader-year">
<view>{{year}}{{month}}</view> <view>{{year}}{{month}}</view>
<view>计划 0节课</view> <view>计划 {{total}}节课</view>
</view> </view>
<scroll-view scroll-y="true" style="width:100%;height: 100%;">
<view class="titleHeader-dateStr"> <view class="titleHeader-dateStr">
<view v-for="item in titleList" <view v-for="item in titleList"
class="titleHeader-content"> class="titleHeader-content">
<view class="titleHeader-name">{{item.name}}</view> <view class="titleHeader-name">{{item.name}}</view>
<view class="titleHeader-num">{{item.num}}</view> <view class="titleHeader-num">{{item.num}}</view>
<view class="titleHeader-mark"> <view class="titleHeader-mark">
<view v-for="(item,index) in item.listNum" :key="index" <view v-for="(items,index) in item.listNum" :key="index"
:class="{'activeOne':index==0,'activeTwo':index==1, :class="{'activeOne':items.StartTime=='09:30','activeTwo':items.StartTime=='11:10',
'activeThree':index==2,'activeFour':index==3, 'activeThree':items.StartTime=='13:30','activeFour':items.StartTime=='15:10',
'activeFive':index==4,'activeSix':index==5}"></view> 'activeFive':items.StartTime=='16:50','activeSix':item.StartTime=='19:00'}"></view>
</view> </view>
</view> </view>
</view> </view>
</scroll-view>
</view> </view>
<view class="content-box"> <view class="content-box" v-if="dataList.length>0">
<scroll-view scroll-y="true" style="width:100%;height: 100%;"> <scroll-view scroll-y="true" style="width:100%;height: 100%;">
<classList></classList> <classList :classList="dataList"></classList>
</scroll-view> </scroll-view>
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1656570277000_611.png" <image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1656570277000_611.png"
class="addicon" class="addicon"
style="width: 157rpx;height: 157rpx;" style="width: 157rpx;height: 157rpx;"
@click="addPlan"/> @click="addPlan"/>
</view> </view>
<!-- <view class="noCourse-box"> <view class="noCourse-box" v-else>
<view class="noCourse"> <view class="noCourse">
<image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1656556494000_644.png" mode="" <image src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Test/Upload/Goods/1656556494000_644.png" mode=""
style="width: 426rpx;height: 344rpx;"></image> style="width: 426rpx;height: 344rpx;"></image>
...@@ -46,7 +40,7 @@ ...@@ -46,7 +40,7 @@
添加上课计划 添加上课计划
</view> </view>
</view> </view>
</view> --> </view>
</view> </view>
</template> </template>
...@@ -83,14 +77,16 @@ ...@@ -83,14 +77,16 @@
StartDate: "", StartDate: "",
EndDate: "", EndDate: "",
}, },
total:0,
dataList:[],
titleList:[ titleList:[
{name:'星期一',num:'',listNum:0}, {name:'星期一',num:'',listNum:[]},
{name:'星期二',num:'',listNum:0}, {name:'星期二',num:'',listNum:[]},
{name:'星期三',num:'',listNum:0}, {name:'星期三',num:'',listNum:[]},
{name:'星期四',num:'',listNum:0}, {name:'星期四',num:'',listNum:[]},
{name:'星期五',num:'',listNum:0}, {name:'星期五',num:'',listNum:[]},
{name:'星期六',num:'',listNum:0}, {name:'星期六',num:'',listNum:[]},
{name:'星期日',num:'',listNum:0}, {name:'星期日',num:'',listNum:[]},
] ]
}) })
const methods = { const methods = {
...@@ -166,32 +162,47 @@ ...@@ -166,32 +162,47 @@
dayTime)).getDate(); dayTime)).getDate();
arr.push(timeOne_year+'-'+timeOne_month+'-'+timeOne_date); arr.push(timeOne_year+'-'+timeOne_month+'-'+timeOne_date);
} }
return arr; for(let i=0;i<7;i++){
data.titleList.forEach((item,index) => {
if(i==index){
item.num = arr[i].slice(8,10)
}
});
}
data.msg.StartDate = arr[0]
data.msg.EndDate = arr[6]
methods.getList()
// return arr;
}, },
getList(){ getList(){
if(data.msg.StartDate){
uni.showLoading({ uni.showLoading({
title: '加载中...' title: '加载中...'
}) })
proxy.$request("/LeaveStudent/GetStuPlanAppointment", data.msg).then(res => { proxy.$request("/LeaveStudent/GetStuPlanAppointment", data.msg).then(res => {
if(res.Code ==1){ if(res.Code ==1){
uni.hideLoading() let arr = []
data.dataList = res.Data
data.dataList.forEach(item=>{
item.SubList.forEach(i=>{
arr.push(i)
})
data.titleList.forEach(i=>{
if(item.DateStr.slice(8,10)==i.num){
item.Week = i.name
i.listNum = item.SubList
} }
}) })
})
data.total = arr.length
uni.hideLoading()
} }
})
} }
onMounted(() => {
let timeArr = methods.getMonday(0);
let timeList = []
for(let i=0;i<7;i++){
data.titleList.forEach((item,index) => {
if(i==index){
item.num = timeArr[i].slice(8,10)
} }
});
} }
data.msg.StartDate = timeList[0] onMounted(() => {
data.msg.EndDate = timeList[6] methods.getMonday(0);
methods.getList()
methods.getDateData() methods.getDateData()
methods.getList() methods.getList()
......
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