123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175 |
- <template>
- <view class="processWrapper ">
- <view style="height:196rpx"></view>
- <view class="ding">
- <!-- 筛选框start -->
- <view class="cu-bar search bg-gray filter-section">
- <view class="search-form round bg-white">
- <text class="cuIcon-search"></text>
- <input class="" type="text" placeholder="请输入站点名称" confirm-type="search"></input>
- </view>
- <view class="action">
- <button class="cu-btn bg-blue round" @click="searchSiteList">查询</button>
- </view>
- </view>
- <!-- 筛选框end -->
- <scroll-view scroll-x class="bg-white nav text-center">
- <view class="cu-item" :class="index==TabCur?'text-blue cur':''" v-for="(item,index) in tabNav"
- :key="index" @tap="tabSelect" :data-id="index">
- <view v-if="TabCur==index" class="cu-tag badge">
- <block class="cu-tag badge">{{TabCur? unporcessList.length:porcessedList.length}} </block>
- </view>
- {{item}}
- </view>
- </scroll-view>
- </view>
- <block v-if="TabCur==0">
- <view>
- <view class="cu-list menu-avatar">
- <view class="cu-item" v-for="(item,index) in unporcessList" :key="index">
- <view class="cu-avatar lg" style="background-image:url(../../../static/unprocessIcon.png);">
- </view>
- <view class="content">
- <view class="pro-title">
- <view class="cut">{{item.title}}</view>
- </view>
- <view class="pro-date ">{{item.time}}</view>
- </view>
- <view class="action" style="z-index:99">
- <view class="unProcess" @tap="goUnprocessDetail(item.id)">未执行</view>
- </view>
- </view>
- <view class=" text-center margin-top" v-if="unporcessList.length === 0">暂无数据...</view>
- </view>
- </view>
- </block>
- <block v-if="TabCur==1">
- <view style=" height: calc(100vh - 400rpx);
- overflow: scroll;">
- <view class="cu-list menu-avatar ">
- <view class="cu-item" v-for="(item,index) in porcessedList" :key="index">
- <view class="cu-avatar lg" style="background-image:url(../../../static/processedIcon.png);">
- </view>
- <view class="content">
- <view class="pro-title">
- <view class="cut">{{item.title}}</view>
- </view>
- <view class="pro-date ">{{item.time}}</view>
- </view>
- <view class="action" style="z-index:99">
- <view class="processed" @tap="goProcessedDetail(item.id)">已执行</view>
- </view>
- </view>
- <view class="text-center margin-top" v-if="porcessedList.length === 0">暂无数据...</view>
- </view>
- </view>
- </block>
- <!-- 新增按钮start -->
- <view class="plus">
- <image src="../../../static/plus.png" style="width:125rpx;height:125rpx" @tap="goAddPage()"></image>
- </view>
- <!-- 新增按钮end -->
- </view>
- </template>
- <script>
- import json from '../../../data/json.js';
- export default {
- data() {
- return {
- unporcessList: json.inspectUnprocessList,
- porcessedList: json.inspectProcessedList,
- type: '0',
- modalName: null,
- listTouchStart: 0,
- listTouchDirection: null,
- CustomBar: this.CustomBar,
- TabCur: 0,
- tabNav: ['已执行', '未执行'],
- };
- },
- onLoad: function(option) {
- },
- onNavigationBarButtonTap(e) {
- console.log(e)
- uni.navigateTo({
- url: '/pages/export/export',
- success: res => {},
- fail: () => {},
- complete: () => {}
- });
- },
- methods: {
- tabSelect(e) {
- console.log(e.currentTarget);
- this.TabCur = e.currentTarget.dataset.id;
- this.scrollLeft = (e.currentTarget.dataset.id - 1) * 60;
- },
- goAddPage(id) {
- uni.navigateTo({
- url: '/pages/eleControl/powerCut/powerCutAdd/powerCutAdd',
- success: res => {},
- fail: () => {},
- complete: () => {}
- });
- },
- }
- }
- </script>
- <style lang="scss">
- //已处理未处理消息个数样式
- .cu-list.menu-avatar .cu-item {
- height: 89px;
- }
- .nav .cu-item.cur {
- position: relative;
- border-bottom: 8rpx solid;
- }
- .cu-tag.badge {
- top: 14rpx;
- right: 96rpx;
- }
- .nav .cu-item {
- width: 50%;
- margin: 0;
- .text-blue,
- .line-blue,
- .lines-blue {
- color: #4274E7
- }
- }
- </style>
|