You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

236 lines
4.7 KiB

<template>
<view style="width: 100%;">
<view class="careItem">
<view class="careItemLeft" :data-item='info' @click="bindItemClick">
<image :src="info.avatar_url" class="carerface"></image>
</view>
<view class="careItemRight">
<view class="careItemLine" :data-item='info' @click="bindItemClick">
<view class="careItemLineLeft">
<text class="careItemLineLeftText">{{info.name}}</text> <text class="careItemGe">|</text>
<text class="careItemLineLeftText">{{info.mobile}}</text>
</view>
<view class="careItemLineRight ">
<text class="carerstatus"
:class="info.ongoing_orders_count>0?'carerstatusOrange':'carerstatusGreen'">{{info.ongoing_orders_count>0?"工作中":"空闲中"}}</text>
</view>
</view>
<view class="careItemLine" style="margin-top: 11rpx;" :data-item='info' @click="bindItemClick">
<view class="careItemLineLeft">
<view class="careItemTag tag1">
<text class="careItemTagText">1年护理经验</text>
</view>
</view>
</view>
<view class="careItemLine">
<view class="careItemLineLeft" :data-item='info' @click="bindItemClick">
<view class="starBox">
<block v-for="(item,index) in starsOn">
<text class="iconfont icon-star icon-star-on "></text>
</block>
<block v-for="(item,index) in starsOff">
<text class="iconfont icon-star icon-star-off"></text>
</block>
<text class="starScore">4.0</text>
</view>
</view>
<view class="careItemLineRight" v-if="isCheck==1" @click="bindChange" :data-item='info' :data-index='index' :data-type='type'>
<text class="iconfont icon-check" :class="info.checked?'icon-check-on':''"></text>
</view>
</view>
</view>
</view>
</view>
</template>
<script>
export default {
name: "carerinfo",
props: {
info: {
type: Object
},
isCheck: {
type: String,
default: "0"
},
type: {
type: String,
default: "list"
},
index:{
type:Number,
default:0
}
},
data() {
return {
starsOn: [1, 2, 3, 4],
starsOff: [5]
};
},methods:{
bindChange: function(e) {
var type = e.currentTarget.dataset.type;
var item = e.currentTarget.dataset.item;
var index = e.currentTarget.dataset.index;
this.$emit("change", {
item:item,
type:type,
index:index
});
},
bindItemClick:function(e){
var item = e.currentTarget.dataset.item;
this.$emit("click", {
item:item
});
}
}
}
</script>
<style>
.careItem {
display: flex;
justify-content: space-between;
background: #FFFFFF;
border-bottom: 1px solid #E6E6E6;
padding: 20rpx 0rpx;
font-size: 30rpx;
}
.careItem .careItemLeft {
width: 100rpx;
}
.careItem .careItemLeft .carerface {
width: 80rpx;
height: 80rpx;
border-radius: 100%;
border: 1rpx #CCCCCC solid;
}
.careItem .careItemRight {
flex: 1;
}
.careItem .careItemRight .careItemLine {
display: flex;
justify-content: space-between;
align-items: center;
}
.careItem .careItemRight .careItemLineLeft {
display: flex;
align-items: center;
}
.careItemLineLeftText {
font-family: PingFangSC-Regular;
color: #333333;
letter-spacing: 0;
line-height: 40rpx;
}
.careItem .careItemRight .careItemLineLeft .careItemGe {
color: #D8D8D8;
font-size: 24rpx;
margin: 0rpx 16rpx;
}
.carerstatus {
font-family: PingFangSC-Regular;
font-size: 28rpx;
letter-spacing: 0;
text-align: left;
line-height: 40rpx;
}
.carerstatusOrange {
color: #FD8C30;
}
.carerstatusGreen {
color: #0CB790;
}
.careItemTag {
background: rgba(13, 201, 158, 0.10);
border-radius: 2px;
padding: 1rpx 10rpx;
margin-right: 10rpx;
box-sizing: border-box;
height: 28rpx;
line-height: 13rpx;
}
.careItemTagText {
font-family: SourceHanSansCN-Normal;
font-size: 20rpx;
text-align: center;
}
.tag1 {
color: #0DC99E;
}
.tag2 {
color: #4A90E2;
}
.tag3 {
color: #FD8C30;
}
.tagBox1 {}
.tagBox2 {
background: rgba(60, 145, 245, 0.10);
}
.tagBox3 {
background: rgba(253, 140, 48, 0.10);
}
.icon-star {
font-size: 24rpx;
margin-right: 8rpx;
}
.icon-star-on {
color: #FDB030;
}
.icon-star-off {
color: #E4E4E4;
}
.starScore {
font-family: PingFangSC-Regular;
font-size: 28rpx;
color: #999999;
letter-spacing: 0;
text-align: left;
line-height: 32rpx;
}
.iconfont{
}
.icon-check{
color: #CCCCCC;
font-size: 28px;
}
.icon-check-on{
color: #0DC99E;
font-size: 28px;
}
</style>