<template>
  <a-drawer
    :visible="Assessvisible"
    class="drawerStyle assessment"
    placement="right"
    width="70%"
    @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="onerow">
          <div class="assname">评估名称：</div>
          <div class="asscontent">产品经理面授课评估</div>
        </div>
        <div class="onerow" style="margin-top: 30px">
          <div class="assname">评估说明：</div>
          <div class="asscontent">-</div>
        </div>
        <div class="assessbox" style="margin-top: 30px">
          <div class="box1">
            <div class="asstype">评估类型：</div>
            <div class="typename">单选</div>
          </div>
          <div class="box1" style="margin-left: 64px">
            <div class="asstype">题干：</div>
            <div style="color: rgba(153, 153, 153, 1); font-size: 14px">
              这个课程你觉得对你有用吗？
            </div>
          </div>
          <a-radio-group v-model:value="value">
            <div class="box1" style="margin-left: 55px; margin-top: 20px">
              <div class="asstype">选择1：</div>
              <a-radio :value="1">有用</a-radio>
            </div>
            <div
              class="box1"
              style="margin-left: 55px; margin-top: 20px; margin-bottom: 30px"
            >
              <div class="asstype">选择2：</div>
              <a-radio :value="2">没用</a-radio>
            </div>
          </a-radio-group>
        </div>
        <div class="assessbox" style="margin-top: 30px">
          <div class="box1">
            <div class="asstype">评估类型：</div>
            <div class="typename">问答题</div>
          </div>
          <div class="box1" style="margin-left: 64px">
            <div class="asstype">标题：</div>
            <div style="color: rgba(153, 153, 153, 1); font-size: 14px">
              对这个课程有什么建议吗？
            </div>
          </div>
          <div
            class="box1"
            style="margin-left: 64px; margin-top: 20px; margin-bottom: 30px"
          >
            <div class="asstype">描述：</div>
            <div style="color: rgba(51, 51, 51, 1); font-size: 14px">
              希望以后这样的课程能够躲开，让我们多多了解！
            </div>
          </div>
        </div>
        <div class="assessbox" style="margin-top: 30px">
          <div class="box1">
            <div class="asstype">评估类型：</div>
            <div class="typename">评分题</div>
          </div>
          <div class="box1" style="margin-left: 64px">
            <div class="asstype">标题：</div>
            <div style="color: rgba(153, 153, 153, 1); font-size: 14px">
              请给当前课程打分
            </div>
          </div>
          <div class="lastbox">
            <div class="sorcetext">非常不满意</div>
            <div class="sorcebox">
              <div class="numbox">1</div>
              <div class="numbox">2</div>
              <div class="numbox">3</div>
              <div class="numbox">4</div>
              <div class="numbox">5</div>
              <div class="numbox">6</div>
              <div class="numbox">7</div>
              <div class="numbox">8</div>
              <div class="numbox1">9</div>
              <div class="numbox1">10</div>
            </div>
            <div class="sorcetext">非常满意</div>
          </div>
        </div>
      </div>
      <div class="btnn">
        <button class="btn1" @click="closeDrawer">取消</button>
        <button class="btn2" @click="closeDrawer">确定</button>
      </div>
    </div>
  </a-drawer>
</template>

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

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

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

<style lang="scss">
.assessment {
  .drawerMain {
    min-width: 600px;
    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;
      .headerTitle {
        font-size: 18px;
        font-weight: 600;
        color: #333333;
        line-height: 25px;
        // margin-left: 24px;
      }
    }
    .main {
      display: flex;
      flex-direction: column;
      overflow-y: auto;
      //align-items: center;
      .onerow {
        display: flex;
        margin-top: 10px;
        margin-left: 10px;
        .assname {
          font-size: 16px;
          color: #333333;
          font-weight: 500;
        }
        .asscontent {
          color: #999999;
          font-size: 16px;
        }
      }
      .assessbox {
        border: 1px solid rgba(151, 151, 151, 0.29);
        border-radius: 8px;
        display: flex;
        flex-direction: column;
        .box1 {
          display: flex;
          margin-top: 20px;
          margin-left: 36px;
          align-items: center;
          .asstype {
            color: rgba(51, 51, 51, 1);
            font-size: 14px;
            font-weight: 500;
          }
          .typename {
            width: 80px;
            height: 32px;
            //margin-left: 10px;
            border-radius: 4px;
            border: 1px solid rgba(64, 158, 255, 1);
            display: flex;
            justify-content: center;
            align-items: center;
            color: rgba(64, 158, 255, 1);
            font-size: 14px;
            background: rgba(64, 158, 255, 0.1);
          }
        }
        .lastbox {
          display: flex;
          align-items: center;
          margin-left: 30px;
          .sorcetext {
            color: rgba(153, 153, 153, 1);
            font-size: 14px;
          }
          .sorcebox {
            display: flex;
            .numbox {
              width: 32px;
              height: 32px;
              display: flex;
              justify-content: center;
              align-items: center;
              background: rgba(64, 158, 255, 1);
              color: #ffffff;
              font-size: 14px;
              border-radius: 4px;
              margin: 20px 5px;
              cursor: pointer;
            }
            .numbox1 {
              width: 32px;
              height: 32px;
              display: flex;
              justify-content: center;
              align-items: center;
              border: 1px solid rgba(151, 151, 151, 0.29);
              color: rgba(0, 0, 0, 0.65);
              margin: 20px 5px;
              cursor: pointer;
              border-radius: 4px;
            }
          }
        }
      }
    }
    .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>
