<template>
    <lj-win-common :show-back="false" ref="baseWin">
        <mu-tabs slot="header" :value.sync="active" inverse color="orange" indicator-color="orange" center
                 style="width:60%;margin: 0 auto 3px;background-color: #ffffff;" ref="headerDom">
            <mu-tab style="font-size:18px;font-weight: bold;">任务</mu-tab>
            <mu-tab style="font-size:18px;font-weight: bold;">审批</mu-tab>
        </mu-tabs>
        <div slot="body">
            <module-todo-workplan v-if="active === 0"/>
            <module-todo-doc v-if="active === 1"/>

            <div class="flowButton">
                <mu-button color="#888" icon @click="handleClickAddTask">
                    <i class="iconfont icon-ic_add"></i>
                </mu-button>
            </div>
        </div>
    </lj-win-common>
</template>

<script>
    import ModuleTodoWorkplan from "./module-todo-workplan";
    import ModuleTodoDoc from "./module-todo-doc";
    import LjWinCommon from "components/lj-win-common";
    export default {
        name: "tab-todo",
        components: {LjWinCommon, ModuleTodoDoc, ModuleTodoWorkplan},
        data() {
            return {
                active: 0
            }
        },
        methods: {
            handleClickAddTask() {
                $lj.openWin('workplan-edit');
            }
        }
    }
</script>

<style>
    
    .flowButton {
        background-color: #e0e0e0;
        position: fixed;
        bottom: 95px;
        right: 10px;
        border-radius: 50%;
        z-index: 999;
    }

    .lj-todo-group-title {
        font-size: 15px;
        font-weight: bold;
    }
    .lj-todo-card{
        /*position: relative;*/
        border-left: 3px solid;
        padding: 5px 5px 5px 10px;
        box-shadow: 0 2px 7px rgba(0, 0, 0, 0.1);
        background: #fff;
        margin-bottom: 10px;
    }
    .lj-todo-card-border-left-blue{
        border-left-color: #46a4da;
    }
    .lj-todo-card-border-left-green{
        border-left-color: #8dc026;
    }
    .lj-todo-card-border-left-red{
        border-left-color: #ff6f61;
    }
    .lj-todo-card-tip {
        color: #888;
        font-size: 12px;
        padding: 4px 10px;
        margin-left: 4px;
        background-color: #ececec;
        line-height: 12px;
        width: 56px;
        text-align: center;
    }
    .lj-todo-card-tip-red{
        color: #fa5a5a;
        background-color: #ffc3c3
    }
    .lj-todo-card-tip-blue{
        color: #46a4da;
        background-color: #afdcf8
    }
    .lj-todo-card-tip-grey{
        color: #888;
        background-color: #ececec
    }
    .lj-todo-card-content {
        line-height: 22px;
        font-size: 15px;
    }
    .lj-todo-card-dscrp {
        font-size: 12px;
        margin-right: 10px;
        border-radius: 5px;
        padding: 5px;
        background-color: #f7f7f7;
        line-height: 12px;
    }
</style>