|
@@ -4,97 +4,142 @@
|
|
|
<div class="top" @tap="placeShow = true;">
|
|
|
<div class="left">
|
|
|
<image :src="imgBase+'inspection/record_location.png'"></image>
|
|
|
- <text>{{'电商园四期B座'}}</text>
|
|
|
+ <text>{{location}}</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;">
|
|
|
+ <!-- <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> -->
|
|
|
<div class="pre" @tap="typeShow = true">
|
|
|
- <text>巡检类型</text>
|
|
|
+ <text>{{xjType}}</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>
|
|
|
+ <text>{{xjPerson}}</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="title">共有<span>{{total}}</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 class="place">{{item.position||''}}</div>
|
|
|
+ <div class="pre">巡检类型<span>{{xjObj[item.circuitType]||''}}</span></div>
|
|
|
+ <div class="pre">巡检人员<span>{{item.circuitPerson.realName||''}}</span></div>
|
|
|
+ <div class="pre">联系电话<span>{{item.circuitPerson.mobile||''}}</span></div>
|
|
|
+ <div class="pre">巡检时间<span>{{item.circuitTime||''}}</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>
|
|
|
+ <u-picker :show="placeShow" :columns="placeColumns" keyName="orgName" @cancel="placeShow=false" @change="changeHandler" @confirm="placeConfirm" 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="巡检类型" keyName="label" @cancel="typeShow=false" @confirm="e=>paramsConfirm(e,'circuitType','xjType')"></u-picker>
|
|
|
+ <u-picker :show="userShow" :columns="userColumns" title="巡检人员" keyName="label" @cancel="userShow=false" @confirm="e=>paramsConfirm(e,'circuitPersonId','xjPerson')"></u-picker>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
+ import pageEmpty from '@/components/pageEmpty/index.vue'
|
|
|
export default {
|
|
|
+ components:{
|
|
|
+ pageEmpty
|
|
|
+ },
|
|
|
data(){
|
|
|
return {
|
|
|
+ location:'',
|
|
|
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']
|
|
|
- ],
|
|
|
+ placeColumns:[],
|
|
|
+ placeColumnData: [],
|
|
|
+ xjType:'巡检类型',
|
|
|
+ xjPerson:'巡检人员',
|
|
|
typeShow:false,
|
|
|
typeColumns:[
|
|
|
- ['全部','类型1','类型2']
|
|
|
+ [{value:'',label:'全部'}]
|
|
|
],
|
|
|
userShow:false,
|
|
|
userColumns:[
|
|
|
- ['全部','人员A','人员B']
|
|
|
+ [{value:'',label:'全部'}]
|
|
|
],
|
|
|
- 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'
|
|
|
- }
|
|
|
- ]
|
|
|
+ isOver:false,
|
|
|
+ params:{
|
|
|
+ page:1,
|
|
|
+ limit:10,
|
|
|
+ buildingId:'',
|
|
|
+ storeyId:'',
|
|
|
+ circuitType:'',
|
|
|
+ circuitPersonId:''
|
|
|
+ },
|
|
|
+ list:[],
|
|
|
+ total:0,
|
|
|
+ xjObj:{},
|
|
|
}
|
|
|
},
|
|
|
- methods:{
|
|
|
+ onReachBottom() {
|
|
|
+ if(this.isOver) return
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ async onLoad() {
|
|
|
+ await this.getXjTypeData();
|
|
|
+ this.getUserList();
|
|
|
+ this.getFloorInfo();
|
|
|
+ this.getList();
|
|
|
+ },
|
|
|
+ methods:{
|
|
|
+ async getXjTypeData(){
|
|
|
+ let res = await this.$api.get('/sys/dict/data/getListByType/ReviewType');
|
|
|
+ if(res.data.code===0){
|
|
|
+ res.data.data.forEach(d=>{
|
|
|
+ this.xjObj[d.dictValue] = d.dictLabel;
|
|
|
+ this.typeColumns[0].push({value:d.dictValue,label:d.dictLabel})
|
|
|
+ })
|
|
|
+ }else this.$showToast(res.data.msg)
|
|
|
+ },
|
|
|
+ getUserList(){
|
|
|
+ this.$api.get('/user/list',{page:1,limit:9999}).then(res=>{
|
|
|
+ if(res.data.code===0){
|
|
|
+ res.data.data.forEach(d=>{
|
|
|
+ this.userColumns[0].push({value:d.id,label:d.realName})
|
|
|
+ })
|
|
|
+ }else this.$showToast(res.data.msg)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getFloorInfo(){
|
|
|
+ this.$api.get('/control/getOrgStructureTree/').then(res=>{
|
|
|
+ if(res.data.code===0){
|
|
|
+ this.location = res.data.data[0].orgName;
|
|
|
+ this.placeColumns = [
|
|
|
+ res.data.data[0].childrenList,
|
|
|
+ res.data.data[0].childrenList[0].childrenList
|
|
|
+ ]
|
|
|
+ let allfloor = [];
|
|
|
+ for (let i = 0; i < res.data.data[0].childrenList.length; i++) {
|
|
|
+ allfloor.push(res.data.data[0].childrenList[i].childrenList)
|
|
|
+ }
|
|
|
+ this.placeColumnData = allfloor;
|
|
|
+ }else this.$showToast(res.data.msg)
|
|
|
+ })
|
|
|
+ },
|
|
|
+ getList(){
|
|
|
+ this.$api.get('/circuitrecord/page',this.params).then(res=>{
|
|
|
+ if(res.data.code===0){
|
|
|
+ this.total = res.data.data.total;
|
|
|
+ if(this.list.length<res.data.data.total){
|
|
|
+ this.params.page++;
|
|
|
+ this.list = [...this.list,...res.data.data.list];
|
|
|
+ }else this.isOver = true
|
|
|
+ }else this.$showModal(res.data.msg)
|
|
|
+ });
|
|
|
+ },
|
|
|
changeHandler(e) {
|
|
|
const {
|
|
|
columnIndex,
|
|
@@ -110,8 +155,23 @@
|
|
|
picker.setColumnValues(1, this.placeColumnData[index])
|
|
|
}
|
|
|
},
|
|
|
- paramsConfirm(e,type){
|
|
|
+ placeConfirm(e){
|
|
|
+ this.params.buildingId = e.value[0].orgId;
|
|
|
+ this.params.storeyId = e.value[1].orgId;
|
|
|
+ this.placeShow = false;
|
|
|
+ this.init()
|
|
|
+ },
|
|
|
+ paramsConfirm(e,type,key){
|
|
|
this.placeShow = this.timeShow= this.typeShow = this.userShow = false;
|
|
|
+ this.params[type] = e.value[0].value;
|
|
|
+ this[key] = e.value[0].label;
|
|
|
+ this.init();
|
|
|
+ },
|
|
|
+ init(){
|
|
|
+ this.params.page = 1;
|
|
|
+ this.isOver = false;
|
|
|
+ this.list = [];
|
|
|
+ this.getList();
|
|
|
}
|
|
|
}
|
|
|
}
|
|
@@ -154,7 +214,7 @@
|
|
|
background: #FFFFFF;
|
|
|
display: flex;
|
|
|
.pre{
|
|
|
- width: calc(100% / 3);
|
|
|
+ width: calc(100% / 2);
|
|
|
height: 100%;
|
|
|
display: flex;
|
|
|
align-items: center;
|