<template>
|
|
<view class="item">
|
|
<view class="info" @click="selectUser">
|
|
<view class="" @click="selectUser">
|
|
<u-checkbox-group>
|
|
<u-checkbox shape="circle" v-model="DrugInfo.check" @change="changechecked" active-color="#01AEEA"></u-checkbox>
|
|
</u-checkbox-group>
|
|
</view>
|
|
<view class="box">
|
|
<view class="name_box">
|
|
<text class="name">{{DrugInfo.name}}</text>
|
|
<text class="name_btn">{{DrugInfo.labelValue}}</text>
|
|
</view>
|
|
<view class="other_info">
|
|
<text>{{DrugInfo.sex ==1? '男': '女'}}</text>
|
|
<!-- <text>{{DrugInfo.age || 18}}</text> -->
|
|
<text>{{DrugInfo.phone.substr(0,3)+'****' +DrugInfo.phone.substr(7)}}</text>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="btn">
|
|
<template v-if="type == 1">
|
|
<view class="circular flex align-center justify-center m-r-30" @click="edit">
|
|
<image :src="IMG_URL + 'drug_user/edit.png'" mode=""></image>
|
|
<!-- <u-icon name="edit-pen" color="#707070" size="46"></u-icon> -->
|
|
</view>
|
|
<view class="circular flex align-center justify-center" @click="deleteById">
|
|
<image :src="IMG_URL + 'drug_user/close.png'" mode=""></image>
|
|
<!-- <u-icon name="trash" color="#707070" size="46"></u-icon> -->
|
|
</view>
|
|
</template>
|
|
<u-icon name="arrow-right" v-else></u-icon>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
|
|
<script>
|
|
import { IMG_URL } from '@/env.js'
|
|
export default {
|
|
props: {
|
|
DrugInfo: {
|
|
type: Object,
|
|
default(){
|
|
return {}
|
|
}
|
|
},
|
|
type: {
|
|
type: String | Number,
|
|
default: 1
|
|
}
|
|
},
|
|
data () {
|
|
return {
|
|
checked: false,
|
|
IMG_URL
|
|
}
|
|
},
|
|
methods:{
|
|
changechecked() {
|
|
this.$emit('changechecked',this.DrugInfo.id);
|
|
},
|
|
selectUser() {
|
|
this.$emit('selectUser',this.DrugInfo.id);
|
|
},
|
|
edit(){
|
|
this.$emit('edit',this.DrugInfo.id);
|
|
},
|
|
deleteById() {
|
|
this.$emit('deleteById',this.DrugInfo.id);
|
|
}
|
|
|
|
}
|
|
}
|
|
</script>
|
|
|
|
<style lang="scss" scoped>
|
|
.item {
|
|
width: 680rpx;
|
|
margin: 0 auto;
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
border-bottom: 1px solid #DCDCDC;
|
|
|
|
&:last-child {
|
|
border-bottom: none;
|
|
}
|
|
|
|
.info {
|
|
margin-left: 24rpx;
|
|
display: flex;
|
|
align-items: center;
|
|
|
|
.box {
|
|
margin-top: 20rpx;
|
|
margin-left: 24rpx;
|
|
display: flex;
|
|
flex-direction: column;
|
|
.name_box {
|
|
font-size: 32rpx;
|
|
color: #000;
|
|
margin-top: 37rpx;
|
|
margin-bottom: 17rpx;
|
|
display: flex;
|
|
.name{
|
|
font-size: 32rpx;
|
|
font-weight: bold;
|
|
}
|
|
.name_btn {
|
|
margin-left: 10rpx;
|
|
font-size: 24rpx;
|
|
color: #0C85FF;
|
|
border-radius: 10rpx;
|
|
border: 1px solid #0C85FF;
|
|
padding: 5rpx 10rpx;
|
|
display: flex;
|
|
justify-content: center;
|
|
align-items: center;
|
|
}
|
|
|
|
}
|
|
|
|
.other_info {
|
|
display: flex;
|
|
font-size: 26rpx;
|
|
padding-bottom: 23rpx;
|
|
color: #000;
|
|
|
|
text {
|
|
margin-right: 38rpx;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
.btn{
|
|
display: flex;
|
|
margin-top: 40rpx;
|
|
image{
|
|
width: 62rpx;
|
|
height: 62rpx;
|
|
margin-left: 38rpx;
|
|
border-radius: 50%;
|
|
}
|
|
}
|
|
}
|
|
</style>
|