<template>
  <a-drawer
    :visible="WDvisible"
    class="drawerStyle WorkDetail"
    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="isGood">
          <div class="cj">作业名称：</div>
          <div class="ch">管理者进阶作业</div>
        </div>
        <div class="score">
          <div class="sleft">
            <div class="cj">作业要求：</div>
            <div class="ch">写一篇观后感，字数600字</div>
          </div>
        </div>
        <div class="workInfo">
          <div class="infotit">作业信息：</div>
          <div class="workImgCon">
            <!-- <a-image-preview-group>
              <a-image
                style="margin-right: 40px"
                :height="240"
                :width="240"
                :src="item"
              ></a-image>
              <a-image :height="240" :width="240" :src="item" />
              <a-image :height="240" :width="240" :src="item" />
            </a-image-preview-group> -->
            <div class="img">
              <div class="download"></div>
            </div>
            <div class="img">
              <div class="download"></div>
            </div>
            <div class="img">
              <div class="download"></div>
            </div>
            <div class="img">
              <div class="download"></div>
            </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";
export default {
  name: "WorkDetail",
  props: {
    WDvisible: {
      type: Boolean,
      default: false,
    },
  },

  setup(props, ctx) {
    const state = reactive({
      item: require("../../assets/px.jpg"),
    });

    const closeDrawer = () => {
      ctx.emit("update:WDvisible", false);
    };
    return {
      ...toRefs(state),
      closeDrawer,
    };
  },
};
</script>

<style scoped lang="scss">
// .drawerStyle {
//   .ant-drawer-content-wrapper {
//     // max-width: 1000px;
//     .ant-drawer-header {
//       display: none !important;
//     }
//     .ant-drawer-body {
//       padding: 0;
//     }
//   }

// }
.WorkDetail {
  .drawerMain {
    min-width: 450px;
    margin: 0px 32px 0px 32px;
    overflow-x: auto;
    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 {
      width: 100%;
      // height: 100%;
      overflow-y: auto;
      margin-bottom: 40px;
      .cj {
        font-size: 16px;
        font-weight: 400;
        color: rgba(0, 0, 0, 0.85);
      }
      .ch {
        font-size: 16px;
        font-weight: 400;
        color: rgba(153, 153, 153, 0.85);
        margin-left: 12px;
      }
      // background-color: #bfa;
      // overflow-y: auto;
      .isGood {
        display: flex;
        align-items: center;
      }
      .score {
        display: flex;
        margin-top: 30px;
        .sleft {
          display: flex;
          align-items: center;
        }
      }
      .workInfo {
        margin-top: 30px;
        .infotit {
          font-size: 16px;
          font-weight: 400;
          color: rgba(0, 0, 0, 0.85);
        }
        .workImgCon {
          display: flex;
          flex-wrap: wrap;
          margin-top: 16px;
          .it {
            margin-right: 40px;
          }
          .img {
            width: 240px;
            height: 240px;
            background-size: 100%;
            background-image: url(../../assets/px.jpg);
            display: flex;
            align-items: center;
            justify-content: center;
            margin-right: 40px;
            margin-bottom: 40px;
            position: relative;
            cursor: pointer;
            .see {
              width: 50px;
              height: 50px;
              background-image: url(../../assets/images/basicinfo/see.png);
              background-size: 100% 100%;
              cursor: pointer;
            }
            .download {
              width: 50px;
              height: 50px;
              background-image: url(../../assets/images/basicinfo/download.png);
              background-size: 100% 100%;
              // margin-left: 40px;
              cursor: pointer;
              position: absolute;
              right: 10px;
              bottom: 10px;
            }
          }
        }
      }
    }

    .btnn {
      height: 72px;
      width: 100%;
      position: absolute;
      bottom: 0;
      left: 0;
      display: flex;
      background-color: #fff;
      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>
