fix:综合查询模拟数据
This commit is contained in:
parent
14aac09779
commit
a2b031ebf9
|
@ -0,0 +1,74 @@
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"mgroup": "3566085057347543040",
|
||||||
|
"mgroup__name": "石灰石破碎",
|
||||||
|
"total_production": 0,
|
||||||
|
"run_sec": 296088,
|
||||||
|
"elec_consume": 0,
|
||||||
|
"pcoal_coal_consume": 0,
|
||||||
|
"mgroup_name": "石灰石破碎",
|
||||||
|
"production_hour": 0,
|
||||||
|
"elec_consume_unit": 0,
|
||||||
|
"run_hour": 82.25,
|
||||||
|
"run_rate": 11.4231,
|
||||||
|
"coal_consume_unit": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"mgroup": "3566609562721439744",
|
||||||
|
"mgroup__name": "原料磨",
|
||||||
|
"total_production": 22232,
|
||||||
|
"run_sec": 372752,
|
||||||
|
"elec_consume": 0,
|
||||||
|
"pcoal_coal_consume": 0,
|
||||||
|
"mgroup_name": "原料磨",
|
||||||
|
"production_hour": 214.71,
|
||||||
|
"elec_consume_unit": 0,
|
||||||
|
"run_hour": 103.54,
|
||||||
|
"run_rate": 14.3809,
|
||||||
|
"coal_consume_unit": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"mgroup": "3566614036835889152",
|
||||||
|
"mgroup__name": "煤磨",
|
||||||
|
"total_production": 0,
|
||||||
|
"run_sec": 337988,
|
||||||
|
"elec_consume": 0,
|
||||||
|
"pcoal_coal_consume": 0,
|
||||||
|
"mgroup_name": "煤磨",
|
||||||
|
"production_hour": 0,
|
||||||
|
"elec_consume_unit": 0,
|
||||||
|
"run_hour": 93.89,
|
||||||
|
"run_rate": 13.0397,
|
||||||
|
"coal_consume_unit": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"mgroup": "3566646268703080448",
|
||||||
|
"mgroup__name": "余热发电",
|
||||||
|
"total_production": 0,
|
||||||
|
"run_sec": 310131,
|
||||||
|
"elec_consume": 0,
|
||||||
|
"pcoal_coal_consume": 0,
|
||||||
|
"mgroup_name": "余热发电",
|
||||||
|
"production_hour": 0,
|
||||||
|
"elec_consume_unit": 0,
|
||||||
|
"run_hour": 86.15,
|
||||||
|
"run_rate": 11.9649,
|
||||||
|
"coal_consume_unit": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"mgroup": "3566638510322909184",
|
||||||
|
"mgroup__name": "回转窑",
|
||||||
|
"total_production": 0,
|
||||||
|
"run_sec": 347311,
|
||||||
|
"elec_consume": 0,
|
||||||
|
"pcoal_coal_consume": 0,
|
||||||
|
"mgroup_name": "回转窑",
|
||||||
|
"production_hour": 0,
|
||||||
|
"elec_consume_unit": 0,
|
||||||
|
"run_hour": 96.48,
|
||||||
|
"run_rate": 13.3993,
|
||||||
|
"coal_consume_unit": 0,
|
||||||
|
"celec_consume_unit": 0,
|
||||||
|
"en_consume_unit": 0
|
||||||
|
}
|
||||||
|
]
|
|
@ -0,0 +1,74 @@
|
||||||
|
[
|
||||||
|
{
|
||||||
|
"mgroup": "3566085057347543040",
|
||||||
|
"mgroup__name": "石灰石破碎",
|
||||||
|
"total_production": 0,
|
||||||
|
"run_sec": 296088,
|
||||||
|
"elec_consume": 0,
|
||||||
|
"pcoal_coal_consume": 0,
|
||||||
|
"mgroup_name": "石灰石破碎",
|
||||||
|
"production_hour": 0,
|
||||||
|
"elec_consume_unit": 0,
|
||||||
|
"run_hour": 82.25,
|
||||||
|
"run_rate": 5.7116,
|
||||||
|
"coal_consume_unit": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"mgroup": "3566609562721439744",
|
||||||
|
"mgroup__name": "原料磨",
|
||||||
|
"total_production": 22232,
|
||||||
|
"run_sec": 372752,
|
||||||
|
"elec_consume": 0,
|
||||||
|
"pcoal_coal_consume": 0,
|
||||||
|
"mgroup_name": "原料磨",
|
||||||
|
"production_hour": 214.71,
|
||||||
|
"elec_consume_unit": 0,
|
||||||
|
"run_hour": 103.54,
|
||||||
|
"run_rate": 7.1904,
|
||||||
|
"coal_consume_unit": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"mgroup": "3566614036835889152",
|
||||||
|
"mgroup__name": "煤磨",
|
||||||
|
"total_production": 0,
|
||||||
|
"run_sec": 337988,
|
||||||
|
"elec_consume": 0,
|
||||||
|
"pcoal_coal_consume": 0,
|
||||||
|
"mgroup_name": "煤磨",
|
||||||
|
"production_hour": 0,
|
||||||
|
"elec_consume_unit": 0,
|
||||||
|
"run_hour": 93.89,
|
||||||
|
"run_rate": 6.5198,
|
||||||
|
"coal_consume_unit": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"mgroup": "3566646268703080448",
|
||||||
|
"mgroup__name": "余热发电",
|
||||||
|
"total_production": 0,
|
||||||
|
"run_sec": 310131,
|
||||||
|
"elec_consume": 0,
|
||||||
|
"pcoal_coal_consume": 0,
|
||||||
|
"mgroup_name": "余热发电",
|
||||||
|
"production_hour": 0,
|
||||||
|
"elec_consume_unit": 0,
|
||||||
|
"run_hour": 86.15,
|
||||||
|
"run_rate": 5.9825,
|
||||||
|
"coal_consume_unit": 0
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"mgroup": "3566638510322909184",
|
||||||
|
"mgroup__name": "回转窑",
|
||||||
|
"total_production": 0,
|
||||||
|
"run_sec": 347311,
|
||||||
|
"elec_consume": 0,
|
||||||
|
"pcoal_coal_consume": 0,
|
||||||
|
"mgroup_name": "回转窑",
|
||||||
|
"production_hour": 0,
|
||||||
|
"elec_consume_unit": 0,
|
||||||
|
"run_hour": 96.48,
|
||||||
|
"run_rate": 6.6997,
|
||||||
|
"coal_consume_unit": 0,
|
||||||
|
"celec_consume_unit": 0,
|
||||||
|
"en_consume_unit": 0
|
||||||
|
}
|
||||||
|
]
|
|
@ -1,8 +1,13 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<el-container>
|
||||||
|
<el-main>
|
||||||
|
<el-container>
|
||||||
|
<el-header style="height: 400px; padding: 0">
|
||||||
|
<el-container>
|
||||||
<el-header>
|
<el-header>
|
||||||
<div class="left-panel">
|
<div class="left-panel">
|
||||||
时间1:
|
<div class="left-panel">
|
||||||
|
时间段1:
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="query.searchData"
|
v-model="query.searchData"
|
||||||
type="daterange"
|
type="daterange"
|
||||||
|
@ -18,6 +23,61 @@
|
||||||
:loading="exportLoading"
|
:loading="exportLoading"
|
||||||
>导出xlsx
|
>导出xlsx
|
||||||
</el-button>
|
</el-button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-header>
|
||||||
|
<el-main style="background: #ffffff">
|
||||||
|
<div
|
||||||
|
ref="print"
|
||||||
|
id="myReport"
|
||||||
|
class="printContainer"
|
||||||
|
>
|
||||||
|
<table
|
||||||
|
border="1"
|
||||||
|
width="1200"
|
||||||
|
cellspacing="0"
|
||||||
|
:key="timeStamp"
|
||||||
|
id="myTable"
|
||||||
|
class="myTable"
|
||||||
|
>
|
||||||
|
<thead class="myTableHead">
|
||||||
|
<tr>
|
||||||
|
<th>工段</th>
|
||||||
|
<th>总产量</th>
|
||||||
|
<th>台时产量</th>
|
||||||
|
<th>运转时间</th>
|
||||||
|
<th>运转率</th>
|
||||||
|
<th>单位产品电耗</th>
|
||||||
|
<th>单位产品综合电耗</th>
|
||||||
|
<th>单位产品标煤耗</th>
|
||||||
|
<th>单位产品综合能耗</th>
|
||||||
|
<th>吨熟料发电量</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tr
|
||||||
|
v-for="(item, index) in tableDatas1"
|
||||||
|
:key="index"
|
||||||
|
>
|
||||||
|
<td>{{ item.mgroup_name }}</td>
|
||||||
|
<td>{{ item.total_production }}</td>
|
||||||
|
<td>{{ item.production_hour }}</td>
|
||||||
|
<td>{{ item.run_hour }}</td>
|
||||||
|
<td>{{ item.run_rate }}</td>
|
||||||
|
<td>{{ item.elec_consume_unit }}</td>
|
||||||
|
<td>{{ item.celec_consume_unit }}</td>
|
||||||
|
<td>{{ item.coal_consume_unit }}</td>
|
||||||
|
<td>{{ item.cen_consume_unit }}</td>
|
||||||
|
<td>{{ item.production_elec_unit }}</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</el-main>
|
||||||
|
</el-container>
|
||||||
|
</el-header>
|
||||||
|
<el-main style="padding: 8px 0 0 0">
|
||||||
|
<el-container>
|
||||||
|
<el-header>
|
||||||
|
<div class="left-panel">
|
||||||
时间2:
|
时间2:
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="query.searchData2"
|
v-model="query.searchData2"
|
||||||
|
@ -28,12 +88,17 @@
|
||||||
value-format="YYYY-MM-DD"
|
value-format="YYYY-MM-DD"
|
||||||
@change="getList2"
|
@change="getList2"
|
||||||
/>
|
/>
|
||||||
<el-button type="primary" @click="comparas">对比 </el-button>
|
<el-button type="primary" @click="comparas"
|
||||||
|
>对比
|
||||||
|
</el-button>
|
||||||
</div>
|
</div>
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-card style="margin-top: 5px">
|
<el-main style="background: #ffffff">
|
||||||
<div class="printWrap">
|
<div
|
||||||
<div ref="print" id="myReport" class="printContainer">
|
ref="print"
|
||||||
|
id="myReport"
|
||||||
|
class="printContainer"
|
||||||
|
>
|
||||||
<table
|
<table
|
||||||
border="1"
|
border="1"
|
||||||
width="1200"
|
width="1200"
|
||||||
|
@ -56,7 +121,10 @@
|
||||||
<th>吨熟料发电量</th>
|
<th>吨熟料发电量</th>
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tr v-for="(item, index) in tableDatas1" :key="index">
|
<tr
|
||||||
|
v-for="(item, index) in tableDatas2"
|
||||||
|
:key="index"
|
||||||
|
>
|
||||||
<td>{{ item.mgroup_name }}</td>
|
<td>{{ item.mgroup_name }}</td>
|
||||||
<td>{{ item.total_production }}</td>
|
<td>{{ item.total_production }}</td>
|
||||||
<td>{{ item.production_hour }}</td>
|
<td>{{ item.production_hour }}</td>
|
||||||
|
@ -67,60 +135,14 @@
|
||||||
<td>{{ item.coal_consume_unit }}</td>
|
<td>{{ item.coal_consume_unit }}</td>
|
||||||
<td>{{ item.cen_consume_unit }}</td>
|
<td>{{ item.cen_consume_unit }}</td>
|
||||||
<td>{{ item.production_elec_unit }}</td>
|
<td>{{ item.production_elec_unit }}</td>
|
||||||
<!-- <td
|
|
||||||
v-for="(item0, index0) in item"
|
|
||||||
:key="index0"
|
|
||||||
class="numCell"
|
|
||||||
>
|
|
||||||
{{ item0 }}
|
|
||||||
</td> -->
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
<table
|
|
||||||
border="1"
|
|
||||||
width="1200"
|
|
||||||
cellspacing="0"
|
|
||||||
:key="timeStamp"
|
|
||||||
id="myTable"
|
|
||||||
class="myTable"
|
|
||||||
>
|
|
||||||
<thead class="myTableHead">
|
|
||||||
<tr>
|
|
||||||
<th>工段</th>
|
|
||||||
<th>总产量</th>
|
|
||||||
<th>台时产量</th>
|
|
||||||
<th>运转时间</th>
|
|
||||||
<th>运转率</th>
|
|
||||||
<th>单位产品电耗</th>
|
|
||||||
<th>单位产品综合电耗</th>
|
|
||||||
<th>单位产品标煤耗</th>
|
|
||||||
<th>单位产品综合能耗</th>
|
|
||||||
<th>吨熟料发电量</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tr v-for="(item, index) in tableDatas2" :key="index">
|
|
||||||
<td>{{ item.mgroup_name }}</td>
|
|
||||||
<td>{{ item.total_production }}</td>
|
|
||||||
<td>{{ item.production_hour }}</td>
|
|
||||||
<td>{{ item.run_hour }}</td>
|
|
||||||
<td>{{ item.run_rate }}</td>
|
|
||||||
<td>{{ item.elec_consume_unit }}</td>
|
|
||||||
<td>{{ item.celec_consume_unit }}</td>
|
|
||||||
<td>{{ item.coal_consume_unit }}</td>
|
|
||||||
<td>{{ item.cen_consume_unit }}</td>
|
|
||||||
<td>{{ item.production_elec_unit }}</td>
|
|
||||||
<!-- <td
|
|
||||||
v-for="(item0, index0) in item"
|
|
||||||
:key="index0"
|
|
||||||
class="numCell"
|
|
||||||
>
|
|
||||||
{{ item0 }}
|
|
||||||
</td> -->
|
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</el-main>
|
||||||
</el-card>
|
</el-container>
|
||||||
|
</el-main>
|
||||||
|
</el-container>
|
||||||
|
</el-main>
|
||||||
<el-dialog title="对比" v-model="dialogVisible" width="1224">
|
<el-dialog title="对比" v-model="dialogVisible" width="1224">
|
||||||
<el-select
|
<el-select
|
||||||
v-model="mgroupName"
|
v-model="mgroupName"
|
||||||
|
@ -129,43 +151,35 @@
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in mgroups"
|
v-for="item in mgroups"
|
||||||
:key="item.id"
|
:key="item"
|
||||||
:label="item.name"
|
:label="item"
|
||||||
:value="item.name"
|
:value="item"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
<div id="myChart" style="width: 1200px; height: 400px"></div>
|
<div id="myChart" style="width: 1200px; height: 400px"></div>
|
||||||
</el-dialog>
|
</el-dialog>
|
||||||
</div>
|
</el-container>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import * as echarts from "echarts";
|
import * as echarts from "echarts";
|
||||||
|
import mockData from "./mock.json";
|
||||||
|
import mockData2 from "./mock2.json";
|
||||||
const colors = ["#647bfe", "#91CC75"];
|
const colors = ["#647bfe", "#91CC75"];
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
mgroupName: "",
|
mgroupName: "",
|
||||||
timeStamp: 0,
|
timeStamp: 0,
|
||||||
|
mockData: mockData,
|
||||||
|
mockData2: mockData2,
|
||||||
query: {
|
query: {
|
||||||
searchData: "",
|
searchData: "",
|
||||||
page: 0,
|
page: 0,
|
||||||
type: "month_st",
|
type: "month_st",
|
||||||
mgroup: "",
|
mgroup: "",
|
||||||
},
|
},
|
||||||
tableDatas1: [
|
tableDatas1: [],
|
||||||
{ mgroup_name: "石灰石破碎" },
|
tableDatas2: [],
|
||||||
{ mgroup_name: "原料磨" },
|
|
||||||
{ mgroup_name: "煤磨" },
|
|
||||||
{ mgroup_name: "回转窑" },
|
|
||||||
{ mgroup_name: "余热发电" },
|
|
||||||
],
|
|
||||||
tableDatas2: [
|
|
||||||
{ mgroup_name: "石灰石破碎" },
|
|
||||||
{ mgroup_name: "原料磨" },
|
|
||||||
{ mgroup_name: "煤磨" },
|
|
||||||
{ mgroup_name: "回转窑" },
|
|
||||||
{ mgroup_name: "余热发电" },
|
|
||||||
],
|
|
||||||
chartData1: {},
|
chartData1: {},
|
||||||
chartData2: {},
|
chartData2: {},
|
||||||
mgroups: [],
|
mgroups: [],
|
||||||
|
@ -248,9 +262,44 @@ export default {
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getMgroup();
|
this.useMock();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
useMock() {
|
||||||
|
let that = this;
|
||||||
|
that.tableDatas1 = that.mockData;
|
||||||
|
that.mockData.forEach((item) => {
|
||||||
|
that.mgroups.push(item.mgroup_name);
|
||||||
|
that.chartData1[item.mgroup_name] = [];
|
||||||
|
let arr = [];
|
||||||
|
arr[0] = item.total_production;
|
||||||
|
arr[1] = item.production_hour;
|
||||||
|
arr[2] = item.run_hour;
|
||||||
|
arr[3] = item.run_rate;
|
||||||
|
arr[4] = item.elec_consume_unit;
|
||||||
|
arr[5] = item.celec_consume_unit;
|
||||||
|
arr[6] = item.coal_consume_unit;
|
||||||
|
arr[7] = item.cen_consume_unit;
|
||||||
|
arr[8] = item.production_elec_unit;
|
||||||
|
that.chartData1[item.mgroup_name] = arr;
|
||||||
|
});
|
||||||
|
|
||||||
|
that.tableDatas2 = that.mockData2;
|
||||||
|
that.mockData2.forEach((item) => {
|
||||||
|
that.chartData2[item.mgroup_name] = [];
|
||||||
|
let arr = [];
|
||||||
|
arr[0] = item.total_production;
|
||||||
|
arr[1] = item.production_hour;
|
||||||
|
arr[2] = item.run_hour;
|
||||||
|
arr[3] = item.run_rate;
|
||||||
|
arr[4] = item.elec_consume_unit;
|
||||||
|
arr[5] = item.celec_consume_unit;
|
||||||
|
arr[6] = item.coal_consume_unit;
|
||||||
|
arr[7] = item.cen_consume_unit;
|
||||||
|
arr[8] = item.production_elec_unit;
|
||||||
|
that.chartData2[item.mgroup_name] = arr;
|
||||||
|
});
|
||||||
|
},
|
||||||
getList1(val) {
|
getList1(val) {
|
||||||
let that = this;
|
let that = this;
|
||||||
let start_date = val[0];
|
let start_date = val[0];
|
||||||
|
@ -263,6 +312,7 @@ export default {
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
that.tableDatas1 = res;
|
that.tableDatas1 = res;
|
||||||
res.forEach((item) => {
|
res.forEach((item) => {
|
||||||
|
that.mgroups.push(item.mgroup_name);
|
||||||
that.chartData1[item.mgroup_name] = [];
|
that.chartData1[item.mgroup_name] = [];
|
||||||
let arr = [];
|
let arr = [];
|
||||||
arr[0] = item.total_production;
|
arr[0] = item.total_production;
|
||||||
|
@ -305,7 +355,6 @@ export default {
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
getMgroup() {
|
getMgroup() {
|
||||||
this.$API.mtm.mgroup.list.req({ page: 0 }).then((res) => {
|
this.$API.mtm.mgroup.list.req({ page: 0 }).then((res) => {
|
||||||
this.mgroups = res;
|
this.mgroups = res;
|
||||||
|
|
Loading…
Reference in New Issue