projects/mescc/zhp #67

Merged
juzi merged 2 commits from projects/mescc/zhp into projects/mescc/develop 2024-06-27 08:38:58 +08:00
5 changed files with 88 additions and 50 deletions
Showing only changes of commit 44c5271b5a - Show all commits

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2024-06-20 16:13:36
* @LastEditTime: 2024-06-26 14:48:49
* @LastEditTime: 2024-06-26 16:53:39
* @LastEditors: zhp
* @Description:
-->
@ -36,7 +36,7 @@ export default {
color: [],
// color: ["#8EF0AB", "#63BDFF", "#288AFF"],
grid: {
left: -60,
left: 20,
right: 0,
bottom: 31,
top: 30,
@ -136,6 +136,10 @@ export default {
type: Number,
default: 300,
},
gridLeft: {
type: Boolean,
default: true,
},
type: {
type: Number,
default: 2,
@ -166,7 +170,12 @@ export default {
handler(newVal) {
this.chartHeight = newVal;
},
},
// gridLeft(val) {
// console.log(val)
// },
type() {
this.canvasReset();
},
@ -190,6 +199,12 @@ export default {
}, 500)();
},
getMes() {
console.log(this.gridLeft)
if (this.gridLeft === false) {
this.option.grid.left = 20
} else {
this.option.grid.left = -80
}
// console.log('222222', this.chartMsg);
if (this.myChart) {
this.myChart.dispose();
@ -197,7 +212,7 @@ export default {
var chartDom = document.getElementById(this.chartId);
this.myChart = echarts.init(chartDom);
this.option.color = this.chartMsg.color;
this.option.xAxis.data = this.chartMsg.xData;
this.option.xAxis.data = this.chartMsg.xData
// this.option.yAxis.name = this.chartMsg.yName;
// this.option.yAxis.axisLabel = this.chartMsg.yAxisLabel;

View File

@ -176,12 +176,12 @@ export default {
type: "value",
name: "单位/MW",
// splitNumber: 5,
min: function (value) {//
return 0
},
max: function (value) {//
return Math.ceil(value.max)
},
// min: function (value) {//
// return 0
// },
// max: function (value) {//
// return Math.ceil(value.max)
// },
alignTicks: true,
nameTextStyle: {
fontSize: 12,
@ -192,12 +192,12 @@ export default {
{
type: 'value',
alignTicks: true,
min: 0,
max: 100,
// min: 0,
// max: 100,
// scale: true,
interval: 25,//
// interval: 25,//
// inverse: true,
splitNumber: 5,
// splitNumber: 5,
name: "单位/%",
nameTextStyle: {
fontSize: 12,
@ -248,15 +248,15 @@ export default {
{
type: "value",
name: "单位/片",
min: function (value) {//
return 0
},
max: function (value) {//
return Math.ceil(value.max)
},
// min: function (value) {//
// return 0
// },
// max: function (value) {//
// return Math.ceil(value.max)
// },
alignTicks: true,
// splitNumber: 5,
scale: true,
// scale: true,
nameTextStyle: {
fontSize: 12,
align: "right",
@ -269,10 +269,10 @@ export default {
name: "单位/%",
scale: true,
alignTicks: true,
min: 0,
max: 100,
// min: 0,
// max: 100,
// scale: true,
interval: 25,//
// interval: 25,//
// splitNumber: 5,
nameTextStyle: {
fontSize: 12,
@ -521,6 +521,7 @@ export default {
this.chartMsg.series[2].data = []
this.chartMsgYearTarget.series[0].data = []
this.chartMsgYearTarget.series[1].data = []
this.title = ''
if (!this.listQuery.beginTime && !this.listQuery.endTime) {
return this.$message('请选择起止时间')
}

View File

@ -64,7 +64,7 @@
</el-col>
<el-col :span="6" style="margin-top: 30px">
<bm-line-bar-target :type="listQuery.type" :chartHeight="chartHeight" :legendList="legendList"
:chartMsg="chartMsgTarget" :chartId="'chartTarget'" :chartNum="chartNum" />
:chartMsg="chartMsgTarget" :gridLeft="gridLeft" :chartId="'chartTarget'" :chartNum="chartNum" />
</el-col>
<el-col :span="6">
<div class="blueTip">
@ -84,7 +84,7 @@
</el-col>
<el-col :span="6" style="margin-top: 30px">
<bm-line-bar-target :type="listQuery.type" :chartHeight="chartHeight" :legendList="legendList"
:chartMsg="chartMsgTarget" :chartId="'chartDayTarget'" :chartNum="chartNum" />
:chartMsg="chartMsgTarget" :gridLeft="gridLeft" :chartId="'chartDayTarget'" :chartNum="chartNum" />
</el-col>
<!-- <el-col :span="6">
<div class="blueTip">
@ -103,8 +103,8 @@
:chartId="chartId" :chartNum="chartNum" />
<!-- </el-col> -->
</el-row>
<base-table :key="showTable" :table-props="tableProps" :page="listQuery.current"
:limit="listQuery.size" :table-data="tableData" :max-height="tableH" />
<base-table :key="showTable" :table-props="tableProps" :page="listQuery.current" :limit="listQuery.size"
:table-data="tableData" :max-height="tableH" />
</div>
<!-- <div class="containerBottom">
@ -130,6 +130,7 @@ export default {
currentMenu: '邯郸',
end: undefined,
title: '',
gridLeft:true,
listQuery: {
pageNo: 1,
pageSize: 999,
@ -529,7 +530,11 @@ export default {
this.chartMsg.yAxis.interval = (this.chartMsg.yAxis.max - this.chartMsg.yAxis.min) / 4
this.chartMsgTarget.yAxis.interval = (this.chartMsgTarget.yAxis.max - this.chartMsgTarget.yAxis.min) / 4
if (this.listQuery.type === 2) {
if (res.data.list.length === 3) {
this.gridLeft = false
} else {
this.gridLeft = true
}
// res.data.list.forEach((ele) => {
res.data.list.slice(0, res.data.list.length - 3).forEach((ele, index) => {
// let i = index + 1
@ -693,6 +698,11 @@ export default {
})
// })
} else if (this.listQuery.type === 1 || this.listQuery.type === 0) {
if (res.data.list.length === 2) {
this.gridLeft = false
} else {
this.gridLeft = true
}
// res.data.list.forEach((ele) => {
res.data.list.slice(0, res.data.list.length - 2).forEach((ele, index) => {
// let i = index + 1

View File

@ -64,7 +64,8 @@
</el-col>
<el-col :span="6" style="margin-top: 30px">
<bm-line-bar-target :type="listQuery.type" :chartHeight="chartHeight" :legendList="legendList"
:chartMsg="chartMsgTarget" ref="dayTargetChart" :chartId=" 'chartTarget'" :chartNum="chartNum" />
:chartMsg="chartMsgTarget" :gridLeft="gridLeft" ref="dayTargetChart" :chartId=" 'chartTarget'"
:chartNum="chartNum" />
</el-col>
<el-col :span="6">
<div class="blueTip">
@ -84,7 +85,7 @@
</el-col>
<el-col :span="6" style="margin-top: 30px">
<bm-line-bar-target :type="listQuery.type" :chartHeight="chartHeight" :legendList="legendList"
:chartMsg="chartMsgTarget" :chartId=" 'chartDayTarget'" :chartNum="chartNum" />
:chartMsg="chartMsgTarget" :gridLeft="gridLeft" :chartId=" 'chartDayTarget'" :chartNum="chartNum" />
</el-col>
<!-- <el-col :span="6">
<div class="blueTip">
@ -129,6 +130,7 @@ export default {
currentMenu:'邯郸',
end: undefined,
title: '',
gridLeft:true,
showTable:false,
listQuery: {
pageNo: 1,
@ -673,6 +675,11 @@ export default {
// })
})
if (this.listQuery.type === 2) {
if (res.data.list.length === 3) {
this.gridLeft = false
} else {
this.gridLeft = true
}
console.log(res.data.list.length);
// res.data.list.forEach((ele) => {
res.data.list.slice(0, res.data.list.length - 3).forEach((ele, index) => {
@ -948,6 +955,11 @@ export default {
})
// })
} else if (this.listQuery.type === 1 || this.listQuery.type === 0) {
if (res.data.list.length === 2) {
this.gridLeft = false
} else {
this.gridLeft = true
}
// console.log(res.data.list.slice(res.data.list.length - 2, res.data.list.length));
// res.data.list.forEach((ele) => {
res.data.list.slice(0, res.data.list.length - 2).forEach((ele, index) => {

View File

@ -174,12 +174,12 @@ export default {
type: "value",
name: "单位/片",
splitNumber: 4,
min: function (value) {//
return Math.floor(value.min)
},
max: function (value) {//
return Math.ceil(value.max)
},
// min: function (value) {//
// return Math.floor(value.min)
// },
// max: function (value) {//
// return Math.ceil(value.max)
// },
alignTicks: true,
nameTextStyle: {
fontSize: 12,
@ -191,10 +191,10 @@ export default {
type: 'value',
// inverse: true,
alignTicks: true,
min: 0,
max: 100,
// min: 0,
// max: 100,
// scale: true,
interval: 25,//
// interval: 25,//
splitNumber: 4,
name: "单位/%",
nameTextStyle: {
@ -246,15 +246,15 @@ export default {
{
type: "value",
name: "单位/片",
min: function (value) {//
return Math.floor(value.min)
},
max: function (value) {//
return Math.ceil(value.max)
},
// min: function (value) {//
// return Math.floor(value.min)
// },
// max: function (value) {//
// return Math.ceil(value.max)
// },
alignTicks:true,
splitNumber: 4,
scale: true,
// splitNumber: 4,
// scale: true,
nameTextStyle: {
fontSize: 12,
align: "right",
@ -266,10 +266,10 @@ export default {
// inverse: true,
name: "单位/%",
alignTicks: true,
min: 0,
max:100,
// min: 0,
// max:100,
// scale: true,
interval: 25,//
// interval: 25,//
splitNumber: 4,
nameTextStyle: {
fontSize: 12,