diff --git a/src/apis/asset/api.js b/src/apis/asset/api.js index 94f08e1..234d100 100644 --- a/src/apis/asset/api.js +++ b/src/apis/asset/api.js @@ -34,4 +34,6 @@ export const GET_ASSET_ELECTYPE_API = `/AssetManage/GetElecType`; export const POST_ASSET_ELECTYPE_API = `/AssetManage/SaveElecType`; export const DELETE_ASSET_ELECTYPE_API = `/AssetManage/DeleteElecType`; -export const POST_ASSET_ELEC_SETTING_API = `/AssetManage/SaveAssetSetting`; \ No newline at end of file +export const POST_ASSET_ELEC_SETTING_API = `/AssetManage/SaveAssetSetting`; + +export const POST_ASSET_MQTT_PUBLISH_API = `/api/mqtt/publish`; \ No newline at end of file diff --git a/src/apis/asset/index.js b/src/apis/asset/index.js index e124482..24eac42 100644 --- a/src/apis/asset/index.js +++ b/src/apis/asset/index.js @@ -26,13 +26,14 @@ import { POST_ASSET_ELECTYPE_API, DELETE_ASSET_ELECTYPE_API, POST_ASSET_ELEC_SETTING_API, + POST_ASSET_MQTT_PUBLISH_API, } from "./api"; import instance from "@/util/request"; import apihandler from "@/util/apihandler"; import { object } from "yup"; export const getAssetMainList = async (building_guid) => { - const res = await instance.post(GET_ASSET_MAIN_LIST_API,{building_guid}); + const res = await instance.post(GET_ASSET_MAIN_LIST_API, { building_guid }); return apihandler(res.code, res.data, { msg: res.msg, @@ -49,12 +50,17 @@ export const deleteAssetMainItem = async (id) => { }); }; -export const postAssetMainList = async ({ id, system_key, system_value, building_guid }) => { +export const postAssetMainList = async ({ + id, + system_key, + system_value, + building_guid, +}) => { const res = await instance.post(POST_ASSET_MAIN_LIST_API, { id, system_key, system_value, - building_guid + building_guid, }); return apihandler(res.code, res.data, { @@ -241,6 +247,9 @@ export const postDeviceItem = async ({ decimals, is_bool, is_link, + show_event_switch_btn, + event_switch_on_message, + event_switch_off_message, }) => { const res = await instance.post(POST_ASSET_DEVICE_ITEM_API, { id, @@ -250,6 +259,9 @@ export const postDeviceItem = async ({ decimals, is_bool, is_link, + show_event_switch_btn, + event_switch_on_message, + event_switch_off_message, }); return apihandler(res.code, res.data, { @@ -335,3 +347,15 @@ export const postAssetElecSetting = async (formData) => { code: res.code, }); }; + +export const postMQTTpublish = async ({ Topic, Payload }) => { + const res = await instance.post(POST_ASSET_MQTT_PUBLISH_API, { + Topic, + Payload, + }); + + return apihandler(res.code, res.data, { + msg: res.msg, + code: res.code, + }); +}; diff --git a/src/apis/dashboard/api.js b/src/apis/dashboard/api.js index 1d914f6..9be814d 100644 --- a/src/apis/dashboard/api.js +++ b/src/apis/dashboard/api.js @@ -10,4 +10,8 @@ export const GET_DASHBOARD_PRODUCT_HISTORY_API = `/SituationRoom/GetProductionHi 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 +export const GET_DASHBOARD_ALARMOPERATION_INFO_API = `api/dashboard/GetAlarmOperationInfo` + +export const GET_DASHBOARD_2D3DINFO_API = `api/setting/visual/query` +export const POST_DASHBOARD_2D3DINFO_API = `api/setting/visual/update` + diff --git a/src/apis/dashboard/index.js b/src/apis/dashboard/index.js index e238c40..d578640 100644 --- a/src/apis/dashboard/index.js +++ b/src/apis/dashboard/index.js @@ -11,6 +11,8 @@ import { GET_DASHBOARD_ENERGY_INFO_API, GET_DASHBOARD_ENERGY_COST_API, GET_DASHBOARD_ALARMOPERATION_INFO_API, + GET_DASHBOARD_2D3DINFO_API, + POST_DASHBOARD_2D3DINFO_API } from "./api"; import instance from "@/util/request"; import apihandler from "@/util/apihandler"; @@ -176,3 +178,22 @@ export const getAlarmOperationInfo = async (building_guid) => { code: res.code, }); }; + +export const getDashboard2D3D = async (BuildingId) => { + const res = await instance.post(GET_DASHBOARD_2D3DINFO_API, { + BuildingId}); + + return apihandler(res.code, res.data, { + msg: res.msg, + code: res.code, + }); +}; + +export const posttDashboard2D3D = async (formData) => { + const res = await instance.post(POST_DASHBOARD_2D3DINFO_API, formData); + + return apihandler(res.code, res.data, { + msg: res.msg, + code: res.code, + }); +}; \ No newline at end of file diff --git a/src/components/chart/EffectScatter.vue b/src/components/chart/EffectScatter.vue index 2ac30af..ff48c2a 100644 --- a/src/components/chart/EffectScatter.vue +++ b/src/components/chart/EffectScatter.vue @@ -1,6 +1,6 @@