Merge branch 'master' of https://e.coding.net/ctcdevteam/ehs/ehs_web
This commit is contained in:
commit
d14faabc46
|
@ -1026,12 +1026,12 @@ const routes = [
|
||||||
component: "enm_energy/hour_base",
|
component: "enm_energy/hour_base",
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: "hourBase",
|
name: "hourBaseTotal",
|
||||||
path: "/enm_energy/electric_total",
|
path: "/enm_energy/electric_total",
|
||||||
meta: {
|
meta: {
|
||||||
title: "电量报表",
|
title: "电量报表",
|
||||||
// icon: "el-icon-grid",
|
// icon: "el-icon-grid",
|
||||||
perms: ["hour_base"],
|
perms: ["hour_base_elec"],
|
||||||
},
|
},
|
||||||
component: "enm_energy/electric_total",
|
component: "enm_energy/electric_total",
|
||||||
},
|
},
|
||||||
|
|
|
@ -8,13 +8,17 @@
|
||||||
.el-form-item__content {margin-left: 0px!important;}
|
.el-form-item__content {margin-left: 0px!important;}
|
||||||
|
|
||||||
.adminui-main {
|
.adminui-main {
|
||||||
>.el-container {display: block;height:auto;}
|
// >.el-container {display: block;height:auto;}
|
||||||
>.el-container > .el-aside {width: 100%!important;border: 0}
|
// >.el-container > .el-aside {width: 100%!important;border: 0}
|
||||||
|
>.el-container {display: flex;}
|
||||||
|
>.el-container > .el-aside {width: 150px!important;border: 0}
|
||||||
}
|
}
|
||||||
.scTable {
|
.scTable {
|
||||||
.el-table,
|
.el-table,
|
||||||
.el-table__body-wrapper {display: block!important;height:auto!important;}
|
// .el-table__body-wrapper {display: block!important;height:auto!important;}
|
||||||
.el-scrollbar__wrap {height:auto!important;}
|
.el-table__body-wrapper {display: block!important;height:100%!important;}
|
||||||
|
// .el-scrollbar__wrap {height:auto!important;}
|
||||||
|
.el-scrollbar__wrap {height:100%!important;}
|
||||||
.scTable-page {padding: 0 5px!important;}
|
.scTable-page {padding: 0 5px!important;}
|
||||||
.el-pagination__total,
|
.el-pagination__total,
|
||||||
.el-pagination__jump,
|
.el-pagination__jump,
|
||||||
|
@ -22,10 +26,12 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.headerPublic {
|
.headerPublic {
|
||||||
height: auto!important;display: block;
|
// height: auto!important;display: block;
|
||||||
|
height: auto!important;
|
||||||
.left-panel {overflow: auto;}
|
.left-panel {overflow: auto;}
|
||||||
.left-panel::-webkit-scrollbar{display: none;}
|
.left-panel::-webkit-scrollbar{display: none;}
|
||||||
.right-panel {display: block;border-top: 1px solid var(--el-border-color-light);margin-top: 15px;}
|
// .right-panel {display: block;border-top: 1px solid var(--el-border-color-light);margin-top: 15px;}
|
||||||
|
.right-panel {border-top: 1px solid var(--el-border-color-light);display: flex;}
|
||||||
.right-panel .right-panel-search {display: block;}
|
.right-panel .right-panel-search {display: block;}
|
||||||
.right-panel .right-panel-search >* {width: 100%;margin: 0;margin-top: 15px;}
|
.right-panel .right-panel-search >* {width: 100%;margin: 0;margin-top: 15px;}
|
||||||
}
|
}
|
||||||
|
@ -34,13 +40,13 @@
|
||||||
.adminui-main > .el-container > .el-aside {border-bottom: 1px solid var(--el-border-color-light)!important;}
|
.adminui-main > .el-container > .el-aside {border-bottom: 1px solid var(--el-border-color-light)!important;}
|
||||||
.adminui-main > .el-container > .el-container {border-top: 1px solid var(--el-border-color-light);border-bottom: 1px solid var(--el-border-color-light);margin-top: 15px;}
|
.adminui-main > .el-container > .el-container {border-top: 1px solid var(--el-border-color-light);border-bottom: 1px solid var(--el-border-color-light);margin-top: 15px;}
|
||||||
.adminui-main > .el-container > .el-container + .el-aside {border-top: 1px solid var(--el-border-color-light);margin-top: 15px;}
|
.adminui-main > .el-container > .el-container + .el-aside {border-top: 1px solid var(--el-border-color-light);margin-top: 15px;}
|
||||||
.adminui-main > .el-container > .el-header {@extend .headerPublic;}
|
.adminui-main > .el-container > .el-header {@extend .headerPublic;display: flex;padding: 6px;}
|
||||||
.adminui-main > .el-container > .el-main.nopadding {border-top: 1px solid var(--el-border-color-light);border-bottom: 1px solid var(--el-border-color-light);margin-top: 15px;}
|
.adminui-main > .el-container > .el-main.nopadding {border-top: 1px solid var(--el-border-color-light);border-bottom: 1px solid var(--el-border-color-light);margin-top: 5px;}
|
||||||
.adminui-main > .el-container > .el-main + .el-aside {border-left: 0!important;border-top: 1px solid var(--el-border-color-light);margin-top: 15px;}
|
.adminui-main > .el-container > .el-main + .el-aside {border-left: 0!important;border-top: 1px solid var(--el-border-color-light);margin-top: 15px;}
|
||||||
.adminui-main > .el-container > .el-footer {margin-top: 15px;border-bottom: 1px solid var(--el-border-color-light);}
|
.adminui-main > .el-container > .el-footer {margin-top: 15px;border-bottom: 1px solid var(--el-border-color-light);}
|
||||||
.adminui-main > .el-container > .el-container > .el-header {@extend .headerPublic}
|
.adminui-main > .el-container > .el-container > .el-header {@extend .headerPublic}
|
||||||
.adminui-main > .el-container > .el-container > .el-header .left-panel {display: block;}
|
.adminui-main > .el-container > .el-container > .el-header .left-panel {display: block;}
|
||||||
.adminui-main > .el-container > .el-container > .el-header .right-panel {display: block;margin-top: 15px;}
|
.adminui-main > .el-container > .el-container > .el-header .right-panel {margin-top: 15px;}
|
||||||
|
|
||||||
.sc-page {width: 100%;margin: 0;}
|
.sc-page {width: 100%;margin: 0;}
|
||||||
|
|
||||||
|
|
|
@ -3,6 +3,19 @@
|
||||||
<div class="app-container" id="app-container" style="height: 100%">
|
<div class="app-container" id="app-container" style="height: 100%">
|
||||||
<el-header id="app-header">
|
<el-header id="app-header">
|
||||||
<div class="left-panel">
|
<div class="left-panel">
|
||||||
|
<el-select
|
||||||
|
v-model="query.type"
|
||||||
|
placeholder="查询类型"
|
||||||
|
clearable
|
||||||
|
class="headerSearch"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in options"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="query.day"
|
v-model="query.day"
|
||||||
type="date"
|
type="date"
|
||||||
|
@ -10,7 +23,21 @@
|
||||||
format="YYYY-MM-DD"
|
format="YYYY-MM-DD"
|
||||||
placeholder="日"
|
placeholder="日"
|
||||||
style="margin-right: 6px"
|
style="margin-right: 6px"
|
||||||
@change="dateChange"
|
v-if = "query.type == 0"
|
||||||
|
@change="dateChange"
|
||||||
|
/>
|
||||||
|
<el-date-picker
|
||||||
|
v-model="daterange"
|
||||||
|
type="datetimerange"
|
||||||
|
:shortcuts="shortcuts"
|
||||||
|
range-separator="To"
|
||||||
|
start-placeholder="Start date"
|
||||||
|
end-placeholder="End date"
|
||||||
|
placeholder="时间范围"
|
||||||
|
value-format="YYYY-MM-DD hh:mm:ss"
|
||||||
|
v-if="query.type==1"
|
||||||
|
style="margin-right: 6px"
|
||||||
|
@change="changeDate"
|
||||||
/>
|
/>
|
||||||
<!-- <el-button
|
<!-- <el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
|
@ -33,6 +60,7 @@
|
||||||
<div ref="print" id="myReport" class="printContainer">
|
<div ref="print" id="myReport" class="printContainer">
|
||||||
<el-table
|
<el-table
|
||||||
id="hourBaseTable"
|
id="hourBaseTable"
|
||||||
|
v-if="query.type==0"
|
||||||
:data="tableDatas2"
|
:data="tableDatas2"
|
||||||
style="width: 100%"
|
style="width: 100%"
|
||||||
border
|
border
|
||||||
|
@ -58,6 +86,34 @@
|
||||||
<el-table-column label="年累计" prop="year" align="center" fixed>
|
<el-table-column label="年累计" prop="year" align="center" fixed>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table>
|
</el-table>
|
||||||
|
<el-table
|
||||||
|
v-if="query.type==1"
|
||||||
|
id="hourBaseTable"
|
||||||
|
:data="tableDatas_range"
|
||||||
|
style="width: 100%"
|
||||||
|
border
|
||||||
|
:height="tableHeight"
|
||||||
|
@cell-click="handleCellClick_range"
|
||||||
|
>
|
||||||
|
<el-table-column
|
||||||
|
label="设备名称"
|
||||||
|
prop="mpoint__name"
|
||||||
|
fixed
|
||||||
|
align="center"
|
||||||
|
>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="对应点位"
|
||||||
|
prop="mpoint__code"
|
||||||
|
fixed
|
||||||
|
align="center"
|
||||||
|
></el-table-column><el-table-column
|
||||||
|
label="统计值(kwh)"
|
||||||
|
prop="total_val"
|
||||||
|
fixed
|
||||||
|
align="center"
|
||||||
|
></el-table-column>
|
||||||
|
</el-table>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</el-card>
|
</el-card>
|
||||||
|
@ -98,7 +154,13 @@ export default {
|
||||||
indexList: [],
|
indexList: [],
|
||||||
mpointList: [],
|
mpointList: [],
|
||||||
tableDatas: [],
|
tableDatas: [],
|
||||||
|
daterange: [],
|
||||||
tableDatas2: [],
|
tableDatas2: [],
|
||||||
|
tableDatas_range:[],
|
||||||
|
options: [
|
||||||
|
{id:0,name:'日统计'},
|
||||||
|
{id:1,name:'时间范围'},
|
||||||
|
],
|
||||||
tableHeight: 600,
|
tableHeight: 600,
|
||||||
itemChartTitle: "",
|
itemChartTitle: "",
|
||||||
itemChartData: [],
|
itemChartData: [],
|
||||||
|
@ -198,6 +260,8 @@ export default {
|
||||||
xAxisData: [],
|
xAxisData: [],
|
||||||
xAxisData_day: [],
|
xAxisData_day: [],
|
||||||
xAxisData_month: [],
|
xAxisData_month: [],
|
||||||
|
mpointIdList: [],
|
||||||
|
result: ""
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
|
@ -210,6 +274,7 @@ export default {
|
||||||
that.headerLength = that.days + 4;
|
that.headerLength = that.days + 4;
|
||||||
that.tableWidth = that.headerLength * 100 + "";
|
that.tableWidth = that.headerLength * 100 + "";
|
||||||
this.getMPoints();
|
this.getMPoints();
|
||||||
|
|
||||||
let heightContainer =
|
let heightContainer =
|
||||||
document.getElementById("app-container").clientHeight;
|
document.getElementById("app-container").clientHeight;
|
||||||
let heightHeader = document.getElementById("app-header").clientHeight;
|
let heightHeader = document.getElementById("app-header").clientHeight;
|
||||||
|
@ -217,28 +282,13 @@ export default {
|
||||||
that.tableHeight = heightTable;
|
that.tableHeight = heightTable;
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
|
||||||
// let that = this;
|
|
||||||
// if (columnIndex == 0) {
|
|
||||||
// if (that.indexList.indexOf(rowIndex) > -1) {
|
|
||||||
// let rowspans = that.mgroupObj[row.mgroupName];
|
|
||||||
// return {
|
|
||||||
// rowspan: rowspans,
|
|
||||||
// colspan: 1,
|
|
||||||
// };
|
|
||||||
// } else {
|
|
||||||
// return {
|
|
||||||
// rowspan: 1,
|
|
||||||
// colspan: 0,
|
|
||||||
// };
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
dateChange(e) {
|
dateChange(e) {
|
||||||
let that = this;
|
let that = this;
|
||||||
that.tableDatas = [];
|
that.tableDatas = [];
|
||||||
let arr = [];
|
let arr = [];
|
||||||
if(e){//日
|
let obj = {};
|
||||||
|
|
||||||
|
if (that.queryset.type == 0) {
|
||||||
arr = e.split('-');
|
arr = e.split('-');
|
||||||
that.year = Number(arr[0]);
|
that.year = Number(arr[0]);
|
||||||
that.month = Number(arr[1]);
|
that.month = Number(arr[1]);
|
||||||
|
@ -248,6 +298,27 @@ export default {
|
||||||
let nowDate = new Date();
|
let nowDate = new Date();
|
||||||
that.timeStamp = nowDate.getTime();
|
that.timeStamp = nowDate.getTime();
|
||||||
},
|
},
|
||||||
|
formatArry(){
|
||||||
|
this.result = this.mpointIdList.join(","); // 将数组转换为字符串
|
||||||
|
},
|
||||||
|
changeDate(){
|
||||||
|
let that = this;
|
||||||
|
let obj = {};
|
||||||
|
obj.type = "hour";
|
||||||
|
obj.start_time = this.daterange[0];
|
||||||
|
obj.end_time = this.daterange[1];
|
||||||
|
this.formatArry();
|
||||||
|
obj.mpoint__in = that.result;
|
||||||
|
obj.group_by = "mpoint__code";
|
||||||
|
obj.page = 0;
|
||||||
|
this.$API.enm.mpointstat.groupValues.req(obj).then((res) => {
|
||||||
|
//处理res数组中的 total_val 字段 保留两位
|
||||||
|
res.forEach(item => {
|
||||||
|
item.total_val = Number(item.total_val).toFixed(2);
|
||||||
|
});
|
||||||
|
this.tableDatas_range = res;
|
||||||
|
});
|
||||||
|
},
|
||||||
getMPoints() {
|
getMPoints() {
|
||||||
let that = this;
|
let that = this;
|
||||||
that.$API.enm.mpoint.list
|
that.$API.enm.mpoint.list
|
||||||
|
@ -261,6 +332,8 @@ export default {
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
that.mpointList = res.filter((item) => {
|
that.mpointList = res.filter((item) => {
|
||||||
|
// 提取mpointIdList
|
||||||
|
that.mpointIdList.push(item.id);
|
||||||
return item.report_sortstr !== "";
|
return item.report_sortstr !== "";
|
||||||
});
|
});
|
||||||
that.dataLoop();
|
that.dataLoop();
|
||||||
|
@ -271,7 +344,6 @@ export default {
|
||||||
that.tableDatas2 = [];
|
that.tableDatas2 = [];
|
||||||
that.mpointList.forEach((item, index) => {
|
that.mpointList.forEach((item, index) => {
|
||||||
let obj = {};
|
let obj = {};
|
||||||
console.log('item', item.name)
|
|
||||||
obj.name = item.name;
|
obj.name = item.name;
|
||||||
obj.code =
|
obj.code =
|
||||||
item.code != null && item.code != ""
|
item.code != null && item.code != ""
|
||||||
|
@ -318,7 +390,6 @@ export default {
|
||||||
that.tableDatas2[index]['year'] = item.val;
|
that.tableDatas2[index]['year'] = item.val;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
console.log('that.tableDatas2', that.tableDatas2)
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// handleCellClick(row, column, cell, event) {
|
// handleCellClick(row, column, cell, event) {
|
||||||
|
|
|
@ -194,7 +194,9 @@
|
||||||
that.tableDatas[1][index] = item.production_hour;
|
that.tableDatas[1][index] = item.production_hour;
|
||||||
let str = '';
|
let str = '';
|
||||||
item.qua_data.forEach((item) => {
|
item.qua_data.forEach((item) => {
|
||||||
str = str+item.testitem_name+":"+(item.rate_pass).toFixed(2)+"%\n";
|
if(item.rate_pass!==null){
|
||||||
|
str = str+item.material_name+item.testitem_name+":"+(item.rate_pass).toFixed(2)+"%;\n";
|
||||||
|
}
|
||||||
})
|
})
|
||||||
that.tableDatas[2][index] = str;//质量
|
that.tableDatas[2][index] = str;//质量
|
||||||
that.tableDatas[3][index] = item.pcoal_consume;//煤耗
|
that.tableDatas[3][index] = item.pcoal_consume;//煤耗
|
||||||
|
|
|
@ -56,8 +56,7 @@
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
<div class="right-panel">
|
<div class="right-panel">
|
||||||
<div class="right-panel-search">
|
<el-input
|
||||||
<el-input
|
|
||||||
v-model="query.search"
|
v-model="query.search"
|
||||||
placeholder="姓名/手机号"
|
placeholder="姓名/手机号"
|
||||||
clearable
|
clearable
|
||||||
|
@ -74,7 +73,6 @@
|
||||||
icon="el-icon-download"
|
icon="el-icon-download"
|
||||||
@click="exportExcel"
|
@click="exportExcel"
|
||||||
>导出</el-button>
|
>导出</el-button>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-main class="nopadding">
|
<el-main class="nopadding">
|
||||||
|
|
|
@ -21,19 +21,17 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
<div class="right-panel">
|
<div class="right-panel">
|
||||||
<div class="right-panel-search">
|
<el-input
|
||||||
<el-input
|
v-model="query.search"
|
||||||
v-model="query.search"
|
placeholder="名称"
|
||||||
placeholder="名称"
|
clearable
|
||||||
clearable
|
@keyup.enter="handleQuery"
|
||||||
@keyup.enter="handleQuery"
|
></el-input>
|
||||||
></el-input>
|
<el-button
|
||||||
<el-button
|
type="primary"
|
||||||
type="primary"
|
icon="el-icon-search"
|
||||||
icon="el-icon-search"
|
@click="handleQuery"
|
||||||
@click="handleQuery"
|
></el-button>
|
||||||
></el-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-main class="nopadding">
|
<el-main class="nopadding">
|
||||||
|
|
|
@ -18,14 +18,12 @@
|
||||||
></el-button> -->
|
></el-button> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="right-panel">
|
<div class="right-panel">
|
||||||
<div class="right-panel-search">
|
<el-input v-model="query.search" placeholder="部门名称" @keyup.enter="handleQuery"></el-input>
|
||||||
<el-input v-model="query.search" placeholder="部门名称" @keyup.enter="handleQuery"></el-input>
|
<el-button
|
||||||
<el-button
|
type="primary"
|
||||||
type="primary"
|
icon="el-icon-search"
|
||||||
icon="el-icon-search"
|
@click="handleQuery"
|
||||||
@click="handleQuery"
|
></el-button>
|
||||||
></el-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-main class="nopadding">
|
<el-main class="nopadding">
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
<template>
|
<template>
|
||||||
<el-container>
|
<el-container>
|
||||||
<el-aside width="45%">
|
<el-aside style="width: 50%!important">
|
||||||
<el-container>
|
<el-container>
|
||||||
<el-header>
|
<el-header>
|
||||||
<div class="left-panel">
|
<div class="left-panel">
|
||||||
|
|
|
@ -7,10 +7,8 @@
|
||||||
<!--<el-button type="primary" plain :disabled="selection.length!=1" @click="permission">权限设置</el-button>-->
|
<!--<el-button type="primary" plain :disabled="selection.length!=1" @click="permission">权限设置</el-button>-->
|
||||||
</div>
|
</div>
|
||||||
<div class="right-panel">
|
<div class="right-panel">
|
||||||
<div class="right-panel-search">
|
<el-input v-model="query.search" placeholder="角色名称" clearable @keyup.enter="handleQuery"></el-input>
|
||||||
<el-input v-model="query.search" placeholder="角色名称" clearable @keyup.enter="handleQuery"></el-input>
|
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
||||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-main class="nopadding">
|
<el-main class="nopadding">
|
||||||
|
|
|
@ -60,19 +60,17 @@
|
||||||
</el-select>
|
</el-select>
|
||||||
</div>
|
</div>
|
||||||
<div class="right-panel">
|
<div class="right-panel">
|
||||||
<div class="right-panel-search">
|
<el-input
|
||||||
<el-input
|
v-model="query.search"
|
||||||
v-model="query.search"
|
placeholder="登录账号 / 姓名"
|
||||||
placeholder="登录账号 / 姓名"
|
clearable
|
||||||
clearable
|
@keyup.enter="handleQuery"
|
||||||
@keyup.enter="handleQuery"
|
></el-input>
|
||||||
></el-input>
|
<el-button
|
||||||
<el-button
|
type="primary"
|
||||||
type="primary"
|
icon="el-icon-search"
|
||||||
icon="el-icon-search"
|
@click="handleQuery"
|
||||||
@click="handleQuery"
|
></el-button>
|
||||||
></el-button>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-main class="nopadding">
|
<el-main class="nopadding">
|
||||||
|
|
|
@ -12,8 +12,7 @@
|
||||||
@click="batch_del" v-auth="'workflow.delete'"></el-button> -->
|
@click="batch_del" v-auth="'workflow.delete'"></el-button> -->
|
||||||
</div>
|
</div>
|
||||||
<div class="right-panel">
|
<div class="right-panel">
|
||||||
<div class="right-panel-search">
|
<el-input
|
||||||
<el-input
|
|
||||||
v-model="query.search"
|
v-model="query.search"
|
||||||
placeholder="工作流名称"
|
placeholder="工作流名称"
|
||||||
clearable
|
clearable
|
||||||
|
@ -24,7 +23,6 @@
|
||||||
icon="el-icon-search"
|
icon="el-icon-search"
|
||||||
@click="handleQuery"
|
@click="handleQuery"
|
||||||
></el-button>
|
></el-button>
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-main class="nopadding">
|
<el-main class="nopadding">
|
||||||
|
|
Loading…
Reference in New Issue