<template>
    <div class="design-report-button"
        @click="preview">
        <div class="report-info-inner">{{report.name}}</div>
        <div class="report-main-inner"
            style="display:-webkit-box;-webkit-box-orient: vertical;-webkit-line-clamp:5;overflow: hidden;"
            :title="report.remark">{{report.remark}}</div>
        <div class="report-footer-inner">
            <span class="operate-block">
                <a @click.stop="preview">查看</a>
            </span>
        </div>
    </div>
</template>
<script>
import ReportApi from '@/api/report'

export default {
    name: 'ReportButton',
    data() {
        return {}
    },
    props: {
        report: {
            type: Object
        },

        reports: {
            type: Array
        }
    },
    components: {},
    computed: {},
    methods: {
        preview() {
            window.open(`./shower.html?_g=${this.report.guid}`)
        }
    },
    created() {

    }
};
</script>
<style lang="less">
.design-report-button {
    width: 23%;
    height: 180px;
    margin-bottom: 15px;
    margin-right: 15px;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 2px;

    &:hover {
        box-shadow: 0 0 6px 2px rgba(0, 0, 0, 0.15);
        cursor: pointer;
    }

    .report-info-inner {
        height: 32px;
        line-height: 32px;
        border-bottom: 1px solid rgba(0, 0, 0, 0.15);
        padding: 0 15px;
        position: relative;
        font-size: 12px;
        color: #7d869d;
    }

    .report-main-inner {
        font-size: 12px;
        height: 115px;
        padding: 8px 15px;
        line-height: 22px;
    }

    .report-footer-inner {
        height: 32px;
        line-height: 32px;
        padding: 0 15px;
        border-top: 1px solid rgba(0, 0, 0, 0.15);
        position: relative;

        .operate-block {
            position: absolute;
            right: 15px;

            .operate {
                &:after {
                    content: "";
                    display: inline-block;
                    width: 1px;
                    height: 13px;
                    background: rgba(0, 0, 0, 0.15);
                    vertical-align: middle;
                    margin: -2px 6px 0;
                }
            }
        }
    }
}
</style>