修改错题本的文件名

This commit is contained in:
田岩
2025-08-20 16:40:41 +08:00
parent 7a36fab884
commit 249fcf5dba
18 changed files with 585 additions and 216 deletions
@@ -1,97 +1,88 @@
<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">
<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">
<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 class="subscript" v-if="item.isFinish==='02'">
已超时
</view>
<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}}
{{ 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 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>
完成人数
<text class="">{{ item.taskFinishSums ?? 0 }}/{{ item.taskSums ?? 0 }}</text>
</view>
<view>
进度<text class="">{{item.sumCrs ?? 0}}/{{item.sumCrs ?? 0}}门课程</text>
进度
<text class="">{{ item.sumCrs ?? 0 }}/{{ item.sumCrs ?? 0 }}门课程</text>
</view>
</view>
</view>
</view>
<list-no-data v-if="total == 0 && status=='nomore'"></list-no-data>
<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 {
ref,
reactive,
onMounted,
nextTick
} from 'vue'
import {
queryAllTraTaskInfoByUserId,
} from '@/api/learningTasks.js';
const status = ref('loading'); // loadmore - 加载前,loading - 加载中,nomore - 没有数据
const limit = 15;
const total = ref(-1);
const page = ref(0);
const data_list = reactive([]);
import { ref, reactive, onMounted, nextTick } from 'vue';
import { queryAllTraTaskInfoByUserId } from '@/api/learningTasks.js';
const props = defineProps({
state: {
type: String,
required: true,
},
required: true
}
});
const getData = (from = '', searchText='') => {
const getData = (from = '', searchText = '') => {
if (from == 'first') {
if (total.value !== -1) {
return
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(() => {
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'
}
console.log(status.value, '阿斯顿撒');
taskName: searchText
})
}, 200)
}
.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';
}
console.log(status.value, '阿斯顿撒');
});
}, 200);
};
const getStatusClass = (isFinish) => {
// 00进行中、01已完成、02已超时
if (isFinish === '00') return 'in_progress';
@@ -99,27 +90,26 @@
return 'expired';
};
const scrolltolower = (item) => {
getData()
getData();
};
const search = (value) => {
total.value = -1
total.value = -1;
console.log('value', value);
getData('first', value)
}
getData('first', value);
};
defineExpose({
getData, search
})
getData,
search
});
</script>
<style scoped lang="scss">
.scroll_div {
background-color: #F1F5FA;
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;
@@ -128,41 +118,38 @@
.scroll-Y {
.item.in_progress {
// 进行中
.subscript {
color: #0066FF;
background-color: #DAF0FF;
color: #0066ff;
background-color: #daf0ff;
}
.blod_color {
color: #0066FF;
color: #0066ff;
}
}
.item.completed {
.item.completed {
// 已完成
.subscript {
color: #FFFFFF;
background-color: #33C583 !important;
color: #ffffff;
background-color: #33c583 !important;
}
.blod_color {
color: #0066FF;
color: #0066ff;
}
}
.item.expired {
// 已超时
.subscript {
color: #FFFFFF;
background-color: #EF5705;
color: #ffffff;
background-color: #ef5705;
}
.blod_color {
color: #D70C18;
color: #d70c18;
}
}
}
@@ -199,7 +186,6 @@
align-items: center;
justify-content: center;
}
}
.right_div {
@@ -244,4 +230,4 @@
}
}
}
</style>
</style>
+224 -29
View File
@@ -1,6 +1,6 @@
<template>
<view class="main_div max_page">
<nav-bar :is_seat="true"></nav-bar>
<view class="my-nav-bar"></view>
<view class="body-title">
<view class="back_div" @click="common.navigateBack()">
<view class="back-icon"></view>
@@ -8,20 +8,33 @@
<view>任务详情</view>
</view>
<view class="detail_div" :class="'completed'">
<view class="subscript" v-if="detailData.examStatText === 'N'">未完成</view>
<view class="subscript" v-if="detailData.examStatText === 'Y'">已完成</view>
<view class="left">
<image src="/src/static/images/test/2.png" mode="aspectFill" class="img"></image>
</view>
<view class="right">
<view class="title_div">
<view class="title">
JBank银行服诉旦撒大银行服诉旦撒大银行服诉旦撒大银行服诉旦撒大银行服诉旦撒大银行服诉旦撒大
JBank银行服诉旦撒大银行服诉旦撒大1233333213银行服诉旦撒大银行服诉旦撒大银行服诉旦撒大
</view>
</view>
<view class="time">
<text class="color_3">起止时间</text>
<text class="color_class">2025-05-13至2025-05-13</text>
<view class="fl1"></view>
<view class="num-item" @click="collect_click('ss')">
<image
v-if="false"
class="collect-icon"
src="@/static/images/courseDetail/out_collect.png"
mode="widthFix"
></image>
<image
v-else
class="collect-icon"
src="@/static/images/courseDetail/in_collect.png"
mode="widthFix"
></image>
</view>
</view>
<view class="num_div">
<view class="num_div_item">
@@ -35,13 +48,38 @@
</view>
</view>
</view>
<scroll-view
ref="scrollRef"
:scroll-y="true"
class="scroll-Y"
:show-scrollbar="false"
@scrolltolower="scrolltolower"
></scroll-view>
<view class="scroll-div">
<view class="paper_title_div">
<image src="@/static/images/testingHall/testing.png" class="img" mode="aspectFit"></image>
<view class="title">试卷信息</view>
</view>
<scroll-view
ref="scrollRef"
:scroll-y="true"
class="scroll-Y"
:show-scrollbar="false"
@scrolltolower="scrolltolower"
>
<view class="item" v-for="item in [1, 23, 4, 5, 6, 78, 8, 1231, 1, , 123, 213, 213, 123]">
<view class="progress_div">
<view class="circle_div"></view>
<view class="line_div"></view>
</view>
<view class="content_div">
<view class="status_div">已结束</view>
<view class="main_body_div">
<view class="title">中国银行业的监管机构有哪些中国银行业的监管机构有哪些中国银行业的监管机构有哪些中国银行业的监管机构有哪些中国银行业的监管机构有哪些</view>
<view class="button_div">
<image class="img" :src="passTheExamIcon('#0066FF')"></image>
<view class="button_text">完成练习</view>
<image class="img" :src="completeTheExercisesIcon('#0066FF')"></image>
<view class="button_text">通过考试</view>
</view>
</view>
</view>
</view>
</scroll-view>
</view>
</view>
</template>
@@ -49,7 +87,7 @@
import { onLoad } from '@dcloudio/uni-app';
import { reactive, computed } from 'vue';
import { startTraExamPapersInfo } from '@/api/examination.js';
import { passTheExamIcon, completeTheExercisesIcon } from '@/common/imgSvg';
import common from '@/common/common';
import { setPageCache, getPageCache } from '@/common/common';
const detailData = reactive({
@@ -69,31 +107,167 @@
essayGrade: 0
});
const scrolltolower = () => {};
const collect_click = async (collectId) => {
try {
if (!collectId) {
common.loading('收藏中');
form.value.collectId = await insertTraPersonalCollectionTask({
collectTyp: '01',
collectBusId: crsId.value
});
common.msg('收藏成功');
} else {
common.loading('取消收藏中');
await deleteTraPersonalCollectionById({
collectId: collectId
});
form.value.collectId = null;
common.msg('取消成功');
}
} catch (e) {
common.hideLoading();
}
};
onLoad((e) => {
const testing_hall_details = getPageCache('testing_hall_details');
Object.assign(detailData, {
...testing_hall_details
});
console.log('detailData', detailData);
});
</script>
<style scoped lang="scss">
.scroll-Y {
position: relative;
overflow: hidden;
height: calc(100vh - var(--status-bar-height) - 120rpx - 250rpx + 20rpx + 20rpx - 20rpx);
width: calc(100% - 52rpx);
margin: 0 auto;
background: linear-gradient(180deg, #ebf2fe 0%, #f3f7fe 6%, #fafbfc 12%, #fafbfc 100%);
$bg-margin-left: 30rpx;
.scroll-Y .item {
margin: 0 $bg-margin-left 0 $bg-margin-left;
display: flex;
justify-content: space-between;
.progress_div {
width: 30rpx;
display: flex;
align-items: center;
flex-direction: column;
.circle_div {
width: 20rpx;
height: 20rpx;
border-radius: 100%;
border: 4rpx solid #0066ff;
background-color: #0066ff;
}
.line_div {
flex: 1;
width: 4rpx;
// border-left: 3rpx solid #0066FF;
// border-left: 4rpx dashed gold;
border-left: 4rpx dashed #0066ff;
margin: 6rpx 0;
}
}
.content_div {
flex: 1;
display: flex;
min-height: 140rpx;
background-color: #fff;
margin-bottom: 34rpx;
padding: 4rpx 4rpx 4rpx 4rpx;
// background-color: red;
border-radius: 16rpx;
overflow: hidden;
.status_div {
font-family: PingFangSC, PingFang SC;
font-weight: 400;
font-size: 30rpx;
color: #ffffff;
background-color: #4c93ff;
writing-mode: vertical-rl;
border-radius: 12rpx;
display: flex;
align-items: center;
justify-content: center;
padding: 4rpx 4rpx;
}
.main_body_div {
margin-left: 34rpx;
flex: 1;
display: flex;
flex-direction: column;
padding-right: 10rpx;
.title {
// background-color: red;
margin-top: 10rpx;
min-height: 30rpx;
flex: 1;
font-weight: 500;
font-size: 30rpx;
color: #333333;
line-height: 40rpx;
text-align: left;
font-style: normal;
}
.button_div {
// background-color: red;
height: 60rpx;
display: flex;
align-items: center;
flex-wrap: nowrap;
.img {
width: 30rpx;
height: 30rpx;
}
.button_text {
font-weight: 400;
font-size: 24rpx;
color: #0066ff;
text-align: left;
margin-right: 50rpx;
}
}
}
}
}
.paper_title_div {
display: flex;
align-items: center;
margin: 20rpx 0 20rpx $bg-margin-left;
height: 42rpx;
.img {
width: 32rpx;
height: 28rpx;
}
.title {
font-weight: 600;
font-family: PingFangTC;
font-weight: 600;
font-size: 30rpx;
color: #333333;
font-style: normal;
margin-left: 12rpx;
}
}
.scroll-div {
background: linear-gradient( 180deg, #EBF2FE 0%, #F3F7FE 6%, #F9FBFF 12%, #F4F6F8 100%);
// background: linear-gradient(180deg, #ebf2fe 0%, #f3f7fe 6%, #fafbfc 12%, #fafbfc 100%);
border-radius: 16rpx;
margin-top: -20rpx;
z-index: 2;
box-shadow: 0 0 6rpx #fafbfc;
border: 4rpx solid #FFFFFF;
box-shadow: 0 0 10rpx #F9FBFF;
border: 2rpx solid #F9F9FA;
margin: 0 auto;
width: calc(100% - 52rpx);
}
.scroll-Y {
position: relative;
overflow: hidden;
height: calc(100vh - var(--status-bar-height) - 120rpx - 250rpx + 20rpx + 20rpx - 20rpx - 42rpx - 50rpx);
}
.main_div {
background-image: url('@/static/images/learningTasks/learningTasksBg.png');
background-repeat: no-repeat;
@@ -101,6 +275,10 @@
background-position: top;
background-color: #fff;
}
.my-nav-bar {
width: 100%;
height: calc(var(--status-bar-height) - 10rpx);
}
.body-title {
width: 100%;
position: relative;
@@ -119,7 +297,7 @@
height: 250rpx;
z-index: 2;
width: 100%;
padding: 36rpx 40rpx 20rpx 40rpx;
padding: 36rpx 26rpx 20rpx 26rpx;
background-color: #ffffff;
border-radius: 16rpx 16rpx 0 0;
position: relative;
@@ -147,12 +325,15 @@
border-radius: 16rpx;
}
.right {
overflow: hidden;
margin-left: 24rpx;
.title_div {
display: flex;
justify-content: space-between;
flex: 1;
.title {
font-family: PingFangSC;
font-weight: 600;
color: #000000;
@@ -169,20 +350,34 @@
}
.time {
font-size: 24rpx;
font-size: 22rpx;
color: #999999;
line-height: 30rpx;
font-family: Arial;
font-weight: 400;
color: #666666;
margin-top: 12rpx;
margin-bottom: 12rpx;
height: 54rpx;
display: flex;
align-items: center;
.num-item {
display: flex;
align-items: center;
font-size: 30rpx;
color: #666666;
.collect-icon {
width: 36rpx;
height: 36rpx;
}
}
}
.num_div {
font-family: PingFangSC;
font-weight: 400;
font-size: 24rpx;
font-size: 22rpx;
display: flex;
align-items: center;
justify-content: space-between;
-13
View File
@@ -47,19 +47,6 @@
// 我的收藏
import { reactive, ref, computed, nextTick, onMounted, watch } from 'vue';
import common from '@/common/common.js';
const statusBarHeight = uni.getSystemInfoSync().statusBarHeight;
// 静态样式配置
const fixedCustomStyles = {
backgroundColor: '#F1F5FA',
paddingLeft: '40rpx',
paddingTop: '5px',
paddingBottom: '5px',
border: 'none'
};
const suffixIconStyle = {
color: '#2c8ef2',
fontSize: '28px'
};
const listItemRefs = ref([]);
const taskRef = ref(null);
const tabAct = ref(0);