qa-regulatory-gwj-app/pages/key-project-management/AI-warning/list.vue

101 lines
2.8 KiB
Vue
Raw Permalink Normal View History

2023-11-07 10:08:37 +08:00
<template>
<view class="content">
<u-tabs
2024-07-27 15:13:42 +08:00
lineWidth="336rpx"
2023-11-07 10:08:37 +08:00
:list="tabsList"
2024-07-27 15:13:42 +08:00
itemStyle="height:80rpx;padding-bottom:10rpx;background-color: #fff;"
2023-11-07 10:08:37 +08:00
@click="tabsClick"
></u-tabs>
<u-list @scrolltolower="scrolltolower" v-if="list.length > 0">
<u-list-item v-for="(item, index) in list" :key="index">
<view>
<view class="flex-between main-title">
<text>{{ item.OUTSOURCED_NAME }}</text>
</view>
<view class="flex-between mt-10 subtitle">
<text>视频名称{{ item.VIDEONAME }}</text>
</view>
<view class="flex-between mt-10 subtitle">
2024-10-10 10:14:31 +08:00
<text>报警类型{{ item.TYPE }}</text>
2023-11-07 10:08:37 +08:00
</view>
<view class="flex-between mt-10 subtitle">
2024-10-10 10:14:31 +08:00
<text>报警时间{{ item.CREATTIME }}</text>
2023-11-07 10:08:37 +08:00
</view>
<view class="flex-between mt-10 subtitle">
<text>处置状态{{ item.STATUS === "0" ? "待处理" : "已处理" }}</text>
2024-10-10 10:14:31 +08:00
<u-button v-if="item.STATUS === '1' " type="primary" text="查看" size="mini"
@click="fnNavigatorDetail(item.AIWARNING_ID,item.OUTSOURCED_ID,'view')"></u-button>
<view class="ml-10">
<u-button v-if="item.STATUS === '0' " type="primary" text="处置" size="mini"
@click="fnNavigatorDetail(item.AIWARNING_ID,item.OUTSOURCED_ID,'edit')"></u-button>
</view>
2023-11-07 10:08:37 +08:00
</view>
</view>
</u-list-item>
</u-list>
<empty v-else></empty>
</view>
</template>
<script>
import {getKeyProjectsAIWarningList} from "../../../api";
export default {
data() {
return {
tabsList: [
{name: '待处置', id: '1'},
{name: '已处置', id: '2'}
],
tabsType: '1',
pageSize: 10,
currentPage: 1,
totalPage: 0,
list: [],
}
},
onShow() {
this.resetList()
},
2024-10-10 10:14:31 +08:00
methods: {
async getData() {
2023-11-07 10:08:37 +08:00
let resData = await getKeyProjectsAIWarningList({
showCount: this.pageSize,
currentPage: this.currentPage,
STATUS: this.tabsType
});
2024-10-10 10:14:31 +08:00
this.list = [...this.list, ...resData.varList];
2023-11-07 10:08:37 +08:00
this.totalPage = resData.page.totalPage;
},
resetList() {
2024-10-10 10:14:31 +08:00
this.pageSize = 10
this.currentPage = 1
2023-11-07 10:08:37 +08:00
this.list = []
this.getData()
},
2024-10-10 10:14:31 +08:00
fnNavigatorDetail(AIWARNING_ID, OUTSOURCED_ID, type) {
2023-11-07 10:08:37 +08:00
uni.$u.route({
url: '/pages/key-project-management/AI-warning/detail',
params: {
2024-10-10 10:14:31 +08:00
AIWARNING_ID: AIWARNING_ID,
OUTSOURCED_ID: OUTSOURCED_ID,
type: type
2023-11-07 10:08:37 +08:00
}
})
},
scrolltolower() {
this.currentPage++;
2024-10-10 10:14:31 +08:00
if (this.totalPage >= this.currentPage) this.getData();
2023-11-07 10:08:37 +08:00
},
tabsClick(e) {
this.tabsType = e.id
this.resetList()
},
}
}
</script>
<style scoped>
</style>