<template>
    <div class=''>
        <div class="card m-top12" v-for="(item, index) in tableData" :key="index" >
           <div @click="$emit('handelTodetail',item)">
            <div class="flex">
                <van-tag :type="item.source % 2 === 0?'warning':'primary'">{{typeList[item.source]}}</van-tag>
                <div class="  opacity5 m-left12 font-size13">
                    {{ item.categoryName }}
                </div>
            </div>
            <div class="m-top5 flex flex-center">
                <img src="@/assets/images/icon/address.png" class="small_img m-right7">
                {{ item.serviceTargetName || '--' }} {{ item.serviceTargetMobile }}<br>
            </div>
            <div class="opacity5 font-size13 m-top5" style="margin-left: 29px;">{{ item.serviceTargetAddresses }}
                </div>
            <div class="m-top5  flex flex-center">
                <img src="@/assets/images/icon/time.png" class="small_img m-right7">
                <div style="font-size: 15px;">
                    {{ item.serviceTimeStart || '--'}} <span v-if="item.source === 1">至 {{item.serviceTimeEnd || '--'}}</span>
                </div>
            </div>
            <div class="m-top5 ">
                <div class="flex flex-center3">
                    <img src="@/assets/images/icon/content.png" style="vertical-align: top;" class="small_img m-right7">
                    <div class="van-multi-ellipsis--l2">{{ item.summary }}</div>
                </div>
            </div>
           </div>
            <hr class="m-top12-right opacity5">
            <div class="flex flex-fend m-top12-right">
                <van-button size="small" type="info" class="m-left12 rounded-corner m-top5-bottom" v-if="item.processStatus === 10" @click="$emit('handleCLickReceive',item)">接单</van-button>
                <van-button size="small" type="default" round  class="m-left12 rounded-corner m-top5-bottom" v-if="item.processStatus === 20 && item.source === 4 ">联系需求人</van-button>
                <van-button size="small" type="info" class="m-left12 rounded-corner m-top5-bottom" v-if="item.processStatus === 20 &&!item.confirmedFlag" @click="$emit('handelServiceConfirm',item)">确认服务</van-button>
                <van-button size="small" type="info" class="m-left12 rounded-corner m-top5-bottom" v-if="item.processStatus === 20 && item.confirmedFlag">完成服务</van-button>

            </div>
        </div>
    </div>
</template>

<script>
export default {
    data() {
        return {
            typeList:['公共服务','共性需求','政策找人','服务找人','个性需求','温暖找人','技能找人','岗位找人']
        };
    },
    props: {
        tableData: {
            type: Array,
            default: () => []
        }
    },
    created() { },
    methods: {},
    components: {},
    computed: {},
    watch: {},
}
</script>

<style lang='less'>
/deep/ .van-tabs__content{
    padding: 0 10px;
    box-sizing: border-box;
}
</style>
