<template>
  <a-drawer
    :visible="Importvisible"
    class="drawerStyle importstu"
    placement="right"
    width="50%"
    @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="download">
            <span class="placedown">请下载</span>
            <span class="template">模板</span>
            <span class="placedown">，按要求填写数据并导入</span>
         </div>
         <div class="upload">
            <span class="uptext">上传:</span>
            <div>
                <!-- 导入学员上传 -->
                <div class="upbox" style="display: none">
                    <div class="uploadimg"><img src="../../assets/images/taskpage/upload.png"/></div>
                    <div class="draghere">点击或将文件拖拽到此处上传</div>
                    <div class="support">支持扩展名：.xls/.xlsx</div>
                </div>
                <!-- 导入学员上传 -->
                <!-- 导入学员上传（有状态）-正在上传 -->
                <div class="alreadybox">
                    <div class="alimg"><img src="../../assets/images/studentimg/xls.png"/></div>
                    <div class="upproject">京东方商业模型.xls</div>
                    <div class="uping">正在上传</div>
                    <div class="progress">
                        <a-progress :percent="55"  strokeColor="rgba(56, 139, 225, 1)"/>
                    </div>
                    <div class="state">
                        <span class="stop">暂停</span>
                        <span class="stop">取消</span>
                    </div>
                </div>
                <!-- 导入学员上传（有状态）-正在上传 -->
                <div class="uploadstate">上传失败</div>
                <!-- 导入学员上传（有状态）-上传失败 -->
                <div class="alreadybox">
                    <div class="alimg"><img src="../../assets/images/studentimg/xls.png"/></div>
                    <div class="upproject">京东方商业模型.xls</div>
                    <div class="uping" style="color: #FF7474">上传失败</div>
                    <div class="progress">
                        <a-progress :percent="55" strokeColor="rgba(255, 116, 116, 1)" />
                    </div>
                    <div class="fail">下载失败数据</div>
                    <div class="state">
                        <span class="stop">重传</span>
                        <span class="stop">取消</span>
                    </div>
                </div>
                <!-- 导入学员上传（有状态）-上传失败 -->
                <div class="uploadstate" style="margin-top: 74px">上传成功</div>
                <!-- 导入学员上传（有状态）-上传成功 -->
                <div class="alreadybox">
                    <div class="alimg"><img src="../../assets/images/studentimg/xls.png"/></div>
                    <div class="upproject">京东方商业模型.xls</div>
                    <div class="uping" style="color: #35AE69">上传成功</div>
                    <div class="progress">
                        <a-progress :percent="100" :show-info="false" strokeColor="rgba(87, 200, 135, 1)"/>
                        <span style="margin-left: 2px">100%</span>
                    </div>
                    <div class="state">
                        <span class="stop">删除</span>
                        
                    </div>
                </div>
                <!-- 导入学员上传（有状态）-上传成功 -->
            </div>
            
         </div>
      </div>
      <div class="btnn">
        <button class="btn1">取消</button>
        <button class="btn2">确定</button>
      </div>
    </div>
  </a-drawer>
  
</template>

<script>
import { reactive, toRefs } from "vue";
export default {
  name: "ImportStu",
  props: {
    Importvisible: {
      type: Boolean,
      default: false,
    },
  },
  setup(props, ctx) {
    const state = reactive({});
    const closeDrawer = () => {
      ctx.emit("update:Importvisible", false);
    };

    const afterVisibleChange = (bool) => {
      console.log("state", bool);
    };

    return {
      ...toRefs(state),
      afterVisibleChange,
      closeDrawer,
      // change,
    };
  },
};
</script>

<style scoped lang="scss" >
.importstu {
  .ant-drawer-content-wrapper {
    // max-width: 1000px;
    .ant-drawer-header {
      display: none !important;
    }
    .ant-drawer-body {
      padding: 0;
    }
  }
  .drawerMain {
    min-width: 600px;
    margin: 0px 32px 0px 32px;
    overflow-x: scroll;
    display: flex;
    flex-direction: column;
    .header {
      height: 73px;
      border-bottom: 1px solid #e8e8e8;
      display: flex;
      justify-content: space-between;
      align-items: center;
      // background-color: red;
      margin-bottom: 20px;
      flex-shrink: 0;
      .headerTitle {
        font-size: 18px;
        font-weight: 600;
        color: #333333;
        line-height: 25px;
        // margin-left: 24px;
      }
    }
    .main {
       .download {
         display: flex;
         .placedown {
            color: rgba(51, 51, 51, 1);
            font-size: 16px;
         }
         .template {
            color: rgba(56, 139, 225, 1);
            font-size: 16px;
            cursor: pointer;
            padding: 0 5px;
         }
       }
       .upload {
        display: flex;
        margin-top: 27px;
        .uptext {
            color: rgba(51, 51, 51, 1);
            font-size: 14px;
        }
        .upbox {
            position: relative;
            width: 500px;
            height: 176px;
            margin-left: 10px;
            background: rgba(56, 139, 225, 0.1);
            border: 1px dotted rgba(56, 139, 225, 0.2) ;
            border-radius: 4px;
            cursor: pointer;
            .uploadimg {
                position: absolute;
                width: 28px;
                height: 28px;
                top: 52px;
                left: 236px;
            }
            .draghere {
                position: absolute;
                top: 100px;
                left: 159px;
                color: rgba(56, 139, 225, 1);
                font-size: 14px;
            }
            .support {
                position: absolute;
                left: 180px;
                bottom: 24px;
                color: rgba(153, 153, 153, 1);
                font-size: 14px;
            }
        }
        .alreadybox {
            width: 500px;
            height: 173px;
            position: relative;
            margin-left: 10px;
            border: 1px dotted rgba(153, 153, 153, 1);
            border-radius: 4px;
            .fail {
                position: absolute;
                top: 113px;
                left: 68px;
                color: #FF7474;
                font-size: 14px;
                cursor: pointer;
            }
            .alimg {
                width: 32px;
                height: 34px;
                position: absolute;
                top: 66px;
                left: 24px;
                //background: green;
            }
            .upproject {
                position: absolute;
                top: 60px;
                left: 68px;
                color: rgba(51, 51, 51, 1);
                font-size: 14px;
            }
            .uping {
                position: absolute;
                top: 60px;
                left: 274px;
                color: rgba(56, 139, 225, 1);
                font-size: 14px;
            }
            .progress {
                position: absolute;
                display: flex;
                width: 293px;
                top: 82px;
                left: 68px;
                
            }
            .state {
                position: absolute;
                top: 83px;
                left: 399px;
                .stop {
                    color: rgba(56, 125, 247, 1);
                    font-size: 14px;
                    margin-right: 8px;
                    cursor: pointer;
                }
            }
        }
        .uploadstate {
            margin-top: 28px;
            margin-left: 75px;
            color: rgba(51, 51, 51, 1);
            font-size: 14px;
        }
       }
    }
    .btnn {
      height: 72px;
      width: 100%;
      position: absolute;
      bottom: 0;
      left: 0;
      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>