<template>
    <view class="item">
        <view class="item-img">
            <img src="/static/img/dd.png" alt="" />
        </view>
        <view class="item-info">
            <view class="item-title-box">
                <view class="item-title">
                    <view class="item-name">
                        <!-- <dict-tag :options="lrr_service_category" :value="data.serviceCategory" /> -->
                        姓名: {{ }}
                    </view>
                    <dict-tag :options="order_status" :value="data.orderStatus" />
                </view>
                <view class="item-de">类别：</view>
                <view class="item-de">综合评分：</view>
                <view class="item-de">技能简介：</view>

                <!-- <view class="item-de">
                    服务地址：{{ data.address }}
                </view> -->
            </view>
            <view class="item-box">
                <view>
                    <dict-tag :options="lrr_study" :value="data.serviceType" v-if="data.serviceCategory === 2" />
                    <dict-tag :options="lrr_chitchat" :value="data.serviceType" v-if="data.serviceCategory === 1" />
                </view>
                <view class="rank-num">
                   <!-- <label class="rank-label">No.</label>11 -->
                    <img src="/static/img/no1.png" alt="" class="no-img" />
                </view>

            </view>
        </view>
    </view>
</template>

<script setup>
import { inject } from 'vue';
import DictTag from '@/components/DictTag/index.vue'
import { computed } from 'vue';

const props = defineProps({
    data: {
        type: Object,
        default: () => {
            return {}
        }
    },
});

const inject_click = inject('onClick');

const lrr_chitchat = inject('lrr_chitchat');
const lrr_study = inject('lrr_study');
const order_status = inject('order_status');

const btn_style = ` width: 120rpx; height: 50rpx; font-size: 24rpx;border-radius: 25rpx;margin-left: 12rpx;`;

/**
 * 1: 查看
 * 2：沟通
 * 3：上传照片
 */
function onClick() {
    inject_click(props.data, 1);
}
</script>

<style lang="scss" scoped>
.item {
    height: 120px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 1);
    padding: 12px;
    margin-bottom: 12px;
    display: flex;

    .item-img {
        width: 96px;
        height: 96px;
        margin-right: 12px;

        image {
            height: 100%;
            width: 100%;
        }
    }

    .item-info {
        flex: 1;
        display: flex;
        // flex-direction: column;
        align-items: center;
        justify-content: space-between;

        .item-title-box {
            .item-title {
                font-size: 14px;
                font-weight: 700;
                letter-spacing: 0px;
                // line-height: 20.27px;
                color: rgba(51, 51, 51, 1);
                text-align: left;
                vertical-align: top;
                margin-bottom: 10px;

                display: flex;
                align-content: center;
                justify-content: space-between;

                .item-name {
                    flex: 1;
                    display: flex;
                    // display: -webkit-box;
                    // -webkit-box-orient: vertical;
                    // -webkit-line-clamp: 1;
                    // overflow: hidden;
                    // text-overflow: ellipsis;
                    // word-break: break-all;
                }

                .item-tag {
                    //    color: #3c9cff;
                }

            }

            .item-de {
                font-size: 12px;
                font-weight: 500;
                letter-spacing: 0px;
                line-height: 21.38px;
                color: rgba(153, 153, 153, 1);
                text-align: left;
                vertical-align: top;

                display: -webkit-box;
                -webkit-box-orient: vertical;
                -webkit-line-clamp: 2;
                overflow: hidden;
                text-overflow: ellipsis;
                word-break: break-all;
            }
        }

        .item-box {
            display: flex;
            align-content: flex-end;
            justify-content: space-between;

            .item-price {
                font-size: 18px;
                font-weight: 500;
                letter-spacing: 0px;
                line-height: 21.09px;
                color: rgba(246, 74, 31, 1);
                text-align: center;
                vertical-align: top;

                .item-price-yuan {
                    font-size: 13px;
                    font-weight: 700;
                    letter-spacing: 0px;
                    line-height: 21.09px;
                    color: rgba(246, 74, 31, 1);
                }
            }

            .item-btns {
                display: flex;
            }
        }
    }


    .no-img {
        width: 47px;
        height: 36px;
    }
    .rank-num {
        font-size: 20px;
        font-weight: 700;
        line-height: 23.44px;
        color: rgba(51, 51, 51, 1);
    }
    .rank-label{
        font-size: 14px;
        font-weight: 500;
        line-height: 16.41px;
        color: rgba(153, 153, 153, 1);
    }
}
</style>