Compare commits

...

2 Commits

Author SHA1 Message Date
89be19e256 Merge branch 'main' of http://114.55.171.231:3000/Euni4U/vue3 2025-09-03 09:45:02 +08:00
39f8f5f44d 会员设备统计 2025-09-02 17:09:43 +08:00
2 changed files with 10 additions and 4 deletions

View File

@ -125,5 +125,10 @@ export const DeviceApi = {
// 更新设备会员信息(开通/续费)
updateDeviceVip: async (data: { devicecode: string ; orgid: number; vipstarttime: number | string; vipendtime: number | string; isvip: number }) => {
return await request.put({ url: `/system/device/updateVip`, data })
}
},
// 查询会员开通数量
getDeviceVipCount: async (startDate: string, endDate: string,orgid:number) => {
return await request.get({ url: `/system/device/get-vip-device-count?startDate=` + startDate + `&endDate=` + endDate + `&orgid=` + orgid })
},
}

View File

@ -45,7 +45,7 @@
import { ref, onMounted, watch, nextTick } from 'vue'
import * as echarts from 'echarts'
import ContentWrap from '@/components/ContentWrap/src/ContentWrap.vue'
import { PersonApi } from '@/api/person'
import { DeviceApi } from '@/api/device'
import dayjs from 'dayjs'
import { getUserProfile } from '@/api/system/user/profile'
const userinfo = ref()
@ -120,8 +120,9 @@ const renderChart = () => {
// PersonApi
const fetchData = async () => {
if (!dateRange.value || !dateRange.value[0] || !dateRange.value[1]) return
const res = await PersonApi.getMemberRegisterCount(dateRange.value[0], dateRange.value[1],userinfo.value.dept.orgid)
if (!dateRange.value || !dateRange.value[0] || !dateRange.value[1])
return
const res = await DeviceApi.getDeviceVipCount(dateRange.value[0], dateRange.value[1],userinfo.value.dept.orgid)
chartData.value = Array.isArray(res) ? res : []
}