This commit is contained in:
zhangsir
2024-06-25 11:30:12 +08:00
parent c590f09477
commit 4d22fa5c4c
2 changed files with 65 additions and 13 deletions

View File

@@ -94,6 +94,7 @@
this.startList = res.data this.startList = res.data
if(res.code == 200 ){ if(res.code == 200 ){
this.posiLists = res.data this.posiLists = res.data
this.indexs.push(0)
if(this.posiLists.length > 9){ if(this.posiLists.length > 9){
this.posiLists = this.posiLists.slice(0, 9) this.posiLists = this.posiLists.slice(0, 9)
} }
@@ -114,6 +115,9 @@
this.isTrue = true this.isTrue = true
}, },
searchItem(item,index){ searchItem(item,index){
if(index == 0){
return
}
const indexToRemove = this.indexs.indexOf(index); const indexToRemove = this.indexs.indexOf(index);
if (indexToRemove !== -1) { if (indexToRemove !== -1) {
this.indexs.splice(indexToRemove, 1); this.indexs.splice(indexToRemove, 1);

View File

@@ -197,10 +197,19 @@
</view> </view>
</view> </view>
<view class="plan_right"> <view class="plan_right">
<view>总进度</view> <!-- <view>总进度</view>
<view>{{Number(((detailData.overallCompletionRate || 0)*100).toFixed(2))}}%</view> <view>{{Number(((detailData.overallCompletionRate || 0)*100).toFixed(2))}}%</view>
<view class="line"> <view class="line">
<u-line-progress :percentage="Number(((detailData.overallCompletionRate || 0)*100).toFixed(2))" activeColor="#387DF7"></u-line-progress> <u-line-progress :percentage="Number(((detailData.overallCompletionRate || 0)*100).toFixed(2))" activeColor="#387DF7"></u-line-progress>
</view> -->
<view class="semi-circle-progress">
<view class="progress-bar">
<view class="item">
<view class="pro">{{Number(((detailData.overallCompletionRate || 0)*100).toFixed(2))}}%</view>
<view class="text">总进度</view>
</view>
</view>
<view class="pro_line" :style="{ '--progress': (100-Number(((detailData.overallCompletionRate || 0)*100).toFixed(2))) + '%' }"></view>
</view> </view>
</view> </view>
</view> </view>
@@ -751,18 +760,17 @@
if (this.tabIndex == 1 && this.studyList.length == 0) { if (this.tabIndex == 1 && this.studyList.length == 0) {
this.getLearning() this.getLearning()
} else if (this.tabIndex == 2) { } else if (this.tabIndex == 2) {
if(localStorage.getItem("checkedTrue")!=null){ getList(this.userInfo.aid).then(res=>{
this.learnModal = localStorage.getItem("checkedTrue") === "true" if(res.code == 200 ){
this.isChecked = localStorage.getItem("checkedTrue") === "false" this.detailData = res.data
getList(this.userInfo.aid).then(res=>{ if(Object.keys(this.detailData).length&&localStorage.getItem("checkedTrue")!=null){
console.log(res,'res') this.learnModal = localStorage.getItem("checkedTrue") === "true"
if(res.code == 200 ){ this.isChecked = localStorage.getItem("checkedTrue") === "false"
this.detailData = res.data }else{
this.learnModal = true
} }
}) }
}else{ })
this.learnModal = true
}
//this.history() //this.history()
} else if (this.tabIndex == 0 && this.couresList.length == 0) { } else if (this.tabIndex == 0 && this.couresList.length == 0) {
this.loadBoeData() this.loadBoeData()
@@ -1233,10 +1241,50 @@
} }
} }
.plan_right{ .plan_right{
margin-right: -50px;
.semi-circle-progress {
width: 340rpx;
height: 120rpx;
position: relative;
overflow: hidden;
}
.progress-bar{
width: 50%;
height: 150%;
border-radius: 50%;
border: 24rpx solid #DFDFE4 ;
display: flex;
justify-content: center;
.item{
margin-top: 16rpx;
text-align: center;
.pro{
font-weight: 600;
font-size: 36rpx;
color: #2E72F2;
}
.text{
font-weight: 400;
font-size: 28rpx;
color: #A7ACBA;
}
}
}
.pro_line{
width: 50%;
height: 150%;
border-radius: 50%;
border: 24rpx solid #2E72F2;
position: absolute;
top: 0;
clip-path: inset(0 0 0 var(--progress));
// clip-path: inset(0 0 0 50%);
transform: rotate(180deg);
}
// display: flex; // display: flex;
// justify-content: center; // justify-content: center;
// align-items: center; // align-items: center;
margin-top: 31px; margin-top: 46rpx;
.line{ .line{
width: 184rpx; width: 184rpx;
height: 1rpx; height: 1rpx;