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.
76 lines
1.8 KiB
76 lines
1.8 KiB
2 years ago
|
<template>
|
||
|
<view class="cu-item">
|
||
|
<view class="cu-avatar round lg" :style="'background-image: url('+mainURL+'default-avator.png)'">
|
||
|
<!-- {{staff.cUserName.substring(-1)}} -->
|
||
|
</view>
|
||
|
<!-- <view class="cu-avatar round lg" >
|
||
|
{{staff.cUserName.slice(0,1)}}
|
||
|
</view> -->
|
||
|
<view class="content">
|
||
|
<view class="text-black">{{staff.userName}}
|
||
|
<text v-show="loginUser.id===staff.cUserId" class="padding-left-sm text-orange text-sm">
|
||
|
(当前登录账号)
|
||
|
</text>
|
||
|
</view>
|
||
|
<view class="text-gray flex" @tap="callStaff(staff.phone)">
|
||
|
<view class="text-cut text-df">
|
||
|
<text class="cuIcon-phone oil-main-color margin-right-xs"></text>
|
||
|
<text>{{staff.phone}}</text>
|
||
|
</view>
|
||
|
</view>
|
||
|
</view>
|
||
|
<view class="action solid-left" v-show="!staff.isAdmin">
|
||
|
<button class="cu-btn padding-left-xs padding-right-xs bg-white" @tap="toEdit(staff)">编辑</button>
|
||
|
</view>
|
||
|
<view class="action" v-show="staff.isAdmin==1">
|
||
|
<view class="cu-tag text-white round my-tag" style="background-color:#FE0505;">超级管理员</view>
|
||
|
</view>
|
||
|
</view>
|
||
|
</template>
|
||
|
|
||
|
<script>
|
||
|
export default {
|
||
|
props: {
|
||
|
staff: {
|
||
|
type: Object,
|
||
|
default () {}
|
||
|
}
|
||
|
},
|
||
|
data() {
|
||
|
return {
|
||
|
mainURL: this.global.mainURL,
|
||
|
loginUser: uni.getStorageSync('loginUser'),
|
||
|
};
|
||
|
},
|
||
|
methods: {
|
||
|
callStaff(phone) {
|
||
|
uni.makePhoneCall({
|
||
|
phoneNumber: phone
|
||
|
})
|
||
|
},
|
||
|
toEdit(item) {
|
||
|
uni.setStorageSync('tempUser',item)
|
||
|
uni.setStorageSync('tempUid', {
|
||
|
id: '',
|
||
|
type: 'edit'
|
||
|
})
|
||
|
let itmes = JSON.stringify(item)
|
||
|
uni.navigateTo({
|
||
|
url: '/packageStaff/pages/staff/editStaff/editStaff?staff='+itmes
|
||
|
})
|
||
|
}
|
||
|
},
|
||
|
|
||
|
|
||
|
}
|
||
|
</script>
|
||
|
|
||
|
<style scoped>
|
||
|
.cu-tag {
|
||
|
border-radius: 100upx 0 0 100upx;
|
||
|
position: absolute;
|
||
|
right: 0;
|
||
|
top: 30rpx;
|
||
|
}
|
||
|
</style>
|