From 3e8b64a56f75280e905ce9e6fc0e152ad83319a0 Mon Sep 17 00:00:00 2001 From: czc Date: Mon, 31 Jul 2023 16:39:55 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E7=BB=9F=E8=AE=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/api/aws/systemStatistics.js | 54 +++++ src/main.js | 3 +- src/utils/ruoyi.js | 13 ++ src/views/aws/systemStatistics/index.vue | 248 +++++++++++++++++++++++ 4 files changed, 317 insertions(+), 1 deletion(-) create mode 100644 src/api/aws/systemStatistics.js create mode 100644 src/views/aws/systemStatistics/index.vue diff --git a/src/api/aws/systemStatistics.js b/src/api/aws/systemStatistics.js new file mode 100644 index 0000000..8a5832b --- /dev/null +++ b/src/api/aws/systemStatistics.js @@ -0,0 +1,54 @@ +import request from '@/utils/request' + +// 查询系统数据统计列表 +export function listAwsSystemStatistics(query, pageReq) { + return request({ + url: '/aws/systemStatistics/list', + method: 'post', + data: query, + params: pageReq + }) +} + +// 查询系统数据统计详细 +export function getAwsSystemStatistics(id) { + return request({ + url: '/aws/systemStatistics/' + id, + method: 'get' + }) +} + +// 新增系统数据统计 +export function addAwsSystemStatistics(data) { + return request({ + url: '/aws/systemStatistics', + method: 'post', + data: data + }) +} + +// 修改系统数据统计 +export function updateAwsSystemStatistics(data) { + return request({ + url: '/aws/systemStatistics', + method: 'put', + data: data + }) +} + +// 删除系统数据统计 +export function delAwsSystemStatistics(id) { + return request({ + url: '/aws/systemStatistics/' + id, + method: 'delete' + }) +} + +// 导出系统数据统计 +export function exportAwsSystemStatistics(query) { + return request({ + url: '/aws/systemStatistics/export', + method: 'get', + params: query + }) +} diff --git a/src/main.js b/src/main.js index 34530f4..2a866b5 100644 --- a/src/main.js +++ b/src/main.js @@ -19,7 +19,7 @@ import './assets/icons' // icon import './permission' // permission control import { getDicts } from "@/api/system/dict/data"; import { getConfigKey } from "@/api/system/config"; -import { parseTime, resetForm, addDateRange, addDateRange2, selectDictLabel, selectDictLabels, handleTree } from "@/utils/ruoyi"; +import { parseTime, resetForm, addDateRange, addDateRange2, addDateRange3, selectDictLabel, selectDictLabels, handleTree } from "@/utils/ruoyi"; import { getHiddenName, getHiddenDetailAddress } from '@/utils/DataHidden' // 分页组件 import Pagination from "@/components/Pagination"; @@ -56,6 +56,7 @@ Vue.prototype.selectDictLabels = selectDictLabels Vue.prototype.download = download Vue.prototype.handleTree = handleTree Vue.prototype.addDateRange2 = addDateRange2 +Vue.prototype.addDateRange3 = addDateRange3 Vue.prototype.getHiddenName = getHiddenName Vue.prototype.getHiddenDetailAddress = getHiddenDetailAddress diff --git a/src/utils/ruoyi.js b/src/utils/ruoyi.js index f5fbd75..0eba27e 100644 --- a/src/utils/ruoyi.js +++ b/src/utils/ruoyi.js @@ -81,6 +81,19 @@ export function addDateRange2(params, dateRange, addDay=true) { return search; } +export function addDateRange3(params, dateRange, addDay=true) { + let search = params; + dateRange = Array.isArray(dateRange) ? dateRange : []; + if (addDay) { + search['beginTime'] = dateRange[0] + ' 00:00:00'; + search['endTime'] = moment(dateRange[1]).add(1,"days").format('yyyy-MM-DD')+ ' 00:00:00'; + } else { + search['beginTime'] = dateRange[0]+ ' 00:00:00'; + search['endTime'] = dateRange[1]+ ' 00:00:00'; + } + return search; +} + // 回显数据字典 export function selectDictLabel(datas, value) { if (value === undefined) { diff --git a/src/views/aws/systemStatistics/index.vue b/src/views/aws/systemStatistics/index.vue new file mode 100644 index 0000000..404b988 --- /dev/null +++ b/src/views/aws/systemStatistics/index.vue @@ -0,0 +1,248 @@ + + +