fix tkx bug
This commit is contained in:
parent
e611c4597b
commit
b7a420c576
|
@ -15,6 +15,11 @@
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
|
mounted() {
|
||||||
|
if(window.location.hash== '#/dashboard'){
|
||||||
|
this.gohome();
|
||||||
|
}
|
||||||
|
},
|
||||||
methods: {
|
methods: {
|
||||||
gohome(){
|
gohome(){
|
||||||
let base_dashboard = this.$TOOL.data.get('BASE_INFO').base.base_dashboard;
|
let base_dashboard = this.$TOOL.data.get('BASE_INFO').base.base_dashboard;
|
||||||
|
@ -24,7 +29,7 @@
|
||||||
this.$router.replace({
|
this.$router.replace({
|
||||||
path: base_dashboard,
|
path: base_dashboard,
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
goback(){
|
goback(){
|
||||||
this.$router.go(-1);
|
this.$router.go(-1);
|
||||||
},
|
},
|
||||||
|
|
|
@ -41,20 +41,6 @@
|
||||||
"run_rate": 13.0397,
|
"run_rate": 13.0397,
|
||||||
"coal_consume_unit": 0
|
"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": "3566638510322909184",
|
||||||
"mgroup__name": "回转窑",
|
"mgroup__name": "回转窑",
|
||||||
|
|
|
@ -1,74 +1,3 @@
|
||||||
[
|
[
|
||||||
{
|
|
||||||
"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
|
|
||||||
}
|
|
||||||
]
|
]
|
|
@ -51,7 +51,6 @@
|
||||||
<th>单位产品综合电耗</th>
|
<th>单位产品综合电耗</th>
|
||||||
<th>单位产品标煤耗</th>
|
<th>单位产品标煤耗</th>
|
||||||
<th>单位产品综合能耗</th>
|
<th>单位产品综合能耗</th>
|
||||||
<th>吨熟料发电量</th>
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tr
|
<tr
|
||||||
|
@ -66,8 +65,7 @@
|
||||||
<td>{{ item.elec_consume_unit }}</td>
|
<td>{{ item.elec_consume_unit }}</td>
|
||||||
<td>{{ item.celec_consume_unit }}</td>
|
<td>{{ item.celec_consume_unit }}</td>
|
||||||
<td>{{ item.coal_consume_unit }}</td>
|
<td>{{ item.coal_consume_unit }}</td>
|
||||||
<td>{{ item.cen_consume_unit }}</td>
|
<td>{{ item.en_consume_unit }}</td>
|
||||||
<td>{{ item.production_elec_unit }}</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
@ -118,7 +116,6 @@
|
||||||
<th>单位产品综合电耗</th>
|
<th>单位产品综合电耗</th>
|
||||||
<th>单位产品标煤耗</th>
|
<th>单位产品标煤耗</th>
|
||||||
<th>单位产品综合能耗</th>
|
<th>单位产品综合能耗</th>
|
||||||
<th>吨熟料发电量</th>
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tr
|
<tr
|
||||||
|
@ -133,8 +130,7 @@
|
||||||
<td>{{ item.elec_consume_unit }}</td>
|
<td>{{ item.elec_consume_unit }}</td>
|
||||||
<td>{{ item.celec_consume_unit }}</td>
|
<td>{{ item.celec_consume_unit }}</td>
|
||||||
<td>{{ item.coal_consume_unit }}</td>
|
<td>{{ item.coal_consume_unit }}</td>
|
||||||
<td>{{ item.cen_consume_unit }}</td>
|
<td>{{ item.en_consume_unit }}</td>
|
||||||
<td>{{ item.production_elec_unit }}</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
|
@ -267,7 +263,8 @@ export default {
|
||||||
methods: {
|
methods: {
|
||||||
useMock() {
|
useMock() {
|
||||||
let that = this;
|
let that = this;
|
||||||
that.tableDatas1 = that.mockData;
|
// that.tableDatas1 = that.mockData;
|
||||||
|
|
||||||
that.mockData.forEach((item) => {
|
that.mockData.forEach((item) => {
|
||||||
that.mgroups.push(item.mgroup_name);
|
that.mgroups.push(item.mgroup_name);
|
||||||
that.chartData1[item.mgroup_name] = [];
|
that.chartData1[item.mgroup_name] = [];
|
||||||
|
|
|
@ -1,7 +1,8 @@
|
||||||
<template>
|
<template>
|
||||||
<!-- <el-card style="height: 100%;background-image: url('/img/elec_flow.png');background-size: contain;background-repeat: no-repeat;"> -->
|
<!-- <el-card style="height: 100%;background-image: url('/img/elec_flow.png');background-size: contain;background-repeat: no-repeat;"> -->
|
||||||
<el-card style="height: 100%;">
|
<el-card style="height: 100%; display: flex; flex-direction: column; justify-content: space-between;">
|
||||||
<img src="/media/elec_flow.png" class="flowImg" style="max-height: 100%;width:50%;object-fit:contain;" >
|
<img src="/media/elec_flow.png" class="flowImg" style="max-height: 100%;width:100%;height: auto; object-fit: contain;" >
|
||||||
|
<!-- <img src="/media/water.png" class="flowImg" style="max-height: 100%;width:100%;height: auto; object-fit: contain;" > -->
|
||||||
</el-card>
|
</el-card>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
|
|
|
@ -78,6 +78,7 @@ export default {
|
||||||
let obj = {};
|
let obj = {};
|
||||||
obj.year_s = this.year_s - 1;
|
obj.year_s = this.year_s - 1;
|
||||||
obj.page = 0;
|
obj.page = 0;
|
||||||
|
obj.type = 'month_s';
|
||||||
that.$API.enm.enstat2.req(obj).then((res) => {
|
that.$API.enm.enstat2.req(obj).then((res) => {
|
||||||
if (res.length > 0) {
|
if (res.length > 0) {
|
||||||
res.forEach((item) => {
|
res.forEach((item) => {
|
||||||
|
@ -90,6 +91,7 @@ export default {
|
||||||
let obj2 = {};
|
let obj2 = {};
|
||||||
obj2.year_s = this.year_s;
|
obj2.year_s = this.year_s;
|
||||||
obj2.page = 0;
|
obj2.page = 0;
|
||||||
|
obj2.type = 'month_s';
|
||||||
that.$API.enm.enstat2.req(obj2).then((res2) => {
|
that.$API.enm.enstat2.req(obj2).then((res2) => {
|
||||||
if (res2.length > 0) {
|
if (res2.length > 0) {
|
||||||
res2.forEach((item2) => {
|
res2.forEach((item2) => {
|
||||||
|
|
|
@ -42,14 +42,14 @@
|
||||||
@click="handleQuery"
|
@click="handleQuery"
|
||||||
></el-button>
|
></el-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="right-panel">
|
<!-- <div class="right-panel">
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
@click="roleAdd"
|
@click="roleAdd"
|
||||||
v-auth="'goal.create'"
|
v-auth="'goal.create'"
|
||||||
></el-button>
|
></el-button>
|
||||||
</div>
|
</div> -->
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-main class="nopadding">
|
<el-main class="nopadding">
|
||||||
<scTable
|
<scTable
|
||||||
|
|
|
@ -29,14 +29,14 @@
|
||||||
@click="handleQuery"
|
@click="handleQuery"
|
||||||
></el-button>
|
></el-button>
|
||||||
</div>
|
</div>
|
||||||
<div class="right-panel">
|
<!-- <div class="right-panel">
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-plus"
|
icon="el-icon-plus"
|
||||||
@click="table_add"
|
@click="table_add"
|
||||||
v-auth="'priceset.create'"
|
v-auth="'priceset.create'"
|
||||||
></el-button>
|
></el-button>
|
||||||
</div>
|
</div> -->
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-main class="nopadding">
|
<el-main class="nopadding">
|
||||||
<scTable ref="table" :apiObj="apiObj" row-key="id">
|
<scTable ref="table" :apiObj="apiObj" row-key="id">
|
||||||
|
@ -81,7 +81,7 @@
|
||||||
>编辑</el-button
|
>编辑</el-button
|
||||||
>
|
>
|
||||||
<el-divider direction="vertical"></el-divider>
|
<el-divider direction="vertical"></el-divider>
|
||||||
<el-popconfirm
|
<!-- <el-popconfirm
|
||||||
title="确定删除吗?"
|
title="确定删除吗?"
|
||||||
@confirm="table_del(scope.row, scope.$index)"
|
@confirm="table_del(scope.row, scope.$index)"
|
||||||
>
|
>
|
||||||
|
@ -94,7 +94,7 @@
|
||||||
>删除</el-button
|
>删除</el-button
|
||||||
>
|
>
|
||||||
</template>
|
</template>
|
||||||
</el-popconfirm>
|
</el-popconfirm> -->
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</scTable>
|
</scTable>
|
||||||
|
@ -155,7 +155,7 @@ export default {
|
||||||
//删除
|
//删除
|
||||||
async table_del(row) {
|
async table_del(row) {
|
||||||
var id = row.id;
|
var id = row.id;
|
||||||
var res = await this.$API.mtm.mgroup.delete.req(id);
|
var res = await this.$API.mtm.material.delete.req(id);
|
||||||
if (res.err_msg) {
|
if (res.err_msg) {
|
||||||
this.$message.error(res.err_msg);
|
this.$message.error(res.err_msg);
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -562,7 +562,7 @@ export default {
|
||||||
that.tableDatas[5][4] = item.val;
|
that.tableDatas[5][4] = item.val;
|
||||||
}else if (item.mpoint_name == "水泥+P.O52.5 散装") {
|
}else if (item.mpoint_name == "水泥+P.O52.5 散装") {
|
||||||
that.tableDatas[6][4] = item.val;
|
that.tableDatas[6][4] = item.val;
|
||||||
}else if (item.mpoint_name == "出厂批次水泥合计") {
|
}else if (item.mpoint_name == "出厂水泥") {
|
||||||
that.tableDatas[7][4] = item.val;
|
that.tableDatas[7][4] = item.val;
|
||||||
}else if (item.mpoint_name == "出厂熟料"){
|
}else if (item.mpoint_name == "出厂熟料"){
|
||||||
that.tableDatas[8][4] = item.val;
|
that.tableDatas[8][4] = item.val;
|
||||||
|
@ -596,7 +596,7 @@ export default {
|
||||||
that.tableDatas[5][3] = item.val;
|
that.tableDatas[5][3] = item.val;
|
||||||
}else if (item.mpoint_name == "水泥+P.O52.5 散装") {
|
}else if (item.mpoint_name == "水泥+P.O52.5 散装") {
|
||||||
that.tableDatas[6][3] = item.val;
|
that.tableDatas[6][3] = item.val;
|
||||||
}else if (item.mpoint_name == "出厂批次水泥合计") {
|
}else if (item.mpoint_name == "出厂水泥") {
|
||||||
that.tableDatas[7][3] = item.val;
|
that.tableDatas[7][3] = item.val;
|
||||||
}else if (item.mpoint_name == "出厂熟料"){
|
}else if (item.mpoint_name == "出厂熟料"){
|
||||||
that.tableDatas[8][3] = item.val;
|
that.tableDatas[8][3] = item.val;
|
||||||
|
@ -677,7 +677,7 @@ export default {
|
||||||
that.tableDatas[5][2] = item.val;
|
that.tableDatas[5][2] = item.val;
|
||||||
}else if (item.mpoint_name == "水泥+P.O52.5 散装") {
|
}else if (item.mpoint_name == "水泥+P.O52.5 散装") {
|
||||||
that.tableDatas[6][2] = item.val;
|
that.tableDatas[6][2] = item.val;
|
||||||
}else if (item.mpoint_name == "出厂批次水泥合计") {
|
}else if (item.mpoint_name == "出厂水泥") {
|
||||||
that.tableDatas[7][2] = item.val;
|
that.tableDatas[7][2] = item.val;
|
||||||
}else if (item.mpoint_name == "出厂熟料"){
|
}else if (item.mpoint_name == "出厂熟料"){
|
||||||
that.tableDatas[8][2] = item.val;
|
that.tableDatas[8][2] = item.val;
|
||||||
|
@ -797,7 +797,7 @@ export default {
|
||||||
seriesData6[ind] = item.val;
|
seriesData6[ind] = item.val;
|
||||||
}else if (item.mpoint_name == "水泥+P.O52.5 散装") {
|
}else if (item.mpoint_name == "水泥+P.O52.5 散装") {
|
||||||
seriesData7[ind] = item.val;
|
seriesData7[ind] = item.val;
|
||||||
}else if (item.mpoint_name == "出厂批次水泥合计") {
|
}else if (item.mpoint_name == "出厂水泥") {
|
||||||
seriesData0[ind] = item.val;
|
seriesData0[ind] = item.val;
|
||||||
}else if (item.mpoint_name == "出厂熟料"){
|
}else if (item.mpoint_name == "出厂熟料"){
|
||||||
seriesData8[ind] = item.val;
|
seriesData8[ind] = item.val;
|
||||||
|
@ -861,7 +861,7 @@ export default {
|
||||||
seriesData6[ind] = item.val;
|
seriesData6[ind] = item.val;
|
||||||
}else if (item.mpoint_name == "水泥+P.O52.5 散装") {
|
}else if (item.mpoint_name == "水泥+P.O52.5 散装") {
|
||||||
seriesData7[ind] = item.val;
|
seriesData7[ind] = item.val;
|
||||||
}else if (item.mpoint_name == "出厂批次水泥合计") {
|
}else if (item.mpoint_name == "出厂水泥") {
|
||||||
seriesData0[ind] = item.val;
|
seriesData0[ind] = item.val;
|
||||||
}else if (item.mpoint_name == "出厂熟料"){
|
}else if (item.mpoint_name == "出厂熟料"){
|
||||||
seriesData8[ind] = item.val;
|
seriesData8[ind] = item.val;
|
||||||
|
|
|
@ -222,8 +222,6 @@ export default {
|
||||||
|
|
||||||
if (materialName === "入窑生料") {
|
if (materialName === "入窑生料") {
|
||||||
materialName = "生料";
|
materialName = "生料";
|
||||||
} else if (materialName === "入窑煤粉") {
|
|
||||||
materialName = "入磨原煤";
|
|
||||||
}
|
}
|
||||||
arr.push(materialName)
|
arr.push(materialName)
|
||||||
arr.push('单价(元/吨)')
|
arr.push('单价(元/吨)')
|
||||||
|
|
|
@ -241,7 +241,7 @@
|
||||||
<script>
|
<script>
|
||||||
import scEcharts from "@/components/scEcharts";
|
import scEcharts from "@/components/scEcharts";
|
||||||
import { defineAsyncComponent } from "vue";
|
import { defineAsyncComponent } from "vue";
|
||||||
const colors = ["#647bfe", "#cbd3fe", "#91CC75", "#EE6666", "#CC00CC"];
|
const colors = ["#647bfe", "#cbd3fe", "#91CC75", "#EE6666", "#CC00CC", "#551e13"];
|
||||||
let tooltip = {
|
let tooltip = {
|
||||||
show: true,
|
show: true,
|
||||||
trigger: "axis",
|
trigger: "axis",
|
||||||
|
@ -266,7 +266,7 @@ let toolbox = {
|
||||||
};
|
};
|
||||||
let legend = {
|
let legend = {
|
||||||
top: "2%",
|
top: "2%",
|
||||||
data: ["总产量", "分布电耗", "成本", "消耗", "进厂"],
|
data: ["总产量", "分布电耗", "总电耗", "成本", "消耗", "进厂"],
|
||||||
};
|
};
|
||||||
let yAxis = [
|
let yAxis = [
|
||||||
{
|
{
|
||||||
|
@ -284,6 +284,22 @@ let yAxis = [
|
||||||
formatter: "{value}",
|
formatter: "{value}",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
type: "value",
|
||||||
|
name: "总电耗(KW.h)",
|
||||||
|
position: "left",
|
||||||
|
alignTicks: true,
|
||||||
|
offset: 80,
|
||||||
|
axisLine: {
|
||||||
|
show: true,
|
||||||
|
lineStyle: {
|
||||||
|
color: colors[5],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
axisLabel: {
|
||||||
|
formatter: "{value}",
|
||||||
|
},
|
||||||
|
},
|
||||||
{
|
{
|
||||||
type: "value",
|
type: "value",
|
||||||
name: "分布电耗(KW.h)",
|
name: "分布电耗(KW.h)",
|
||||||
|
@ -374,6 +390,7 @@ export default {
|
||||||
tableDatas: [
|
tableDatas: [
|
||||||
["产量", "总产量(t)", 0, 0, 0, 0, 0, 0, 0, 0],
|
["产量", "总产量(t)", 0, 0, 0, 0, 0, 0, 0, 0],
|
||||||
["能耗", "单位产品分布电耗(KW·h/t)", 0, 0, 0, 0, 0, 0, 0, 0],
|
["能耗", "单位产品分布电耗(KW·h/t)", 0, 0, 0, 0, 0, 0, 0, 0],
|
||||||
|
["能耗", "总电耗(KW·h/t)", 0, 0, 0, 0, 0, 0, 0, 0],
|
||||||
["成本", "电石渣成本(元/吨)", 0, 0, 0, 0, 0, 0, 0, 0],
|
["成本", "电石渣成本(元/吨)", 0, 0, 0, 0, 0, 0, 0, 0],
|
||||||
["湿电石渣", "消耗", 0, 0, 0, 0, 0, 0, 0, 0],
|
["湿电石渣", "消耗", 0, 0, 0, 0, 0, 0, 0, 0],
|
||||||
["湿电石渣", "进厂", 0, 0, 0, 0, 0, 0, 0, 0],
|
["湿电石渣", "进厂", 0, 0, 0, 0, 0, 0, 0, 0],
|
||||||
|
@ -409,6 +426,12 @@ export default {
|
||||||
yAxisIndex: 0,
|
yAxisIndex: 0,
|
||||||
data: [],
|
data: [],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "总电耗",
|
||||||
|
type: "bar",
|
||||||
|
yAxisIndex: 5,
|
||||||
|
data: [],
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "分布电耗",
|
name: "分布电耗",
|
||||||
type: "bar",
|
type: "bar",
|
||||||
|
@ -457,6 +480,12 @@ export default {
|
||||||
yAxisIndex: 0,
|
yAxisIndex: 0,
|
||||||
data: [],
|
data: [],
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "总电耗",
|
||||||
|
type: "bar",
|
||||||
|
yAxisIndex: 5,
|
||||||
|
data: [],
|
||||||
|
},
|
||||||
{
|
{
|
||||||
name: "分布电耗",
|
name: "分布电耗",
|
||||||
type: "bar",
|
type: "bar",
|
||||||
|
@ -518,7 +547,6 @@ export default {
|
||||||
this.$API.mtm.mgroup.list
|
this.$API.mtm.mgroup.list
|
||||||
.req({ page: 0, search: "电石渣" })
|
.req({ page: 0, search: "电石渣" })
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
console.log("电石渣", res);
|
|
||||||
that.query.mgroup = res[0].id;
|
that.query.mgroup = res[0].id;
|
||||||
//昨日
|
//昨日
|
||||||
let params3 = {};
|
let params3 = {};
|
||||||
|
@ -533,13 +561,15 @@ export default {
|
||||||
let data3 = res3[0];
|
let data3 = res3[0];
|
||||||
that.tableDatas[0][2] = data3.total_production;
|
that.tableDatas[0][2] = data3.total_production;
|
||||||
that.tableDatas[1][2] = data3.elec_consume_unit;
|
that.tableDatas[1][2] = data3.elec_consume_unit;
|
||||||
that.tableDatas[2][2] = data3.production_cost_unit;
|
console.log(data3.elec_consume);
|
||||||
|
that.tableDatas[2][2] = data3.elec_consume;
|
||||||
|
that.tableDatas[3][2] = data3.production_cost_unit;
|
||||||
if (data3.imaterial_data.length > 0) {
|
if (data3.imaterial_data.length > 0) {
|
||||||
data3.imaterial_data.forEach((item) => {
|
data3.imaterial_data.forEach((item) => {
|
||||||
if (item.material_name == "湿电石渣消耗") {
|
if (item.material_name == "湿电石渣消耗") {
|
||||||
that.tableDatas[3][2] = item.amount_consume;
|
|
||||||
}else if(item.material_name == "湿电石渣进厂"){
|
|
||||||
that.tableDatas[4][2] = item.amount_consume;
|
that.tableDatas[4][2] = item.amount_consume;
|
||||||
|
}else if(item.material_name == "湿电石渣进厂"){
|
||||||
|
that.tableDatas[5][2] = item.amount_consume;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -569,8 +599,8 @@ export default {
|
||||||
item5.goal_cate_name ==
|
item5.goal_cate_name ==
|
||||||
"单位产品成本(元/吨)"
|
"单位产品成本(元/吨)"
|
||||||
) {
|
) {
|
||||||
that.tableDatas[2][5] = item5[str];
|
that.tableDatas[3][5] = item5[str];
|
||||||
that.tableDatas[2][7] = item5.goal_val;
|
that.tableDatas[3][7] = item5.goal_val;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -595,19 +625,20 @@ export default {
|
||||||
(that.tableDatas[1][4]-that.tableDatas[1][7]),
|
(that.tableDatas[1][4]-that.tableDatas[1][7]),
|
||||||
that.tableDatas[1][7]
|
that.tableDatas[1][7]
|
||||||
);
|
);
|
||||||
that.tableDatas[2][4] =
|
that.tableDatas[2][4] = data1.elec_consume;
|
||||||
|
that.tableDatas[3][4] =
|
||||||
data1.production_cost_unit;
|
data1.production_cost_unit;
|
||||||
that.tableDatas[2][8] = precen(
|
that.tableDatas[3][8] = precen(
|
||||||
(that.tableDatas[2][4]-that.tableDatas[2][7]),
|
(that.tableDatas[3][4]-that.tableDatas[3][7]),
|
||||||
that.tableDatas[2][7]
|
that.tableDatas[3][7]
|
||||||
);
|
);
|
||||||
if (data1.imaterial_data.length > 0) {
|
if (data1.imaterial_data.length > 0) {
|
||||||
data1.imaterial_data.forEach((item) => {
|
data1.imaterial_data.forEach((item) => {
|
||||||
if (item.material_name == "湿电石渣消耗") {
|
if (item.material_name == "湿电石渣消耗") {
|
||||||
that.tableDatas[3][4] = item.amount_consume;
|
|
||||||
}else if(item.material_name == "湿电石渣进厂"){
|
|
||||||
that.tableDatas[4][4] = item.amount_consume;
|
that.tableDatas[4][4] = item.amount_consume;
|
||||||
}
|
}else if(item.material_name == "湿电石渣进厂"){
|
||||||
|
that.tableDatas[5][4] = item.amount_consume;
|
||||||
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
@ -633,18 +664,19 @@ export default {
|
||||||
(that.tableDatas[1][3]-that.tableDatas[1][5]),
|
(that.tableDatas[1][3]-that.tableDatas[1][5]),
|
||||||
that.tableDatas[1][5]
|
that.tableDatas[1][5]
|
||||||
);
|
);
|
||||||
that.tableDatas[2][3] =
|
that.tableDatas[3][3] =
|
||||||
data2.production_cost_unit;
|
data2.production_cost_unit;
|
||||||
that.tableDatas[2][6] = precen(
|
that.tableDatas[3][6] = precen(
|
||||||
(that.tableDatas[2][3]-that.tableDatas[2][5]),
|
(that.tableDatas[3][3]-that.tableDatas[3][5]),
|
||||||
that.tableDatas[2][5]
|
that.tableDatas[3][5]
|
||||||
);
|
);
|
||||||
|
that.tableDatas[2][3] = data2.elec_consume;
|
||||||
if (data2.imaterial_data.length > 0) {
|
if (data2.imaterial_data.length > 0) {
|
||||||
data2.imaterial_data.forEach((item) => {
|
data2.imaterial_data.forEach((item) => {
|
||||||
if (item.material_name == "湿电石渣消耗") {
|
if (item.material_name == "湿电石渣消耗") {
|
||||||
that.tableDatas[3][3] = item.amount_consume;
|
|
||||||
}else if(item.material_name == "湿电石渣进厂"){
|
|
||||||
that.tableDatas[4][3] = item.amount_consume;
|
that.tableDatas[4][3] = item.amount_consume;
|
||||||
|
}else if(item.material_name == "湿电石渣进厂"){
|
||||||
|
that.tableDatas[5][3] = item.amount_consume;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -692,13 +724,15 @@ export default {
|
||||||
seriesData1 = [],
|
seriesData1 = [],
|
||||||
seriesData2 = [],
|
seriesData2 = [],
|
||||||
seriesData3 = [],
|
seriesData3 = [],
|
||||||
seriesData4 = [];
|
seriesData4 = [],
|
||||||
|
seriesData5 = [];
|
||||||
let data = response;
|
let data = response;
|
||||||
data.forEach((item) => {
|
data.forEach((item) => {
|
||||||
let ind = item.day_s - 1;
|
let ind = item.day_s - 1;
|
||||||
seriesData0[ind] = item.total_production;
|
seriesData0[ind] = item.total_production;
|
||||||
seriesData1[ind] = item.production_cost_unit;
|
seriesData1[ind] = item.production_cost_unit;
|
||||||
seriesData2[ind] = item.elec_consume_unit;
|
seriesData2[ind] = item.elec_consume_unit;
|
||||||
|
seriesData5[ind] = item.elec_consume;
|
||||||
if (item.imaterial_data.length > 0) {
|
if (item.imaterial_data.length > 0) {
|
||||||
item.imaterial_data.forEach((items_n) => {
|
item.imaterial_data.forEach((items_n) => {
|
||||||
if (items_n.material_name == "湿电石渣消耗") {
|
if (items_n.material_name == "湿电石渣消耗") {
|
||||||
|
@ -715,6 +749,7 @@ export default {
|
||||||
options.series[2].data = seriesData2;
|
options.series[2].data = seriesData2;
|
||||||
options.series[3].data = seriesData3;
|
options.series[3].data = seriesData3;
|
||||||
options.series[4].data = seriesData4;
|
options.series[4].data = seriesData4;
|
||||||
|
options.series[5].data = seriesData5;
|
||||||
let dayXAxis = [];
|
let dayXAxis = [];
|
||||||
for (let i = 1; i <= that.days; i++) {
|
for (let i = 1; i <= that.days; i++) {
|
||||||
let item = i + "日";
|
let item = i + "日";
|
||||||
|
@ -778,8 +813,6 @@ export default {
|
||||||
this.chartShow = false;
|
this.chartShow = false;
|
||||||
this.$API.bi.dataset.exec.req("3322567213885833216").then((res) => {
|
this.$API.bi.dataset.exec.req("3322567213885833216").then((res) => {
|
||||||
this.myOption = JSON.parse(res.echart_options);
|
this.myOption = JSON.parse(res.echart_options);
|
||||||
debugger;
|
|
||||||
console.log(this.myOption);
|
|
||||||
this.chartShow = true;
|
this.chartShow = true;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
|
@ -237,19 +237,19 @@ export default {
|
||||||
// 获取 x 轴的数据,如果query.type为小时,则显示小时,如果为天则显示天,如果为月则显示月
|
// 获取 x 轴的数据,如果query.type为小时,则显示小时,如果为天则显示天,如果为月则显示月
|
||||||
if (that.query.type == "hour") {
|
if (that.query.type == "hour") {
|
||||||
option.title.text = "小时统计";
|
option.title.text = "小时统计";
|
||||||
option.xAxis.data = tableData.reverse().map((item) => item.year.toString() + "-" + item.month.toString() + "-" + item.day.toString() + " " + item.hour.toString());
|
option.xAxis.data = tableData.reverse().map((item) => item.year + "-" + item.month + "-" + item.day + " " + item.hour);
|
||||||
}else if (that.query.type == "day") {
|
}else if (that.query.type == "day") {
|
||||||
option.title.text = "天统计";
|
option.title.text = "天统计";
|
||||||
option.xAxis.data = tableData.reverse().map((item, index) => item.year.toString() + "-" + item.month.toString() + "-" + item.day.toString());
|
option.xAxis.data = tableData.reverse().map((item, index) => item.year + "-" + item.month + "-" + item.day);
|
||||||
}else if (that.query.type == "month") {
|
}else if (that.query.type == "month") {
|
||||||
option.title.text = "月统计";
|
option.title.text = "月统计";
|
||||||
option.xAxis.data = tableData.reverse().map((item, index) => item.year.toString() + "-" + item.month.toString());
|
option.xAxis.data = tableData.reverse().map((item, index) => item.year + "-" + item.month);
|
||||||
}else if (that.query.type == "day_s") {
|
}else if (that.query.type == "day_s") {
|
||||||
option.title.text = "班天统计";
|
option.title.text = "班天统计";
|
||||||
option.xAxis.data = tableData.length > 0 ? tableData.reverse().map((item, index) => item.day_s.toString()) : [];
|
option.xAxis.data = tableData.length > 0 ? tableData.reverse().map((item, index) => item.day_s) : [];
|
||||||
}else if (that.query.type == "month_s") {
|
}else if (that.query.type == "month_s") {
|
||||||
option.title.text = "班月统计";
|
option.title.text = "班月统计";
|
||||||
option.xAxis.data = tableData.length > 0 ? tableData.reverse().map((item, index) => item.month_s.toString()) : [];
|
option.xAxis.data = tableData.length > 0 ? tableData.reverse().map((item, index) => item.month_s) : [];
|
||||||
}
|
}
|
||||||
// 获取 y 轴的数据
|
// 获取 y 轴的数据
|
||||||
option.series = [
|
option.series = [
|
||||||
|
|
|
@ -49,15 +49,22 @@
|
||||||
<scTable ref="table" :apiObj="apiObj" row-key="id" stripe highlightCurrentRow hidePagination
|
<scTable ref="table" :apiObj="apiObj" row-key="id" stripe highlightCurrentRow hidePagination
|
||||||
@resetQuery="resetQuery">
|
@resetQuery="resetQuery">
|
||||||
<el-table-column label="#" type="index" width="50"></el-table-column>
|
<el-table-column label="#" type="index" width="50"></el-table-column>
|
||||||
<el-table-column label="文件地址" prop="filepath" min-width="200"></el-table-column>
|
<el-table-column label="文件地址" prop="filepath" min-width="200">
|
||||||
|
<template #default="scope">
|
||||||
|
<el-link :href="handleUrl(scope.row.filepath)" target="_blank">{{ scope.row.filepath }}</el-link>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
<el-table-column label="大小(MB)" prop="size" min-width="150"></el-table-column>
|
<el-table-column label="大小(MB)" prop="size" min-width="150"></el-table-column>
|
||||||
<el-table-column label="操作" align="center" width="80">
|
<el-table-column label="操作" align="center" width="150">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-popconfirm title="确定删除吗?" @confirm="table_del(scope.row, scope.$index)">
|
<el-popconfirm title="确定删除吗?" @confirm="table_del(scope.row, scope.$index)">
|
||||||
<template #reference>
|
<template #reference>
|
||||||
<el-button type="danger" size="small">删除</el-button>
|
<el-button v-auth="'ops.delete'" type="danger" size="small">删除</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-popconfirm>
|
</el-popconfirm>
|
||||||
|
<!-- <template v-if="scope.row.filepath">
|
||||||
|
<el-button type="primary" size="small" @click="downloadfile(scope.row)">下载</el-button>
|
||||||
|
</template> -->
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</scTable>
|
</scTable>
|
||||||
|
@ -95,6 +102,15 @@ export default {
|
||||||
this.redisData = res;
|
this.redisData = res;
|
||||||
})
|
})
|
||||||
},
|
},
|
||||||
|
handleUrl(filepath){
|
||||||
|
// 只保留 /database/bak_20241113112110.sql
|
||||||
|
const index = filepath.indexOf("/database/");
|
||||||
|
if (index !== -1) {
|
||||||
|
const newPath = filepath.slice(index);
|
||||||
|
return newPath;
|
||||||
|
}
|
||||||
|
return filepath;
|
||||||
|
},
|
||||||
serverInfo() {
|
serverInfo() {
|
||||||
this.loading = true;
|
this.loading = true;
|
||||||
this.$API.ops.server.info
|
this.$API.ops.server.info
|
||||||
|
|
Loading…
Reference in New Issue