会员设备统计
This commit is contained in:
parent
74ec9fb972
commit
39f8f5f44d
@ -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 })
|
||||
},
|
||||
}
|
||||
|
||||
@ -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 : []
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user