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

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

...@@ -7,14 +7,14 @@ ...@@ -7,14 +7,14 @@
<div <div
class="btn left" class="btn left"
:class="{'active-btn':activeBtnType}" :class="{'active-btn':activeBtnType}"
@click="headBtnClick"> @click="headBtnClick(true)">
{{headBtn.leftName}} {{headBtn.leftName}}
</div> </div>
<div class="line"></div> <div class="line"></div>
<div <div
class="btn right" class="btn right"
:class="{'active-btn':!activeBtnType}" :class="{'active-btn':!activeBtnType}"
@click="headBtnClick"> @click="headBtnClick(false)">
{{headBtn.rightName}} {{headBtn.rightName}}
</div> </div>
</div> </div>
...@@ -74,8 +74,8 @@ ...@@ -74,8 +74,8 @@
this.$rocNative.goBack() this.$rocNative.goBack()
} }
}, },
headBtnClick() { headBtnClick(val) {
this.$emit('handleBtn') this.$emit('handleBtn', val)
}, },
rightBtnClick() { rightBtnClick() {
this.$emit('handleRightBtn') this.$emit('handleRightBtn')
......
...@@ -160,4 +160,33 @@ ...@@ -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 @@ ...@@ -49,7 +49,7 @@
</div> </div>
</div> </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-h" v-if="activeBtnType"><span>{{dealRankName(hospitalRanking.hospitalType)}}</span>排行实时刷新,部分原因存在几分钟延迟</div>
<div class="description description-d" v-else>排行实时刷新,部分原因存在几分钟延迟</div> <div class="description description-d" v-else>排行实时刷新,部分原因存在几分钟延迟</div>
<div class="ranking-title"> <div class="ranking-title">
...@@ -74,11 +74,19 @@ ...@@ -74,11 +74,19 @@
<p class="num">{{itemD.score}}</p> <p class="num">{{itemD.score}}</p>
</div> </div>
</div> </div>
</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 <footer-button
v-if="!noContributionRanking"
:btnText="btnText" :btnText="btnText"
:btnType="btnType"> :btnType="btnType">
</footer-button> </footer-button>
</div>
</section> </section>
</template> </template>
...@@ -105,7 +113,8 @@ ...@@ -105,7 +113,8 @@
hospitalRanking: {}, hospitalRanking: {},
contributionRanking: {}, contributionRanking: {},
btnText: '助力机构 创造佳绩', btnText: '助力机构 创造佳绩',
btnType: true btnType: true,
noContributionRanking: false //是否有人员贡献榜单数据
}; };
}, },
computed: { computed: {
...@@ -115,8 +124,11 @@ ...@@ -115,8 +124,11 @@
this.getRankData(); this.getRankData();
}, },
methods: { methods: {
changeRanking() { goInActivity() {
this.activeBtnType = !this.activeBtnType; this.$router.push('/in-activity')
},
changeRanking(val) {
this.activeBtnType = val;
this.getRankData() this.getRankData()
}, },
dealRankName(hospitalType) { dealRankName(hospitalType) {
...@@ -140,6 +152,7 @@ ...@@ -140,6 +152,7 @@
} }
}, },
getHospitalRanking() { getHospitalRanking() {
this.noContributionRanking = false;
getHospitalRanking().then(res => { getHospitalRanking().then(res => {
if(res.code == '000000') { if(res.code == '000000') {
this.hospitalRanking = res.data; this.hospitalRanking = res.data;
...@@ -150,6 +163,11 @@ ...@@ -150,6 +163,11 @@
getContributionRanking().then(res => { getContributionRanking().then(res => {
if(res.code == '000000') { if(res.code == '000000') {
this.contributionRanking = res.data; this.contributionRanking = res.data;
if(this.contributionRanking.topRankList.length) {
this.noContributionRanking = false;
} else {
this.noContributionRanking = true;
}
} }
}) })
......
...@@ -99,8 +99,8 @@ ...@@ -99,8 +99,8 @@
} }
}, },
methods: { methods: {
changeRanking() { changeRanking(val) {
this.activeBtnType = !this.activeBtnType this.activeBtnType = val;
this.getData(); this.getData();
}, },
handleRightBtn() { handleRightBtn() {
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册