|
@@ -8,13 +8,13 @@
|
|
<!-- <view v-if="TabCur==index" class="cu-tag badge">
|
|
<!-- <view v-if="TabCur==index" class="cu-tag badge">
|
|
<block class="cu-tag badge">{{TabCur? porcessedList.length:alarm_count}} </block>
|
|
<block class="cu-tag badge">{{TabCur? porcessedList.length:alarm_count}} </block>
|
|
</view> -->
|
|
</view> -->
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
<view v-if="TabCur==index&&!TabCur" class="cu-tag badge">
|
|
<view v-if="TabCur==index&&!TabCur" class="cu-tag badge">
|
|
<block class="cu-tag badge">{{alarm_count}} </block>
|
|
<block class="cu-tag badge">{{alarm_count}} </block>
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+
|
|
{{item}}
|
|
{{item}}
|
|
</view>
|
|
</view>
|
|
</scroll-view>
|
|
</scroll-view>
|
|
@@ -26,7 +26,7 @@
|
|
|
|
|
|
<view class="cu-item" v-for="(item,index) in unporcessList" :key="index">
|
|
<view class="cu-item" v-for="(item,index) in unporcessList" :key="index">
|
|
<view class="cu-avatar lg">
|
|
<view class="cu-avatar lg">
|
|
- <image class="image-bg" src="/static/process-icon.png"/>
|
|
|
|
|
|
+ <image class="image-bg" src="/static/process-icon.png" />
|
|
</view>
|
|
</view>
|
|
<view class="content">
|
|
<view class="content">
|
|
<view class="pro-title">
|
|
<view class="pro-title">
|
|
@@ -53,7 +53,7 @@
|
|
<view class="cu-list menu-avatar ">
|
|
<view class="cu-list menu-avatar ">
|
|
<view class="cu-item" v-for="(item,index) in porcessedList" :key="index">
|
|
<view class="cu-item" v-for="(item,index) in porcessedList" :key="index">
|
|
<view class="cu-avatar lg">
|
|
<view class="cu-avatar lg">
|
|
- <image class="image-bg" src="/static/processed-icon.png"/>
|
|
|
|
|
|
+ <image class="image-bg" src="/static/processed-icon.png" />
|
|
</view>
|
|
</view>
|
|
<view class="content">
|
|
<view class="content">
|
|
<view class="pro-title">
|
|
<view class="pro-title">
|
|
@@ -74,7 +74,9 @@
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</block>
|
|
</block>
|
|
-
|
|
|
|
|
|
+ <view v-show="isLoadMore">
|
|
|
|
+ <uni-load-more :status="loadStatus"></uni-load-more>
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -93,34 +95,45 @@
|
|
CustomBar: this.CustomBar,
|
|
CustomBar: this.CustomBar,
|
|
TabCur: 0,
|
|
TabCur: 0,
|
|
tabNav: ['未处理', '已处理'],
|
|
tabNav: ['未处理', '已处理'],
|
|
- alarm_count:'',
|
|
|
|
- alarm_count1:''
|
|
|
|
|
|
+ alarm_count: '',
|
|
|
|
+ alarm_count1: '',
|
|
|
|
+
|
|
|
|
+ page: 1,
|
|
|
|
+ pageSize: 10,
|
|
|
|
+ loadStatus: 'loading', //加载样式:more-加载前样式,loading-加载中样式,nomore-没有数据样式
|
|
|
|
+ isLoadMore: false, //是否加载中
|
|
|
|
|
|
|
|
|
|
};
|
|
};
|
|
},
|
|
},
|
|
-
|
|
|
|
- onPullDownRefresh() {
|
|
|
|
- console.log('refresh--上拉刷新');
|
|
|
|
- // this.getProcessData()
|
|
|
|
-
|
|
|
|
- setTimeout(function () {
|
|
|
|
- uni.stopPullDownRefresh();
|
|
|
|
- }, 100);
|
|
|
|
- },
|
|
|
|
|
|
+
|
|
|
|
+ onPullDownRefresh() {
|
|
|
|
+ console.log('refresh--上拉刷新');
|
|
|
|
+ this.getProcessData(0);
|
|
|
|
+ this.page=1
|
|
|
|
+
|
|
|
|
+ setTimeout(function() {
|
|
|
|
+ uni.stopPullDownRefresh();
|
|
|
|
+ }, 100);
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+ onReachBottom() { //上拉触底函数
|
|
|
|
+ if (!this.isLoadMore) { //此处判断,上锁,防止重复请求
|
|
|
|
+ this.isLoadMore = true
|
|
|
|
+ this.page += 1
|
|
|
|
+ this.getProcessData(0);
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
|
|
onLoad: function(option) {
|
|
onLoad: function(option) {
|
|
-
|
|
|
|
- setTimeout(function () {
|
|
|
|
- console.log('start pulldown');
|
|
|
|
- }, 1000);
|
|
|
|
- uni.startPullDownRefresh();
|
|
|
|
|
|
|
|
- this.getProcessData({
|
|
|
|
- "company_code": uni.getStorageSync('selectedCode'),
|
|
|
|
- "type": option.type,
|
|
|
|
- "processing_status": 0
|
|
|
|
- }, 0);
|
|
|
|
|
|
+ setTimeout(function() {
|
|
|
|
+ console.log('start pulldown');
|
|
|
|
+ }, 1000);
|
|
|
|
+ uni.startPullDownRefresh();
|
|
|
|
+
|
|
|
|
+ this.getProcessData(0);
|
|
|
|
|
|
|
|
|
|
this.companyCode = option.companyCode;
|
|
this.companyCode = option.companyCode;
|
|
@@ -176,7 +189,7 @@
|
|
onNavigationBarButtonTap(e) {
|
|
onNavigationBarButtonTap(e) {
|
|
console.log(e)
|
|
console.log(e)
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|
|
- url: './export/export?type='+this.type,
|
|
|
|
|
|
+ url: './export/export?type=' + this.type,
|
|
success: res => {},
|
|
success: res => {},
|
|
fail: () => {},
|
|
fail: () => {},
|
|
complete: () => {}
|
|
complete: () => {}
|
|
@@ -184,30 +197,54 @@
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
|
|
|
|
- async getProcessData(params = {}, whichTab) {
|
|
|
|
|
|
+ async getProcessData(whichTab) {
|
|
const res = await this.$myRequest({
|
|
const res = await this.$myRequest({
|
|
url: 'ComprehensiveAlarm/getIntegratedAlarmList',
|
|
url: 'ComprehensiveAlarm/getIntegratedAlarmList',
|
|
- data: params,
|
|
|
|
|
|
+ data: {
|
|
|
|
+ "company_code": uni.getStorageSync('selectedCode'),
|
|
|
|
+ "type": 1, //aa写活
|
|
|
|
+ "processing_status": 0,
|
|
|
|
+ "page": this.page,
|
|
|
|
+ "pageSize": this.pageSize,
|
|
|
|
+ },
|
|
showLoading: true
|
|
showLoading: true
|
|
})
|
|
})
|
|
- this.unporcessList = res.data.data;
|
|
|
|
- // this.alarm_count=res.data.alarm_count
|
|
|
|
|
|
|
|
- if (whichTab == 0) {
|
|
|
|
|
|
+ if (res.data.alarm_count) {
|
|
|
|
+
|
|
this.unporcessList = res.data.data;
|
|
this.unporcessList = res.data.data;
|
|
- this.alarm_count=parseInt(res.data.alarm_count)
|
|
|
|
-
|
|
|
|
|
|
+
|
|
|
|
+ if (whichTab == 0) {
|
|
|
|
+ this.unporcessList = res.data.data;
|
|
|
|
+ this.alarm_count = parseInt(res.data.alarm_count)
|
|
|
|
+
|
|
|
|
+ } else {
|
|
|
|
+ this.porcessedList = res.data.data;
|
|
|
|
+ this.alarm_count1 = parseInt(res.data.alarm_count)
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ if (res.data.alarm_count < this.pageSize) { //判断接口返回数据量小于请求数据量,则表示此为最后一页
|
|
|
|
+ this.isLoadMore = true
|
|
|
|
+ this.loadStatus = 'nomore'
|
|
|
|
+ } else {
|
|
|
|
+ this.isLoadMore = false
|
|
|
|
+ }
|
|
} else {
|
|
} else {
|
|
- this.porcessedList = res.data.data;
|
|
|
|
- this.alarm_count1=parseInt(res.data.alarm_count)
|
|
|
|
|
|
+ this.isLoadMore = true
|
|
|
|
+ this.loadStatus = 'nomore'
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
},
|
|
},
|
|
|
|
|
|
tabSelect(e) {
|
|
tabSelect(e) {
|
|
- this.unporcessList=[],
|
|
|
|
- this.porcessedList=[],
|
|
|
|
|
|
+ this.unporcessList = [],
|
|
|
|
+ this.porcessedList = [],
|
|
|
|
|
|
- console.log(e.currentTarget);
|
|
|
|
|
|
+ console.log(e.currentTarget);
|
|
this.TabCur = e.currentTarget.dataset.id;
|
|
this.TabCur = e.currentTarget.dataset.id;
|
|
this.scrollLeft = (e.currentTarget.dataset.id - 1) * 60;
|
|
this.scrollLeft = (e.currentTarget.dataset.id - 1) * 60;
|
|
|
|
|
|
@@ -220,10 +257,10 @@
|
|
|
|
|
|
// 页面跳转
|
|
// 页面跳转
|
|
goUnprocessDetail(item) {
|
|
goUnprocessDetail(item) {
|
|
- uni.navigateTo({
|
|
|
|
- url: '/pages/unprocessDetail/unprocessDetail?id=' + item
|
|
|
|
- .id + '&type=' + this.type,
|
|
|
|
- });
|
|
|
|
|
|
+ uni.navigateTo({
|
|
|
|
+ url: '/pages/unprocessDetail/unprocessDetail?id=' + item
|
|
|
|
+ .id + '&type=' + this.type,
|
|
|
|
+ });
|
|
},
|
|
},
|
|
|
|
|
|
goProcessedDetail(item) {
|
|
goProcessedDetail(item) {
|