<style lang="less">

</style>

<template>
    <div>
        <Row>
            <Col span="18">
                <Card>
                    <Form :label-width="100">
                        <FormItem label="分类1：">
                            <span>{{formContent.classify1}}</span>
                        </FormItem>
                        <FormItem label="分类2：">
                            <span>{{formContent.classify2}}</span>
                        </FormItem>
                        <FormItem label="选项：">
                            <span>{{formContent.options}}</span>
                        </FormItem>
                        <FormItem label="备注：">
                            <span>{{formContent.notes}}</span>
                        </FormItem>
                        <FormItem label="联系人：">
                            <span>{{formContent.contact}}</span>
                        </FormItem>
                        <FormItem label="服务地址：">
                            <span>{{formContent.address}}</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>
                    </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;
            if (src) {
                return `<img src="${src}" />`;
            } else {
                return '';
            }
        }
    },
    data () {
        return {

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