|
@@ -1,8 +1,8 @@
|
|
|
<template>
|
|
|
- <div class="page_home">
|
|
|
- <div class="home_bg">
|
|
|
- <div class="bg_title">
|
|
|
- <div class="title_info">
|
|
|
+ <div class="page_info">
|
|
|
+ <div class="info_bg">
|
|
|
+ <van-row align="center" class="bg_title">
|
|
|
+ <van-col>
|
|
|
<van-image
|
|
|
:src="require('@/assets/position.svg')"
|
|
|
width="16"
|
|
@@ -16,145 +16,210 @@
|
|
|
height="24"
|
|
|
fit="contain"
|
|
|
/>
|
|
|
- </div>
|
|
|
- <div class="user_info" @click="toPath">
|
|
|
+ </van-col>
|
|
|
+ <van-col @click="toPath">
|
|
|
<van-image
|
|
|
:src="require('@/assets/user.svg')"
|
|
|
width="16"
|
|
|
height="16"
|
|
|
fit="contain"
|
|
|
/>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ </van-col>
|
|
|
+ </van-row>
|
|
|
</div>
|
|
|
- <div class="home_info">
|
|
|
- <div class="info_content">
|
|
|
+ <!-- 维修工没有此块功能 -->
|
|
|
+ <template v-if="role != 3">
|
|
|
+ <div class="info_function">
|
|
|
<div
|
|
|
- class="content_item"
|
|
|
+ class="function_item"
|
|
|
v-for="(item, index) in functionList"
|
|
|
:key="index"
|
|
|
+ :style="{ display: !item.role.includes(role) ? 'none' : '' }"
|
|
|
>
|
|
|
- <van-image :src="item.src" width="36" height="36" fit="contain" />
|
|
|
- <span>{{ item.label }}</span>
|
|
|
+ <template v-if="item.role.includes(role)">
|
|
|
+ <van-image :src="item.src" width="36" height="36" fit="contain" />
|
|
|
+ <span>{{ item.label }}</span>
|
|
|
+ </template>
|
|
|
</div>
|
|
|
</div>
|
|
|
- </div>
|
|
|
- <div class="card_list">
|
|
|
- <div class="sub_title">
|
|
|
- <span>工单待办</span>
|
|
|
- <div class="function_btn">
|
|
|
- <span>立即处理</span>
|
|
|
+ </template>
|
|
|
+ <div class="info_list">
|
|
|
+ <!-- 实时巡检begin -->
|
|
|
+ <van-row align="center" justify="space-between" class="sub_title">
|
|
|
+ <van-col class="title">实时巡检</van-col>
|
|
|
+ <van-col class="function_btn">
|
|
|
+ <van-col>立即巡检</van-col>
|
|
|
<van-image
|
|
|
:src="require('@/assets/btn-arrow-right.svg')"
|
|
|
width="24"
|
|
|
height="24"
|
|
|
fit="contain"
|
|
|
/>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="list_item">
|
|
|
- <div
|
|
|
- class="item_info"
|
|
|
+ </van-col>
|
|
|
+ </van-row>
|
|
|
+ <van-row align="center" justify="space-between" class="list_item">
|
|
|
+ <van-row
|
|
|
+ align="center"
|
|
|
+ justify="space-between"
|
|
|
+ style="flex-direction: column"
|
|
|
+ v-for="(item, index) in checkList"
|
|
|
+ :key="item + '_' + index"
|
|
|
+ >
|
|
|
+ <van-col>{{ item.label }}</van-col>
|
|
|
+ <v-count-up
|
|
|
+ :end-val="Number(item['count'])"
|
|
|
+ class="count_up"
|
|
|
+ :options="item['options']"
|
|
|
+ />
|
|
|
+ </van-row>
|
|
|
+ </van-row>
|
|
|
+ <!-- 实时巡检end -->
|
|
|
+
|
|
|
+ <!-- 工单待办begin -->
|
|
|
+ <van-row align="center" justify="space-between" class="sub_title">
|
|
|
+ <van-col class="title">工单待办</van-col>
|
|
|
+ <van-col class="function_btn">
|
|
|
+ <van-col>立即处理</van-col>
|
|
|
+ <van-image
|
|
|
+ :src="require('@/assets/btn-arrow-right.svg')"
|
|
|
+ width="24"
|
|
|
+ height="24"
|
|
|
+ fit="contain"
|
|
|
+ />
|
|
|
+ </van-col>
|
|
|
+ </van-row>
|
|
|
+ <van-row align="center" justify="space-between" class="list_item">
|
|
|
+ <van-row
|
|
|
+ align="center"
|
|
|
+ justify="space-between"
|
|
|
+ style="flex-direction: column"
|
|
|
v-for="(item, index) in workList"
|
|
|
:key="item + '_' + index"
|
|
|
>
|
|
|
- <span class="label">{{ item.label }}</span>
|
|
|
+ <van-col>{{ item.label }}</van-col>
|
|
|
<v-count-up
|
|
|
:end-val="Number(item['count'])"
|
|
|
class="count_up"
|
|
|
:options="item['options']"
|
|
|
/>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="sub_title">
|
|
|
- <span>设备异常</span>
|
|
|
- <div class="function_btn">
|
|
|
- <span>立即处理</span>
|
|
|
+ </van-row>
|
|
|
+ </van-row>
|
|
|
+ <!-- 工单待办end -->
|
|
|
+
|
|
|
+ <!-- 设备异常begin -->
|
|
|
+ <van-row align="center" justify="space-between" class="sub_title">
|
|
|
+ <van-col class="title">设备异常</van-col>
|
|
|
+ <van-col class="function_btn">
|
|
|
+ <van-col>立即处理</van-col>
|
|
|
<van-image
|
|
|
:src="require('@/assets/btn-arrow-right.svg')"
|
|
|
width="24"
|
|
|
height="24"
|
|
|
fit="contain"
|
|
|
/>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="list_item">
|
|
|
- <div
|
|
|
- class="item_info"
|
|
|
+ </van-col>
|
|
|
+ </van-row>
|
|
|
+ <van-row align="center" justify="space-between" class="list_item">
|
|
|
+ <van-row
|
|
|
+ align="center"
|
|
|
+ justify="space-between"
|
|
|
+ style="flex-direction: column"
|
|
|
v-for="(item, index) in deviceErrorList"
|
|
|
:key="item + '-' + index"
|
|
|
>
|
|
|
- <span class="label">{{ item.label }}</span>
|
|
|
+ <van-col>{{ item.label }}</van-col>
|
|
|
<v-count-up
|
|
|
:end-val="Number(item['count'])"
|
|
|
class="count_up"
|
|
|
:options="item['options']"
|
|
|
style="color: #fa5555"
|
|
|
/>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
- <div class="sub_title">
|
|
|
- <span>欠费待收</span>
|
|
|
- <div class="function_btn">
|
|
|
- <span>立即处理</span>
|
|
|
+ </van-row>
|
|
|
+ </van-row>
|
|
|
+ <!-- 设备异常end -->
|
|
|
+
|
|
|
+ <!-- 欠费待收begin -->
|
|
|
+ <van-row align="center" justify="space-between" class="sub_title">
|
|
|
+ <van-col class="title">欠费待收</van-col>
|
|
|
+ <van-col class="function_btn">
|
|
|
+ <van-col>立即处理</van-col>
|
|
|
<van-image
|
|
|
:src="require('@/assets/btn-arrow-right.svg')"
|
|
|
width="24"
|
|
|
height="24"
|
|
|
fit="contain"
|
|
|
/>
|
|
|
- </div>
|
|
|
- </div>
|
|
|
+ </van-col>
|
|
|
+ </van-row>
|
|
|
<div class="list_item list_table">
|
|
|
- <div class="table_info">
|
|
|
- <div class="table_header">
|
|
|
- <span>欠费类型</span>
|
|
|
- <span>欠费租户数</span>
|
|
|
- <span>累计欠费</span>
|
|
|
- </div>
|
|
|
- <van-pull-refresh v-model="refreshing" @refresh="onRefresh">
|
|
|
- <van-list
|
|
|
- v-model:loading="loading"
|
|
|
- :finished="finished"
|
|
|
- :error="error"
|
|
|
- error-text="请求失败,点击重新加载"
|
|
|
- finished-text="没有更多了"
|
|
|
- @load="onLoad"
|
|
|
- >
|
|
|
- <van-row v-for="item in list" :key="item.id">
|
|
|
- <van-cell :value="item.type" />
|
|
|
- <van-cell :value="item.fee" />
|
|
|
- <van-cell :value="item.totalFee" />
|
|
|
- </van-row>
|
|
|
- </van-list>
|
|
|
- </van-pull-refresh>
|
|
|
- </div>
|
|
|
+ <van-row align="center" justify="space-between" class="table_header">
|
|
|
+ <van-col span="8">欠费类型</van-col>
|
|
|
+ <van-col span="8">欠费租户数</van-col>
|
|
|
+ <van-col span="8">累计欠费</van-col>
|
|
|
+ </van-row>
|
|
|
+ <van-row
|
|
|
+ align="center"
|
|
|
+ justify="space-between"
|
|
|
+ v-for="item in list"
|
|
|
+ :key="item.id"
|
|
|
+ class="table_body"
|
|
|
+ >
|
|
|
+ <van-col span="8" style="color: #999999; font-size: 12px">
|
|
|
+ {{ `${feeType_filter(item && item.feeType)}` }}
|
|
|
+ </van-col>
|
|
|
+ <van-col span="8" style="color: #0c1935; font-size: 16px">
|
|
|
+ {{ item.rentNum }}
|
|
|
+ </van-col>
|
|
|
+ <van-col span="8" style="color: #0c1935; font-size: 16px">
|
|
|
+ {{ item.totalFee }}
|
|
|
+ </van-col>
|
|
|
+ </van-row>
|
|
|
</div>
|
|
|
+ <!-- 欠费待收end -->
|
|
|
</div>
|
|
|
- <van-tabbar
|
|
|
- v-model="activeTab"
|
|
|
- active-color="#5776E6"
|
|
|
- inactive-color="#333333"
|
|
|
- >
|
|
|
- <van-tabbar-item name="home" :icon="require('@/assets/home.svg')" to=""
|
|
|
- >首页</van-tabbar-item
|
|
|
- >
|
|
|
- <van-tabbar-item
|
|
|
- name="rentBill"
|
|
|
- :icon="require('@/assets/rent-bill.svg')"
|
|
|
- to=""
|
|
|
- >租户账单</van-tabbar-item
|
|
|
- >
|
|
|
- <van-tabbar-item
|
|
|
- name="remoteControl"
|
|
|
- :icon="require('@/assets/remote-control.svg')"
|
|
|
- to=""
|
|
|
- >远程管控</van-tabbar-item
|
|
|
- >
|
|
|
- </van-tabbar>
|
|
|
</div>
|
|
|
+
|
|
|
+ <!-- 底部tabbar -->
|
|
|
+ <van-tabbar
|
|
|
+ v-model="activeTabBar"
|
|
|
+ active-color="#2E69EB"
|
|
|
+ inactive-color="#333333"
|
|
|
+ safe-area-inset-bottom
|
|
|
+ >
|
|
|
+ <van-tabbar-item
|
|
|
+ name="home"
|
|
|
+ :icon="
|
|
|
+ activeTabBar == 'home'
|
|
|
+ ? require('@/assets/home-active.svg')
|
|
|
+ : require('@/assets/home.svg')
|
|
|
+ "
|
|
|
+ to="/home"
|
|
|
+ >首页</van-tabbar-item
|
|
|
+ >
|
|
|
+ <van-tabbar-item
|
|
|
+ name="rentBill"
|
|
|
+ :icon="
|
|
|
+ activeTabBar == 'rentBill'
|
|
|
+ ? require('@/assets/rent-bill-active.svg')
|
|
|
+ : require('@/assets/rent-bill.svg')
|
|
|
+ "
|
|
|
+ to="/rentBill"
|
|
|
+ >租户账单</van-tabbar-item
|
|
|
+ >
|
|
|
+ <van-tabbar-item
|
|
|
+ name="remoteControl"
|
|
|
+ :icon="
|
|
|
+ activeTabBar == 'remoteControl'
|
|
|
+ ? require('@/assets/remote-control-active.svg')
|
|
|
+ : require('@/assets/remote-control.svg')
|
|
|
+ "
|
|
|
+ to="/remoteControl"
|
|
|
+ >远程管控</van-tabbar-item
|
|
|
+ >
|
|
|
+ </van-tabbar>
|
|
|
</template>
|
|
|
<script>
|
|
|
+import { isEmpty } from "@/utils/index.js";
|
|
|
import VCountUp from "./CountUp";
|
|
|
export default {
|
|
|
components: {
|
|
@@ -162,12 +227,41 @@ export default {
|
|
|
},
|
|
|
data() {
|
|
|
return {
|
|
|
+ role: 1, //1:admin、2:巡检人员、3:维修工、4:租户
|
|
|
name: "电商园四期-B座",
|
|
|
- activeTab: "rentBill",
|
|
|
+ activeTabBar: "home",
|
|
|
functionList: [
|
|
|
- { src: require("@/assets/repair-online.svg"), label: "线上报修" },
|
|
|
- { src: require("@/assets/check-review.svg"), label: "巡检记录" },
|
|
|
- { src: require("@/assets/reduce-record.svg"), label: "扣缴记录" },
|
|
|
+ {
|
|
|
+ src: require("@/assets/repair-online.svg"),
|
|
|
+ label: "线上报修",
|
|
|
+ role: [1, 2, 4],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ src: require("@/assets/check-review.svg"),
|
|
|
+ label: "巡检记录",
|
|
|
+ role: [1, 2],
|
|
|
+ },
|
|
|
+ {
|
|
|
+ src: require("@/assets/reduce-record.svg"),
|
|
|
+ label: "扣缴记录",
|
|
|
+ role: [1, 4],
|
|
|
+ },
|
|
|
+ ],
|
|
|
+ checkList: [
|
|
|
+ {
|
|
|
+ label: "今日待巡检",
|
|
|
+ count: 88,
|
|
|
+ options: {
|
|
|
+ separator: ",",
|
|
|
+ },
|
|
|
+ },
|
|
|
+ {
|
|
|
+ label: "今日已巡检",
|
|
|
+ count: 2,
|
|
|
+ options: {
|
|
|
+ separator: ",",
|
|
|
+ },
|
|
|
+ },
|
|
|
],
|
|
|
workList: [
|
|
|
{
|
|
@@ -215,39 +309,30 @@ export default {
|
|
|
},
|
|
|
},
|
|
|
],
|
|
|
- list: [],
|
|
|
- loading: false,
|
|
|
- refreshing: false,
|
|
|
- finished: false,
|
|
|
+ list: [
|
|
|
+ { feeType: 1, rentNum: 23, totalFee: 12636 },
|
|
|
+ { feeType: 2, rentNum: 7, totalFee: 462 },
|
|
|
+ { feeType: 3, rentNum: 132, totalFee: 24634 },
|
|
|
+ { feeType: 1, rentNum: 23, totalFee: 12636 },
|
|
|
+ { feeType: 2, rentNum: 7, totalFee: 462 },
|
|
|
+ { feeType: 3, rentNum: 132, totalFee: 24634 },
|
|
|
+ ],
|
|
|
};
|
|
|
},
|
|
|
methods: {
|
|
|
- onLoad() {
|
|
|
- setTimeout(() => {
|
|
|
- if (this.refreshing.value) {
|
|
|
- this.list.value = [];
|
|
|
- this.refreshing.value = false;
|
|
|
- }
|
|
|
-
|
|
|
- for (let i = 0; i < 10; i++) {
|
|
|
- this.list.value.push(this.list.value.length + 1);
|
|
|
- }
|
|
|
- this.loading.value = false;
|
|
|
-
|
|
|
- if (this.list.value.length >= 40) {
|
|
|
- this.finished.value = true;
|
|
|
- }
|
|
|
- }, 1000);
|
|
|
- },
|
|
|
-
|
|
|
- onRefresh() {
|
|
|
- // 清空列表数据
|
|
|
- this.finished.value = false;
|
|
|
-
|
|
|
- // 重新加载数据
|
|
|
- // 将 loading 设置为 true,表示处于加载状态
|
|
|
- this.loading.value = true;
|
|
|
- this.onLoad();
|
|
|
+ feeType_filter(val) {
|
|
|
+ if (isEmpty(val)) {
|
|
|
+ return "";
|
|
|
+ }
|
|
|
+ if (val == 1) {
|
|
|
+ return "电费";
|
|
|
+ }
|
|
|
+ if (val == 2) {
|
|
|
+ return "水费";
|
|
|
+ }
|
|
|
+ if (val == 3) {
|
|
|
+ return "物业相关";
|
|
|
+ }
|
|
|
},
|
|
|
toPath() {
|
|
|
this.$router.push("/userInfo");
|
|
@@ -256,9 +341,12 @@ export default {
|
|
|
};
|
|
|
</script>
|
|
|
<style lang="scss" scoped>
|
|
|
-.page_home {
|
|
|
+.page_info {
|
|
|
position: relative;
|
|
|
- .home_bg {
|
|
|
+ height: calc(
|
|
|
+ 100% - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 50px
|
|
|
+ );
|
|
|
+ .info_bg {
|
|
|
width: 100%;
|
|
|
height: 102px;
|
|
|
background: #5c8fff;
|
|
@@ -270,72 +358,62 @@ export default {
|
|
|
align-items: center;
|
|
|
justify-content: space-between;
|
|
|
padding: 0 16px;
|
|
|
- .title_info {
|
|
|
+ .van-col {
|
|
|
+ height: 24px;
|
|
|
+ font-size: 16px;
|
|
|
+ font-weight: 600;
|
|
|
+ color: #ffffff;
|
|
|
+ line-height: 24px;
|
|
|
+ text-shadow: 0px 2px 4px rgba(0, 0, 0, 0.04);
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
- span {
|
|
|
- height: 24px;
|
|
|
- font-size: 16px;
|
|
|
- font-weight: 600;
|
|
|
- color: #ffffff;
|
|
|
- line-height: 24px;
|
|
|
- text-align: center;
|
|
|
- text-indent: 4px;
|
|
|
- text-shadow: 0px 2px 4px rgba(0, 0, 0, 0.04);
|
|
|
- }
|
|
|
- }
|
|
|
-
|
|
|
- .user-info {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- .home_info {
|
|
|
+ .info_function {
|
|
|
position: absolute;
|
|
|
top: 52px;
|
|
|
width: calc(100% - 32px);
|
|
|
- padding: 0 16px;
|
|
|
- .info_content {
|
|
|
- background: #ffffff;
|
|
|
- box-shadow: 0px 0px 8px 0px rgba(51, 51, 51, 0.08);
|
|
|
- border-radius: 4px;
|
|
|
+ margin: 0 16px;
|
|
|
+ background: #ffffff;
|
|
|
+ box-shadow: 0px 0px 8px 0px rgba(51, 51, 51, 0.08);
|
|
|
+ border-radius: 4px;
|
|
|
+ display: flex;
|
|
|
+ align-items: center;
|
|
|
+ justify-content: space-around;
|
|
|
+ padding: 16px 0;
|
|
|
+ .function_item {
|
|
|
display: flex;
|
|
|
+ flex-direction: column;
|
|
|
align-items: center;
|
|
|
- justify-content: space-between;
|
|
|
- padding: 16px 30px;
|
|
|
- .content_item {
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
- align-items: center;
|
|
|
- justify-content: center;
|
|
|
- span {
|
|
|
- height: 20px;
|
|
|
- font-size: 14px;
|
|
|
- font-weight: 400;
|
|
|
- color: #697081;
|
|
|
- line-height: 20px;
|
|
|
- margin-top: 4px;
|
|
|
- }
|
|
|
+ justify-content: center;
|
|
|
+ span {
|
|
|
+ height: 20px;
|
|
|
+ font-size: 14px;
|
|
|
+ font-weight: 400;
|
|
|
+ color: #697081;
|
|
|
+ line-height: 20px;
|
|
|
+ margin-top: 4px;
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
- .card_list {
|
|
|
+ .info_list {
|
|
|
+ max-height: calc(100% - 114px - 42px - 20px);
|
|
|
padding: 0 16px;
|
|
|
+ overflow-y: auto;
|
|
|
.sub_title {
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- justify-content: space-between;
|
|
|
margin: 12px 0 6px 0;
|
|
|
- span {
|
|
|
+ .title {
|
|
|
height: 20px;
|
|
|
font-size: 14px;
|
|
|
- font-weight: 600;
|
|
|
+ font-weight: 500;
|
|
|
color: #0c1935;
|
|
|
line-height: 20px;
|
|
|
}
|
|
|
.function_btn {
|
|
|
display: flex;
|
|
|
align-items: center;
|
|
|
- span {
|
|
|
+ .van-col {
|
|
|
height: 16px;
|
|
|
font-size: 12px;
|
|
|
font-weight: 400;
|
|
@@ -349,48 +427,38 @@ export default {
|
|
|
box-shadow: 0px 0px 4px 0px rgba(51, 51, 51, 0.08);
|
|
|
border-radius: 4px;
|
|
|
padding: 16px 30px;
|
|
|
- display: flex;
|
|
|
- align-items: center;
|
|
|
- justify-content: space-between;
|
|
|
- .item_info {
|
|
|
- display: flex;
|
|
|
- flex-direction: column;
|
|
|
- align-items: center;
|
|
|
- justify-content: center;
|
|
|
- .label {
|
|
|
+ .van-col {
|
|
|
+ height: 16px;
|
|
|
+ font-size: 12px;
|
|
|
+ font-weight: 400;
|
|
|
+ color: #666666;
|
|
|
+ line-height: 16px;
|
|
|
+ }
|
|
|
+ .count_up {
|
|
|
+ margin-top: 4px;
|
|
|
+ height: 22px;
|
|
|
+ font-size: 20px;
|
|
|
+ font-weight: 500;
|
|
|
+ color: #0c1935;
|
|
|
+ line-height: 22px;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ .list_table {
|
|
|
+ padding: 8px 16px;
|
|
|
+ .table_header {
|
|
|
+ padding: 8px 0;
|
|
|
+ border-bottom: 1px solid #eeeeee;
|
|
|
+ .van-col {
|
|
|
height: 16px;
|
|
|
font-size: 12px;
|
|
|
- font-weight: 400;
|
|
|
- color: #697081;
|
|
|
+ font-weight: 600;
|
|
|
+ color: #999999;
|
|
|
line-height: 16px;
|
|
|
}
|
|
|
- .count_up {
|
|
|
- margin-top: 4px;
|
|
|
- height: 22px;
|
|
|
- font-size: 20px;
|
|
|
- font-weight: 500;
|
|
|
- color: #0c1935;
|
|
|
- line-height: 22px;
|
|
|
- }
|
|
|
}
|
|
|
- }
|
|
|
- .list_table {
|
|
|
- padding: 16px 20px;
|
|
|
- .table_info {
|
|
|
- .table_header {
|
|
|
- display: flex;
|
|
|
- justify-content: space-between;
|
|
|
- padding-bottom: 8px;
|
|
|
- border-bottom: 1px solid #eeeeee;
|
|
|
-
|
|
|
- span {
|
|
|
- height: 16px;
|
|
|
- font-size: 12px;
|
|
|
- font-weight: 600;
|
|
|
- color: #9da0ac;
|
|
|
- line-height: 16px;
|
|
|
- }
|
|
|
- }
|
|
|
+ .table_body {
|
|
|
+ padding: 12px 0;
|
|
|
+ border-bottom: 1px solid #eeeeee;
|
|
|
}
|
|
|
}
|
|
|
}
|