<style lang="less">

</style>

<template>
    <div>
        <Row>
            <Col span="18">
                <Card>
                    <Form :label-width="100">
                        <FormItem label="产品id：">
                            <span>{{formContent.id}}</span>
                        </FormItem>
                        <FormItem label="产品列表：">
                            <span v-html="formContent.list"></span>
                        </FormItem>
                        <FormItem label="买家备注：">
                            <span>{{formContent.remark}}</span>
                        </FormItem>
                        <FormItem label="卖家备注：">
                            <span>{{formContent.info}}</span>
                        </FormItem>
                        <FormItem label="服务地址：">
                            <span>{{formContent.address}}</span>
                        </FormItem>
                        <FormItem label="联系人：">
                            <span>{{formContent.contact}}</span>
                        </FormItem>
                        <FormItem label="联系电话：">
                            <span>{{formContent.phone}}</span>
                        </FormItem>
                        <FormItem label="订单图片：">
                            <span v-html="photo"></span>
                        </FormItem>
                        <FormItem label="订单价格：">
                            <span>{{formContent.price}}</span>
                        </FormItem>
                        <FormItem label="订单状态：">
                            <span>{{formContent.status}}</span>
                        </FormItem>
                        <FormItem label="订单评论：">
                            <span>{{formContent.comment}}</span>
                        </FormItem>
                        <FormItem label="订单备注：">
                            <span>{{formContent.info}}</span>
                        </FormItem>
                    </Form>
                    <div class="submit">
                        <Button @click="back" size="large" type="primary">返回</Button>
                    </div>
                </Card>
            </Col>
        </Row>
    </div>
</template>

<script>
export default {
    name: 'detail',
    props: {
        formContent: Object
    },
    computed: {
        photo() {
            let src = this.formContent.photo;
            let html = "";
            if (src) {
                let imgs = src.split(";");
                imgs.forEach((img) => {
                    html += `<img src="${img}" style="margin-right:3px;" />`;
                });

            }
            return html;
        }
    },
    data () {
        return {

        }
    },
    methods: {
        back() {
            this.$emit("back");
        }
    }
};
</script>
