Right.vue 4.68 KB
Newer Older
耿迪迪's avatar
耿迪迪 committed
1 2 3 4 5
<template>
  <div class="lession-right-wrapper flex">
    <div class="top flex">
      <div class="title">通知</div>
      <div class="content-wrapper flex">
6
        <div v-for="item in []" :key="item + ''" class="content flex">
耿迪迪's avatar
耿迪迪 committed
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
          <div class="left zzz">
            啥啊啥飒哈市罚款收到回复夹寒暑假电烤炉付货款静安荟SDK复活卡开始了东航飞机好看的发
          </div>
          <div class="right">2022-9-15</div>
        </div>
      </div>
    </div>
    <div class="bottom flex">
      <div class="title">考试历史</div>
      <div class="th flex">
        <div class="left">学习课程</div>
        <div class="middle">考试时间</div>
        <div class="right">得分</div>
      </div>

22 23 24 25 26
      <div v-for="item in list" :key="item.courseId" class="td flex" style="">
        <div class="left zzz">{{ item.courseName }}</div>
        <div class="middle zzz" :title="item.examinationTime">
          {{ item.examinationTime }}
        </div>
耿迪迪's avatar
耿迪迪 committed
27
        <div class="right flex">
28
          <div class="a">
29
            <!-- <span
30 31 32 33 34
              class="text"
              :class="{ red: item.examinationResult < item.qualifiedNum }"
              >{{
               (item.examinationResult &&item.topicNum)? Math.floor((item.examinationResult / item.topicNum) * 100):0
              }}</span
35 36
            >/<span>100</span> -->
            <span class="text">{{item.examinationResult}}</span>/<span>{{item.totalScore}}</span>
37
          </div>
耿迪迪's avatar
耿迪迪 committed
38
          <div class="b flex">
39 40 41
            <div style="width: 60px">
              <el-progress
                :percentage="
42
                  Math.floor((item.examinationResult / item.totalScore) * 100)
43 44 45
                "
                :show-text="false"
              ></el-progress>
耿迪迪's avatar
耿迪迪 committed
46 47 48 49 50 51 52 53 54 55 56
            </div>
          </div>
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "lession-right",
57 58 59 60 61 62 63
  props: {
    list: {
      type: Array,
      default: () => {
        return [];
      },
    },
耿迪迪's avatar
耿迪迪 committed
64 65 66 67
  },
  data() {
    return {};
  },
68 69 70
  mounted(){
    console.log(this.list)
  },
耿迪迪's avatar
耿迪迪 committed
71 72 73 74 75 76 77
  methods: {},
};
</script>
<style lang="scss" scoped>
.lession-right-wrapper {
  width: 100%;
  height: 100%;
78
  flex-direction: column;
耿迪迪's avatar
耿迪迪 committed
79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178
  > div {
    border: 1px solid#BBBBBB;
    border-radius: 5px;
  }
  .top {
    width: 100%;
    height: 32.7%;
    margin-bottom: 23px;
    padding: 30px 19px 25px 21px;
    flex-direction: column;
    overflow: hidden;
    .title {
      font-size: 14px;
      color: #606266;
      margin-bottom: 20px;
    }
    .content-wrapper {
      flex: 1;
      width: 100%;
      overflow-y: auto;
      &::-webkit-scrollbar {
        width: 0 !important;
      }

      flex-direction: column;
      justify-content: space-between;

      .content {
        justify-content: space-between;
        width: 100%;
        font-size: 14px;
        color: #7b808a;
        .left {
          flex: 1;
          max-width: 304px;
          margin-right: 19px;
        }
        .right {
          min-width: 70px;
        }
      }
    }
  }
  .bottom {
    flex: 1;
    width: 100%;
    padding-top: 30px;
    padding-bottom: 30px;
    flex-direction: column;
    .title {
      margin-left: 21px;
      font-size: 14px;
      color: #606266;
      margin-bottom: 20px;
    }
    .th {
      width: 100%;
      height: 50px;
      background: #e8f4ff;
      justify-content: space-between;
      padding-left: 21px;
      padding-right: 25px;
      margin-bottom: 14px;
      > div {
        width: 33%;
        line-height: 50px;
        font-size: 14px;
        color: #606266;
        text-align: center;
        &.left {
          width: 40%;
        }
        &.middle {
          width: 30%;
        }
        &.right {
          width: 30%;
          text-align: center;
        }
      }
    }
    .td {
      width: 100%;
      height: 40px;
      justify-content: space-between;
      padding-left: 21px;
      padding-right: 25px;
      > div {
        line-height: 40px;
        font-size: 14px;
        color: #606266;
        text-align: center;
        &.left {
          width: 40%;
        }
        &.middle {
          width: 30%;
        }
        &.right {
          width: 30%;
179
          overflow: hidden;
耿迪迪's avatar
耿迪迪 committed
180 181
          justify-content: space-between;
          .a {
182 183
            // width: 20px;
            // overflow: hidden;
耿迪迪's avatar
耿迪迪 committed
184 185
            margin-right: 5px;
            text-align: right;
186
            flex: 1;
耿迪迪's avatar
耿迪迪 committed
187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206
            .text {
              color: #32be0f;
              &.red {
                color: #d11414;
              }
            }
          }
          .b {
            align-items: center;
            // flex: 1;
            > div {
              width: 100%;
            }
          }
        }
      }
    }
  }
}
</style>