123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361 |
- <template>
- <view class="record">
- <u-popup v-model="stu_show" mode="center" border-radius="42" width="85%">
- <view class="student-show">
- <view class="stu-title">
- 学生基本信息
- </view>
- <view class="stu-mess">
- <image :src="stu_detail.headimg ? stu_detail.headimg : '../../static/images/avator.png'" mode="">
- </image>
- <view class="right">
- <view class="stu-text">
- 姓名:{{stu_detail.truename}}
- </view>
- <view class="stu-text">
- 学号:{{stu_detail.account}}
- </view>
- <view class="stu-text">
- 班级:{{stu_detail.class ? stu_detail.class :'--'}}
- </view>
- <view class="stu-text">
- 手机号:{{stu_detail.mobile ? stu_detail.mobile :'--'}}
- </view>
- </view>
- </view>
- <view class="e-mail">
- <u-icon name="email"></u-icon>{{stu_detail.email ? stu_detail.email :'--'}}
- </view>
- <view class="remark-title">
- {{stu_detail.sex==2?"她":"他"}}的需求
- </view>
- <view class="remark">
- {{stu_detail.demand}}
- </view>
- </view>
- </u-popup>
- <view class="" v-if="list.length>0">
- <view class="item" v-for="(item,index) in list" :key='index'>
- <view class="item-left">
- <view class="image" :style="{backgroundImage:'url('+ item.teacher.headimg +')'}">
-
- </view>
- <!-- <image :src="item.teacher.headimg" mode=""></image> -->
- <view class="name">
- {{item.teacher.truename}}
- </view>
- </view>
- <view class="item-right">
- <view class="text">
- 值班时间:
- <view class="time">
- {{item.start_time}}-{{item.end_time}}
- </view>
- </view>
- <view class="text">
- 值班日期:
- <view class="time">
- {{item.day}}
- </view>
- </view>
- <view class="text">
- 有无预约:
- <view class="time">
- {{item.student ? '有预约' :'无预约' }}
- </view>
- </view>
- </view>
- <view class="cancel" v-if="item.student" @click="stuDetail(item.student)">
- 查看学生
- </view>
- </view>
- </view>
- <view class="empty" v-else>
- <view class="enptyStatus">
- <image src="../../static/empty.png" mode=""></image>
- <view class="words">
- 暂无内容
- </view>
- </view>
- </view>
- </view>
- </template>
- <script>
- export default {
- data() {
- return {
- list: [],
- page: 1,
- stu_show: false,
- stu_detail: '',
- teacher_id: '',
- last: false
- }
- },
- onShow() {
- if(this.is_weixin()){
- this.navTitle()
- }
- this.list = []
- this.page = 1
- this.last = false
- this.getList()
- },
- onReachBottom() {
- if (!this.last) {
- this.page++
- }
- console.log(this.page)
- this.getList()
- },
- methods: {
- //判断是否是微信
- is_weixin() {
- let ua = navigator.userAgent.toLowerCase();
- return ua.indexOf('micromessenger') != -1;
- },
- navTitle() {
- let navTitle = document.getElementsByTagName('uni-page-head');
- navTitle[0].style.display = 'none'
- },
- getList() {
- let teacher_id = this.$store.state.vuex_user.type_id
- this.$u.get('/mentor/scheduling', {
- teacher_id: teacher_id,
- page: this.page,
- per_page:15
- }).then(res => {
- let data = res.data.list
- console.log(res, 'course1')
- if (this.page > 1 && data.length == 0) {
- uni.showToast({
- title: '暂无更多',
- icon: 'none'
- })
- this.last = true
- } else {
- this.list = this.list.concat(data)
- }
- })
- },
- stuDetail(item) {
- this.stu_show = true
- this.stu_detail = item
- }
- }
- }
- </script>
- <style lang="scss" scoped>
- .record {
- padding: 0 20px;
- }
- .enptyStatus{
- display: flex;
- justify-content: center;
- align-items: center;
- flex-direction: column;
- padding: 30px 10px;
- image{
- width: 120px;
- height: 150px;
- margin-top: 100px;
- }
- .words{
- color: #ffae21;
- font-size: 18px;
- padding-top: 18px;
- }
- }
- .item {
- display: flex;
- position: relative;
- align-items: center;
- padding: 10px;
- margin-top: 12px;
- font-size: 13px;
- background: rgba(234, 237, 242, .28);
- border-radius: 7px;
-
- .tips {
- position: absolute;
- width: 57px;
- height: 20px;
- background: #C1915A;
- line-height: 20px;
- font-size: 12px;
- font-family: PingFang SC;
- font-weight: 400;
- color: #FFFFFF;
- opacity: 1;
- opacity: 1;
- right: 12px;
- z-index: 2;
- top: 0;
- text-align: center;
- border-radius: 0px 0px 6px 6px;
- }
- .item-left {
- text-align: center;
- width: 30%;
- .image {
- height: 42px;
- width: 42px;
- border: solid 1px;
- border-radius: 50%;
- display: inline-block;
- background-position: center;
- background-repeat: no-repeat;
- background-size: cover;
- }
- .name {
- font-size: 10px;
- font-family: PingFang SC;
- font-weight: 400;
- text-align: center;
- line-height: 20px;
- color: #292929;
- opacity: 1
- }
- }
- .item-right {
- width: 47%;
- .text {
- line-height: 17px;
- font-size: 12px;
- font-family: PingFang SC;
- font-weight: 400;
- color: #282828;
- opacity: 1;
- .time {
- font-family: PingFang SC;
- font-weight: 400;
- color: #282828;
- opacity: 1;
- display: inline-block;
- margin-left: 15px;
- margin-top: 5px;
- }
- }
- }
- .cancel {
- // width: 60px;
- display: inline-block;
- padding: 2px 10px;
- // height: 23px;
- // line-height: 23px;
- border: 1px solid rgba(193, 145, 90, 0.44);
- border-radius: 12px;
- font-size: 12px;
- font-family: PingFang SC;
- font-weight: 500;
- line-height: 20px;
- color: #C1915A;
- opacity: 1;
- text-align: center;
- }
- }
- //查看学生信息弹框
- .student-show {
- padding-bottom:5px;
- .stu-title {
- font-size: 20px;
- font-family: PingFang SC;
- font-weight: bold;
- line-height: 20px;
- color: #282828;
- opacity: 1;
- text-align: center;
- padding: 35px 0;
- }
- .stu-mess {
- display: flex;
- padding: 0 22px;
- image {
- height: 75px;
- width: 75px;
- margin-right: 14px;
- border-radius: 9px;
- }
- .right {
- flex: 1;
- .stu-text {
- font-size: 13px;
- font-family: PingFang SC;
- font-weight: 400;
- line-height: 20px;
- color: #282828;
- }
- }
- }
- .e-mail {
- margin: 18px 22px 22px;
- height: 36px;
- line-height: 36px;
- font-size: 14px;
- font-family: PingFang SC;
- font-weight: bold;
- color: rgba(40, 40, 40, .78);
- border-bottom: 1px solid rgba(112, 112, 112, .06);
- }
- .remark-title {
- margin: 10px 22px 0px;
- padding: 5px;
- font-size: 13px;
- font-family: PingFang SC;
- font-weight: bold;
- line-height: 20px;
- color: #282828;
- opacity: 0.61;
- }
-
- .remark {
- margin: 0px 22px 22px;
- font-size: 12px;
- font-family: PingFang SC;
- font-weight: 400;
- line-height: 20px;
- color: #282828;
- opacity: 0.54;
- padding: 5px;
- overflow: hidden;
- display: -webkit-box; //将对象作为弹性伸缩盒子模型显示;
-
- text-overflow: ellipsis; //溢出部分用省略号代替
-
- -webkit-line-clamp: 3; //设置文本显示两行
-
- -webkit-box-orient: vertical; //从上到下排列子元素;
-
- white-space: normal;
- // border-bottom: 1px solid rgba(112, 112, 112, .06);
- }
- }
- </style>
|