提交 33b42459 authored 作者: 何忠建's avatar 何忠建

首页工作台

上级 3f0f5f9f
...@@ -3,6 +3,7 @@ import Vue from 'vue' ...@@ -3,6 +3,7 @@ import Vue from 'vue'
import {UI_CACHE_DB_DICT_DATA } from "@/store/mutation-types" import {UI_CACHE_DB_DICT_DATA } from "@/store/mutation-types"
// 首页统计 // 首页统计
const homeDataStatistics = (params)=>getAction("/company/homepage/dataStatistics",params); const homeDataStatistics = (params)=>getAction("/company/homepage/dataStatistics",params);
const companyNoticeList = (params)=>getAction("/property-company/notice/companyNotice/list",params);
//角色管理 //角色管理
const addRole = (params)=>postAction("/sys/role/add",params); const addRole = (params)=>postAction("/sys/role/add",params);
const editRole = (params)=>putAction("/sys/role/edit",params); const editRole = (params)=>putAction("/sys/role/edit",params);
...@@ -116,6 +117,7 @@ export const transitRESTful = { ...@@ -116,6 +117,7 @@ export const transitRESTful = {
export { export {
homeDataStatistics, homeDataStatistics,
companyNoticeList,
addRole, addRole,
editRole, editRole,
checkRoleCode, checkRoleCode,
......
...@@ -3,16 +3,17 @@ ...@@ -3,16 +3,17 @@
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }"> <a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }">
<div class="statistics"> <div class="statistics">
<img class="icon" src="~@/assets/guaz.png" alt=""> <div class="icon" style="background-color:#1890ff;"><a-icon type="team" /></div>
<!-- <img class="icon" src="~@/assets/guaz.png" alt=""> -->
<div> <div>
<p style="color:#666;margin-bottom:5px;">小区总数</p> <p style="color:#666;margin-bottom:5px;">小区总数</p>
<p style="margin-bottom:0;color:#333;font-size:28px;line-height:1;">{{pageForm.communityNum}}</p> <p style="margin-bottom:0;color:#333;font-size:28px;line-height:1;">{{pageForm.communityNum}}</p>
</div> </div>
</div> </div>
</a-col> </a-col>
<a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }"> <a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }">
<div class="statistics"> <div class="statistics">
<img class="icon" src="~@/assets/guaz.png" alt=""> <div class="icon" style="background-color:#7262fd;"><a-icon type="home" /></div>
<div> <div>
<p style="color:#666;margin-bottom:5px;">房屋总数量</p> <p style="color:#666;margin-bottom:5px;">房屋总数量</p>
<p style="margin-bottom:0;color:#333;font-size:28px;line-height:1;">{{pageForm.roomNum}}</p> <p style="margin-bottom:0;color:#333;font-size:28px;line-height:1;">{{pageForm.roomNum}}</p>
...@@ -21,7 +22,7 @@ ...@@ -21,7 +22,7 @@
</a-col> </a-col>
<a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }"> <a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }">
<div class="statistics"> <div class="statistics">
<img class="icon" src="~@/assets/guaz.png" alt=""> <div class="icon" style="background-color:#ffaa00;"><a-icon type="user" /></div>
<div> <div>
<p style="color:#666;margin-bottom:5px;">住户总数量</p> <p style="color:#666;margin-bottom:5px;">住户总数量</p>
<p style="margin-bottom:0;color:#333;font-size:28px;line-height:1;">{{pageForm.ownerNum}}</p> <p style="margin-bottom:0;color:#333;font-size:28px;line-height:1;">{{pageForm.ownerNum}}</p>
...@@ -30,7 +31,7 @@ ...@@ -30,7 +31,7 @@
</a-col> </a-col>
<a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }"> <a-col :sm="24" :md="12" :xl="6" :style="{ marginBottom: '24px' }">
<div class="statistics"> <div class="statistics">
<img class="icon" src="~@/assets/guaz.png" alt=""> <div class="icon" style="background-color:#52c41a;"><a-icon type="pay-circle" /></div>
<div> <div>
<p style="color:#666;margin-bottom:5px;">年度累计已缴物业费</p> <p style="color:#666;margin-bottom:5px;">年度累计已缴物业费</p>
<p style="margin-bottom:0;color:#333;font-size:28px;line-height:1;">{{pageForm.propertyYearFee}}</p> <p style="margin-bottom:0;color:#333;font-size:28px;line-height:1;">{{pageForm.propertyYearFee}}</p>
...@@ -41,141 +42,182 @@ ...@@ -41,141 +42,182 @@
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :sm="24" :md="12" :xl="12" :style="{ marginBottom: '24px' }"> <a-col :sm="24" :md="12" :xl="12" :style="{ marginBottom: '24px' }">
<pie title="缴费率" :dataSource="pieData" /> <div class="pay-cost t-box">
<h3 class="box-title">缴费率</h3>
<pie :dataSource="payData" />
</div>
</a-col> </a-col>
<a-col :sm="24" :md="12" :xl="12" :style="{ marginBottom: '24px' }"> <a-col :sm="24" :md="12" :xl="12" :style="{ marginBottom: '24px' }">
<div> <div class="announcement t-box">
<h5>园区公告</h5> <div class="title">
<h3 class="box-title">最新公告</h3><a-button size="small" @click="toMore()">查看更多</a-button> <a-button
size="small" @click="toMore()">发布公告</a-button>
</div>
<ul> <ul>
<li>清明节放假通知,213231312313</li> <li v-for="(item, index) in noticeList" :key="index"><a @click="toDetails(item)">{{ item.noticeTitle}}</a>
<li>5月1日停电通知,因1233233 园区公告 清明节放假通知,21323131231323233</li> </li>
</ul> </ul>
</div> </div>
</a-col> </a-col>
</a-row> </a-row>
<a-card :loading="loading" :bordered="false" :body-style="{padding: '0'}"> <div class="salesCard t-box">
<div class="salesCard"> <h3 class="box-title">缴费统计</h3>
<div class="extra-type"> <div class="extra-type">
<a>物业</a> <a-radio-group @change="handleSizeChange" :value="typeCode">
<a>水费</a> <a-radio-button value="SFLX00001">物业费</a-radio-button>
<a>电费</a> <a-radio-button value="SFLX00002">水费</a-radio-button>
<a>燃气费</a> <a-radio-button value="SFLX00003">电费</a-radio-button>
</div> <a-radio-button value="SFLX00004">燃气费</a-radio-button>
<div> <a-radio-button value="SFLX00005">暖气费</a-radio-button>
<bar :dataSource="barData"/> </a-radio-group>
</div> </div>
<div>
<bar :dataSource="barData" style="padding: 0;" />
</div> </div>
</a-card> </div>
<a-row :gutter="24"> <a-row :gutter="24">
<a-col :sm="24" :md="12" :xl="12" :style="{ marginBottom: '24px' }"> <a-col :sm="24" :md="12" :xl="12" :style="{ marginBottom: '24px' }">
<pie title="报修统计" :dataSource="pieData" /> <div class="pay-cost t-box">
<h3 class="box-title">报修统计</h3>
<pie :dataSource="repairData" />
</div>
</a-col> </a-col>
<a-col :sm="24" :md="12" :xl="12" :style="{ marginBottom: '24px' }"> <a-col :sm="24" :md="12" :xl="12" :style="{ marginBottom: '24px' }">
<pie title="投诉统计" :dataSource="pieData" /> <div class="pay-cost t-box">
<h3 class="box-title">投诉统计</h3>
<pie :dataSource="complaintsData" />
</div>
</a-col> </a-col>
</a-row> </a-row>
<a-modal :title="noticeTitle" :visible="visible" @cancel="handleCancel" :footer="null" width="40%">
<p v-html="noticeContent "></p>
</a-modal>
</div> </div>
</template> </template>
<script> <script>
import Bar from '@/components/chart/Bar' import Bar from '@/components/chart/Bar'
import Pie from '@/components/chart/Pie' import Pie from '@/components/chart/Pie'
import { homeDataStatistics } from "@/api/api" import { homeDataStatistics, companyNoticeList } from '@/api/api'
const barData = [] // const barData = []
for (let i = 0; i < 12; i += 1) { // for (let i = 0; i < 12; i += 1) {
barData.push({ // barData.push({
x: `${i + 1}月`, // x: `${i + 1}月`,
y: Math.floor(Math.random() * 1000) + 200 // y: 1000,
}) // })
} // }
export default { export default {
name: "Analysis", name: 'Analysis',
components: { components: {
Bar, Bar,
Pie Pie,
},
data() {
return {
pageForm: {},
loading: true,
payData: [],
noticeList: [],
typeCode: 'SFLX00001',
repairData: [],
complaintsData: [],
barData: [],
noticeTitle: '',
noticeContent: '',
visible: false,
}
},
created() {
this.onDetail()
this.companyNotice()
},
methods: {
async onDetail(typeCode) {
let { result } = await homeDataStatistics({ typeCode: typeCode })
this.pageForm = { ...result }
this.payData = [
{ item: '物业费', count: result.propertyFeeRate || 0 },
{ item: '水费', count: result.waterRate || 0 },
{ item: '电费', count: result.electricRate || 0 },
{ item: '燃气费', count: result.gasFeeRate || 0 },
{ item: '暖气费', count: result.heatFeeRate || 0 },
]
this.barData = result.monthlyStatistics.map((item) => {
return {
x: item.monthNum + '月',
y: item.totalMoney,
}
})
this.repairData = [
{ item: '全部报修', count: result.repairTotal || 0 },
{ item: '待派单', count: result.waitDispatch || 0 },
{ item: '维修中', count: result.inRepair || 0 },
{ item: '已完成', count: result.repairOver || 0 },
]
this.complaintsData = [
{ item: '全部投诉', count: result.complaintTotal || 0 },
{ item: '待处理', count: result.waitHandle || 0 },
{ item: '已完成', count: result.complaintOver || 0 },
]
this.loading = !this.loading
}, },
data() { async companyNotice() {
return { let { result } = await companyNoticeList({ pageNo: 1, pageSize: 9 })
pageForm: {}, this.noticeList = result.records
loading: true,
barData,
pieData: [
{ item: '物业费', count: 40 },
{ item: '水费', count: 21 },
{ item: '电费', count: 17 },
{ item: '燃气费', count: 13 },
{ item: '停车费', count: 9 }
]
}
}, },
created() { toMore() {
this.onDetail() this.$router.push({
path: '/property/NoticeList',
})
}, },
methods: { toDetails(item) {
async onDetail() { this.noticeTitle = item.noticeTitle
let {result} = await homeDataStatistics() this.noticeContent = item.noticeContent
this.pageForm = {...result} this.visible = true
this.loading = !this.loading },
handleCancel(e) {
// //当前物业公司小区数量 this.visible = false
// private Integer communityNum; },
// //当前物业公司房屋数量 handleSizeChange(e) {
// private Integer roomNum; let that = this
// //当前物业公司业主数量 this.typeCode = e.target.value
// private Integer ownerNum; that.onDetail(this.typeCode)
// //当前物业公司累积缴纳物业费 },
// private BigDecimal propertyYearFee; },
// //物业费占比 }
// private BigDecimal propertyFeeRate;
// //水费占比
// private BigDecimal waterRate;
// //电费占比
// private BigDecimal electricRate;
// //暖气费占比
// private BigDecimal gasFeeRate;
// //按月统计费用
// private List<MonthlyStatisticsVo> monthlyStatistics;
// //报修总数
// private Integer repairTotal;
// //报修待派单数量
// private Integer waitDispatch;
// //报修维修中数量
// private Integer inRepair;
// //报修完成数量
// private Integer repairOver;
// //全部投诉数量
// private Integer complaintTotal;
// //投诉待处理数量
// private Integer waitHandle;
// //投诉已处理数量
// private Integer complaintOver;
}
}
}
</script> </script>
<style lang="less" scoped> <style lang="less" scoped>
.hone-content-box { .hone-content-box {
background-color: #fff;
padding: 16px; padding: 16px;
.statistics { .statistics {
// flex: none; // flex: none;
width: 100%; background: #fff;
height: 90px; width: 100%;
box-sizing: border-box; height: 90px;
border: 1px solid #e0dfdf; box-sizing: border-box;
border: 1px solid #e0dfdf;
display: flex;
align-items: center;
padding-left: 20px;
.icon {
width: 60px;
height: 60px;
border-radius: 60px;
margin-right: 12px;
display: flex; display: flex;
text-align: center;
align-items: center; align-items: center;
padding-left: 20px; justify-content: center;
.icon { .anticon {
width: 64px; font-size: 32px;
height: 64px; color: #ffffff;
margin-right: 12px;
} }
} }
}
.pay-box { .pay-box {
display: flex; display: flex;
.left-box { .left-box {
...@@ -184,4 +226,52 @@ ...@@ -184,4 +226,52 @@
} }
} }
} }
.t-box {
background: #fff;
padding: 15px;
border: 1px solid #e0dfdf;
}
.box-title {
font-weight: bold;
margin-bottom: 15px;
display: inline-block;
padding-left: 10px;
border-left: 3px solid #1890ff;
height: 20px;
line-height: 20px;
}
.pay-cost {
height: 340px;
}
.announcement {
height: 340px;
.title {
.ant-btn {
float: right;
margin-left: 10px;
}
}
ul {
padding-left: 5px;
li {
list-style-type: none;
height: 30px;
line-height: 30px;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
a {
color: #666;
}
}
}
}
.salesCard {
margin-bottom: 25px;
}
.extra-type {
a {
margin-right: 20px;
}
}
</style> </style>
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论