封装学习任务和考试中心列表item组件
This commit is contained in:
+24
-2
@@ -32,7 +32,7 @@ export const queryPaperExamScore = (data) => {
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
// ↑↑↑↑↑↑↑↑↑考试中心考试↑↑↑↑↑↑↑
|
||||
// ↓↓↓↓↓↓↓↓↓课程考试↓↓↓↓↓↓↓↓
|
||||
|
||||
export const startExamByCrs = (data) => {
|
||||
@@ -42,4 +42,26 @@ export const startExamByCrs = (data) => {
|
||||
toastErrors: true,
|
||||
data
|
||||
});
|
||||
};
|
||||
};
|
||||
// 提交课程考试
|
||||
export const commitCrsExam = (data) => {
|
||||
return request({
|
||||
url: base_url + '/traCrsPapers/commitCrsExam',
|
||||
method: 'post',
|
||||
toastErrors: true,
|
||||
data
|
||||
});
|
||||
};
|
||||
// 试卷考试查分
|
||||
export const queryCrsExamScore = (data) => {
|
||||
return request({
|
||||
url: base_url + '/traCrsPapers/queryCrsExamScore',
|
||||
method: 'post',
|
||||
toastErrors: true,
|
||||
data
|
||||
});
|
||||
};
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -40,3 +40,13 @@ export const queryPracticeRecordByExrId = (data) => {
|
||||
data
|
||||
});
|
||||
};
|
||||
|
||||
// 5.联系时候查询问答题结果
|
||||
export const queryCrsPracticeAnswerResult = (data) => {
|
||||
return request({
|
||||
url: base_url + '/traCrsPractice/queryCrsPracticeAnswerResult',
|
||||
method: 'post',
|
||||
toastErrors: true,
|
||||
data
|
||||
});
|
||||
};
|
||||
@@ -1,6 +1,6 @@
|
||||
<template>
|
||||
<view class="talking-info" v-if="intrctWay === '02'">
|
||||
<view :class="['talking-gif', (props.activeVoiceId === dataInfo.id) ? 'is-play' : '']">
|
||||
<view :class="['talking-gif', 'is-play']">
|
||||
<CommonLoading color="#fff" v-show="voiceLoading" />
|
||||
</view>
|
||||
<view class="right-time">{{voiceTime}}</view>
|
||||
@@ -14,9 +14,9 @@
|
||||
</view>
|
||||
<view class="btns-cont">
|
||||
<view class="play-btn">
|
||||
<image class="icon" v-show="!(props.activeVoiceId === dataInfo.id)" @click="playVoice"
|
||||
src="@/static/images/course/play-blue.png" style="width: 100%;height: 100%;"></image>
|
||||
<image class="icon" v-show="props.activeVoiceId === dataInfo.id"
|
||||
<!-- <image class="icon" v-show="!(props.activeVoiceId === dataInfo.id)" @click="playVoice"
|
||||
src="@/static/images/course/play-blue.png" style="width: 100%;height: 100%;"></image> -->
|
||||
<image class="icon"
|
||||
@click.stop="pauseVoice" src="@/static/images/course/stop-blue.png"
|
||||
style="width: 100%;height: 100%;"></image>
|
||||
<!-- <view class="icon text-btn" v-if="type === 1" @click.stop="translateVoice(dataInfo)">文</view> -->
|
||||
@@ -30,8 +30,18 @@
|
||||
{{ showContent }}
|
||||
</text>
|
||||
</view>
|
||||
<view class="btns-cont">
|
||||
<view class="play-btn">
|
||||
<!-- <image class="icon" v-show="!(props.activeVoiceId === dataInfo.id)" @click="playVoice"
|
||||
src="@/static/images/course/play-blue.png" style="width: 100%;height: 100%;"></image> -->
|
||||
<image class="icon"
|
||||
@click.stop="pauseVoice" src="@/static/images/course/stop-blue.png"
|
||||
style="width: 100%;height: 100%;"></image>
|
||||
<view class="icon text-btn" @click.stop="buutton_click(dataInfo)">重答</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<view class="talking-info talking-info-loading" v-else>
|
||||
<view class="talking-info talking-info-loading" v-else-if="intrctWay === '00'">
|
||||
<view :class="['talking-gif']">
|
||||
<CommonLoading color="#fff" />
|
||||
</view>
|
||||
@@ -52,20 +62,39 @@
|
||||
} from '@dcloudio/uni-app';
|
||||
const props = defineProps({
|
||||
dataInfo: {
|
||||
default: () => ({}),
|
||||
default: () => ({
|
||||
talkingText:'',
|
||||
talkingVoice:'',
|
||||
|
||||
}),
|
||||
type: Object
|
||||
},
|
||||
activeVoiceId: {
|
||||
|
||||
text: { // 当前激活的语音
|
||||
default: '',
|
||||
type: String
|
||||
},
|
||||
voice: { // 当前激活的语音
|
||||
default: '',
|
||||
type: String
|
||||
},
|
||||
activeVoiceId: { // 当前激活的语音
|
||||
default: '',
|
||||
type: String
|
||||
},
|
||||
intrctWay: {
|
||||
default: '',
|
||||
type: String
|
||||
},
|
||||
})
|
||||
const {
|
||||
activeVoiceId,
|
||||
dataInfo
|
||||
} = toRefs(props)
|
||||
|
||||
const intrctWay = ref('02')
|
||||
const intrctWay = computed(() => {
|
||||
console.log('props.intrctWay', props.intrctWay);
|
||||
return props.intrctWay
|
||||
})
|
||||
const emit = defineEmits(['changePlay'])
|
||||
watch(() => props.dataInfo, () => {}, {
|
||||
deep: true,
|
||||
@@ -80,8 +109,10 @@
|
||||
|
||||
const voiceTime = ref('')
|
||||
const itemVoice = ref('')
|
||||
|
||||
// 中间显示的文字
|
||||
const showContent = computed(() => {
|
||||
return dataInfo.value.talkingText || ''
|
||||
return props.text || ''
|
||||
})
|
||||
onMounted(() => {
|
||||
initVoice()
|
||||
@@ -97,6 +128,11 @@
|
||||
deep: true,
|
||||
immediate: true
|
||||
})
|
||||
|
||||
// 按钮点击
|
||||
const buutton_click = (type) => {
|
||||
|
||||
}
|
||||
const pauseVoice = () => {
|
||||
if (!talkVoiceObj.value) return
|
||||
talkVoiceObj.value.pause()
|
||||
|
||||
@@ -86,17 +86,19 @@
|
||||
.option_item {
|
||||
|
||||
width: 100%;
|
||||
height: 108rpx;
|
||||
min-height: 108rpx;
|
||||
border-radius: 15rpx;
|
||||
margin-top: 32rpx;
|
||||
font-family: PingFangSC;
|
||||
font-weight: 500;
|
||||
font-size: 30rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
padding-left: 52rpx;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
|
||||
margin-top: 32rpx;
|
||||
padding: 10rpx 10rpx 10rpx 52rpx;
|
||||
|
||||
|
||||
// display: -webkit-box;
|
||||
@@ -106,21 +108,18 @@
|
||||
overflow: hidden;
|
||||
.option_text {
|
||||
flex: 1;
|
||||
white-space: nowrap;
|
||||
// white-space: nowrap;
|
||||
/* 强制不换行 */
|
||||
overflow: hidden;
|
||||
/* 超出部分隐藏 */
|
||||
text-overflow: ellipsis;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
.img {
|
||||
|
||||
width: 30rpx;
|
||||
// height: 30rpx;
|
||||
padding-right: 30rpx;
|
||||
height: 30rpx;
|
||||
padding-right: 20rpx;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -6,8 +6,9 @@
|
||||
<view class="fl1"></view>
|
||||
<view class="right">
|
||||
<!-- 反馈中心 -->
|
||||
<view class="mark_and_feedback_div" v-if="['examination'].includes(props.mode)">
|
||||
<view class="mark_and_feedback_div" v-if="['examination', 'practice'].includes(props.mode)">
|
||||
<image
|
||||
v-if="props.mode === 'examination'"
|
||||
:src="markIcon(props.item.mark ? '#0066FF' : '#ABABAB')"
|
||||
class="img"
|
||||
@click="mark_click()"
|
||||
@@ -25,7 +26,12 @@
|
||||
</view>
|
||||
<view class="option_div">
|
||||
<template v-if="qnsTyp === 'ES'">
|
||||
<!-- <questionVue @changePlay="changePlay" :dataInfo="talkingInfo" :activeVoiceId="questionValue"></questionVue> -->
|
||||
<questionVue
|
||||
:intrctWay="subject_data.es_status"
|
||||
:dataInfo="{}"
|
||||
:text="subject_data.anserResult"
|
||||
:activeVoiceId="subject_data.qnsId"
|
||||
></questionVue>
|
||||
</template>
|
||||
<template v-else>
|
||||
<radioSubjectItem
|
||||
@@ -52,7 +58,7 @@
|
||||
确定
|
||||
</uv-button>
|
||||
</view>
|
||||
<view class="analysis_div" v-if="!clearResult && ['study', 'mistake', 'settlement'].includes(props.mode)">
|
||||
<view class="analysis_div" v-if="!clearResult && ['study', 'mistake', 'settlement', 'practice'].includes(props.mode)">
|
||||
<view class="analysis_title">
|
||||
<view class="success_answer">正确答案:{{ correctResultLabel.join('') }}</view>
|
||||
<view class="your_answer">
|
||||
@@ -67,6 +73,7 @@
|
||||
<script setup>
|
||||
import { ref, reactive, onMounted, nextTick, computed, toRaw } from 'vue';
|
||||
import radioSubjectItem from './radio-subject-item.vue';
|
||||
import questionVue from './question.vue';
|
||||
import { markIcon, feedbackIcon } from '@/common/imgSvg';
|
||||
import { SUBJECT_TYPE } from '@/enum.js';
|
||||
const customStyle = {
|
||||
@@ -110,7 +117,7 @@
|
||||
set: (val) => emit('update:modelValue', val)
|
||||
});
|
||||
// result.anserResult
|
||||
|
||||
|
||||
let answerText = props.item?.my_answer || props.item.anserResult || [];
|
||||
console.log('answerText', props.item.anserResult);
|
||||
const item_answer = ref(typeof answerText === 'string' ? answerText.split(',') : []);
|
||||
@@ -124,13 +131,13 @@
|
||||
const qnsTyp = computed(() => props.item.qnsTyp);
|
||||
// 正确答案选项
|
||||
const correctResultLabel = computed(() =>
|
||||
subject_data.itemVos.filter((res) => res.correctFlag === 'R').map((res) => res.itemNo)
|
||||
subject_data.value.itemVos.filter((res) => res.correctFlag === 'R').map((res) => res.itemNo)
|
||||
);
|
||||
// 我的答案选项
|
||||
const myResultLabel = computed(() => {
|
||||
if (!props.item.anserResult) return ['无'];
|
||||
const anserResultArray = props.item.anserResult.split(',');
|
||||
return subject_data.itemVos.filter((res) => anserResultArray.includes(res.itemId)).map((res) => res.itemNo);
|
||||
return subject_data.value.itemVos.filter((res) => anserResultArray.includes(res.itemId)).map((res) => res.itemNo);
|
||||
});
|
||||
// 判断选项是否完全正确
|
||||
const right_or_wrong_class = computed(
|
||||
@@ -138,18 +145,36 @@
|
||||
correctResultLabel.value.length === myResultLabel.value.length &&
|
||||
myResultLabel.value.every((res) => correctResultLabel.value.includes(res))
|
||||
);
|
||||
|
||||
const subject_data = reactive({
|
||||
qnsId: props.item.qnsId,
|
||||
qnsContent: props.item.qnsContent,
|
||||
qnsTyp: props.item.qnsTyp,
|
||||
analyContent: props.item.analyContent,
|
||||
itemVos: (props.item.itemVos ?? []).map((res) => ({
|
||||
...res,
|
||||
correctFlag: props.clearResult ? '' : res.correctFlag
|
||||
}))
|
||||
|
||||
const subject_data = computed({
|
||||
get: () => {
|
||||
return {
|
||||
qnsId: props.item.qnsId,
|
||||
qnsContent: props.item.qnsContent,
|
||||
qnsTyp: props.item.qnsTyp,
|
||||
es_status: props.item.es_status,
|
||||
analyContent: props.item.analyContent,
|
||||
anserResult: props.item.anserResult,
|
||||
itemVos: (props.item.itemVos ?? []).map((res) => ({
|
||||
...res,
|
||||
correctFlag: props.clearResult ? '' : res.correctFlag
|
||||
}))
|
||||
}
|
||||
},
|
||||
set: (val) => {}
|
||||
});
|
||||
|
||||
|
||||
// const subject_data = reactive({
|
||||
// qnsId: props.item.qnsId,
|
||||
// qnsContent: props.item.qnsContent,
|
||||
// qnsTyp: props.item.qnsTyp,
|
||||
// analyContent: props.item.analyContent,
|
||||
// itemVos: (props.item.itemVos ?? []).map((res) => ({
|
||||
// ...res,
|
||||
// correctFlag: props.clearResult ? '' : res.correctFlag
|
||||
// }))
|
||||
// });
|
||||
|
||||
// 题类型
|
||||
const subject_type_text = computed(() => SUBJECT_TYPE.find((res) => qnsTyp.value === res.value)?.label || '');
|
||||
// 点击答题
|
||||
@@ -183,7 +208,7 @@
|
||||
qnsTyp: props.item.qnsTyp,
|
||||
qnsId: props.item.qnsId,
|
||||
answer: item_answer.value,
|
||||
answerItems: subject_data.itemVos.filter((t) => item_answer.value.includes(t.itemId))
|
||||
answerItems: subject_data.value.itemVos.filter((t) => item_answer.value.includes(t.itemId))
|
||||
});
|
||||
};
|
||||
</script>
|
||||
@@ -202,7 +227,9 @@
|
||||
padding: 4rpx;
|
||||
}
|
||||
}
|
||||
|
||||
.option_div{
|
||||
padding-top: 20rpx;
|
||||
}
|
||||
.option_div_button {
|
||||
width: 100%;
|
||||
height: 84rpx;
|
||||
|
||||
@@ -122,6 +122,8 @@
|
||||
// #ifdef APP-PLUS
|
||||
const recorderManager = uni.getRecorderManager();
|
||||
// #endif
|
||||
|
||||
|
||||
// const innerAudioContext = uni.createInnerAudioContext();
|
||||
const startTimer = ref(null); // 延迟启动的定时器ID
|
||||
const startFlag = ref(1);
|
||||
|
||||
@@ -222,7 +222,7 @@
|
||||
setPageCache('practice', {
|
||||
...res.body,
|
||||
name: form.value.crsName,
|
||||
crsId: crsId.value,
|
||||
crsId: crsId.value
|
||||
});
|
||||
common.navigateTo('/pages/practice/index');
|
||||
})
|
||||
|
||||
@@ -153,7 +153,7 @@
|
||||
import { getPageCache } from '@/common/common';
|
||||
import { commonUploadVoiceFile } from '@/api/common.js';
|
||||
import { optionErrorIcon, examinationSheetIcon } from '@/common/imgSvg';
|
||||
import { commitPaperExam, queryPaperExamScore } from '@/api/examination.js';
|
||||
import { commitPaperExam, queryPaperExamScore, startExamByCrs, commitCrsExam } from '@/api/examination.js';
|
||||
|
||||
const answerIsOver = ref(true);
|
||||
const feedbackRef = ref(null);
|
||||
@@ -218,7 +218,7 @@
|
||||
const clikc_sheet_item = (index) => {
|
||||
questionNumber.value = index;
|
||||
};
|
||||
|
||||
|
||||
const subject_click = (type, params) => {
|
||||
if (type === 'mark') {
|
||||
topicList[questionNumber.value]['mark'] = !topicList[questionNumber.value]['mark'];
|
||||
@@ -237,7 +237,7 @@
|
||||
} else if (type === 'text') {
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
// 发送语音
|
||||
const uploadRecordNow = (voicePath) => {
|
||||
commonUploadVoiceFile(voicePath, '/traask/traAskchat/voiceTrans', {})
|
||||
@@ -393,26 +393,38 @@
|
||||
console.log('answerDtoList', answerDtoList);
|
||||
dialogRef.value.close();
|
||||
common.loading('正在提交');
|
||||
commitPaperExam({
|
||||
examId: paperData.examId,
|
||||
execId: paperData.execId || '1',
|
||||
examLenTm: 1200,
|
||||
answerDtoStr: JSON.stringify(answerDtoList)
|
||||
// 这里通过是否存在examId来判断是考试中心的考试还是课程的考试
|
||||
let func;
|
||||
if (paperData.examId) { // 这里是考试中心考试
|
||||
func = commitPaperExam({
|
||||
papersId: paperData.papersId,
|
||||
examId: paperData.examId,
|
||||
execId: paperData.execId,
|
||||
examLenTm: 1200,
|
||||
answerDtoStr: JSON.stringify(answerDtoList)
|
||||
});
|
||||
} else {
|
||||
func = commitCrsExam({
|
||||
papersId: paperData.papersId,
|
||||
execId: paperData.execId,
|
||||
examLenTm: 1200,
|
||||
answerDtoStr: JSON.stringify(answerDtoList)
|
||||
});
|
||||
}
|
||||
func.then((res) => {
|
||||
console.log('提交成功', res);
|
||||
// 判断是否需要查分
|
||||
if (res.body.flagQuery === 'Y') {
|
||||
// 需要查分
|
||||
const examLenTm = 678;
|
||||
common.redirectTo(
|
||||
`/pages/examination/result?execId=${res.body.execId}&examLenTm=${examLenTm}&papersName=${paperData.papersName}`
|
||||
);
|
||||
} else {
|
||||
// todo 此处应该有个弹窗交代下结果
|
||||
common.navigateBack();
|
||||
}
|
||||
})
|
||||
.then((res) => {
|
||||
console.log('提交成功', res);
|
||||
// 判断是否需要查分
|
||||
if (res.body.flagQuery === 'Y') {
|
||||
// 需要查分
|
||||
const examLenTm = 678;
|
||||
common.redirectTo(
|
||||
`/pages/examination/result?execId=${res.body.execId}&examLenTm=${examLenTm}&papersName=${paperData.papersName}`
|
||||
);
|
||||
} else {
|
||||
// todo 此处应该有个弹窗交代下结果
|
||||
common.navigateBack();
|
||||
}
|
||||
})
|
||||
.catch((res) => {
|
||||
console.log('error', res);
|
||||
})
|
||||
|
||||
@@ -0,0 +1,171 @@
|
||||
<template>
|
||||
<view class="item" :class="getStatusClass(item.isFinish)" @click="click_item(item)">
|
||||
<view class="img_div">
|
||||
<image-preview class="img" :src="item.ossAddr" mode="scaleToFill"></image-preview>
|
||||
<view class="subscript" v-if="item.isFinish === '00'">未完成</view>
|
||||
<view class="subscript" v-if="item.isFinish === '01'">已完成</view>
|
||||
</view>
|
||||
<view class="right_div">
|
||||
<view class="title ellipsis-text">
|
||||
{{ item.taskName }}
|
||||
</view>
|
||||
<view class="time_div" v-if="item.limitTyp === '02'">
|
||||
起止时间:
|
||||
<text class="blod_color">{{ item.startTm?.substr(0, 10) }}至{{ item.endTm?.substr(0, 10) }}</text>
|
||||
</view>
|
||||
<view class="people_progress_div">
|
||||
<view class="mr-10">
|
||||
完成人数:
|
||||
<text class="">{{ item.taskFinishSums ?? 0 }}/{{ item.taskSums ?? 0 }}</text>
|
||||
</view>
|
||||
<view>
|
||||
进度:
|
||||
<text class="">{{ item.finishCrs ?? 0 }}/{{ item.sumCrs ?? 0 }}门课程</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { computed } from 'vue';
|
||||
import { setPageCache } from '@/common/common';
|
||||
import common from '@/common/common';
|
||||
const props = defineProps({
|
||||
item: {
|
||||
type: Object,
|
||||
default: () => {}
|
||||
}
|
||||
});
|
||||
const emit = defineEmits(['click_item']);
|
||||
const item = computed(() => props.item);
|
||||
const getStatusClass = (isFinish) => {
|
||||
// 00进行中、01已完成、02已超时
|
||||
if (isFinish === '00') return 'in_progress';
|
||||
if (isFinish === '01') return 'completed';
|
||||
return 'expired';
|
||||
};
|
||||
// 跳转到详情
|
||||
const click_item = (item) => {
|
||||
if(item.isTimeOut === '00') {
|
||||
common.msg('任务已结束')
|
||||
return ;
|
||||
}
|
||||
setPageCache('learning_tasks_details', item);
|
||||
common.navigateTo('/pages/learningTasks/details');
|
||||
};
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.item.in_progress {
|
||||
// 进行中
|
||||
.subscript {
|
||||
color: #0066ff;
|
||||
background-color: #daf0ff;
|
||||
}
|
||||
|
||||
.blod_color {
|
||||
color: #0066ff;
|
||||
}
|
||||
}
|
||||
|
||||
.item.completed {
|
||||
// 已完成
|
||||
.subscript {
|
||||
color: #ffffff;
|
||||
background-color: #33c583 !important;
|
||||
}
|
||||
|
||||
.blod_color {
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
|
||||
.item.expired {
|
||||
// 已超时
|
||||
.subscript {
|
||||
color: #ffffff;
|
||||
background-color: #ef5705;
|
||||
}
|
||||
|
||||
.blod_color {
|
||||
color: #d70c18;
|
||||
}
|
||||
}
|
||||
.item {
|
||||
height: 170rpx;
|
||||
margin: 32rpx 22rpx;
|
||||
display: flex;
|
||||
|
||||
.img_div {
|
||||
position: relative;
|
||||
width: 224rpx;
|
||||
height: 168rpx;
|
||||
overflow: hidden;
|
||||
border-radius: 22rpx;
|
||||
|
||||
.img {
|
||||
width: 226rpx;
|
||||
height: 168rpx;
|
||||
}
|
||||
|
||||
.subscript {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
width: 92rpx;
|
||||
height: 46rpx;
|
||||
border-radius: 0px 0px 0px 22rpx;
|
||||
font-family: PingFangSC;
|
||||
font-weight: 400;
|
||||
font-size: 22rpx;
|
||||
line-height: 32px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
|
||||
.right_div {
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
margin-left: 24rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
|
||||
.title {
|
||||
font-family: PingFangSC;
|
||||
font-size: 30rpx;
|
||||
font-weight: 600;
|
||||
color: #333333;
|
||||
line-height: 44rpx;
|
||||
}
|
||||
|
||||
.time_div {
|
||||
font-family: PingFangSC;
|
||||
font-weight: 400;
|
||||
font-size: 23rpx;
|
||||
color: #666;
|
||||
line-height: 23rpx;
|
||||
flex-wrap: nowrap;
|
||||
height: 23rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.people_progress_div {
|
||||
display: flex;
|
||||
font-family: PingFangSC;
|
||||
font-weight: 400;
|
||||
font-size: 23rpx;
|
||||
color: #666;
|
||||
margin-bottom: 23rpx;
|
||||
|
||||
line-height: 23rpx;
|
||||
flex-wrap: nowrap;
|
||||
height: 23rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -0,0 +1,87 @@
|
||||
<template>
|
||||
<view class="scroll_div">
|
||||
<scroll-view scroll-y="true" class="scroll-Y" @scrolltolower="scrolltolower" :show-scrollbar="false">
|
||||
<itemVue :item="item" v-for="(item, index) in data_list"></itemVue>
|
||||
<list-no-data v-if="total == 0 && status == 'nomore'"></list-no-data>
|
||||
<uv-load-more v-if="total != 0" :status="status" loadmore-text="轻轻上拉加载" :height="30"></uv-load-more>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
<script setup>
|
||||
const status = ref('loading'); // loadmore - 加载前,loading - 加载中,nomore - 没有数据
|
||||
const limit = 15;
|
||||
const total = ref(-1);
|
||||
const page = ref(0);
|
||||
const data_list = reactive([]);
|
||||
import common from '@/common/common';
|
||||
import { ref, reactive, onMounted, nextTick } from 'vue';
|
||||
import itemVue from './content-item.vue';
|
||||
import { queryAllTraTaskInfoByUserId } from '@/api/learningTasks.js';
|
||||
const props = defineProps({
|
||||
state: {
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
});
|
||||
|
||||
const getData = (from = '', searchText = '') => {
|
||||
if (from == 'first') {
|
||||
if (total.value !== -1) {
|
||||
return;
|
||||
}
|
||||
status.value = 'loading';
|
||||
total.value = -1;
|
||||
page.value = 1;
|
||||
data_list.length = 0;
|
||||
} else {
|
||||
if (status.value !== 'loadmore' && status.value !== '') return;
|
||||
status.value = 'loading';
|
||||
page.value++;
|
||||
}
|
||||
setTimeout(() => {
|
||||
queryAllTraTaskInfoByUserId({
|
||||
state: props.state,
|
||||
page: page.value,
|
||||
limit: limit,
|
||||
taskName: searchText
|
||||
})
|
||||
.then((res) => {
|
||||
total.value = res.total;
|
||||
data_list.push(...res.body);
|
||||
})
|
||||
.finally(() => {
|
||||
if (data_list.length >= total.value) {
|
||||
status.value = 'nomore';
|
||||
} else {
|
||||
status.value = 'loadmore';
|
||||
}
|
||||
});
|
||||
}, 200);
|
||||
};
|
||||
|
||||
const scrolltolower = (item) => {
|
||||
getData();
|
||||
};
|
||||
const search = (value) => {
|
||||
total.value = -1;
|
||||
console.log('value', value);
|
||||
getData('first', value);
|
||||
};
|
||||
defineExpose({
|
||||
getData,
|
||||
search
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.scroll_div {
|
||||
background-color: #f1f5fa;
|
||||
padding: 22rpx;
|
||||
}
|
||||
|
||||
.scroll-Y {
|
||||
height: calc(100vh - var(--status-bar-height) - 88rpx - 80rpx - 88rpx - 20rpx - 30rpx);
|
||||
background-color: #fff;
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
</style>
|
||||
@@ -1,249 +0,0 @@
|
||||
<template>
|
||||
<view class="scroll_div">
|
||||
<scroll-view scroll-y="true" class="scroll-Y" @scrolltolower="scrolltolower" :show-scrollbar="false">
|
||||
<view
|
||||
class="item"
|
||||
:class="getStatusClass(item.isFinish)"
|
||||
v-for="(item, index) in data_list"
|
||||
@click="click_item(item)"
|
||||
>
|
||||
<view class="img_div">
|
||||
<image-preview class="img" :src="item.ossAddr" mode="scaleToFill"></image-preview>
|
||||
<view class="subscript" v-if="item.isFinish === '00'">未完成</view>
|
||||
<view class="subscript" v-if="item.isFinish === '01'">已完成</view>
|
||||
</view>
|
||||
<view class="right_div">
|
||||
<view class="title ellipsis-text">
|
||||
{{ item.taskName }}
|
||||
</view>
|
||||
<view class="time_div" v-if="item.limitTyp === '02'">
|
||||
起止时间:
|
||||
<text class="blod_color">{{ item.startTm?.substr(0, 10) }}至{{ item.endTm?.substr(0, 10) }}</text>
|
||||
</view>
|
||||
<view class="people_progress_div">
|
||||
<view class="mr-10">
|
||||
完成人数:
|
||||
<text class="">{{ item.taskFinishSums ?? 0 }}/{{ item.taskSums ?? 0 }}</text>
|
||||
</view>
|
||||
<view>
|
||||
进度:
|
||||
<text class="">{{ item.finishCrs ?? 0 }}/{{ item.sumCrs ?? 0 }}门课程</text>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
<list-no-data v-if="total == 0 && status == 'nomore'"></list-no-data>
|
||||
<uv-load-more v-if="total != 0" :status="status" loadmore-text="轻轻上拉加载" :height="30"></uv-load-more>
|
||||
</scroll-view>
|
||||
</view>
|
||||
</template>
|
||||
<script setup>
|
||||
const status = ref('loading'); // loadmore - 加载前,loading - 加载中,nomore - 没有数据
|
||||
const limit = 15;
|
||||
const total = ref(-1);
|
||||
const page = ref(0);
|
||||
const data_list = reactive([]);
|
||||
import { setPageCache } from '@/common/common';
|
||||
import common from '@/common/common';
|
||||
import { ref, reactive, onMounted, nextTick } from 'vue';
|
||||
|
||||
import { queryAllTraTaskInfoByUserId } from '@/api/learningTasks.js';
|
||||
const props = defineProps({
|
||||
state: {
|
||||
type: String,
|
||||
required: true
|
||||
}
|
||||
});
|
||||
|
||||
const getData = (from = '', searchText = '') => {
|
||||
if (from == 'first') {
|
||||
if (total.value !== -1) {
|
||||
return;
|
||||
}
|
||||
status.value = 'loading';
|
||||
total.value = -1;
|
||||
page.value = 1;
|
||||
data_list.length = 0;
|
||||
} else {
|
||||
if (status.value !== 'loadmore' && status.value !== '') return;
|
||||
status.value = 'loading';
|
||||
page.value++;
|
||||
}
|
||||
setTimeout(() => {
|
||||
queryAllTraTaskInfoByUserId({
|
||||
state: props.state,
|
||||
page: page.value,
|
||||
limit: limit,
|
||||
taskName: searchText
|
||||
})
|
||||
.then((res) => {
|
||||
total.value = res.total;
|
||||
data_list.push(...res.body);
|
||||
})
|
||||
.finally(() => {
|
||||
if (data_list.length >= total.value) {
|
||||
status.value = 'nomore';
|
||||
} else {
|
||||
status.value = 'loadmore';
|
||||
}
|
||||
});
|
||||
}, 200);
|
||||
};
|
||||
const getStatusClass = (isFinish) => {
|
||||
// 00进行中、01已完成、02已超时
|
||||
if (isFinish === '00') return 'in_progress';
|
||||
if (isFinish === '01') return 'completed';
|
||||
return 'expired';
|
||||
};
|
||||
|
||||
// 跳转到详情
|
||||
const click_item = (item) => {
|
||||
if(item.isTimeOut === '00') {
|
||||
common.msg('任务已结束')
|
||||
return ;
|
||||
}
|
||||
setPageCache('learning_tasks_details', item);
|
||||
common.navigateTo('/pages/learningTasks/details');
|
||||
};
|
||||
const scrolltolower = (item) => {
|
||||
getData();
|
||||
};
|
||||
const search = (value) => {
|
||||
total.value = -1;
|
||||
console.log('value', value);
|
||||
getData('first', value);
|
||||
};
|
||||
defineExpose({
|
||||
getData,
|
||||
search
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.scroll_div {
|
||||
background-color: #f1f5fa;
|
||||
padding: 22rpx;
|
||||
}
|
||||
|
||||
.scroll-Y {
|
||||
height: calc(100vh - var(--status-bar-height) - 88rpx - 80rpx - 88rpx - 20rpx - 30rpx);
|
||||
// height: calc(100vh - var(--status-bar-height) - 54rpx - 88rpx - 20rpx - 44rpx);
|
||||
background-color: #fff;
|
||||
border-radius: 16rpx;
|
||||
}
|
||||
|
||||
.scroll-Y {
|
||||
.item.in_progress {
|
||||
// 进行中
|
||||
.subscript {
|
||||
color: #0066ff;
|
||||
background-color: #daf0ff;
|
||||
}
|
||||
|
||||
.blod_color {
|
||||
color: #0066ff;
|
||||
}
|
||||
}
|
||||
|
||||
.item.completed {
|
||||
// 已完成
|
||||
.subscript {
|
||||
color: #ffffff;
|
||||
background-color: #33c583 !important;
|
||||
}
|
||||
|
||||
.blod_color {
|
||||
color: #333333;
|
||||
}
|
||||
}
|
||||
|
||||
.item.expired {
|
||||
// 已超时
|
||||
.subscript {
|
||||
color: #ffffff;
|
||||
background-color: #ef5705;
|
||||
}
|
||||
|
||||
.blod_color {
|
||||
color: #d70c18;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.scroll-Y .item {
|
||||
height: 170rpx;
|
||||
margin: 32rpx 22rpx;
|
||||
display: flex;
|
||||
|
||||
.img_div {
|
||||
position: relative;
|
||||
width: 224rpx;
|
||||
height: 168rpx;
|
||||
overflow: hidden;
|
||||
border-radius: 22rpx;
|
||||
|
||||
.img {
|
||||
width: 226rpx;
|
||||
height: 168rpx;
|
||||
}
|
||||
|
||||
.subscript {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
width: 92rpx;
|
||||
height: 46rpx;
|
||||
border-radius: 0px 0px 0px 22rpx;
|
||||
font-family: PingFangSC;
|
||||
font-weight: 400;
|
||||
font-size: 22rpx;
|
||||
line-height: 32px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
|
||||
.right_div {
|
||||
flex: 1;
|
||||
overflow: hidden;
|
||||
margin-left: 24rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: space-between;
|
||||
|
||||
.title {
|
||||
font-family: PingFangSC;
|
||||
font-size: 30rpx;
|
||||
font-weight: 600;
|
||||
color: #333333;
|
||||
line-height: 44rpx;
|
||||
}
|
||||
|
||||
.time_div {
|
||||
font-family: PingFangSC;
|
||||
font-weight: 400;
|
||||
font-size: 23rpx;
|
||||
color: #666;
|
||||
line-height: 23rpx;
|
||||
flex-wrap: nowrap;
|
||||
height: 23rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.people_progress_div {
|
||||
display: flex;
|
||||
font-family: PingFangSC;
|
||||
font-weight: 400;
|
||||
font-size: 23rpx;
|
||||
color: #666;
|
||||
margin-bottom: 23rpx;
|
||||
|
||||
line-height: 23rpx;
|
||||
flex-wrap: nowrap;
|
||||
height: 23rpx;
|
||||
overflow: hidden;
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -27,13 +27,13 @@
|
||||
<view class="uni-margin-wrap no-overflow">
|
||||
<swiper class="swiper" :current="tabAct" :indicator-dots="false" @change="swiperChange">
|
||||
<swiper-item>
|
||||
<listItem :ref="(el) => (listItemRefs[0] = el)" state="01"></listItem>
|
||||
<content :ref="(el) => (listItemRefs[0] = el)" state="01"></content>
|
||||
</swiper-item>
|
||||
<swiper-item>
|
||||
<listItem :ref="(el) => (listItemRefs[1] = el)" state="02"></listItem>
|
||||
<content :ref="(el) => (listItemRefs[1] = el)" state="02"></content>
|
||||
</swiper-item>
|
||||
<swiper-item>
|
||||
<listItem :ref="(el) => (listItemRefs[2] = el)" state="03"></listItem>
|
||||
<content :ref="(el) => (listItemRefs[2] = el)" state="03"></content>
|
||||
</swiper-item>
|
||||
</swiper>
|
||||
</view>
|
||||
@@ -43,7 +43,7 @@
|
||||
|
||||
<script setup>
|
||||
import { LineBg } from '@/enum.js';
|
||||
import listItem from './components/list-item.vue';
|
||||
import content from './components/content.vue';
|
||||
import { reactive, ref, computed, nextTick, onMounted, watch } from 'vue';
|
||||
import common from '@/common/common.js';
|
||||
const listItemRefs = ref([]);
|
||||
|
||||
+158
-39
@@ -65,7 +65,7 @@
|
||||
@submit="touchBtnSubmit"
|
||||
loadingText="问题回答中,请在问题回答结束后重试!"
|
||||
:isLoading="!answerIsOver"
|
||||
:isDisabled="false"
|
||||
:isDisabled="topicList[questionNumber]?.isPreview"
|
||||
/>
|
||||
</view>
|
||||
</view>
|
||||
@@ -88,7 +88,7 @@
|
||||
import { getPageCache } from '@/common/common';
|
||||
import { commonUploadVoiceFile } from '@/api/common.js';
|
||||
import { optionErrorIcon, examinationSheetIcon } from '@/common/imgSvg';
|
||||
import { practiceAnswer,practiceCommit } from '@/api/practice.js';
|
||||
import { practiceAnswer, practiceCommit, queryCrsPracticeAnswerResult } from '@/api/practice.js';
|
||||
const answerIsOver = ref(true);
|
||||
const feedbackRef = ref(null);
|
||||
const dialogRef = ref(null);
|
||||
@@ -124,68 +124,186 @@
|
||||
const swiperChange = (item) => {
|
||||
questionNumber.value = item.detail.current;
|
||||
};
|
||||
|
||||
|
||||
const subject_click = (type, params) => {
|
||||
// 反馈
|
||||
if (type === 'feedback') {
|
||||
// 反馈
|
||||
feedbackRef.value.open();
|
||||
} else if (type === 'answer') {
|
||||
console.log('answer', params);
|
||||
//多选点击按钮答题
|
||||
if (params.qnsTyp === 'MU') {
|
||||
submitProblem({
|
||||
anserResult: params.answer.join(',')
|
||||
});
|
||||
}
|
||||
} else if (type === 'choose') {
|
||||
if (params.qnsTyp === 'SN') {
|
||||
submitProblem(params.answer)
|
||||
//单选判断点击选项答题
|
||||
if (['JD', 'SN'].includes(params.qnsTyp)) {
|
||||
submitProblem({ anserResult: params.answer.join(',') });
|
||||
}
|
||||
console.log('choose', params);
|
||||
}
|
||||
};
|
||||
|
||||
// 答单题
|
||||
const submitProblem = (answer) => {
|
||||
console.log('答单题');
|
||||
const topic = topicList[questionNumber.value]
|
||||
console.log(topic);
|
||||
console.log(answer);
|
||||
common.loading('答题中')
|
||||
practiceAnswer({
|
||||
exrId:paperData.exrId,
|
||||
anserResult:answer.join(','),
|
||||
ossKey:'',
|
||||
qnsId:topic.qnsId
|
||||
}).then(res => {
|
||||
common.hideLoading()
|
||||
const body = res.body
|
||||
topic.isPreview = true // 不能在点击了,打开预览模式
|
||||
topic.clearResult = false // 不清除正确答案了
|
||||
// topic.correctFlag = body
|
||||
|
||||
console.log('答题结果', res);
|
||||
})
|
||||
}
|
||||
const voicePathValue = ref('');
|
||||
|
||||
// 单题回答(没有问答题)
|
||||
const submitProblem = (answer) => {
|
||||
const topic = topicList[questionNumber.value];
|
||||
console.log('答题内容', answer);
|
||||
console.log('答单题', topic);
|
||||
common.loading('答题中');
|
||||
practiceAnswer({
|
||||
exrId: paperData.exrId,
|
||||
ossKey: '',
|
||||
qnsId: topic.qnsId,
|
||||
...answer
|
||||
})
|
||||
.then((res) => {
|
||||
common.hideLoading();
|
||||
const body = res.body;
|
||||
console.log('body', body);
|
||||
topic.isPreview = true; // 不能在点击了,打开预览模式
|
||||
topic.clearResult = false; // 不清除正确答案了
|
||||
const traQnsInfoVo = body.traQnsInfoVo;
|
||||
topic.analyContent = traQnsInfoVo.analyContent; // 答案解析
|
||||
console.log('答题结果', traQnsInfoVo);
|
||||
// 更新选项正确项目
|
||||
topic.itemVos = traQnsInfoVo.itemVos; // 答案选项(todo应该不这样替换)
|
||||
topic.anserResult = traQnsInfoVo.anserResult; // 正确答案字符串分割
|
||||
const judgeResultStatus = traQnsInfoVo.judgeResult === 'P'; // P为正确U为错误
|
||||
if (!addProblem()) {
|
||||
// 返回false说明到了最后一题
|
||||
console.log('最后一题');
|
||||
}
|
||||
// 自动切换下一题的条件
|
||||
if (
|
||||
judgeResultStatus && // 条件1.答题正确
|
||||
// ['JD', 'SN', 'MU'].includes(topic.qnsTyp) && // 条件2.单选多选判断(这里改成了单选多选判断专属,所有不用判断这一条了)
|
||||
topicList.length < storageTopicList.value.length // 条件3.不是最后一题(暂定这样判断)
|
||||
) {
|
||||
|
||||
questionNumber.value++;
|
||||
} else {
|
||||
console.log('为什么没自动跳转', judgeResultStatus);
|
||||
console.log('22', topicList.length < storageTopicList.value.length, topicList.length , storageTopicList.value.length);
|
||||
}
|
||||
|
||||
})
|
||||
.catch(() => {
|
||||
common.hideLoading();
|
||||
});
|
||||
};
|
||||
// 问答题轮询结果方法
|
||||
const queryWithRetry = (execLogId, maxRetries = 30) => {
|
||||
// 递归终止条件:达到最大重试次数
|
||||
if (maxRetries <= 0) {
|
||||
return Promise.reject(new Error('超过最大重试次数,查询失败'));
|
||||
}
|
||||
|
||||
return queryCrsPracticeAnswerResult({ execLogId }).then((resl) => {
|
||||
const isWait = resl.body.isWait;
|
||||
if (isWait === 'Y') {
|
||||
// 如果是Y,延迟2秒后重试,重试次数减1
|
||||
return new Promise((resolve) => {
|
||||
setTimeout(() => {
|
||||
resolve(queryWithRetry(execLogId, maxRetries - 1));
|
||||
}, 2000);
|
||||
});
|
||||
} else {
|
||||
// 不是Y,直接返回结果
|
||||
return resl;
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
// 单题回答(问答题专属)
|
||||
const submitProblemEssayQuestion = (answer) => {
|
||||
const topic = topicList[questionNumber.value];
|
||||
console.log('答题内容', answer);
|
||||
console.log('答单题问答题专属', topic);
|
||||
practiceAnswer({
|
||||
exrId: paperData.exrId,
|
||||
ossKey: '',
|
||||
qnsId: topic.qnsId,
|
||||
...answer
|
||||
})
|
||||
.then((res) => {
|
||||
topic.isPreview = true; // 不能在点击了,打开预览模式
|
||||
// topic.clearResult = false; // 不清除正确答案了
|
||||
// 使用方式
|
||||
queryWithRetry(res.body.execLogId)
|
||||
.then((result) => {
|
||||
console.log('查询成功', result);
|
||||
const body = result.body;
|
||||
const traQnsInfoVo = body.traQnsInfoVo;
|
||||
topic.analyContent = traQnsInfoVo.analyContent; // 答案解析
|
||||
topic.anserResult = traQnsInfoVo.anserResult // 正确答案文字内容
|
||||
const judgeResultStatus = traQnsInfoVo.judgeResult === 'P'; // P为正确U为错误
|
||||
// 判断是语音回答还是文字回答, 通过是否存在语音地址判断 // todo 后续可能改成ossid判断
|
||||
if (answer.voicePath) {
|
||||
topic.es_status = '02'
|
||||
} else { // 纯文字
|
||||
topic.es_status = '01'
|
||||
}
|
||||
|
||||
// 处理成功结果
|
||||
})
|
||||
.catch((error) => {
|
||||
console.log('查询失败', error);
|
||||
topic.isPreview = false
|
||||
topic.es_status = ''
|
||||
// 处理失败情况
|
||||
});
|
||||
|
||||
// const traQnsInfoVo = body.traQnsInfoVo;
|
||||
// topic.analyContent = traQnsInfoVo.analyContent; // 答案解析
|
||||
// console.log('答题结果', traQnsInfoVo);
|
||||
|
||||
|
||||
|
||||
// const judgeResultStatus = traQnsInfoVo.judgeResult === 'P'; // P为正确U为错误
|
||||
|
||||
// if (!addProblem()) {
|
||||
// // 返回false说明到了最后一题
|
||||
// console.log('最后一题');
|
||||
// }
|
||||
})
|
||||
.catch(() => {
|
||||
topic.es_status = ''; // 取消转圈
|
||||
});
|
||||
};
|
||||
// 录音按钮提交
|
||||
const touchBtnSubmit = (type, submitObj) => {
|
||||
const topic = topicList[questionNumber.value];
|
||||
topic.es_status = '00'; // 00转圈
|
||||
if (type === 'voice') {
|
||||
uploadRecordNow(submitObj);
|
||||
} else if (type === 'text') {
|
||||
submitProblemEssayQuestion({ anserResult: submitObj });
|
||||
}
|
||||
};
|
||||
// 发送语音
|
||||
const uploadRecordNow = (voicePath) => {
|
||||
//发送语音的时候就应该拿出转圈
|
||||
commonUploadVoiceFile(voicePath, '/traask/traAskchat/voiceTrans', {})
|
||||
.then((res) => {
|
||||
let _res = JSON.parse(res.data);
|
||||
voicePathValue.value = voicePath;
|
||||
console.log('_res', _res, voicePath);
|
||||
if (_res.rtnCode === '0000') {
|
||||
// {
|
||||
// "chatId":"CHAT025018122068202508232000590000000000000000000000000000000060",
|
||||
// "fileId":"S3F0250181220722025082320005900000676612",
|
||||
// "ossFileAddr":"http://25.18.122.66::9786/traoss/show//S3F0250181220722025082320005900000676612",
|
||||
// "transContent":"一二三四。"
|
||||
// }
|
||||
submitProblemEssayQuestion({
|
||||
anserResult: _res.body.transContent,
|
||||
ossKey: _res.body.fileId,
|
||||
ossAddr: _res.body.ossFileAddr,
|
||||
voicePath: voicePath
|
||||
});
|
||||
}
|
||||
})
|
||||
.catch((err) => {
|
||||
uni.showToast({
|
||||
title: '系统异常,请联系管理员',
|
||||
icon: 'none',
|
||||
duration: 1000
|
||||
});
|
||||
topic.es_status = ''; // 取消转圈
|
||||
common.msg('系统异常,请联系管理员');
|
||||
});
|
||||
};
|
||||
|
||||
@@ -212,6 +330,7 @@
|
||||
...res,
|
||||
isPreview: false,
|
||||
clearResult: true,
|
||||
es_status: '', // 预设一下问答题的结果,'' 空为没有 00 转圈 01 播放,其他暂定
|
||||
my_answer: []
|
||||
}));
|
||||
addProblem();
|
||||
|
||||
@@ -0,0 +1,128 @@
|
||||
<template>
|
||||
<view class="item" :class="item.examStatText == 'Y' ? 'completed' : 'incomplete'" @click="gotoDetails(item)">
|
||||
<view class="subscript" v-if="item.examStatText === 'N'">未完成</view>
|
||||
<view class="subscript" v-if="item.examStatText === 'Y'">已完成</view>
|
||||
<view class="title ellipsis-text">
|
||||
{{ item.papersName }}
|
||||
</view>
|
||||
<view class="time">
|
||||
<text class="color_3">起止时间:</text>
|
||||
<text class="color_class">{{ item.examStartTm }}至{{ item.examEndTm }}</text>
|
||||
</view>
|
||||
<view class="num_div">
|
||||
<text class="color_3">完成人数:</text>
|
||||
<text class="color_2">{{ item.execPersionNumer }}/{{ item.planPersionNumber }}</text>
|
||||
</view>
|
||||
</view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import { computed } from 'vue';
|
||||
import { setPageCache } from '@/common/common';
|
||||
import common from '@/common/common';
|
||||
const props = defineProps({
|
||||
item: {
|
||||
type: Object,
|
||||
default: () => {}
|
||||
}
|
||||
});
|
||||
const emit = defineEmits(['click_item']);
|
||||
const item = computed(() => props.item);
|
||||
const gotoDetails = (item) => {
|
||||
setPageCache('testing_hall_details', item)
|
||||
common.navigateTo('/pages/testingHall/details');
|
||||
}
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
|
||||
.subscript {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
width: 92rpx;
|
||||
height: 46rpx;
|
||||
border-radius: 0px 0px 0px 22rpx;
|
||||
font-family: PingFangSC;
|
||||
font-weight: 400;
|
||||
font-size: 22rpx;
|
||||
line-height: 32px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.incomplete {
|
||||
// 进行中
|
||||
.subscript {
|
||||
color: #ffffff;
|
||||
background-color: #ef5705;
|
||||
}
|
||||
|
||||
.color_class {
|
||||
color: #d70c18;
|
||||
}
|
||||
}
|
||||
|
||||
.completed {
|
||||
// 已完成
|
||||
.subscript {
|
||||
color: #ffffff;
|
||||
background-color: #33c583;
|
||||
}
|
||||
|
||||
.color_class {
|
||||
color: #0066ff;
|
||||
}
|
||||
}
|
||||
|
||||
.item {
|
||||
padding: 30rpx 44rpx 20rpx 38rpx;
|
||||
margin: 0rpx 22rpx 22rpx 22rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background-color: #ffffff;
|
||||
border-radius: 16rpx;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
|
||||
.title {
|
||||
font-family: PingFangSC;
|
||||
font-weight: 600;
|
||||
font-size: 30rpx;
|
||||
color: #000000;
|
||||
line-height: 46rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.time {
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
line-height: 30rpx;
|
||||
font-family: PingFangSC;
|
||||
font-weight: 400;
|
||||
color: #666666;
|
||||
margin-top: 28rpx;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
|
||||
.num_div {
|
||||
font-family: PingFangSC;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.color_1 {
|
||||
color: #d70c18;
|
||||
}
|
||||
|
||||
.color_2 {
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.color_3 {
|
||||
color: #666666;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
@@ -1,246 +1,122 @@
|
||||
<template>
|
||||
<scroll-view ref="scrollRef" scroll-y="true" class="scroll-Y" :refresher-enabled="false"
|
||||
@refresherrefresh="onRefresh" @refresherrestore="triggered = 'restore'" :refresher-triggered="triggered"
|
||||
refresher-default-style="none" @scrolltolower="scrolltolower">
|
||||
<scroll-view
|
||||
ref="scrollRef"
|
||||
scroll-y="true"
|
||||
class="scroll-Y"
|
||||
:refresher-enabled="false"
|
||||
@scrolltolower="scrolltolower"
|
||||
>
|
||||
<!-- 主体 -->
|
||||
<view class="content">
|
||||
<view class="drop-down-div"> 下拉显示</view>
|
||||
<view class="item" v-for="(item,index) in data_list" :class="item.examStatText=='Y'?'completed':'incomplete'"
|
||||
@click="gotoDetails(item)">
|
||||
<view class="subscript" v-if="item.examStatText==='N'">未完成</view>
|
||||
<view class="subscript" v-if="item.examStatText==='Y'">已完成</view>
|
||||
<view class="title ellipsis-text">
|
||||
{{item.papersName}}
|
||||
</view>
|
||||
<view class="time">
|
||||
<text class="color_3">起止时间:</text><text
|
||||
class="color_class">{{item.examStartTm}}至{{item.examEndTm}}</text>
|
||||
</view>
|
||||
<view class="num_div">
|
||||
<text class="color_3">完成人数:</text><text
|
||||
class="color_2">{{item.execPersionNumer}}/{{item.planPersionNumber}}</text>
|
||||
</view>
|
||||
</view>
|
||||
<list-no-data v-if="total == 0 && status=='nomore'"></list-no-data>
|
||||
<itemVue :item="item" v-for="item in data_list"></itemVue>
|
||||
<list-no-data v-if="total == 0 && status == 'nomore'"></list-no-data>
|
||||
<uv-load-more v-if="total != 0" :status="status" loadmore-text="轻轻上拉加载" :height="30"></uv-load-more>
|
||||
</view>
|
||||
</scroll-view>
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
ref,
|
||||
reactive,
|
||||
nextTick,
|
||||
onMounted
|
||||
} from 'vue'
|
||||
import {
|
||||
queryTraExamPapersPage
|
||||
} from '@/api/testingHall.js'
|
||||
import {
|
||||
queryTraCrsBbsInfoByCrsId
|
||||
} from '@/api/courseDetail.js';
|
||||
import { ref, reactive, nextTick, onMounted } from 'vue';
|
||||
import { queryTraExamPapersPage } from '@/api/testingHall.js';
|
||||
import { queryTraCrsBbsInfoByCrsId } from '@/api/courseDetail.js';
|
||||
import itemVue from './content-item.vue';
|
||||
|
||||
const status = ref('loadmore') // loadmore - 加载前,loading - 加载中,nomore - 没有数据
|
||||
const limit = 15
|
||||
const total = ref(-1)
|
||||
const page = ref(0)
|
||||
const data_list = reactive([])
|
||||
|
||||
const triggered = ref(false)
|
||||
const _freshing = ref(false)
|
||||
const offset = ref(0)
|
||||
const scrollRef = ref(null)
|
||||
const status = ref('loadmore'); // loadmore - 加载前,loading - 加载中,nomore - 没有数据
|
||||
const limit = 15;
|
||||
const total = ref(-1);
|
||||
const page = ref(0);
|
||||
const data_list = reactive([]);
|
||||
|
||||
const triggered = ref(false);
|
||||
const _freshing = ref(false);
|
||||
const offset = ref(0);
|
||||
const scrollRef = ref(null);
|
||||
|
||||
const props = defineProps({
|
||||
index: {
|
||||
type: Number,
|
||||
default: 0
|
||||
},
|
||||
})
|
||||
|
||||
const emit = defineEmits(['gotoDetails'])
|
||||
// 刷新处理函数
|
||||
const gotoDetails = (item) => emit('gotoDetails', item)
|
||||
}
|
||||
});
|
||||
|
||||
const onRefresh = () => {
|
||||
if (_freshing.value) return
|
||||
_freshing.value = true
|
||||
if (_freshing.value) return;
|
||||
_freshing.value = true;
|
||||
setTimeout(() => {
|
||||
triggered.value = false
|
||||
_freshing.value = false
|
||||
}, 1000)
|
||||
|
||||
}
|
||||
const getData = (from = '', searchText='') => {
|
||||
|
||||
triggered.value = false;
|
||||
_freshing.value = false;
|
||||
}, 1000);
|
||||
};
|
||||
const getData = (from = '', searchText = '') => {
|
||||
if (from == 'first') {
|
||||
if (total.value !== -1) return;
|
||||
status.value = 'loading'
|
||||
total.value = -1
|
||||
page.value = 1
|
||||
data_list.length = 0
|
||||
status.value = 'loading';
|
||||
total.value = -1;
|
||||
page.value = 1;
|
||||
data_list.length = 0;
|
||||
} else {
|
||||
if (status.value !== 'loadmore' && status.value !== '') return
|
||||
status.value = 'loading'
|
||||
page.value++
|
||||
if (status.value !== 'loadmore' && status.value !== '') return;
|
||||
status.value = 'loading';
|
||||
page.value++;
|
||||
}
|
||||
|
||||
setTimeout(() => {
|
||||
let params = {
|
||||
papersName: searchText,
|
||||
page: page.value,
|
||||
limit: limit,
|
||||
}
|
||||
limit: limit
|
||||
};
|
||||
if (props.index == 1) {
|
||||
params.examStat = 'Y'
|
||||
params.examStat = 'Y';
|
||||
} else if (props.index == 2) {
|
||||
params.examStat = 'N'
|
||||
params.examStat = 'N';
|
||||
}
|
||||
queryTraExamPapersPage(params).then(res => {
|
||||
console.log('resresresresres', res);
|
||||
total.value = res.total
|
||||
data_list.push(...res.body)
|
||||
}).catch(res => {
|
||||
console.log('谢谢谢谢谢谢', res);
|
||||
}).finally(() => {
|
||||
if (data_list.length >= total.value) {
|
||||
status.value = 'nomore'
|
||||
} else {
|
||||
status.value = 'loadmore'
|
||||
}
|
||||
console.log(status.value);
|
||||
})
|
||||
}, 200)
|
||||
}
|
||||
queryTraExamPapersPage(params)
|
||||
.then((res) => {
|
||||
console.log('resresresresres', res);
|
||||
total.value = res.total;
|
||||
data_list.push(...res.body);
|
||||
})
|
||||
.catch((res) => {
|
||||
console.log('谢谢谢谢谢谢', res);
|
||||
})
|
||||
.finally(() => {
|
||||
if (data_list.length >= total.value) {
|
||||
status.value = 'nomore';
|
||||
} else {
|
||||
status.value = 'loadmore';
|
||||
}
|
||||
console.log(status.value);
|
||||
});
|
||||
}, 200);
|
||||
};
|
||||
const scrolltolower = () => {
|
||||
getData()
|
||||
getData();
|
||||
};
|
||||
const search = (value) => {
|
||||
console.log('searchvalue', value);
|
||||
total.value = -1
|
||||
getData('first', value)
|
||||
}
|
||||
total.value = -1;
|
||||
getData('first', value);
|
||||
};
|
||||
defineExpose({
|
||||
getData, search
|
||||
})
|
||||
getData,
|
||||
search
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.incomplete {
|
||||
|
||||
// 进行中
|
||||
.subscript {
|
||||
color: #FFFFFF;
|
||||
background-color: #EF5705;
|
||||
}
|
||||
|
||||
.color_class {
|
||||
color: #D70C18;
|
||||
}
|
||||
}
|
||||
|
||||
.completed {
|
||||
|
||||
// 已完成
|
||||
.subscript {
|
||||
color: #FFFFFF;
|
||||
background-color: #33C583;
|
||||
}
|
||||
|
||||
.color_class {
|
||||
color: #0066FF;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
.subscript {
|
||||
position: absolute;
|
||||
right: 0;
|
||||
top: 0;
|
||||
width: 92rpx;
|
||||
height: 46rpx;
|
||||
border-radius: 0px 0px 0px 22rpx;
|
||||
font-family: PingFangSC;
|
||||
font-weight: 400;
|
||||
font-size: 22rpx;
|
||||
line-height: 32px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.scroll-Y {
|
||||
height: calc(100vh - var(--status-bar-height) - 70rpx - 78rpx - 40rpx - 88rpx);
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
background-color: #F1F5FA;
|
||||
background-color: #f1f5fa;
|
||||
|
||||
.content {
|
||||
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 20rpx 20rpx 0 0;
|
||||
|
||||
position: relative;
|
||||
padding-top: 22rpx;
|
||||
|
||||
.drop-down-div {
|
||||
position: absolute;
|
||||
top: -90rpx;
|
||||
width: 100%;
|
||||
height: 90rpx;
|
||||
background-color: #e1eeff;
|
||||
}
|
||||
|
||||
.item {
|
||||
padding: 30rpx 44rpx 20rpx 38rpx;
|
||||
margin: 0rpx 22rpx 22rpx 22rpx;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background-color: #FFFFFF;
|
||||
border-radius: 16rpx;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
|
||||
.title {
|
||||
font-family: PingFangSC;
|
||||
font-weight: 600;
|
||||
font-size: 30rpx;
|
||||
color: #000000;
|
||||
line-height: 46rpx;
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.time {
|
||||
font-size: 24rpx;
|
||||
color: #999999;
|
||||
line-height: 30rpx;
|
||||
font-family: PingFangSC;
|
||||
font-weight: 400;
|
||||
color: #666666;
|
||||
margin-top: 28rpx;
|
||||
margin-bottom: 16rpx;
|
||||
}
|
||||
|
||||
.num_div {
|
||||
font-family: PingFangSC;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
}
|
||||
|
||||
.color_1 {
|
||||
color: #D70C18;
|
||||
}
|
||||
|
||||
.color_2 {
|
||||
color: #333333;
|
||||
}
|
||||
|
||||
.color_3 {
|
||||
color: #666666;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
+103
-150
@@ -7,169 +7,122 @@
|
||||
</view>
|
||||
<view>考试详情</view>
|
||||
</view>
|
||||
<view class="detail_div" :class="detailData.examStatText=='Y'?'completed':'incomplete'">
|
||||
<view class="subscript" v-if="detailData.examStatText==='N'">未完成</view>
|
||||
<view class="subscript" v-if="detailData.examStatText==='Y'">已完成</view>
|
||||
<view class="detail_div" :class="detailData.examStatText == 'Y' ? 'completed' : 'incomplete'">
|
||||
<view class="subscript" v-if="detailData.examStatText === 'N'">未完成</view>
|
||||
<view class="subscript" v-if="detailData.examStatText === 'Y'">已完成</view>
|
||||
<view class="title_div">
|
||||
<view class="title ellipsis-text">{{detailData.papersName}}</view>
|
||||
<view class="title ellipsis-text">{{ detailData.papersName }}</view>
|
||||
</view>
|
||||
<view class="time">
|
||||
<text class="color_3">起止时间:</text><text
|
||||
class="color_class">{{detailData.examStartTm}}至{{detailData.examEndTm}}</text>
|
||||
<text class="color_3">起止时间:</text>
|
||||
<text class="color_class">{{ detailData.examStartTm }}至{{ detailData.examEndTm }}</text>
|
||||
</view>
|
||||
<view class="num_div">
|
||||
<text class="color_3">完成人数:</text><text
|
||||
class="color_2">{{detailData.execPersionNumer}}/{{detailData.planPersionNumber}}</text>
|
||||
<text class="color_3">完成人数:</text>
|
||||
<text class="color_2">{{ detailData.execPersionNumer }}/{{ detailData.planPersionNumber }}</text>
|
||||
</view>
|
||||
</view>
|
||||
<view class="paper_div">
|
||||
<view class="paper">
|
||||
<!-- 试卷信息 -->
|
||||
<view class="paper_title_div">
|
||||
<image src="@/static/images/testingHall/testing.png" class="img"></image>
|
||||
<view class="title">
|
||||
试卷信息
|
||||
</view>
|
||||
<image src="@/static/images/testingHall/testing.png" class="img"></image>
|
||||
<view class="title">试卷信息</view>
|
||||
</view>
|
||||
<view class="title-note">
|
||||
考试时长:<text class="bold">{{detailData.totalGrade}}</text>分钟
|
||||
考试时长:
|
||||
<text class="bold">{{ detailData.limitTm }}</text>
|
||||
分钟
|
||||
</view>
|
||||
<view class="title-table">
|
||||
<view class="title-table-item">
|
||||
<view class="top">
|
||||
<text class="text_2">{{detailData.passGrade}}</text><text class="text_1">分</text>
|
||||
</view>
|
||||
<view class="bottom text_1">
|
||||
试卷总分
|
||||
<text class="text_2">{{ detailData.totalGrade }}</text>
|
||||
<text class="text_1">分</text>
|
||||
</view>
|
||||
<view class="bottom text_1">试卷总分</view>
|
||||
</view>
|
||||
<view class="title-table-item">
|
||||
<view class="top">
|
||||
<text class="text_2">{{detailData.passGrade}}</text><text class="text_1">分</text>
|
||||
<text class="text_2">{{ detailData.passGrade }}</text>
|
||||
<text class="text_1">分</text>
|
||||
</view>
|
||||
|
||||
<view class="bottom text_1">
|
||||
通过分数
|
||||
</view>
|
||||
<view class="bottom text_1">通过分数</view>
|
||||
</view>
|
||||
<view class="title-table-item">
|
||||
<view class="top text_2">
|
||||
不限制
|
||||
</view>
|
||||
<view class="bottom text_1">
|
||||
通过次数
|
||||
{{ detailData.limitTypText }}
|
||||
</view>
|
||||
<view class="bottom text_1">通过次数</view>
|
||||
</view>
|
||||
<view class="title-table-item">
|
||||
<view class="top text_2">
|
||||
随机
|
||||
</view>
|
||||
<view class="bottom text_1">
|
||||
试卷类型
|
||||
{{ detailData.papersTypText || '随机' }}
|
||||
</view>
|
||||
<view class="bottom text_1">试卷类型</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="table">
|
||||
<view class="table_th">
|
||||
<view class="table_td">题型</view>
|
||||
<view class="fl1"></view>
|
||||
<view class="table_td">数量</view>
|
||||
<view class="table_td">分值</view>
|
||||
</view>
|
||||
<view
|
||||
class="table_tr"
|
||||
v-for="(t, t_index) in detailData.papersPlateVos"
|
||||
:class="{ table_tr_dark: t_index % 2 }"
|
||||
>
|
||||
<view class="table_td">
|
||||
题型
|
||||
{{ t.plateName }}
|
||||
</view>
|
||||
<view class="fl1"></view>
|
||||
<view class="table_td">
|
||||
数量
|
||||
{{ t.qnsNumber }}
|
||||
</view>
|
||||
<view class="table_td">
|
||||
分值
|
||||
{{ t.tgtGrade }}
|
||||
</view>
|
||||
</view>
|
||||
|
||||
<view class="table_tr">
|
||||
<view class="table_td">
|
||||
判断题
|
||||
</view>
|
||||
<view class="table_td">总计</view>
|
||||
<view class="fl1"></view>
|
||||
<view class="table_td">
|
||||
{{detailData.judgeNumber}}
|
||||
{{ allNumber }}
|
||||
</view>
|
||||
<view class="table_td">
|
||||
{{detailData.judgeGrade}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="table_tr table_tr_dark">
|
||||
<view class="table_td">
|
||||
单选题
|
||||
</view>
|
||||
<view class="fl1"></view>
|
||||
<view class="table_td">
|
||||
{{detailData.singleNumber}}
|
||||
</view>
|
||||
<view class="table_td">
|
||||
{{detailData.singleGrade}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="table_tr">
|
||||
<view class="table_td">
|
||||
多选题
|
||||
</view>
|
||||
<view class="fl1"></view>
|
||||
<view class="table_td">
|
||||
{{detailData.multiNumber}}
|
||||
</view>
|
||||
<view class="table_td">
|
||||
{{detailData.multiGrade}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="table_tr table_tr_dark">
|
||||
<view class="table_td">
|
||||
问答题
|
||||
</view>
|
||||
<view class="fl1"></view>
|
||||
<view class="table_td">
|
||||
{{detailData.essayNumber}}
|
||||
</view>
|
||||
<view class="table_td">
|
||||
{{detailData.essayGrade}}
|
||||
</view>
|
||||
</view>
|
||||
<view class="table_tr">
|
||||
<view class="table_td">
|
||||
总计
|
||||
</view>
|
||||
<view class="fl1"></view>
|
||||
<view class="table_td">
|
||||
{{allNumber}}
|
||||
</view>
|
||||
<view class="table_td">
|
||||
{{allGrade}}
|
||||
{{ allGrade }}
|
||||
</view>
|
||||
</view>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
</view>
|
||||
<view class="fixed_button_div">
|
||||
<uv-button type="primary" class="send_evaluate" :custom-style="customStyle" :throttleTime="300"
|
||||
:hairline="false" @click="goto_examination()">开始考试</uv-button>
|
||||
<uv-button
|
||||
type="primary"
|
||||
class="send_evaluate"
|
||||
:custom-style="customStyle"
|
||||
:throttleTime="300"
|
||||
:hairline="false"
|
||||
@click="goto_examination()"
|
||||
>
|
||||
开始考试
|
||||
</uv-button>
|
||||
</view>
|
||||
|
||||
</view>
|
||||
|
||||
</template>
|
||||
|
||||
<script setup>
|
||||
import {
|
||||
onLoad
|
||||
} from '@dcloudio/uni-app';
|
||||
import {
|
||||
reactive,
|
||||
computed
|
||||
} from 'vue'
|
||||
import {
|
||||
startTraExamPapersInfo
|
||||
} from '@/api/examination.js'
|
||||
import { onLoad } from '@dcloudio/uni-app';
|
||||
import { reactive, computed } from 'vue';
|
||||
import { startTraExamPapersInfo } from '@/api/examination.js';
|
||||
|
||||
import common from '@/common/common';
|
||||
import {setPageCache, getPageCache} from '@/common/common';
|
||||
import { setPageCache, getPageCache } from '@/common/common';
|
||||
const detailData = reactive({
|
||||
papersId: '',
|
||||
papersName: '',
|
||||
@@ -184,31 +137,41 @@
|
||||
judgeGrade: 0,
|
||||
singleGrade: 0,
|
||||
multiGrade: 0,
|
||||
essayGrade: 0,
|
||||
})
|
||||
essayGrade: 0
|
||||
});
|
||||
const customStyle = {
|
||||
backgroundColor: '#0066FF',
|
||||
border: '1px solid rgb(12, 123, 245)',
|
||||
}
|
||||
const allNumber = computed(() => detailData.judgeNumber + detailData.singleNumber + detailData.multiNumber + detailData.essayNumber)
|
||||
const allGrade = computed(() => detailData.judgeGrade + detailData.singleGrade + detailData.multiGrade + detailData.essayGrade)
|
||||
border: '1px solid rgb(12, 123, 245)'
|
||||
};
|
||||
const allNumber = computed(() =>
|
||||
detailData.papersPlateVos.reduce((sum, item) => {
|
||||
return sum + (item.qnsNumber || 0);
|
||||
}, 0)
|
||||
);
|
||||
const allGrade = computed(() =>
|
||||
detailData.papersPlateVos.reduce((sum, item) => {
|
||||
return sum + (item.tgtGrade || 0);
|
||||
}, 0)
|
||||
);
|
||||
const goto_examination = async () => {
|
||||
common.loading()
|
||||
common.loading();
|
||||
startTraExamPapersInfo({
|
||||
examId : detailData.examId
|
||||
}).then(res => {
|
||||
setPageCache('examination', {...res.body, examId:detailData.examId})
|
||||
common.navigateTo('/pages/examination/index')
|
||||
}).finally(() => {
|
||||
common.hideLoading()
|
||||
examId: detailData.examId
|
||||
})
|
||||
}
|
||||
.then((res) => {
|
||||
setPageCache('examination', { ...res.body, examId: detailData.examId });
|
||||
common.navigateTo('/pages/examination/index');
|
||||
})
|
||||
.finally(() => {
|
||||
common.hideLoading();
|
||||
});
|
||||
};
|
||||
onLoad((e) => {
|
||||
const testing_hall_details = getPageCache('testing_hall_details')
|
||||
const testing_hall_details = getPageCache('testing_hall_details');
|
||||
Object.assign(detailData, {
|
||||
...testing_hall_details
|
||||
})
|
||||
})
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
@@ -223,7 +186,7 @@
|
||||
align-items: center;
|
||||
justify-content: space-around;
|
||||
|
||||
background-color: #F4F6F9;
|
||||
background-color: #f4f6f9;
|
||||
border-radius: 16rpx;
|
||||
padding: 28rpx 28rpx 26rpx 28rpx;
|
||||
margin: 32rpx 0 48rpx 0;
|
||||
@@ -252,7 +215,8 @@
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
.text_3 {}
|
||||
.text_3 {
|
||||
}
|
||||
}
|
||||
|
||||
.paper_div {
|
||||
@@ -265,9 +229,9 @@
|
||||
margin: 24rpx 30rpx 0 30rpx;
|
||||
border-radius: 20rpx;
|
||||
padding: 16rpx;
|
||||
background-color: #FFFFFF;
|
||||
background-color: #ffffff;
|
||||
// /* 顶部100px区域设置渐变 */
|
||||
background-image: linear-gradient(to bottom, #EBF2FE, #FFFFFF);
|
||||
background-image: linear-gradient(to bottom, #ebf2fe, #ffffff);
|
||||
// /* 只显示顶部100px的渐变 */
|
||||
background-size: 100% 100px;
|
||||
background-repeat: no-repeat;
|
||||
@@ -294,8 +258,6 @@
|
||||
color: #333333;
|
||||
font-style: normal;
|
||||
margin-left: 12rpx;
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -317,15 +279,15 @@
|
||||
.table_th {
|
||||
flex: 1;
|
||||
display: flex;
|
||||
background-color: #F4F6F9;
|
||||
background-color: #f4f6f9;
|
||||
padding: 0 20rpx;
|
||||
}
|
||||
|
||||
.table_tr_dark {
|
||||
background-color: #FAFAFA;
|
||||
background-color: #fafafa;
|
||||
}
|
||||
|
||||
.table_th>.table_td {
|
||||
.table_th > .table_td {
|
||||
color: #333333;
|
||||
font-weight: 600;
|
||||
}
|
||||
@@ -345,11 +307,10 @@
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.table_tr>.table_td {
|
||||
.table_tr > .table_td {
|
||||
color: #666666;
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -358,16 +319,14 @@
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
overflow: hidden;
|
||||
|
||||
}
|
||||
.my-nav-bar{
|
||||
.my-nav-bar {
|
||||
width: 100%;
|
||||
height: calc(var(--status-bar-height) - 40rpx);
|
||||
background-color: #337FFF;
|
||||
background-color: #337fff;
|
||||
}
|
||||
.body-title {
|
||||
|
||||
background-color: #337FFF;
|
||||
background-color: #337fff;
|
||||
width: 100%;
|
||||
position: relative;
|
||||
text-align: center;
|
||||
@@ -376,7 +335,7 @@
|
||||
font-family: PingFangSC;
|
||||
font-weight: 500;
|
||||
font-size: 38rpx;
|
||||
color: #FFFFFF;
|
||||
color: #ffffff;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
@@ -385,7 +344,7 @@
|
||||
z-index: 2;
|
||||
width: 100%;
|
||||
padding: 48rpx 40rpx 20rpx 40rpx;
|
||||
background-color: #FFFFFF;
|
||||
background-color: #ffffff;
|
||||
border-radius: 16rpx 16rpx 0 0;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
@@ -420,9 +379,6 @@
|
||||
text-align: left;
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
.time {
|
||||
@@ -440,11 +396,10 @@
|
||||
font-family: PingFangSC;
|
||||
font-weight: 400;
|
||||
font-size: 24rpx;
|
||||
|
||||
}
|
||||
|
||||
.color_1 {
|
||||
color: #D70C18;
|
||||
color: #d70c18;
|
||||
}
|
||||
|
||||
.color_2 {
|
||||
@@ -457,28 +412,26 @@
|
||||
}
|
||||
|
||||
.incomplete {
|
||||
|
||||
// 进行中
|
||||
.subscript {
|
||||
color: #FFFFFF;
|
||||
background-color: #EF5705;
|
||||
color: #ffffff;
|
||||
background-color: #ef5705;
|
||||
}
|
||||
|
||||
.color_class {
|
||||
color: #D70C18;
|
||||
color: #d70c18;
|
||||
}
|
||||
}
|
||||
|
||||
.completed {
|
||||
|
||||
// 已完成
|
||||
.subscript {
|
||||
color: #FFFFFF;
|
||||
background-color: #33C583;
|
||||
color: #ffffff;
|
||||
background-color: #33c583;
|
||||
}
|
||||
|
||||
.color_class {
|
||||
color: #0066FF;
|
||||
color: #0066ff;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -516,4 +469,4 @@
|
||||
transform: rotate(-45deg);
|
||||
}
|
||||
}
|
||||
</style>
|
||||
</style>
|
||||
|
||||
@@ -50,24 +50,10 @@
|
||||
setPageCache
|
||||
} from '@/common/common';
|
||||
import common from '@/common/common';
|
||||
const customStyle = {
|
||||
backgroundColor: "#F1F5FA",
|
||||
paddingLeft: "40rpx",
|
||||
height: '78rpx',
|
||||
paddingTop: "5px",
|
||||
paddingBottom: "5px",
|
||||
border: "none"
|
||||
}
|
||||
const suffixIconStyle = {
|
||||
color: "#2c8ef2",
|
||||
fontSize: "50rpx"
|
||||
}
|
||||
|
||||
const statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
|
||||
|
||||
import {
|
||||
LineBg
|
||||
} from '@/enum.js'
|
||||
const contentRef = ref(null);
|
||||
const tabAct = ref(0);
|
||||
|
||||
const tabList = ref([{
|
||||
|
||||
Reference in New Issue
Block a user