<template>
|
<view class="box">
|
<!-- 自定义导航栏 -->
|
<view class="navBarBox fix">
|
<!-- 状态栏占位 -->
|
<view class="statusBar" :style="{ paddingTop: statusBarHeight + 'px' }"></view>
|
<!-- 真正的导航栏内容 -->
|
<view style="display: flex; flex-direction: column;">
|
<view class="navBar">
|
<u-icon style=" margin-left: -25px;" name="arrow-left" color="black" size="17" @click="goBack" />
|
<view class="barText">叫应率统计</view>
|
</view>
|
</view>
|
</view>
|
<view class="responseCard">
|
<table class="table">
|
<thead class="head">
|
<tr>
|
<th></th>
|
<th>叫应情况</th>
|
<th>乡镇叫应率</th>
|
<th>详情</th>
|
</tr>
|
</thead>
|
<tbody class="tableBody">
|
<tr v-for="(item, index) in tableData" :key="index" >
|
<td align="center" width="90px">{{ item.unit }}</td>
|
<td align="center">{{ item.response }}</td>
|
<td align="center">{{ item.responsivity }}</td>
|
<td>
|
<u-button
|
size="mini"
|
type="text"
|
style="color: sandybrown"
|
@click="toVillage(item)"
|
>叫应详情
|
</u-button></td>
|
</tr>
|
</tbody>
|
</table>
|
</view>
|
</view>
|
</template>
|
|
<script>
|
export default {
|
data() {
|
return {
|
page: 'pages/tabBar/count/count',
|
statusBarHeight: '',
|
tableData: [
|
{
|
unit:'伊犁州',
|
response: '1',
|
responsivity: '88.9%'
|
},
|
{
|
unit:'伊犁州',
|
response: '1',
|
responsivity: '88.9%'
|
},
|
{
|
unit:'伊犁州',
|
response: '1',
|
responsivity: '88.9%'
|
},
|
{
|
unit:'伊犁州',
|
response: '1',
|
responsivity: '88.9%'
|
}
|
]
|
}
|
|
},
|
onLoad() {
|
//获取手机状态栏高度
|
this.statusBarHeight = uni.getSystemInfoSync()['statusBarHeight'];
|
uni.hideTabBar();
|
},
|
methods: {
|
goBack() {
|
console.log("1111")
|
uni.navigateTo({
|
url:'/pages/tabBar/responsivity/countyResponsivity'
|
});
|
},
|
toVillage(item) {
|
uni.navigateTo({
|
url: `/pages/tabBar/responsivity/villageResponsivity?data=` + encodeURIComponent(JSON.stringify(item))
|
})
|
}
|
}
|
}
|
|
</script>
|
|
<style lang='scss' scoped>
|
.box {
|
display: flex;
|
flex-direction: column;
|
width: 100%;
|
height: 100%;
|
}
|
.fix{
|
position: sticky;
|
top: 0;
|
left: 0;
|
right: 0;
|
width: 100%;
|
z-index: 1;
|
}
|
.navBarBox .navBar {
|
background-color:#fff;
|
height: 50px;
|
display: flex;
|
flex-direction: row;
|
justify-content: center;
|
align-items: center;
|
box-shadow: 0 3px 12px rgba(0,0,0,0.05);
|
}
|
.barText{
|
text-align: center;
|
width: 85%;
|
font-size: 16px;
|
/* text-align: center; */
|
font-weight: 600;
|
}
|
.statusBar{
|
background-color:lightgrey;
|
}
|
.responseCard{
|
display: flex;
|
flex-direction: column;
|
background: #fff;
|
box-shadow: 0 3px 12px rgba(0,0,0,0.05);
|
margin: 12px 12px 20px;
|
border-radius: 5px;
|
padding: 30px 12px;
|
}
|
.table{
|
.head{
|
color: white;
|
line-height: 35px;
|
background-color: rgb(66, 157, 218);
|
}
|
.tableBody{
|
color: black;
|
background-color: rgb(207, 223, 241);
|
line-height: 35px;
|
}
|
tr:nth-child(odd+1) {
|
background-color: rgb(207, 223, 241); /* 设置奇数行颜色 */
|
}
|
tr:nth-child(even) {
|
background-color: rgb(233, 239, 248); /* 设置偶数行颜色 */
|
}
|
}
|
</style>
|