|
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182 |
- <template>
- <view style="height: 100%;">
- <view class="topBox">
- <SelectRadio v-model="search.CameraId" align="center" placeholder="请选择摄像头" @change="refresh"
- :options="[{value:'',label:'全部'},...allOptions.monitorList]" />
- </view>
- <u-empty marginTop="100rpx" :show="list.length == 0&&status == 'nomore'" mode="list" text="暂无数据"></u-empty>
- <u-list @scrolltolower="scrolltolower" style="height: calc(100% - 150rpx);">
- <u-list-item v-for="(item, index) in list" :key="index">
- <u-checkbox v-if="isManage" :name="item.name" shape="circle" label=""></u-checkbox>
- <view :class="{whiteCard:true,active:checkboxValue.includes(item.name)}">
- <view class="left">
- <view class="row1">
- {{item.cameraName}}
- </view>
- <view class="row2">
- <view class="">
- 持续时间:{{item.continueTime}}
- </view>
- <view class="">
- 相似度:{{item.similarity}}
- </view>
- </view>
- </view>
- <view class="right" v-show="!isManage">
- <view class="btn" @click="NAV_TO('./detail',{personSetId:item.personSetId,taskId:item.taskId})">
- <view>
- <image src="@/static/image/seeBlue.png" mode="aspectFill"></image>
- </view>
- <text>查看</text>
- </view>
- </view>
- </view>
- </u-list-item>
- <u-loadmore :status="status" />
- </u-list>
- </view>
- </template>
-
- <script>
- import SelectRadio from "@/components/selectRadio.vue"
- import {
- taskPage
- } from '@/api/work/rollCall.js'
- export default {
- components: {
- SelectRadio
- },
- data() {
- return {
- list: [],
- isLoading: false,
- status: 'loadmore', //loading正在加载 loadmore加载更多 nomore没有更多了
- search: {
- CameraId: '',
- },
- page: {
- pageNum: 1,
- pageSize: 10,
- },
- checkboxValue: [],
- isManage: false,
- }
- },
- methods: {
- scrolltolower() {
- this.loadmore()
- },
- loadmore() {
- if (this.status != 'loadmore') return
- this.status = 'loading'
- taskPage({
- ...this.page,
- ...this.search,
-
- }).then(res => {
- if(res.code != 200)return
- res.data.list.forEach(e=>{
- this.list.push(e)
- })
- // 获取到的总条数>=接口总条数
- if (this.list.length >= res.data.total) {
- this.status = 'nomore'
- } else {
- this.status = 'loadmore'
- }
- })
- },
- refresh() {
- this.status = 'loadmore'
- this.list = []
- this.page.pageNum = 1
- this.loadmore()
- },
- },
- onLoad() {
- console.log(this.allOptions)
- this.loadmore()
- },
- onPullDownRefresh(){
- uni.stopPullDownRefresh()
- this.refresh()
- }
- }
- </script>
-
- <style lang="scss" scoped>
- .topBox {
- padding: 26rpx 30rpx;
- }
-
- .u-list-item {
- display: flex;
- align-items: center;
- flex-direction: unset;
- margin: 12rpx 30rpx;
-
- &:first-child {
- margin-top: 0rpx;
- }
-
- .whiteCard {
- flex: 1;
-
- &.active {
- border: 1rpx solid #2388FF;
- background-color: #F2F8FF;
- }
- }
-
- .u-checkbox {
- margin-right: 12rpx;
- }
- }
-
- .whiteCard {
- background-color: #fff;
- border-radius: 18rpx;
- padding: 30rpx;
- color: #333333;
- display: flex;
-
- .left {
- width: 76%;
- }
-
- .row1 {
- font-size: 32rpx;
- font-weight: 700;
- }
-
- .row2 {
- font-size: 26rpx;
- margin-top: 24rpx;
- display: flex;
- justify-content: space-between;
- }
-
- .right {
- display: flex;
- justify-content: right;
- flex: 1;
- padding-top: 19rpx;
-
- .btn {
- text-align: center;
-
- uni-image {
- width: 40rpx;
- height: 40rpx;
- }
-
- uni-text {
- font-size: 26rpx;
- color: #2388FF;
- position: relative;
- bottom: 12rpx;
- }
- }
- }
- }
- </style>
|