123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778 |
- <template>
- <uni-popup ref="popupRef" :animation="false" :is-mask-click="false" type="bottom"
- mask-background-color="rgba(0, 0, 0, 0.4);" >
- <view class="score-content">
- <view class="icon-title-navBar-box">
- <view @click="handleClose" class="nav-bar-icon"></view>
- <text class="nav-bar-title">{{title}}</text>
- </view>
-
- <view class="popup-height">
- <view>考试名称:{{data.ksName}}</view>
- <view>考试总分:{{data.ksScore}}</view>
- <view>及格分数:{{data.okScore}}</view>
- <view>正确数量:{{data.rightCount}}</view>
- <view>试题总数:{{data.shitiTotal}}</view>
- <view>用户得分:{{data.userScore}}</view>
- </view>
- <button type="primary" @click="handleCheckSj">查看成绩</button>
- </view>
- </uni-popup>
- </template>
- <script setup>
- import {
- ref,reactive
- } from "vue";
- const popupRef = ref(null)
- const data = reactive({
- ksName: '',
- ksScore: '',
- okScore: '',
- rightCount: '',
- shitiTotal: '',
- userScore: '',
- })
-
- defineProps({
- title: {
- type: String,
- default: '考试得分'
- }
- })
-
- const emits = defineEmits(['confirm', 'close'])
-
- function handleClose() {
- emits('close');
- popupRef.value.close()
- }
-
- function handleCheckSj() {
- emits('confirm', data);
- popupRef.value.close()
- }
-
- function showDialog(options) {
- data.ksName = options.ksName;
- data.ksScore = options.ksScore;
- data.okScore = options.okScore;
- data.rightCount = options.rightCount;
- data.shitiTotal = options.shitiTotal;
- data.userScore = options.userScore;
- popupRef.value.open()
- }
- defineExpose({
- showDialog
- })
-
- </script>
- <style lang="scss" scoped>
- .score-content {
- height: 100vh;background-color: #fff;
- }
- .popup-height {
- }
- </style>
|