|
@@ -7,26 +7,43 @@
|
|
/>
|
|
/>
|
|
<div class="page_info">
|
|
<div class="page_info">
|
|
<div
|
|
<div
|
|
- class="info_bg"
|
|
|
|
- :style="{ 'margin-bottom': role == 'repair' ? 0 : '42px' }"
|
|
|
|
|
|
+ class="info_title"
|
|
|
|
+ :style="{
|
|
|
|
+ 'margin-bottom': role != 'Maintenance' ? '54px' : '12px',
|
|
|
|
+ 'padding-bottom': role != 'Maintenance' ? '58px' : '',
|
|
|
|
+ }"
|
|
>
|
|
>
|
|
<van-row align="center" class="position_pannel">
|
|
<van-row align="center" class="position_pannel">
|
|
- <van-col>
|
|
|
|
- <van-image
|
|
|
|
- :src="require('@/assets/position.svg')"
|
|
|
|
- width="16"
|
|
|
|
- height="16"
|
|
|
|
- fit="contain"
|
|
|
|
- />
|
|
|
|
- <van-col>{{ name }}</van-col>
|
|
|
|
- <van-image
|
|
|
|
- :src="require('@/assets/arrow-right.svg')"
|
|
|
|
- width="24"
|
|
|
|
- height="24"
|
|
|
|
- fit="contain"
|
|
|
|
- />
|
|
|
|
- </van-col>
|
|
|
|
- <van-col @click="toPath('/userInfo', 'account')">
|
|
|
|
|
|
+ <template v-if="role == 'Tenant'">
|
|
|
|
+ <van-row justify="center" style="flex: 1">
|
|
|
|
+ <van-col>首页</van-col>
|
|
|
|
+ </van-row>
|
|
|
|
+ </template>
|
|
|
|
+ <template v-else>
|
|
|
|
+ <van-col>
|
|
|
|
+ <van-image
|
|
|
|
+ :src="require('@/assets/position.svg')"
|
|
|
|
+ width="16"
|
|
|
|
+ height="16"
|
|
|
|
+ fit="contain"
|
|
|
|
+ />
|
|
|
|
+ <van-col>{{ name }}</van-col>
|
|
|
|
+ <van-image
|
|
|
|
+ :src="require('@/assets/arrow-right.svg')"
|
|
|
|
+ width="24"
|
|
|
|
+ height="24"
|
|
|
|
+ fit="contain"
|
|
|
|
+ />
|
|
|
|
+ </van-col>
|
|
|
|
+ </template>
|
|
|
|
+
|
|
|
|
+ <van-col
|
|
|
|
+ @click="
|
|
|
|
+ () => {
|
|
|
|
+ $router.push({ path: '/userInfo', query: { type: 'password' } });
|
|
|
|
+ }
|
|
|
|
+ "
|
|
|
|
+ >
|
|
<van-image
|
|
<van-image
|
|
:src="require('@/assets/user.svg')"
|
|
:src="require('@/assets/user.svg')"
|
|
width="16"
|
|
width="16"
|
|
@@ -37,14 +54,14 @@
|
|
</van-row>
|
|
</van-row>
|
|
</div>
|
|
</div>
|
|
<!-- 维修工没有此块功能 -->
|
|
<!-- 维修工没有此块功能 -->
|
|
- <template v-if="role && role != 'repair'">
|
|
|
|
|
|
+ <template v-if="role && role != 'Maintenance'">
|
|
<div class="info_function">
|
|
<div class="info_function">
|
|
<div
|
|
<div
|
|
class="function_item"
|
|
class="function_item"
|
|
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)"
|
|
|
|
|
|
+ @click="toPath(item.path, 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" />
|
|
@@ -53,20 +70,19 @@
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
- <div
|
|
|
|
- class="info_list"
|
|
|
|
- :style="{
|
|
|
|
- 'max-height':
|
|
|
|
- role == 'repair'
|
|
|
|
- ? 'calc(100% - 102px - 20px)'
|
|
|
|
- : 'calc(100% - 102px - 42px - 20px);',
|
|
|
|
- }"
|
|
|
|
- >
|
|
|
|
|
|
+ <div class="info_list">
|
|
<!-- 实时巡检begin -->
|
|
<!-- 实时巡检begin -->
|
|
- <template v-if="role == 'check'">
|
|
|
|
|
|
+ <template v-if="role == 'Inspection'">
|
|
<van-row align="center" justify="space-between" class="sub_title">
|
|
<van-row align="center" justify="space-between" class="sub_title">
|
|
<van-col class="title">实时巡检</van-col>
|
|
<van-col class="title">实时巡检</van-col>
|
|
- <van-col class="function_btn" @click="toPath('/')">
|
|
|
|
|
|
+ <van-col
|
|
|
|
+ class="function_btn"
|
|
|
|
+ @click="
|
|
|
|
+ () => {
|
|
|
|
+ $router.push({ path: '/review/clock' });
|
|
|
|
+ }
|
|
|
|
+ "
|
|
|
|
+ >
|
|
<van-col>立即巡检</van-col>
|
|
<van-col>立即巡检</van-col>
|
|
<van-image
|
|
<van-image
|
|
:src="require('@/assets/btn-arrow-right.svg')"
|
|
:src="require('@/assets/btn-arrow-right.svg')"
|
|
@@ -81,7 +97,7 @@
|
|
align="center"
|
|
align="center"
|
|
justify="center"
|
|
justify="center"
|
|
style="flex-direction: column"
|
|
style="flex-direction: column"
|
|
- v-for="(item, index) in checkList"
|
|
|
|
|
|
+ v-for="(item, index) in reviewList"
|
|
:key="item + '_' + index"
|
|
:key="item + '_' + index"
|
|
>
|
|
>
|
|
<van-col>{{ item.label }}</van-col>
|
|
<van-col>{{ item.label }}</van-col>
|
|
@@ -96,12 +112,19 @@
|
|
<!-- 实时巡检end -->
|
|
<!-- 实时巡检end -->
|
|
|
|
|
|
<!-- 工单待办begin -->
|
|
<!-- 工单待办begin -->
|
|
- <template v-if="role && role != 'check'">
|
|
|
|
|
|
+ <template v-if="role && role != 'Inspection'">
|
|
<van-row align="center" justify="space-between" class="sub_title">
|
|
<van-row align="center" justify="space-between" class="sub_title">
|
|
<van-col class="title">{{
|
|
<van-col class="title">{{
|
|
role == "admin" ? "工单待办" : "实时报修"
|
|
role == "admin" ? "工单待办" : "实时报修"
|
|
}}</van-col>
|
|
}}</van-col>
|
|
- <van-col class="function_btn" @click="toPath('/repairList')">
|
|
|
|
|
|
+ <van-col
|
|
|
|
+ class="function_btn"
|
|
|
|
+ @click="
|
|
|
|
+ () => {
|
|
|
|
+ $router.push({ path: '/repair/list' });
|
|
|
|
+ }
|
|
|
|
+ "
|
|
|
|
+ >
|
|
<van-col>{{ role == "admin" ? "立即处理" : "立即查看" }}</van-col>
|
|
<van-col>{{ role == "admin" ? "立即处理" : "立即查看" }}</van-col>
|
|
<van-image
|
|
<van-image
|
|
:src="require('@/assets/btn-arrow-right.svg')"
|
|
:src="require('@/assets/btn-arrow-right.svg')"
|
|
@@ -132,10 +155,17 @@
|
|
<!-- 工单待办end -->
|
|
<!-- 工单待办end -->
|
|
|
|
|
|
<!-- 设备异常begin -->
|
|
<!-- 设备异常begin -->
|
|
- <template v-if="role && role != 'rent'">
|
|
|
|
|
|
+ <template v-if="role && role != 'Tenant'">
|
|
<van-row align="center" justify="space-between" class="sub_title">
|
|
<van-row align="center" justify="space-between" class="sub_title">
|
|
<van-col class="title">设备异常</van-col>
|
|
<van-col class="title">设备异常</van-col>
|
|
- <van-col class="function_btn" @click="toPath('/deviceAlarm')">
|
|
|
|
|
|
+ <van-col
|
|
|
|
+ class="function_btn"
|
|
|
|
+ @click="
|
|
|
|
+ () => {
|
|
|
|
+ $router.push({ path: '/device/list' });
|
|
|
|
+ }
|
|
|
|
+ "
|
|
|
|
+ >
|
|
<van-col>立即查看</van-col>
|
|
<van-col>立即查看</van-col>
|
|
<van-image
|
|
<van-image
|
|
:src="require('@/assets/btn-arrow-right.svg')"
|
|
:src="require('@/assets/btn-arrow-right.svg')"
|
|
@@ -146,26 +176,14 @@
|
|
</van-col>
|
|
</van-col>
|
|
</van-row>
|
|
</van-row>
|
|
<van-row align="center" justify="space-around" class="list_item">
|
|
<van-row align="center" justify="space-around" class="list_item">
|
|
- <van-row
|
|
|
|
- align="center"
|
|
|
|
- justify="center"
|
|
|
|
- style="flex-direction: column"
|
|
|
|
- >
|
|
|
|
- <van-col>{{ abnormalNum.label }}</van-col>
|
|
|
|
- <v-count-up
|
|
|
|
- :end-val="Number(abnormalNum['count'])"
|
|
|
|
- class="count_up"
|
|
|
|
- style="color: #fa5555"
|
|
|
|
- />
|
|
|
|
- </van-row>
|
|
|
|
<van-row
|
|
<van-row
|
|
align="center"
|
|
align="center"
|
|
justify="space-between"
|
|
justify="space-between"
|
|
style="flex-direction: column"
|
|
style="flex-direction: column"
|
|
- v-for="(item, index) in deviceErrorList"
|
|
|
|
|
|
+ v-for="(item, index) in deviceAlarmList"
|
|
:key="item + '_' + index"
|
|
:key="item + '_' + index"
|
|
>
|
|
>
|
|
- <van-col>{{ item.label }}</van-col>
|
|
|
|
|
|
+ <van-col>{{ item.dictLabel }}</van-col>
|
|
<v-count-up :end-val="Number(item['count'])" class="count_up" />
|
|
<v-count-up :end-val="Number(item['count'])" class="count_up" />
|
|
</van-row>
|
|
</van-row>
|
|
</van-row>
|
|
</van-row>
|
|
@@ -176,7 +194,14 @@
|
|
<template v-if="role == 'admin'">
|
|
<template v-if="role == 'admin'">
|
|
<van-row align="center" justify="space-between" class="sub_title">
|
|
<van-row align="center" justify="space-between" class="sub_title">
|
|
<van-col class="title">欠费待收</van-col>
|
|
<van-col class="title">欠费待收</van-col>
|
|
- <van-col class="function_btn">
|
|
|
|
|
|
+ <van-col
|
|
|
|
+ class="function_btn"
|
|
|
|
+ @click="
|
|
|
|
+ () => {
|
|
|
|
+ $router.push({ path: '/pay/fee' });
|
|
|
|
+ }
|
|
|
|
+ "
|
|
|
|
+ >
|
|
<van-col>立即催收</van-col>
|
|
<van-col>立即催收</van-col>
|
|
<van-image
|
|
<van-image
|
|
:src="require('@/assets/btn-arrow-right.svg')"
|
|
:src="require('@/assets/btn-arrow-right.svg')"
|
|
@@ -192,26 +217,50 @@
|
|
<van-col span="8">欠费租户数</van-col>
|
|
<van-col span="8">欠费租户数</van-col>
|
|
<van-col span="8">累计欠费(元)</van-col>
|
|
<van-col span="8">累计欠费(元)</van-col>
|
|
</van-row>
|
|
</van-row>
|
|
- <van-row
|
|
|
|
- v-for="(item, index) in billPaymentList"
|
|
|
|
- :key="index"
|
|
|
|
- class="table_body"
|
|
|
|
- >
|
|
|
|
- <van-col span="8" style="color: #999999; font-size: 12px">{{
|
|
|
|
- `${payType_filter(item.payType)}`
|
|
|
|
- }}</van-col>
|
|
|
|
- <van-col span="8">{{ item.arrearageNum }}</van-col>
|
|
|
|
- <van-col span="8">{{ item.arrearageAmount }}</van-col>
|
|
|
|
- </van-row>
|
|
|
|
|
|
+ <div class="table_body" :class="{ loading_info: loading }">
|
|
|
|
+ <template v-if="!loading">
|
|
|
|
+ <template v-if="billPaymentList.length > 0">
|
|
|
|
+ <van-row v-for="(item, index) in billPaymentList" :key="index">
|
|
|
|
+ <van-col span="8" style="color: #999999; font-size: 12px">{{
|
|
|
|
+ `${dict_filter(item.payType, "payTypeList")["dictLabel"]}`
|
|
|
|
+ }}</van-col>
|
|
|
|
+ <van-col span="8">{{
|
|
|
|
+ (parseInt(item.arrearageNum * 100) / 100).toFixed(2)
|
|
|
|
+ }}</van-col>
|
|
|
|
+ <van-col span="8">{{
|
|
|
|
+ (parseInt(item.arrearageAmount * 100) / 100).toFixed(2)
|
|
|
|
+ }}</van-col>
|
|
|
|
+ </van-row>
|
|
|
|
+ </template>
|
|
|
|
+ <template v-else>
|
|
|
|
+ <van-empty image-size="60" description="暂无数据" />
|
|
|
|
+ </template>
|
|
|
|
+ </template>
|
|
|
|
+ <template v-if="loading">
|
|
|
|
+ <van-loading size="24px">加载中...</van-loading>
|
|
|
|
+ </template>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<!-- 欠费待收end -->
|
|
<!-- 欠费待收end -->
|
|
|
|
|
|
<!-- 账单待缴begin -->
|
|
<!-- 账单待缴begin -->
|
|
- <template v-if="role == 'rent'">
|
|
|
|
|
|
+ <template v-if="role == 'Tenant'">
|
|
<van-row align="center" justify="space-between" class="sub_title">
|
|
<van-row align="center" justify="space-between" class="sub_title">
|
|
<van-col class="title">账单待缴</van-col>
|
|
<van-col class="title">账单待缴</van-col>
|
|
- <van-col class="function_btn">
|
|
|
|
|
|
+ <van-col
|
|
|
|
+ class="function_btn"
|
|
|
|
+ @click="
|
|
|
|
+ () => {
|
|
|
|
+ $router.push({
|
|
|
|
+ path: '/bill/detail',
|
|
|
|
+ query: {
|
|
|
|
+ activeTab: 'bill',
|
|
|
|
+ },
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ "
|
|
|
|
+ >
|
|
<van-col>立即缴费</van-col>
|
|
<van-col>立即缴费</van-col>
|
|
<van-image
|
|
<van-image
|
|
:src="require('@/assets/btn-arrow-right.svg')"
|
|
:src="require('@/assets/btn-arrow-right.svg')"
|
|
@@ -227,17 +276,29 @@
|
|
<van-col span="8">本期待缴金额(元)</van-col>
|
|
<van-col span="8">本期待缴金额(元)</van-col>
|
|
<van-col span="8">累计待缴金额(元)</van-col>
|
|
<van-col span="8">累计待缴金额(元)</van-col>
|
|
</van-row>
|
|
</van-row>
|
|
- <van-row
|
|
|
|
- v-for="(item, index) in billPaymentList"
|
|
|
|
- :key="index"
|
|
|
|
- class="table_body"
|
|
|
|
- >
|
|
|
|
- <van-col span="8" style="color: #999999; font-size: 12px">{{
|
|
|
|
- item.payType
|
|
|
|
- }}</van-col>
|
|
|
|
- <van-col span="8">{{ item.arrearageNum }}</van-col>
|
|
|
|
- <van-col span="8">{{ item.arrearageAmount }}</van-col>
|
|
|
|
- </van-row>
|
|
|
|
|
|
+ <div class="table_body" :class="{ loading_info: loading }">
|
|
|
|
+ <template v-if="!loading">
|
|
|
|
+ <template v-if="billPaymentList.length > 0">
|
|
|
|
+ <van-row v-for="(item, index) in billPaymentList" :key="index">
|
|
|
|
+ <van-col span="8" style="color: #999999; font-size: 12px">{{
|
|
|
|
+ `${dict_filter(item.payType, "payTypeList")["dictLabel"]}`
|
|
|
|
+ }}</van-col>
|
|
|
|
+ <van-col span="8">{{
|
|
|
|
+ (parseInt(item.currentAmount * 100) / 100).toFixed(2)
|
|
|
|
+ }}</van-col>
|
|
|
|
+ <van-col span="8">{{
|
|
|
|
+ (parseInt(item.cumulativeAmount * 100) / 100).toFixed(2)
|
|
|
|
+ }}</van-col>
|
|
|
|
+ </van-row>
|
|
|
|
+ </template>
|
|
|
|
+ <template v-else>
|
|
|
|
+ <van-empty image-size="60" description="暂无数据" />
|
|
|
|
+ </template>
|
|
|
|
+ </template>
|
|
|
|
+ <template v-if="loading">
|
|
|
|
+ <van-loading size="24px">加载中...</van-loading>
|
|
|
|
+ </template>
|
|
|
|
+ </div>
|
|
</div>
|
|
</div>
|
|
</template>
|
|
</template>
|
|
<!-- 账单待缴end -->
|
|
<!-- 账单待缴end -->
|
|
@@ -248,7 +309,6 @@
|
|
v-model="activeTabBar"
|
|
v-model="activeTabBar"
|
|
active-color="#2E69EB"
|
|
active-color="#2E69EB"
|
|
inactive-color="#0c1935"
|
|
inactive-color="#0c1935"
|
|
- safe-area-inset-bottom
|
|
|
|
>
|
|
>
|
|
<van-tabbar-item
|
|
<van-tabbar-item
|
|
name="home"
|
|
name="home"
|
|
@@ -263,11 +323,11 @@
|
|
<van-tabbar-item
|
|
<van-tabbar-item
|
|
name="rentBill"
|
|
name="rentBill"
|
|
:icon="
|
|
:icon="
|
|
- activeTabBar == 'rentBill'
|
|
|
|
|
|
+ activeTabBar == 'bill'
|
|
? require('@/assets/rent-bill-active.svg')
|
|
? require('@/assets/rent-bill-active.svg')
|
|
: require('@/assets/rent-bill.svg')
|
|
: require('@/assets/rent-bill.svg')
|
|
"
|
|
"
|
|
- to="/rentBill"
|
|
|
|
|
|
+ to="/bill/list"
|
|
>租户账单</van-tabbar-item
|
|
>租户账单</van-tabbar-item
|
|
>
|
|
>
|
|
<van-tabbar-item
|
|
<van-tabbar-item
|
|
@@ -283,7 +343,7 @@
|
|
</van-tabbar>
|
|
</van-tabbar>
|
|
</template>
|
|
</template>
|
|
<script>
|
|
<script>
|
|
-import { isEmpty } from "@/utils/index.js";
|
|
|
|
|
|
+import { isEmpty, getDictDataList } from "@/utils/index.js";
|
|
import api from "../utils/api";
|
|
import api from "../utils/api";
|
|
import VCountUp from "./CountUp";
|
|
import VCountUp from "./CountUp";
|
|
export default {
|
|
export default {
|
|
@@ -293,46 +353,31 @@ export default {
|
|
data() {
|
|
data() {
|
|
return {
|
|
return {
|
|
role: "",
|
|
role: "",
|
|
|
|
+ tenantInfo: {}, //角色为Tenant时有值
|
|
name: "电商园四期-B座",
|
|
name: "电商园四期-B座",
|
|
activeTabBar: "home",
|
|
activeTabBar: "home",
|
|
functionList: [
|
|
functionList: [
|
|
{
|
|
{
|
|
- path: "/repairOnline",
|
|
|
|
|
|
+ path: "/repair/create",
|
|
src: require("@/assets/repair-online.svg"),
|
|
src: require("@/assets/repair-online.svg"),
|
|
label: "线上报修",
|
|
label: "线上报修",
|
|
- role: ["admin", "check", "rent"],
|
|
|
|
|
|
+ role: ["admin", "Inspection", "Tenant"],
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- path: "/checkRecord",
|
|
|
|
|
|
+ path: "/review/list",
|
|
src: require("@/assets/check-review.svg"),
|
|
src: require("@/assets/check-review.svg"),
|
|
label: "巡检记录",
|
|
label: "巡检记录",
|
|
- role: ["admin", "check"],
|
|
|
|
|
|
+ role: ["admin", "Inspection"],
|
|
},
|
|
},
|
|
{
|
|
{
|
|
- path: "/reduceRecord",
|
|
|
|
|
|
+ path: "/pay/record",
|
|
src: require("@/assets/reduce-record.svg"),
|
|
src: require("@/assets/reduce-record.svg"),
|
|
label: "扣缴记录",
|
|
label: "扣缴记录",
|
|
- role: ["admin", "rent"],
|
|
|
|
- },
|
|
|
|
- ],
|
|
|
|
- checkList: [
|
|
|
|
- {
|
|
|
|
- label: "今日待巡检",
|
|
|
|
- count: 88,
|
|
|
|
- options: {
|
|
|
|
- separator: ",",
|
|
|
|
- },
|
|
|
|
- },
|
|
|
|
- {
|
|
|
|
- label: "今日已巡检",
|
|
|
|
- count: 2,
|
|
|
|
- options: {
|
|
|
|
- separator: ",",
|
|
|
|
- },
|
|
|
|
|
|
+ role: ["admin", "Tenant"],
|
|
|
|
+ activeTab: "record",
|
|
},
|
|
},
|
|
],
|
|
],
|
|
- billPaymentList: [],
|
|
|
|
- abnormalNum: { label: "异常总数", count: "" },
|
|
|
|
|
|
+ reviewList: [],
|
|
workList: [
|
|
workList: [
|
|
{
|
|
{
|
|
label: "待指派",
|
|
label: "待指派",
|
|
@@ -342,39 +387,45 @@ export default {
|
|
{
|
|
{
|
|
label: "待维修",
|
|
label: "待维修",
|
|
count: 2,
|
|
count: 2,
|
|
- role: ["admin", "repair", "rent"],
|
|
|
|
|
|
+ role: ["admin", "Maintenance", "Tenant"],
|
|
},
|
|
},
|
|
{
|
|
{
|
|
label: "已维修",
|
|
label: "已维修",
|
|
count: 0,
|
|
count: 0,
|
|
- role: ["admin", "repair", "rent"],
|
|
|
|
|
|
+ role: ["admin", "Maintenance", "Tenant"],
|
|
},
|
|
},
|
|
],
|
|
],
|
|
- deviceErrorList: [],
|
|
|
|
- loading: false,
|
|
|
|
|
|
+ deviceAlarmList: [],
|
|
|
|
+ payTypeList: [],
|
|
|
|
+ billPaymentList: [],
|
|
|
|
+ loading: true,
|
|
};
|
|
};
|
|
},
|
|
},
|
|
created() {
|
|
created() {
|
|
- if(localStorage.getItem('token')){
|
|
|
|
- this.getHomeData();
|
|
|
|
|
|
+ this.role = localStorage.getItem("role");
|
|
|
|
+ this.getHomeData();
|
|
|
|
+ this.getPayTypeList();
|
|
|
|
+ this.getDeviceAlarmList();
|
|
|
|
+ if (this.role == "Tenant") {
|
|
|
|
+ this.tenantInfo = JSON.parse(localStorage.getItem("tenantInfo"));
|
|
|
|
+ } else {
|
|
|
|
+ this.tenantInfo = {};
|
|
}
|
|
}
|
|
- // this.role = localStorage.getItem("role");
|
|
|
|
},
|
|
},
|
|
methods: {
|
|
methods: {
|
|
- payType_filter(val) {
|
|
|
|
|
|
+ getPayTypeList() {
|
|
|
|
+ this.payTypeList = getDictDataList("PayType");
|
|
|
|
+ },
|
|
|
|
+ getDeviceAlarmList() {
|
|
|
|
+ this.deviceAlarmList = getDictDataList("DeviceAlarm");
|
|
|
|
+ },
|
|
|
|
+ dict_filter(val, list) {
|
|
if (isEmpty(val)) {
|
|
if (isEmpty(val)) {
|
|
- return "";
|
|
|
|
- }
|
|
|
|
- if (val == "Water") {
|
|
|
|
- return "水费";
|
|
|
|
- }
|
|
|
|
- if (val == "Elec") {
|
|
|
|
- return "电费";
|
|
|
|
- }
|
|
|
|
- if (val == 3) {
|
|
|
|
- return "物业相关";
|
|
|
|
|
|
+ return {};
|
|
}
|
|
}
|
|
|
|
+ return this[list].find((item) => item.dictValue == val);
|
|
},
|
|
},
|
|
|
|
+
|
|
getHomeData() {
|
|
getHomeData() {
|
|
api.homedata().then((res) => {
|
|
api.homedata().then((res) => {
|
|
if (res.code == 0) {
|
|
if (res.code == 0) {
|
|
@@ -383,27 +434,58 @@ export default {
|
|
this.workList[k - 1].count = res.data.workOrder[k];
|
|
this.workList[k - 1].count = res.data.workOrder[k];
|
|
}
|
|
}
|
|
//设备异常数据
|
|
//设备异常数据
|
|
- let mapsArr = [];
|
|
|
|
- for (let k in res.data.equip.maps) {
|
|
|
|
- let json = {};
|
|
|
|
- json.label = k;
|
|
|
|
- json.count = res.data.equip.maps[k];
|
|
|
|
- mapsArr.push(json);
|
|
|
|
|
|
+ let deviceArr = [];
|
|
|
|
+ for (let key in res.data.equip.maps) {
|
|
|
|
+ if (key != "Relay") {
|
|
|
|
+ deviceArr.push({
|
|
|
|
+ dictValue: key,
|
|
|
|
+ count: res.data.equip.maps[key],
|
|
|
|
+ });
|
|
|
|
+ }
|
|
}
|
|
}
|
|
- this.deviceErrorList = mapsArr;
|
|
|
|
//赋值异常总数
|
|
//赋值异常总数
|
|
- this.abnormalNum.count = res.data.equip.abnormalNum;
|
|
|
|
|
|
+ deviceArr.unshift({
|
|
|
|
+ dictValue: "abnormalNum",
|
|
|
|
+ count: res.data.equip.abnormalNum,
|
|
|
|
+ });
|
|
|
|
+ this.deviceAlarmList.forEach((item) => {
|
|
|
|
+ item.count = deviceArr.find(
|
|
|
|
+ (ele) => ele.dictValue == item.dictValue
|
|
|
|
+ ).count;
|
|
|
|
+ });
|
|
|
|
+
|
|
|
|
+ //实时巡检数据
|
|
|
|
+ let reviewArr = [];
|
|
|
|
+ for (let key in res.data.inspectionInfo) {
|
|
|
|
+ reviewArr.push({
|
|
|
|
+ dictValue: key,
|
|
|
|
+ count: res.data.inspectionInfo[key],
|
|
|
|
+ });
|
|
|
|
+ }
|
|
|
|
+ this.reviewList.forEach((item) => {
|
|
|
|
+ item.count = reviewArr.find(
|
|
|
|
+ (ele) => ele.dictValue == item.dictValue
|
|
|
|
+ ).count;
|
|
|
|
+ });
|
|
//欠费待收数据
|
|
//欠费待收数据
|
|
this.billPaymentList = res.data.billPaymentList;
|
|
this.billPaymentList = res.data.billPaymentList;
|
|
}
|
|
}
|
|
|
|
+ this.loading = false;
|
|
});
|
|
});
|
|
},
|
|
},
|
|
toPath(path, val) {
|
|
toPath(path, val) {
|
|
|
|
+ let params = {};
|
|
|
|
+ if (this.role != "admin" && val) {
|
|
|
|
+ params = {
|
|
|
|
+ tenantId: this.tenantInfo.tenantId,
|
|
|
|
+ tenantName: this.tenantInfo.tenantName,
|
|
|
|
+ activeTab: val,
|
|
|
|
+ };
|
|
|
|
+ path = "/bill/detail";
|
|
|
|
+ }
|
|
this.$router.push({
|
|
this.$router.push({
|
|
path: path,
|
|
path: path,
|
|
- query: {
|
|
|
|
- source: val,
|
|
|
|
- },
|
|
|
|
|
|
+ query: params,
|
|
});
|
|
});
|
|
},
|
|
},
|
|
},
|
|
},
|
|
@@ -412,16 +494,10 @@ export default {
|
|
<style lang="scss" scoped>
|
|
<style lang="scss" scoped>
|
|
.page_info {
|
|
.page_info {
|
|
position: relative;
|
|
position: relative;
|
|
- height: calc( 100vh - 85px);
|
|
|
|
- overflow: auto;
|
|
|
|
- // height:100% - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 50px -46px
|
|
|
|
- .info_bg {
|
|
|
|
|
|
+ .info_title {
|
|
width: 100%;
|
|
width: 100%;
|
|
- height: 102px;
|
|
|
|
background: #5c8fff;
|
|
background: #5c8fff;
|
|
border-radius: 0px 0px 16px 16px;
|
|
border-radius: 0px 0px 16px 16px;
|
|
- padding-top: 12px;
|
|
|
|
- margin-bottom: 42px;
|
|
|
|
box-sizing: border-box;
|
|
box-sizing: border-box;
|
|
.position_pannel {
|
|
.position_pannel {
|
|
display: flex;
|
|
display: flex;
|
|
@@ -429,7 +505,8 @@ export default {
|
|
justify-content: space-between;
|
|
justify-content: space-between;
|
|
padding: 0 16px;
|
|
padding: 0 16px;
|
|
.van-col {
|
|
.van-col {
|
|
- height: 24px;
|
|
|
|
|
|
+ height: 44px;
|
|
|
|
+ font-weight: 600;
|
|
font-size: 16px;
|
|
font-size: 16px;
|
|
color: #ffffff;
|
|
color: #ffffff;
|
|
line-height: 24px;
|
|
line-height: 24px;
|
|
@@ -470,11 +547,9 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
.info_list {
|
|
.info_list {
|
|
- max-height: calc(100% - 102px - 42px - 20px);
|
|
|
|
padding: 0 16px;
|
|
padding: 0 16px;
|
|
- overflow-y: auto;
|
|
|
|
.sub_title {
|
|
.sub_title {
|
|
- margin: 16px 0 6px 0;
|
|
|
|
|
|
+ margin: 12px 0 6px 0;
|
|
.title {
|
|
.title {
|
|
height: 20px;
|
|
height: 20px;
|
|
font-size: 14px;
|
|
font-size: 14px;
|
|
@@ -499,6 +574,7 @@ export default {
|
|
box-shadow: 0px 0px 4px 0px rgba(51, 51, 51, 0.08);
|
|
box-shadow: 0px 0px 4px 0px rgba(51, 51, 51, 0.08);
|
|
border-radius: 4px;
|
|
border-radius: 4px;
|
|
padding: 16px 0;
|
|
padding: 16px 0;
|
|
|
|
+ height: 32px;
|
|
.van-col {
|
|
.van-col {
|
|
height: 16px;
|
|
height: 16px;
|
|
font-size: 12px;
|
|
font-size: 12px;
|
|
@@ -516,6 +592,7 @@ export default {
|
|
}
|
|
}
|
|
.list_table {
|
|
.list_table {
|
|
padding: 8px 16px 4px 16px;
|
|
padding: 8px 16px 4px 16px;
|
|
|
|
+ min-height: 156px;
|
|
.table_header {
|
|
.table_header {
|
|
padding: 8px 0;
|
|
padding: 8px 0;
|
|
border-bottom: 1px solid #eeeeee;
|
|
border-bottom: 1px solid #eeeeee;
|
|
@@ -528,8 +605,11 @@ export default {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
.table_body {
|
|
.table_body {
|
|
- padding: 12px 0;
|
|
|
|
- border-bottom: 1px solid #eeeeee;
|
|
|
|
|
|
+ height: calc(100% - 33px);
|
|
|
|
+ .van-row {
|
|
|
|
+ padding: 12px 0;
|
|
|
|
+ border-bottom: 1px solid #eeeeee;
|
|
|
|
+ }
|
|
.van-col {
|
|
.van-col {
|
|
height: 16px;
|
|
height: 16px;
|
|
font-size: 16px;
|
|
font-size: 16px;
|
|
@@ -537,6 +617,11 @@ export default {
|
|
line-height: 16px;
|
|
line-height: 16px;
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
+ .loading_info {
|
|
|
|
+ display: flex;
|
|
|
|
+ align-items: center;
|
|
|
|
+ justify-content: center;
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|