提交 395b5193 编写于 作者: 张磊's avatar 张磊

add new rate

上级 0170a8f3
<!-- Swipter的子组件:概述页面专用 --> <!-- Swipter的子组件:概述页面专用 -->
<template> <template>
<section class="common-swiper-item"> <section class="common-swiper-item">
<article class="middle"> <article class="middle-warp">
<div class="title"> <div class="middle">
<span class="ratio">{{certFlag ? '获证率' : '完成率'}} <div class="title">
<span class="ratio">{{certFlag ? '获证率' : '项目完成率'}}
<img @click="tipsClick" :class="{'top-10': isAndroid}" src="../../assets/images/what-icon-2.png" /> <img @click="tipsClick" :class="{'top-10': isAndroid}" src="../../assets/images/what-icon-2.png" />
</span> </span>
<span> <span>
<img src="../../assets/images/tips-1.png" /> <img src="../../assets/images/tips-1.png" />
</span> </span>
</div>
<div class="ratio">
<span>{{percentData.certificateRate | fixedNum}}%</span>
</div>
<div class="statics">
<span>{{certFlag ? '已获证人数' : '已完成人数'}} {{percentData.finishCount | formatNum}}</span>
<span>应参与人数 {{percentData.doctorCount | formatNum}}</span>
</div>
</div> </div>
<div class="ratio"> <div class="middle">
<span>{{percentData.certificateRate | fixedNum}}%</span> <div class="title">
</div> <span class="ratio">{{ '参与完成率'}}
<div class="statics"> <img @click="tipsClick2" :class="{'top-10': isAndroid}" src="../../assets/images/what-icon-2.png" />
<span>{{certFlag ? '已获证人数' : '已完成人数'}} {{percentData.finishCount | formatNum}}</span> </span>
<span>应参与人数 {{percentData.doctorCount | formatNum}}</span> <span>
<img src="../../assets/images/tips-1.png" />
</span>
</div>
<div class="ratio">
<span>{{ shouldDate | fixedNum}}%</span>
</div>
<div class="statics">
<span>已完成人数 {{percentData.finishCount | formatNum}}</span>
<span>已参与人数 {{percentData.joinCount | formatNum}}</span>
</div>
</div> </div>
</article> </article>
<article v-show="isSingleOrg" class="middle-org"> <article v-show="isSingleOrg" class="middle-org">
...@@ -91,6 +110,11 @@ export default { ...@@ -91,6 +110,11 @@ export default {
isAndroid: false isAndroid: false
} }
}, },
computed:{
shouldDate(){
return this.percentData.joinCount ? this.percentData.finishCount/this.percentData.joinCount : 0;
}
},
watch: { watch: {
percentData: { percentData: {
handler(newValue, oldValue) { handler(newValue, oldValue) {
...@@ -123,6 +147,10 @@ export default { ...@@ -123,6 +147,10 @@ export default {
tipsContent = '是已获证人数/应参与人数*100%' tipsContent = '是已获证人数/应参与人数*100%'
} }
this.$emit('tipsClick', tipsContent) this.$emit('tipsClick', tipsContent)
},
tipsClick2() {
const tipsContent = '是已完成人数/已参与人数*100%';
this.$emit('tipsClick', tipsContent)
} }
} }
}; };
...@@ -177,7 +205,7 @@ export default { ...@@ -177,7 +205,7 @@ export default {
img { img {
position: absolute; position: absolute;
top: 3px; top: 3px;
left: 46px; left: 76px;
width: 14px; width: 14px;
height: 14px; height: 14px;
&.top-10 { &.top-10 {
......
因为 它太大了无法显示 源差异 。您可以改为 查看blob
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册