<template>
    <div>
        <div style="padding: 10px 10px 0 10px;font-size:14px;line-height:19px;">
            <div class="arrow_box" :style="{borderLeft:GetColor(item.deptid)}">
                <mu-row>
                    <mu-col span="8" style="font-size:13px;color:#888">
                        <span>{{item.opdate}}</span>
                        <span style="margin-left:10px">{{item.opemp}}</span>
                    </mu-col>
                    <mu-col span="4" style="font-weight: bold;text-align: right;">
                        <mu-badge :content="item.deptid > 0?item.departmentname:'全公司'" :color="item.deptid > 0 ?'#46a4da':'#8dc026'"></mu-badge>
                    </mu-col>
                </mu-row>
                <div style="margin:10px 0;text-indent:2em">
                    {{item.dscrp}}
                </div>

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

<script>
    export default {
        name: "gonggao-item",
        props: {
            item: {
                // 传入数据
                type: Object
            }
        },
        data() {
            return {}
        },
        methods: {
            GetColor(deptid) {
                let result = "";
                if (deptid < 0) {
                    result = "5px solid #8dc026"
                } else {
                    result = "5px solid #46a4da"
                }
                return result;
            },
        }
    }
</script>
<style>
    .arrow_box {
        position: relative;
        padding: 5px 5px 5px 10px;
        box-shadow: 0 2px 7px rgba(0, 0, 0, 0.1);
        background: #fff;
        margin-bottom: 8px;
    }

    .order_conner {
        position: absolute;
        right: 0px;
        top: 0px;
        /* color: #888; */
        font-size: 12px;
        padding: 4px 10px;
        /* background-color: #ececec; */
        line-height: 12px;
        width: 36px;
        text-align: center;
        font-weight: bold;
    }
</style>