123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132 |
- <template>
-
- <view class="employee_card" @click="selectOne">
- <view :class="{employee_card_left_box:right_nativate==true,
- employee_card_box:right_nativate==false}" >
- <view >
- <image class="image" mode="aspectFill" :src="imgUrl" />
- </view>
- <view class="employee_card_column">
- <label class="employee_card_top_box">{{name}}</label>
- <label class="employee_card_bottom_box">{{position}}</label>
- </view>
- </view>
- <view v-if="right_nativate" class="employee_card_right_box">
- <label class="right_label">></label>
- </view>
- </view>
- </template>
- <script>
- export default {
-
-
- name: 'employee-card',
- props: {
- right_nativate:
- {
- type:Boolean,
- default:true
- },
- employeeId:
- {
- type:String,
- default:'asdf'
- },
- name: {
- type: String,
- default: ''
- },
- position:{
- type:String,
- default:'程序员'
- },
- imgUrl:{
- type:String,
- default:'/static/userpic.png'
- },
- },
- methods:{
- selectOne(i, event) {
- let _id = this.employeeId;
- let _name = this.name;
- let response = {
- id: _id,
- name: _name
- };
- this.$emit('onEmployeeClick',response);
- }
- }
- }
- </script>
- <style>
- .image {
- margin:20rpx 20rpx 20rpx 20rpx;
- width: 100rpx;
- height: 100rpx;
- }
-
- .employee_card_column
- {
- display: flex;
- flex-direction: column;
- }
- .employee_card
- {
- display: flex;
- flex-direction: row;
- justify-content: space-around;
- position: relative;
- height: 140rpx;
- top:0rpx;
- left:0rpx;
- background-color: #FFFFFF!important;
- width: auto;
-
- }
- .employee_card_left_box
- {
- display: flex;
- flex-direction: row;
- height: 100%;
- width: 90%;
- }
- .employee_card_box
- {
- display: flex;
- flex-direction: row;
- height: 100%;
- width: 100%;
- }
- .employee_card_right_box
- {
- height: 100%;
- width: 10%;
- display: flex;
- justify-content: flex-end;
- padding-right: 20rpx;
- }
- .right_label
- {
- color: #C8C8C8;
- line-height: 140rpx;
- font-size: 40rpx;
- }
- .employee_card_top_box
- {
- height: 60%;
- font-weight: bold;
- line-height: 84rpx;
- font-size: 44rpx;
- margin-left: 20rpx;
- }
- .employee_card_bottom_box
- {
- height: 40%;
- line-height: 56rpx;
- font-size: 30rpx;
- margin-left: 20rpx;
- }
-
- </style>
|