|
@@ -61,7 +61,12 @@
|
|
v-for="(item, index) in functionList"
|
|
v-for="(item, index) in functionList"
|
|
:key="index"
|
|
:key="index"
|
|
:style="{ display: !item.role.includes(role) ? 'none' : '' }"
|
|
:style="{ display: !item.role.includes(role) ? 'none' : '' }"
|
|
- @click="toPath(item.path, item.activeTab)"
|
|
|
|
|
|
+ @click="
|
|
|
|
+ toPath(
|
|
|
|
+ role == 'Tenant' ? item.path : '/bill/detail',
|
|
|
|
+ item.activeTab
|
|
|
|
+ )
|
|
|
|
+ "
|
|
>
|
|
>
|
|
<template v-if="item.role.includes(role)">
|
|
<template v-if="item.role.includes(role)">
|
|
<van-image :src="item.src" width="36" height="36" fit="contain" />
|
|
<van-image :src="item.src" width="36" height="36" fit="contain" />
|
|
@@ -100,7 +105,7 @@
|
|
v-for="(item, index) in reviewList"
|
|
v-for="(item, index) in reviewList"
|
|
:key="item + '_' + index"
|
|
:key="item + '_' + index"
|
|
>
|
|
>
|
|
- <van-col>{{ item.label }}</van-col>
|
|
|
|
|
|
+ <van-col>{{ item.dictLabel }}</van-col>
|
|
<v-count-up
|
|
<v-count-up
|
|
:end-val="Number(item['count'])"
|
|
:end-val="Number(item['count'])"
|
|
class="count_up"
|
|
class="count_up"
|
|
@@ -377,16 +382,15 @@ export default {
|
|
activeTab: "record",
|
|
activeTab: "record",
|
|
},
|
|
},
|
|
],
|
|
],
|
|
- reviewList: [],
|
|
|
|
workList: [
|
|
workList: [
|
|
{
|
|
{
|
|
label: "待指派",
|
|
label: "待指派",
|
|
- count: 3,
|
|
|
|
|
|
+ count: 0,
|
|
role: ["admin"],
|
|
role: ["admin"],
|
|
},
|
|
},
|
|
{
|
|
{
|
|
label: "待维修",
|
|
label: "待维修",
|
|
- count: 2,
|
|
|
|
|
|
+ count: 0,
|
|
role: ["admin", "Maintenance", "Tenant"],
|
|
role: ["admin", "Maintenance", "Tenant"],
|
|
},
|
|
},
|
|
{
|
|
{
|
|
@@ -395,17 +399,19 @@ export default {
|
|
role: ["admin", "Maintenance", "Tenant"],
|
|
role: ["admin", "Maintenance", "Tenant"],
|
|
},
|
|
},
|
|
],
|
|
],
|
|
|
|
+ reviewList: [],
|
|
deviceAlarmList: [],
|
|
deviceAlarmList: [],
|
|
payTypeList: [],
|
|
payTypeList: [],
|
|
billPaymentList: [],
|
|
billPaymentList: [],
|
|
loading: true,
|
|
loading: true,
|
|
};
|
|
};
|
|
},
|
|
},
|
|
- created() {
|
|
|
|
|
|
+ async mounted() {
|
|
this.role = localStorage.getItem("role");
|
|
this.role = localStorage.getItem("role");
|
|
|
|
+ await this.getPayTypeList();
|
|
|
|
+ await this.getDeviceAlarmList();
|
|
|
|
+ await this.getReviewList();
|
|
this.getHomeData();
|
|
this.getHomeData();
|
|
- this.getPayTypeList();
|
|
|
|
- this.getDeviceAlarmList();
|
|
|
|
if (this.role == "Tenant") {
|
|
if (this.role == "Tenant") {
|
|
this.tenantInfo = JSON.parse(localStorage.getItem("tenantInfo"));
|
|
this.tenantInfo = JSON.parse(localStorage.getItem("tenantInfo"));
|
|
} else {
|
|
} else {
|
|
@@ -419,6 +425,9 @@ export default {
|
|
getDeviceAlarmList() {
|
|
getDeviceAlarmList() {
|
|
this.deviceAlarmList = getDictDataList("DeviceAlarm");
|
|
this.deviceAlarmList = getDictDataList("DeviceAlarm");
|
|
},
|
|
},
|
|
|
|
+ getReviewList() {
|
|
|
|
+ this.reviewList = getDictDataList("Review");
|
|
|
|
+ },
|
|
dict_filter(val, list) {
|
|
dict_filter(val, list) {
|
|
if (isEmpty(val)) {
|
|
if (isEmpty(val)) {
|
|
return {};
|
|
return {};
|
|
@@ -475,13 +484,12 @@ export default {
|
|
},
|
|
},
|
|
toPath(path, val) {
|
|
toPath(path, val) {
|
|
let params = {};
|
|
let params = {};
|
|
- if (this.role != "admin" && val) {
|
|
|
|
|
|
+ if (this.role == "Tenant") {
|
|
params = {
|
|
params = {
|
|
tenantId: this.tenantInfo.tenantId,
|
|
tenantId: this.tenantInfo.tenantId,
|
|
tenantName: this.tenantInfo.tenantName,
|
|
tenantName: this.tenantInfo.tenantName,
|
|
activeTab: val,
|
|
activeTab: val,
|
|
};
|
|
};
|
|
- path = "/bill/detail";
|
|
|
|
}
|
|
}
|
|
this.$router.push({
|
|
this.$router.push({
|
|
path: path,
|
|
path: path,
|