<template>
    <a-drawer
    :visible="CWvisible"
    class="drawerStyle CheckWork"
    placement="right"
    width="40%"
    @after-visible-change="afterVisibleChange"
    >
        <div class="drawerMain">
            <div class="header">
                <div class="headerTitle">查看作业</div>
                <img 
                style="width:29px;height:29px;cursor:pointer"
                src="../../assets/images/basicinfo/close.png" 
                @click="closeDrawer"
            />
            </div>
            <div class="main">
                <div class="basetext"><span>基础信息</span></div>
                <div class="HW Name"><span>作业名称：</span ><span style="color:#999ba3">{{"管理者进阶作业"}}</span></div>
                <div class="HW Need"><span>作业要求：</span ><span style="color:#999ba3">{{"写一篇观后感，字数600字"}}</span></div>
                <div class="HWText">
                    <span>作业信息：</span>
                    <div class="hwText">
                        <img src="@/assets/images/projectadd/keep.png"/>
                        <div class="hwName">{{"京东方商业模型.jpeg"}}</div>
                        <div class="op"> <span>查看</span> </div>
                        <div class="op"> <span>下载</span> </div>
                    </div>
                </div>
            </div>
            <div class="btnn">
                <button class="btn1">取消</button>
                <button class="btn2">确定</button>
            </div>
        </div>
    </a-drawer>
</template>

<script>
import { toRefs,reactive } from '@vue/reactivity';
export default {
    name:"CheckWork",
    props:{
        CWvisible:{
            type:Boolean,
            default:false,
        },
    },
    setup(props,ctx){
        const state = reactive({

        })
        const closeDrawer = ()=> {
            ctx.emit("update:CWvisible",false)
        }
        const afterVisibleChange = (bool) => {
            console.log(bool);
        }
        return{
            ...toRefs(state),
            closeDrawer,
            afterVisibleChange,
        }
    }
};
</script>
<style lang="scss">
.CheckWork {
    .drawerMain {
        min-width: 400px;
        margin: 0px 32px 0px 32px;
        display: flex;
        flex-direction: column;
        .header {
            height: 73px;
            border-bottom: 1px solid #e8e8e8;
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 20px;
            .headerTitle {
                font-size: 18px;
                font-weight: 600;
                color: #333333;
                line-height: 25px;
            }
        }
        .main {
            width: 100%;
            overflow-y: auto;
            margin-bottom: 70px;
            .basetext{
                font-size: 16px;
                font-weight: 600;
                color: #333333;
                line-height: 25px;
                margin-bottom: 27px ;
            }
            .HW{
                margin-bottom: 20px;
            }
            .hwText{
                display: flex;
                align-items: center;
                margin: 15px auto;
                img{
                    background-size: 100% 100%;
                }
                .hwName{
                    margin:auto 10px;
                }
                .op{
                    color:#4ea6ff;
                    margin: auto 20px;
                    cursor: pointer;
                }
            }
        }

        .btnn {
            height: 72px;
            width: 100%;
            position: absolute;
            bottom: 0;
            left: 0;
            background-color: #fff;
            display: flex;
            align-items: center;
            justify-content: center;
            box-shadow: 0px 1px 35px 0px rgba(118, 136, 166, 0.16);
            .btn1 {
                width: 100px;
                height: 40px;
                border: 1px solid #4ea6ff;
                border-radius: 8px;
                color: #4ea6ff;
                background-color: #fff;
                cursor: pointer;
            }
            .btn2 {
                cursor: pointer;
                width: 100px;
                height: 40px;
                background: #4ea6ff;
                border-radius: 8px;
                border: 0;
                margin-left: 15px;
                color: #fff;
            }
        }
    }
}
</style>