diff --git a/.env.dev b/.env.dev
index 8214fb5..326077f 100644
--- a/.env.dev
+++ b/.env.dev
@@ -1,7 +1,7 @@
###
# @Author: zhp
# @Date: 2024-04-28 13:42:51
- # @LastEditTime: 2024-05-21 09:39:07
+ # @LastEditTime: 2024-05-22 16:29:35
# @LastEditors: DY
# @Description:
###
@@ -12,9 +12,9 @@ ENV = 'development'
VUE_APP_TITLE = 芋道管理系统
# 芋道管理系统/开发环境
-# VUE_APP_BASE_API = 'http://192.168.1.61:48080'
+# VUE_APP_BASE_API = 'http://192.168.1.70:30307'
VUE_APP_BASE_API = 'http://glass.kszny.picaiba.com'
-#
+
# 路由懒加载
VUE_CLI_BABEL_TRANSPILE_MODULES = true
diff --git a/src/api/produceData/index.js b/src/api/produceData/index.js
index 5e99ead..155b7e2 100644
--- a/src/api/produceData/index.js
+++ b/src/api/produceData/index.js
@@ -1,7 +1,7 @@
/*
* @Author: zhp
* @Date: 2024-05-07 08:54:59
- * @LastEditTime: 2024-05-20 16:24:15
+ * @LastEditTime: 2024-05-22 16:31:08
* @LastEditors: DY
* @Description:
*/
@@ -131,10 +131,10 @@ export function importDiTarget(data) {
// })
// }
-export function cockpitDataMonitor(query) {
+export function cockpitDataMonitor(data) {
return request({
- url: 'https://restapi.amap.com/v3/weather/weatherInfo?key=95bdbdc1c387a170105f84cd416c4c9f&city=110108',
- method: 'get',
- query: query
+ url: '/ip/prod-output/cockpitDataMonitor',
+ method: 'post',
+ data: data
})
}
diff --git a/src/assets/icons/svg/orgTreeIcon.svg b/src/assets/icons/svg/orgTreeIcon.svg
new file mode 100644
index 0000000..247a5ae
--- /dev/null
+++ b/src/assets/icons/svg/orgTreeIcon.svg
@@ -0,0 +1,14 @@
+
+
\ No newline at end of file
diff --git a/src/assets/icons/svg/orgTreeIcon2.svg b/src/assets/icons/svg/orgTreeIcon2.svg
new file mode 100644
index 0000000..a43bd80
--- /dev/null
+++ b/src/assets/icons/svg/orgTreeIcon2.svg
@@ -0,0 +1,15 @@
+
+
+
diff --git a/src/assets/styles/index.scss b/src/assets/styles/index.scss
index 11d9c3d..f3c0b35 100644
--- a/src/assets/styles/index.scss
+++ b/src/assets/styles/index.scss
@@ -123,7 +123,7 @@ aside {
//main-container全局样式
.app-container {
- padding: 16px;
+ // padding: 16px;
}
.components-container {
diff --git a/src/layout/components/AppMain.vue b/src/layout/components/AppMain.vue
index 44fc12f..1845d89 100644
--- a/src/layout/components/AppMain.vue
+++ b/src/layout/components/AppMain.vue
@@ -17,20 +17,20 @@
diff --git a/src/views/copilot/factoryData/components/Energy.vue b/src/views/copilot/factoryData/components/Energy.vue
index 5339644..fd6841c 100644
--- a/src/views/copilot/factoryData/components/Energy.vue
+++ b/src/views/copilot/factoryData/components/Energy.vue
@@ -18,19 +18,11 @@ import * as echarts from "echarts";
export default {
name: "Energy",
props: {
- vHeight: {
- type: Number,
- default: 34,
- },
legend: {
type: Array,
required: true,
},
- xAxis: {
- type: Array,
- required: true,
- },
- series: {
+ energyCockpits: {
type: Array,
required: true,
},
@@ -43,11 +35,10 @@ export default {
options: {
color: ["#FFD160", "#2760FF", "#12FFF5"],
grid: {
- left: "3%",
- right: "4%",
- bottom: "0",
+ left: "7%",
+ right: "7%",
+ bottom: "8%",
top: "15%",
- containLabel: true,
},
tooltip: {
trigger: "axis",
@@ -65,7 +56,7 @@ export default {
color: "rgba(255, 255, 255, 0.7)",
fontSize: 12,
},
- data: this.xAxis,
+ data: [],
},
yAxis: [
{
@@ -190,6 +181,11 @@ export default {
},
};
},
+ computed: {
+ isOpen() {
+ return this.$store.getters.sidebar.opened;
+ },
+ },
watch: {
/** 全屏状态切换时,对柱子粗细和字体大小进行相应调整 */
// isFullscreen(val) {
@@ -216,6 +212,12 @@ export default {
// this.actualOptions = actualOptions;
// this.initOptions(actualOptions);
// },
+ energyCockpits() {
+ this.initChart();
+ },
+ isOpen(val) {
+ this.canvasReset();
+ },
},
mounted() {
// if (screenfull.isEnabled) {
@@ -241,17 +243,60 @@ export default {
}, 500)();
},
initChart() {
+ let energyxAxis = [];
+ let n = 0;
+ let seriesArr = [
+ {
+ name: "水",
+ energyType: 1,
+ data: [],
+ },
+ {
+ name: "电",
+ energyType: 2,
+ data: [],
+ },
+ {
+ name: "气",
+ energyType: 3,
+ data: [],
+ },
+ ];
+ if (this.energyCockpits.length > 0) {
+ let dataArr = this.energyCockpits.map((item) => {
+ return item.groupName;
+ });
+ energyxAxis = Array.from(new Set(dataArr));
+ n = energyxAxis.length;
+ seriesArr[0].data = Array.from({ length: n }, () => 0);
+ seriesArr[1].data = Array.from({ length: n }, () => 0);
+ seriesArr[2].data = Array.from({ length: n }, () => 0);
+ for (let i = 0; i < this.energyCockpits.length; i++) {
+ for (let j = 0; j < energyxAxis.length; j++) {
+ if (this.energyCockpits[i].groupName === energyxAxis[j]) {
+ if (this.energyCockpits[i].energyType === 1) {
+ seriesArr[0].data[j] = this.energyCockpits[i].totalEnergyValue;
+ } else if (this.energyCockpits[i].energyType === 2) {
+ seriesArr[1].data[j] = this.energyCockpits[i].totalEnergyValue;
+ } else if (this.energyCockpits[i].energyType === 3) {
+ seriesArr[2].data[j] = this.energyCockpits[i].totalEnergyValue;
+ }
+ }
+ }
+ }
+ }
if (this.chart) {
this.chart.dispose();
}
this.chart = echarts.init(document.getElementById("factoryEnergyChart"));
const actualOptions = JSON.parse(JSON.stringify(this.options));
- actualOptions.series[0].data = this.series[0].data;
- actualOptions.series[0].name = this.series[0].name;
- actualOptions.series[1].data = this.series[1].data;
- actualOptions.series[1].name = this.series[1].name;
- actualOptions.series[2].data = this.series[2].data;
- actualOptions.series[2].name = this.series[2].name;
+ actualOptions.xAxis.data = energyxAxis;
+ actualOptions.series[0].data = seriesArr[0].data;
+ actualOptions.series[0].name = seriesArr[0].name;
+ actualOptions.series[1].data = seriesArr[1].data;
+ actualOptions.series[1].name = seriesArr[1].name;
+ actualOptions.series[2].data = seriesArr[2].data;
+ actualOptions.series[2].name = seriesArr[2].name;
this.actualOptions = actualOptions;
this.chart.setOption(actualOptions);
},
diff --git a/src/views/copilot/factoryData/components/Order.vue b/src/views/copilot/factoryData/components/Order.vue
index 5515fe4..8cec3dc 100644
--- a/src/views/copilot/factoryData/components/Order.vue
+++ b/src/views/copilot/factoryData/components/Order.vue
@@ -1,8 +1,9 @@