Commit 803dfdcc authored by youjie's avatar youjie

no message

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