|
@@ -3,22 +3,10 @@
|
|
|
<view class="navbox">
|
|
|
<uni-nav-bar color="#ffffff" leftWidth='520rpx' :background-color="backgroundColor" :border="false" statusBar='true' fixed="true">
|
|
|
<block slot="left">
|
|
|
- <view class="flexc">
|
|
|
<view class="topl flexc">
|
|
|
<image :src="adrimg" ></image>
|
|
|
<view class="over">{{city}}</view>
|
|
|
</view>
|
|
|
- <view style="flex: 0 1 auto;overflow: hidden;">
|
|
|
- <!-- <picker range-key='dictLabel' :value="voindex" :range="xxList" @change='bindDateChangeb'>
|
|
|
- <view class="pay_btn flexcc" >
|
|
|
- <view class="tit over">
|
|
|
- {{companyName||"请选择物业"}}</view>
|
|
|
- <image :src="aupimg" class="rimgs"></image>
|
|
|
- </view>
|
|
|
- </picker> -->
|
|
|
-
|
|
|
- </view>
|
|
|
- </view>
|
|
|
</block>
|
|
|
</uni-nav-bar>
|
|
|
</view>
|
|
@@ -29,14 +17,16 @@
|
|
|
<view class="flexc mb14">
|
|
|
<image :src="adraimg" class="adr"></image>
|
|
|
<view class="adrtit flex0">智慧<text>社区</text></view>
|
|
|
- <view style="height: 100rpx;">
|
|
|
+ <view>
|
|
|
<w-select
|
|
|
style="margin-left: 20rpx;"
|
|
|
v-model="chooseValue"
|
|
|
:list='voList'
|
|
|
+ width='200rpx'
|
|
|
valueName='dictLabel'
|
|
|
keyName="dictValue"
|
|
|
- :chosevalue="tenantId"
|
|
|
+ :valuea="tenantId"
|
|
|
+ :chosevalue="tenantName?tenantName:statusFormats(tenantId,voList,'tenant')"
|
|
|
:filterable='filterable'
|
|
|
@change='getchange'
|
|
|
>
|
|
@@ -248,11 +238,14 @@ import notice from '@/components/swiper/notice.vue'
|
|
|
import popUp from "@/components/box/popup.vue"
|
|
|
import {getUserProfile} from "@/api/system/user.js"
|
|
|
import {repairList} from "@/api/work/service.js"
|
|
|
-import {gettenantList,gettenantCheck} from "@/api/login.js"
|
|
|
+import {gettenantUserName,gettenantCheck} from "@/api/login.js"
|
|
|
import self from '@/utils/location.js';
|
|
|
import wSelect from "@/people/components/w-select/w-select.vue"
|
|
|
import { checkPermi, checkRole } from "@/utils/permission"; // 权限判断函数
|
|
|
import {getCount,getCountTips} from "@/api/work/index.js"
|
|
|
+import {selectValueKey} from "@/utils/common.js"
|
|
|
+import config from '@/config'
|
|
|
+const Clientid = config.Clientid
|
|
|
export default {
|
|
|
components:{footers,notice,popUp,wSelect},
|
|
|
data(){
|
|
@@ -319,6 +312,7 @@ import {getCount,getCountTips} from "@/api/work/index.js"
|
|
|
},
|
|
|
onShow() {
|
|
|
this.initFace=this.$store.state.user.initFace;
|
|
|
+ // this.tenantId=this.$store.state.user.tenantId;
|
|
|
},
|
|
|
onLoad: function() {
|
|
|
var that=this;
|
|
@@ -328,15 +322,15 @@ import {getCount,getCountTips} from "@/api/work/index.js"
|
|
|
}
|
|
|
})
|
|
|
this.gettenantList()
|
|
|
- if(checkPermi(['wuYe:statistics:num:app'])){
|
|
|
- this.getCount()
|
|
|
- }
|
|
|
- if(checkPermi(['wuYe:statistics:wuYeTips'])){
|
|
|
- this.getCountTips()
|
|
|
- }
|
|
|
- if(checkPermi(['wuYe:repair:list'])){
|
|
|
- this.repairList()
|
|
|
- }
|
|
|
+ // if(checkPermi(['wuYe:statistics:num:app'])){
|
|
|
+ // this.getCount()
|
|
|
+ // }
|
|
|
+ // if(checkPermi(['wuYe:statistics:wuYeTips'])){
|
|
|
+ // this.getCountTips()
|
|
|
+ // }
|
|
|
+ // if(checkPermi(['wuYe:repair:list'])){
|
|
|
+ // this.repairList()
|
|
|
+ // }
|
|
|
// #ifndef H5
|
|
|
self.getLocation(function(res){
|
|
|
if(res==-1){
|
|
@@ -349,44 +343,54 @@ import {getCount,getCountTips} from "@/api/work/index.js"
|
|
|
},
|
|
|
methods:{
|
|
|
checkPermi, checkRole,
|
|
|
+ statusFormats(data, list,type) {
|
|
|
+ var aite=selectValueKey(list, data);
|
|
|
+ if(type=='tenant'){
|
|
|
+ this.tenantName=aite.actions
|
|
|
+ }
|
|
|
+ return aite.actions;
|
|
|
+ },
|
|
|
// 获取租户列表
|
|
|
gettenantList(){
|
|
|
- gettenantList().then(res=>{
|
|
|
+ var params={
|
|
|
+ userId:this.userId
|
|
|
+ }
|
|
|
+ gettenantUserName().then(res=>{
|
|
|
if(res.code==200){
|
|
|
- if(res.data.voList&&res.data.voList.length){
|
|
|
- this.voList = res.data.voList.map(v => {
|
|
|
+ if(res.data&&res.data.length){
|
|
|
+ this.voList = res.data.map(v => {
|
|
|
return {
|
|
|
dictLabel: v.companyName,
|
|
|
dictValue: v.tenantId
|
|
|
}
|
|
|
})
|
|
|
}
|
|
|
-
|
|
|
}else{
|
|
|
this.$toast(res.msg)
|
|
|
}
|
|
|
})
|
|
|
},
|
|
|
getchange(e){
|
|
|
- var tenantId=e.dictValue;
|
|
|
- gettenantCheck(tenantId).then(res=>{
|
|
|
- this.$store.dispatch('GetInfo').then(res => {
|
|
|
-
|
|
|
- })
|
|
|
- // var data=res.data;
|
|
|
+ var id=e.dictValue;
|
|
|
+ var name=e.dictLabel;
|
|
|
+ var that=this;
|
|
|
+ this.tenantId=id;
|
|
|
+ this.tenantName=name;
|
|
|
+ var params={
|
|
|
+ tenantId:id,
|
|
|
+ clientId:Clientid,
|
|
|
+ grantType:'password'
|
|
|
+ }
|
|
|
+ gettenantCheck(params).then(res=>{
|
|
|
+ var token=res.msg;
|
|
|
// 切换token
|
|
|
- // this.$store.dispatch('checkToken', data.access_token).then(() => {
|
|
|
- // that.getClassFn('GetInfo');
|
|
|
- // // 刷新其余的页面
|
|
|
- // var newArr=[false,true,true,true,true]
|
|
|
- // that.$store.dispatch('checkRefresh', newArr).then(() => {
|
|
|
+ this.$store.dispatch('checkToken', token).then(() => {
|
|
|
+ this.$store.dispatch('GetInfo').then(res => {
|
|
|
|
|
|
- // }).catch(() => {
|
|
|
+ })
|
|
|
+ }).catch(() => {
|
|
|
|
|
|
- // })
|
|
|
- // }).catch(() => {
|
|
|
-
|
|
|
- // })
|
|
|
+ })
|
|
|
})
|
|
|
},
|
|
|
getXxwsFn(){
|
|
@@ -396,37 +400,6 @@ import {getCount,getCountTips} from "@/api/work/index.js"
|
|
|
getClose(){
|
|
|
this.initFace='N';
|
|
|
},
|
|
|
- bindDateChangeb(e){
|
|
|
- var that=this;
|
|
|
- var val=e.detail.value;
|
|
|
- var id=this.xxList[val].dictValue
|
|
|
- this.companyName=this.xxList[val].dictLabel;
|
|
|
- // if(id!=this.tenantId){
|
|
|
- this.tenantId=id;
|
|
|
- var params={
|
|
|
- tenantId:id,
|
|
|
- clientId:Clientid,
|
|
|
- grantType:'password'
|
|
|
- }
|
|
|
- gettenantCheck(params).then(res=>{
|
|
|
- var data=res.data;
|
|
|
- // 切换token
|
|
|
- this.$store.dispatch('checkToken', data.access_token).then(() => {
|
|
|
- that.getClassFn('GetInfo');
|
|
|
- // 刷新其余的页面
|
|
|
- var newArr=[false,true,true,true,true]
|
|
|
- that.$store.dispatch('checkRefresh', newArr).then(() => {
|
|
|
-
|
|
|
- }).catch(() => {
|
|
|
-
|
|
|
- })
|
|
|
- }).catch(() => {
|
|
|
-
|
|
|
- })
|
|
|
-
|
|
|
- })
|
|
|
- // }
|
|
|
- },
|
|
|
getNoticeDet(data){
|
|
|
this.$tab.navigateTo(`/service/pages/service/warrantydetail?id=`+data)
|
|
|
},
|