<template>
|
<view class="advisory-big">
|
<view class="m-top">
|
</view>
|
<view class="bomBut">
|
<view style="width: 400rpx;padding-left: 30rpx;">
|
<u-tabs :list="list" :is-scroll="false"></u-tabs>
|
</view>
|
<u-row gutter="16">
|
<u-col span="7">
|
<view class="bom-text">正在进行</view>
|
<view class="bom-int">{{dqjf}}</view>
|
</u-col>
|
<u-col span="5">
|
<view class="bom-text">累计完成</view>
|
<view class="bom-int">{{ljjf}}</view>
|
</u-col>
|
</u-row>
|
</view>
|
|
<view class="bomList">
|
<view class="">
|
<u-dropdown border-bottom="true">
|
<u-dropdown-item v-model="value1" @change="change" title="任务类型" :options="options1"></u-dropdown-item>
|
</u-dropdown>
|
</view>
|
|
<scroll-view id="articleBox" :style="{ height: swiperHeight + 'px' }" class="article-content" scroll-y
|
style="width: 100%; margin-top: 15rpx;">
|
<view v-for="i in data" class="advisory-model" @click="goDetail(i)">
|
<view class="advisory-left">
|
<view class="advisory-title-top">
|
<view class="advisory-title">{{i.access}}</view>
|
</view>
|
<view class="advisory-title-down">
|
<view class="advisory-title-time">{{i.time}}</view>
|
</view>
|
</view>
|
<view class="advisory-right">
|
<view v-if="i.type =='2'" class="advisory-title-integral">- {{i.integral}}</view>
|
<view v-if="i.type =='1'" class="advisory-title-integraladd">+{{i.integral}}</view>
|
</view>
|
<u-line class="advisory-line" color="#ebebeb" />
|
</view>
|
</scroll-view>
|
</view>
|
</view>
|
</template>
|
|
<script>
|
export default {
|
data() {
|
return {
|
dqjf:"暂无",
|
ljjf:"暂无",
|
list: [{
|
name: '任务统计'
|
}, {
|
name: ''
|
}, {
|
name: '',
|
}],
|
options1: [{
|
label: '全部',
|
value: 1,
|
},
|
{
|
label: '治安防范巡逻',
|
value: 2,
|
},
|
{
|
label: '治安防范宣传',
|
value: 3,
|
},
|
{
|
label: '治安防范培训',
|
value: 3,
|
}
|
],
|
value1: 1,
|
data: [],
|
swiperHeight: 0
|
}
|
},
|
methods: {
|
onLoad() {
|
this.getData(1);
|
},
|
getData(e){
|
var that = this;
|
uni.request({
|
url:that.$store.state.piAPI + '/integral/selectCount?uid='+this.$store.state.puserID+"&type="+e,
|
method:'POST',
|
success(res) {
|
that.dqjf = res.data.data.sjf;
|
that.ljjf = res.data.data.zjf.integral;
|
that.data = res.data.data.list;
|
}
|
});
|
},
|
goDetail() {
|
|
},
|
change(e){
|
this.getData(e);
|
},
|
onReady() {
|
let that = this;
|
uni.getSystemInfo({
|
success(e) {
|
console.log(e);
|
let {
|
windowWidth,
|
windowHeight,
|
safeArea
|
} = e;
|
const query = uni.createSelectorQuery().in(that);
|
query
|
.select('#articleBox')
|
.boundingClientRect(data => {
|
that.swiperHeight = (safeArea.bottom - data.top - 50);
|
})
|
.exec();
|
}
|
});
|
},
|
}
|
}
|
</script>
|
|
<style>
|
.advisory-big {
|
width: 100%;
|
height: 100vh;
|
background-color: #f7f7f7;
|
}
|
|
.bomBut {
|
width: 93%;
|
margin: 0 auto;
|
height: 7.5rem;
|
z-index: 999;
|
border-radius: 10px;
|
margin-top: -2.5rem;
|
background-color: #fff;
|
}
|
|
.bomList {
|
width: 93%;
|
margin: 0 auto;
|
height: 30rem;
|
z-index: 999;
|
border-radius: 10px;
|
margin-top: 1rem;
|
background-color: #fff;
|
}
|
|
.bom-text {
|
font-size: 30rpx;
|
font-family: PingFang SC;
|
color: #585b61;
|
padding-left: 30rpx;
|
}
|
|
.bom-int {
|
font-size: 40rpx;
|
font-family: PingFang SC;
|
color: #ff910a;
|
font-weight: bold;
|
padding-left: 30rpx;
|
padding-top: 10rpx;
|
}
|
|
.m-top {
|
width: 100%;
|
height: 3rem;
|
border-radius: 0px 0px 20px 20px;
|
background-image: linear-gradient(to bottom, #103289, #174cd1);
|
color: #fff;
|
flex-direction: column;
|
}
|
|
.u-row {
|
margin: 10rpx 0;
|
}
|
|
.demo-layout {
|
height: 80rpx;
|
border-radius: 8rpx;
|
}
|
|
.bg-purple {
|
background: #d3dce6;
|
}
|
|
.bg-purple-light {
|
background: #e5e9f2;
|
}
|
|
.bg-purple-dark {
|
background: #99a9bf;
|
}
|
|
.advisory-model {
|
width: 93%;
|
margin: 0 auto;
|
margin-top: 0.5rem;
|
height: 3rem;
|
background-color: #FFF;
|
}
|
|
.advisory-title {
|
font-size: 15px;
|
font-weight: 550;
|
overflow: hidden;
|
text-overflow: ellipsis;
|
display: -webkit-box;
|
-webkit-line-clamp: 2;
|
-webkit-box-orient: vertical;
|
}
|
|
.advisory-title-down {
|
/* background-color: #0078A8; */
|
width: 100%;
|
height: 25%;
|
font-size: 12px;
|
font-weight: 350;
|
color: #808080;
|
padding-top: 10rpx;
|
}
|
|
.advisory-title-time {
|
position: relative;
|
}
|
|
.advisory-right {
|
// background-color: #222222;
|
left: 25%;
|
top: 30%;
|
position: relative;
|
}
|
|
.advisory-left {
|
width: 64%;
|
height: 80%;
|
float: left;
|
position: relative;
|
// background-color: #00FFFF;
|
left: 3%;
|
top: 10%;
|
}
|
|
.advisory-line {
|
top: 70%;
|
position: relative;
|
}
|
|
.advisory-title-integraladd{
|
color: #00aaff;
|
}
|
|
.advisory-title-integral{
|
color: #ff0000;
|
}
|
</style>
|