|
|
@@ -48,7 +48,7 @@
|
|
|
|
|
|
<!-- 预警列表 -->
|
|
|
<scroll-view
|
|
|
- v-if="activeTab == 0"
|
|
|
+ v-if="activeTab == 0 || activeTab == 1 || activeTab == 2"
|
|
|
class="warning-list"
|
|
|
scroll-y
|
|
|
:scroll-top="listScrollTop"
|
|
|
@@ -68,7 +68,7 @@
|
|
|
<image :src="weather" class="icon-image" />
|
|
|
</view>
|
|
|
<text class="type-text">{{ warning.warning_title }}</text>
|
|
|
- <text class="device-type">{{ warning.device_type }}</text>
|
|
|
+ <text class="device-type">{{ warning.purview_name }}</text>
|
|
|
</view>
|
|
|
<view class="warning-level"
|
|
|
:class="
|
|
|
@@ -102,7 +102,7 @@
|
|
|
</scroll-view>
|
|
|
|
|
|
<scroll-view
|
|
|
- v-if="activeTab == 1"
|
|
|
+ v-if="activeTab == 3"
|
|
|
class="warning-list"
|
|
|
scroll-y
|
|
|
:scroll-top="listScrollTop"
|
|
|
@@ -159,7 +159,7 @@
|
|
|
<view class="popup-time">{{ formatTime(current.upl_time) }}</view>
|
|
|
<view class="popup-text">
|
|
|
<u-icon name="map" size="28"></u-icon>
|
|
|
- <text style="margin-left: 10rpx">{{ warning.address || '-' }}</text>
|
|
|
+ <text style="margin-left: 10rpx">{{ current.address || '-' }}</text>
|
|
|
</view>
|
|
|
</view>
|
|
|
</u-popup>
|
|
|
@@ -222,9 +222,9 @@ export default {
|
|
|
activeTabHandler(index){
|
|
|
this.activeTab = index;
|
|
|
this.page = 1;
|
|
|
- if(index == 0 || index == 1){
|
|
|
+ if(index == 0 || index == 1 || index == 2){
|
|
|
this.getWarningList();
|
|
|
- }else if(index == 2){
|
|
|
+ }else if(index == 3){
|
|
|
this.getWarningManualList();
|
|
|
}
|
|
|
},
|
|
|
@@ -248,18 +248,18 @@ export default {
|
|
|
this.page = 1;
|
|
|
this.loading = false;
|
|
|
this.finished = false;
|
|
|
- if(this.activeTab == 0 || this.activeTab == 1){
|
|
|
+ if(this.activeTab == 0 || this.activeTab == 1 || this.activeTab == 2){
|
|
|
this.getWarningList();
|
|
|
- }else if(this.activeTab == 2){
|
|
|
+ }else if(this.activeTab == 3){
|
|
|
this.getWarningManualList();
|
|
|
}
|
|
|
},
|
|
|
// 加载更多
|
|
|
loadMore() {
|
|
|
if (this.finished) return;
|
|
|
- if(this.activeTab == 0 || this.activeTab == 1){
|
|
|
+ if(this.activeTab == 0 || this.activeTab == 1 || this.activeTab == 2){
|
|
|
this.getWarningList();
|
|
|
- }else if(this.activeTab == 2){
|
|
|
+ }else if(this.activeTab == 3){
|
|
|
this.getWarningManualList();
|
|
|
}
|
|
|
},
|
|
|
@@ -271,9 +271,9 @@ export default {
|
|
|
this.loading = false;
|
|
|
this.finished = false;
|
|
|
this.refreshing = true;
|
|
|
- if(this.activeTab == 0 || this.activeTab == 1){
|
|
|
+ if(this.activeTab == 0 || this.activeTab == 1 || this.activeTab == 2){
|
|
|
this.getWarningList();
|
|
|
- }else if(this.activeTab == 2){
|
|
|
+ }else if(this.activeTab == 3){
|
|
|
this.getWarningManualList();
|
|
|
}
|
|
|
},
|
|
|
@@ -402,7 +402,6 @@ export default {
|
|
|
|
|
|
const start = this.dateToTimestamp(this.startTime + ' 00:00:00');
|
|
|
const end = this.dateToTimestamp(this.endTime + ' 23:59:59');
|
|
|
- console.log(this.activeTab,this.tabs,'activeTabactiveTabactiveTab')
|
|
|
const params = {
|
|
|
start,
|
|
|
end,
|
|
|
@@ -419,10 +418,8 @@ export default {
|
|
|
method:'POST',
|
|
|
data: params,
|
|
|
})
|
|
|
-
|
|
|
const resData = res?.data || [];
|
|
|
const list = resData || [];
|
|
|
-
|
|
|
if (this.page === 1) {
|
|
|
this.warningList = list;
|
|
|
} else {
|
|
|
@@ -431,7 +428,6 @@ export default {
|
|
|
|
|
|
this.total = res?.total_num || 0;
|
|
|
this.loading = false;
|
|
|
-
|
|
|
// 计算是否还有更多数据
|
|
|
if (this.warningList.length >= this.total) {
|
|
|
this.finished = true;
|