|
@@ -105,15 +105,17 @@
|
|
|
|
|
|
|
|
|
<view :class="current_time==-1 ? 'active-item':'item'" @click="changeTime(-1)">
|
|
|
- <image class="all" v-if="current_time==-1" src="../../static/images/all.png" mode=""></image>
|
|
|
+ <image class="all" v-if="current_time==-1" src="../../static/images/all.png" mode="">
|
|
|
+ </image>
|
|
|
全部时间
|
|
|
- <image class="jian" v-if="current_time==-1" src="../../static/images/01.png" mode=""></image>
|
|
|
+ <image class="jian" v-if="current_time==-1" src="../../static/images/01.png" mode="">
|
|
|
+ </image>
|
|
|
</view>
|
|
|
<view :class="current_time==index? 'active-item':'item'" v-for="(item,index) in time_list"
|
|
|
:key='index' @click="changeTime(item,index)">
|
|
|
{{item.start_time}}-{{item.end_time}}
|
|
|
<image v-if="current_time==index" class="jian" src="../../static/images/01.png" mode="">
|
|
|
- <!-- <image v-if="current_time==item.id" class="jian" src="../../static/images/01.png" mode=""> -->
|
|
|
+ <!-- <image v-if="current_time==item.id" class="jian" src="../../static/images/01.png" mode=""> -->
|
|
|
</image>
|
|
|
</view>
|
|
|
</view>
|
|
@@ -121,17 +123,17 @@
|
|
|
<view class="right">
|
|
|
|
|
|
<view class="" v-for="(item,index) in shedule_list" :key='index'>
|
|
|
-
|
|
|
- <view class="item" v-if="item.scheduling && index==current_time && index!=-1">
|
|
|
+ <view class="item"
|
|
|
+ v-if="item.scheduling && index==current_time && index!=-1 && item.scheduling.type==1">
|
|
|
<view class="item-left">
|
|
|
- <view class="image" :style="{backgroundImage:'url('+ (item.scheduling ? item.scheduling.teacher.headimg :'../../static/images/add.png') +')'}">
|
|
|
-
|
|
|
+ <view class="image"
|
|
|
+ :style="{backgroundImage:'url('+ (item.scheduling && item.scheduling.teacher? item.scheduling.teacher.headimg :'../../static/images/add.png') +')'}">
|
|
|
</view>
|
|
|
<!-- <image
|
|
|
:src="item.scheduling ? item.scheduling.teacher.headimg :'../../static/images/add.png'"
|
|
|
mode=""></image> -->
|
|
|
<view class="name">
|
|
|
- {{item.scheduling ? item.scheduling.teacher.truename : ''}}
|
|
|
+ {{item.scheduling && item.scheduling.teacher? item.scheduling.teacher.truename : ''}}
|
|
|
</view>
|
|
|
</view>
|
|
|
<!-- {{item}} -->
|
|
@@ -166,21 +168,56 @@
|
|
|
<view class="" v-if="!item.scheduling">
|
|
|
{{ item.is_scheduling == false ? '已过期' : '立即排班' }}
|
|
|
</view>
|
|
|
-
|
|
|
</view>
|
|
|
-
|
|
|
+ <view class="item"
|
|
|
+ v-if="item.scheduling && index==current_time && index!=-1 && item.scheduling.type==2">
|
|
|
+ <view class="item-left">
|
|
|
+ <view class="image"
|
|
|
+ :style="{backgroundImage:'url('+ (item.scheduling && item.scheduling.student? item.scheduling.student.headimg :'../../static/images/add.png') +')'}">
|
|
|
+ </view>
|
|
|
+ <!-- <image
|
|
|
+ :src="item.scheduling ? item.scheduling.teacher.headimg :'../../static/images/add.png'"
|
|
|
+ mode=""></image> -->
|
|
|
+ </view>
|
|
|
+ <!-- {{item}} -->
|
|
|
+ <view class="item-right">
|
|
|
+ <view class="text">
|
|
|
+ <view class="tips" v-if="!item.scheduling.teacher"
|
|
|
+ @click="jieshou(item.scheduling)">
|
|
|
+ 接收需求
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="text">
|
|
|
+ <view class="time">
|
|
|
+ 学生姓名:{{item.scheduling && item.scheduling.student? item.scheduling.student.truename : ''}}
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="text">
|
|
|
+ <view class="time">
|
|
|
+ 需求类型:{{item.scheduling.remark}}
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="text">
|
|
|
+ <view class="time">
|
|
|
+ 接收老师:{{item.scheduling.teacher ? item.scheduling.teacher.truename : '--'}}
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="" v-if="!item.scheduling">
|
|
|
+ {{ item.is_scheduling == false ? '已过期' : '立即排班' }}
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
<!-- 当时间未全部index==0 -->
|
|
|
-
|
|
|
- <view class="item" v-if="item.scheduling && current_time==-1">
|
|
|
+ <view class="item" v-if="item.scheduling && current_time==-1 && item.scheduling.type==1">
|
|
|
<view class="item-left">
|
|
|
- <view class="image" :style="{backgroundImage:'url('+ (item.scheduling ? item.scheduling.teacher.headimg :'../../static/images/add.png') +')'}">
|
|
|
-
|
|
|
+ <view class="image"
|
|
|
+ :style="{backgroundImage:'url('+ (item.scheduling && item.scheduling.teacher ? item.scheduling.teacher.headimg :'../../static/images/add.png') +')'}">
|
|
|
</view>
|
|
|
<!-- <image
|
|
|
:src="item.scheduling ? item.scheduling.teacher.headimg :'../../static/images/add.png'"
|
|
|
mode=""></image> -->
|
|
|
<view class="name">
|
|
|
- {{item.scheduling ? item.scheduling.teacher.truename : ''}}
|
|
|
+ {{item.scheduling&&item.scheduling.teacher ? item.scheduling.teacher.truename : ''}}
|
|
|
</view>
|
|
|
</view>
|
|
|
<!-- {{item}} -->
|
|
@@ -216,6 +253,43 @@
|
|
|
{{ item.is_scheduling == false ? '已过期' : '立即排班' }}
|
|
|
</view>
|
|
|
</view>
|
|
|
+ <view class="item" v-if="item.scheduling && current_time==-1 && item.scheduling.type==2">
|
|
|
+ <view class="item-left">
|
|
|
+ <view class="image"
|
|
|
+ :style="{backgroundImage:'url('+ (item.scheduling && item.scheduling.student? item.scheduling.student.headimg :'../../static/images/add.png') +')'}">
|
|
|
+ </view>
|
|
|
+ <!-- <image
|
|
|
+ :src="item.scheduling ? item.scheduling.teacher.headimg :'../../static/images/add.png'"
|
|
|
+ mode=""></image> -->
|
|
|
+ </view>
|
|
|
+ <!-- {{item}} -->
|
|
|
+ <view class="item-right">
|
|
|
+ <view class="text">
|
|
|
+ <view class="tips" v-if="!item.scheduling.teacher"
|
|
|
+ @click="jieshou(item.scheduling)">
|
|
|
+ 接收需求
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="text">
|
|
|
+ <view class="time">
|
|
|
+ 学生姓名:{{item.scheduling && item.scheduling.student? item.scheduling.student.truename : ''}}
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="text">
|
|
|
+ <view class="time">
|
|
|
+ 需求类型:{{item.scheduling.remark}}
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="text">
|
|
|
+ <view class="time">
|
|
|
+ 接收老师:{{item.scheduling.teacher ? item.scheduling.teacher.truename : '--'}}
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
+ <view class="" v-if="!item.scheduling">
|
|
|
+ {{ item.is_scheduling == false ? '已过期' : '立即排班' }}
|
|
|
+ </view>
|
|
|
+ </view>
|
|
|
<view class="add add1" v-if=" item.is_scheduling == true && index == current_time">
|
|
|
<image src="../../static/images/pass1.png" mode="widthFix"></image>
|
|
|
<view class="add-buttom" v-if="current_time != -1" @click="teacher_show = true">
|
|
@@ -280,7 +354,7 @@
|
|
|
</view>
|
|
|
|
|
|
</view>
|
|
|
- </view>
|
|
|
+ </view>
|
|
|
<tab-bar :current="1"></tab-bar>
|
|
|
</view>
|
|
|
|
|
@@ -375,7 +449,26 @@
|
|
|
this.getSheuling()
|
|
|
})
|
|
|
},
|
|
|
-
|
|
|
+ jieshou(item) {
|
|
|
+ //接收学生
|
|
|
+ var data = {
|
|
|
+ teacher_id: this.teacher_id,
|
|
|
+ scheduling_id: item.id
|
|
|
+ }
|
|
|
+ var that = this;
|
|
|
+ uni.showModal({
|
|
|
+ title: '接收需求',
|
|
|
+ content: '你确定要接收当前需求吗?',
|
|
|
+ success(res) {
|
|
|
+ if (res.confirm) {
|
|
|
+ that.$u.post('mentor/scheduling/receive-student', data).then(res => {
|
|
|
+ console.log(res)
|
|
|
+ that.getSheuling()
|
|
|
+ })
|
|
|
+ }
|
|
|
+ }
|
|
|
+ })
|
|
|
+ },
|
|
|
//获取通知公告
|
|
|
getNotice() {
|
|
|
this.$u.get('/notice').then(res => {
|
|
@@ -505,14 +598,14 @@
|
|
|
},
|
|
|
//选择时间段
|
|
|
changeTime(item, index) {
|
|
|
- console.log(item,'llllllll')
|
|
|
+ console.log(item, 'llllllll')
|
|
|
if (item.id) {
|
|
|
- this.current_time =index
|
|
|
+ this.current_time = index
|
|
|
this.time = item
|
|
|
} else {
|
|
|
this.current_time = item
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
},
|
|
|
//选择本周还是下周
|
|
|
async changTab(index) {
|
|
@@ -568,7 +661,8 @@
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
.sheduling {
|
|
|
- padding-bottom: 70px;
|
|
|
+ padding-bottom: 70px;
|
|
|
+
|
|
|
//添加排班弹框
|
|
|
.pop_wrap {
|
|
|
width: 290px;
|
|
@@ -895,7 +989,7 @@
|
|
|
flex: 0 0 100px;
|
|
|
height: 425px;
|
|
|
|
|
|
-
|
|
|
+
|
|
|
opacity: 1;
|
|
|
overflow-y: auto;
|
|
|
border-radius: 0px 0px 0px 12px;
|
|
@@ -938,7 +1032,7 @@
|
|
|
|
|
|
.right {
|
|
|
flex: 1;
|
|
|
- margin-left:3px;
|
|
|
+ margin-left: 3px;
|
|
|
height: 425px;
|
|
|
overflow-y: scroll;
|
|
|
|
|
@@ -1214,4 +1308,4 @@
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
-</style>
|
|
|
+</style>
|