This commit is contained in:
15683799673
2025-08-28 21:08:08 +08:00
2 changed files with 14 additions and 6 deletions

View File

@@ -248,7 +248,9 @@ onMounted(() => {
});
});
const trendData = ref<any>({});
const hourTotal = ref<number>();
const dayTotal = ref<number>();
const monthTotal = ref<number>();
async function handleSelectFloor(selectedKeys, info) {
let data = {
day: currentDay.value.format('YYYY-MM-DD'),
@@ -269,6 +271,7 @@ async function handleSelectFloor(selectedKeys, info) {
// 更新日数据图表
if (chartInstances.value.day && trend.hour) {
hourTotal.value = trend.hour.total;
chartInstances.value.day.setOption({
xAxis: {
data: trend.hour.categories || [],
@@ -284,6 +287,7 @@ async function handleSelectFloor(selectedKeys, info) {
// 更新月数据图表
if (chartInstances.value.month && trend.day) {
dayTotal.value = trend.day.total;
chartInstances.value.month.setOption({
xAxis: {
data: trend.day.categories || [],
@@ -299,6 +303,7 @@ async function handleSelectFloor(selectedKeys, info) {
// 更新年数据图表
if (chartInstances.value.year && trend.month) {
monthTotal.value = trend.month.total;
chartInstances.value.year.setOption({
xAxis: {
data: trend.month.categories || [],
@@ -332,7 +337,8 @@ async function handleSelectFloor(selectedKeys, info) {
<DatePicker
v-model:value="currentDay"
:disabled-date="disabledDay"
/>当日能耗总值125.04KW.h
/>
<span>当日能耗总值{{ hourTotal }}KW.h</span>
</div>
</div>
<div id="day" style="height: 100%; width: 100%"></div>
@@ -352,7 +358,8 @@ async function handleSelectFloor(selectedKeys, info) {
v-model:value="currentMonth"
:disabled-date="disabledMonth"
picker="month"
/>当月能耗总值125.04KW.h
/>
<span>当日能耗总值{{ dayTotal }}KW.h</span>
</div>
</div>
<div id="month" style="height: 100%; width: 100%"></div>
@@ -372,7 +379,8 @@ async function handleSelectFloor(selectedKeys, info) {
v-model:value="currentYear"
:disabled-date="disabledYear"
picker="year"
/>当年能耗总值125.04KW.h
/>
<span>当日能耗总值{{ monthTotal }}KW.h</span>
</div>
</div>
<div id="year" style="height: 100%; width: 100%"></div>

View File

@@ -37,8 +37,8 @@ const gridOptions: VxeGridProps = {
return await getVisitorList({
pageNum: page.currentPage,
pageSize: page.pageSize,
begTime: typeof formValues.dateRange === 'undefined' ? '' : formValues.dateRange[0],
endTime: typeof formValues.dateRange === 'undefined' ? '' : formValues.dateRange[1],
begTime: typeof formValues.dateRange === 'undefined' ? '' : formValues.dateRange[0].format('YYYY-MM-DD'),
endTime: typeof formValues.dateRange === 'undefined' ? '' : formValues.dateRange[1].format('YYYY-MM-DD'),
personName: typeof formValues.personName === 'undefined' ? '' : formValues.personName,
recordType: typeof formValues.recordType === 'undefined' ? '' : formValues.recordType,
});