Merge branch 'master' of https://e.coding.net/ctcdevteam/ehs/ehs_web
This commit is contained in:
commit
3a59765b26
|
@ -143,6 +143,14 @@ export default {
|
|||
data);
|
||||
}
|
||||
},
|
||||
groupValues: {
|
||||
name: "测点统计记录",
|
||||
req: async function(data){
|
||||
return await http.get(
|
||||
`${config.API_URL}/enm/mpointstat/group_values/`,
|
||||
data);
|
||||
}
|
||||
},
|
||||
statCreate: {
|
||||
name: "添加测点统计记录",
|
||||
req: async function(data){
|
||||
|
|
|
@ -975,16 +975,16 @@ const routes = [
|
|||
},
|
||||
component: "enm_energy/value",
|
||||
},
|
||||
// {
|
||||
// name: "electric",
|
||||
// path: "/enm_energy/electric",
|
||||
// meta: {
|
||||
// title: "全厂电量统计",
|
||||
// // icon: "el-icon-grid",
|
||||
// perms: ["enm_energy_electric"],
|
||||
// },
|
||||
// component: "enm_energy/electric",
|
||||
// },
|
||||
{
|
||||
name: "electric_peak",
|
||||
path: "/enm_energy/electric_peak",
|
||||
meta: {
|
||||
title: "峰谷平",
|
||||
// icon: "el-icon-grid",
|
||||
perms: ["enm_energy_electric"],
|
||||
},
|
||||
component: "enm_energy/electric_peak",
|
||||
},
|
||||
{
|
||||
name: "electricHour",
|
||||
path: "/enm_energy/electricHour",
|
||||
|
@ -2825,6 +2825,26 @@ const routes = [
|
|||
},
|
||||
component: "fac_cal/mpointstat",
|
||||
},
|
||||
{
|
||||
path: "/fac_cal/enstat",
|
||||
meta: {
|
||||
title: "工段计算",
|
||||
// icon: "el-icon-postcard",
|
||||
type: "menu",
|
||||
perms: ["mpointstat"],
|
||||
},
|
||||
component: "fac_cal/enstat",
|
||||
},
|
||||
{
|
||||
path: "/fac_cal/mpointstat_group",
|
||||
meta: {
|
||||
title: "计算聚合",
|
||||
// icon: "el-icon-postcard",
|
||||
type: "menu",
|
||||
perms: ["mpointstat"],
|
||||
},
|
||||
component: "fac_cal/mpointstat_group",
|
||||
},
|
||||
{
|
||||
name: "formula",
|
||||
path: "/enm_base/formula",
|
||||
|
|
|
@ -98,7 +98,7 @@
|
|||
>
|
||||
<template #default="{ percentage }">
|
||||
<span class="percentage-value"
|
||||
>{{ percentage }}t</span
|
||||
>{{ percentage }}t/h</span
|
||||
>
|
||||
<p class="percentage-label">{{ item.name }}</p>
|
||||
</template>
|
||||
|
@ -434,9 +434,6 @@ export default {
|
|||
窑头: "煤磨",
|
||||
水泥配料库: "水泥磨",
|
||||
水泥储存及散装库: "水泥包装",
|
||||
// 煤粉制备_primitive0: "煤磨",
|
||||
// 水泥磨房_primitive1: "水泥磨",
|
||||
// 水泥储存及散装库: "水泥包装",
|
||||
},
|
||||
totalData: {
|
||||
shuliao: 0,
|
||||
|
@ -444,12 +441,10 @@ export default {
|
|||
out_cement: 0,
|
||||
},
|
||||
rateData: [
|
||||
{ name: "电石渣", value: 0 },
|
||||
{ name: "原料磨", value: 0 },
|
||||
{ name: "煤磨", value: 0 },
|
||||
{ name: "烧成", value: 0 },
|
||||
{ name: "水泥磨", value: 0 },
|
||||
{ name: "水泥包装", value: 0 },
|
||||
],
|
||||
elecData: [
|
||||
{ name: "电石渣", value: 0 },
|
||||
|
@ -1088,25 +1083,18 @@ export default {
|
|||
let seriesData = [];
|
||||
let data = response;
|
||||
data.forEach((item) => {
|
||||
if (item.mgroup_name == "电石渣") {
|
||||
if (item.mgroup_name == "原料磨") {
|
||||
that.rateData[0].value = item.production_hour
|
||||
;
|
||||
} else if (item.mgroup_name == "原料磨") {
|
||||
} else if (item.mgroup_name == "煤磨") {
|
||||
that.rateData[1].value = item.production_hour
|
||||
;
|
||||
} else if (item.mgroup_name == "煤磨") {
|
||||
} else if (item.mgroup_name == "回转窑") {
|
||||
that.rateData[2].value = item.production_hour
|
||||
;
|
||||
} else if (item.mgroup_name == "回转窑") {
|
||||
that.rateData[3].value = item.production_hour
|
||||
;
|
||||
} else if (item.mgroup_name == "水泥磨") {
|
||||
that.rateData[4].value = item.production_hour
|
||||
;
|
||||
} else if (item.mgroup_name == "水泥包装") {
|
||||
that.rateData[5].value = item.production_hour
|
||||
;
|
||||
}
|
||||
that.rateData[3].value = item.production_hour
|
||||
};
|
||||
});
|
||||
});
|
||||
},
|
||||
|
@ -2164,7 +2152,7 @@ export default {
|
|||
padding-top: 1vh;
|
||||
}
|
||||
.item_circle {
|
||||
width: 33%;
|
||||
width: 49%;
|
||||
text-align: center;
|
||||
}
|
||||
@keyframes rotate {
|
||||
|
|
|
@ -0,0 +1,259 @@
|
|||
<template>
|
||||
<div class="app-container" id="app-container" style="height: 100%">
|
||||
<el-header id="app-header">
|
||||
<div class="left-panel">
|
||||
<el-select
|
||||
v-model="query.type"
|
||||
placeholder="查询类型"
|
||||
clearable
|
||||
class="headerSearch"
|
||||
@change="typeCange"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
<el-date-picker
|
||||
v-model="query.day"
|
||||
type="date"
|
||||
value-format="YYYY-MM-DD"
|
||||
format="YYYY-MM-DD"
|
||||
placeholder="天"
|
||||
v-if="query.type==0"
|
||||
style="margin-right: 6px"
|
||||
/>
|
||||
<el-date-picker
|
||||
v-model="query.month"
|
||||
type="month"
|
||||
value-format="YYYY-MM"
|
||||
format="YYYY-MM"
|
||||
placeholder="查询月份"
|
||||
v-if="query.type==1"
|
||||
class="headerSearch"
|
||||
/>
|
||||
<el-date-picker
|
||||
v-model="query.year"
|
||||
type="year"
|
||||
value-format="YYYY"
|
||||
format="YYYY"
|
||||
placeholder="查询年份"
|
||||
v-if="query.type==2"
|
||||
class="headerSearch"
|
||||
/>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="dateChange"
|
||||
></el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="exportExcel()"
|
||||
:loading="exportLoading"
|
||||
>导出xlsx
|
||||
</el-button>
|
||||
<el-button type="primary" @click="handlePrint">打印 </el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-card style="margin-top:5px">
|
||||
<!-- <div ref="print" id="myReport" class="printContainer">
|
||||
<h3 style="text-align: center;">{{ tableName }}</h3>
|
||||
<el-table
|
||||
:data="tableData"
|
||||
style="width: 100%"
|
||||
border
|
||||
:height="tableHeight"
|
||||
:span-method="objectSpanMethod">
|
||||
<el-table-column
|
||||
v-for="item in tableData[0]"
|
||||
:key="item"
|
||||
:prop="item"
|
||||
:label="item"
|
||||
width="100">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
|
||||
</div> -->
|
||||
<div>
|
||||
<table id="myTable" class="myTable" border="1" cellspacing="0" style="width: 100%; text-align: center;">
|
||||
<thead class="myTableHead">
|
||||
<tr>
|
||||
<th colspan="2">主要用能设备(100KW以上)</th>
|
||||
<th v-for="(header, index) in headers" :key="index">{{ header }}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(row, rowIndex) in tableData" :key="rowIndex">
|
||||
<td v-for="(cell, cellIndex) in row" :key="cellIndex"
|
||||
>{{ cell }}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
query:{
|
||||
type:0,
|
||||
day:'',
|
||||
year:'',
|
||||
month:'',
|
||||
yearStart:'',
|
||||
start_time:'',
|
||||
end_time:'',
|
||||
},
|
||||
headers: ['生料立磨','循环风机','高温风机','尾排风机','回转窑','水泥磨','水泥循环风机','水泥系统风机','电石渣','原料磨','煤磨','水泥粉磨','水泥包装'],
|
||||
mpoint_name: ['立磨主电机','循环风机-原料磨','高温风机','尾排风机','回转窑合计','水泥高压进线','循环风机-水泥磨','系统风机','电石渣合计','原料磨合计','煤磨合计','水泥磨主电机','包装进线'],
|
||||
tableData: [
|
||||
['用电峰','用电尖峰','','','','','','','','','','','','',''],
|
||||
['用电峰','用电高峰','','','','','','','','','','','','',''],
|
||||
['用电谷','用电低谷','','','','','','','','','','','','',''],
|
||||
['用电谷','用电深谷','','','','','','','','','','','','',''],
|
||||
['用电平','用电平谷','','','','','','','','','','','','',''],
|
||||
],
|
||||
mpointList:["3631338253279723520,3631338547577257984,3631332708552392704,3631333116071026688,3631877739432493056,3631344327579828224,3631853750379200512,3631853436771090432,3631869508278722560,3631875738288111616,3631878174063050752,3631852596106797056,3631854361455820800"],
|
||||
tableName:'峰谷平',
|
||||
options:[
|
||||
{id:0,name:'日统计'},
|
||||
{id:1,name:'月统计'},
|
||||
{id:2,name:'年统计'},
|
||||
],
|
||||
row_list : ['peak','high','low','deep','flat'],
|
||||
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
var myDate = new Date();
|
||||
let month = myDate.getMonth()+1;
|
||||
if(month<10){
|
||||
month = '0'+month;
|
||||
}
|
||||
this.query.month = myDate.getFullYear()+'-'+month;
|
||||
// this.getMgroup();
|
||||
|
||||
},
|
||||
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() {
|
||||
let that = this;
|
||||
let arr = [],
|
||||
obj = {};
|
||||
|
||||
// 根据 type 设置 obj 的值
|
||||
if (that.query.type === 0) { // 日
|
||||
arr = that.query.day.split('-');
|
||||
obj.year = Number(arr[0]);
|
||||
obj.month = Number(arr[1]);
|
||||
obj.day = Number(arr[2]);
|
||||
} else if (that.query.type === 1) { // 月
|
||||
arr = that.query.month.split('-');
|
||||
obj.year = Number(arr[0]);
|
||||
obj.month = Number(arr[1]);
|
||||
obj.days = new Date(that.query.year, that.query.month, 0).getDate(); // 获取该月的天数
|
||||
} else if (that.query.type === 2) { // 年
|
||||
obj.year = that.query.year;
|
||||
}
|
||||
obj.page = 0;
|
||||
obj.type = 'hour';
|
||||
obj.group_by = 'val_level';
|
||||
obj.mpoint__in = that.mpointList[0];
|
||||
this.$API.enm.mpoint.groupValues.req(obj)
|
||||
.then((res) => {
|
||||
res.forEach(item => {
|
||||
// 查找对应的列索引
|
||||
const colIndex = this.mpoint_name.indexOf(item.mpoint__name) + 2;
|
||||
const rowIndex = this.row_list.indexOf(item.val_level);
|
||||
if (rowIndex > -1 && colIndex > 1) {
|
||||
this.tableData[rowIndex][colIndex] = (item.total_val).toFixed(2);
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch((error) => {
|
||||
console.error("API 请求错误: ", error);
|
||||
});
|
||||
|
||||
},
|
||||
|
||||
// let that = this;
|
||||
// let params = {page:0};
|
||||
// let arr = [];
|
||||
// if(that.query.type==0){//日
|
||||
// params.type='day_s';
|
||||
// arr = that.query.month.split('-');
|
||||
// params.year_s = Number(arr[0]);
|
||||
// params.month_s = Number(arr[1]);
|
||||
// params.day = Number(arr[2]);
|
||||
// }else if(that.query.type==1){//月
|
||||
// params.type='month_s';
|
||||
// params.year_s = Number(that.query.year);
|
||||
// }else if (that.query.type==2){
|
||||
// params.type='year_s';
|
||||
// params.year_s = Number(that.query.yearStart);
|
||||
// }
|
||||
|
||||
// },
|
||||
getTableData(){
|
||||
this.getData();
|
||||
},
|
||||
|
||||
handlePrint() {
|
||||
this.$PRINT('#myReport');
|
||||
},
|
||||
exportExcel() {
|
||||
this.exportLoading = true;
|
||||
this.$XLSX('#myTable', this.tableName)
|
||||
this.exportLoading = false;
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
#numTable{
|
||||
margin-left: 37px;
|
||||
}
|
||||
#numTable td{
|
||||
height: 32px;
|
||||
padding-left: 5px;
|
||||
}
|
||||
.numCell{
|
||||
width: 80px;
|
||||
}
|
||||
.numCell.numCell_last{
|
||||
width: 100px;
|
||||
}
|
||||
.searchHead{
|
||||
display:flex
|
||||
}
|
||||
.middleText{
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
margin: 0 5px;
|
||||
display: inline-block;
|
||||
}
|
||||
.searchBtn{
|
||||
margin-left: 5px;
|
||||
}
|
||||
</style>
|
|
@ -17,6 +17,19 @@
|
|||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
<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==3"
|
||||
style="margin-right: 6px"
|
||||
@change="changeDate"
|
||||
/>
|
||||
<el-date-picker
|
||||
v-model="query.day"
|
||||
type="date"
|
||||
|
@ -165,6 +178,28 @@
|
|||
>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<el-table
|
||||
v-if="query.type==3"
|
||||
id="hourBaseTable"
|
||||
:data="tableDatas_range"
|
||||
style="width: 100%"
|
||||
border
|
||||
:height="tableHeight"
|
||||
@cell-click="handleCellClick_range"
|
||||
>
|
||||
<el-table-column
|
||||
label="分类"
|
||||
prop="mpoint__nickname"
|
||||
fixed
|
||||
align="center"
|
||||
>
|
||||
</el-table-column>
|
||||
<el-table-column label="单位" prop="mpoint__unit" fixed align="center">
|
||||
</el-table-column>
|
||||
<el-table-column
|
||||
label = "总用水量" prop="total_val" fixed align="center">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
|
@ -193,6 +228,7 @@ export default {
|
|||
day: "",
|
||||
year: "",
|
||||
month: "",
|
||||
daterange:[],
|
||||
search_date: "",
|
||||
query:{
|
||||
type:0,
|
||||
|
@ -200,6 +236,8 @@ export default {
|
|||
year:'',
|
||||
month:'',
|
||||
yearStart:'',
|
||||
start_time:'',
|
||||
end_time:'',
|
||||
},
|
||||
mgroupObj: {},
|
||||
indexList: [],
|
||||
|
@ -209,9 +247,11 @@ export default {
|
|||
{id:0,name:'日统计'},
|
||||
{id:1,name:'月统计'},
|
||||
{id:2,name:'年统计'},
|
||||
{id:3,name:'时间段'},
|
||||
],
|
||||
tableDatas2: [],
|
||||
tableDatas_day:[],
|
||||
tableDatas_range:[],
|
||||
tableDatas_month:[],
|
||||
months: [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12],
|
||||
hours: [
|
||||
|
@ -329,6 +369,7 @@ export default {
|
|||
xAxisData: [],
|
||||
xAxisData_day: [],
|
||||
xAxisData_month: [],
|
||||
xTtimeRange: [],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
|
@ -376,6 +417,21 @@ export default {
|
|||
}
|
||||
}
|
||||
},
|
||||
changeDate(){
|
||||
let obj = {};
|
||||
obj.type = "hour";
|
||||
obj.start_time = this.daterange[0];
|
||||
obj.end_time = this.daterange[1];
|
||||
obj.mpoint__in = "3631858394648182784,3631858982832218112,3631858687335112704";
|
||||
obj.page = 0;
|
||||
this.$API.enm.mpoint.groupValues.req(obj).then((res) => {
|
||||
//处理res数组中的 total_val 字段 保留两位
|
||||
res.forEach(item => {
|
||||
item.total_val = Number(item.total_val).toFixed(2);
|
||||
});
|
||||
this.tableDatas_range = res;
|
||||
});
|
||||
},
|
||||
dateChange() {
|
||||
let that = this;
|
||||
that.tableDatas = [];
|
||||
|
@ -399,6 +455,8 @@ export default {
|
|||
}else if (that.query.type==2){
|
||||
that.year = that.query.year;
|
||||
that.dataLoop_month();
|
||||
}else if(that.query.type==3){//时间段
|
||||
that.xTtimeRange.push("总计")
|
||||
}
|
||||
let nowDate = new Date();
|
||||
that.timeStamp = nowDate.getTime();
|
||||
|
@ -679,6 +737,16 @@ export default {
|
|||
that.option.series[0].data = lineData;
|
||||
this.itemVisible = true;
|
||||
},
|
||||
handleCellClick_range(row, column, cell, event) {
|
||||
let that = this;
|
||||
let index = that.tableDatas_range.indexOf(row);
|
||||
// that.tableName = `${row.nickname}-电量范围统计`
|
||||
//获取图数据
|
||||
// let lineData = that.tableDatas[index].slice(2, 3);
|
||||
// that.option.xAxis.data = that.xAxisData_month;
|
||||
// that.option.series[0].data = lineData;
|
||||
this.itemVisible = true;
|
||||
},
|
||||
exportExcel() {
|
||||
this.exportLoading = true;
|
||||
this.$XLSX("#hourBaseTable", this.tableName);
|
||||
|
|
|
@ -233,7 +233,7 @@
|
|||
size="small"
|
||||
@click="mpointStat_del(scope.row)"
|
||||
type="danger"
|
||||
v-auth="'mpointstat.delete'"
|
||||
v-auth="'mpointstat.delete_write'"
|
||||
>删除</el-button
|
||||
>
|
||||
</template>
|
||||
|
|
|
@ -0,0 +1,126 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<xtSelect
|
||||
:apiObj="apiObjM"
|
||||
:params="paramsM"
|
||||
v-model="query.mgroup"
|
||||
style="width: 500px"
|
||||
@change="handleQuery"
|
||||
placeholder="选择工段"
|
||||
>
|
||||
<el-table-column label="名称" prop="name"></el-table-column>
|
||||
</xtSelect>
|
||||
<el-select
|
||||
v-model="query.type"
|
||||
placeholder="类型"
|
||||
style="margin: 0 6px; width: 160px"
|
||||
@change="handleQuery"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
<el-date-picker v-model="timeRange" type="datetimerange"
|
||||
value-format="YYYY-MM-DD HH:mm:ss" range-separator="至"
|
||||
start-placeholder="开始时间" end-placeholder="结束时间" @change="handleQuery"
|
||||
style="width: 100%"
|
||||
format="YYYY-MM-DD HH"
|
||||
popper-class="tpc"
|
||||
/>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
style="margin-left: 6px"
|
||||
@click="handleQuery"
|
||||
></el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main class="nopadding">
|
||||
<scTable
|
||||
ref="table"
|
||||
:apiObj="apiObj"
|
||||
row-key="id"
|
||||
stripe
|
||||
:params="params"
|
||||
:query="query"
|
||||
highlightCurrentRow
|
||||
>
|
||||
<el-table-column label="所属集合" prop="mgroup_name" width="120"></el-table-column>
|
||||
<el-table-column label="类型" prop="type" width="75"> </el-table-column>
|
||||
<el-table-column label="年" prop="year" width="60"> </el-table-column>
|
||||
<el-table-column label="班年" prop="year_s" width="60"> </el-table-column>
|
||||
<el-table-column label="月" prop="month" width="50"> </el-table-column>
|
||||
<el-table-column label="班月" prop="month_s" width="50"> </el-table-column>
|
||||
<el-table-column label="日" prop="day" width="50"> </el-table-column>
|
||||
<el-table-column label="班日" prop="day_s" width="50"> </el-table-column>
|
||||
<el-table-column label="班组" prop="team_name" width="60"> </el-table-column>
|
||||
<el-table-column label="总产量" prop="total_production" width="90" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="电消耗" prop="elec_consume" width="90" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="水消耗" prop="water_consume" width="90" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="煤粉消耗" prop="pcoal_consume" width="90" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="压缩空气" prop="cair_consume" width="90" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="单位产品分布电耗" prop="elec_consume_unit" width="130" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="单位产品综合电耗" prop="celec_consume_unit" width="130" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="单位产品标煤耗" prop="coal_consume_unit" width="110" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="单位产品能耗" prop="en_consume_unit" width="110" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="单位产品综合能耗" prop="cen_consume_unit" width="130" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="台时产量" prop="production_hour" width="90" show-overflow-tooltip></el-table-column>
|
||||
<el-table-column label="运转时长" prop="run_sec" width="90" show-overflow-tooltip></el-table-column>
|
||||
</scTable>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: 'enstat',
|
||||
data() {
|
||||
return {
|
||||
apiObjM: this.$API.mtm.mgroup.list,
|
||||
paramsM: {page: 0},
|
||||
apiObj: this.$API.enm.enstat,
|
||||
params: {
|
||||
},
|
||||
query: {
|
||||
ordering: "-update_time",
|
||||
type: "day_s",
|
||||
start_time: null,
|
||||
end_time: null
|
||||
},
|
||||
options: [
|
||||
{ label: "班天", value: "day_s" },
|
||||
{ label: "班月", value: "month_s" },
|
||||
{ label: "小时", value: "hour"},
|
||||
{ label: "天", value: "day" },
|
||||
{ label: "月", value: "month"},
|
||||
],
|
||||
timeRange: []
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleQuery() {
|
||||
if (this.timeRange) {
|
||||
this.query.start_time = this.timeRange[0]
|
||||
this.query.end_time = this.timeRange[1]
|
||||
} else {
|
||||
this.query.start_time = null
|
||||
this.query.end_time = null
|
||||
}
|
||||
this.$refs.table.queryData(this.query);
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
</script>
|
||||
<style>
|
||||
.tpc .el-time-spinner__wrapper {
|
||||
width:100% !important;
|
||||
}
|
||||
.tpc .el-scrollbar:nth-of-type(2) {
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
|
@ -30,7 +30,9 @@
|
|||
<el-date-picker v-model="timeRange" type="datetimerange"
|
||||
value-format="YYYY-MM-DD HH:mm:ss" range-separator="至"
|
||||
start-placeholder="开始时间" end-placeholder="结束时间" @change="handleQuery"
|
||||
style="width: 100%" />
|
||||
style="width: 100%"
|
||||
format="YYYY-MM-DD HH"
|
||||
popper-class="tpc"/>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
|
@ -214,8 +216,8 @@ export default {
|
|||
series: [],
|
||||
},
|
||||
options: [
|
||||
{ label: "天校正", value: "day_s" },
|
||||
{ label: "月校正", value: "month_s" },
|
||||
{ label: "班天", value: "day_s" },
|
||||
{ label: "班月", value: "month_s" },
|
||||
{ label: "小时", value: "hour"},
|
||||
{ label: "天", value: "day" },
|
||||
{ label: "月", value: "month"},
|
||||
|
@ -313,3 +315,12 @@ export default {
|
|||
margin-left: 5px;
|
||||
}
|
||||
</style>
|
||||
|
||||
<style>
|
||||
.tpc .el-time-spinner__wrapper {
|
||||
width:100% !important;
|
||||
}
|
||||
.tpc .el-scrollbar:nth-of-type(2) {
|
||||
display: none !important;
|
||||
}
|
||||
</style>
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-main class="nopadding">
|
||||
<el-card title="">
|
||||
|
||||
</el-card>
|
||||
</el-main>
|
||||
</el-container>
|
||||
|
||||
</template>
|
||||
<script>
|
||||
</script>
|
Loading…
Reference in New Issue