排查搜索

main
limingtao 11 months ago
parent 4f55cff1a7
commit 2835a795b4
  1. 5
      components/no-data.vue
  2. 105
      pages/investigation/index.vue

@ -51,8 +51,9 @@ export default {
<style scoped lang="scss"> <style scoped lang="scss">
.Img{ .Img{
width: 512rpx; width: 360rpx;
height: 440rpx; height: 300rpx;
margin: 0 auto; margin: 0 auto;
margin-bottom: 30rpx;
} }
</style> </style>

@ -11,19 +11,28 @@
</template> </template>
</top-title> </top-title>
</view> </view>
<view class="tab"> <view class="query-form">
<view class="tab-item" :class="tab === 1 ? 'active' : ''" @click='handleTabClick(1)'> <view class="search-box">
<text>待办</text> <u-search placeholder="请输入名称" v-model="search" actionText="" :showAction="false"
<text v-if="showNumber" class="number">{{ totalData.UnderInvestigation }}</text> @search="searchData" @clear="searchData"></u-search>
</view> </view>
<!-- <view class="tab-item" :class="tab === 2 ? 'active' : ''" @click='handleTabClick(2)'> <view class="tab">
<text>正在办理</text>
<text class="number">{{ totalData.InGovernance }}</text> <view class="tab-item" :class="tab === 1 ? 'active' : ''" @click='handleTabClick(1)'>
</view> --> <text>待办</text>
<view class="tab-item" :class="tab === 3 ? 'active' : ''" @click='handleTabClick(3)'> <text v-if="showNumber" class="number">{{ totalData.UnderInvestigation }}</text>
<text>已完成</text> </view>
<text class="number">{{ totalData.InGovernance }}</text> <!-- <view class="tab-item" :class="tab === 2 ? 'active' : ''" @click='handleTabClick(2)'>
<text>正在办理</text>
<text class="number">{{ totalData.InGovernance }}</text>
</view> -->
<view class="tab-item" :class="tab === 3 ? 'active' : ''" @click='handleTabClick(3)'>
<text>已完成</text>
<text class="number">{{ totalData.InGovernance }}</text>
</view>
</view> </view>
</view> </view>
<view class="Content MarginAuto BorderBox"> <view class="Content MarginAuto BorderBox">
<no-data v-if="isEmpty" /> <no-data v-if="isEmpty" />
@ -81,6 +90,7 @@
Unconfirmed: 0, Unconfirmed: 0,
}, },
status: '10', status: '10',
search: ''
} }
}, },
@ -92,13 +102,12 @@
onShow() { onShow() {
this.getData() this.getData()
let pageStatus = this.$.getData('pageStatus') let pageStatus = this.$.getData('pageStatus')
console.log(pageStatus) if (pageStatus == 1) {
if(pageStatus == 1){
this.handleTabClick(1) this.handleTabClick(1)
this.$.setData('pageStatus','0') this.$.setData('pageStatus', '0')
} else if(pageStatus == 3) { } else if (pageStatus == 3) {
this.handleTabClick(3) this.handleTabClick(3)
this.$.setData('pageStatus','0') this.$.setData('pageStatus', '0')
} else { } else {
this.handleTabClick(1) this.handleTabClick(1)
} }
@ -120,9 +129,9 @@
case 1: case 1:
this.status = '10'; this.status = '10';
break; break;
// case 2: // case 2:
// this.status = '20'; // this.status = '20';
// break; // break;
case 3: case 3:
this.status = '20'; this.status = '20';
break; break;
@ -144,14 +153,20 @@
} }
}) })
}, },
searchData() {
this.page = 1;
this.list = []
this.getList()
},
getList() { getList() {
let datas = { let datas = {
nuserid: this.$.getData('token'), nuserid: this.$.getData('token'),
status: this.status, status: this.status,
} }
this.loadmorestatus = 'loading' this.loadmorestatus = 'loading'
this.$request.globalRequest( this.$request.globalRequest(
`/hiddenDanger/highDanger/getHigDangerDealt?pageNum=${this.page}&pageSize=${10}`, datas, 'POST') `/hiddenDanger/highDanger/getHigDangerDealt?pageNum=${this.page}&pageSize=${10}&search=${this.search}`, datas, 'POST')
.then(res => { .then(res => {
this.loadmorestatus = 'loadmore' this.loadmorestatus = 'loadmore'
uni.stopPullDownRefresh(); uni.stopPullDownRefresh();
@ -176,7 +191,7 @@
}, },
handleClick(row) { handleClick(row) {
console.log(row) console.log(row)
if(this.tab === 1) { if (this.tab === 1) {
this.$.open('/pages/map/index?businessId=' + row.businessId) this.$.open('/pages/map/index?businessId=' + row.businessId)
} }
}, },
@ -185,7 +200,7 @@
// this.$.open(even) // this.$.open(even)
}, },
}, },
onReady() {}, onReady() { },
// //
onUnload() { onUnload() {
@ -272,12 +287,10 @@
background-color: #E68A0B; background-color: #E68A0B;
} }
.tab { .query-form {
display: flex;
align-items: center;
justify-content: space-around;
font-size: 16px; font-size: 16px;
height: 44px; height: 91px;
background: #ffffff; background: #ffffff;
box-shadow: 3px 0px 10px #ccc; box-shadow: 3px 0px 10px #ccc;
color: #666666; color: #666666;
@ -286,26 +299,36 @@
top: calc(var(--status-bar-height) + 88rpx); top: calc(var(--status-bar-height) + 88rpx);
z-index: 10; z-index: 10;
.tab-item { .tab {
position: relative;
height: 41px;
line-height: 41px;
padding: 0 30rpx 0 30rpx;
border-bottom: 3px solid #fff;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-around;
&.active { .tab-item {
color: rgb(60, 109, 195); position: relative;
border-color: rgb(60, 109, 195); height: 41px;
} line-height: 41px;
padding: 0 30rpx 0 30rpx;
border-bottom: 3px solid #fff;
display: flex;
align-items: center;
&.active {
color: rgb(60, 109, 195);
border-color: rgb(60, 109, 195);
}
.number { .number {
font-weight: bold; font-weight: bold;
font-size: 18px; font-size: 18px;
margin-left: 10rpx; margin-left: 10rpx;
}
} }
} }
.search-box {
padding: 10px 10px 3px;
}
} }
.Box { .Box {

Loading…
Cancel
Save