diff --git a/public/build_img.jpg b/public/build_img.jpg new file mode 100644 index 0000000..c97ff9b Binary files /dev/null and b/public/build_img.jpg differ diff --git a/src/apis/dashboard/api.js b/src/apis/dashboard/api.js index b7a5f6b..1d914f6 100644 --- a/src/apis/dashboard/api.js +++ b/src/apis/dashboard/api.js @@ -6,4 +6,8 @@ export const GET_DASHBOARD_ROOM_TEMP_API = `/SituationRoom/GetFormulaRoomStatusD export const GET_DASHBOARD_ENERGY_API = `/SituationRoom/GetEnergeData`; export const POST_DASHBOARD_PRODUCT_TARGET_SETTING_API = `/SituationRoom/SetTargetSetting`; export const GET_DASHBOARD_PRODUCT_TARGET_SETTING_API = `/SituationRoom/GetTargetSetting` -export const GET_DASHBOARD_PRODUCT_HISTORY_API = `/SituationRoom/GetProductionHistory` \ No newline at end of file +export const GET_DASHBOARD_PRODUCT_HISTORY_API = `/SituationRoom/GetProductionHistory` + +export const GET_DASHBOARD_ENERGY_INFO_API = `api/dashboard/GetEnergyInfo` +export const GET_DASHBOARD_ENERGY_COST_API = `api/dashboard/GetEnergyCost` +export const GET_DASHBOARD_ALARMOPERATION_INFO_API = `api/dashboard/GetAlarmOperationInfo` \ No newline at end of file diff --git a/src/apis/dashboard/index.js b/src/apis/dashboard/index.js index 1f64f20..e238c40 100644 --- a/src/apis/dashboard/index.js +++ b/src/apis/dashboard/index.js @@ -8,6 +8,9 @@ import { POST_DASHBOARD_PRODUCT_TARGET_SETTING_API, GET_DASHBOARD_PRODUCT_TARGET_SETTING_API, GET_DASHBOARD_PRODUCT_HISTORY_API, + GET_DASHBOARD_ENERGY_INFO_API, + GET_DASHBOARD_ENERGY_COST_API, + GET_DASHBOARD_ALARMOPERATION_INFO_API, } from "./api"; import instance from "@/util/request"; import apihandler from "@/util/apihandler"; @@ -135,3 +138,41 @@ export const getDashboardProductRecord = async ({ start_time, end_time }) => { }); }; +export const getEnergyInfo = async (building_guid) => { + const res = await instance.post(GET_DASHBOARD_ENERGY_INFO_API, { + building_guid, + }); + + return apihandler(res.code, res.data, { + msg: res.msg, + code: res.code, + }); +}; + +export const getEnergyCost = async ({ + department_id, + floor_guid, + building_guid, +}) => { + const res = await instance.post(GET_DASHBOARD_ENERGY_COST_API, { + department_id, + floor_guid, + building_guid, + }); + + return apihandler(res.code, res.data, { + msg: res.msg, + code: res.code, + }); +}; + +export const getAlarmOperationInfo = async (building_guid) => { + const res = await instance.post(GET_DASHBOARD_ALARMOPERATION_INFO_API, { + building_guid, + }); + + return apihandler(res.code, res.data, { + msg: res.msg, + code: res.code, + }); +}; diff --git a/src/views/dashboard/Dashboard.vue b/src/views/dashboard/Dashboard.vue index cde1b07..ed1b751 100644 --- a/src/views/dashboard/Dashboard.vue +++ b/src/views/dashboard/Dashboard.vue @@ -1,6 +1,7 @@ diff --git a/src/views/dashboard/components/DashboardElecCompare.vue b/src/views/dashboard/components/DashboardElecCompare.vue index 1ee379e..0ee0cd4 100644 --- a/src/views/dashboard/components/DashboardElecCompare.vue +++ b/src/views/dashboard/components/DashboardElecCompare.vue @@ -1,38 +1,29 @@