<template>
    <el-dialog title="反馈" :close-on-click-modal="false" append-to-body :visible.sync="visible" width="800px"
        @close="closeDialog" style="min-height: 400px;">
        <el-timeline :reverse="true">
            <el-timeline-item v-for="(item, index) in feedbackDetail" :key="index" :timestamp="item.updateTime" placement="top">
                <div v-if="item.feedbackType == 1">
                    <div>是否联系：<span>{{ item.isContact ? '已联系' : '未联系' }}</span></div>
                    <div>到场时间：<span>{{ item.arrivalTime }}</span></div>
                    <div>备注：<span>{{ item.remark }}</span></div>
                </div>
                <div v-if="item.feedbackType == 2">
                    <div>到场状态：<span v-if="item.arrivalStatus == 1">未到场</span>
                        <span v-if="item.arrivalStatus == 2">到场未成交</span>
                        <span v-if="item.arrivalStatus == 3">到场已成交</span>
                    </div>
                    <div> 备注：<span>{{ item.remark }}</span></div>
                </div>
            </el-timeline-item>
        </el-timeline>
    </el-dialog>
</template>
<script>
import { listFeedbackDetail } from '@/api/zs/feedbackDetail';

export default {
    name: 'FeedbackDialog',
    data() {
        return {
            visible: false,
            feedbackDetail: [],
        };
    },
    methods: {
        init(info = undefined) {
            this.visible = true;
            this.$nextTick(() => {
                this.getFeedbackDetail(info);
            });
        },
        closeDialog() {
            this.$emit('update:dialog.batchUpdateVisible', false);
        },
        getFeedbackDetail(orderId) {
            listFeedbackDetail({ orderId: orderId }).then(resp => {
                this.feedbackDetail = resp.rows;
            });
        }

    }
};
</script>
  
  