添加列表

This commit is contained in:
yangjun 2025-07-03 15:33:55 +08:00
parent 5bec7eb5ee
commit 190cccd1f2
5 changed files with 124 additions and 6 deletions

View File

@ -14,6 +14,7 @@ enum Api {
queryXqHyXzList = '/housingestateInfo/blHousingestateInfo/queryXqHyXzList',
queryXqHyTdcsList = '/housingestateInfo/blHousingestateInfo/queryXqHyTdcsList',
queryXqHyTdcsPageList = '/housingestateInfo/blHousingestateInfo/queryXqHyTdcsPageList',
queryXqHyTdzlList = '/housingestateInfo/blHousingestateInfo/queryXqHyTdzlList',
housingestateList = '/zh/hy/queryHousingestateList',
}
@ -23,6 +24,7 @@ enum Api {
* @param params
*/
export const housingestateList = (params) => defHttp.get({ url: Api.housingestateList, params });
export const queryXqHyTdcsPageList = (params) => defHttp.get({ url: Api.queryXqHyTdcsPageList, params });
/**
* api
* @param params

View File

@ -40,3 +40,46 @@ export const superQuerySchema = {
status: {title: '状态',order: 3,view: 'text', type: 'string',},
type: {title: '类型',order: 4,view: 'text', type: 'string',},
};
export const tdcsColumns : BasicColumn[] =[
{
title: '小区名称',
dataIndex: 'name',
key: 'name',
align: 'center'
},
{
title: '投递次数',
dataIndex: 'value',
key: 'value',
align: 'center'
},
{
title: '操作',
key: 'action',
align: 'center',
width: '150px',
}
]
export const xzrsColumns : BasicColumn[] =[
{
title: '小区名称',
dataIndex: 'name',
key: 'name',
align: 'center'
},
{
title: '新增人数',
dataIndex: 'value',
key: 'value',
align: 'center'
},
{
title: '操作',
key: 'action',
align: 'center',
width: '150px',
}
]

View File

@ -22,8 +22,23 @@
<a-select-option :value="item.housingestateId" v-for="item in housingestates" :key="item.housingestateId">{{item.housingestateName}}</a-select-option>
</a-select> -->
</a-col>
<a-col :span="3">
<a-radio-group v-model:value="izList" button-style="solid" @change="loadDate">
<a-radio-button :value="false">统计图</a-radio-button>
<a-radio-button :value="true">列表页</a-radio-button>
</a-radio-group>
</a-col>
</a-row>
<Bar :chartData="dataSource" height="80vh" :option="{ title: { text: '小区新增会员统计', left: 'center' }}" :seriesLabel="{show: true, position: 'top'}" :seriesName="'个数'"></Bar>
<Bar v-show="!izList" :chartData="dataSource" height="80vh" :option="{ title: { text: '小区新增会员统计', left: 'center' }}" :itemStyle="{ normal: {label : {show: true, position: 'top'}}}" :seriesName="'新增人数'"></Bar>
<div v-show="izList" style="margin-top: 20px;">
<a-table :dataSource="dataSource" :columns="xzrsColumns" >
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<a-button type="link" @click="handleView(record)">查看</a-button>
</template>
</template>
</a-table>
</div>
</a-card>
</div>
</template>
@ -33,10 +48,12 @@
import Bar from '/@/components/chart/Bar.vue';
import { queryXqHyXzList,housingestateList } from './HousingestateInfo.api';
import type { Dayjs } from 'dayjs';
import { xzrsColumns } from './HousingestateInfo.data';
const valueFormat = 'YYYY-MM-DD';
const dataSource = ref([]);
const dateValue = ref();
const housingestates = ref();
const izList = ref(false)
const parmas = reactive<any>({
beginTime: '',
@ -78,7 +95,13 @@
}
async function loadDate() {
const res = await queryXqHyXzList(parmas);
if(izList.value){
parmas.pageSize=-1
}else{
parmas.pageSize=10
}
const resData = await queryXqHyXzList(parmas);
const res = resData.records;
dataSource.value = [];
for (let i = 0; i < res.length; i++) {
dataSource.value.push({
@ -103,6 +126,7 @@
if(parmas.type=='0'){
parmas.beginTime=getPreviousDate(2)+' 00:00:00';
parmas.endTime=getPreviousDate(0)+' 23:59:59';
parmas.pageSize=10
}
loadDate();
})

View File

@ -22,8 +22,23 @@
<a-select-option :value="item.housingestateId" v-for="item in housingestates" :key="item.housingestateId">{{item.housingestateName}}</a-select-option>
</a-select> -->
</a-col>
<a-col :span="3">
<a-radio-group v-model:value="izList" button-style="solid" @change="loadDate">
<a-radio-button :value="false">统计图</a-radio-button>
<a-radio-button :value="true">列表页</a-radio-button>
</a-radio-group>
</a-col>
</a-row>
<Bar :chartData="dataSource" height="80vh" :option="{ title: { text: '小区投递次数排行榜', left: 'center' }}" :itemStyle="{ normal: {label : {show: true, position: 'top'}}}" :seriesName="'投递次数'"></Bar>
<Bar v-show="!izList" :chartData="dataSource" height="80vh" :option="{ title: { text: '小区投递次数排行榜', left: 'center' }}" :itemStyle="{ normal: {label : {show: true, position: 'top'}}}" :seriesName="'投递次数'"></Bar>
<div v-show="izList" style="margin-top: 20px;">
<a-table :dataSource="dataSource" :columns="tdcsColumns" >
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<a-button type="link" @click="handleView(record)">查看</a-button>
</template>
</template>
</a-table>
</div>
</a-card>
</div>
</template>
@ -32,11 +47,13 @@
import {ref, unref, reactive, onMounted} from 'vue';
import Bar from '/@/components/chart/Bar.vue';
import { queryXqHyTdcsList,housingestateList } from './HousingestateInfo.api';
import { tdcsColumns } from './HousingestateInfo.data';
import type { Dayjs } from 'dayjs';
const valueFormat = 'YYYY-MM-DD';
const dataSource = ref([]);
const dateValue = ref();
const housingestates = ref();
const izList = ref(false)
async function getHousingestates(){
housingestates.value = await housingestateList(null);
@ -79,7 +96,14 @@
};
async function loadDate() {
const res = await queryXqHyTdcsList(parmas);
if(izList.value){
parmas.pageSize=-1
}else{
parmas.pageSize=10
}
const resData = await queryXqHyTdcsList(parmas);
const res = resData.records;
console.log("🚀 ~ loadDate ~ res:", res)
dataSource.value = [];
for (let i = 0; i < res.length; i++) {
dataSource.value.push({
@ -104,6 +128,7 @@
if(parmas.type=='1'){
parmas.beginTime=getPreviousDate(0)+' 00:00:00';
parmas.endTime=getPreviousDate(0)+' 23:59:59';
parmas.pageSize=10
}
loadDate();
})

View File

@ -22,8 +22,23 @@
<a-select-option :value="item.housingestateId" v-for="item in housingestates" :key="item.housingestateId">{{item.housingestateName}}</a-select-option>
</a-select> -->
</a-col>
<a-col :span="3">
<a-radio-group v-model:value="izList" button-style="solid" @change="loadDate">
<a-radio-button :value="false">统计图</a-radio-button>
<a-radio-button :value="true">列表页</a-radio-button>
</a-radio-group>
</a-col>
</a-row>
<Bar :chartData="dataSource" height="80vh" :option="{ title: { text: '小区投递重量排行榜', left: 'center' }}" :itemStyle="{ normal: {label : {show: true, position: 'top'}}}" :seriesName="'投递重量'"></Bar>
<Bar v-show="!izList" :chartData="dataSource" height="80vh" :option="{ title: { text: '小区投递重量排行榜', left: 'center' }}" :itemStyle="{ normal: {label : {show: true, position: 'top'}}}" :seriesName="'投递重量'"></Bar>
<div v-show="izList" style="margin-top: 20px;">
<a-table :dataSource="dataSource" :columns="xzrsColumns" >
<template #bodyCell="{ column, record }">
<template v-if="column.key === 'action'">
<a-button type="link" @click="handleView(record)">查看</a-button>
</template>
</template>
</a-table>
</div>
</a-card>
</div>
</template>
@ -33,10 +48,12 @@
import Bar from '/@/components/chart/Bar.vue';
import { queryXqHyTdzlList,housingestateList } from './HousingestateInfo.api';
import type { Dayjs } from 'dayjs';
import { xzrsColumns } from './HousingestateInfo.data';
const valueFormat = 'YYYY-MM-DD';
const dataSource = ref([]);
const dateValue = ref();
const housingestates = ref();
const izList = ref(false)
async function getHousingestates(){
housingestates.value = await housingestateList(null);
@ -79,7 +96,13 @@
};
async function loadDate() {
const res = await queryXqHyTdzlList(parmas);
if(izList.value){
parmas.pageSize=-1
}else{
parmas.pageSize=10
}
const resData = await queryXqHyTdzlList(parmas);
const res = resData.records;
dataSource.value = [];
for (let i = 0; i < res.length; i++) {
dataSource.value.push({
@ -104,6 +127,7 @@
if(parmas.type=='0'){
parmas.beginTime=getPreviousDate(2)+' 00:00:00';
parmas.endTime=getPreviousDate(0)+' 23:59:59';
parmas.pageSize=10
}
loadDate();
})