diff --git a/public/ChangDaobuild/Build/build.data.unityweb b/public/ChangDaobuild/Build/build.data.unityweb index 98ff98f..0571be9 100644 Binary files a/public/ChangDaobuild/Build/build.data.unityweb and b/public/ChangDaobuild/Build/build.data.unityweb differ diff --git a/public/ChangDaobuild/Build/build.framework.js.unityweb b/public/ChangDaobuild/Build/build.framework.js.unityweb index 73798d7..9f00a46 100644 Binary files a/public/ChangDaobuild/Build/build.framework.js.unityweb and b/public/ChangDaobuild/Build/build.framework.js.unityweb differ diff --git a/public/ChangDaobuild/Build/build.wasm.unityweb b/public/ChangDaobuild/Build/build.wasm.unityweb index 6738b73..63214a0 100644 Binary files a/public/ChangDaobuild/Build/build.wasm.unityweb and b/public/ChangDaobuild/Build/build.wasm.unityweb differ diff --git a/public/ChangDaobuild/index.html b/public/ChangDaobuild/index.html index dd05679..dcb5ede 100644 --- a/public/ChangDaobuild/index.html +++ b/public/ChangDaobuild/index.html @@ -7,16 +7,14 @@ - +
- +
@@ -105,15 +103,14 @@ } loadingBar.style.display = "block"; - - var script = document.createElement("script"); var unityInstanceA + var script = document.createElement("script"); script.src = loaderUrl; script.onload = () => { createUnityInstance(canvas, config, (progress) => { progressBarFull.style.width = 100 * progress + "%"; }).then((unityInstance) => { - unityInstanceA = unityInstance + unityInstanceA = unityInstance loadingBar.style.display = "none"; fullscreenButton.onclick = () => { unityInstance.SetFullscreen(1); diff --git a/src/api/air-conditioning.js b/src/api/air-conditioning.js new file mode 100644 index 0000000..620eb32 --- /dev/null +++ b/src/api/air-conditioning.js @@ -0,0 +1,50 @@ +// 空调接口 +import http from '@/utils/http' +// 获取概况 +export function getGeneralSituation(params){ + return http({ + url:'/api/GetGeneralSituation', + method:'get', + params + }) +} +// 获取用电情况 +export function getElectricalCondition(params){ + return http({ + url:'/api/GetElectricalCondition', + method:'get', + params + }) +} +// 获取故障情况 +export function getFailureWarning(params){ + return http({ + url:'/api/GetFailureWarning', + method:'get', + params + }) +} +// 获取开机策略 +export function getBootStrategy(params){ + return http({ + url:'/api/GetBootStrategy', + method:'get', + params + }) +} +// 获取维护提醒 +export function getMaintenanceReminder(params){ + return http({ + url:'/api/GetMaintenanceReminder', + method:'get', + params + }) +} +// 获取策略编辑 +export function getPolicyEditing(params){ + return http({ + url:'/api/GetPolicyEditing', + method:'get', + params + }) +} \ No newline at end of file diff --git a/src/api/drainage.js b/src/api/drainage.js new file mode 100644 index 0000000..7ed3a40 --- /dev/null +++ b/src/api/drainage.js @@ -0,0 +1,10 @@ +// 排水接口 +import http from '@/utils/http' +// 获取能耗总量 +export function getWaterDraining(params){ + return http({ + url:'/api/GetWaterDraining', + method:'get', + params + }) +} \ No newline at end of file diff --git a/src/api/energyEfficiency.js b/src/api/energyEfficiency.js new file mode 100644 index 0000000..073fc0b --- /dev/null +++ b/src/api/energyEfficiency.js @@ -0,0 +1,50 @@ +// 能效接口 +import http from '@/utils/http' +// 获取能耗总量 +export function getTotalEnergy(params){ + return http({ + url:'/api/GetTotalEnergy', + method:'get', + params + }) +} +// 获取能效对标 +export function getEnergyIndexing(params){ + return http({ + url:'/api/GetEnergyIndexing', + method:'get', + params + }) +} +// 获取能源流向 +export function getEnergyFlow(params){ + return http({ + url:'/api/GetEnergyFlow', + method:'get', + params + }) +} +// 获取各系统能耗情况 +export function getSystemEnergy(params){ + return http({ + url:'/api/GetSystemEnergy', + method:'get', + params + }) +} +// 获取复费率 +export function getMultiRate(params){ + return http({ + url:'/api/GetMultiRate', + method:'get', + params + }) +} +// 获取电费电价 +export function getElectricityRate(params){ + return http({ + url:'/api/GetElectricityRate', + method:'get', + params + }) +} \ No newline at end of file diff --git a/src/api/energyMonitoring.js b/src/api/energyMonitoring.js new file mode 100644 index 0000000..c283e77 --- /dev/null +++ b/src/api/energyMonitoring.js @@ -0,0 +1,51 @@ +// 用能检测api +import http from '@/utils/http' +// 获取实时负荷 +export function getRealLoad(params){ + console.log(params,http); + return http({ + url:'/api/GetRealLoad', + method:'get', + params + }) +} +// 获取当日累计用电量 +export function getDailyElectricity(params){ + return http({ + url:'/api/GetDailyElectricity', + method:'get', + params + }) +} +// 获取负荷分类 +export function getLoadClassification(params){ + return http({ + url:'/api/GetLoadClassification', + method:'get', + params + }) +} +// 获取空调负荷 +export function getAirconditioningLoad(params){ + return http({ + url:'/api/GetAirconditioningLoad', + method:'get', + params + }) +} +// 获取展陈负荷 +export function getDisplayLoad(params){ + return http({ + url:'/api/GetDisplayLoad', + method:'get', + params + }) +} +// 获取配电室回路排名 +export function getLoopRanking(params){ + return http({ + url:'/api/GetLoopRanking', + method:'get', + params + }) +} \ No newline at end of file diff --git a/src/views/air-conditioning/index.vue b/src/views/air-conditioning/index.vue index f74d2d9..ccc03c4 100644 --- a/src/views/air-conditioning/index.vue +++ b/src/views/air-conditioning/index.vue @@ -2,6 +2,7 @@ import {ref, reactive,onMounted} from "vue"; import getPath from "@/utils/getPath.js"; import dialogBox from './components/dialogBox.vue' +import {getGeneralSituation,getElectricalCondition,getFailureWarning,getBootStrategy,getMaintenanceReminder,getPolicyEditing} from '@/api/air-conditioning' const systemNumList = ref([ { name: '运行设备数量', @@ -53,7 +54,7 @@ const electricityContent = ref([ unit:"kWh", }, { - name:'本月用电费用', + name:'本年用电费用', value:66, unit:"万元", }, @@ -170,8 +171,79 @@ const closeDialog = (val) =>{ const controlBtn = ref('on') const toggleControl = (event) => { controlBtn.value = event.srcElement.className + maintenanceReminderInterface() +} +// 获取概况数据 +const generalSituationInterface = () =>{ + getGeneralSituation().then(res=>{ + systemNumList.value[0].num = res.data[0].Operation + systemNumList.value[1].num = res.data[0].Stop + overviewList.value[0].num = res.data[0].Area / 10000 + overviewList.value[1].num = res.data[0].Amount + }) +} +// 获取故障报警 +const failureWarningInterface = () =>{ + getFailureWarning().then(res=>{ + faultList.value = res.data.map(el=>{ + return { + name:el.FailureWarning, + date:el.FailureTime + } + }) + }) +} +// 获取用电情况数据 +const electricalConditionInterface = () =>{ + getElectricalCondition().then(res=>{ + // 今日 + electricityContent.value[0].value = res.data[0].EH + electricityContent.value[1].value = res.data[0].Electricity + // 本月 + electricityContent.value[2].value = res.data[1].EH + electricityContent.value[3].value = res.data[1].Electricity + // 本年 + electricityContent.value[4].value = res.data[2].EH + electricityContent.value[5].value = res.data[2].Electricity + }) +} +// 开机策略 +const bootStrategyInterface = () =>{ + getBootStrategy().then(res=>{ + runTimeList.value = res.data.map(el=>{ + return { + name:el.StrategyName, + value:el.StrategyState + } + }) + }) +} +// 维护提醒 +const maintenanceReminderInterface = () =>{ + console.log(controlBtn.value); + let params = { + name: controlBtn.value === 'on' ? '已超期':'即将开始' + } + getMaintenanceReminder(params).then(res=>{ + maintenanceList.value = res.data.map(el=>{ + return { + name:el.DeviceName, + date:el.OverDue + } + }) + }) } onMounted(()=>{ + // 概况接口 + generalSituationInterface() + // 用电接口 + electricalConditionInterface() + // 故障报警接口 + failureWarningInterface() + // 开机策略接口 + bootStrategyInterface() + // 维护提醒接口 + maintenanceReminderInterface() }) @@ -231,7 +303,7 @@ onMounted(()=>{
故障报警
-
+

{{s.name}} 时间:{{s.date}} @@ -409,13 +481,18 @@ onMounted(()=>{ } } //故障 +#fault::-webkit-scrollbar{ + display:none; +} #fault{ padding: 0 1rem; + overflow-y:scroll; box-sizing: border-box; display: flex; flex-wrap: wrap; - align-content: space-evenly; + // align-content: space-evenly; p{ + margin:.8rem; width: 100%; height: 20%; background-image: url("@/assets/images/air-conditioning/fault.png"); diff --git a/src/views/drainage/index.vue b/src/views/drainage/index.vue index b5fcd28..11340b4 100644 --- a/src/views/drainage/index.vue +++ b/src/views/drainage/index.vue @@ -1,6 +1,6 @@ diff --git a/src/views/energyEfficiency/index.vue b/src/views/energyEfficiency/index.vue index 1ffb464..f5b11b9 100644 --- a/src/views/energyEfficiency/index.vue +++ b/src/views/energyEfficiency/index.vue @@ -1,6 +1,7 @@ @@ -1044,7 +1112,7 @@ onMounted(() => {

  • {{ item.name }}
  • diff --git a/src/views/energyMonitoring/index.vue b/src/views/energyMonitoring/index.vue index e7f6e0e..03b576f 100644 --- a/src/views/energyMonitoring/index.vue +++ b/src/views/energyMonitoring/index.vue @@ -40,11 +40,12 @@ diff --git a/src/views/overview/index.vue b/src/views/overview/index.vue index 432eab6..dceffc1 100644 --- a/src/views/overview/index.vue +++ b/src/views/overview/index.vue @@ -34,8 +34,10 @@ onMounted(() => { stationInterface() // 系统用电排名接口 systemRankingInterface() + // 碳排放的接口 + CarbonEmissionInterface() //碳排放 - getCarbonEmissionEcahrts(); + // getCarbonEmissionEcahrts(); }); // 用电量时间切换 const powerDate = ref("year"); @@ -49,6 +51,8 @@ const togglePower = (event) => { const carbonEmissionDate = ref("month"); const toggleCarbonEmission = (event) => { carbonEmissionDate.value = event.srcElement.className; + // 碳排放接口 + CarbonEmissionInterface() }; const drawPowerEcharts = (item) => { let myChart = echarts.init(document.getElementById("power")); @@ -297,7 +301,7 @@ const drawRankEcharts = (data) => { }); }; //碳排放 -function getCarbonEmissionEcahrts() { +function getCarbonEmissionEcahrts(data) { const offsetX = 10; //bar宽 const offsetY = 5; //倾斜角度 // 绘制左侧面 @@ -366,8 +370,10 @@ function getCarbonEmissionEcahrts() { echarts.graphic.registerShape("CubeLeft", CubeLeft); echarts.graphic.registerShape("CubeRight", CubeRight); echarts.graphic.registerShape("CubeTop", CubeTop); - let xAxisData = ["1月", "2月", "3月", "4月", "5月", "6月", "7月"]; - let seriesData = [100, 200, 300, 400, 200, 250]; + // let xAxisData = ["1月", "2月", "3月", "4月", "5月", "6月", "7月"]; + let xAxisData = data.map(el=>{return el.time}) + // let seriesData = [100, 200, 300, 400, 200, 250]; + let seriesData = data.map(el=>{return el.CarbonEmission}) // 绿色渐变 // let colorArr = [["#12D5AF"], ["#0BC19D", "rgba(13,8,16,0)"], ["#68EFD4", "rgba(14,185,151,0)"]] // 蓝色渐变 @@ -612,6 +618,14 @@ const systemRankingInterface = () =>{ drawRankEcharts(res.data) }) } +const CarbonEmissionInterface = () =>{ + let params = { + date:carbonEmissionDate.value === 'month'?'月':'年' + } + getCarbonEmission(params).then(res=>{ + getCarbonEmissionEcahrts(res.data) + }) +}