zyh
This commit is contained in:
commit
62a18469e4
|
|
@ -1,3 +1,4 @@
|
||||||
|
<<<<<<< HEAD
|
||||||
import request from '@/utils/request'
|
import request from '@/utils/request'
|
||||||
|
|
||||||
// 负荷管理
|
// 负荷管理
|
||||||
|
|
@ -37,8 +38,14 @@ export function GetFhzb () {
|
||||||
}
|
}
|
||||||
// 生产线负荷
|
// 生产线负荷
|
||||||
export function GetScxfh () {
|
export function GetScxfh () {
|
||||||
|
=======
|
||||||
|
import request from "@/utils/request";
|
||||||
|
|
||||||
|
//
|
||||||
|
export function loadBrand(limit) {
|
||||||
|
>>>>>>> d12dd164c5611f550b3ec7804fac54967e0e4100
|
||||||
return request({
|
return request({
|
||||||
url: `brand?limit=${limit}`,
|
url: `brand?limit=${limit}`,
|
||||||
method: 'GET'
|
method: "GET",
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -14,7 +14,7 @@ const getPie3D = (
|
||||||
alpha,
|
alpha,
|
||||||
pieHeight,
|
pieHeight,
|
||||||
opacity = 1
|
opacity = 1
|
||||||
) => {
|
) => {
|
||||||
const series = [];
|
const series = [];
|
||||||
let sumValue = 0;
|
let sumValue = 0;
|
||||||
let startValue = 0;
|
let startValue = 0;
|
||||||
|
|
@ -171,19 +171,19 @@ const getPie3D = (
|
||||||
series: series,
|
series: series,
|
||||||
};
|
};
|
||||||
return option;
|
return option;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 生成扇形的曲面参数方程,用于 series-surface.parametricEquation
|
* 生成扇形的曲面参数方程,用于 series-surface.parametricEquation
|
||||||
*/
|
*/
|
||||||
const getParametricEquation = (
|
const getParametricEquation = (
|
||||||
startRatio,
|
startRatio,
|
||||||
endRatio,
|
endRatio,
|
||||||
isSelected,
|
isSelected,
|
||||||
isHovered,
|
isHovered,
|
||||||
k,
|
k,
|
||||||
h
|
h
|
||||||
) => {
|
) => {
|
||||||
// 计算
|
// 计算
|
||||||
const midRatio = (startRatio + endRatio) / 2;
|
const midRatio = (startRatio + endRatio) / 2;
|
||||||
const startRadian = startRatio * Math.PI * 2;
|
const startRadian = startRatio * Math.PI * 2;
|
||||||
|
|
@ -248,22 +248,22 @@ const getPie3D = (
|
||||||
return Math.sin(v) > 0 ? 1 * h * 0.1 : -1;
|
return Math.sin(v) > 0 ? 1 * h * 0.1 : -1;
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取3d丙图的最高扇区的高度
|
* 获取3d丙图的最高扇区的高度
|
||||||
*/
|
*/
|
||||||
const getHeight3D = (series, height) => {
|
const getHeight3D = (series, height) => {
|
||||||
series.sort((a, b) => {
|
series.sort((a, b) => {
|
||||||
return b.pieData.value - a.pieData.value;
|
return b.pieData.value - a.pieData.value;
|
||||||
});
|
});
|
||||||
return (height * 25) / series[0].pieData.value;
|
return (height * 25) / series[0].pieData.value;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 格式化浮点数
|
* 格式化浮点数
|
||||||
*/
|
*/
|
||||||
const fomatFloat = (num, n) => {
|
const fomatFloat = (num, n) => {
|
||||||
let f = parseFloat(num);
|
let f = parseFloat(num);
|
||||||
if (isNaN(f)) {
|
if (isNaN(f)) {
|
||||||
return false;
|
return false;
|
||||||
|
|
@ -280,8 +280,6 @@ const getPie3D = (
|
||||||
s += "0";
|
s += "0";
|
||||||
}
|
}
|
||||||
return s;
|
return s;
|
||||||
};
|
};
|
||||||
|
|
||||||
export { getPie3D, getParametricEquation };
|
|
||||||
|
|
||||||
|
|
||||||
|
export { getPie3D, getParametricEquation };
|
||||||
|
|
|
||||||
|
|
@ -130,7 +130,7 @@ export default {
|
||||||
url: "",
|
url: "",
|
||||||
list: [],
|
list: [],
|
||||||
res: "",
|
res: "",
|
||||||
falg: true,
|
falg: false,
|
||||||
type: "电流",
|
type: "电流",
|
||||||
option: {
|
option: {
|
||||||
tooltip: {
|
tooltip: {
|
||||||
|
|
@ -370,6 +370,8 @@ export default {
|
||||||
},
|
},
|
||||||
sendMessageToCSharp(name) {
|
sendMessageToCSharp(name) {
|
||||||
this.falg = true;
|
this.falg = true;
|
||||||
|
this.dldy();
|
||||||
|
this.ssfh();
|
||||||
let that = this;
|
let that = this;
|
||||||
window.vuplex.postMessage({
|
window.vuplex.postMessage({
|
||||||
type: that.$route.query.type,
|
type: that.$route.query.type,
|
||||||
|
|
@ -440,10 +442,7 @@ export default {
|
||||||
myChart.setOption(this.option1);
|
myChart.setOption(this.option1);
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {},
|
||||||
this.dldy();
|
|
||||||
this.ssfh();
|
|
||||||
},
|
|
||||||
beforeDestroy() {
|
beforeDestroy() {
|
||||||
this.falg = false;
|
this.falg = false;
|
||||||
},
|
},
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue