xytSk-App/pages/wtcl/index.vue

198 lines
5.0 KiB
Vue
Raw Normal View History

2024-09-14 09:22:12 +08:00
<template>
<view :style="{height:'100vh',overflow:'hidden'}">
<u-status-bar></u-status-bar>
2024-11-07 17:46:03 +08:00
<u-navbar title="问题处理" :autoBack="true" :titleStyle="{
2024-09-14 09:22:12 +08:00
fontSize:'18px'
}" :height='44' :safeAreaInsetTop=true leftIconSize='20' leftIconColor='rgb(153, 153, 153)'>
</u-navbar>
2024-11-08 15:11:23 +08:00
<view class="" style="margin-top: 50px;;background-color: #f0f0f0;border-top: 1px solid #f0f0f0;overflow: auto;">
2024-11-07 10:48:41 +08:00
<view style="padding:0 10px;backgroundColor:#fff">
2024-11-06 15:56:11 +08:00
<view class="time-ranger">
<view class="start-time">
<text>开始时间</text>
<text @click="showTime=true" style="margin-left:15%;color:#3399ef">{{startTime}}</text>
</view>
<view class="end-time">
<text>结束时间</text>
<text @click="showTime1=true" style="margin:0 15%;color:#3399ef">{{endTime}}</text>
<view class="search-btn" @click="searchTm">
搜索
</view>
</view>
</view>
2024-09-14 09:22:12 +08:00
</view>
2024-11-08 15:55:32 +08:00
<view class="" v-if="list.length !== 0" style="height:calc(100vh - 180px);overflow: auto;">
2024-11-11 16:43:54 +08:00
<view class="" v-for="item in list" style="margin: 10px;background-color: #fff;padding: 10px;" >
2024-11-08 15:11:23 +08:00
<view class="item">
<!-- {{item.title}} -->
<view class="title">
{{item.taskTitle}}
</view>
2024-11-11 16:43:54 +08:00
<view class="titleRight" @click="toDetail(item)">
2024-11-08 15:11:23 +08:00
<view class="border">
2024-11-08 18:00:54 +08:00
{{item.isHandle==0?'待处理':'已处理'}}
2024-11-08 15:11:23 +08:00
</view>
<u-icon name="arrow-right" size="20"></u-icon>
2024-09-14 09:22:12 +08:00
</view>
</view>
2024-11-08 15:11:23 +08:00
<view class="contentItem">
<view class="itemC">
<text>巡检项</text>
<text>{{item.itemDesc}}</text>
</view>
<view class="itemC">
<text>巡查人</text>
<text>{{item.inspectUserName}}</text>
</view>
<view class="itemC">
<text>巡查时间</text>
<text>{{item.finishTime}}</text>
</view>
2024-09-14 09:22:12 +08:00
</view>
</view>
</view>
2024-11-08 15:11:23 +08:00
<view style="height:calc(100vh - 150px);display: flex;align-items: center;justify-content: center;background-color: #fff;" v-else>
<image src="../../static/empty.png" mode="" ></image>
</view>
2024-09-14 09:22:12 +08:00
</view>
2024-11-08 15:11:23 +08:00
<u-datetime-picker :show="showTime" v-model="stm" mode="date" @confirm="showTime=false"
2024-11-06 15:56:11 +08:00
@cancel="showTime=false"></u-datetime-picker>
2024-11-08 15:11:23 +08:00
<u-datetime-picker :show="showTime1" v-model="etm" mode="date" @confirm="showTime1=false"
2024-11-06 15:56:11 +08:00
@cancel="showTime1=false"></u-datetime-picker>
2024-09-14 09:22:12 +08:00
</view>
</template>
<script>
import moment from 'moment'
export default {
data() {
return {
2024-11-11 10:55:23 +08:00
minDate:moment().startOf('year').valueOf(),
maxDate:moment().valueOf(),
2024-09-14 09:22:12 +08:00
show: false,
2024-11-06 15:56:11 +08:00
showTime:false,
showTime1:false,
start: '请选择开始时间',
end: '请选择结束时间',
2024-11-08 15:40:32 +08:00
stm:moment().startOf('year').format('YYYY-MM-DD'),
etm:moment().format('YYYY-MM-DD'),
2024-11-06 15:56:11 +08:00
list: [
2024-09-14 09:22:12 +08:00
]
};
},
2024-11-08 18:00:54 +08:00
onShow() {
2024-11-06 15:56:11 +08:00
this.getList()
},
computed:{
startTime:function (){
2024-11-08 15:11:23 +08:00
return this.stm?moment(this.stm).format('YYYY-MM-DD'):this.start
2024-11-06 15:56:11 +08:00
},
endTime:function (){
2024-11-08 15:11:23 +08:00
return this.etm?moment(this.etm).format('YYYY-MM-DD'):this.end
2024-11-06 15:56:11 +08:00
}
2024-09-14 09:22:12 +08:00
},
methods: {
2024-11-06 15:56:11 +08:00
searchTm(){
this.getList()
},
getList() {
console.log(uni.getStorageSync('value'));
let params = {
"pageSo": {
2024-11-08 15:11:23 +08:00
"pageSize": 999,
2024-11-06 15:56:11 +08:00
"pageNumber": 1
},
"dateTimeRangeSo": {
2024-11-08 15:11:23 +08:00
start:this.stm?moment(this.stm).format('YYYY-MM-DD 00:00:00'):'',
end:this.etm?moment(this.etm).format('YYYY-MM-DD 23:59:59'):''
2024-11-06 15:56:11 +08:00
},
"isHandle": 0,
2024-11-08 15:11:23 +08:00
"handleUserId": uni.getStorageSync('value').userId
2024-11-06 15:56:11 +08:00
}
2024-11-11 16:43:54 +08:00
console.log(params,'dsd');
2024-11-12 17:58:06 +08:00
uni.$http.post('/gunshiApp/xyt/inspect/detail/page', params).then(res => {
this.list=res.data.data.records
})
2024-11-06 15:56:11 +08:00
},
2024-09-14 09:22:12 +08:00
confirm(e) {
console.log(e);
this.model.start = e[0]
this.model.end = e[1]
this.show = false
},
cancel() {
this.show = false
},
2024-11-06 15:56:11 +08:00
toDetail(item) {
2024-09-14 09:22:12 +08:00
uni.navigateTo({
2024-11-06 15:56:11 +08:00
url: '/pages/wtcl/detail/index?item='+JSON.stringify(item)
2024-09-14 09:22:12 +08:00
})
}
}
}
</script>
<style lang="scss" scoped>
.myTitleStyle {
font-size: 30px;
background-color: red;
height: 200px;
}
.tabsClass {
margin-top: 44px;
height: 44px;
padding: 0 40px;
border-top: 1px solid #eee;
border-bottom: 1px solid #eee;
}
.item {
border-bottom: 1px solid #f0f0f0;
padding-bottom: 10px;
display: flex;
justify-content: space-between;
.title {
border-width: 0px;
font-family: '微软雅黑 Bold', '微软雅黑 Regular', '微软雅黑', sans-serif;
font-weight: 700;
font-style: normal;
font-size: 15px;
color: #666666
}
.titleRight {
display: flex;
2024-11-06 15:56:11 +08:00
2024-09-14 09:22:12 +08:00
.border {
border-width: 0px;
background-color: rgba(236, 245, 255, 1);
box-sizing: border-box;
border-width: 1px;
border-style: solid;
border-color: rgba(187, 220, 255, 1);
border-radius: 5px;
box-shadow: none;
width: 58px;
height: 25px;
color: #689FFF;
text-align: center;
}
}
}
2024-11-06 15:56:11 +08:00
.contentItem {
.itemC {
2024-09-14 09:22:12 +08:00
display: flex;
justify-content: space-between;
display: flex;
color: #666666;
padding: 10px;
}
}
</style>