Merge branch 'master' of https://e.coding.net/ctcdevteam/ehs/ehs_web
This commit is contained in:
commit
231b306829
|
@ -308,7 +308,7 @@ const routes = [
|
|||
path: "/enm_limestone",
|
||||
meta: {
|
||||
title: "石灰石破碎",
|
||||
icon: "el-icon-list",
|
||||
icon: "el-icon-menu",
|
||||
type: "menu",
|
||||
perms: ["enm_limestone"],
|
||||
},
|
||||
|
@ -930,7 +930,7 @@ const routes = [
|
|||
name: "enm_energy",
|
||||
path: "/enm_energy",
|
||||
meta: {
|
||||
title: "能源消耗报表",
|
||||
title: "能源报表",
|
||||
icon: "sc-icon-elec",
|
||||
type: "menu",
|
||||
perms: ["enm_energy"],
|
||||
|
@ -2644,7 +2644,7 @@ const routes = [
|
|||
path: "/dpm",
|
||||
meta: {
|
||||
title: "风险管控",
|
||||
icon: "el-icon-aim",
|
||||
icon: "el-icon-checked",
|
||||
type: "menu",
|
||||
perms: ["dpm"],
|
||||
},
|
||||
|
@ -2687,7 +2687,7 @@ const routes = [
|
|||
path: "/edu",
|
||||
meta: {
|
||||
title: "培训考试",
|
||||
icon: "el-icon-notebook",
|
||||
icon: "el-icon-question-filled",
|
||||
type: "menu",
|
||||
perms: ["edu"],
|
||||
},
|
||||
|
@ -2749,7 +2749,7 @@ const routes = [
|
|||
name: "search",
|
||||
meta: {
|
||||
title: "综合对比",
|
||||
icon: "el-icon-postcard",
|
||||
icon: "el-icon-histogram",
|
||||
type: "menu",
|
||||
perms: ["enm_compare"],
|
||||
},
|
||||
|
@ -2776,6 +2776,17 @@ const routes = [
|
|||
},
|
||||
component: "fac_cal/mpointstat",
|
||||
},
|
||||
{
|
||||
name: "formula",
|
||||
path: "/enm_base/formula",
|
||||
meta: {
|
||||
title: "计算系数",
|
||||
// icon: "el-icon-grid",
|
||||
type: "menu",
|
||||
perms: ["enm_formula"],
|
||||
},
|
||||
component: "enm_base/formulaSetting",
|
||||
},
|
||||
{
|
||||
path: "/fac_cal/caltask",
|
||||
meta: {
|
||||
|
@ -2849,17 +2860,7 @@ const routes = [
|
|||
hidden: true,
|
||||
},
|
||||
component: "enm_rm/logDetail",
|
||||
},
|
||||
{
|
||||
name: "formula",
|
||||
path: "/enm_base/formula",
|
||||
meta: {
|
||||
title: "计算系数",
|
||||
// icon: "el-icon-grid",
|
||||
perms: ["enm_formula"],
|
||||
},
|
||||
component: "enm_base/formulaSetting",
|
||||
},
|
||||
},
|
||||
],
|
||||
},
|
||||
//每月配置
|
||||
|
|
|
@ -15,6 +15,11 @@
|
|||
|
||||
<script>
|
||||
export default {
|
||||
mounted() {
|
||||
if(window.location.hash== '#/dashboard'){
|
||||
this.gohome();
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
gohome(){
|
||||
let base_dashboard = this.$TOOL.data.get('BASE_INFO').base.base_dashboard;
|
||||
|
@ -24,7 +29,7 @@
|
|||
this.$router.replace({
|
||||
path: base_dashboard,
|
||||
});
|
||||
},
|
||||
},
|
||||
goback(){
|
||||
this.$router.go(-1);
|
||||
},
|
||||
|
|
|
@ -6,7 +6,7 @@ const routes = [
|
|||
name: "layout",
|
||||
path: "/",
|
||||
component: () => import(/* webpackChunkName: "layout" */ '@/layout'),
|
||||
redirect: config.DASHBOARD_URL || '/dashboard',
|
||||
redirect: config.DASHBOARD_URL || getBaseDashboard(),
|
||||
children: []
|
||||
},
|
||||
{
|
||||
|
@ -31,5 +31,11 @@ const routes = [
|
|||
}
|
||||
}
|
||||
]
|
||||
|
||||
function getBaseDashboard() {
|
||||
let base_dashboard = this.$TOOL.data.get('BASE_INFO').base.base_dashboard;
|
||||
if (base_dashboard == null || base_dashboard == undefined) {
|
||||
base_dashboard = '/dashboard'
|
||||
}
|
||||
return base_dashboard
|
||||
}
|
||||
export default routes;
|
||||
|
|
|
@ -41,20 +41,6 @@
|
|||
"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": "回转窑",
|
||||
|
|
|
@ -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>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr
|
||||
|
@ -66,8 +65,7 @@
|
|||
<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>{{ item.en_consume_unit }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
@ -118,7 +116,6 @@
|
|||
<th>单位产品综合电耗</th>
|
||||
<th>单位产品标煤耗</th>
|
||||
<th>单位产品综合能耗</th>
|
||||
<th>吨熟料发电量</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr
|
||||
|
@ -133,8 +130,7 @@
|
|||
<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>{{ item.en_consume_unit }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
@ -267,7 +263,8 @@ export default {
|
|||
methods: {
|
||||
useMock() {
|
||||
let that = this;
|
||||
that.tableDatas1 = that.mockData;
|
||||
// that.tableDatas1 = that.mockData;
|
||||
|
||||
that.mockData.forEach((item) => {
|
||||
that.mgroups.push(item.mgroup_name);
|
||||
that.chartData1[item.mgroup_name] = [];
|
||||
|
|
|
@ -1,7 +1,8 @@
|
|||
<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%;">
|
||||
<img src="/media/elec_flow.png" class="flowImg" style="max-height: 100%;width:50%;object-fit:contain;" >
|
||||
<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: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>
|
||||
</template>
|
||||
<script>
|
||||
|
|
|
@ -78,6 +78,7 @@ export default {
|
|||
let obj = {};
|
||||
obj.year_s = this.year_s - 1;
|
||||
obj.page = 0;
|
||||
obj.type = 'month_s';
|
||||
that.$API.enm.enstat2.req(obj).then((res) => {
|
||||
if (res.length > 0) {
|
||||
res.forEach((item) => {
|
||||
|
@ -90,6 +91,7 @@ export default {
|
|||
let obj2 = {};
|
||||
obj2.year_s = this.year_s;
|
||||
obj2.page = 0;
|
||||
obj2.type = 'month_s';
|
||||
that.$API.enm.enstat2.req(obj2).then((res2) => {
|
||||
if (res2.length > 0) {
|
||||
res2.forEach((item2) => {
|
||||
|
|
|
@ -42,14 +42,14 @@
|
|||
@click="handleQuery"
|
||||
></el-button>
|
||||
</div>
|
||||
<div class="right-panel">
|
||||
<!-- <div class="right-panel">
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
@click="roleAdd"
|
||||
v-auth="'goal.create'"
|
||||
></el-button>
|
||||
</div>
|
||||
</div> -->
|
||||
</el-header>
|
||||
<el-main class="nopadding">
|
||||
<scTable
|
||||
|
|
|
@ -29,14 +29,14 @@
|
|||
@click="handleQuery"
|
||||
></el-button>
|
||||
</div>
|
||||
<div class="right-panel">
|
||||
<!-- <div class="right-panel">
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-plus"
|
||||
@click="table_add"
|
||||
v-auth="'priceset.create'"
|
||||
></el-button>
|
||||
</div>
|
||||
</div> -->
|
||||
</el-header>
|
||||
<el-main class="nopadding">
|
||||
<scTable ref="table" :apiObj="apiObj" row-key="id">
|
||||
|
@ -81,7 +81,7 @@
|
|||
>编辑</el-button
|
||||
>
|
||||
<el-divider direction="vertical"></el-divider>
|
||||
<el-popconfirm
|
||||
<!-- <el-popconfirm
|
||||
title="确定删除吗?"
|
||||
@confirm="table_del(scope.row, scope.$index)"
|
||||
>
|
||||
|
@ -94,7 +94,7 @@
|
|||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
</el-popconfirm> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
|
@ -155,7 +155,7 @@ export default {
|
|||
//删除
|
||||
async table_del(row) {
|
||||
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) {
|
||||
this.$message.error(res.err_msg);
|
||||
} else {
|
||||
|
|
|
@ -562,7 +562,7 @@ export default {
|
|||
that.tableDatas[5][4] = item.val;
|
||||
}else if (item.mpoint_name == "水泥+P.O52.5 散装") {
|
||||
that.tableDatas[6][4] = item.val;
|
||||
}else if (item.mpoint_name == "出厂批次水泥合计") {
|
||||
}else if (item.mpoint_name == "出厂水泥") {
|
||||
that.tableDatas[7][4] = item.val;
|
||||
}else if (item.mpoint_name == "出厂熟料"){
|
||||
that.tableDatas[8][4] = item.val;
|
||||
|
@ -596,7 +596,7 @@ export default {
|
|||
that.tableDatas[5][3] = item.val;
|
||||
}else if (item.mpoint_name == "水泥+P.O52.5 散装") {
|
||||
that.tableDatas[6][3] = item.val;
|
||||
}else if (item.mpoint_name == "出厂批次水泥合计") {
|
||||
}else if (item.mpoint_name == "出厂水泥") {
|
||||
that.tableDatas[7][3] = item.val;
|
||||
}else if (item.mpoint_name == "出厂熟料"){
|
||||
that.tableDatas[8][3] = item.val;
|
||||
|
@ -677,7 +677,7 @@ export default {
|
|||
that.tableDatas[5][2] = item.val;
|
||||
}else if (item.mpoint_name == "水泥+P.O52.5 散装") {
|
||||
that.tableDatas[6][2] = item.val;
|
||||
}else if (item.mpoint_name == "出厂批次水泥合计") {
|
||||
}else if (item.mpoint_name == "出厂水泥") {
|
||||
that.tableDatas[7][2] = item.val;
|
||||
}else if (item.mpoint_name == "出厂熟料"){
|
||||
that.tableDatas[8][2] = item.val;
|
||||
|
@ -797,7 +797,7 @@ export default {
|
|||
seriesData6[ind] = item.val;
|
||||
}else if (item.mpoint_name == "水泥+P.O52.5 散装") {
|
||||
seriesData7[ind] = item.val;
|
||||
}else if (item.mpoint_name == "出厂批次水泥合计") {
|
||||
}else if (item.mpoint_name == "出厂水泥") {
|
||||
seriesData0[ind] = item.val;
|
||||
}else if (item.mpoint_name == "出厂熟料"){
|
||||
seriesData8[ind] = item.val;
|
||||
|
@ -861,7 +861,7 @@ export default {
|
|||
seriesData6[ind] = item.val;
|
||||
}else if (item.mpoint_name == "水泥+P.O52.5 散装") {
|
||||
seriesData7[ind] = item.val;
|
||||
}else if (item.mpoint_name == "出厂批次水泥合计") {
|
||||
}else if (item.mpoint_name == "出厂水泥") {
|
||||
seriesData0[ind] = item.val;
|
||||
}else if (item.mpoint_name == "出厂熟料"){
|
||||
seriesData8[ind] = item.val;
|
||||
|
|
|
@ -222,8 +222,6 @@ export default {
|
|||
|
||||
if (materialName === "入窑生料") {
|
||||
materialName = "生料";
|
||||
} else if (materialName === "入窑煤粉") {
|
||||
materialName = "入磨原煤";
|
||||
}
|
||||
arr.push(materialName)
|
||||
arr.push('单价(元/吨)')
|
||||
|
|
|
@ -241,7 +241,7 @@
|
|||
<script>
|
||||
import scEcharts from "@/components/scEcharts";
|
||||
import { defineAsyncComponent } from "vue";
|
||||
const colors = ["#647bfe", "#cbd3fe", "#91CC75", "#EE6666", "#CC00CC"];
|
||||
const colors = ["#647bfe", "#cbd3fe", "#91CC75", "#EE6666", "#CC00CC", "#551e13"];
|
||||
let tooltip = {
|
||||
show: true,
|
||||
trigger: "axis",
|
||||
|
@ -266,7 +266,7 @@ let toolbox = {
|
|||
};
|
||||
let legend = {
|
||||
top: "2%",
|
||||
data: ["总产量", "分布电耗", "成本", "消耗", "进厂"],
|
||||
data: ["总产量", "分布电耗", "总电耗", "成本", "消耗", "进厂"],
|
||||
};
|
||||
let yAxis = [
|
||||
{
|
||||
|
@ -284,6 +284,22 @@ let yAxis = [
|
|||
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",
|
||||
name: "分布电耗(KW.h)",
|
||||
|
@ -374,6 +390,7 @@ export default {
|
|||
tableDatas: [
|
||||
["产量", "总产量(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],
|
||||
|
@ -409,6 +426,12 @@ export default {
|
|||
yAxisIndex: 0,
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "总电耗",
|
||||
type: "bar",
|
||||
yAxisIndex: 5,
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "分布电耗",
|
||||
type: "bar",
|
||||
|
@ -457,6 +480,12 @@ export default {
|
|||
yAxisIndex: 0,
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "总电耗",
|
||||
type: "bar",
|
||||
yAxisIndex: 5,
|
||||
data: [],
|
||||
},
|
||||
{
|
||||
name: "分布电耗",
|
||||
type: "bar",
|
||||
|
@ -518,7 +547,6 @@ export default {
|
|||
this.$API.mtm.mgroup.list
|
||||
.req({ page: 0, search: "电石渣" })
|
||||
.then((res) => {
|
||||
console.log("电石渣", res);
|
||||
that.query.mgroup = res[0].id;
|
||||
//昨日
|
||||
let params3 = {};
|
||||
|
@ -533,13 +561,15 @@ export default {
|
|||
let data3 = res3[0];
|
||||
that.tableDatas[0][2] = data3.total_production;
|
||||
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) {
|
||||
data3.imaterial_data.forEach((item) => {
|
||||
if (item.material_name == "湿电石渣消耗") {
|
||||
that.tableDatas[3][2] = item.amount_consume;
|
||||
}else if(item.material_name == "湿电石渣进厂"){
|
||||
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 ==
|
||||
"单位产品成本(元/吨)"
|
||||
) {
|
||||
that.tableDatas[2][5] = item5[str];
|
||||
that.tableDatas[2][7] = item5.goal_val;
|
||||
that.tableDatas[3][5] = item5[str];
|
||||
that.tableDatas[3][7] = item5.goal_val;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
@ -595,19 +625,20 @@ export default {
|
|||
(that.tableDatas[1][4]-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;
|
||||
that.tableDatas[2][8] = precen(
|
||||
(that.tableDatas[2][4]-that.tableDatas[2][7]),
|
||||
that.tableDatas[2][7]
|
||||
);
|
||||
that.tableDatas[3][8] = precen(
|
||||
(that.tableDatas[3][4]-that.tableDatas[3][7]),
|
||||
that.tableDatas[3][7]
|
||||
);
|
||||
if (data1.imaterial_data.length > 0) {
|
||||
data1.imaterial_data.forEach((item) => {
|
||||
if (item.material_name == "湿电石渣消耗") {
|
||||
that.tableDatas[3][4] = item.amount_consume;
|
||||
}else if(item.material_name == "湿电石渣进厂"){
|
||||
that.tableDatas[4][4] = item.amount_consume;
|
||||
}
|
||||
}else if(item.material_name == "湿电石渣进厂"){
|
||||
that.tableDatas[5][4] = item.amount_consume;
|
||||
}
|
||||
});
|
||||
}
|
||||
} else {
|
||||
|
@ -633,18 +664,19 @@ export default {
|
|||
(that.tableDatas[1][3]-that.tableDatas[1][5]),
|
||||
that.tableDatas[1][5]
|
||||
);
|
||||
that.tableDatas[2][3] =
|
||||
that.tableDatas[3][3] =
|
||||
data2.production_cost_unit;
|
||||
that.tableDatas[2][6] = precen(
|
||||
(that.tableDatas[2][3]-that.tableDatas[2][5]),
|
||||
that.tableDatas[2][5]
|
||||
that.tableDatas[3][6] = precen(
|
||||
(that.tableDatas[3][3]-that.tableDatas[3][5]),
|
||||
that.tableDatas[3][5]
|
||||
);
|
||||
that.tableDatas[2][3] = data2.elec_consume;
|
||||
if (data2.imaterial_data.length > 0) {
|
||||
data2.imaterial_data.forEach((item) => {
|
||||
if (item.material_name == "湿电石渣消耗") {
|
||||
that.tableDatas[3][3] = item.amount_consume;
|
||||
}else if(item.material_name == "湿电石渣进厂"){
|
||||
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 = [],
|
||||
seriesData2 = [],
|
||||
seriesData3 = [],
|
||||
seriesData4 = [];
|
||||
seriesData4 = [],
|
||||
seriesData5 = [];
|
||||
let data = response;
|
||||
data.forEach((item) => {
|
||||
let ind = item.day_s - 1;
|
||||
seriesData0[ind] = item.total_production;
|
||||
seriesData1[ind] = item.production_cost_unit;
|
||||
seriesData2[ind] = item.elec_consume_unit;
|
||||
seriesData5[ind] = item.elec_consume;
|
||||
if (item.imaterial_data.length > 0) {
|
||||
item.imaterial_data.forEach((items_n) => {
|
||||
if (items_n.material_name == "湿电石渣消耗") {
|
||||
|
@ -715,6 +749,7 @@ export default {
|
|||
options.series[2].data = seriesData2;
|
||||
options.series[3].data = seriesData3;
|
||||
options.series[4].data = seriesData4;
|
||||
options.series[5].data = seriesData5;
|
||||
let dayXAxis = [];
|
||||
for (let i = 1; i <= that.days; i++) {
|
||||
let item = i + "日";
|
||||
|
@ -778,8 +813,6 @@ export default {
|
|||
this.chartShow = false;
|
||||
this.$API.bi.dataset.exec.req("3322567213885833216").then((res) => {
|
||||
this.myOption = JSON.parse(res.echart_options);
|
||||
debugger;
|
||||
console.log(this.myOption);
|
||||
this.chartShow = true;
|
||||
});
|
||||
},
|
||||
|
|
|
@ -237,19 +237,19 @@ export default {
|
|||
// 获取 x 轴的数据,如果query.type为小时,则显示小时,如果为天则显示天,如果为月则显示月
|
||||
if (that.query.type == "hour") {
|
||||
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") {
|
||||
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") {
|
||||
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") {
|
||||
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") {
|
||||
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 轴的数据
|
||||
option.series = [
|
||||
|
|
|
@ -49,15 +49,22 @@
|
|||
<scTable ref="table" :apiObj="apiObj" row-key="id" stripe highlightCurrentRow hidePagination
|
||||
@resetQuery="resetQuery">
|
||||
<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="操作" align="center" width="80">
|
||||
<el-table-column label="操作" align="center" width="150">
|
||||
<template #default="scope">
|
||||
<el-popconfirm title="确定删除吗?" @confirm="table_del(scope.row, scope.$index)">
|
||||
<template #reference>
|
||||
<el-button type="danger" size="small">删除</el-button>
|
||||
<el-button v-auth="'dbback.delete'" type="danger" size="small">删除</el-button>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
<!-- <template v-if="scope.row.filepath">
|
||||
<el-button type="primary" size="small" @click="downloadfile(scope.row)">下载</el-button>
|
||||
</template> -->
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
|
@ -95,6 +102,15 @@ export default {
|
|||
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() {
|
||||
this.loading = true;
|
||||
this.$API.ops.server.info
|
||||
|
|
Loading…
Reference in New Issue