|
@@ -5,81 +5,74 @@
|
|
操作日志
|
|
操作日志
|
|
</view>
|
|
</view>
|
|
</u-navbar>
|
|
</u-navbar>
|
|
- <view class="head-head">
|
|
|
|
- <u-search placeholder="请输入关键字" :show-action="false" v-model="keyword"></u-search>
|
|
|
|
|
|
+ <!-- 标签 -->
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ <view class="head-head">
|
|
|
|
+ <view class="tabs-box" >
|
|
|
|
+
|
|
|
|
+ <view class="tabs" :class="'tabs-len-'+merchantList1.length" v-show="companyList.length>1"
|
|
|
|
+ :style="{width: companyList.length>3 ? '' : '100%'}">
|
|
|
|
+ <u-tabs-one v-if="utabsone"
|
|
|
|
+ :list="merchantList1" :is-scroll="false" inactive-color="#999999" active-color="#666666"
|
|
|
|
+ :current="current" @change="change"></u-tabs-one>
|
|
|
|
+ </view>
|
|
|
|
+ <view class="more" @click="popShow=true" v-if="companyList.length >= 4">
|
|
|
|
+ <u-icon name="arrow-down" color="#fff" size="40"></u-icon>
|
|
|
|
+ </view>
|
|
|
|
+ </view>
|
|
|
|
+ <u-search style="padding:24rpx 24rpx 0 24rpx ;" placeholder="请输入关键字" :show-action="false" v-model="keyword"></u-search>
|
|
|
|
|
|
</view>
|
|
</view>
|
|
- <view class="head-head-placeholder ">
|
|
|
|
|
|
+ <view class="head-head-placeholder " :class="{
|
|
|
|
+ 'head-head-placeholder2':companyList.length>1
|
|
|
|
+ }">
|
|
|
|
|
|
</view>
|
|
</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>
|
|
|
|
- </view>
|
|
|
|
- <view class="icon" @click="popShow=true" v-if="tenantList.length >= 4" >
|
|
|
|
- <u-icon name="arrow-down" color="#777777" size="28"></u-icon>
|
|
|
|
- </view>
|
|
|
|
- </view>
|
|
|
|
|
|
+
|
|
<!-- 标签弹出层 -->
|
|
<!-- 标签弹出层 -->
|
|
- <u-popup v-model="popShow" length="80%" @close="keyword=''" duration="10" mode="top" :negative-top="188" border-radius="32">
|
|
|
|
- <u-navbar title="远程控制" title-color="#101010" >
|
|
|
|
- <view class="u-nav-slot" slot="right" v-if="0" >
|
|
|
|
- 操作日志
|
|
|
|
- </view>
|
|
|
|
- </u-navbar>
|
|
|
|
- <view class="head-head">
|
|
|
|
- <u-search placeholder="请输入关键字" :show-action="false" v-model="keyword"></u-search>
|
|
|
|
-
|
|
|
|
- </view>
|
|
|
|
- <view class="head-head-placeholder ">
|
|
|
|
-
|
|
|
|
- </view>
|
|
|
|
-
|
|
|
|
- <view class="popup-tabs" v-if="false">
|
|
|
|
- <view class="tabs1">
|
|
|
|
- <!-- <u-tabs :list="tenantList1" inactive-color="#777777" active-color="#333333 "
|
|
|
|
- bg-color="#fff" :is-scroll="false" :current="current" @change="change"></u-tabs> -->
|
|
|
|
- <u-tabs :list="tenantList1" :is-scroll="false" :current="current" @change="change"></u-tabs >
|
|
|
|
|
|
+ <u-popup v-model="popShow" duration="10" mode="top" :negative-top="88" border-radius="16">
|
|
|
|
+ <view class="popup-tabs">
|
|
|
|
+ <view class="tabs">
|
|
|
|
+ <u-tabs :list="merchantList1" :is-scroll="false" :current="current" @change="change"></u-tabs>
|
|
</view>
|
|
</view>
|
|
<view class="more">
|
|
<view class="more">
|
|
<u-icon name="arrow-up" color="#777777" size="40" @click="popShow=false"></u-icon>
|
|
<u-icon name="arrow-up" color="#777777" size="40" @click="popShow=false"></u-icon>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="tabs-options">
|
|
<view class="tabs-options">
|
|
- <view class="item" v-for="(item, index) in tenantList"
|
|
|
|
- v-show="keyword==''||(item.name&&item.name.indexOf(keyword)!=-1)"
|
|
|
|
-
|
|
|
|
- :class="{
|
|
|
|
- 'item-index' : item.id==formData.tenantId
|
|
|
|
- }"
|
|
|
|
- :key="index"
|
|
|
|
|
|
+ <view class="item" v-for="(item, index) in merchantList2" :key="index"
|
|
@click="merchantChange(item,index)">
|
|
@click="merchantChange(item,index)">
|
|
{{item.name}}
|
|
{{item.name}}
|
|
</view>
|
|
</view>
|
|
- <u-divider nonetext="没有找到相关内容"
|
|
|
|
- border-color="#CFD2D5">已经到底了</u-divider>
|
|
|
|
</view>
|
|
</view>
|
|
</u-popup>
|
|
</u-popup>
|
|
|
|
|
|
<view class="main">
|
|
<view class="main">
|
|
<view class="switch"
|
|
<view class="switch"
|
|
v-for="(item,i) in meterList"
|
|
v-for="(item,i) in meterList"
|
|
- v-if="item.type!=6"
|
|
|
|
|
|
+
|
|
v-show="(keyword==''||(item.name&&item.name.indexOf(keyword)!=-1))"
|
|
v-show="(keyword==''||(item.name&&item.name.indexOf(keyword)!=-1))"
|
|
|
|
|
|
- @click="item.type!=6&&item.allowSwitch?gotoUrl('/pages/tenantList/switchDetail?id='+item.id):''"
|
|
|
|
|
|
+ @click="item.allowSwitch?gotoUrl('/pages/tenantList/switchDetail?id='+item.id):''"
|
|
:key="i" >
|
|
:key="i" >
|
|
<view class="switch-name">
|
|
<view class="switch-name">
|
|
<view class="name">
|
|
<view class="name">
|
|
- {{item.name}}
|
|
|
|
|
|
+ <span class="spanClass " :style="{
|
|
|
|
+ borderColor:colorList[item.type%7],
|
|
|
|
+ background:colorList[item.type%7],
|
|
|
|
+ fontSize: '24rpx',
|
|
|
|
+ margin:'2rpx 8rpx 2rpx 0',
|
|
|
|
+ color:'#fff',
|
|
|
|
+ }" >{{item.typeN}}</span>
|
|
|
|
+ <span class="name2">{{item.name}}</span>
|
|
</view>
|
|
</view>
|
|
<view class="place">
|
|
<view class="place">
|
|
{{item.installationAddressSimple}}
|
|
{{item.installationAddressSimple}}
|
|
</view>
|
|
</view>
|
|
</view>
|
|
</view>
|
|
<view class="switch-icon">
|
|
<view class="switch-icon">
|
|
- <view class="icon icon2" v-if="role&&item.type!=6&&item.allowSwitch" >
|
|
|
|
|
|
+ <view class="icon icon2" v-if="role&&item.allowSwitch" >
|
|
<img src="@/assets/img/switchIcon.png"
|
|
<img src="@/assets/img/switchIcon.png"
|
|
@tap.stop="switchBtnApi(item,0)" class="img"
|
|
@tap.stop="switchBtnApi(item,0)" class="img"
|
|
v-if="item.switchStatus" alt="" ></img >
|
|
v-if="item.switchStatus" alt="" ></img >
|
|
@@ -89,16 +82,14 @@
|
|
|
|
|
|
</view>
|
|
</view>
|
|
<view v-else style=" display: flex; flex-direction: column;">
|
|
<view v-else style=" display: flex; flex-direction: column;">
|
|
- <template v-if="item.type!=6">
|
|
|
|
- <span class="spanClass span1" v-if="item.switchStatus">开启</span>
|
|
|
|
|
|
+ <template >
|
|
|
|
+ <!-- <span class="spanClass span1" v-if="item.switchStatus">开启</span>
|
|
<span class="spanClass span2" v-else>关闭</span>
|
|
<span class="spanClass span2" v-else>关闭</span>
|
|
-
|
|
|
|
|
|
+ -->
|
|
<span class="spanClass span1" v-if="item.online">在线</span>
|
|
<span class="spanClass span1" v-if="item.online">在线</span>
|
|
<span class="spanClass span2" v-else>离线</span>
|
|
<span class="spanClass span2" v-else>离线</span>
|
|
</template>
|
|
</template>
|
|
- <template v-else>
|
|
|
|
- <span class="spanClass span1" >虚拟</span>
|
|
|
|
- </template>
|
|
|
|
|
|
+
|
|
</view>
|
|
</view>
|
|
<!-- <image class="img" src="@/assets/img/switch-open.png" ></image -->
|
|
<!-- <image class="img" src="@/assets/img/switch-open.png" ></image -->
|
|
</view>
|
|
</view>
|
|
@@ -115,7 +106,7 @@
|
|
<script>
|
|
<script>
|
|
import * as API from '@/apis/pagejs/tenantList.js'
|
|
import * as API from '@/apis/pagejs/tenantList.js'
|
|
import * as API_meterTimer from '@/apis/pagejs/meterTimer.js'
|
|
import * as API_meterTimer from '@/apis/pagejs/meterTimer.js'
|
|
-
|
|
|
|
|
|
+ import * as API_energyManage from '@/apis/pagejs/energyManage.js'
|
|
export default {
|
|
export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
@@ -154,12 +145,19 @@
|
|
name: '九楼',
|
|
name: '九楼',
|
|
|
|
|
|
}],
|
|
}],
|
|
|
|
+ merchantList1: [], // 商户
|
|
|
|
+ merchantList2: [],
|
|
|
|
+ companyList: [],
|
|
current:0,
|
|
current:0,
|
|
current1: 0,
|
|
current1: 0,
|
|
current2: 0,
|
|
current2: 0,
|
|
role:false,
|
|
role:false,
|
|
codes:"",
|
|
codes:"",
|
|
|
|
+ companyId:"",
|
|
|
|
+ utabsone:true,
|
|
keyword:'',
|
|
keyword:'',
|
|
|
|
+ colorList:['',"#52b8aa","#53b56b","#ef8132",
|
|
|
|
+ "#307af6","#5cb657","#777777"],
|
|
}
|
|
}
|
|
},
|
|
},
|
|
onReady() {
|
|
onReady() {
|
|
@@ -168,13 +166,15 @@
|
|
|
|
|
|
//this.getTenantList()
|
|
//this.getTenantList()
|
|
this.getHaveMeterList()
|
|
this.getHaveMeterList()
|
|
|
|
+ this.getCompanyInfoList();
|
|
},
|
|
},
|
|
- methods: {
|
|
|
|
|
|
+ methods: {
|
|
|
|
+
|
|
getHaveMeterList(){
|
|
getHaveMeterList(){
|
|
|
|
|
|
|
|
|
|
var data = {
|
|
var data = {
|
|
-
|
|
|
|
|
|
+ companyId:this.companyId,
|
|
queryForm:"property",
|
|
queryForm:"property",
|
|
|
|
|
|
};
|
|
};
|
|
@@ -253,22 +253,28 @@
|
|
change(index) {
|
|
change(index) {
|
|
|
|
|
|
this.current = index;
|
|
this.current = index;
|
|
- this.formData.tenantId = this.tenantList1[index].id;
|
|
|
|
|
|
+ this.companyId = this.merchantList1[index].id;
|
|
|
|
+ // this.companyIdSet(this.companyId)
|
|
this.popShow = false;
|
|
this.popShow = false;
|
|
this.merchantChangeApi()
|
|
this.merchantChangeApi()
|
|
},
|
|
},
|
|
merchantChange(item, index) {
|
|
merchantChange(item, index) {
|
|
- // if(this.current==0){
|
|
|
|
- // this.current=1;
|
|
|
|
- // }
|
|
|
|
- this.formData.tenantId= item.id;
|
|
|
|
-
|
|
|
|
-
|
|
|
|
- //this.$forceUpdate()
|
|
|
|
-
|
|
|
|
- this.getTenantListSort(this.tenantList)
|
|
|
|
- this.merchantChangeApi()
|
|
|
|
|
|
+ if(this.current==0){
|
|
|
|
+ this.current=1;
|
|
|
|
+ }
|
|
|
|
+ this.utabsone=false
|
|
|
|
+ var m = item;
|
|
|
|
+ var n = this.merchantList1[this.current];
|
|
|
|
+ this.merchantList1[this.current] = m;
|
|
|
|
+ this.merchantList2[index] = n;
|
|
|
|
+ this.companyId = item.id;
|
|
|
|
+
|
|
this.popShow = false;
|
|
this.popShow = false;
|
|
|
|
+ this.$nextTick(()=>{
|
|
|
|
+ this.utabsone=true
|
|
|
|
+ })
|
|
|
|
+ //this.getList(true);
|
|
|
|
+ this.merchantChangeApi()
|
|
},
|
|
},
|
|
|
|
|
|
getTenantList(){
|
|
getTenantList(){
|
|
@@ -315,8 +321,51 @@
|
|
}
|
|
}
|
|
this.tenantList1 = mList1;
|
|
this.tenantList1 = mList1;
|
|
},
|
|
},
|
|
|
|
+ getCompanyInfoList() {
|
|
|
|
+ // uni.showLoading({
|
|
|
|
+ // title: "加载中",
|
|
|
|
+ // mask: true,
|
|
|
|
+ // })
|
|
|
|
+ API_energyManage.deviceCompanyList().then((response) => {
|
|
|
|
+ //uni.hideLoading();
|
|
|
|
+ var list = response.data.companyInfoList;
|
|
|
|
+
|
|
|
|
+ var mList1 = [];
|
|
|
|
+ var mList2 = [];
|
|
|
|
+
|
|
|
|
+ mList1.push({
|
|
|
|
+ id: '',
|
|
|
|
+ name: '全部'
|
|
|
|
+ });
|
|
|
|
+ for (var i = 0; i < list.length; i++) {
|
|
|
|
+ if (i >= 3) {
|
|
|
|
+ mList2.push(list[i]);
|
|
|
|
+ } else {
|
|
|
|
+ mList1.push(list[i]);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ this.companyList = list;
|
|
|
|
+ // if(list.length==1){
|
|
|
|
+ // this.companyId=list[0].id
|
|
|
|
+ // this.companyIdSet(this.companyId)
|
|
|
|
+
|
|
|
|
+ // }else{
|
|
|
|
+ // this.getHomePageKwh('')
|
|
|
|
+ // }
|
|
|
|
+ this.merchantList1 = mList1;
|
|
|
|
+ this.merchantList2 = mList2;
|
|
|
|
+ //this.merchantChangeApi()
|
|
|
|
+ }).catch(error => {
|
|
|
|
+ uni.showToast({
|
|
|
|
+ title: error,
|
|
|
|
+ icon: "none"
|
|
|
|
+ })
|
|
|
|
+ })
|
|
|
|
+ },
|
|
merchantChangeApi(){
|
|
merchantChangeApi(){
|
|
- this.getTenantMeterList()
|
|
|
|
|
|
+ // this.getTenantMeterList()
|
|
|
|
+ this.getHaveMeterList()
|
|
},
|
|
},
|
|
change1(index) {
|
|
change1(index) {
|
|
this.current1 = index;
|
|
this.current1 = index;
|
|
@@ -338,18 +387,7 @@
|
|
margin-right: 32rpx;
|
|
margin-right: 32rpx;
|
|
}
|
|
}
|
|
// 标签
|
|
// 标签
|
|
- .tabs-box{
|
|
|
|
- display: flex;
|
|
|
|
- align-items: center;
|
|
|
|
- justify-content: space-between;
|
|
|
|
- padding: 16rpx 32rpx 16rpx 0;
|
|
|
|
- .tabs{
|
|
|
|
- width: 96%;
|
|
|
|
- }
|
|
|
|
- /deep/.u-tabs{
|
|
|
|
- background-color: inherit !important
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
.main{
|
|
.main{
|
|
padding: 0 32rpx;
|
|
padding: 0 32rpx;
|
|
display: flex;
|
|
display: flex;
|
|
@@ -369,12 +407,25 @@
|
|
}
|
|
}
|
|
.switch-name{
|
|
.switch-name{
|
|
margin-right: 2px;
|
|
margin-right: 2px;
|
|
|
|
+ width: 85%;
|
|
.name{
|
|
.name{
|
|
|
|
+
|
|
color: rgba(51,51,51,1);
|
|
color: rgba(51,51,51,1);
|
|
font-size: 32rpx;
|
|
font-size: 32rpx;
|
|
|
|
+
|
|
font-weight: bold;
|
|
font-weight: bold;
|
|
|
|
+
|
|
|
|
+ display: flex;
|
|
|
|
+ align-items: center;
|
|
|
|
+ }
|
|
|
|
+ .name2{
|
|
|
|
+ overflow: hidden;
|
|
|
|
+ white-space: nowrap;
|
|
|
|
+ text-overflow: ellipsis;
|
|
|
|
+ width: 552rpx;
|
|
}
|
|
}
|
|
.place{
|
|
.place{
|
|
|
|
+ margin-top: 12rpx;
|
|
color: rgba(119,119,119,1);
|
|
color: rgba(119,119,119,1);
|
|
font-size: 24rpx;
|
|
font-size: 24rpx;
|
|
}
|
|
}
|
|
@@ -388,26 +439,7 @@
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
- // 标签
|
|
|
|
- .tabs-box{
|
|
|
|
- display: flex;
|
|
|
|
- align-items: center;
|
|
|
|
- justify-content: space-between;
|
|
|
|
- padding: 16rpx 32rpx 16rpx 0;
|
|
|
|
- .tabs{
|
|
|
|
- width: 96%;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- .tabs-box{
|
|
|
|
- background-color: #fff;
|
|
|
|
- display: flex;
|
|
|
|
- align-items: center;
|
|
|
|
- justify-content: space-between;
|
|
|
|
- padding: 16rpx 32rpx 16rpx 32rpx;
|
|
|
|
- .tabs1{
|
|
|
|
- width: 96%;
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
.popup-tabs {
|
|
.popup-tabs {
|
|
@@ -462,7 +494,7 @@
|
|
.head-head{
|
|
.head-head{
|
|
box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.15);
|
|
box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.15);
|
|
background: #fff;
|
|
background: #fff;
|
|
- padding:24rpx;
|
|
|
|
|
|
+ padding:24rpx 0;
|
|
position: fixed;
|
|
position: fixed;
|
|
left: 0;
|
|
left: 0;
|
|
right: 0;
|
|
right: 0;
|
|
@@ -473,4 +505,59 @@
|
|
height: 112rpx;
|
|
height: 112rpx;
|
|
|
|
|
|
}
|
|
}
|
|
|
|
+ .head-head-placeholder2{
|
|
|
|
+ height: 212rpx;
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ // 标签
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ .tabs-box {
|
|
|
|
+ background-color: #fff;
|
|
|
|
+ display: flex;
|
|
|
|
+ align-items: center;
|
|
|
|
+
|
|
|
|
+ padding-right: 32rpx;
|
|
|
|
+ justify-content: space-between;
|
|
|
|
+ border-bottom: 1px solid rgba(232, 232, 232, 1);
|
|
|
|
+
|
|
|
|
+ .tabs {
|
|
|
|
+ width: 97%;
|
|
|
|
+ }
|
|
|
|
+ .more{
|
|
|
|
+ padding-right: 12rpx;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ .icon {
|
|
|
|
+ margin-left: auto;
|
|
|
|
+ margin-right: 24rpx;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ .tabs-len-1{
|
|
|
|
+
|
|
|
|
+ }
|
|
|
|
+ .tabs-len-2{
|
|
|
|
+ /deep/.u-tab-item {
|
|
|
|
+ // max-width: 39% !important;
|
|
|
|
+ // flex: none !important;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ .tabs-len-3{
|
|
|
|
+ /deep/.u-tab-item {
|
|
|
|
+ max-width: 39% !important;
|
|
|
|
+ flex: none !important;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ .tabs-len-4{
|
|
|
|
+ /deep/.u-tab-item {
|
|
|
|
+ max-width: 26% !important;
|
|
|
|
+ flex: none !important;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ /deep/.u-tab-item:first-child {
|
|
|
|
+ width: 20% !important;
|
|
|
|
+ flex: none !important;
|
|
|
|
+ }
|
|
</style>
|
|
</style>
|