From e22d7ad7fe9d7d021a65cb6e856c28b3638a75a2 Mon Sep 17 00:00:00 2001
From: yangxin <2509699647@qq.com>
Date: Thu, 27 Mar 2025 17:54:48 +0800
Subject: [PATCH] 最新
---
admin-web-master/src/api/cereBusinessInfo.js | 9 +++++++++
admin-web-master/src/views/rent/InvestmentAnalysis/index.vue | 1 +
admin-web-master/src/views/scheme/statistics.vue | 286 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++--------------------------------------------------------------------------------------------------------------------------------
lvdao-miniapp/pagesA/rentPay/rentPayDetails.vue | 254 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------------------------------------------------------------------------------------
4 files changed, 302 insertions(+), 248 deletions(-)
diff --git a/admin-web-master/src/api/cereBusinessInfo.js b/admin-web-master/src/api/cereBusinessInfo.js
index 5024f11..f99afa1 100644
--- a/admin-web-master/src/api/cereBusinessInfo.js
+++ b/admin-web-master/src/api/cereBusinessInfo.js
@@ -52,3 +52,12 @@ export function getInvestmentStatistics(data) {
})
}
+// 招商方案统计
+export function getInvestmentPlanStatistics(data) {
+ return request({
+ url: '/attractInvestmentStatisticsController/getInvestmentPlanStatistics',
+ method: 'post',
+ data
+ })
+}
+
diff --git a/admin-web-master/src/views/rent/InvestmentAnalysis/index.vue b/admin-web-master/src/views/rent/InvestmentAnalysis/index.vue
index d2e5f9b..2dad1a6 100644
--- a/admin-web-master/src/views/rent/InvestmentAnalysis/index.vue
+++ b/admin-web-master/src/views/rent/InvestmentAnalysis/index.vue
@@ -232,6 +232,7 @@
}
],
+
graphic: [
{
type: 'text',
diff --git a/admin-web-master/src/views/scheme/statistics.vue b/admin-web-master/src/views/scheme/statistics.vue
index 31820fa..41bad2c 100644
--- a/admin-web-master/src/views/scheme/statistics.vue
+++ b/admin-web-master/src/views/scheme/statistics.vue
@@ -7,14 +7,14 @@
-
+
import {
- getInvestmentStatistics
+ getInvestmentPlanStatistics
} from '@/api/cereBusinessInfo'
import * as echarts from 'echarts'
export default {
@@ -129,56 +129,42 @@
const chartDom = this.$refs.shop2TJ
// 初始化 ECharts 实例
const myChart = echarts.init(chartDom);
- // 模拟数据
- const shopCount = 50;
- const adCount = 30;
- const venueCount = 20;
- const totalCount = shopCount + adCount + venueCount;
+
const option = {
tooltip: {
trigger: 'item',
- formatter: '{a}
{b}: {c} ({d}%)'
+ formatter: function (params) {
+ const dataItem = val.find(item => item.businessPurpose === params.name);
+ return `${params.name}
数量: ${dataItem.num}
占比: ${dataItem.proportion}%`;
+ }
},
legend: {
orient: 'horizontal', // 横向展示
left: 'center', // 居中显示
- data: ['商铺', '广告位', '场地']
+ data: val.map(item => item.businessPurpose)
},
series: [
{
+ color: ['#4A90E2', '#37c954','#ff94e8', '#7a69d8','#aaffe7', '#8cd89b','#feff89', '#d8d6d5'],
name: '资源分布',
type: 'pie',
- radius: ['50%', '70%'],
+ radius: ['0%', '60%'],
avoidLabelOverlap: false,
label: {
show: true,
position: 'outside',
- formatter: '{b}: {c}'
+ formatter: '{b}: {c}%'
},
labelLine: {
show: true
},
- data: [
- { value: shopCount, name: '商铺' },
- { value: adCount, name: '广告位' },
- { value: venueCount, name: '场地' }
- ]
+ data: val.map(item => ({
+ value: item.proportion,
+ name: item.businessPurpose
+ }))
},
- {
- name: '总量',
- type: 'pie',
- radius: ['0%', '0%'], // 不显示圆形
- label: {
- show: true,
- position: 'center',
- formatter: `总量: ${totalCount}`,
- fontSize: 20
- },
- data: [
- { value: totalCount, name: '总量' }
- ]
- }
+
]
};
// 使用刚指定的配置项和数据显示图表
@@ -191,25 +177,38 @@
const chartDom = this.$refs.shop1ZX;
const myChart = echarts.init(chartDom)
-
- // 模拟数据
- const shopCount = 50;
- const adCount = 30;
- const venueCount = 20;
- const totalCount = shopCount + adCount + venueCount;
+ let shopCount = 0;
+ let adCount = 0;
+ let venueCount = 0;
+ let totalCount = 0;
+ val.forEach(item => {
+ totalCount += item.num;
+ if (item.businessPurpose === '商铺合同') {
+ shopCount = item.proportion;
+ } else if (item.businessPurpose === '场地合同') {
+ venueCount = item.proportion;
+ } else if (item.businessPurpose === '广告位合同') {
+ adCount = item.proportion;
+ }
+ });
const option = {
tooltip: {
trigger: 'item',
- formatter: '{a}
{b}: {c} ({d}%)'
+ formatter: function (params) {
+ const dataItem = val.find(item => item.businessPurpose === params.name);
+ return `${params.name}
数量: ${dataItem.num}
占比: ${dataItem.proportion}%`;
+ }
},
legend: {
- orient: 'horizontal', // 横向展示
- left: 'center', // 居中显示
- data: ['商铺', '广告位', '场地']
+ orient: 'horizontal',
+ left: 'center',
+ data: val.map(item => item.businessPurpose)
},
series: [
+
{
+ color: ['#4A90E2', '#37c954','#ff94e8', '#7a69d8','#aaffe7', '#8cd89b','#feff89', '#d8d6d5'],
name: '资源分布',
type: 'pie',
radius: ['50%', '70%'],
@@ -217,30 +216,27 @@
label: {
show: true,
position: 'outside',
- formatter: '{b}: {c}'
+ formatter: '{b}: {c}%'
},
labelLine: {
show: true
},
- data: [
- { value: shopCount, name: '商铺' },
- { value: adCount, name: '广告位' },
- { value: venueCount, name: '场地' }
- ]
+ data: val.map(item => ({
+ value: item.proportion,
+ name: item.businessPurpose
+ }))
},
{
- name: '总量',
- type: 'pie',
- radius: ['0%', '0%'], // 不显示圆形
- label: {
- show: true,
- position: 'center',
- formatter: `总量: ${totalCount}`,
- fontSize: 20
- },
- data: [
- { value: totalCount, name: '总量' }
- ]
+ name: '总数',
+ type: 'pie',
+ radius: ['0%', '0%'],
+ label: {
+ show: true,
+ position: 'center',
+ formatter: `总数: ${totalCount}`,
+ fontSize: 20
+ },
+ data: [{ value: totalCount, name: '总数' }]
}
]
};
@@ -251,15 +247,21 @@
charDam3(val) {
let Dom = this.$refs.shop1TJ
let myChart = echarts.init(Dom)
- // val.sort((a, b) => {
- // return new Date(a.mouth) - new Date(b.mouth);
- // });
- // const months = val.map(item => item.mouth);
- // const intentMerchants = val.map(item => item.intention);
- // const signedMerchants = val.map(item => item.signContract);
- // 模拟月度签约数据
- const months = ['1月', '2月', '3月', '4月', '5月', '6月', '7月', '8月', '9月', '10月', '11月', '12月'];
- const contractCounts = [12, 15, 20, 18, 22, 25, 28, 30, 26, 24, 21, 23];
+ // 处理数据
+ const months = Object.keys(val).reverse(); // 反转月份顺序,最新月份在前
+ const shopData = [];
+ const venueData = [];
+ const adData = [];
+
+ months.forEach(month => {
+ const monthData = val[month];
+ const shop = monthData.find(item => item.contractType === '商铺合同')?.contractCount || 0;
+ const venue = monthData.find(item => item.contractType === '场地合同')?.contractCount || 0;
+ const ad = monthData.find(item => item.contractType === '广告位合同')?.contractCount || 0;
+ shopData.push(shop);
+ venueData.push(venue);
+ adData.push(ad);
+ });
const option = {
tooltip: {
@@ -272,33 +274,37 @@
},
yAxis: {
type: 'value',
- name: '签约数'
+ name: '合同数量'
},
series: [
{
- name: '签约数',
+ name: '商铺合同',
type: 'line',
- data: contractCounts,
+ data: shopData,
symbol: 'circle',
- lineStyle: {
- color: '#4A90E2'
- },
- itemStyle: {
- color: '#4A90E2'
- },
- areaStyle: {
- color: new echarts.graphic.LinearGradient(
- 0, 0, 0, 1,
- [
- { offset: 0, color: 'rgba(74, 144, 226, 0.3)' },
- { offset: 1, color: 'rgba(74, 144, 226, 0.1)' }
- ]
- )
- }
+ lineStyle: { color: '#4A90E2' },
+ itemStyle: { color: '#4A90E2' }
+ },
+ {
+ name: '场地合同',
+ type: 'line',
+ data: venueData,
+ symbol: 'square',
+ lineStyle: { color: '#52C41A' },
+ itemStyle: { color: '#52C41A' }
+ },
+ {
+ name: '广告位合同',
+ type: 'line',
+ data: adData,
+ symbol: 'triangle',
+ lineStyle: { color: '#FF7800' },
+ itemStyle: { color: '#FF7800' }
}
]
};
+
option && myChart.setOption(option);
window.addEventListener('resize', function() {
myChart.resize();
@@ -313,48 +319,72 @@
const myChart = echarts.init(chartDom);
- // 模拟租金价格数据,这里假设是按月份统计
- const months = ['1月', '2月', '3月', '4月', '5月', '6月'];
- const rentPrices = [50, 52, 55, 53, 56, 58];
-
- const option = {
- tooltip: {
- trigger: 'axis'
- },
- xAxis: {
- type: 'category',
- data: months,
- boundaryGap: false
- },
- yAxis: {
- type: 'value',
- name: '租金价格(元/m²)'
- },
- series: [
- {
+ const allDates = [];
+ const leaseTerms = ['季', '年', '日', '月'];
+ const seriesData = {
+ '季': [],
+ '年': [],
+ '日': [],
+ '月': []
+ };
+
+ // 收集所有日期
+ leaseTerms.forEach(term => {
+ val[term].forEach(item => {
+ if (!allDates.includes(item.createDay)) {
+ allDates.push(item.createDay);
+ }
+ });
+ });
+
+ // 按日期排序
+ allDates.sort();
+
+ // 填充各租赁期限的数据
+ leaseTerms.forEach(term => {
+ allDates.forEach(date => {
+ const found = val[term].find(item => item.createDay === date);
+ seriesData[term].push(found ? found.rentalPrice : null);
+ });
+ });
+
+ const option = {
+ tooltip: {
+ trigger: 'axis',
+ axisPointer: {
+ type: 'cross',
+ crossStyle: {
+ color: '#999'
+ }
+ }
+ },
+ legend: {
+ data: leaseTerms
+ },
+ xAxis: {
+ type: 'category',
+ data: allDates
+ },
+ yAxis: {
+ type: 'value',
name: '租金价格',
+ axisLabel: {
+ formatter: '{value}'
+ }
+ },
+ series: leaseTerms.map(term => ({
+ name: term,
type: 'line',
- data: rentPrices,
+ data: seriesData[term],
symbol: 'circle',
- lineStyle: {
- color: '#4A90E2'
+ label: {
+ show: false
},
- itemStyle: {
- color: '#4A90E2'
- },
- areaStyle: {
- color: new echarts.graphic.LinearGradient(
- 0, 0, 0, 1,
- [
- { offset: 0, color: 'rgba(74, 144, 226, 0.3)' },
- { offset: 1, color: 'rgba(74, 144, 226, 0.1)' }
- ]
- )
+ lineStyle: {
+ width: 2
}
- }
- ]
- };
-
+ }))
+ };
// 使用刚指定的配置项和数据显示图表
option && myChart.setOption(option)
window.addEventListener('resize', function() {
@@ -364,11 +394,11 @@
},
async getAll() {
- const res = await getInvestmentStatistics(this.pageindex)
- this.charDam3()
- this.charDam1()
- this.charDam()
- this.charDam5()
+ const res = await getInvestmentPlanStatistics(this.pageindex)
+ this.charDam3(res.data.monthlyContractVOList)
+ this.charDam1(res.data.resourceUsageRatioVOList)
+ this.charDam(res.data.businessTypeProportionList)
+ this.charDam5(res.data.rentTrendMap)
},
diff --git a/lvdao-miniapp/pagesA/rentPay/rentPayDetails.vue b/lvdao-miniapp/pagesA/rentPay/rentPayDetails.vue
index c73001e..0b36dfd 100644
--- a/lvdao-miniapp/pagesA/rentPay/rentPayDetails.vue
+++ b/lvdao-miniapp/pagesA/rentPay/rentPayDetails.vue
@@ -5,18 +5,27 @@
{{pageIndex.time}}年
- {{allPay}}
+
+ {{allPay}}
+
+
-
+
- {{item.dingPay}}
+
+ {{item.dingPay}}
+
- {{value.tenementOrderParent==''?value.tenementOrder:value.tenementOrderParent}}
- {{value.paymentAmount}}
+
+ {{value.tenementOrderParent==''?value.tenementOrder:value.tenementOrderParent}}
+
+ {{value.paymentAmount}}
+
+
{{value.payState==1?'支付成功':''}}
@@ -37,141 +46,146 @@
return {
show: false,
dataList: [],
- allPay:0,
- pageIndex:{
- time:''
+ allPay: 0,
+ pageIndex: {
+ time: ''
},
- merchants:''
+ merchants: ''
}
},
- onShow(){
+ onShow() {
this.pageIndex.time = this.getCurrentYear()
- },
- onLoad(options) {
- if(options.msg && options.merchants){
- this.allPay = 0
- let receivedMsg = JSON.parse(options.msg)
- this.merchants = options.merchants
- this.getAll(receivedMsg.list)
- }
- },
+ },
+ onLoad(options) {
+ if (options.msg && options.merchants) {
+ this.allPay = 0
+ let receivedMsg = JSON.parse(options.msg)
+ this.merchants = options.merchants
+ this.getAll(receivedMsg.list)
+ }
+ },
methods: {
- getAll(receivedMsg){
- let totalPay= 0
- const redList = []
- // 用于存储 tenementOrderParent 相同的项
- const groupedItems = {};
- // 遍历 receivedMsg.list 数组
- receivedMsg.forEach(item => {
- if(item.payState ==1){
- totalPay += item.paymentAmount
- if (item.tenementOrderParent === '') {
- // 如果 tenementOrderParent 为空,添加 dingPay 字段并添加到 redList
- let newItem = { ...item,ziList:[], dingPay: item.paymentAmount };
- newItem.ziList.push(item)
- redList.push(newItem);
- } else {
- // 如果 tenementOrderParent 不为空,将相同 tenementOrderParent 的项分组
- if (!groupedItems[item.tenementOrderParent]) {
- groupedItems[item.tenementOrderParent] = {
- ziList: [],
- dingPay: 0
- };
- }
- groupedItems[item.tenementOrderParent].ziList.push(item);
- groupedItems[item.tenementOrderParent].dingPay += item.paymentAmount;
- groupedItems[item.tenementOrderParent].paymentTime = item.paymentTime;
- groupedItems[item.tenementOrderParent].payDay = item.payDay;
- groupedItems[item.tenementOrderParent].payState = item.payState;
- }
- }
-
- });
- // 将分组后的对象添加到 redList
- for (const key in groupedItems) {
- redList.push({
- tenementOrderParent: key,
- ...groupedItems[key]
- });
- }
-
- // receivedMsg.list.map(item=>{
- // let obj ={
- // ...item,
- // dingPay:0,
- // ziList:[]
- // }
- // if (item.payState == 1) {
- // obj.ziList.push(item)
- // if(item.tenementOrderParent ){
-
- // }
- // obj.dingPay +=item.paymentAmount
- // this.orderPay+=item.paymentAmount
- // this.allPay+=item.paymentAmount
- // redList.push(obj)
- // }
-
- // })
- this.allPay = totalPay;
- this.dataList = redList
-
+ getAll(receivedMsg) {
+ let totalPay = 0
+ const redList = []
+ // 用于存储 tenementOrderParent 相同的项
+ const groupedItems = {};
+ // 遍历 receivedMsg.list 数组
+ receivedMsg.forEach(item => {
+ if (item.payState == 1) {
+ totalPay += item.paymentAmount
+ if (item.tenementOrderParent === '') {
+ // 如果 tenementOrderParent 为空,添加 dingPay 字段并添加到 redList
+ let newItem = {
+ ...item,
+ ziList: [],
+ dingPay: item.paymentAmount
+ };
+ newItem.ziList.push(item)
+ redList.push(newItem);
+ } else {
+ // 如果 tenementOrderParent 不为空,将相同 tenementOrderParent 的项分组
+ if (!groupedItems[item.tenementOrderParent]) {
+ groupedItems[item.tenementOrderParent] = {
+ ziList: [],
+ dingPay: 0
+ };
+ }
+ groupedItems[item.tenementOrderParent].ziList.push(item);
+ groupedItems[item.tenementOrderParent].dingPay += item.paymentAmount;
+ groupedItems[item.tenementOrderParent].paymentTime = item.paymentTime;
+ groupedItems[item.tenementOrderParent].payDay = item.payDay;
+ groupedItems[item.tenementOrderParent].payState = item.payState;
+ }
+ }
+
+ });
+ // 将分组后的对象添加到 redList
+ for (const key in groupedItems) {
+ redList.push({
+ tenementOrderParent: key,
+ ...groupedItems[key]
+ });
+ }
+
+ // receivedMsg.list.map(item=>{
+ // let obj ={
+ // ...item,
+ // dingPay:0,
+ // ziList:[]
+ // }
+ // if (item.payState == 1) {
+ // obj.ziList.push(item)
+ // if(item.tenementOrderParent ){
+
+ // }
+ // obj.dingPay +=item.paymentAmount
+ // this.orderPay+=item.paymentAmount
+ // this.allPay+=item.paymentAmount
+ // redList.push(obj)
+ // }
+
+ // })
+ this.allPay = totalPay;
+ this.dataList = redList
+
},
getCurrentYear() {
- const year = new Date().getFullYear();
- return `${year}`;
+ const year = new Date().getFullYear();
+ return `${year}`;
},
- confirm(e){
- this.pageIndex.time = e.year
-
- const { firstDay, lastDay } = this.getYearFirstAndLastDay(e.year)
+ confirm(e) {
+ this.pageIndex.time = e.year
+ const {
+ firstDay,
+ lastDay
+ } = this.getYearFirstAndLastDay(e.year)
this.$http.sendRequest('/cerePropertyOrder/queryByName', 'POST', {
- relatedMerchants:this.merchants,
- paymentTimeStart:firstDay,
- paymentTimeEnd:lastDay
+ relatedMerchants: this.merchants,
+ paymentTimeStart: firstDay,
+ paymentTimeEnd: lastDay
}, 1).then(res => {
if (res.data.data.length > 0) {
-
this.getAll(res.data.data[0].cerePropertyOrderList)
- }else{
- this.dataList=[]
+ } else {
+ this.dataList = []
this.allPay = 0
}
- })
+ })
},
getYearFirstAndLastDay(year) {
console.log(year)
- const firstDay = new Date(year, 0, 1);
- const lastDay = new Date(year, 11, 31);
- console.log(firstDay.toISOString().split('T'))
- return {
- firstDay: firstDay.toISOString().split('T')[0],
- lastDay: lastDay.toISOString().split('T')[0]
- }
+ const firstDay = new Date(year, 0, 1);
+ const lastDay = new Date(year, 11, 31);
+ console.log(firstDay.toISOString().split('T'))
+ return {
+ firstDay: firstDay.toISOString().split('T')[0],
+ lastDay: lastDay.toISOString().split('T')[0]
+ }
},
formatDateTime(dateTimeStr) {
- // 创建 Date 对象
- const date = new Date(dateTimeStr);
- // 获取月份,由于 getMonth() 返回值从 0 开始,所以要加 1,并确保为两位数字
- const month = String(date.getMonth() + 1).padStart(2, '0');
- // 获取日期,并确保为两位数字
- const day = String(date.getDate()).padStart(2, '0');
- // 获取小时,并确保为两位数字
- const hours = String(date.getHours()).padStart(2, '0');
- // 获取分钟,并确保为两位数字
- const minutes = String(date.getMinutes()).padStart(2, '0');
-
- // 按照所需格式拼接并返回结果
- return `${month}.${day} ${hours}:${minutes}`;
+ // 创建 Date 对象
+ const date = new Date(dateTimeStr);
+ // 获取月份,由于 getMonth() 返回值从 0 开始,所以要加 1,并确保为两位数字
+ const month = String(date.getMonth() + 1).padStart(2, '0');
+ // 获取日期,并确保为两位数字
+ const day = String(date.getDate()).padStart(2, '0');
+ // 获取小时,并确保为两位数字
+ const hours = String(date.getHours()).padStart(2, '0');
+ // 获取分钟,并确保为两位数字
+ const minutes = String(date.getMinutes()).padStart(2, '0');
+
+ // 按照所需格式拼接并返回结果
+ return `${month}.${day} ${hours}:${minutes}`;
},
formatDate(dateStr) {
- // 使用 split 方法将日期字符串按 - 分割成数组
- const [year, month, day] = dateStr.split('-');
- // 将 month 和 day 转换为数字,去除可能存在的前导零
- const formattedMonth = parseInt(month, 10);
- const formattedDay = parseInt(day, 10);
- // 按照目标格式拼接字符串
- return `${formattedMonth}月${formattedDay}号`;
+ // 使用 split 方法将日期字符串按 - 分割成数组
+ const [year, month, day] = dateStr.split('-');
+ // 将 month 和 day 转换为数字,去除可能存在的前导零
+ const formattedMonth = parseInt(month, 10);
+ const formattedDay = parseInt(day, 10);
+ // 按照目标格式拼接字符串
+ return `${formattedMonth}月${formattedDay}号`;
},
}
}
@@ -179,4 +193,4 @@
\ No newline at end of file
+
\ No newline at end of file
--
libgit2 0.21.4