Merge branch 'master' of https://e.coding.net/ctcdevteam/ehs/ehs_web
This commit is contained in:
commit
2427752b2a
|
@ -476,4 +476,32 @@ export default {
|
|||
},
|
||||
},
|
||||
},
|
||||
srule: {
|
||||
list: {
|
||||
name: "排班规则列表",
|
||||
req: async function (data) {
|
||||
return await http.get(
|
||||
`${config.API_URL}/mtm/srule/`,
|
||||
data
|
||||
);
|
||||
},
|
||||
},
|
||||
create: {
|
||||
name: "创建",
|
||||
req: async function (data) {
|
||||
return await http.post(
|
||||
`${config.API_URL}/mtm/srule/`,
|
||||
data
|
||||
);
|
||||
},
|
||||
},
|
||||
delete: {
|
||||
name: "删除",
|
||||
req: async function (id) {
|
||||
return await http.delete(
|
||||
`${config.API_URL}/mtm/srule/${id}/`
|
||||
);
|
||||
},
|
||||
},
|
||||
},
|
||||
};
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
<template>
|
||||
<div>
|
||||
<el-input ref="inputRef" v-model="selectLabel" :readonly="true">
|
||||
<el-input ref="inputRef" v-model="selectLabel" :readonly="true" :placeholder="placeholder">
|
||||
<template #prefix v-if="edit">
|
||||
<el-button
|
||||
text
|
||||
|
@ -72,6 +72,7 @@ import { ref, defineProps, defineEmits, computed, onMounted } from "vue";
|
|||
|
||||
const props = defineProps({
|
||||
multiple: { type: Boolean, default: false },
|
||||
placeholder: { type: String, default: "请选择" },
|
||||
edit: { type: Boolean, default: true },
|
||||
hidePagination: { type: Boolean, default: false },
|
||||
tableWidth: { type: Number, default: 600 },
|
||||
|
@ -87,7 +88,7 @@ const props = defineProps({
|
|||
options: { type: Array, default: null },
|
||||
});
|
||||
|
||||
const emit = defineEmits(["update:modelValue", "update:obj", "update:label"]);
|
||||
const emit = defineEmits(["update:modelValue", "update:obj", "update:label", "change"]);
|
||||
|
||||
// 控制 popover 显示与隐藏的状态
|
||||
const showPopover = ref(false);
|
||||
|
@ -171,6 +172,7 @@ const rowClick = (row) => {
|
|||
selectValue.value = row[props.valueField];
|
||||
showPopover.value = false;
|
||||
}
|
||||
emit("change");
|
||||
};
|
||||
|
||||
const handleClear = () => {
|
||||
|
@ -183,6 +185,7 @@ const handleClear = () => {
|
|||
selectValue.value = null;
|
||||
}
|
||||
emit("update:label", "");
|
||||
emit("change");
|
||||
};
|
||||
|
||||
const tdChange = (res, tableData) => {
|
||||
|
@ -198,7 +201,8 @@ const selectionChange = (val) => {
|
|||
selectLabel.value = val
|
||||
.map((item) => item[props.labelField])
|
||||
.join(props.splitField);
|
||||
emit("update:label", val);
|
||||
}
|
||||
emit("update:label", val);
|
||||
emit("change");
|
||||
};
|
||||
</script>
|
||||
|
|
|
@ -945,6 +945,16 @@ const routes = [
|
|||
perms: ["enm_energy"],
|
||||
},
|
||||
children: [
|
||||
{
|
||||
name: "energyFactory",
|
||||
path: "/enm_energy/energyFactory",
|
||||
meta: {
|
||||
title: "能源监察报表",
|
||||
// icon: "el-icon-grid",
|
||||
perms: ["enm_energy_energy"],
|
||||
},
|
||||
component: "enm_energy/energyFactory",
|
||||
},
|
||||
{
|
||||
name: "energy",
|
||||
path: "/enm_energy/energy",
|
||||
|
@ -1068,6 +1078,16 @@ const routes = [
|
|||
perms: ["enm_report"],
|
||||
},
|
||||
children: [
|
||||
{
|
||||
name: "reportFactory",
|
||||
path: "/enm_report/reportFactory",
|
||||
meta: {
|
||||
title: "厂级单耗",
|
||||
// icon: "el-icon-grid",
|
||||
perms: ["enm_reportFactory"],
|
||||
},
|
||||
component: "enm_report/reportFactory",
|
||||
},
|
||||
{
|
||||
name: "costing",
|
||||
path: "/enm_report/costing",
|
||||
|
@ -2805,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",
|
||||
|
@ -2889,6 +2929,15 @@ const routes = [
|
|||
hidden: true,
|
||||
},
|
||||
component: "enm_rm/logDetail",
|
||||
},
|
||||
{
|
||||
name: "srule",
|
||||
path: "/enm_base/srule",
|
||||
meta: {
|
||||
title: "排班规则",
|
||||
perms: ["srule"],
|
||||
},
|
||||
component: "mtm/srule",
|
||||
},
|
||||
],
|
||||
},
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
type="primary"
|
||||
@click="exportExcel()"
|
||||
:loading="exportLoading"
|
||||
v-auth="'export_excel'"
|
||||
>导出xlsx
|
||||
</el-button>
|
||||
</div>
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
type="primary"
|
||||
@click="exportExcel()"
|
||||
:loading="exportLoading"
|
||||
v-auth="'export_excel'"
|
||||
>导出xlsx
|
||||
</el-button>
|
||||
<el-button type="primary" @click="handlePrint">打印 </el-button>
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
type="primary"
|
||||
@click="exportExcel()"
|
||||
:loading="exportLoading"
|
||||
v-auth="'export_excel'"
|
||||
>导出xlsx
|
||||
</el-button>
|
||||
<el-button type="primary" @click="handlePrint">打印 </el-button>
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
type="primary"
|
||||
@click="exportExcel()"
|
||||
:loading="exportLoading"
|
||||
v-auth="'export_excel'"
|
||||
>导出xlsx
|
||||
</el-button>
|
||||
<el-button type="primary" @click="handlePrint">打印 </el-button>
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
type="primary"
|
||||
@click="exportExcel()"
|
||||
:loading="exportLoading"
|
||||
v-auth="'export_excel'"
|
||||
>导出xlsx
|
||||
</el-button>
|
||||
<el-button type="primary" @click="handlePrint">打印 </el-button>
|
||||
|
|
|
@ -66,6 +66,7 @@
|
|||
type="primary"
|
||||
@click="exportExcel()"
|
||||
:loading = "exportLoading"
|
||||
v-auth="'export_excel'"
|
||||
>导出xlsx
|
||||
</el-button>
|
||||
<el-button
|
||||
|
|
|
@ -0,0 +1,194 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-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.searchDay"
|
||||
type="date"
|
||||
value-format="YYYY-MM-DD"
|
||||
format="YYYY-MM-DD"
|
||||
placeholder="查询日期"
|
||||
v-if="query.type==0"
|
||||
class="headerSearch"
|
||||
/>
|
||||
<el-date-picker
|
||||
v-model="query.searchMonth"
|
||||
type="month"
|
||||
value-format="YYYY-MM"
|
||||
format="YYYY-MM"
|
||||
placeholder="查询月份"
|
||||
v-if="query.type==1"
|
||||
class="headerSearch"
|
||||
/>
|
||||
<el-date-picker
|
||||
v-model="query.searchYear"
|
||||
type="year"
|
||||
value-format="YYYY"
|
||||
format="YYYY"
|
||||
placeholder="查询年份"
|
||||
v-if="query.type==2"
|
||||
class="headerSearch"
|
||||
/>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="getTableData"
|
||||
></el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="exportExcel()"
|
||||
:loading = "exportLoading"
|
||||
v-auth="'export_excel'"
|
||||
>导出xlsx
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="handlePrint"
|
||||
>打印
|
||||
</el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main>
|
||||
<el-card shadow="never" style="width: 100%;height: 100%;">
|
||||
<div ref="print" id="myReport" class="printContainer">
|
||||
<el-table
|
||||
id="hourBaseTable"
|
||||
:data="tableDatas"
|
||||
border
|
||||
>
|
||||
<el-table-column label="能源监察报表" align="center">
|
||||
<el-table-column label="序号" prop="index" width="60">
|
||||
</el-table-column>
|
||||
<el-table-column label="指标名称" prop="name" min-width="100">
|
||||
</el-table-column>
|
||||
<el-table-column label="能耗" prop="value" min-width="80">
|
||||
</el-table-column>
|
||||
<el-table-column label="备注" prop="note" min-width="60">
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-main>
|
||||
</el-container>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
query:{
|
||||
type:0,
|
||||
year:'',
|
||||
month:'',
|
||||
yearStart:'',
|
||||
},
|
||||
currentDay:'',
|
||||
tableName:'能源监察日报表',
|
||||
options:[
|
||||
{id:0,name:'日统计'},
|
||||
{id:1,name:'月统计'},
|
||||
{id:2,name:'年统计'},
|
||||
],
|
||||
tableDatas:[
|
||||
{index:1,name:'水泥单位产品综合能耗(kgce/t)',value:0,note:''},
|
||||
{index:2,name:'熟料单位产品综合能耗(kgce/t)',value:0,note:''},
|
||||
{index:3,name:'熟料单位产品综合电耗(kw.h/t)',value:0,note:''},
|
||||
{index:4,name:'熟料单位产品综合煤耗(kgce/t)',value:0,note:''},
|
||||
{index:5,name:'水泥单位产品综合电耗(kw.h/t)',value:0,note:''},
|
||||
],
|
||||
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
var myDate = new Date();
|
||||
this.query.searchDay =this.currentDay = this.$TOOL.dateFormat2(myDate);
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
typeCange(value){
|
||||
if(value==1){
|
||||
this.tableName = '能源监察日报表'
|
||||
}else if(value==1){
|
||||
this.tableName = '能源监察月报表'
|
||||
}else{
|
||||
this.tableName = '能源监察年报表'
|
||||
}
|
||||
},
|
||||
getData(){
|
||||
let that = this;
|
||||
let arr = [],type='',year_s = 2024,month_s = 1,day_s = 1;
|
||||
if(that.query.type==0){//日
|
||||
type='day_s';
|
||||
arr = that.query.searchDay.split('-');
|
||||
year_s = Number(arr[0]);
|
||||
month_s = Number(arr[1]);
|
||||
day_s = Number(arr[2]);
|
||||
}else if(that.query.type==1){//月
|
||||
type='month_s';
|
||||
arr = that.query.searchMonth.split('-');
|
||||
year_s = Number(arr[0]);
|
||||
month_s = Number(arr[1]);
|
||||
}else if (that.query.type==2){
|
||||
type='year_s';
|
||||
year_s = Number(that.query.searchYear);
|
||||
}
|
||||
let params1 = {
|
||||
page:0,
|
||||
type:type,
|
||||
year_s:year_s,
|
||||
month_s:month_s,
|
||||
day_s:day_s,
|
||||
mgroup__name:'水泥磨'
|
||||
}
|
||||
that.$API.enm.enstat.req(params1).then((res) => {
|
||||
console.log(res[0]);
|
||||
that.tableDatas[0].value = res[0].cen_consume_unit;
|
||||
that.tableDatas[4].value = res[0].celec_consume_unit;
|
||||
});
|
||||
let params2 = {
|
||||
page:0,
|
||||
type:type,
|
||||
year_s:year_s,
|
||||
month_s:month_s,
|
||||
day_s:day_s,
|
||||
mgroup__name:'回转窑'
|
||||
}
|
||||
that.$API.enm.enstat.req(params2).then((res2) => {
|
||||
that.tableDatas[1].value = res2[0].cen_consume_unit;
|
||||
that.tableDatas[2].value = res2[0].celec_consume_unit;
|
||||
that.tableDatas[3].value = res2[0].coal_consume_unit;
|
||||
console.log(res2[0]);
|
||||
});
|
||||
|
||||
},
|
||||
getTableData(){
|
||||
this.getData();
|
||||
},
|
||||
|
||||
handlePrint() {
|
||||
this.$PRINT('#myReport');
|
||||
},
|
||||
exportExcel() {
|
||||
this.exportLoading = true;
|
||||
this.$XLSX('#hourBaseTable', this.tableName)
|
||||
this.exportLoading = false;
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
</style>
|
|
@ -2,23 +2,53 @@
|
|||
<el-container>
|
||||
<el-main style="background: #fff;">
|
||||
<div class="pictureContainer">
|
||||
<img src="/media/elec_flow.png" class="flowImg" >
|
||||
<!-- <img src="/img/energy.png" class="flowImg" /> -->
|
||||
<div class="energyNumber" style="top: 80px;">{{ dataObj.烘干破碎机_电 }}</div>
|
||||
<div class="energyNumber" style="top: 132px;">{{ dataObj.辅材立磨_电 }}</div>
|
||||
<div class="energyNumber" style="top: 178px;">{{ dataObj.生粉制备_循环风机_电 }}</div>
|
||||
<div class="energyNumber" style="top: 222px;">{{ dataObj.生粉制备_选粉机_电 }}</div>
|
||||
<div class="energyNumber" style="top: 270px;">{{ dataObj.高温风机_电 }}</div>
|
||||
<div class="energyNumber" style="top: 326px;">{{ dataObj.尾排风机_电 }}</div>
|
||||
<div class="energyNumber" style="top: 379px;">{{ dataObj.回转窑_电 }}</div>
|
||||
<div class="energyNumber" style="top: 430px;">{{ dataObj.煤立磨_电 }}</div>
|
||||
<div class="energyNumber" style="top: 487px;">{{ dataObj.煤磨排风机_电 }}</div>
|
||||
<div class="energyNumber" style="top: 536px;">{{ dataObj.窑头排风机_电 }}</div>
|
||||
<div class="energyNumber" style="top: 607px;">{{ dataObj.水泥磨_电 }}</div>
|
||||
<div class="energyNumber" style="top: 663px;">{{ (Number(dataObj.辊压机动_电) + Number(dataObj.辊压机定_电)).toFixed(2) }}</div>
|
||||
<div class="energyNumber" style="top: 719px;">{{ dataObj.系统风机_电 }}</div>
|
||||
<div class="energyNumber" style="top: 773px;">{{ dataObj.水泥磨_选粉机_电 }}</div>
|
||||
<div class="energyNumber" style="top: 830px;">{{ dataObj.水泥磨_循环风机_电 }}</div>
|
||||
<!-- <img src="/media/elec_flow.png" class="flowImg" > -->
|
||||
<img src="/img/energy.png" class="flowImg" />
|
||||
<div class="energyNumber" style="top: 80px;">
|
||||
<img v-if="dataObj.烘干破碎机_电" class="iconImg" src="img/elec.png"> {{ dataObj.烘干破碎机_电 }}
|
||||
</div>
|
||||
<div class="energyNumber" style="top: 132px;">
|
||||
<img v-if="dataObj.辅材立磨_电" class="iconImg" src="img/elec.png">{{ dataObj.辅材立磨_电 }}
|
||||
</div>
|
||||
<div class="energyNumber" style="top: 178px;">
|
||||
<img v-if="dataObj.生粉制备_循环风机_电" class="iconImg" src="img/elec.png">{{ dataObj.生粉制备_循环风机_电 }}
|
||||
</div>
|
||||
<div class="energyNumber" style="top: 222px;">
|
||||
<img v-if="dataObj.生粉制备_选粉机_电" class="iconImg" src="img/elec.png">{{ dataObj.生粉制备_选粉机_电 }}
|
||||
</div>
|
||||
<div class="energyNumber" style="top: 270px;">
|
||||
<img v-if="dataObj.高温风机_电" class="iconImg" src="img/elec.png">{{ dataObj.高温风机_电 }}
|
||||
</div>
|
||||
<div class="energyNumber" style="top: 326px;">
|
||||
<img v-if="dataObj.尾排风机_电" class="iconImg" src="img/elec.png">{{ dataObj.尾排风机_电 }}
|
||||
</div>
|
||||
<div class="energyNumber" style="top: 379px;">
|
||||
<img v-if="dataObj.回转窑_电" class="iconImg" src="img/elec.png">{{ dataObj.回转窑_电 }}
|
||||
</div>
|
||||
<div class="energyNumber" style="top: 430px;">
|
||||
<img v-if="dataObj.煤立磨_电" class="iconImg" src="img/elec.png">{{ dataObj.煤立磨_电 }}
|
||||
</div>
|
||||
<div class="energyNumber" style="top: 487px;">
|
||||
<img v-if="dataObj.煤磨排风机_电" class="iconImg" src="img/elec.png">{{ dataObj.煤磨排风机_电 }}
|
||||
</div>
|
||||
<div class="energyNumber" style="top: 536px;">
|
||||
<img v-if="dataObj.窑头排风机_电" class="iconImg" src="img/elec.png">{{ dataObj.窑头排风机_电 }}
|
||||
</div>
|
||||
<div class="energyNumber" style="top: 607px;">
|
||||
<img v-if="dataObj.水泥磨_电" class="iconImg" src="img/elec.png">{{ dataObj.水泥磨_电 }}
|
||||
</div>
|
||||
<div class="energyNumber" style="top: 663px;">
|
||||
<img v-if="dataObj.辊压机动_电||dataObj.辊压机定_电" class="iconImg" src="img/elec.png">{{ (Number(dataObj.辊压机动_电) + Number(dataObj.辊压机定_电)).toFixed(2) }}
|
||||
</div>
|
||||
<div class="energyNumber" style="top: 719px;">
|
||||
<img v-if="dataObj.系统风机_电" class="iconImg" src="img/elec.png">{{ dataObj.系统风机_电 }}
|
||||
</div>
|
||||
<div class="energyNumber" style="top: 773px;">
|
||||
<img v-if="dataObj.水泥磨_选粉机_电" class="iconImg" src="img/elec.png">{{ dataObj.水泥磨_选粉机_电 }}
|
||||
</div>
|
||||
<div class="energyNumber" style="top: 830px;">
|
||||
<img v-if="dataObj.水泥磨_循环风机_电" class="iconImg" src="img/elec.png">{{ dataObj.水泥磨_循环风机_电 }}
|
||||
</div>
|
||||
</div>
|
||||
</el-main>
|
||||
</el-container>
|
||||
|
@ -87,10 +117,16 @@
|
|||
width: 1200px;
|
||||
height: 900px;
|
||||
}
|
||||
.iconImg{
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
vertical-align: bottom;
|
||||
}
|
||||
.energyNumber{
|
||||
position: absolute;
|
||||
right: 160px;
|
||||
color: #536dfe;
|
||||
right: 35px;
|
||||
/* color: #536dfe; */
|
||||
color: rgb(223, 213, 22);
|
||||
font-size: 15px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
|
|
@ -53,6 +53,7 @@
|
|||
type="primary"
|
||||
@click="exportExcel()"
|
||||
:loading="exportLoading"
|
||||
v-auth="'export_excel'"
|
||||
>导出xlsx
|
||||
</el-button>
|
||||
<el-button type="primary" @click="handlePrint">打印 </el-button>
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
type="primary"
|
||||
@click="exportExcel()"
|
||||
:loading="exportLoading"
|
||||
v-auth="'export_excel'"
|
||||
>导出xlsx
|
||||
</el-button>
|
||||
<el-button type="primary" @click="handlePrint">打印 </el-button>
|
||||
|
|
|
@ -66,6 +66,7 @@
|
|||
type="primary"
|
||||
@click="exportExcel()"
|
||||
:loading="exportLoading"
|
||||
v-auth="'export_excel'"
|
||||
>导出xlsx
|
||||
</el-button>
|
||||
<el-button type="primary" @click="handlePrint">打印 </el-button>
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
type="primary"
|
||||
@click="exportExcel()"
|
||||
:loading="exportLoading"
|
||||
v-auth="'export_excel'"
|
||||
>导出xlsx
|
||||
</el-button>
|
||||
<el-button type="primary" @click="handlePrint">打印 </el-button>
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
type="primary"
|
||||
@click="exportExcel()"
|
||||
:loading="exportLoading"
|
||||
v-auth="'export_excel'"
|
||||
>导出xlsx
|
||||
</el-button>
|
||||
<el-button type="primary" @click="handlePrint">打印 </el-button>
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
type="primary"
|
||||
@click="exportExcel()"
|
||||
:loading="exportLoading"
|
||||
v-auth="'export_excel'"
|
||||
>导出xlsx
|
||||
</el-button>
|
||||
<el-button type="primary" @click="handlePrint">打印 </el-button>
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
type="primary"
|
||||
@click="exportExcel()"
|
||||
:loading="exportLoading"
|
||||
v-auth="'export_excel'"
|
||||
>导出xlsx
|
||||
</el-button>
|
||||
<el-button type="primary" @click="handlePrint">打印 </el-button>
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
type="primary"
|
||||
@click="exportExcel()"
|
||||
:loading="exportLoading"
|
||||
v-auth="'export_excel'"
|
||||
>导出xlsx
|
||||
</el-button>
|
||||
<el-button type="primary" @click="handlePrint">打印 </el-button>
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
type="primary"
|
||||
@click="exportExcel()"
|
||||
:loading="exportLoading"
|
||||
v-auth="'export_excel'"
|
||||
>导出xlsx
|
||||
</el-button>
|
||||
<el-button type="primary" @click="handlePrint">打印 </el-button>
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
type="primary"
|
||||
@click="exportExcel()"
|
||||
:loading="exportLoading"
|
||||
v-auth="'export_excel'"
|
||||
>导出xlsx
|
||||
</el-button>
|
||||
<el-button type="primary" @click="handlePrint">打印 </el-button>
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
type="primary"
|
||||
@click="exportExcel()"
|
||||
:loading="exportLoading"
|
||||
v-auth="'export_excel'"
|
||||
>导出xlsx
|
||||
</el-button>
|
||||
<el-button type="primary" @click="handlePrint">打印 </el-button>
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
type="primary"
|
||||
@click="exportExcel()"
|
||||
:loading="exportLoading"
|
||||
v-auth="'export_excel'"
|
||||
>导出xlsx
|
||||
</el-button>
|
||||
<el-button type="primary" @click="handlePrint">打印 </el-button>
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
type="primary"
|
||||
@click="exportExcel()"
|
||||
:loading="exportLoading"
|
||||
v-auth="'export_excel'"
|
||||
>导出xlsx
|
||||
</el-button>
|
||||
<el-button type="primary" @click="handlePrint">打印 </el-button>
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
type="primary"
|
||||
@click="exportExcel()"
|
||||
:loading="exportLoading"
|
||||
v-auth="'export_excel'"
|
||||
>导出xlsx
|
||||
</el-button>
|
||||
<el-button type="primary" @click="handlePrint">打印 </el-button>
|
||||
|
|
|
@ -20,7 +20,10 @@
|
|||
<el-date-picker v-model="query.year" type="year" value-format="YYYY" format="YYYY" placeholder="年份"
|
||||
class="headerSearch" v-if="query.type == 2" />
|
||||
<el-button type="primary" icon="el-icon-search" @click="getTableData"></el-button>
|
||||
<el-button type="primary" @click="exportExcel()" :loading="exportLoading">导出xlsx
|
||||
<el-button type="primary"
|
||||
@click="exportExcel()"
|
||||
:loading="exportLoading"
|
||||
v-auth="'export_excel'">导出xlsx
|
||||
</el-button>
|
||||
<el-button type="primary" @click="handlePrint">打印
|
||||
</el-button>
|
||||
|
|
|
@ -41,7 +41,10 @@
|
|||
<el-button type="primary" icon="el-icon-search"
|
||||
@click="getTableData">
|
||||
</el-button>
|
||||
<el-button type="primary" @click="exportExcel()" :loading="exportLoading">导出xlsx
|
||||
<el-button type="primary"
|
||||
@click="exportExcel()"
|
||||
:loading="exportLoading"
|
||||
v-auth="'export_excel'">导出xlsx
|
||||
</el-button>
|
||||
<el-button type="primary" @click="handlePrint">打印
|
||||
</el-button>
|
||||
|
@ -49,9 +52,10 @@
|
|||
</el-header>
|
||||
<el-main class="nopadding">
|
||||
<el-container>
|
||||
<el-main class="nopadding">
|
||||
<el-main class="nopadding" id="myReport">
|
||||
<scTable
|
||||
ref="stlogTable"
|
||||
id="myTable"
|
||||
:apiObj="apiObjStlog"
|
||||
:query="query"
|
||||
:params="params"
|
||||
|
|
|
@ -58,6 +58,7 @@
|
|||
type="primary"
|
||||
@click="exportExcel()"
|
||||
:loading = "exportLoading"
|
||||
v-auth="'export_excel'"
|
||||
>导出xlsx
|
||||
</el-button>
|
||||
<el-button
|
||||
|
|
|
@ -35,6 +35,7 @@
|
|||
type="primary"
|
||||
@click="exportExcel()"
|
||||
:loading = "exportLoading"
|
||||
v-auth="'export_excel'"
|
||||
>导出xlsx
|
||||
</el-button>
|
||||
<el-button
|
||||
|
|
|
@ -0,0 +1,191 @@
|
|||
<!-- 厂级报表 -->
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-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.searchDay"
|
||||
type="date"
|
||||
value-format="YYYY-MM-DD"
|
||||
format="YYYY-MM-DD"
|
||||
placeholder="查询日期"
|
||||
v-if="query.type==0"
|
||||
class="headerSearch"
|
||||
/>
|
||||
<el-date-picker
|
||||
v-model="query.searchMonth"
|
||||
type="month"
|
||||
value-format="YYYY-MM"
|
||||
format="YYYY-MM"
|
||||
placeholder="查询月份"
|
||||
v-if="query.type==1"
|
||||
class="headerSearch"
|
||||
/>
|
||||
<el-date-picker
|
||||
v-model="query.searchYear"
|
||||
type="year"
|
||||
value-format="YYYY"
|
||||
format="YYYY"
|
||||
placeholder="查询年份"
|
||||
v-if="query.type==2"
|
||||
class="headerSearch"
|
||||
/>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="getTableData"
|
||||
></el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="exportExcel()"
|
||||
:loading = "exportLoading"
|
||||
v-auth="'export_excel'"
|
||||
>导出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">
|
||||
<table border="1" cellspacing="0" :key="timeStamp" id="myTable" class="myTable">
|
||||
<thead class="myTableHead">
|
||||
<tr>
|
||||
<th colspan="9">绿色建材生产质量消耗报表</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th v-for="item in headers" :key="item">{{item}}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr v-for="(item,index) in tableDatas" :key="index">
|
||||
<td class="numCell">{{item[0]}}</td>
|
||||
<td class="numCell">{{item[1]}}</td>
|
||||
<td class="numCell">{{item[2]}}</td>
|
||||
<td class="numCell">{{item[3]}}</td>
|
||||
<td class="numCell">{{item[4]}}</td>
|
||||
<td class="numCell">{{item[5]}}</td>
|
||||
<td class="numCell">{{item[6]}}</td>
|
||||
<td class="numCell">{{item[7]}}</td>
|
||||
<td class="numCell">{{item[8]}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
query:{
|
||||
type:0,
|
||||
year:'',
|
||||
month:'',
|
||||
yearStart:'',
|
||||
},
|
||||
currentDay:'',
|
||||
tableName:'绿色建材生产质量消耗日报表',
|
||||
options:[
|
||||
{id:0,name:'日统计'},
|
||||
{id:1,name:'月统计'},
|
||||
{id:2,name:'年统计'},
|
||||
],
|
||||
headers:['','时间','电石渣','原料磨','生料工段','煤磨','熟料工段','水泥粉磨','水泥包装'],
|
||||
tableDatas:[
|
||||
['产量(t)'],
|
||||
['台产(t/h)'],
|
||||
['质量'],
|
||||
['煤耗(t)'],
|
||||
['电耗(kw.h/t)'],
|
||||
['柴油消耗(t)'],
|
||||
['绿化水耗(m³)'],
|
||||
['生活水耗(m³)'],
|
||||
['工业水耗(m³)'],
|
||||
['原料压缩空气流量(m³/h)'],
|
||||
['烧成压缩空气流量(m³/h)'],
|
||||
['水泥压缩空气流量(m³/h)'],
|
||||
['产生蒸汽量(t)'],
|
||||
['成本(元/t)'],
|
||||
['生产动态']
|
||||
],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
var myDate = new Date();
|
||||
this.query.searchDay =this.currentDay = this.$TOOL.dateFormat2(myDate);
|
||||
this.getData();
|
||||
},
|
||||
methods: {
|
||||
typeCange(value){
|
||||
if(value==1){
|
||||
this.tableName = '绿色建材生产质量消耗日报表'
|
||||
}else if(value==1){
|
||||
this.tableName = '绿色建材生产质量消耗月报表'
|
||||
}else{
|
||||
this.tableName = '绿色建材生产质量消耗年报表'
|
||||
}
|
||||
},
|
||||
dayChange(e){
|
||||
let that = this;
|
||||
if(e){
|
||||
let arr = e.split('-')
|
||||
that.year = Number(arr[0]);
|
||||
that.month = Number(arr[1]);
|
||||
that.day = Number(arr[2]);
|
||||
}
|
||||
},
|
||||
getData(){
|
||||
let that = this;
|
||||
let params = {};
|
||||
let arr = [],type='',year_s = 2024,month_s = 1,day_s = 1;
|
||||
if(that.query.type==0){//日
|
||||
params.type='day_s';
|
||||
let arr = that.query.searchDay.split('-');
|
||||
params.year_s = Number(arr[0]);
|
||||
params.month_s = Number(arr[1]);
|
||||
params.day_s = Number(arr[2]);
|
||||
}else if(that.query.type==1){//月
|
||||
params.type='month_s';
|
||||
let arr = that.query.searchMonth.split('-');
|
||||
params.year_s = Number(arr[0]);
|
||||
params.month_s = Number(arr[1]);
|
||||
}else if (that.query.type==2){
|
||||
params.type='year_s';
|
||||
params.year_s = Number(that.query.searchYear);
|
||||
}
|
||||
//接口请求数据
|
||||
},
|
||||
|
||||
getTableData(){
|
||||
this.getData();
|
||||
},
|
||||
handlePrint() {
|
||||
this.$PRINT('#myReport');
|
||||
},
|
||||
exportExcel() {
|
||||
this.exportLoading = true;
|
||||
this.$XLSX('#myTable', this.tableName)
|
||||
this.exportLoading = false;
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
</style>
|
|
@ -21,6 +21,7 @@
|
|||
type="primary"
|
||||
@click="exportExcel()"
|
||||
:loading = "exportLoading"
|
||||
v-auth="'export_excel'"
|
||||
>导出xlsx
|
||||
</el-button>
|
||||
<el-button
|
||||
|
|
|
@ -135,6 +135,7 @@
|
|||
type="primary"
|
||||
@click="exportExcel()"
|
||||
:loading="exportLoading"
|
||||
v-auth="'export_excel'"
|
||||
>导出xlsx
|
||||
</el-button>
|
||||
<el-button type="primary" @click="handlePrint">打印 </el-button>
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
type="primary"
|
||||
@click="exportExcel()"
|
||||
:loading="exportLoading"
|
||||
v-auth="'export_excel'"
|
||||
>导出xlsx
|
||||
</el-button>
|
||||
<el-button type="primary" @click="handlePrint">打印 </el-button>
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
type="primary"
|
||||
@click="exportExcel()"
|
||||
:loading="exportLoading"
|
||||
v-auth="'export_excel'"
|
||||
>导出xlsx
|
||||
</el-button>
|
||||
<el-button type="primary" @click="handlePrint">打印 </el-button>
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
type="primary"
|
||||
@click="exportExcel()"
|
||||
:loading="exportLoading"
|
||||
v-auth="'export_excel'"
|
||||
>导出xlsx
|
||||
</el-button>
|
||||
<el-button type="primary" @click="handlePrint">打印 </el-button>
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
type="primary"
|
||||
@click="exportExcel()"
|
||||
:loading="exportLoading"
|
||||
v-auth="'export_excel'"
|
||||
>导出xlsx
|
||||
</el-button>
|
||||
<el-button type="primary" @click="handlePrint">打印 </el-button>
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
type="primary"
|
||||
@click="exportExcel()"
|
||||
:loading="exportLoading"
|
||||
v-auth="'export_excel'"
|
||||
>导出xlsx
|
||||
</el-button>
|
||||
<el-button type="primary" @click="handlePrint">打印 </el-button>
|
||||
|
|
|
@ -6,6 +6,7 @@
|
|||
type="primary"
|
||||
@click="exportExcel()"
|
||||
:loading="exportLoading"
|
||||
v-auth="'export_excel'"
|
||||
>导出xlsx
|
||||
</el-button>
|
||||
<el-button type="primary" @click="handlePrint">打印 </el-button>
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
type="primary"
|
||||
@click="exportExcel()"
|
||||
:loading="exportLoading"
|
||||
v-auth="'export_excel'"
|
||||
>导出xlsx
|
||||
</el-button>
|
||||
<el-button type="primary" @click="handlePrint">打印 </el-button>
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
type="primary"
|
||||
@click="exportExcel()"
|
||||
:loading="exportLoading"
|
||||
v-auth="'export_excel'"
|
||||
>导出xlsx
|
||||
</el-button>
|
||||
<el-button type="primary" @click="handlePrint">打印 </el-button>
|
||||
|
|
|
@ -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>
|
|
@ -2,21 +2,18 @@
|
|||
<el-container>
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-select
|
||||
<xtSelect
|
||||
:apiObj="apiObjM"
|
||||
:params="paramsM"
|
||||
v-model="query.mpoint"
|
||||
placeholder="测点"
|
||||
clearable
|
||||
filterable
|
||||
style="margin: 0 6px; width: 300px"
|
||||
style="width: 500px"
|
||||
@change="handleQuery"
|
||||
placeholder="选择测点"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in mpoints"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
<el-table-column label="测点名" prop="name"></el-table-column>
|
||||
<el-table-column label="别名" prop="nickname"></el-table-column>
|
||||
<el-table-column label="计量物料" prop="material_name"></el-table-column>
|
||||
</xtSelect>
|
||||
<el-select
|
||||
v-model="query.type"
|
||||
placeholder="类型"
|
||||
|
@ -33,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"
|
||||
|
@ -44,7 +43,7 @@
|
|||
</el-header>
|
||||
<el-main class="nopadding">
|
||||
<el-container>
|
||||
<el-aside style="width: 50%; float: right;">
|
||||
<el-aside style="width: 60%; float: right;">
|
||||
<!-- 折线图组件 -->
|
||||
<scTable
|
||||
ref="table"
|
||||
|
@ -57,11 +56,11 @@
|
|||
@row-click="rowClick"
|
||||
@dataChange="dataChange"
|
||||
>
|
||||
<el-table-column label="测点" prop="mpoint_name" min-width="100">
|
||||
<el-table-column label="测点" prop="mpoint_name" min-width="160">
|
||||
</el-table-column>
|
||||
<el-table-column label="所属集合" prop="mgroup_name">
|
||||
</el-table-column>
|
||||
<el-table-column label="类型" prop="type" width="70"> </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>
|
||||
|
@ -161,6 +160,8 @@ export default {
|
|||
name: "sflog",
|
||||
data() {
|
||||
return {
|
||||
apiObjM: this.$API.enm.mpoint.list,
|
||||
paramsM: {material__isnull: 0},
|
||||
apiObj: this.$API.enm.mpoint.stat,
|
||||
params: {
|
||||
type: "day_s",
|
||||
|
@ -215,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"},
|
||||
|
@ -226,16 +227,17 @@ export default {
|
|||
val_correct: "",
|
||||
},
|
||||
visible: false,
|
||||
mpoints: [],
|
||||
timeRange: []
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.getMpoints();
|
||||
},
|
||||
methods: {
|
||||
dataChange(req, tableData) {
|
||||
let that = this;
|
||||
if(that.query.mpoint == null) {
|
||||
return
|
||||
}
|
||||
let option = { ...that.chartOption };
|
||||
// 获取 x 轴的数据,如果query.type为小时,则显示小时,如果为天则显示天,如果为月则显示月
|
||||
if (that.query.type == "hour") {
|
||||
|
@ -249,10 +251,10 @@ export default {
|
|||
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) : [];
|
||||
option.xAxis.data = tableData.reverse().map((item, index) => item.year_s + "-" + item.month_s + "-" + 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) : [];
|
||||
option.xAxis.data = tableData.reverse().map((item, index) => item.year_s + "-" + item.month_s);
|
||||
}
|
||||
// 获取 y 轴的数据
|
||||
option.series = [
|
||||
|
@ -267,15 +269,6 @@ export default {
|
|||
// 更新图表选项
|
||||
that.chartOption = option;
|
||||
},
|
||||
|
||||
getMpoints() {
|
||||
let that = this;
|
||||
this.$API.enm.mpoint.list
|
||||
.req({ page: 0})
|
||||
.then((res) => {
|
||||
that.mpoints = res;
|
||||
});
|
||||
},
|
||||
handle_add() {},
|
||||
handleQuery() {
|
||||
if (this.timeRange) {
|
||||
|
@ -322,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>
|
|
@ -23,7 +23,10 @@
|
|||
}}</el-tag>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="事件信息" prop="voice_msg" width="300" show-overflow-tooltip>
|
||||
<el-table-column label="事件信息" width="300" show-overflow-tooltip>
|
||||
<template #default="scope">
|
||||
<el-link type="primary">{{ scope.row.voice_msg }}</el-link>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="所属工段" prop="mgroupName">
|
||||
<template #default="scope">
|
||||
|
@ -62,33 +65,43 @@
|
|||
</scTable>
|
||||
</el-main>
|
||||
<el-drawer :size="'50%'" v-model="showLimited" title="事件处理" :close-on-click-modal="false">
|
||||
<el-card header="事件信息">
|
||||
<el-card header="基础信息">
|
||||
<el-form :model="eventItem" label-width="100px">
|
||||
<el-row>
|
||||
<el-col :span='12'>
|
||||
<el-col :span='12' v-if="eventItem.belong_dept!==null">
|
||||
<el-form-item label="所属部门:">{{ eventItem.belong_dept}}</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label="所属工段:">{{ eventItem.enm_data.mgroup_name }}</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-col :span='12'>
|
||||
<el-form-item label="发生时间:">{{ eventItem.create_time }}</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label="发生类型:">{{ eventItem.cates_[0].name }}</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span='12'>
|
||||
<el-form-item label="状态:">{{ eventItem.buy_date }}</el-form-item>
|
||||
</el-col> -->
|
||||
<el-col :span='12'>
|
||||
<el-form-item label="处理人:">
|
||||
<el-form-item >{{ eventItem.handle_user_name }}</el-form-item>
|
||||
<span v-if="eventItem.handle_user_name==null" style="color: #dddddd;">待处理</span>
|
||||
<span v-else>{{ eventItem.handle_user_name }}</span>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<!-- <el-col :span='12'>
|
||||
<el-form-item label="备注:">{{ eventItem.buy_date }}</el-form-item>
|
||||
</el-col> -->
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
<el-card header="事件信息" style="margin-top: 8px">
|
||||
<el-form :model="eventItem" label-width="100px">
|
||||
<el-row>
|
||||
<el-col>
|
||||
<el-form-item label="详细分类:">{{ eventItem.enm_data.type_chin }}</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label="目标值:">{{ eventItem.enm_data.goal_val }}</el-form-item>
|
||||
</el-col>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label="当前值:">{{ eventItem.enm_data.val }}</el-form-item>
|
||||
</el-col>
|
||||
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-card>
|
||||
|
@ -102,7 +115,7 @@
|
|||
<el-descriptions-item label="处理时间">
|
||||
{{ eventItem.handle_time }}
|
||||
</el-descriptions-item>
|
||||
<el-descriptions-item label="异常分析" column="3">
|
||||
<el-descriptions-item label="异常分析/处理" column="3">
|
||||
{{ eventItem.handle_desc }}
|
||||
</el-descriptions-item>
|
||||
</el-descriptions>
|
||||
|
@ -121,7 +134,7 @@
|
|||
</el-row>
|
||||
<el-row>
|
||||
<el-col :span='12'>
|
||||
<el-form-item label="异常分析">
|
||||
<el-form-item label="异常分析/处理">
|
||||
<el-input v-model="form.handle_desc" clearable type="textarea"></el-input>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
|
|
@ -830,7 +830,7 @@ export default {
|
|||
that.warningNum = res.count;
|
||||
});
|
||||
that.$API.em.equipment.list
|
||||
.req({ tag: "near_check", type: 20, page: 1 })
|
||||
.req({ state_measure__in: "20,30", type: 20, page: 1 })
|
||||
.then((res) => {
|
||||
debugger;
|
||||
that.warningNum2 = res.count;
|
||||
|
|
|
@ -0,0 +1,102 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-button type="primary" icon="el-icon-plus" @click="table_add" v-auth="'srule.create'"></el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-main class="nopadding">
|
||||
<scTable ref="table" :apiObj="apiObj" row-key="id" hidePagination hideDo>
|
||||
<el-table-column label="#" type="index" width="50"></el-table-column>
|
||||
<el-table-column label="所属部门" prop="belong_dept_name" width="120"></el-table-column>
|
||||
<el-table-column label="循环列表" prop="rule_display"></el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" width="140">
|
||||
<template #default="scope">
|
||||
<el-popconfirm title="确定删除吗?" @confirm="table_del(scope.row, scope.$index)">
|
||||
<template #reference>
|
||||
<el-button link size="small" v-auth="'srule.delete'" type="danger">删除</el-button>
|
||||
</template>
|
||||
</el-popconfirm>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-main>
|
||||
<el-dialog title="排班规则" v-model="dialogVisible" :size="1000">
|
||||
<el-form ref="dialogForm" :model="form">
|
||||
<el-form-item label="所属部门" required>
|
||||
<xtSelect v-model="form.belong_dept" :apiObj="apiObjP" @change="handlePChange">
|
||||
<el-table-column prop="name"></el-table-column>
|
||||
</xtSelect>
|
||||
</el-form-item>
|
||||
<div>
|
||||
<el-button v-for="item in teamButtons" :key="item.id" type="primary" @click="addTeam(item)">
|
||||
{{ item.name }}
|
||||
</el-button>
|
||||
</div>
|
||||
<div style="margin-top: 6px" v-if="form.rule_display.length > 0">
|
||||
<span v-for="(item, index) in form.rule_display" :key="index">
|
||||
{{ item }} ->
|
||||
</span>
|
||||
</div>
|
||||
</el-form>
|
||||
<template #footer>
|
||||
<el-button type="primary" @click="save">保存</el-button>
|
||||
</template>
|
||||
|
||||
|
||||
</el-dialog>
|
||||
</el-container>
|
||||
|
||||
</template>
|
||||
<script>
|
||||
const dForm = {
|
||||
belong_dept: null,
|
||||
rule: [],
|
||||
rule_display: []
|
||||
}
|
||||
export default {
|
||||
name: 'srule',
|
||||
data() {
|
||||
return {
|
||||
apiObjP: this.$API.system.dept.list,
|
||||
apiObj: this.$API.mtm.srule.list,
|
||||
dialogVisible: false,
|
||||
form: Object.assign({}, dForm),
|
||||
teamButtons: [],
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
table_add() {
|
||||
this.form = Object.assign({}, dForm);
|
||||
this.dialogVisible = true;
|
||||
},
|
||||
handlePChange() {
|
||||
this.teamButtons = []
|
||||
this.form.rule = []
|
||||
this.form.rule_display = []
|
||||
if (this.form.belong_dept != null) {
|
||||
this.$API.mtm.team.list.req({ belong_dept: this.form.belong_dept, page: 0 }).then(res => {
|
||||
this.teamButtons = res;
|
||||
})
|
||||
}
|
||||
},
|
||||
addTeam(item) {
|
||||
this.form.rule.push(item.id);
|
||||
this.form.rule_display.push(item.name);
|
||||
},
|
||||
save() {
|
||||
this.$API.mtm.srule.create.req(this.form).then(res => {
|
||||
this.$refs.table.refresh();
|
||||
this.dialogVisible = false;
|
||||
that.$message.success("操作成功");
|
||||
})
|
||||
},
|
||||
table_del(row, index) {
|
||||
this.$API.mtm.srule.delete.req(row.id).then(res => {
|
||||
this.$refs.table.refresh();
|
||||
that.$message.success("操作成功");
|
||||
})
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
|
@ -26,7 +26,7 @@ module.exports = defineConfig({
|
|||
},
|
||||
client: {
|
||||
overlay: {
|
||||
// runtimeErrors: false,
|
||||
runtimeErrors: false,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue