|
@@ -5,8 +5,14 @@
|
|
|
操作日志
|
|
|
</view>
|
|
|
</u-navbar>
|
|
|
-
|
|
|
- <view class="tabs-box" v-if="!popShow" >
|
|
|
+ <view class="head-head">
|
|
|
+ <u-search placeholder="请输入关键字" :show-action="false" v-model="keyword"></u-search>
|
|
|
+
|
|
|
+ </view>
|
|
|
+ <view class="head-head-placeholder ">
|
|
|
+
|
|
|
+ </view>
|
|
|
+ <view class="tabs-box" v-if="!popShow&&false" >
|
|
|
<view class="tabs1" v-show="tenantList.length>1" :style="{width: tenantList.length>4 ? '' : '100%'}" >
|
|
|
<u-tabs :list="tenantList1" inactive-color="#777777" active-color="#333333 "
|
|
|
bg-color="#fff" :is-scroll="false" :current="current" @change="change"></u-tabs>
|
|
@@ -58,7 +64,10 @@
|
|
|
|
|
|
<view class="main">
|
|
|
<view class="switch"
|
|
|
- v-for="(item,i) in remoteReadingMeterList"
|
|
|
+ v-for="(item,i) in meterList"
|
|
|
+ v-if="item.type!=6"
|
|
|
+ v-show="(keyword==''||(item.name&&item.name.indexOf(keyword)!=-1))"
|
|
|
+
|
|
|
@click="item.type!=6&&item.allowSwitch?gotoUrl('/pages/tenantList/switchDetail?id='+item.id):''"
|
|
|
:key="i" >
|
|
|
<view class="switch-name">
|
|
@@ -98,20 +107,21 @@
|
|
|
|
|
|
|
|
|
</view>
|
|
|
- <u-divider :isnone="remoteReadingMeterList.length==0" nonetext="无记录"
|
|
|
+ <u-divider :isnone="meterList.length==0" nonetext="无记录"
|
|
|
border-color="#CFD2D5">已经到底了</u-divider>
|
|
|
</view>
|
|
|
</template>
|
|
|
|
|
|
<script>
|
|
|
import * as API from '@/apis/pagejs/tenantList.js'
|
|
|
+ import * as API_meterTimer from '@/apis/pagejs/meterTimer.js'
|
|
|
|
|
|
export default {
|
|
|
data() {
|
|
|
return {
|
|
|
formData:{},
|
|
|
popShow:false,
|
|
|
-
|
|
|
+ meterList:[],
|
|
|
tenantList:[],
|
|
|
tenantList1:[],
|
|
|
remoteReadingMeterList:[],
|
|
@@ -156,9 +166,40 @@
|
|
|
this.codes =this.carhelp.getPersonInfo().codes;
|
|
|
this.role=this.codes&&this.codes.indexOf('switch')!=-1;
|
|
|
|
|
|
- this.getTenantList()
|
|
|
+ //this.getTenantList()
|
|
|
+ this.getHaveMeterList()
|
|
|
},
|
|
|
- methods: {
|
|
|
+ methods: {
|
|
|
+ getHaveMeterList(){
|
|
|
+
|
|
|
+
|
|
|
+ var data = {
|
|
|
+
|
|
|
+ queryForm:"property",
|
|
|
+
|
|
|
+ };
|
|
|
+ API_meterTimer.haveMeterList(data).then((response) => {
|
|
|
+
|
|
|
+ //var MeterList=response.data.switchRecordList.data
|
|
|
+ var meterList = response.data.remoteReadingMeterList;
|
|
|
+ meterList=meterList.sort((item1,item2)=>{
|
|
|
+ if(item1.sortNo==item2.sortNo){
|
|
|
+ return item1.level>item2.level?1:-1
|
|
|
+ }
|
|
|
+ return item1.sortNo>item2.sortNo?1:-1
|
|
|
+
|
|
|
+ })
|
|
|
+ this.meterList=meterList
|
|
|
+ //this.recordsTotal = response.data.switchRecordList.recordsTotal;
|
|
|
+
|
|
|
+
|
|
|
+ }).catch(error => {
|
|
|
+ uni.showToast({
|
|
|
+ title: error,
|
|
|
+ icon: "none"
|
|
|
+ })
|
|
|
+ })
|
|
|
+ },
|
|
|
switchBtnApiMethod(node,key){
|
|
|
uni.showLoading({
|
|
|
title: "加载中",
|
|
@@ -289,8 +330,8 @@
|
|
|
|
|
|
<style lang="scss" scoped>
|
|
|
page{
|
|
|
- background: url('@/assets/img/controlCover.png') center fixed ;
|
|
|
- background-size:cover;
|
|
|
+ //background: url('@/assets/img/controlCover.png') center fixed ;
|
|
|
+ //background-size:cover;
|
|
|
}
|
|
|
|
|
|
.u-nav-slot {
|
|
@@ -318,13 +359,13 @@
|
|
|
.switch{
|
|
|
width: 100%;
|
|
|
background-color: #fff;
|
|
|
- border-radius: 12px;
|
|
|
+ border-radius: 4px;
|
|
|
padding: 24rpx 24rpx;
|
|
|
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
justify-content: space-between;
|
|
|
- margin: 24rpx 0;
|
|
|
+ margin: 18rpx 0;
|
|
|
}
|
|
|
.switch-name{
|
|
|
margin-right: 2px;
|