diff --git a/.env.dev b/.env.dev
index 2c8e3ad..537a0b2 100644
--- a/.env.dev
+++ b/.env.dev
@@ -1,7 +1,7 @@
###
# @Author: zhp
# @Date: 2024-04-28 13:42:51
- # @LastEditTime: 2024-05-13 13:30:20
+ # @LastEditTime: 2024-05-20 08:31:10
# @LastEditors: zhp
# @Description:
###
diff --git a/src/api/energy/index.js b/src/api/energy/index.js
index b96d2fa..0094c4b 100644
--- a/src/api/energy/index.js
+++ b/src/api/energy/index.js
@@ -1,7 +1,7 @@
/*
* @Author: zhp
* @Date: 2024-04-28 09:28:12
- * @LastEditTime: 2024-04-28 09:43:40
+ * @LastEditTime: 2024-05-16 08:56:59
* @LastEditors: zhp
* @Description:
*/
@@ -13,3 +13,11 @@ export function getEnergyPage(data) {
data: data
})
}
+
+export function getEnergySumPage(data) {
+ return request({
+ url: 'ip/prod-output/cockpitComprehensiveDataMonitor',
+ method: 'post',
+ data: data
+ })
+}
diff --git a/src/api/produceData/index.js b/src/api/produceData/index.js
index 427ba52..64e75b2 100644
--- a/src/api/produceData/index.js
+++ b/src/api/produceData/index.js
@@ -1,14 +1,7 @@
/*
* @Author: zhp
* @Date: 2024-05-07 08:54:59
- * @LastEditTime: 2024-05-07 09:34:17
- * @LastEditors: zhp
- * @Description:
- */
-/*
- * @Author: zhp
- * @Date: 2024-04-26 14:53:45
- * @LastEditTime: 2024-05-06 14:53:04
+ * @LastEditTime: 2024-05-14 15:43:50
* @LastEditors: zhp
* @Description:
*/
diff --git a/src/mixins/chart.js b/src/mixins/chart.js
index cd961b8..b356201 100644
--- a/src/mixins/chart.js
+++ b/src/mixins/chart.js
@@ -1,19 +1,19 @@
import * as echarts from "echarts";
function __resizeHandler(entries) {
+ console.log(entries)
for (const entry of entries) {
if (entry.contentBoxSize) {
- // manipulate contentBoxSize
- // const contentBoxSize = Array.isArray(entry.contentBoxSize)
- // ? entry.contentBoxSize[0]
- // : entry.contentBoxSize;
- // this.chart_mixin_chartInstance.resize({
- // width:
- // contentBoxSize.inlineSize < this.MIN_WIDTH
- // ? this.MIN_WIDTH
- // : contentBoxSize.inlineSize,
- // height: contentBoxSize.blockSize,
- // });
+ // const contentBoxSize = Array.isArray(entry.contentBoxSize)
+ // ? entry.contentBoxSize[0]
+ // : entry.contentBoxSize;
+ // this.chart_mixin_chartInstance.resize({
+ // width:
+ // contentBoxSize.inlineSize < this.MIN_WIDTH
+ // ? this.MIN_WIDTH
+ // : contentBoxSize.inlineSize,
+ // height: contentBoxSize.blockSize,
+ // });
} else {
// manipulate contentRect
this.chart_mixin_chartInstance.resize({
diff --git a/src/store/index.js b/src/store/index.js
index 9e98a78..fbf0125 100644
--- a/src/store/index.js
+++ b/src/store/index.js
@@ -1,7 +1,15 @@
+/*
+ * @Author: zhp
+ * @Date: 2024-04-28 13:42:51
+ * @LastEditTime: 2024-05-16 11:59:04
+ * @LastEditors: zhp
+ * @Description:
+ */
import Vue from 'vue'
import Vuex from 'vuex'
import app from './modules/app'
import user from './modules/user'
+import home from './modules/home'
import tagsView from './modules/tagsView'
import permission from './modules/permission'
import settings from './modules/settings'
@@ -19,6 +27,7 @@ const store = new Vuex.Store({
permission,
settings,
dict,
+ home,
copilot
},
getters
diff --git a/src/store/modules/home.js b/src/store/modules/home.js
index 0ed88e0..4c278cd 100644
--- a/src/store/modules/home.js
+++ b/src/store/modules/home.js
@@ -14,7 +14,12 @@ const state = {
bipvOutput: null,
},
/* 能源驾驶舱 */
- energy: {},
+ energy: {
+ stockDOData: [],
+ waterList: {},
+ gasList: [],
+ elecList:{}
+ },
/* 效率驾驶舱 */
efficiency: {
chipOee: {
@@ -66,10 +71,12 @@ const mutations = {
state.copilot.yield.bipvOutput = payload.bipvOutput;
break;
case "energy":
- state.copilot.energy = payload.data;
+ state.copilot.energy.stockDOData = payload.stockDOData;
+ state.copilot.energy.gasList = payload.gasList;
+ state.copilot.energy.waterList = payload.waterList;
+ state.copilot.energy.elecList = payload.elecList;
break;
case "efficiency":
- console.log('222222', payload)
state.copilot.efficiency.chipOee = payload.chipOee;
state.copilot.efficiency.transformRate = payload.transformRate;
state.copilot.efficiency.chipRate = payload.chipRate;
@@ -83,40 +90,47 @@ const actions = {
/** 初始化首页数据 */
async initHome({ commit }) {
const dataArr = await getHomeInfo();
- const targetArr = await getHomeInfo();
- const payload = splitCurrentAndPrevious(dataArr.prodOutputResultDO, targetArr.prodTargetDO);
+ console.log('dataArr',dataArr);
+ // const targetArr = await getHomeInfo();
+ const payload = splitCurrentAndPrevious(dataArr.prodOutputOutDO, dataArr.prodTargetDO,dataArr.prodOutputFtoDO
+);
commit("SET_HOME_INFO", payload);
},
/** 初始化驾驶舱数据 */
async initCopilot({ commit }, { period, source }) {
- if (source == "comprehensive") return;
+ // if (source == "energy") return;
const fetcher = {
yield: getCopilotYield,
- comprehensive: getCopilotEnergy,
+ energy: getCopilotEnergy,
efficiency: getCopilotEfficiency,
}[source];
const handler = {
yield: splitCurrentAndPrevious,
- comprehensive: () => null,
+ energy: splitCurrentAndPreviousB,
efficiency: splitCurrentAndPreviousA,
}[source]
- console.log(handler)
// 获取产量数据
- // console.log('qqqqqq',handler)
let { data: factoryList, type } = await fetcher(period)
- console.log(factoryList,type);
let targetList = null;
if (source === "yield" || source === "efficiency") {
// 获取目标数据
let { data } = await fetcher(period, true)
- // console.log('11111',data)
targetList = data
}
- let factoryData = factoryList.prodOutputResultDO ? factoryList.prodOutputResultDO : factoryList.prodOutputRateDO
- let targetData = targetList.prodTargetDO ? targetList.prodTargetDO : targetList.prodTargetDO
- const payload = handler(factoryData, targetData)
+ if (source == "energy") {
+ let factoryData = factoryList
+ const payload = handler(factoryData)
+ commit("SET_COPILOT_INFO", { type, payload });
+ } else {
+ let factoryData = factoryList.prodOutputOutDO ? factoryList.prodOutputOutDO : factoryList.prodOutputRateDO
+ let prodOutputFtoDO = factoryList.prodOutputFtoDO ? factoryList.prodOutputFtoDO : []
+ let targetData = targetList.prodTargetDO ? targetList.prodTargetDO : targetList.prodTargetDO
+ const payload = handler(factoryData, targetData,prodOutputFtoDO)
commit("SET_COPILOT_INFO", { type, payload });
+
+ }
+
},
};
@@ -127,8 +141,147 @@ export default {
actions,
};
+function splitCurrentAndPreviousB(factoryListResponse) {
+ let factoryArr = [
+ {
+ id: 0,
+ name: '瑞昌中建材光电材料有限公司',
+ stockData: [],
+ waterData: [],
+ elsData: [],
+ gasData: [],
+ },
+ {
+ id: 1,
+ name: '邯郸中建材光电材料有限公司',
+ stockData: [],
+ waterData: [],
+ elsData: [],
+ gasData: [],
+ },
+ {
+ id: 2,
+ name: '中建材株洲光电材料有限公司',
+ stockData: [],
+ waterData: [],
+ elsData: [],
+ gasData: [],
+ },
+ {
+ id: 3,
+ name: '佳木斯中建材光电材料有限公司',
+ stockData: [],
+ waterData: [],
+ elsData: [],
+ gasData: [],
+ },
+ {
+ id: 4,
+ name: '成都中建材光电材料有限公司',
+ stockData: [],
+ waterData: [],
+ elsData: [],
+ gasData: [],
+ },
+ {
+ id: 5,
+ name: '凯盛光伏材料有限公司',
+ stockData: [],
+ waterData: [],
+ elsData: [],
+ gasData: [],
+ },
+ {
+ id: 6,
+ name: '蚌埠兴科玻璃有限公司',
+ stockData: [],
+ waterData: [],
+ elsData: [],
+ gasData: [],
+ },
+ ]
+ if (factoryListResponse) {
+ for (let i in factoryListResponse.stockDO) {
+ const index = factoryArr.findIndex(item => item.id == factoryListResponse.stockDO[i].factory)
+ if (index != -1) {
+ factoryListResponse.stockDO[i].stockInfo.forEach(ele => {
+ factoryArr[index].stockData.push(ele)
+ });
+ }
+
+ }
+ let stockDOData = []
+ factoryArr.forEach((ele, index) => [
+ stockDOData[index] = [],
+ ele.stockData.forEach((item) => {
+ let obj = {}
+ obj.name = item.glassType == 0 ? '玻璃芯片' : item.glassType == 1 ? '标准组件' : item.glassType == 2 ? 'BIPV' : '定制组件'
+ obj.value = item.stockNumber
+ stockDOData[index].push(obj)
+ }),
+ ])
+ let gasList = []
+ // if (factoryListResponse.gasDO) {
+ factoryListResponse.gasDO.forEach((ele) => {
+ gasList[ele.factory] = ele.totalEnergyValue
+ })
+ // }
+
+ // console.log(factoryListResponse.gasDO);
+ let waterObj = Object.groupBy(factoryListResponse.waterDO, ({ groupName }) => groupName)
+ let waterList = {
+ times: [],
+ 0: [],
+ 1: [],
+ 2: [],
+ 3: [],
+ 4: [],
+ 5: [],
+ 6: [],
+ }
+ for (let i in waterObj) {
+ waterList.times.push(i)
+ waterObj[i].forEach((ele, index) => {
+ waterList[ele.factory].push(ele.totalEnergyValue)
+ })
+ }
+ let elecObj = Object.groupBy(factoryListResponse.elecDO, ({ groupName }) => groupName)
+ let elecList = {
+ times: [],
+ 0: [],
+ 1: [],
+ 2: [],
+ 3: [],
+ 4: [],
+ 5: [],
+ 6: [],
+ }
+ for (let i in elecObj) {
+ elecList.times.push(i)
+ elecObj[i].forEach((ele, index) => {
+ elecList[ele.factory].push(ele.totalEnergyValue)
+ })
+ }
+
+ return {
+ stockDOData,
+ waterList,
+ gasList,
+ elecList,
+ };
+ } else {
+ let stockDOData = Array[7].fill([])
+ let waterList = {}
+ return {
+ stockDOData,
+ waterList,
+ gasList,
+ elecList
+ };
+ }
+}
+
function splitCurrentAndPreviousA(factoryListResponse, targetListResponse) {
- console.log('工厂',targetListResponse);
// console.log('工厂',factoryListResponse);
// 初始数据
@@ -209,7 +362,6 @@ function splitCurrentAndPreviousA(factoryListResponse, targetListResponse) {
// 芯片良率 与 标准组件良率
if (![0, 1].includes(factory.glassType)) continue;
const _t = [chipRate, stdRate][factory.glassType]
- console.log('_t',_t);
_t.current[fId] = factory.yieldRate ;
_t.previous[fId] = factory.previousYearYieldRate ;
}
@@ -223,14 +375,20 @@ function splitCurrentAndPreviousA(factoryListResponse, targetListResponse) {
}
}
-function splitCurrentAndPrevious(factoryListResponse, targetListResponse) {
- console.log('工厂',factoryListResponse);
-
+function splitCurrentAndPrevious(factoryListResponse, targetListResponse, prodOutputFtoListRes) {
+ console.log('prodOutputFtoListRes',prodOutputFtoListRes);
// 初始数据
- const { chipInvest, ftoInvest, chipOutput, stdOutput, bipvOutput } = init();
+ const { chipInvest, ftoInvest, chipOutput, stdOutput, bipvOutput } = init()
+ if (prodOutputFtoListRes) {
+ for (const factory of prodOutputFtoListRes) {
+ console.log(factory);
+ const fId = getFactoryId(factory);
+ ftoInvest.current[fId] = factory.chipInput;
+ ftoInvest.previous[fId] = factory.previousYearChipInput;
+ }
+ }
if (factoryListResponse) {
for (const factory of factoryListResponse) {
-
const fId = getFactoryId(factory);
// 获取目标值
if (targetListResponse) {
@@ -244,8 +402,11 @@ function splitCurrentAndPrevious(factoryListResponse, targetListResponse) {
chipInvest.current[fId] = factory.inputNumber;
chipInvest.previous[fId] = factory.previousYearInputNumber;
// FTO投入
- ftoInvest.current[fId] = factory.chipInput;
- ftoInvest.previous[fId] = factory.previousYearChipInput;
+ // if (factory.chipInput || factory.previousYearChipInput) {
+ // ftoInvest.current[fId] = factory.chipInput;
+ // ftoInvest.previous[fId] = factory.previousYearChipInput;
+ // }
+
// 产出数据, 0 - (玻璃)芯片产出, 1 - 标准组件产出, 2 - BIPV产出
// 因为后端写的垃圾数据,所以这里要做一下判断
if (![0, 1, 2].includes(factory.glassType)) continue;
@@ -257,6 +418,7 @@ function splitCurrentAndPrevious(factoryListResponse, targetListResponse) {
return {
chipInvest,
+ // ftoInvest,
ftoInvest,
chipOutput,
stdOutput,
@@ -407,7 +569,7 @@ function getUrl(copilot_module) {
// 对比数据的 URL
comparison: "",
// 目标数据的 URL
- target: "",
+ // target: "",
};
switch (copilot_module) {
case "yield":
@@ -415,6 +577,7 @@ function getUrl(copilot_module) {
// url.target = "/ip/prod-target/query-by-date";
break;
case "energy":
+ url.comparison = "ip/prod-output/cockpitComprehensiveDataMonitor";
break;
case "efficiency":
url.comparison = "ip/prod-output/cockpitDataRate";
diff --git a/src/views/copilot/components/BarChartBase.vue b/src/views/copilot/components/BarChartBase.vue
index 528cfd5..8be1bdc 100644
--- a/src/views/copilot/components/BarChartBase.vue
+++ b/src/views/copilot/components/BarChartBase.vue
@@ -8,33 +8,25 @@
- {{ item.label }}
+ {{ item.label }}
-
+
diff --git a/src/views/copilot/components/CopilotHeader.vue b/src/views/copilot/components/CopilotHeader.vue
index 49e00f5..659a686 100644
--- a/src/views/copilot/components/CopilotHeader.vue
+++ b/src/views/copilot/components/CopilotHeader.vue
@@ -62,7 +62,6 @@ export default {
methods: {
toggleFullScreen() {
this.isFullscreen = !this.isFullscreen;
-
screenfull.toggle(document.querySelector(".copilot-layout"))
// 矫正宽度
// const el = document.querySelector(".copilot-layout");
diff --git a/src/views/copilot/components/LineChartBase.vue b/src/views/copilot/components/LineChartBase.vue
index 3694c0a..42e3ccc 100644
--- a/src/views/copilot/components/LineChartBase.vue
+++ b/src/views/copilot/components/LineChartBase.vue
@@ -11,7 +11,7 @@
{{ item.label }}
-
+
@@ -36,12 +36,12 @@ export default {
type: Array,
required: true,
},
- xAxis: {
- type: Array,
- required: true,
- },
+ // xAxis: {
+ // type: Array,
+ // required: true,
+ // },
series: {
- type: Array,
+ type: Object,
required: true,
},
in: {
@@ -84,19 +84,16 @@ export default {
// },
grid: {
left: '3%',
- right: '4%',
+ right: '2%',
bottom: '3%',
containLabel: true
},
- xAxis: [
- {
+ xAxis:{
type: 'category',
boundaryGap: false,
data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
- }
- ],
- yAxis: [
- {
+ },
+ yAxis: {
min: function () { // 取最小值向下取整为最小刻度
return 0
},
@@ -143,7 +140,6 @@ export default {
// }
// },
},
- ],
series: [
{
name: '瑞昌',
@@ -367,22 +363,31 @@ export default {
watch: {
isOpen(val) {
if (val === true) {
- this.width = '99%'
+ this.width = 97 + '%'
this.canvasReset()
console.log(this.width)
} else {
this.watch = 100 + '%'
this.canvasReset()
+
}
},
/** 全屏状态切换时,对柱子粗细和字体大小进行相应调整 */
isFullscreen(val) {
- this.actualOptions.series.map((item) => {
- item.barWidth = val ? 18 : 12;
- });
- this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 12;
- this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 12;
- this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 12;
+ if (val === false && this.isOpen === true) {
+ this.width = 97 + '%'
+ this.canvasReset()
+ } else if (val === false && this.isOpen === false) {
+ this.watch = 100 + '%'
+ this.canvasReset()
+
+ }
+ // this.actualOptions.series.map((item) => {
+ // item.barWidth = val ? 18 : 12;
+ // });
+ // this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 12;
+ // this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 12;
+ // this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 12;
this.initChart(this.actualOptions);
},
series(val) {
@@ -391,21 +396,26 @@ export default {
return;
}
const actualOptions = JSON.parse(JSON.stringify(this.options));
- actualOptions.series[0].data = val[0].data;
- actualOptions.series[0].name = val[0].name;
- actualOptions.series[1].data = val?.[1]?.data || [];
- actualOptions.series[1].name = val?.[1]?.name || "";
+ actualOptions.xAxis.data = val.times
+ actualOptions.series[0].data = val[0]
+ actualOptions.series[1].data = val[1];
+ actualOptions.series[2].data = val[2];
+ actualOptions.series[3].data = val[3];
+ actualOptions.series[4].data = val[4];
+ actualOptions.series[5].data = val[5];
+ actualOptions.series[6].data = val[6];
+
this.actualOptions = actualOptions;
this.initChart(actualOptions);
},
},
mounted() {
- // if (screenfull.isEnabled) {
- // screenfull.on("change", () => {
- // this.isFullscreen = screenfull.isFullscreen;
- // });
- // }
+ if (screenfull.isEnabled) {
+ screenfull.on("change", () => {
+ this.isFullscreen = screenfull.isFullscreen;
+ });
+ }
this.actualOptions = this.options
this.canvasReset();
window.addEventListener("resize", this.canvasReset);
diff --git a/src/views/copilot/components/LineChartWater.vue b/src/views/copilot/components/LineChartWater.vue
index dc081b7..fa05faa 100644
--- a/src/views/copilot/components/LineChartWater.vue
+++ b/src/views/copilot/components/LineChartWater.vue
@@ -11,7 +11,7 @@
{{ item.label }}
-
+
@@ -36,12 +36,12 @@ export default {
type: Array,
required: true,
},
- xAxis: {
- type: Array,
- required: true,
- },
+ // xAxis: {
+ // type: Array,
+ // required: true,
+ // },
series: {
- type: Array,
+ type: Object,
required: true,
},
in: {
@@ -56,8 +56,8 @@ export default {
actualOptions: null,
options: {
grid: {
- left: "1%",
- right: "4%",
+ left: "3%",
+ right: "2%",
bottom: "3%",
top: "15%",
containLabel: true,
@@ -88,15 +88,12 @@ export default {
bottom: '3%',
containLabel: true
},
- xAxis: [
- {
+ xAxis:{
type: 'category',
- boundaryGap: false,
- data: ['Mon', 'Tue', 'Wed', 'Thu', 'Fri', 'Sat', 'Sun']
- }
- ],
- yAxis: [
- {
+ // boundaryGap: false,
+ data: []
+ },
+ yAxis: {
min: function () { // 取最小值向下取整为最小刻度
return 0
},
@@ -143,7 +140,6 @@ export default {
// }
// },
},
- ],
series: [
{
name: '瑞昌',
@@ -173,7 +169,7 @@ export default {
// emphasis: {
// focus: 'series'
// },
- data: [120, 132, 101, 134, 90, 230, 210]
+ data: []
},
{
name: '邯郸',
@@ -203,7 +199,7 @@ export default {
// emphasis: {
// focus: 'series'
// },
- data: [120, 132, 101, 134, 90, 230, 210]
+ data: []
},
{
name: '株洲',
@@ -233,7 +229,7 @@ export default {
// emphasis: {
// focus: 'series'
// },
- data: [120, 132, 101, 134, 90, 230, 210]
+ data: []
},
{
name: '佳木斯',
@@ -263,7 +259,7 @@ export default {
// emphasis: {
// focus: 'series'
// },
- data: [120, 132, 101, 134, 90, 230, 210]
+ data: []
},
{
name: '成都',
@@ -293,7 +289,7 @@ export default {
// emphasis: {
// focus: 'series'
// },
- data: [120, 132, 101, 134, 90, 230, 210]
+ data: []
},
{
name: '凯盛',
@@ -323,7 +319,7 @@ export default {
// emphasis: {
// focus: 'series'
// },
- data: [120, 132, 101, 134, 90, 230, 210]
+ data: []
},
{
name: '蚌埠',
@@ -353,7 +349,7 @@ export default {
// emphasis: {
// focus: 'series'
// },
- data: [120, 132, 101, 134, 90, 230, 210]
+ data: []
},
]
},
@@ -364,8 +360,9 @@ export default {
// console.log(val)
if (val === true) {
console.log('ztl')
- this.width = '99%'
+ this.width = 97 + '%'
this.canvasReset()
+
console.log(this.width)
} else {
this.watch = 100 + '%'
@@ -374,15 +371,20 @@ export default {
},
/** 全屏状态切换时,对柱子粗细和字体大小进行相应调整 */
isFullscreen(val) {
- if (val === true && this.isOpen === true) {
- this.width = '99%'
+ if (val === false && this.isOpen === true) {
+ console.log(val)
+ this.width = 97 + '%'
+ this.canvasReset()
+ } else if(val === false && this.isOpen === false) {
+ this.watch = 100 + '%'
+ this.canvasReset()
}
- this.actualOptions.series.map((item) => {
- item.barWidth = val ? 18 : 12;
- });
- this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 12;
- this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 12;
- this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 12;
+ // this.actualOptions.series.map((item) => {
+ // item.barWidth = val ? 18 : 12;
+ // });
+ // this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 12;
+ // this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 12;
+ // this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 12;
this.initChart(this.actualOptions);
},
series(val) {
@@ -390,11 +392,22 @@ export default {
this.initChart(this.options);
return;
}
- const actualOptions = JSON.parse(JSON.stringify(this.options));
- actualOptions.series[0].data = val[0].data;
- actualOptions.series[0].name = val[0].name;
- actualOptions.series[1].data = val?.[1]?.data || [];
- actualOptions.series[1].name = val?.[1]?.name || "";
+ const actualOptions = JSON.parse(JSON.stringify(this.options))
+ // console.log(actualOptions)
+ actualOptions.xAxis.data = val.times
+ // actualOptions.series.forEach((ele,index) => {
+ // ele.data = val.index
+ // })
+ actualOptions.series[0].data = val[0]
+ actualOptions.series[1].data = val[1];
+ actualOptions.series[2].data = val[2];
+ actualOptions.series[3].data = val[3];
+ actualOptions.series[4].data = val[4];
+ actualOptions.series[5].data = val[5];
+ actualOptions.series[6].data = val[6];
+
+ // actualOptions.series[1].data = val?.[1]?.data || [];
+ // actualOptions.series[1].name = val?.[1]?.name || "";
this.actualOptions = actualOptions;
this.initChart(actualOptions);
},
diff --git a/src/views/copilot/components/gasBarChartBase.vue b/src/views/copilot/components/gasBarChartBase.vue
index 33bc474..b9ec720 100644
--- a/src/views/copilot/components/gasBarChartBase.vue
+++ b/src/views/copilot/components/gasBarChartBase.vue
@@ -1,7 +1,7 @@
@@ -12,7 +12,7 @@
-
+
@@ -33,22 +33,22 @@ export default {
type: Number,
default: 38,
},
- legend: {
- type: Array,
- required: false,
- },
+ // legend: {
+ // type: Array,
+ // required: false,
+ // },
xAxis: {
type: Array,
required: true,
},
series: {
type: Array,
- required: true,
- },
- in: {
- type: String,
- default: "",
+ required: false,
},
+ // in: {
+ // type: String,
+ // default: "",
+ // },
},
data() {
return {
@@ -57,8 +57,8 @@ export default {
actualOptions: null,
options: {
grid: {
- left: "1%",
- right: "4%",
+ left: "3%",
+ right: "2%",
bottom: "3%",
top: "15%",
containLabel: true,
@@ -140,38 +140,38 @@ export default {
},
data: [], // this.series[0].data,
},
- {
- name: "", // this.series[1].name,
- type: "bar",
- barWidth: 12,
- // tooltip: {
- // valueFormatter: function (value) {
- // return value + " ml";
- // },
- // },
- itemStyle: {
- borderRadius: [10, 10, 0, 0],
- color: {
- type: "linear",
- x: 0,
- y: 0,
- x2: 0,
- y2: 1,
- colorStops: [
- {
- offset: 0,
- color: "#57abf8", // 0% 处的颜色
- },
- {
- offset: 1,
- color: "#364BFE66", // 100% 处的颜色
- },
- ],
- global: false, // 缺省为 false
- },
- },
- data: [], // this.series[1].data,
- },
+ // {
+ // name: "", // this.series[1].name,
+ // type: "bar",
+ // barWidth: 12,
+ // // tooltip: {
+ // // valueFormatter: function (value) {
+ // // return value + " ml";
+ // // },
+ // // },
+ // itemStyle: {
+ // borderRadius: [10, 10, 0, 0],
+ // color: {
+ // type: "linear",
+ // x: 0,
+ // y: 0,
+ // x2: 0,
+ // y2: 1,
+ // colorStops: [
+ // {
+ // offset: 0,
+ // color: "#57abf8", // 0% 处的颜色
+ // },
+ // {
+ // offset: 1,
+ // color: "#364BFE66", // 100% 处的颜色
+ // },
+ // ],
+ // global: false, // 缺省为 false
+ // },
+ // },
+ // data: [], // this.series[1].data,
+ // },
],
},
};
@@ -185,39 +185,44 @@ export default {
isOpen(val) {
// console.log(val)
if (val === true) {
- console.log('ryf')
- this.width = '99%'
+ this.width = 97 + '%'
this.canvasReset()
+
console.log(this.width)
} else {
+ console.log('ryf')
this.watch = 100 + '%'
this.canvasReset()
}
},
/** 全屏状态切换时,对柱子粗细和字体大小进行相应调整 */
isFullscreen(val) {
- if (val === true && this.isOpen === true) {
- this.width = '99%'
+ if (val === false && this.isOpen === true) {
+ this.width = 97 + '%'
+ this.canvasReset()
+ } else if (val === false && this.isOpen === false) {
+ this.watch = 100 + '%'
+ this.canvasReset()
}
- this.actualOptions.series.map((item) => {
- item.barWidth = val ? 18 : 12;
- });
- this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 12;
- this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 12;
- this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 12;
- this.initOptions(this.actualOptions);
+ // this.actualOptions.series.map((item) => {
+ // item.barWidth = val ? 18 : 12;
+ // });
+ // this.actualOptions.xAxis.axisLabel.fontSize = val ? 18 : 12;
+ // this.actualOptions.yAxis.axisLabel.fontSize = val ? 18 : 12;
+ // this.actualOptions.yAxis.nameTextStyle.fontSize = val ? 18 : 12;
+ this.initChart(this.actualOptions);
},
series(val) {
if (!val) {
- this.initOptions(this.options);
+ this.initChart(this.options);
return;
}
const actualOptions = JSON.parse(JSON.stringify(this.options));
console.log('actualOptions', this.options)
- actualOptions.series[0].data = val[0].data;
- actualOptions.series[0].name = val[0].name;
- actualOptions.series[1].data = val?.[1]?.data || [];
- actualOptions.series[1].name = val?.[1]?.name || "";
+ actualOptions.series[0].data = val;
+ // actualOptions.series[0].name = val[0].name;
+ // actualOptions.series[1].data = val?.[1]?.data || [];
+ // actualOptions.series[1].name = val?.[1]?.name || "";
this.actualOptions = actualOptions;
this.initChart(actualOptions);
},
diff --git a/src/views/copilot/components/select.vue b/src/views/copilot/components/select.vue
index ae818f3..10988c5 100644
--- a/src/views/copilot/components/select.vue
+++ b/src/views/copilot/components/select.vue
@@ -1,8 +1,8 @@
-
diff --git a/src/views/copilot/container.vue b/src/views/copilot/container.vue
index e04c530..3a17b4a 100644
--- a/src/views/copilot/container.vue
+++ b/src/views/copilot/container.vue
@@ -7,7 +7,8 @@
-->
-
+
+
@@ -71,6 +72,7 @@ export default {
position: absolute;
left: -16px;
/* top: -8px; */
+ /* height: calc(100% + 38px); */
width: calc(100% + 30px);
z-index: 1001;
color: #fff;
@@ -83,7 +85,7 @@ export default {
height: calc(100% + 38px);
}
.other {
- height: 100vh + 50px;
+ height: calc(100% + 240px);
}
.copilot-footer {
/** position: absolute;
diff --git a/src/views/copilot/efficiency/components/ChipOee.vue b/src/views/copilot/efficiency/components/ChipOee.vue
index fd8e087..f4e623c 100644
--- a/src/views/copilot/efficiency/components/ChipOee.vue
+++ b/src/views/copilot/efficiency/components/ChipOee.vue
@@ -110,4 +110,6 @@ function getTemplate(period, dataList) {
}
-
+
diff --git a/src/views/copilot/efficiency/components/StdRate.vue b/src/views/copilot/efficiency/components/StdRate.vue
index f18af7d..233c7b5 100644
--- a/src/views/copilot/efficiency/components/StdRate.vue
+++ b/src/views/copilot/efficiency/components/StdRate.vue
@@ -1,7 +1,7 @@
@@ -11,7 +11,7 @@
-
@@ -97,13 +97,22 @@ export default {
diff --git a/src/views/copilot/efficiency/components/sub/chip/ChipRateItem.vue b/src/views/copilot/efficiency/components/sub/chip/ChipRateItem.vue
index c9d1216..f4b1592 100644
--- a/src/views/copilot/efficiency/components/sub/chip/ChipRateItem.vue
+++ b/src/views/copilot/efficiency/components/sub/chip/ChipRateItem.vue
@@ -11,7 +11,7 @@
-
+
@@ -145,25 +145,29 @@ export default {
-l
diff --git a/src/views/copilot/energy/index.vue b/src/views/copilot/energy/index.vue
index 15d2e6b..eeb3b64 100644
--- a/src/views/copilot/energy/index.vue
+++ b/src/views/copilot/energy/index.vue
@@ -1,25 +1,29 @@
-
-
-
-
-
-
-
-
-
-
-
-
+
+
@@ -29,7 +33,6 @@ import StockMonitorVue from "./components/StockMonitor.vue";
import ElecCostVue from "./components/ElecCost.vue";
import NatGasVue from "./components/NatGas.vue";
import WaterCostVue from "./components/WaterCost.vue";
-
export default {
name: "EnergyCopilot",
components: {
@@ -46,7 +49,9 @@ export default {
},
},
data() {
- return {};
+ return {
+ stockDOData:[],
+ };
},
watch: {
period: {
@@ -61,11 +66,16 @@ export default {
fetchData(period = "日") {
// console.log(this.width);
// console.log('sidebar', this.$store.getters.sidebar);
- console.log(`效率驾驶舱,获取${period}数据`);
+ console.log(`综合驾驶舱,获取${period}数据`);
+ // this.getData(this.period)
this.$store.dispatch("copilot/initCopilot", {
period,
- source: "comprehensive",
+ source: "energy",
});
+ // this.$store.dispatch("copilot/initCopilot", {
+ // period,
+ // source: "comprehensive",
+ // });
},
},
};
@@ -74,13 +84,19 @@ export default {
diff --git a/src/views/copilot/energy/options/monitorOptions.js b/src/views/copilot/energy/options/monitorOptions.js
index b6b6c91..51dc2b8 100644
--- a/src/views/copilot/energy/options/monitorOptions.js
+++ b/src/views/copilot/energy/options/monitorOptions.js
@@ -1,19 +1,16 @@
/*
* @Author: zhp
* @Date: 2024-05-07 10:25:10
- * @LastEditTime: 2024-05-10 16:10:49
+ * @LastEditTime: 2024-05-16 13:35:50
* @LastEditors: zhp
* @Description:
*/
export default function ({
- single = false,
+ // single = false,
colors = ['#2760FF', '#5996F7', '#8BC566', '#11FAF0','#F3C000'],
titleValue,
subtitle,
dataList,
- previousSum,
- currentSum,
- targetSum,
}) {
return {
grid: {
@@ -26,7 +23,7 @@ export default function ({
// tooltip: {},
title: {
text: titleValue,
- left: "49%",
+ left: "47%",
top: "39%",
textAlign: "center",
textStyle: {
@@ -50,7 +47,7 @@ export default function ({
{
name: 'Access From',
type: 'pie',
- // center: ['50%', '40%'],
+ center: ['50%', '50%'],
radius: ['50%', '80%'],
avoidLabelOverlap: false,
labelLine: {
@@ -62,7 +59,6 @@ export default function ({
data: dataList && dataList.length > 0 && dataList.map((item, index) => ({
name:item.name,
value: item.value,
-
itemStyle:{
color:{
type: 'linear',
diff --git a/src/views/copilot/yield/components/FtoInvest.vue b/src/views/copilot/yield/components/FtoInvest.vue
index 8463fa5..bcda714 100644
--- a/src/views/copilot/yield/components/FtoInvest.vue
+++ b/src/views/copilot/yield/components/FtoInvest.vue
@@ -65,6 +65,7 @@ export default {
},
series() {
const { ftoInvest } = this.$store.getters.copilot.yield;
+ console.log('ftoInvest', this.$store.getters.copilot.yield);
let dataList = null;
switch (this.period) {
diff --git a/src/views/copilot/yield/components/sub/ring/DoubleRingChart.vue b/src/views/copilot/yield/components/sub/ring/DoubleRingChart.vue
index 6f15a90..d54e268 100644
--- a/src/views/copilot/yield/components/sub/ring/DoubleRingChart.vue
+++ b/src/views/copilot/yield/components/sub/ring/DoubleRingChart.vue
@@ -7,9 +7,9 @@