123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227 |
- <template>
- <view class="page" :style="{'min-height':h+'px', 'padding-top':mt+'px'}">
- <cus-header title='巡检记录'></cus-header>
- <div class="top" @tap="placeShow = true;">
- <div class="left">
- <image :src="imgBase+'inspection/record_location.png'"></image>
- <text>{{'电商园四期B座'}}</text>
- </div>
- <div class="right">
- <u-icon name="arrow-right" color="#FFFFFF" size="32"></u-icon>
- </div>
- </div>
- <div class="filtrate">
- <div class="pre" @tap="timeShow = true;">
- <text>巡检时间</text>
- <div style="transform: rotate(30deg);"><u-icon name="play-left-fill" color="#999999" size="24"></u-icon></div>
- </div>
- <div class="pre" @tap="typeShow = true">
- <text>巡检类型</text>
- <div style="transform: rotate(30deg);"><u-icon name="play-left-fill" color="#999999" size="24"></u-icon></div>
- </div>
- <div class="pre" @tap="userShow = true">
- <text>巡检人员</text>
- <div style="transform: rotate(30deg);"><u-icon name="play-left-fill" color="#999999" size="24"></u-icon></div>
- </div>
- </div>
- <div class="title">共有<span>{{list.length}}</span>条记录</div>
- <div class="boxs" v-if="list.length">
- <div class="box" v-for="(item,index) in list" :key="index">
- <div class="place">{{item.place}}</div>
- <div class="pre">巡检类型<span>{{item.type}}</span></div>
- <div class="pre">巡检人员<span>{{item.person}}</span></div>
- <div class="pre">联系电话<span>{{item.phone}}</span></div>
- <div class="pre">巡检时间<span>{{item.time}}</span></div>
- </div>
- </div>
- <template v-else>
- <page-empty :height="'calc(100vh - '+(mt+150)+'px)'" marginTop="150px"></page-empty>
- </template>
- <u-picker :show="placeShow" :columns="placeColumns" @cancel="placeShow=false" @change="changeHandler" @confirm="e=>paramsConfirm(e,'')" ref="uPicker"></u-picker>
- <u-picker :show="timeShow" :columns="timeColumns" title="巡检时间" @cancel="timeShow=false" @confirm="e=>paramsConfirm(e,'')"></u-picker>
- <u-picker :show="typeShow" :columns="typeColumns" title="巡检类型" @cancel="typeShow=false" @confirm="e=>paramsConfirm(e,'')"></u-picker>
- <u-picker :show="userShow" :columns="userColumns" title="巡检人员" @cancel="userShow=false" @confirm="e=>paramsConfirm(e,'')"></u-picker>
- </view>
- </template>
- <script>
- export default {
- data(){
- return {
- timeShow:false,
- timeColumns:[
- ['不限','2025-01-09','2025-01-08']
- ],
- placeShow:false,
- placeColumns:[
- ['A栋','B栋'],
- ['A101', 'A102', 'A103', 'A201']
- ],
- placeColumnData: [
- ['A101', 'A102', 'A103', 'A201'],
- ['B201', 'B203', 'B303', 'B404']
- ],
- typeShow:false,
- typeColumns:[
- ['全部','类型1','类型2']
- ],
- userShow:false,
- userColumns:[
- ['全部','人员A','人员B']
- ],
- list:[
- {
- place:'B座13楼1301',
- type:'安保',
- person:'张浩',
- phone:'18799980997',
- time:'2024-12-28 10:34:22'
- },
- {
- place:'B座13楼1302',
- type:'安保',
- person:'张浩',
- phone:'18799980997',
- time:'2024-12-28 10:34:22'
- },
- {
- place:'B座13楼1303',
- type:'安保',
- person:'张浩',
- phone:'18799980997',
- time:'2024-12-28 10:34:22'
- }
- ]
- }
- },
- methods:{
- changeHandler(e) {
- const {
- columnIndex,
- value,
- values, // values为当前变化列的数组内容
- index,
- // 微信小程序无法将picker实例传出来,只能通过ref操作
- picker = this.$refs.uPicker
- } = e
- // 当第一列值发生变化时,变化第二列(后一列)对应的选项
- if (columnIndex === 0) {
- // picker为选择器this实例,变化第二列对应的选项
- picker.setColumnValues(1, this.placeColumnData[index])
- }
- },
- paramsConfirm(e,type){
- this.placeShow = this.timeShow= this.typeShow = this.userShow = false;
- }
- }
- }
- </script>
- <style scoped lang="less">
- .page{
- padding-bottom: 20rpx;
- background: #F4F8FB;
- box-sizing: border-box;
- .top{
- width: 100%;
- height: 102rpx;
- background: #198CFF;
- padding: 0 30rpx;
- box-sizing: border-box;
- display: flex;
- align-items: center;
- justify-content: space-between;
- .left{
- display: flex;
- align-items: center;
- image{
- width: 36rpx;
- height: 36rpx;
- }
- text{
- font-family: PingFangSC, PingFang SC;
- font-weight: 400;
- font-size: 30rpx;
- color: #FFFFFF;
- line-height: 42rpx;
- margin-left: 10rpx;
- }
- }
- }
- .filtrate{
- width: 100%;
- height: 90rpx;
- background: #FFFFFF;
- display: flex;
- .pre{
- width: calc(100% / 3);
- height: 100%;
- display: flex;
- align-items: center;
- justify-content: center;
- text{
- font-family: PingFangSC, PingFang SC;
- font-weight: 400;
- font-size: 28rpx;
- color: #4E5969;
- line-height: 40rpx;
- margin-right: 12rpx;
- }
- }
- }
-
- .title{
- font-family: PingFang-SC, PingFang-SC;
- font-weight: bold;
- font-size: 32rpx;
- color: #1D2129;
- line-height: 32rpx;
- margin-top: 36rpx;
- padding-left: 24rpx;
- span{
- color: #198CFF;
- margin: 0 10rpx;
- }
- }
-
- .boxs{
- width: 100%;
- padding: 0 24rpx;
- box-sizing: border-box;
- margin-top: 16rpx;
- overflow: hidden;
- .box{
- margin-top: 20rpx;
- background: #FFFFFF;
- border-radius: 16rpx;
- padding: 36rpx 24rpx;
- .place{
- font-family: PingFang-SC, PingFang-SC;
- font-weight: bold;
- font-size: 32rpx;
- color: #1D2129;
- line-height: 36rpx;
- white-space: nowrap;
- overflow: hidden;
- text-overflow: ellipsis;
- }
- .pre{
- font-family: PingFangSC, PingFang SC;
- font-weight: 400;
- font-size: 24rpx;
- color: #86909C;
- line-height: 24rpx;
- margin-top: 26rpx;
- span{
- font-family: PingFangSC, PingFang SC;
- font-weight: 400;
- font-size: 26rpx;
- color: #1D2129;
- line-height: 26rpx;
- margin-left: 20rpx;
- }
- }
- }
- }
- }
- </style>
|