fix:项目详情进度显示问题

This commit is contained in:
wyx
2023-02-16 10:01:13 +08:00
parent 3d64c0c61a
commit 9e91f41ca7

View File

@@ -43,9 +43,11 @@
</div> --> </div> -->
</div> </div>
<div v-if="i.stageId == '0' && i.taskProcessList.length == 0"></div> <div v-if="i.stageId == '0' && i.taskProcessList.length == 0"></div>
<div v-else class="course" v-for="(value, index) in (i.taskProcessList.sort((a,b)=>{ return a.projectTaskId - b.projectTaskId; })).filter( <div v-else class="course"
(e) => !whiteTypes(e.type) v-for="(value, index) in (i.taskProcessList.sort((a,b)=>{ return a.projectTaskId - b.projectTaskId; })).filter(
)" :key="index"> (e) => !whiteTypes(e.type)
)"
:key="index">
<div style="width: 70%"> <div style="width: 70%">
<div v-if="value.name.length > 50" class="coursename" :title="value.name"> <div v-if="value.name.length > 50" class="coursename" :title="value.name">
<el-popover ref="popover" placement="right" trigger="hover" :width="300" :content="value.name"> <el-popover ref="popover" placement="right" trigger="hover" :width="300" :content="value.name">
@@ -77,16 +79,20 @@
<div>当前进度</div> <div>当前进度</div>
<div class="progress"> <div class="progress">
<div style="width: 291px"> <div style="width: 291px">
<el-progress :percentage="parseInt(value.currentRatio)" :show-text="false" :stroke-width="8" :color=" <el-progress
{ :percentage="parseInt(value.currentRatio)"
0: 'rgba(238, 112, 108, 1)', :show-text="false"
1: 'rgba(255, 151, 38, 1)', :stroke-width="8"
2: 'rgba(39, 122, 255, 1)', :color="
3: 'rgba(59, 94, 251, 1)', {
4: 'rgba(57, 219, 183, 1)', 0: 'rgba(238, 112, 108, 1)',
5: 'rgba(57, 219, 183, 1)', 1: 'rgba(255, 151, 38, 1)',
}[parseInt(parseInt(value.currentRatio) / 20)] 2: 'rgba(39, 122, 255, 1)',
" /> 3: 'rgba(59, 94, 251, 1)',
4: 'rgba(57, 219, 183, 1)',
5: 'rgba(57, 219, 183, 1)',
}[parseInt(parseInt(value.currentRatio) / 20)]
"/>
</div> </div>
<div style="font-size: 14px;font-weight: 500;color: #277aff;margin-left: 10px;color:#677d86;"> <div style="font-size: 14px;font-weight: 500;color: #277aff;margin-left: 10px;color:#677d86;">
{{ parseInt(value.currentRatio) }}% {{ parseInt(value.currentRatio) }}%
@@ -96,12 +102,12 @@
</div> </div>
<div class="goclass" @click="toFinish(value, i.stageName, i.stageId)"> <div class="goclass" @click="toFinish(value, i.stageName, i.stageId)">
{{ {{
value.status === 1 value.status === 1
? "已完成" ? "已完成"
: types.path[value.type] : types.path[value.type]
? types.toName[value.type] ? types.toName[value.type]
: "未开放" : "未开放"
}} }}
</div> </div>
<!-- <div :style="{ display: value.status === 1 ? 'block' : 'none' }">--> <!-- <div :style="{ display: value.status === 1 ? 'block' : 'none' }">-->
<!-- <div--> <!-- <div-->
@@ -198,15 +204,15 @@
<div style="width: 291px"> <div style="width: 291px">
<el-progress :percentage="parseInt(data.totalProgress * 100)" :show-text="false" :stroke-width="8" <el-progress :percentage="parseInt(data.totalProgress * 100)" :show-text="false" :stroke-width="8"
:color=" :color="
{ {
0: 'rgba(238, 112, 108, 1)', 0: 'rgba(238, 112, 108, 1)',
1: 'rgba(255, 151, 38, 1)', 1: 'rgba(255, 151, 38, 1)',
2: 'rgba(39, 122, 255, 1)', 2: 'rgba(39, 122, 255, 1)',
3: 'rgba(59, 94, 251, 1)', 3: 'rgba(59, 94, 251, 1)',
4: 'rgba(57, 219, 183, 1)', 4: 'rgba(57, 219, 183, 1)',
5: 'rgba(57, 219, 183, 1)', 5: 'rgba(57, 219, 183, 1)',
}[parseInt((data.totalProgress * 100) / 20)] }[parseInt((data.totalProgress * 100) / 20)]
" /> " />
</div> </div>
<div style="font-size: 14px; font-weight: 500; margin-left: 10px;color:#677d86;"> <div style="font-size: 14px; font-weight: 500; margin-left: 10px;color:#677d86;">
{{ parseInt(data.totalProgress * 100) }}% {{ parseInt(data.totalProgress * 100) }}%
@@ -221,15 +227,15 @@
<div style="width: 291px"> <div style="width: 291px">
<el-progress :percentage="parseInt(data.compulsoryProgress * 100)" :show-text="false" <el-progress :percentage="parseInt(data.compulsoryProgress * 100)" :show-text="false"
:stroke-width="8" :color=" :stroke-width="8" :color="
{ {
0: 'rgba(238, 112, 108, 1)', 0: 'rgba(238, 112, 108, 1)',
1: 'rgba(255, 151, 38, 1)', 1: 'rgba(255, 151, 38, 1)',
2: 'rgba(39, 122, 255, 1)', 2: 'rgba(39, 122, 255, 1)',
3: 'rgba(59, 94, 251, 1)', 3: 'rgba(59, 94, 251, 1)',
4: 'rgba(57, 219, 183, 1)', 4: 'rgba(57, 219, 183, 1)',
5: 'rgba(57, 219, 183, 1)', 5: 'rgba(57, 219, 183, 1)',
}[parseInt((data.compulsoryProgress * 100) / 20)] }[parseInt((data.compulsoryProgress * 100) / 20)]
" /> " />
</div> </div>
<div style=" <div style="
font-size: 14px; font-size: 14px;
@@ -393,14 +399,6 @@
<script setup> <script setup>
import { computed, reactive, ref } from "vue"; import { computed, reactive, ref } from "vue";
import { ElLoading } from 'element-plus' import { ElLoading } from 'element-plus'
import word from "@/assets/image/file/word.png";
import ppt from "@/assets/image/file/ppt.png";
import pdf from "@/assets/image/file/pdf.png";
import zip from "@/assets/image/file/zip.png";
import md from "@/assets/image/file/md.png";
import medal1 from "@/assets/image/medal/medal1.png";
import medal2 from "@/assets/image/medal/medal2.png";
import medal3 from "@/assets/image/medal/medal3.png";
import img from "@/assets/image/uploadimg.png"; import img from "@/assets/image/uploadimg.png";
import { useRequest, request } from "@/api/request"; import { useRequest, request } from "@/api/request";
import { import {