“yu” 2024-07-17 21:20:35 +08:00
parent 8143fc29fc
commit 3add5e8c99
3 changed files with 611 additions and 525 deletions

File diff suppressed because it is too large Load Diff

View File

@ -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[];
}>(); }>();
// echartDOM // echartDOM
@ -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'
}, },
], ],
}; };

View File

@ -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;