| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103 |
- <template>
- <div class="tab_exam__header">
- <div class="title">{{ examInfo.examName }}</div>
- <div class="tab_box">
- <div class="text">
- 已完成 <span>{{ num }}</span>/{{ allNum || examInfo.questionNum }} 道题
- </div>
- <div class="header_btns">
- <div class="btn" @click="$emit('prevQuestion')">上一题</div>
- <div class="btn" @click="$emit('nextQuestion')">下一题</div>
- </div>
- </div>
- </div>
- </template>
- <script>
- export default {
- props: {
- examId: { type: String },
- num: {
- type: Number,
- },
- allNum: {
- type: Number,
- default: 0,
- },
- },
- data() {
- return {
- examInfo: {},
- };
- },
- mounted() {
- if (this.examId || this.$route.query.examId * 1) {
- this.$request
- .bankExam(this.examId || this.$route.query.examId)
- .then((res) => {
- console.log(res,666)
- this.examInfo = res.data;
- });
- }
- },
- };
- </script>
- <style lang="scss" scoped>
- .tab_exam__header {
- height: 60px;
- padding: 0 22px;
- border-bottom: 1px solid #eeeeee;
- display: flex;
- align-items: center;
- justify-content: space-between;
- .title {
- font-weight: 500;
- color: #222222;
- font-size: 16px;
- }
- .tab_box {
- display: flex;
- align-items: center;
- }
- .header_btns {
- display: flex;
- justify-content: space-around;
- align-items: center;
- border: 1px solid #3f8dfd;
- border-radius: 4px;
- .btn {
- cursor: pointer;
- width: 66px;
- height: 28px;
- background: #ffffff;
- line-height: 28px;
- text-align: center;
- color: #3f8dfd;
- border-radius: 4px;
- &:nth-of-type(2) {
- background: #3f8dfd;
- color: #ffffff;
- border-radius: 0;
- }
- }
- }
- .text {
- margin-right: 20px;
- font-size: 14px;
- span {
- font-family: Microsoft YaHei;
- font-weight: bold;
- color: #3f8dfd;
- line-height: 24px;
- }
- }
- }
- </style>
|