提交 58ce8832 编写于 作者: tao.wu's avatar tao.wu

Merge remote-tracking branch 'origin/dev-stage2-20191125' into dev-stage2-20191125

......@@ -7,14 +7,14 @@
<div
class="btn left"
:class="{'active-btn':activeBtnType}"
@click="headBtnClick">
@click="headBtnClick(true)">
{{headBtn.leftName}}
</div>
<div class="line"></div>
<div
class="btn right"
:class="{'active-btn':!activeBtnType}"
@click="headBtnClick">
@click="headBtnClick(false)">
{{headBtn.rightName}}
</div>
</div>
......@@ -74,8 +74,8 @@
this.$rocNative.goBack()
}
},
headBtnClick() {
this.$emit('handleBtn')
headBtnClick(val) {
this.$emit('handleBtn', val)
},
rightBtnClick() {
this.$emit('handleRightBtn')
......
......@@ -160,4 +160,33 @@
}
}
}
.no-data {
margin-top: 112px;
img {
width: 150px;
height: 150px;
display: block;
margin: 0 auto;
}
p {
color: #999999;
font-size: 15px;
line-height: 21px;
margin-top: 5px;
margin-bottom: 30px;
text-align: center;
}
.button {
color: #fff;
font-size: 15px;
font-weight: 700;
width: 180px;
height: 45px;
line-height: 45px;
text-align: center;
background: linear-gradient(270deg,rgba(255,88,36,1) 0%,rgba(254,163,86,1) 100%);
border-radius: 22.5px;
margin: 0 auto;
}
}
}
\ No newline at end of file
......@@ -49,7 +49,7 @@
</div>
</div>
</div>
<div class="main-content">
<div class="main-content" v-if="!noContributionRanking">
<div class="description description-h" v-if="activeBtnType"><span>{{dealRankName(hospitalRanking.hospitalType)}}</span>排行实时刷新,部分原因存在几分钟延迟</div>
<div class="description description-d" v-else>排行实时刷新,部分原因存在几分钟延迟</div>
<div class="ranking-title">
......@@ -74,11 +74,19 @@
<p class="num">{{itemD.score}}</p>
</div>
</div>
<footer-button
:btnText="btnText"
:btnType="btnType">
</footer-button>
</div>
<div class="main-content" v-if="noContributionRanking">
<div class="no-data">
<img src="~/assets/img/icon-nodata.png" alt="">
<p>暂无记录,您还没有参加活动</p>
<div class="button" @click="goInActivity">立即参加</div>
</div>
</div>
<footer-button
v-if="!noContributionRanking"
:btnText="btnText"
:btnType="btnType">
</footer-button>
</section>
</template>
......@@ -105,7 +113,8 @@
hospitalRanking: {},
contributionRanking: {},
btnText: '助力机构 创造佳绩',
btnType: true
btnType: true,
noContributionRanking: false //是否有人员贡献榜单数据
};
},
computed: {
......@@ -115,8 +124,11 @@
this.getRankData();
},
methods: {
changeRanking() {
this.activeBtnType = !this.activeBtnType;
goInActivity() {
this.$router.push('/in-activity')
},
changeRanking(val) {
this.activeBtnType = val;
this.getRankData()
},
dealRankName(hospitalType) {
......@@ -140,6 +152,7 @@
}
},
getHospitalRanking() {
this.noContributionRanking = false;
getHospitalRanking().then(res => {
if(res.code == '000000') {
this.hospitalRanking = res.data;
......@@ -150,6 +163,11 @@
getContributionRanking().then(res => {
if(res.code == '000000') {
this.contributionRanking = res.data;
if(this.contributionRanking.topRankList.length) {
this.noContributionRanking = false;
} else {
this.noContributionRanking = true;
}
}
})
......
......@@ -99,8 +99,8 @@
}
},
methods: {
changeRanking() {
this.activeBtnType = !this.activeBtnType
changeRanking(val) {
this.activeBtnType = val;
this.getData();
},
handleRightBtn() {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册