|
@@ -1,6 +1,7 @@
|
|
<template>
|
|
<template>
|
|
<view class="processWrapper ">
|
|
<view class="processWrapper ">
|
|
- <view style="height:98rpx"></view>
|
|
|
|
|
|
+ <view v-if="TabCur==0" style="height:98rpx"></view>
|
|
|
|
+ <view v-if="TabCur==1" style="height:198rpx"></view>
|
|
<view class="ding">
|
|
<view class="ding">
|
|
<scroll-view scroll-x class="bg-white nav text-center">
|
|
<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"
|
|
<view class="cu-item" :class="index==TabCur?'text-blue cur':''" v-for="(item,index) in tabNav"
|
|
@@ -14,6 +15,11 @@
|
|
{{item}}
|
|
{{item}}
|
|
</view>
|
|
</view>
|
|
</scroll-view>
|
|
</scroll-view>
|
|
|
|
+
|
|
|
|
+ <view class="example-body" v-if="TabCur==1">
|
|
|
|
+ <uni-datetime-picker v-model="datetimerange" type="daterange" start-placeholder="请选择开始时间"
|
|
|
|
+ end-placeholder="请选择结束时间" start="2000-3-20 12:00:00" end="2025-10-20 20:00:00" rangeSeparator="至" />
|
|
|
|
+ </view>
|
|
</view>
|
|
</view>
|
|
|
|
|
|
<block v-if="TabCur==0">
|
|
<block v-if="TabCur==0">
|
|
@@ -39,16 +45,20 @@
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class=" text-center margin-top" v-if="alarm_count == 0&&data_res == 0">暂无数据...</view>
|
|
<view class=" text-center margin-top" v-if="alarm_count == 0&&data_res == 0">暂无数据...</view>
|
|
-
|
|
|
|
|
|
+
|
|
<view v-show="isLoadMore&&alarm_count != 0&&this.page>1">
|
|
<view v-show="isLoadMore&&alarm_count != 0&&this.page>1">
|
|
<uni-load-more :status="loadStatus"></uni-load-more>
|
|
<uni-load-more :status="loadStatus"></uni-load-more>
|
|
</view>
|
|
</view>
|
|
-
|
|
|
|
|
|
+
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</block>
|
|
</block>
|
|
|
|
|
|
<block v-if="TabCur==1">
|
|
<block v-if="TabCur==1">
|
|
|
|
+
|
|
|
|
+ <!-- <calendar></calendar> -->
|
|
|
|
+
|
|
|
|
+
|
|
<view class="processList">
|
|
<view class="processList">
|
|
<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">
|
|
@@ -77,7 +87,7 @@
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</block>
|
|
</block>
|
|
-
|
|
|
|
|
|
+
|
|
</view>
|
|
</view>
|
|
</template>
|
|
</template>
|
|
|
|
|
|
@@ -97,8 +107,11 @@
|
|
tabNav: ['未处理', '已处理'],
|
|
tabNav: ['未处理', '已处理'],
|
|
alarm_count: '',
|
|
alarm_count: '',
|
|
alarm_count1: '',
|
|
alarm_count1: '',
|
|
-
|
|
|
|
- data_res:1,
|
|
|
|
|
|
+ datetimerange: ['', ''],
|
|
|
|
+
|
|
|
|
+ data_res: 1,
|
|
|
|
+ start_time: '',
|
|
|
|
+ end_time: '',
|
|
|
|
|
|
page: 1,
|
|
page: 1,
|
|
pageSize: 10,
|
|
pageSize: 10,
|
|
@@ -106,14 +119,14 @@
|
|
isLoadMore: false, //是否加载中
|
|
isLoadMore: false, //是否加载中
|
|
};
|
|
};
|
|
},
|
|
},
|
|
-
|
|
|
|
|
|
+
|
|
onBackPress(event) {
|
|
onBackPress(event) {
|
|
uni.redirectTo({
|
|
uni.redirectTo({
|
|
url: '../alarmingList/alarmingList'
|
|
url: '../alarmingList/alarmingList'
|
|
});
|
|
});
|
|
return true;
|
|
return true;
|
|
},
|
|
},
|
|
-
|
|
|
|
|
|
+
|
|
|
|
|
|
onReachBottom() { //上拉触底函数
|
|
onReachBottom() { //上拉触底函数
|
|
if (!this.isLoadMore) { //此处判断,上锁,防止重复请求
|
|
if (!this.isLoadMore) { //此处判断,上锁,防止重复请求
|
|
@@ -121,27 +134,49 @@
|
|
this.page += 1
|
|
this.page += 1
|
|
this.getProcessData({
|
|
this.getProcessData({
|
|
"company_code": uni.getStorageSync('selectedCode'),
|
|
"company_code": uni.getStorageSync('selectedCode'),
|
|
- "type": this.type,
|
|
|
|
|
|
+ "type": this.type,
|
|
"processing_status": this.TabCur,
|
|
"processing_status": this.TabCur,
|
|
"page": this.page,
|
|
"page": this.page,
|
|
"pageSize": this.pageSize,
|
|
"pageSize": this.pageSize,
|
|
|
|
+ "start_time": this.start_time,
|
|
|
|
+ "end_time": this.end_time,
|
|
}, this.TabCur);
|
|
}, this.TabCur);
|
|
}
|
|
}
|
|
},
|
|
},
|
|
|
|
+ watch: {
|
|
|
|
+ datetimerange(newval) {
|
|
|
|
+ console.log('newval')
|
|
|
|
+ console.log(newval)
|
|
|
|
+
|
|
|
|
+ this.start_time = newval[0];
|
|
|
|
+ this.end_time = newval[1]
|
|
|
|
+
|
|
|
|
+ this.porcessedList = [],
|
|
|
|
+ this.page = 1,
|
|
|
|
+
|
|
|
|
+ this.goDone()
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ },
|
|
|
|
+ onShow: function() {
|
|
|
|
+ console.log(111)
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ },
|
|
|
|
|
|
onLoad: function(option) {
|
|
onLoad: function(option) {
|
|
- this.getProcessData({
|
|
|
|
- "company_code": uni.getStorageSync('selectedCode'),
|
|
|
|
- "type": option.type,
|
|
|
|
- "processing_status": 0,
|
|
|
|
- "page": this.page,
|
|
|
|
- "pageSize": this.pageSize,
|
|
|
|
- }, 0);
|
|
|
|
|
|
+ console.log(222)
|
|
|
|
|
|
this.companyCode = option.companyCode;
|
|
this.companyCode = option.companyCode;
|
|
this.processingStatus = 1
|
|
this.processingStatus = 1
|
|
this.type = option.type;
|
|
this.type = option.type;
|
|
|
|
|
|
|
|
+ this.goDone()
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
let url = "";
|
|
let url = "";
|
|
switch (parseInt(option.type)) {
|
|
switch (parseInt(option.type)) {
|
|
case 1:
|
|
case 1:
|
|
@@ -194,7 +229,21 @@
|
|
complete: () => {}
|
|
complete: () => {}
|
|
});
|
|
});
|
|
},
|
|
},
|
|
|
|
+
|
|
methods: {
|
|
methods: {
|
|
|
|
+ goDone() {
|
|
|
|
+ this.getProcessData({
|
|
|
|
+ "company_code": uni.getStorageSync('selectedCode'),
|
|
|
|
+ "type": this.type,
|
|
|
|
+ "processing_status": this.TabCur,
|
|
|
|
+ "page": this.page,
|
|
|
|
+ "pageSize": this.pageSize,
|
|
|
|
+ "start_handle_time": this.start_time,
|
|
|
|
+ "end_handle_time": this.end_time,
|
|
|
|
+ }, this.TabCur);
|
|
|
|
+ },
|
|
|
|
+
|
|
|
|
+
|
|
|
|
|
|
async getProcessData(params, whichTab) {
|
|
async getProcessData(params, whichTab) {
|
|
const res = await this.$myRequest({
|
|
const res = await this.$myRequest({
|
|
@@ -202,8 +251,8 @@
|
|
data: params,
|
|
data: params,
|
|
showLoading: true
|
|
showLoading: true
|
|
})
|
|
})
|
|
- this.data_res = res.data.alarm_count?1:0
|
|
|
|
- if (res.data.alarm_count) {
|
|
|
|
|
|
+ this.data_res = res.data.alarm_count ? 1 : 0
|
|
|
|
+ if (res.data.data) {
|
|
if (whichTab == 0) {
|
|
if (whichTab == 0) {
|
|
this.unporcessList = this.unporcessList.concat(res.data.data)
|
|
this.unporcessList = this.unporcessList.concat(res.data.data)
|
|
this.alarm_count = parseInt(res.data.alarm_count)
|
|
this.alarm_count = parseInt(res.data.alarm_count)
|
|
@@ -224,23 +273,19 @@
|
|
},
|
|
},
|
|
|
|
|
|
tabSelect(e) {
|
|
tabSelect(e) {
|
|
|
|
+
|
|
this.unporcessList = [],
|
|
this.unporcessList = [],
|
|
this.porcessedList = [],
|
|
this.porcessedList = [],
|
|
- this.page = 1
|
|
|
|
|
|
+ this.page = 1,
|
|
|
|
+ this.datetimerange = ['', ''],
|
|
|
|
|
|
- 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;
|
|
-
|
|
|
|
- this.getProcessData({
|
|
|
|
- "company_code": uni.getStorageSync('selectedCode'),
|
|
|
|
- "type": this.type,
|
|
|
|
- "processing_status": e.currentTarget.dataset.id,
|
|
|
|
- "page": this.page,
|
|
|
|
- "pageSize": this.pageSize
|
|
|
|
- }, this.TabCur);
|
|
|
|
},
|
|
},
|
|
|
|
|
|
|
|
+
|
|
|
|
+
|
|
// 页面跳转
|
|
// 页面跳转
|
|
goUnprocessDetail(item) {
|
|
goUnprocessDetail(item) {
|
|
uni.navigateTo({
|
|
uni.navigateTo({
|