Commit 9a558d23 authored by 罗超's avatar 罗超

2

parent 1f3433e4
...@@ -11,12 +11,16 @@ ...@@ -11,12 +11,16 @@
</view> </view>
</view> </view>
</Navbar> </Navbar>
<view class=""> <view v-if="teacherList.length>0">
<swiper class="swiper" circular previous-margin="36rpx" next-margin="36rpx" @change="changeSwiper"> <swiper class="swiper" circular previous-margin="36rpx" next-margin="36rpx" :current="current"
<swiper-item v-for="(item,index) in teacherList" :key="index" style="display: flex;align-items: center;"> @change="changeSwiper">
<view class="swiper-item" :class="current== index ? 'activeSwiper' : 'swiper-item'"> <swiper-item v-for="(item,index) in teacherList" :key="index"
style="display: flex;align-items: center;">
<view class="swiper-item" :class="current== index ? 'activeSwiper' : 'swiper-item'">
<view class="imgBox"> <view class="imgBox">
<image :src="item.TeacherHead" mode="aspectFill" style="width: 100%;height: 100%;border-radius: 20rpx;box-shadow: 4rpx 3rpx 10rpx 0rpx #D6DCE4;"></image> <image :src="item.TeacherHead" mode="aspectFill"
style="width: 100%;height: 100%;border-radius: 20rpx;box-shadow: 4rpx 3rpx 10rpx 0rpx #D6DCE4;">
</image>
</view> </view>
<view class="teacherInfo"> <view class="teacherInfo">
<view class="teacherInfoNameBox"> <view class="teacherInfoNameBox">
...@@ -44,14 +48,90 @@ ...@@ -44,14 +48,90 @@
(4课时.180分钟) (4课时.180分钟)
</view> </view>
<view class="borderB"> <view class="borderB">
</view> </view>
</view> </view>
<view class="list"> <view class="list" v-if="courselist.length>0">
<view v-for="(item,index) in dataList" :key="index"> <view v-for="(item,index) in courselist" :key="index">
<view class="type1"> <view class="type2box" v-if="Array.isArray(item)">
<view v-for="(_item,_index) in item" :key="_index" class="type2">
<view class="left">
<text class="leftItem" style="color: #111111;">{{item.StartTime}}</text>
<i class="iconfont icon-moreandroid leftItem"></i>
<text class="leftItem">{{_item.EndTime}}</text>
<image
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/coffee.png"
mode="" style="width: 38rpx;height: 38rpx;position: absolute;left:50%;transform: translateX(-50%);bottom: -8rpx;z-index:1" v-if="_index!==item.length-1"></image>
</view>
<view class="right">
<view class="classroom" style="width: 100%;">
<text class="schoolName">
{{schoolName}}
</text>
<text class="">
{{roomName}}教室
</text>
</view>
<view class="desc" style="width: 100%;">
<image
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/book.png"
mode="" style="width: 30rpx;height: 30rpx;margin-right: 10rpx;"></image>
A1的3.1.1《かぞく》
</view>
</view>
</view>
<view class="yuyueBox">
<image
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/people.png"
mode="" style="width: 30rpx;height: 30rpx;"></image>
<view class="yuyueNum">
已报6人
</view>
<view class="yuyueBtn">
预约
</view>
</view>
</view> </view>
<view class="type1" v-else>
<view class="left">
<text class="leftItem" style="color: #111111;">{{item.StartTime}}</text>
<i class="iconfont icon-moreandroid leftItem"></i>
<text class="leftItem">{{item.EndTime}}</text>
</view>
<view class="right">
<view class="classroom" style="width: 100%;">
<text class="schoolName">
{{schoolName}}
</text>
<text class="">
{{roomName}}教室
</text>
</view>
<view class="desc" style="width: 100%;">
<image
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/people.png"
mode="" style="width: 30rpx;height: 30rpx;margin-right: 10rpx;"></image>
已报6人
</view>
</view>
<view class="yuyueBtn">
预约
</view>
</view>
</view>
</view>
<view class="" v-if="courselist.length!==0">
<image
src="https://viitto-1301420277.cos.ap-chengdu.myqcloud.com/Static/educationStu/noCourse.png"
mode="" style="width: 166rpx;height: 166rpx;"></image>
<view class="">
暂无可约课程
</view> </view>
</view> </view>
</view> </view>
...@@ -70,28 +150,32 @@ ...@@ -70,28 +150,32 @@
components: { components: {
Navbar Navbar
}, },
props:['day'], props: ['day'],
setup(props) { setup(props) {
const {proxy} = getCurrentInstance() const {
proxy
} = getCurrentInstance()
const data = reactive({ const data = reactive({
isShowCalendar: false, isShowCalendar: false,
date: "2月1号", date: "2月1号",
dateStr: "", dateStr: "",
year: "", year: "",
current:0, current: 0,
teacherList:[{ teacherList: [{
name:'张三' name: '张三'
},{ }, {
name:'李四' name: '李四'
},{ }, {
name:'王五' name: '王五'
}], }],
msg:{ msg: {
Date:props.day, Date: props.day,
School_Id:'-1', School_Id: '-1',
}, },
dataList:[], basics: {},
basics:{}, courselist: [],
schoolName: "",
roomName: "",
}) })
const methods = { const methods = {
onConfirmCalendar(val) { onConfirmCalendar(val) {
...@@ -134,23 +218,72 @@ ...@@ -134,23 +218,72 @@
data.year = year data.year = year
data.dateStr = month + "月" + day + '号(' + weekStr + ')' data.dateStr = month + "月" + day + '号(' + weekStr + ')'
}, },
changeSwiper(val){ changeSwiper(val) {
data.current=val.detail.current data.current = val.detail.current
console.log(val.detail.current) data.courselist = data.teacherList[val.detail.current].CourseTimeList
data.courselist.push({
name:1,
SortIdentify:1
})
data.courselist.push({
name:2,
SortIdentify:1
})
data.courselist.push({
name:3,
SortIdentify:1
})
data.courselist.push({
name:4,
SortIdentify:2
})
data.courselist.push({
name:5,
SortIdentify:2
})
methods.courseGroup()
console.log('课程', data.courselist)
}, },
getTeacherList(){ getTeacherList() {
uni.showLoading({ uni.showLoading({
title:'加载中...' title: '加载中...'
}) })
proxy.$request("/AppletCenter/GetScrollAppointmentTeacherList", data.msg).then(res => { proxy.$request("/AppletCenter/GetScrollAppointmentTeacherList", data.msg).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
data.teacherList =res.Data; data.teacherList = res.Data;
if (data.teacherList.length > 0) {
data.courselist = data.teacherList[0].CourseTimeList
data.schoolName = data.teacherList[0].SchoolName
data.roomName = data.teacherList[0].RoomName
methods.courseGroup()
}
uni.hideLoading() uni.hideLoading()
} }
}) })
}, },
getBaseInfo(){ // 课程分组
proxy.$request("/AppletCenter/GetScrollAppointmentBaseInfo",{}).then(res => { courseGroup() {
let obj = {}
data.courselist.map((item, index) => {
if (item.SortIdentify) {
if (!obj[item.SortIdentify]) {
obj[item.SortIdentify] = [item]
} else {
obj[item.SortIdentify].push(item)
}
}
})
data.courselist.forEach((e, i) => {
if (obj[e.SortIdentify] && obj[e.SortIdentify].length > 1) {
data.courselist.splice(i, 1, obj[e.SortIdentify])
}
})
data.courselist = Array.from(new Set(data.courselist))
},
getBaseInfo() {
proxy.$request("/AppletCenter/GetScrollAppointmentBaseInfo", {}).then(res => {
if (res.Code == 1) { if (res.Code == 1) {
data.basics = res.Data; data.basics = res.Data;
// that.judge() // that.judge()
...@@ -199,11 +332,13 @@ ...@@ -199,11 +332,13 @@
font-weight: 500; font-weight: 500;
color: #888888; color: #888888;
} }
.swiper{
.swiper {
height: 360rpx; height: 360rpx;
} }
.swiper-item{
width:100%; .swiper-item {
width: 100%;
height: 235rpx; height: 235rpx;
/* background-color: #f0fed1; */ /* background-color: #f0fed1; */
margin: 0 10rpx; margin: 0 10rpx;
...@@ -215,16 +350,19 @@ ...@@ -215,16 +350,19 @@
box-sizing: border-box; box-sizing: border-box;
padding: 0 40rpx; padding: 0 40rpx;
} }
.swiper-item .imgBox{
.swiper-item .imgBox {
width: 280rpx; width: 280rpx;
height: 360rpx; height: 360rpx;
overflow: hidden; overflow: hidden;
} }
.activeSwiper{
.activeSwiper {
height: 295rpx !important; height: 295rpx !important;
padding: 0 !important; padding: 0 !important;
} }
.teacherInfo{
.teacherInfo {
box-sizing: border-box; box-sizing: border-box;
padding: 30rpx; padding: 30rpx;
flex-grow: 1; flex-grow: 1;
...@@ -232,25 +370,29 @@ ...@@ -232,25 +370,29 @@
height: 100%; height: 100%;
overflow: hidden; overflow: hidden;
} }
.teacherInfoNameBox{
.teacherInfoNameBox {
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
margin-bottom: 10rpx; margin-bottom: 10rpx;
} }
.teacherInfoName{
.teacherInfoName {
font-size: 34rpx; font-size: 34rpx;
font-family: PingFang SC; font-family: PingFang SC;
font-weight: bold; font-weight: bold;
color: #111111; color: #111111;
} }
.teacherInfoBtn{
.teacherInfoBtn {
font-size: 20rpx; font-size: 20rpx;
font-family: PingFang SC; font-family: PingFang SC;
font-weight: 500; font-weight: 500;
color: #4C50E7; color: #4C50E7;
} }
.top{
.top {
width: 678rpx; width: 678rpx;
/* height: 174rpx; */ /* height: 174rpx; */
background-color: #4C50E7; background-color: #4C50E7;
...@@ -260,7 +402,8 @@ ...@@ -260,7 +402,8 @@
padding: 30rpx 40rpx; padding: 30rpx 40rpx;
position: relative; position: relative;
} }
.topinfo{
.topinfo {
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
font-size: 20rpx; font-size: 20rpx;
...@@ -269,14 +412,16 @@ ...@@ -269,14 +412,16 @@
color: #989BF6; color: #989BF6;
margin-bottom: 10rpx; margin-bottom: 10rpx;
} }
.topinfoCourse{
.topinfoCourse {
font-size: 34rpx; font-size: 34rpx;
font-family: PingFang SC; font-family: PingFang SC;
font-weight: 800; font-weight: 800;
color: #FFFFFF; color: #FFFFFF;
margin-bottom: 4rpx; margin-bottom: 4rpx;
} }
.top .borderB{
.top .borderB {
position: absolute; position: absolute;
bottom: 0rpx; bottom: 0rpx;
left: -18rpx; left: -18rpx;
...@@ -284,28 +429,202 @@ ...@@ -284,28 +429,202 @@
width: 95vw; width: 95vw;
height: 25rpx; height: 25rpx;
border-radius: 12rpx; border-radius: 12rpx;
background: linear-gradient(0deg, rgba(17, 21, 177, 0.5), rgba(17, 21, 177, 0.2),rgba(17, 21, 177, 0.01)); background: linear-gradient(0deg, rgba(17, 21, 177, 0.5), rgba(17, 21, 177, 0.2), rgba(17, 21, 177, 0.01));
} }
.CourseTime{
.CourseTime {
font-size: 22rpx; font-size: 22rpx;
font-family: PingFang SC; font-family: PingFang SC;
font-weight: 400; font-weight: 400;
color: #FFFFFF; color: #FFFFFF;
} }
.list .type1{
.TeacherIntro {
font-size: 20rpx;
font-family: PingFang SC;
font-weight: 400;
color: #888888;
height: 200rpx;
overflow-y: scroll;
}
.list .type1 {
width: 678rpx; width: 678rpx;
height: 196rpx; height: 196rpx;
background: #FFFFFF; background: #FFFFFF;
box-shadow: 2rpx 4rpx 40rpx 0rpx rgba(212, 212, 212, 0.6); box-shadow: 2rpx 4rpx 40rpx 0rpx rgba(212, 212, 212, 0.6);
border-radius: 16rpx; border-radius: 16rpx;
margin: 10rpx 0; margin: 10rpx 0;
display: flex;
margin: 0 auto;
margin-bottom: 30rpx;
overflow: hidden;
position: relative;
} }
.TeacherIntro{
.type1 .left {
width: 165rpx;
height: 100%;
background-color: #F5F5F5;
font-size: 30rpx;
font-family: PingFang SC;
font-weight: bold;
display: flex;
flex-wrap: wrap;
justify-content: center;
align-content: space-around;
box-sizing: border-box;
padding: 20rpx;
}
.type1 .leftItem {
width: 100%;
text-align: center;
color: #cfcfcf;
}
.type1 .right {
width: 360rpx;
display: flex;
flex-wrap: wrap;
justify-content: center;
align-content: space-around;
box-sizing: border-box;
padding: 20rpx 0 20rpx 30rpx;
position: relative;
}
.type1 .classroom {
font-size: 30rpx;
font-family: PingFang SC;
font-weight: bold;
color: #111111;
}
.type1 .desc {
display: flex;
align-items: center;
font-size: 22rpx;
font-family: PingFang SC;
font-weight: 500;
color: #888888;
}
.classroom .schoolName {
margin-right: 30rpx;
}
.type1 .yuyueBtn {
position: absolute;
right: 35rpx;
top: 50%;
transform: translateY(-50%);
font-size: 20rpx; font-size: 20rpx;
font-family: PingFang SC; font-family: PingFang SC;
font-weight: 400; font-weight: 500;
color: #FFFFFF;
display: flex;
align-items: center;
justify-content: center;
box-sizing: border-box;
height: 50rpx;
width: 90rpx;
background-color: #4C50E7;
border-radius: 25rpx;
}
.type2box{
width: 678rpx;
margin: 0 auto;
border-radius: 16rpx;
box-shadow: 2rpx 4rpx 40rpx 0rpx rgba(212, 212, 212, 0.6);
margin-bottom: 30rpx;
box-sizing: border-box;
position: relative;
}
.type2 {
width: 100%;
height: 196rpx;
background-color: #FFFFFF;
display: flex;
}
.type2 .left {
width: 165rpx;
height: 100%;
background-color: #F5F5F5;
font-size: 30rpx;
font-family: PingFang SC;
font-weight: bold;
display: flex;
flex-wrap: wrap;
justify-content: center;
align-content: space-around;
box-sizing: border-box;
padding: 20rpx;
position: relative;
}
.type2 .leftItem {
width: 100%;
text-align: center;
color: #cfcfcf;
}
.type2 .right {
width: 360rpx;
display: flex;
flex-wrap: wrap;
justify-content: center;
align-content: space-around;
box-sizing: border-box;
padding: 20rpx 0 20rpx 30rpx;
/* margin-right: 100rpx; */
position: relative;
border-bottom: 1px solid #E9E9E9;
}
.type2 .classroom {
font-size: 30rpx;
font-family: PingFang SC;
font-weight: bold;
color: #111111;
}
.type2 .desc {
display: flex;
align-items: center;
font-size: 22rpx;
font-family: PingFang SC;
font-weight: 500;
color: #888888; color: #888888;
height: 200rpx; }
overflow-y: scroll; .type2box .yuyueBox{
position: absolute;
right: 35rpx;
top: 50%;
transform: translateY(-50%);
text-align: center;
}
.type2box .yuyueNum{
font-size: 22rpx;
font-family: PingFang SC;
font-weight: 500;
color: #888888;
margin-bottom: 20rpx;
}
.type2box .yuyueBtn {
font-size: 20rpx;
font-family: PingFang SC;
font-weight: 500;
color: #FFFFFF;
display: flex;
align-items: center;
justify-content: center;
box-sizing: border-box;
height: 50rpx;
width: 90rpx;
background-color: #4C50E7;
border-radius: 25rpx;
} }
</style> </style>
...@@ -176,6 +176,7 @@ import { getStundentPlanStatistical, setStudentLeave } from "../../api/index"; ...@@ -176,6 +176,7 @@ import { getStundentPlanStatistical, setStudentLeave } from "../../api/index";
export default { export default {
setup() { setup() {
let Toast = inject("$toast"); let Toast = inject("$toast");
const indexData=uni.getStorageSync('indexData')
let data = reactive({ let data = reactive({
showType: false, showType: false,
TimeChoose: false, TimeChoose: false,
...@@ -296,6 +297,9 @@ export default { ...@@ -296,6 +297,9 @@ export default {
StartTime: data.data.startTime, StartTime: data.data.startTime,
EndTime: data.data.endTime, EndTime: data.data.endTime,
ClassId: data.leaveMsg.ClassId, ClassId: data.leaveMsg.ClassId,
CouseId:indexData.CourseId,
ClassScrollType:indexData.ClassScrollType
}; };
let res = await getStundentPlanStatistical(msg); let res = await getStundentPlanStatistical(msg);
data.isShowAllCheck = true; data.isShowAllCheck = true;
......
...@@ -110,6 +110,7 @@ ...@@ -110,6 +110,7 @@
}, },
setup(props) { setup(props) {
const Toast = inject('$toast') const Toast = inject('$toast')
const indexData=uni.getStorageSync('indexData')
let weekArr = ["日", "一", "二", "三", "四", "五", "六"]; let weekArr = ["日", "一", "二", "三", "四", "五", "六"];
//年月选择 //年月选择
let currentDate = ref(0); let currentDate = ref(0);
...@@ -196,9 +197,11 @@ ...@@ -196,9 +197,11 @@
}) })
let data = reactive({ let data = reactive({
msg: { msg: {
ClassId: 0, ClassId: indexData.ClassId,
StartTime: "", StartTime: "",
EndTime: "", EndTime: "",
CouseId:indexData.CourseId,
ClassScrollType:indexData.ClassScrollType
}, },
statusBarHeight: 0, statusBarHeight: 0,
dataList: [], dataList: [],
...@@ -445,13 +448,9 @@ ...@@ -445,13 +448,9 @@
}; };
}, },
onShow() { onShow() {
const indexData = uni.getStorageSync('indexData')
// this.msg.ClassId = indexData.ClassId
this.msg.ClassId = '1'
this.msg.StartTime = getToday('y', 'm') + '-01'; this.msg.StartTime = getToday('y', 'm') + '-01';
this.msg.EndTime = getToday('y', 'm') + '-' + getMonthMaxDay(); this.msg.EndTime = getToday('y', 'm') + '-' + getMonthMaxDay();
if (this.$isLogin()) { if (this.$isLogin()) {
// this.getData()
this.getAllData() this.getAllData()
} }
}, },
......
@font-face { @font-face {
font-family: "iconfont"; /* Project id 2734547 */ font-family: "iconfont"; /* Project id 2734547 */
src: url('//at.alicdn.com/t/font_2734547_4b4m4a7c8zb.woff2?t=1643252260604') format('woff2'), src: url('//at.alicdn.com/t/font_2734547_vr2ckwvviob.woff2?t=1643341931052') format('woff2'),
url('//at.alicdn.com/t/font_2734547_4b4m4a7c8zb.woff?t=1643252260604') format('woff'), url('//at.alicdn.com/t/font_2734547_vr2ckwvviob.woff?t=1643341931052') format('woff'),
url('//at.alicdn.com/t/font_2734547_4b4m4a7c8zb.ttf?t=1643252260604') format('truetype'); url('//at.alicdn.com/t/font_2734547_vr2ckwvviob.ttf?t=1643341931052') format('truetype');
} }
.iconfont { .iconfont {
...@@ -13,24 +13,12 @@ ...@@ -13,24 +13,12 @@
-moz-osx-font-smoothing: grayscale; -moz-osx-font-smoothing: grayscale;
} }
.icon-calendar:before { .icon-moreandroid:before {
content: "\e746"; content: "\e6a5";
}
.icon-tuixue:before {
content: "\e639";
}
.icon-quxiao:before {
content: "\e933";
}
.icon-daifukuai:before {
content: "\e650";
} }
.icon-zhengchang:before { .icon-calendar:before {
content: "\e616"; content: "\e746";
} }
.icon-caidanzu:before { .icon-caidanzu:before {
......
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