228 lines
3.9 KiB
Vue
228 lines
3.9 KiB
Vue
|
<template>
|
||
|
<view class="content">
|
||
|
<view class="top-">
|
||
|
<u-search placeholder="搜索教练" v-model="queryParams.instructorName" @change="getDataInfo()"></u-search>
|
||
|
</view>
|
||
|
|
||
|
|
||
|
|
||
|
<view class="box_" v-for="(item,index) in dataList" :key="index ">
|
||
|
<view style="display: flex;align-items: center;justify-content: space-between;">
|
||
|
<view class="d-s">
|
||
|
<view class="touxiang">
|
||
|
<image @click="goDetails(item.id)" :src="imageUrl+item.image" mode=""></image>
|
||
|
</view>
|
||
|
<view class="">
|
||
|
<view @click="goDetails(item.id)" class="name_">{{item.instructorName}}</view>
|
||
|
</view>
|
||
|
|
||
|
</view>
|
||
|
<view style="display: flex;align-items: center;justify-content: space-between;">
|
||
|
|
||
|
<u-icon style="margin-right: 20px;" @click="makePhone(item.phone)" name="phone-fill" color="blue"
|
||
|
size="30"></u-icon>
|
||
|
|
||
|
</view>
|
||
|
</view>
|
||
|
|
||
|
<view class="b-s" @click="goDetails(item.id)">
|
||
|
<view class="w-d-s">
|
||
|
<view class="hei_">{{item.experienceYear}}年</view>
|
||
|
<view class="hui_">教龄</view>
|
||
|
|
||
|
|
||
|
</view>
|
||
|
|
||
|
<view class="w-d-s" @click="goDetails(item.id)">
|
||
|
<view class="hei_">{{item.student}}人</view>
|
||
|
|
||
|
<view class="hui_">学员数量</view>
|
||
|
</view>
|
||
|
</view>
|
||
|
</view>
|
||
|
<view style="width: 100%; height: 60px; "></view>
|
||
|
<!-- <view class="botttom-box">
|
||
|
<view class="anniu">添加教练</view>
|
||
|
</view> -->
|
||
|
</view>
|
||
|
</template>
|
||
|
|
||
|
<script>
|
||
|
import request from '../../utils/request'
|
||
|
export default {
|
||
|
data() {
|
||
|
return {
|
||
|
imageUrl: this.$imagesUrl,
|
||
|
keyword: '',
|
||
|
queryParams: {
|
||
|
pageNum: 1,
|
||
|
pageSize: 100,
|
||
|
deptId: uni.getStorageSync("deptId"),
|
||
|
name: null
|
||
|
|
||
|
},
|
||
|
dataList: []
|
||
|
}
|
||
|
},
|
||
|
onShow() {
|
||
|
this.getDataInfo()
|
||
|
},
|
||
|
onPullDownRefresh() {
|
||
|
console.log("刷新");
|
||
|
uni.stopPullDownRefresh()
|
||
|
},
|
||
|
onReachBottom() {
|
||
|
// this.show = true
|
||
|
setTimeout(() => {
|
||
|
console.log("加载执行");
|
||
|
}, 2000)
|
||
|
},
|
||
|
|
||
|
methods: {
|
||
|
makePhone(phoneNum) {
|
||
|
uni.makePhoneCall({
|
||
|
phoneNumber: phoneNum
|
||
|
})
|
||
|
},
|
||
|
goDetails(id) {
|
||
|
uni.navigateTo({
|
||
|
url: '/pages/index/CoachDetails?id=' + id
|
||
|
})
|
||
|
},
|
||
|
getDataInfo() {
|
||
|
request({
|
||
|
url: '/drivingSchool/system/schoolCoach/list',
|
||
|
method: 'get',
|
||
|
params: this.queryParams
|
||
|
}).then((res) => {
|
||
|
if (res.code == 200) {
|
||
|
this.dataList = res.rows
|
||
|
}
|
||
|
})
|
||
|
},
|
||
|
}
|
||
|
}
|
||
|
</script>
|
||
|
|
||
|
<style scoped lang="scss">
|
||
|
.content {
|
||
|
width: 100%;
|
||
|
background: #f4f5f6;
|
||
|
height: 100vh;
|
||
|
}
|
||
|
|
||
|
.container {
|
||
|
width: 100%;
|
||
|
background: #f4f5f6;
|
||
|
box-sizing: border-box;
|
||
|
padding-top: 88px;
|
||
|
}
|
||
|
|
||
|
.top- {
|
||
|
width: 100%;
|
||
|
|
||
|
height: 50px;
|
||
|
background: #FFFFFF;
|
||
|
box-sizing: border-box;
|
||
|
padding: 10px 15px;
|
||
|
|
||
|
}
|
||
|
|
||
|
.box_ {
|
||
|
width: 95%;
|
||
|
margin: 15px auto;
|
||
|
background: #FFFFFF;
|
||
|
border-radius: 8px;
|
||
|
box-sizing: border-box;
|
||
|
padding: 15px;
|
||
|
|
||
|
}
|
||
|
|
||
|
.d-s {
|
||
|
display: flex;
|
||
|
align-items: center;
|
||
|
}
|
||
|
|
||
|
.touxiang {
|
||
|
width: 46px;
|
||
|
height: 46px;
|
||
|
overflow: hidden;
|
||
|
border-radius: 50%;
|
||
|
margin-right: 10px;
|
||
|
|
||
|
image {
|
||
|
width: 100%;
|
||
|
height: 100%;
|
||
|
}
|
||
|
}
|
||
|
|
||
|
.name_ {
|
||
|
font-weight: bold;
|
||
|
font-size: 16px;
|
||
|
color: #333333;
|
||
|
}
|
||
|
|
||
|
.tel_ {
|
||
|
font-size: 14px;
|
||
|
color: #999999;
|
||
|
}
|
||
|
|
||
|
.g_ {
|
||
|
width: 95%;
|
||
|
margin: 10px auto;
|
||
|
}
|
||
|
|
||
|
.b-s {
|
||
|
width: 100%;
|
||
|
display: flex;
|
||
|
align-items: center;
|
||
|
justify-content: space-between;
|
||
|
border-top: 1px solid #EEEEEE;
|
||
|
margin-top: 10px;
|
||
|
}
|
||
|
|
||
|
.w-d-s {
|
||
|
width: 50%;
|
||
|
text-align: center;
|
||
|
margin-top: 15px;
|
||
|
|
||
|
|
||
|
}
|
||
|
|
||
|
.hui_ {
|
||
|
font-weight: 400;
|
||
|
font-size: 12px;
|
||
|
color: #999999;
|
||
|
|
||
|
}
|
||
|
|
||
|
.hei_ {
|
||
|
font-weight: bold;
|
||
|
font-size: 20px;
|
||
|
color: #333333;
|
||
|
color: #333333;
|
||
|
}
|
||
|
|
||
|
.botttom-box {
|
||
|
width: 100%;
|
||
|
height: 70px;
|
||
|
background: #FFFFFF;
|
||
|
position: fixed;
|
||
|
left: 0px;
|
||
|
bottom: 0px;
|
||
|
display: flex;
|
||
|
align-items: center;
|
||
|
justify-content: center;
|
||
|
}
|
||
|
|
||
|
.anniu {
|
||
|
width: 311px;
|
||
|
height: 40px;
|
||
|
background: #4AA76F;
|
||
|
display: flex;
|
||
|
align-items: center;
|
||
|
justify-content: center;
|
||
|
color: #fff;
|
||
|
border-radius: 50px;
|
||
|
}
|
||
|
</style>
|