master
parent
8143fc29fc
commit
3add5e8c99
File diff suppressed because it is too large
Load Diff
|
@ -14,12 +14,11 @@ import {
|
||||||
import transformFontSize from "@/hooks/transFormSize.ts";
|
import transformFontSize from "@/hooks/transFormSize.ts";
|
||||||
import "echarts/lib/component/dataZoom";
|
import "echarts/lib/component/dataZoom";
|
||||||
onMounted(() => {
|
onMounted(() => {
|
||||||
drawOneLine(props.echartArr,props.echartArr_u,props.echartArr_i);
|
drawOneLine(props.echartArr);
|
||||||
});
|
});
|
||||||
const props = defineProps<{
|
const props = defineProps<{
|
||||||
echartArr: any[];
|
echartArr: any[];
|
||||||
echartArr_u:any[];
|
|
||||||
echartArr_i:any[];
|
|
||||||
}>();
|
}>();
|
||||||
|
|
||||||
// 获取echart挂载的DOM节点
|
// 获取echart挂载的DOM节点
|
||||||
|
@ -28,7 +27,7 @@ const OneLine: any = ref();
|
||||||
// 获取当前组件实例
|
// 获取当前组件实例
|
||||||
const { proxy }: any = getCurrentInstance();
|
const { proxy }: any = getCurrentInstance();
|
||||||
|
|
||||||
const drawOneLine = (arr: any,arr_u:any,arr_i:any) => {
|
const drawOneLine = (arr: any) => {
|
||||||
console.log(arr, "储能的曲线222");
|
console.log(arr, "储能的曲线222");
|
||||||
|
|
||||||
let myChart = proxy.$echarts.init(OneLine.value);
|
let myChart = proxy.$echarts.init(OneLine.value);
|
||||||
|
@ -57,11 +56,12 @@ const drawOneLine = (arr: any,arr_u:any,arr_i:any) => {
|
||||||
function getDom(param: any) {
|
function getDom(param: any) {
|
||||||
let newStr = "";
|
let newStr = "";
|
||||||
param.forEach((item: any) => {
|
param.forEach((item: any) => {
|
||||||
|
let unit = item.series.unit
|
||||||
newStr += `<div style="display:flex;"><div>${
|
newStr += `<div style="display:flex;"><div>${
|
||||||
item.seriesName
|
item.seriesName
|
||||||
}:</div><div>${
|
}:</div><div>${
|
||||||
item.value === undefined ? "0" : item.value
|
item.value === undefined ? "0" : item.value
|
||||||
}kW</div></div>`;
|
}${unit}</div></div>`;
|
||||||
});
|
});
|
||||||
return newStr;
|
return newStr;
|
||||||
}
|
}
|
||||||
|
@ -114,7 +114,7 @@ const drawOneLine = (arr: any,arr_u:any,arr_i:any) => {
|
||||||
show: true, //y轴轴线
|
show: true, //y轴轴线
|
||||||
},
|
},
|
||||||
type: "value",
|
type: "value",
|
||||||
name: "kW",
|
name: "",
|
||||||
// min: 0,
|
// min: 0,
|
||||||
// max: 100,
|
// max: 100,
|
||||||
nameTextStyle: {
|
nameTextStyle: {
|
||||||
|
@ -159,6 +159,7 @@ const drawOneLine = (arr: any,arr_u:any,arr_i:any) => {
|
||||||
},
|
},
|
||||||
// data: [20, 42, 41, 24, 40, 30, 10],
|
// data: [20, 42, 41, 24, 40, 30, 10],
|
||||||
data: arr.map((yitem) => yitem.p),
|
data: arr.map((yitem) => yitem.p),
|
||||||
|
unit:'kW'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "电压",
|
name: "电压",
|
||||||
|
@ -187,6 +188,7 @@ const drawOneLine = (arr: any,arr_u:any,arr_i:any) => {
|
||||||
},
|
},
|
||||||
// data: [20, 42, 41, 24, 40, 30, 10],
|
// data: [20, 42, 41, 24, 40, 30, 10],
|
||||||
data: arr.map((yitem) => yitem.u),
|
data: arr.map((yitem) => yitem.u),
|
||||||
|
unit:'V'
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "电流",
|
name: "电流",
|
||||||
|
@ -215,6 +217,7 @@ const drawOneLine = (arr: any,arr_u:any,arr_i:any) => {
|
||||||
},
|
},
|
||||||
// data: [20, 42, 41, 24, 40, 30, 10],
|
// data: [20, 42, 41, 24, 40, 30, 10],
|
||||||
data: arr.map((yitem) => yitem.i),
|
data: arr.map((yitem) => yitem.i),
|
||||||
|
unit:'A'
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
|
|
|
@ -377,7 +377,7 @@
|
||||||
placeholder="输入调节值"
|
placeholder="输入调节值"
|
||||||
/>
|
/>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item label="结束时间">
|
<el-form-item label="开始日期">
|
||||||
<el-col :span="11">
|
<el-col :span="11">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="formData.start_date"
|
v-model="formData.start_date"
|
||||||
|
@ -408,7 +408,7 @@
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
|
|
||||||
<!-- <el-input v-model="form.password" type="password"></el-input> -->
|
<!-- <el-input v-model="form.password" type="password"></el-input> -->
|
||||||
<el-form-item label="结束时间">
|
<el-form-item label="结束日期">
|
||||||
<el-col :span="11">
|
<el-col :span="11">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="formData.end_date"
|
v-model="formData.end_date"
|
||||||
|
@ -740,7 +740,7 @@ let getRunning_api = () => {
|
||||||
// 调节信息框
|
// 调节信息框
|
||||||
let formData = ref({
|
let formData = ref({
|
||||||
type: "",
|
type: "",
|
||||||
whether: "",
|
whether: "0",
|
||||||
number: "",
|
number: "",
|
||||||
start_date: "",
|
start_date: "",
|
||||||
start_time: "",
|
start_time: "",
|
||||||
|
@ -2038,7 +2038,6 @@ const styleVar = computed(() => {
|
||||||
color: #fff !important;
|
color: #fff !important;
|
||||||
height: changeHeight(50) !important;
|
height: changeHeight(50) !important;
|
||||||
line-height: changeHeight(50) !important;
|
line-height: changeHeight(50) !important;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-select__placeholder {
|
.el-select__placeholder {
|
||||||
|
@ -2046,7 +2045,6 @@ const styleVar = computed(() => {
|
||||||
height: changeHeight(50) !important;
|
height: changeHeight(50) !important;
|
||||||
line-height: changeHeight(50) !important;
|
line-height: changeHeight(50) !important;
|
||||||
font-size: changeHeight(35) !important;
|
font-size: changeHeight(35) !important;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.el-radio__label {
|
.el-radio__label {
|
||||||
|
@ -2059,7 +2057,6 @@ const styleVar = computed(() => {
|
||||||
line-height: changeHeight(200) !important;
|
line-height: changeHeight(200) !important;
|
||||||
|
|
||||||
font-size: changeHeight(35) !important;
|
font-size: changeHeight(35) !important;
|
||||||
|
|
||||||
}
|
}
|
||||||
.el-select-dropdown__list {
|
.el-select-dropdown__list {
|
||||||
width: changeHeight(500) !important;
|
width: changeHeight(500) !important;
|
||||||
|
|
Loading…
Reference in New Issue