This commit is contained in:
unknown 2023-12-15 11:17:58 +08:00
commit 62a18469e4
4 changed files with 286 additions and 282 deletions

View File

@ -1,3 +1,4 @@
<<<<<<< HEAD
import request from '@/utils/request'
// 负荷管理
@ -37,8 +38,14 @@ export function GetFhzb () {
}
// 生产线负荷
export function GetScxfh () {
=======
import request from "@/utils/request";
//
export function loadBrand(limit) {
>>>>>>> d12dd164c5611f550b3ec7804fac54967e0e4100
return request({
url: `brand?limit=${limit}`,
method: 'GET'
})
method: "GET",
});
}

View File

@ -14,7 +14,7 @@ const getPie3D = (
alpha,
pieHeight,
opacity = 1
) => {
) => {
const series = [];
let sumValue = 0;
let startValue = 0;
@ -171,19 +171,19 @@ const getPie3D = (
series: series,
};
return option;
};
};
/**
/**
* 生成扇形的曲面参数方程用于 series-surface.parametricEquation
*/
const getParametricEquation = (
const getParametricEquation = (
startRatio,
endRatio,
isSelected,
isHovered,
k,
h
) => {
) => {
// 计算
const midRatio = (startRatio + endRatio) / 2;
const startRadian = startRatio * Math.PI * 2;
@ -248,22 +248,22 @@ const getPie3D = (
return Math.sin(v) > 0 ? 1 * h * 0.1 : -1;
},
};
};
};
/**
/**
* 获取3d丙图的最高扇区的高度
*/
const getHeight3D = (series, height) => {
const getHeight3D = (series, height) => {
series.sort((a, b) => {
return b.pieData.value - a.pieData.value;
});
return (height * 25) / series[0].pieData.value;
};
};
/**
/**
* 格式化浮点数
*/
const fomatFloat = (num, n) => {
const fomatFloat = (num, n) => {
let f = parseFloat(num);
if (isNaN(f)) {
return false;
@ -280,8 +280,6 @@ const getPie3D = (
s += "0";
}
return s;
};
export { getPie3D, getParametricEquation };
};
export { getPie3D, getParametricEquation };

View File

View File

@ -130,7 +130,7 @@ export default {
url: "",
list: [],
res: "",
falg: true,
falg: false,
type: "电流",
option: {
tooltip: {
@ -370,6 +370,8 @@ export default {
},
sendMessageToCSharp(name) {
this.falg = true;
this.dldy();
this.ssfh();
let that = this;
window.vuplex.postMessage({
type: that.$route.query.type,
@ -440,10 +442,7 @@ export default {
myChart.setOption(this.option1);
},
},
mounted() {
this.dldy();
this.ssfh();
},
mounted() {},
beforeDestroy() {
this.falg = false;
},