parent
25e1156048
commit
2b54d07cc2
1 changed files with 347 additions and 312 deletions
@ -1,312 +1,347 @@ |
|||||||
<template> |
<template> |
||||||
<view id="page"> |
<view id="page"> |
||||||
<view class="Width100 Box BorderBox"> |
<view class="Width100 Box BorderBox"> |
||||||
<view class="Content BorderBox Width100"> |
<view class="Content BorderBox Width100"> |
||||||
<top-title :is-show-left="false" :title="'排查'" :rightWidth='120' class="custom_bg"> |
<top-title :is-show-left="false" :title="'排查'" :rightWidth='120' class="custom_bg"> |
||||||
<template slot="right"> |
<template slot="right"> |
||||||
<image :src="$.imgSrc + '/mine/search.png'" @click="$.open('/pages/mine/setting')" mode="aspectFit" class="InlineBlock imgIcon"></image> |
<image :src="$.imgSrc + '/mine/search.png'" @click="$.open('/pages/mine/setting')" |
||||||
<image :src="$.imgSrc + '/mine/plus.png'" mode="aspectFit" @click="$.open('/pages/create/create')" class="InlineBlock imgIcon"></image> |
mode="aspectFit" class="InlineBlock imgIcon"></image> |
||||||
</template> |
<image :src="$.imgSrc + '/mine/plus.png'" mode="aspectFit" |
||||||
</top-title> |
@click="$.open('/pages/create/create')" class="InlineBlock imgIcon"></image> |
||||||
</view> |
</template> |
||||||
<view class="tab"> |
</top-title> |
||||||
<view class="tab-item" :class="tab === 1 ? 'active' : ''" @click='handleTabClick(1)'> |
</view> |
||||||
<text>待办</text> |
<view class="tab"> |
||||||
<text v-if="showNumber" class="number">{{ totalData.Unconfirmed }}</text> |
<view class="tab-item" :class="tab === 1 ? 'active' : ''" @click='handleTabClick(1)'> |
||||||
</view> |
<text>待办</text> |
||||||
<view class="tab-item" :class="tab === 2 ? 'active' : ''" @click='handleTabClick(2)'> |
<text v-if="showNumber" class="number">{{ totalData.Unconfirmed }}</text> |
||||||
<text>正在办理</text> |
</view> |
||||||
<text class="number">{{ totalData.InGovernance }}</text> |
<view class="tab-item" :class="tab === 2 ? 'active' : ''" @click='handleTabClick(2)'> |
||||||
</view> |
<text>正在办理</text> |
||||||
<view class="tab-item" :class="tab === 3 ? 'active' : ''" @click='handleTabClick(3)'> |
<text class="number">{{ totalData.InGovernance }}</text> |
||||||
<text>已完成</text> |
</view> |
||||||
<text class="number">{{ totalData.Finished }}</text> |
<view class="tab-item" :class="tab === 3 ? 'active' : ''" @click='handleTabClick(3)'> |
||||||
</view> |
<text>已完成</text> |
||||||
</view> |
<text class="number">{{ totalData.Finished }}</text> |
||||||
<view class="Content MarginAuto BorderBox"> |
</view> |
||||||
<no-data v-if="isEmpty" /> |
</view> |
||||||
<view v-else class="List Width100 BorderBox"> |
<view class="Content MarginAuto BorderBox"> |
||||||
<view class="Unit FontBold BorderBox Width100 MarginT_30rpx BG_FFFFFF" |
<no-data v-if="isEmpty" /> |
||||||
v-for="item in list" :key='item.id' @click='handleClick(item)'> |
<view v-else class="List Width100 BorderBox"> |
||||||
<image class="imgleft" :src="item.imgurl || '/static/logo.png'" mode="widthFix"></image> |
<view class="Unit FontBold BorderBox Width100 MarginT_30rpx BG_FFFFFF" v-for="(item,index) in list" |
||||||
<view class="right"> |
:key='item.businessId+index' @click='handleClick(item)'> |
||||||
<view class="title">{{ item.name }}</view> |
<image class="imgleft" :src="item.imgurl || '/static/logo.png'" mode="widthFix"></image> |
||||||
<view class="type"> |
<view class="right"> |
||||||
<text>排查</text> |
<view class="title">{{ item.name }}</view> |
||||||
<text>{{ item.deadlineStatus || '--' }}</text> |
<view class="type"> |
||||||
</view> |
<text>排查</text> |
||||||
</view> |
<text>{{ item.deadlineStatus || '--' }}</text> |
||||||
<view class="trapezoidal" v-if="item.deadlineType == 1"> |
</view> |
||||||
超期 |
</view> |
||||||
</view> |
<view class="trapezoidal" v-if="item.deadlineType == 1"> |
||||||
<view class="trapezoidal lin" v-if="item.deadlineType == 2"> |
超期 |
||||||
临期 |
</view> |
||||||
</view> |
<view class="trapezoidal lin" v-if="item.deadlineType == 2"> |
||||||
</view> |
临期 |
||||||
</view> |
</view> |
||||||
</view> |
</view> |
||||||
</view> |
</view> |
||||||
</view> |
<u-loadmore :status="loadmorestatus" v-show="!isEmpty" /> |
||||||
</template> |
</view> |
||||||
|
</view> |
||||||
<script> |
</view> |
||||||
import NoData from "../../components/no-data.vue"; |
</template> |
||||||
import TopTitle from "../../components/top-title"; |
|
||||||
import $ from "../../common/globalJs/globalJs"; |
<script> |
||||||
export default { |
import NoData from "../../components/no-data.vue"; |
||||||
// 组件 |
import TopTitle from "../../components/top-title"; |
||||||
components: { |
import $ from "../../common/globalJs/globalJs"; |
||||||
NoData,TopTitle |
export default { |
||||||
}, |
// 组件 |
||||||
data() { |
components: { |
||||||
return { |
NoData, |
||||||
showNumber: true, |
TopTitle |
||||||
// 公用的js |
}, |
||||||
bgUrl1: '', // 登录信息背景图 |
data() { |
||||||
list: [], |
return { |
||||||
isEmpty: false, |
loadmorestatus: 'loading', |
||||||
isMore: true, |
showNumber: true, |
||||||
page: 1, |
// 公用的js |
||||||
tab: 1, |
bgUrl1: '', // 登录信息背景图 |
||||||
totalData: { |
list: [], |
||||||
UnderInvestigation: 0, |
isEmpty: false, |
||||||
InGovernance: 0, |
isMore: true, |
||||||
Finished: 0, |
page: 1, |
||||||
Unconfirmed: 0, |
tab: 1, |
||||||
}, |
totalData: { |
||||||
status: '0' |
UnderInvestigation: 0, |
||||||
} |
InGovernance: 0, |
||||||
}, |
Finished: 0, |
||||||
// 页面加载 |
Unconfirmed: 0, |
||||||
onLoad(e) { |
}, |
||||||
|
status: '0', |
||||||
}, |
|
||||||
onShow: function() { |
} |
||||||
this.getData() |
}, |
||||||
this.getList() |
// 页面加载 |
||||||
}, |
onLoad(e) { |
||||||
// 计算属性 |
|
||||||
computed: { |
}, |
||||||
$() { |
|
||||||
return $ |
onShow: function() { |
||||||
} |
this.getData() |
||||||
}, |
this.getList() |
||||||
// 方法 |
}, |
||||||
methods: { |
// 计算属性 |
||||||
handleTabClick(tab) { |
computed: { |
||||||
this.tab = tab; |
$() { |
||||||
this.page = 1; |
return $ |
||||||
this.list = []; |
} |
||||||
switch (tab) { |
}, |
||||||
case 1: |
// 方法 |
||||||
this.status = '0'; |
methods: { |
||||||
break; |
handleTabClick(tab) { |
||||||
case 2: |
this.tab = tab; |
||||||
this.status = '20'; |
this.page = 1; |
||||||
break; |
this.list = []; |
||||||
case 3: |
this.isMore = true |
||||||
this.status = '40'; |
switch (tab) { |
||||||
break; |
case 1: |
||||||
} |
this.status = '0'; |
||||||
this.getList() |
break; |
||||||
}, |
case 2: |
||||||
getData() { |
this.status = '20'; |
||||||
this.$request.globalRequest('/hiddenDanger/highDanger/getHighDangerStatusNum', { nuserid: this.$.getData('token') }, 'GET').then(res => { |
break; |
||||||
if (res.code === 200) { |
case 3: |
||||||
console.log(res.result) |
this.status = '40'; |
||||||
res.result.forEach(item => { |
break; |
||||||
this.totalData[item.status] = item.count |
} |
||||||
}) |
this.getList() |
||||||
} else { |
}, |
||||||
this.$.toast(res.message) |
getData() { |
||||||
} |
this.$request.globalRequest('/hiddenDanger/highDanger/getHighDangerStatusNum', { |
||||||
}) |
nuserid: this.$.getData('token') |
||||||
}, |
}, 'GET').then(res => { |
||||||
getList(v) { |
if (res.code === 200) { |
||||||
let datas = { |
// console.log(res.result) |
||||||
nuserid: this.$.getData('token'), |
res.result.forEach(item => { |
||||||
status: this.status, |
this.totalData[item.status] = item.count |
||||||
} |
}) |
||||||
this.$request.globalRequest(`/hiddenDanger/highDanger/getHigDangerDealt?pageNum=${this.page}&pageSize=${10}`, datas, 'POST').then(res => { |
} else { |
||||||
if (res.code === 200) { |
this.$.toast(res.message) |
||||||
if(v){ |
} |
||||||
this.list = [] |
}) |
||||||
} |
}, |
||||||
if (res.result.total === 0) { |
getList() { |
||||||
this.isEmpty = true; |
let datas = { |
||||||
} else { |
nuserid: this.$.getData('token'), |
||||||
this.isEmpty = false; |
status: this.status, |
||||||
this.list.push(...res.result.list) |
} |
||||||
} |
this.loadmorestatus = 'loading' |
||||||
if (this.list.length >= res.result.total) { |
this.$request.globalRequest( |
||||||
this.isMore = false |
`/hiddenDanger/highDanger/getHigDangerDealt?pageNum=${this.page}&pageSize=${10}`, datas, 'POST') |
||||||
} else { |
.then(res => { |
||||||
this.isMore = true |
this.loadmorestatus = 'loadmore' |
||||||
} |
uni.stopPullDownRefresh(); |
||||||
} else { |
if (res.code === 200) { |
||||||
this.$.toast(res.message) |
if (res.result.total === 0) { |
||||||
} |
this.isEmpty = true; |
||||||
}) |
} else { |
||||||
}, |
this.isEmpty = false; |
||||||
handleClick(row) { |
this.list.push(...res.result.list) |
||||||
console.log(row) |
} |
||||||
this.$.open('/pages/map/index?businessId=' + row.businessId) |
if (this.list.length >= res.result.total) { |
||||||
}, |
this.loadmorestatus = 'nomore' |
||||||
// 跳转页面 |
this.isMore = false |
||||||
skipPage(even) { |
} |
||||||
// this.$.open(even) |
} else { |
||||||
}, |
this.$.toast(res.message) |
||||||
}, |
} |
||||||
onReady() {}, |
}).catch((err) => { |
||||||
// 页面卸载 |
this.loadmorestatus = 'nomore' |
||||||
onUnload() { |
uni.stopPullDownRefresh(); |
||||||
|
}) |
||||||
}, |
}, |
||||||
// 触发下拉刷新 |
handleClick(row) { |
||||||
onPullDownRefresh() { |
console.log(row) |
||||||
// 延迟关闭刷新动画 |
this.$.open('/pages/map/index?businessId=' + row.businessId) |
||||||
setTimeout(() => { |
}, |
||||||
uni.stopPullDownRefresh(); |
// 跳转页面 |
||||||
this.page = 1 |
skipPage(even) { |
||||||
this.getList('onPullDownRefresh') |
// this.$.open(even) |
||||||
}, 1500); |
}, |
||||||
}, |
}, |
||||||
// 页面上拉触底事件的处理函数 |
onReady() {}, |
||||||
onReachBottom() { |
// 页面卸载 |
||||||
if (this.isMore) { |
onUnload() { |
||||||
this.page++ |
|
||||||
this.getList() |
}, |
||||||
} |
// 触发下拉刷新 |
||||||
}, |
onPullDownRefresh() { |
||||||
} |
this.page = 1; |
||||||
</script> |
this.list = []; |
||||||
|
this.isMore = true |
||||||
<style> |
this.getList() |
||||||
</style> |
// 延迟关闭刷新动画 |
||||||
<style lang="scss" scoped> |
// setTimeout(() => { |
||||||
page { |
// uni.stopPullDownRefresh(); |
||||||
background: #F6F8FA; |
// }, 1500); |
||||||
} |
}, |
||||||
.imgIcon { |
// 页面上拉触底事件的处理函数 |
||||||
width: 40rpx; |
onReachBottom() { |
||||||
height: 100%; |
if (this.isMore) { |
||||||
} |
this.page++ |
||||||
.imgIcon:nth-of-type(2) { |
this.getList() |
||||||
margin-left: 40rpx; |
} |
||||||
} |
}, |
||||||
.img { |
} |
||||||
width: 40rpx; |
</script> |
||||||
height: 40rpx; |
|
||||||
margin-left: 30rpx; |
<style> |
||||||
} |
</style> |
||||||
.trapezoidal { |
<style lang="scss" scoped> |
||||||
position: relative; |
page { |
||||||
display: inline-block; |
background: #F6F8FA; |
||||||
min-width: 2em; |
} |
||||||
text-align: center; |
|
||||||
padding: 3rpx 20rpx 3rpx 18rpx; |
.imgIcon { |
||||||
} |
width: 40rpx; |
||||||
|
height: 100%; |
||||||
.trapezoidal::before, |
} |
||||||
.trapezoidal::after { |
|
||||||
content: ''; |
.imgIcon:nth-of-type(2) { |
||||||
position: absolute; |
margin-left: 40rpx; |
||||||
top: 0; |
} |
||||||
left: 0%; |
|
||||||
width: 100%; |
.img { |
||||||
height: 100%; |
width: 40rpx; |
||||||
border-radius: 0rpx 0 0 0; |
height: 40rpx; |
||||||
background: #FF1111; |
margin-left: 30rpx; |
||||||
z-index: -1; |
} |
||||||
transform-origin: bottom; |
|
||||||
transform: skew(18deg); |
.trapezoidal { |
||||||
border: 0rpx solid #333; |
position: relative; |
||||||
box-sizing: border-box; |
display: inline-block; |
||||||
} |
min-width: 2em; |
||||||
|
text-align: center; |
||||||
.trapezoidal::after { |
padding: 3rpx 20rpx 3rpx 18rpx; |
||||||
left: auto; |
} |
||||||
right: 0; |
|
||||||
transform: skew(-0deg); |
.trapezoidal::before, |
||||||
border-radius: 0 0rpx 0 0; |
.trapezoidal::after { |
||||||
background-color: #FF1111; |
content: ''; |
||||||
border-left: 0 none; |
position: absolute; |
||||||
} |
top: 0; |
||||||
.lin::before,.lin::after { |
left: 0%; |
||||||
background-color: #E68A0B; |
width: 100%; |
||||||
} |
height: 100%; |
||||||
|
border-radius: 0rpx 0 0 0; |
||||||
.tab { |
background: #FF1111; |
||||||
display: flex; |
z-index: -1; |
||||||
align-items: center; |
transform-origin: bottom; |
||||||
justify-content: space-around; |
transform: skew(18deg); |
||||||
font-size: 16px; |
border: 0rpx solid #333; |
||||||
height: 44px; |
box-sizing: border-box; |
||||||
background: #ffffff; |
} |
||||||
box-shadow: 3px 0px 10px #ccc; |
|
||||||
color: #666666; |
.trapezoidal::after { |
||||||
position: relative; |
left: auto; |
||||||
.tab-item { |
right: 0; |
||||||
position: relative; |
transform: skew(-0deg); |
||||||
height: 41px; |
border-radius: 0 0rpx 0 0; |
||||||
line-height: 41px; |
background-color: #FF1111; |
||||||
padding: 0 30rpx 0 30rpx; |
border-left: 0 none; |
||||||
border-bottom: 3px solid #fff; |
} |
||||||
display: flex; |
|
||||||
align-items: center; |
.lin::before, |
||||||
&.active { |
.lin::after { |
||||||
color: rgb(60, 109, 195); |
background-color: #E68A0B; |
||||||
border-color: rgb(60, 109, 195); |
} |
||||||
} |
|
||||||
.number { |
.tab { |
||||||
font-weight: bold; |
display: flex; |
||||||
font-size: 18px; |
align-items: center; |
||||||
margin-left: 10rpx; |
justify-content: space-around; |
||||||
} |
font-size: 16px; |
||||||
} |
height: 44px; |
||||||
} |
background: #ffffff; |
||||||
|
box-shadow: 3px 0px 10px #ccc; |
||||||
.Box { |
color: #666666; |
||||||
padding-top:var(--status-bar-height); |
position: sticky; |
||||||
.Content { |
// top: var(--status-bar-height + 88rpx); |
||||||
width: calc(100% - 48rpx); |
top: calc(var(--status-bar-height ) + 88rpx); |
||||||
padding-bottom: 88rpx; |
z-index: 10; |
||||||
} |
|
||||||
|
.tab-item { |
||||||
.Unit { |
position: relative; |
||||||
padding: 12rpx; |
height: 41px; |
||||||
display: flex; |
line-height: 41px; |
||||||
justify-content: space-between; |
padding: 0 30rpx 0 30rpx; |
||||||
align-items: center; |
border-bottom: 3px solid #fff; |
||||||
position: relative; |
display: flex; |
||||||
box-shadow: 1px 1px 3px #ccc; |
align-items: center; |
||||||
.trapezoidal { |
|
||||||
position: absolute; |
&.active { |
||||||
top: -0px; |
color: rgb(60, 109, 195); |
||||||
right: 4px; |
border-color: rgb(60, 109, 195); |
||||||
color: #ffffff; |
} |
||||||
font-size: 14px; |
|
||||||
font-weight: normal; |
.number { |
||||||
z-index: 1; |
font-weight: bold; |
||||||
} |
font-size: 18px; |
||||||
image { |
margin-left: 10rpx; |
||||||
width: 200rpx; |
} |
||||||
} |
} |
||||||
.right { |
} |
||||||
flex: 1; |
|
||||||
padding-left: 30rpx; |
.Box { |
||||||
.title { |
padding-top: var(--status-bar-height); |
||||||
font-size: 16px; |
|
||||||
} |
.Content { |
||||||
.type { |
width: calc(100% - 48rpx); |
||||||
font-size: 14px; |
padding-bottom: 88rpx; |
||||||
color: #666; |
} |
||||||
font-weight: normal; |
|
||||||
text { |
.Unit { |
||||||
margin-right: 20rpx; |
padding: 12rpx; |
||||||
} |
display: flex; |
||||||
} |
justify-content: space-between; |
||||||
} |
align-items: center; |
||||||
} |
position: relative; |
||||||
} |
box-shadow: 1px 1px 3px #ccc; |
||||||
</style> |
|
||||||
|
.trapezoidal { |
||||||
|
position: absolute; |
||||||
|
top: -0px; |
||||||
|
right: 4px; |
||||||
|
color: #ffffff; |
||||||
|
font-size: 14px; |
||||||
|
font-weight: normal; |
||||||
|
z-index: 1; |
||||||
|
} |
||||||
|
|
||||||
|
image { |
||||||
|
width: 200rpx; |
||||||
|
} |
||||||
|
|
||||||
|
.right { |
||||||
|
flex: 1; |
||||||
|
padding-left: 30rpx; |
||||||
|
|
||||||
|
.title { |
||||||
|
font-size: 16px; |
||||||
|
} |
||||||
|
|
||||||
|
.type { |
||||||
|
font-size: 14px; |
||||||
|
color: #666; |
||||||
|
font-weight: normal; |
||||||
|
|
||||||
|
text { |
||||||
|
margin-right: 20rpx; |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
} |
||||||
|
</style> |
||||||
Loading…
Reference in new issue