fix:水泥磨mgroup根据名称获取
This commit is contained in:
parent
63737587e1
commit
4e8a3d486a
|
@ -1,258 +1,398 @@
|
||||||
<template>
|
<template>
|
||||||
<el-container>
|
<el-container>
|
||||||
<el-header>
|
<el-header>
|
||||||
<div class="left-panel">
|
<div class="left-panel">
|
||||||
<div style="margin-right: 20px">交接班日志</div>
|
<div style="margin-right: 20px">交接班日志</div>
|
||||||
<el-date-picker v-model="query.start_time__gte" type="date" value-format="YYYY-MM-DD HH:mm:ss" format="YYYY-MM-DD"
|
<el-date-picker
|
||||||
placeholder="开始时间" style=" width: 120px" />
|
v-model="query.start_time__gte"
|
||||||
<el-date-picker v-model="query.end_time__lt" type="date" value-format="YYYY-MM-DD HH:mm:ss" format="YYYY-MM-DD"
|
type="date"
|
||||||
placeholder="结束时间" style="margin-left: 2px; width: 120px" />
|
value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
<el-select v-model="query.shift" placeholder="班次" clearable style="margin-left: 2px; width: 120px">
|
format="YYYY-MM-DD"
|
||||||
<el-option v-for="item in optionsShift" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
placeholder="开始时间"
|
||||||
</el-select>
|
style="width: 120px"
|
||||||
<el-select v-model="query.team" placeholder="班组" clearable style="margin-left: 2px; width: 120px">
|
/>
|
||||||
<el-option v-for="item in options" :key="item.id" :label="item.name" :value="item.id"></el-option>
|
<el-date-picker
|
||||||
</el-select>
|
v-model="query.end_time__lt"
|
||||||
<el-button type="primary" icon="el-icon-search" @click="handleQuery"></el-button>
|
type="date"
|
||||||
</div>
|
value-format="YYYY-MM-DD HH:mm:ss"
|
||||||
</el-header>
|
format="YYYY-MM-DD"
|
||||||
<el-main class="nopadding">
|
placeholder="结束时间"
|
||||||
<scTable ref="table" :apiObj="apiObj" row-key="id" stripe :params="query" highlightCurrentRow @row-click="rowClick">
|
style="margin-left: 2px; width: 120px"
|
||||||
<el-table-column type="index" width="50" />
|
/>
|
||||||
<!-- <el-table-column label="关联工段" prop="mgroup_name"></el-table-column> -->
|
<el-select
|
||||||
<el-table-column label="开始时间" prop="start_time">
|
v-model="query.shift"
|
||||||
<template #default="scope">
|
placeholder="班次"
|
||||||
<span>{{ scope.row.start_time.slice(0, 16) }}</span>
|
clearable
|
||||||
</template>
|
style="margin-left: 2px; width: 120px"
|
||||||
</el-table-column>
|
>
|
||||||
<el-table-column label="结束时间" prop="end_time">
|
<el-option
|
||||||
<template #default="scope">
|
v-for="item in optionsShift"
|
||||||
<span>{{ scope.row.end_time.slice(0, 16) }}</span>
|
:key="item.id"
|
||||||
</template>
|
:label="item.name"
|
||||||
</el-table-column>
|
:value="item.id"
|
||||||
<el-table-column label="班组名称" prop="team_name"></el-table-column>
|
></el-option>
|
||||||
<el-table-column label="当前班次" prop="shift_name"></el-table-column>
|
</el-select>
|
||||||
<el-table-column label="班长" prop="leader_name"></el-table-column>
|
<el-select
|
||||||
|
v-model="query.team"
|
||||||
|
placeholder="班组"
|
||||||
|
clearable
|
||||||
|
style="margin-left: 2px; width: 120px"
|
||||||
|
>
|
||||||
|
<el-option
|
||||||
|
v-for="item in options"
|
||||||
|
:key="item.id"
|
||||||
|
:label="item.name"
|
||||||
|
:value="item.id"
|
||||||
|
></el-option>
|
||||||
|
</el-select>
|
||||||
|
<el-button
|
||||||
|
type="primary"
|
||||||
|
icon="el-icon-search"
|
||||||
|
@click="handleQuery"
|
||||||
|
></el-button>
|
||||||
|
</div>
|
||||||
|
</el-header>
|
||||||
|
<el-main class="nopadding">
|
||||||
|
<scTable
|
||||||
|
ref="table"
|
||||||
|
:apiObj="apiObj"
|
||||||
|
row-key="id"
|
||||||
|
stripe
|
||||||
|
:params="query"
|
||||||
|
highlightCurrentRow
|
||||||
|
@row-click="rowClick"
|
||||||
|
>
|
||||||
|
<el-table-column type="index" width="50" />
|
||||||
|
<!-- <el-table-column label="关联工段" prop="mgroup_name"></el-table-column> -->
|
||||||
|
<el-table-column label="开始时间" prop="start_time">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.start_time.slice(0, 16) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column label="结束时间" prop="end_time">
|
||||||
|
<template #default="scope">
|
||||||
|
<span>{{ scope.row.end_time.slice(0, 16) }}</span>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="班组名称"
|
||||||
|
prop="team_name"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="当前班次"
|
||||||
|
prop="shift_name"
|
||||||
|
></el-table-column>
|
||||||
|
<el-table-column
|
||||||
|
label="班长"
|
||||||
|
prop="leader_name"
|
||||||
|
></el-table-column>
|
||||||
|
|
||||||
<el-table-column label="检验时间">
|
<el-table-column label="检验时间">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<span v-if="scope.row.last_test_time">{{ scope.row.last_test_time.slice(0, 16) }}</span>
|
<span v-if="scope.row.last_test_time">{{
|
||||||
</template>
|
scope.row.last_test_time.slice(0, 16)
|
||||||
</el-table-column>
|
}}</span>
|
||||||
<el-table-column label="操作" fixed="right" align="center" width="140">
|
</template>
|
||||||
<template #default="scope">
|
</el-table-column>
|
||||||
<el-button link size="small" @click="sflog_edit(scope.row)" type="primary">编辑</el-button>
|
<el-table-column
|
||||||
<!-- <el-button link size="small" @click="sflog_check(scope.row)" type="primary">质量检验</el-button> -->
|
label="操作"
|
||||||
<!-- <el-button link size="small" @click="sflog_other(scope.row)" type="primary">其他能源</el-button> -->
|
fixed="right"
|
||||||
<el-divider direction="vertical"></el-divider>
|
align="center"
|
||||||
<el-button link size="small" @click="sflog_export(scope.row)" type="success">报表</el-button>
|
width="140"
|
||||||
</template>
|
>
|
||||||
</el-table-column>
|
<template #default="scope">
|
||||||
</scTable>
|
<el-button
|
||||||
</el-main>
|
link
|
||||||
<el-drawer v-model="limitedExport" size="60%" :show-close="false">
|
size="small"
|
||||||
<template #header="{ close, titleId, titleClass }">
|
@click="sflog_edit(scope.row)"
|
||||||
<h4 :id="titleId" :class="titleClass">交接班日志</h4>
|
type="primary"
|
||||||
<el-button type="danger" @click="close">
|
>编辑</el-button
|
||||||
<el-icon class="el-icon--left">
|
>
|
||||||
<CircleCloseFilled />
|
<!-- <el-button link size="small" @click="sflog_check(scope.row)" type="primary">质量检验</el-button> -->
|
||||||
</el-icon>
|
<!-- <el-button link size="small" @click="sflog_other(scope.row)" type="primary">其他能源</el-button> -->
|
||||||
关闭
|
<el-divider direction="vertical"></el-divider>
|
||||||
</el-button>
|
<el-button
|
||||||
</template>
|
link
|
||||||
<div class="left-panel">
|
size="small"
|
||||||
<el-button type="primary" @click="exportExcel()" :loading="exportLoading">导出xlsx
|
@click="sflog_export(scope.row)"
|
||||||
</el-button>
|
type="success"
|
||||||
<el-button type="primary" @click="handlePrint">打印
|
>报表</el-button
|
||||||
</el-button>
|
>
|
||||||
</div>
|
</template>
|
||||||
<el-main class="nopadding">
|
</el-table-column>
|
||||||
<div ref="print" id="myReport" class="printContainer">
|
</scTable>
|
||||||
<div style="margin-right: 20px;text-align: center;font-size: 16px;font-weight: bold;margin-bottom: 20px;">
|
</el-main>
|
||||||
<span v-if="sflogItem.end_time">{{ sflogItem.end_time.slice(0, 10) }}{{ sflogItem.shift_name }}</span>
|
<el-drawer v-model="limitedExport" size="60%" :show-close="false">
|
||||||
<span v-if="sflogItem.team_name">{{ sflogItem.team_name }}</span>
|
<template #header="{ close, titleId, titleClass }">
|
||||||
交接班记录
|
<h4 :id="titleId" :class="titleClass">交接班日志</h4>
|
||||||
</div>
|
<el-button type="danger" @click="close">
|
||||||
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable">
|
<el-icon class="el-icon--left">
|
||||||
<tbody>
|
<CircleCloseFilled />
|
||||||
<tr>
|
</el-icon>
|
||||||
<td class="numCell">日期</td>
|
关闭
|
||||||
<td class="numCell" v-if="sflogItem.end_time">{{ sflogItem.end_time.slice(0, 10) }}</td>
|
</el-button>
|
||||||
<td class="numCell">班次</td>
|
</template>
|
||||||
<td class="numCell">{{ sflogItem.shift_name }}</td>
|
<div class="left-panel">
|
||||||
<td class="numCell">班组</td>
|
<el-button
|
||||||
<td class="numCell"><span v-if="sflogItem.team_name">{{ sflogItem.team_name }}</span></td>
|
type="primary"
|
||||||
</tr>
|
@click="exportExcel()"
|
||||||
<tr>
|
:loading="exportLoading"
|
||||||
<td class="numCell">产量(t)</td>
|
>导出xlsx
|
||||||
<td class="numCell">{{ reportItem.total_production }}</td>
|
</el-button>
|
||||||
<td class="numCell">台时(t/h)</td>
|
<el-button type="primary" @click="handlePrint">打印 </el-button>
|
||||||
<td class="numCell">{{ reportItem.production_hour }}</td>
|
</div>
|
||||||
<td class="numCell">运转时间(h)</td>
|
<el-main class="nopadding">
|
||||||
<td class="numCell">{{ reportItem.run_hour }}</td>
|
<div ref="print" id="myReport" class="printContainer">
|
||||||
</tr>
|
<div
|
||||||
<tr>
|
style="
|
||||||
<td class="numCell">运转率(%)</td>
|
margin-right: 20px;
|
||||||
<td class="numCell">{{ reportItem.run_rate * 100 }}</td>
|
text-align: center;
|
||||||
<td class="numCell">停机时长(h)</td>
|
font-size: 16px;
|
||||||
<td class="numCell">{{ reportItem.shut_hour }}</td>
|
font-weight: bold;
|
||||||
<td class="numCell">煤磨分布电耗(KW·h/t)</td>
|
margin-bottom: 20px;
|
||||||
<td class="numCell">{{ reportItem.elec_consume_unit }}</td>
|
"
|
||||||
</tr>
|
>
|
||||||
<tr>
|
<span v-if="sflogItem.end_time"
|
||||||
<td class="numCell">煤粉细度合格率(%)</td>
|
>{{ sflogItem.end_time.slice(0, 10)
|
||||||
<td class="numCell" v-if="reportItem.煤粉_细度_rate_pass">{{ reportItem.煤粉_细度_rate_pass * 100 }}</td>
|
}}{{ sflogItem.shift_name }}</span
|
||||||
<td class="numCell" v-else>0</td>
|
>
|
||||||
<td class="numCell">煤粉水分合格率(%)</td>
|
<span v-if="sflogItem.team_name">{{
|
||||||
<td class="numCell" v-if="reportItem.煤粉_水分_rate_pass">{{ reportItem.煤粉_水分_rate_pass * 100 }}</td>
|
sflogItem.team_name
|
||||||
<td class="numCell" v-else>0</td>
|
}}</span>
|
||||||
</tr>
|
交接班记录
|
||||||
<tr v-if="sflogexpList.length > 0">
|
</div>
|
||||||
<td class="numCell" :rowspan="sflogexpList.length + 1">生产情况记录</td>
|
<table
|
||||||
<td class="numCell">时间</td>
|
border="1"
|
||||||
<td class="numCell">类别</td>
|
width="1000"
|
||||||
<td class="numCell">原因</td>
|
cellspacing="0"
|
||||||
<td class="numCell">处置措施</td>
|
:key="timeStamp"
|
||||||
<td class="numCell">处置人</td>
|
id="myTable"
|
||||||
</tr>
|
>
|
||||||
<tr v-for="item in sflogexpList" :key="item.id">
|
<tbody>
|
||||||
<td class="numCell">{{ item.happen_time }}</td>
|
<tr>
|
||||||
<td class="numCell">{{ item.cate }}</td>
|
<td class="numCell">日期</td>
|
||||||
<td class="numCell">{{ item.reason }}</td>
|
<td class="numCell" v-if="sflogItem.end_time">
|
||||||
<td class="numCell">{{ item.measure }}</td>
|
{{ sflogItem.end_time.slice(0, 10) }}
|
||||||
<td class="numCell">{{ item.handler }}</td>
|
</td>
|
||||||
</tr>
|
<td class="numCell">班次</td>
|
||||||
</tbody>
|
<td class="numCell">
|
||||||
</table>
|
{{ sflogItem.shift_name }}
|
||||||
</div>
|
</td>
|
||||||
</el-main>
|
<td class="numCell">班组</td>
|
||||||
</el-drawer>
|
<td class="numCell">
|
||||||
</el-container>
|
<span v-if="sflogItem.team_name">{{
|
||||||
|
sflogItem.team_name
|
||||||
|
}}</span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="numCell">产量(t)</td>
|
||||||
|
<td class="numCell">
|
||||||
|
{{ reportItem.total_production }}
|
||||||
|
</td>
|
||||||
|
<td class="numCell">台时(t/h)</td>
|
||||||
|
<td class="numCell">
|
||||||
|
{{ reportItem.production_hour }}
|
||||||
|
</td>
|
||||||
|
<td class="numCell">运转时间(h)</td>
|
||||||
|
<td class="numCell">
|
||||||
|
{{ reportItem.run_hour }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="numCell">运转率(%)</td>
|
||||||
|
<td class="numCell">
|
||||||
|
{{ reportItem.run_rate * 100 }}
|
||||||
|
</td>
|
||||||
|
<td class="numCell">停机时长(h)</td>
|
||||||
|
<td class="numCell">
|
||||||
|
{{ reportItem.shut_hour }}
|
||||||
|
</td>
|
||||||
|
<td class="numCell">煤磨分布电耗(KW·h/t)</td>
|
||||||
|
<td class="numCell">
|
||||||
|
{{ reportItem.elec_consume_unit }}
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="numCell">煤粉细度合格率(%)</td>
|
||||||
|
<td
|
||||||
|
class="numCell"
|
||||||
|
v-if="reportItem.煤粉_细度_rate_pass"
|
||||||
|
>
|
||||||
|
{{ reportItem.煤粉_细度_rate_pass * 100 }}
|
||||||
|
</td>
|
||||||
|
<td class="numCell" v-else>0</td>
|
||||||
|
<td class="numCell">煤粉水分合格率(%)</td>
|
||||||
|
<td
|
||||||
|
class="numCell"
|
||||||
|
v-if="reportItem.煤粉_水分_rate_pass"
|
||||||
|
>
|
||||||
|
{{ reportItem.煤粉_水分_rate_pass * 100 }}
|
||||||
|
</td>
|
||||||
|
<td class="numCell" v-else>0</td>
|
||||||
|
</tr>
|
||||||
|
<tr v-if="sflogexpList.length > 0">
|
||||||
|
<td
|
||||||
|
class="numCell"
|
||||||
|
:rowspan="sflogexpList.length + 1"
|
||||||
|
>
|
||||||
|
生产情况记录
|
||||||
|
</td>
|
||||||
|
<td class="numCell">时间</td>
|
||||||
|
<td class="numCell">类别</td>
|
||||||
|
<td class="numCell">原因</td>
|
||||||
|
<td class="numCell">处置措施</td>
|
||||||
|
<td class="numCell">处置人</td>
|
||||||
|
</tr>
|
||||||
|
<tr v-for="item in sflogexpList" :key="item.id">
|
||||||
|
<td class="numCell">{{ item.happen_time }}</td>
|
||||||
|
<td class="numCell">{{ item.cate }}</td>
|
||||||
|
<td class="numCell">{{ item.reason }}</td>
|
||||||
|
<td class="numCell">{{ item.measure }}</td>
|
||||||
|
<td class="numCell">{{ item.handler }}</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</el-main>
|
||||||
|
</el-drawer>
|
||||||
|
</el-container>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
name: "sflog",
|
name: "sflog",
|
||||||
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
apiObj: this.$API.wpm.sflog.list,
|
apiObj: null,
|
||||||
apiObj2: null,
|
apiObj2: null,
|
||||||
query: {
|
query: {
|
||||||
shift: '',
|
shift: "",
|
||||||
team: '',
|
team: "",
|
||||||
end_time__lt: '',
|
end_time__lt: "",
|
||||||
start_time__gte: '',
|
start_time__gte: "",
|
||||||
mgroup: '3347217651339837440',
|
mgroup: "",
|
||||||
},
|
},
|
||||||
deptId: '3347207316583170048',
|
deptId: "",
|
||||||
sflogItem: {},
|
sflogItem: {},
|
||||||
options: [],
|
options: [],
|
||||||
optionsShift: [],
|
optionsShift: [],
|
||||||
limitedExport: false,
|
limitedExport: false,
|
||||||
reportItem: {},
|
reportItem: {},
|
||||||
sflogexpList: [],
|
sflogexpList: [],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
this.getTeam();
|
this.$API.mtm.mgroup.list
|
||||||
this.getShfit();
|
.req({ page: 0, search: "水泥磨" })
|
||||||
},
|
.then((res) => {
|
||||||
methods: {
|
console.log("水泥磨", res);
|
||||||
getTeam() {
|
this.query.mgroup = res[0].id;
|
||||||
let form = {};
|
this.apiObj = this.$API.wpm.sflog.list;
|
||||||
form.page = 0;
|
this.deptId = res[0].belong_dept;
|
||||||
form.belong_dept = this.deptId;
|
this.getTeam();
|
||||||
this.$API.mtm.team.list.req(form).then(res => {
|
this.getShfit();
|
||||||
this.options = res;
|
});
|
||||||
})
|
},
|
||||||
},
|
methods: {
|
||||||
getShfit() {
|
getTeam() {
|
||||||
this.$API.mtm.shift.list.req({ page: 0 }).then(res => {
|
let form = {};
|
||||||
this.optionsShift = res;
|
form.page = 0;
|
||||||
})
|
form.belong_dept = this.deptId;
|
||||||
},
|
this.$API.mtm.team.list.req(form).then((res) => {
|
||||||
handleQuery() {
|
this.options = res;
|
||||||
this.$refs.table.queryData(this.query);
|
});
|
||||||
},
|
},
|
||||||
sflog_export() {
|
getShfit() {
|
||||||
this.limitedExport = true;
|
this.$API.mtm.shift.list.req({ page: 0 }).then((res) => {
|
||||||
},
|
this.optionsShift = res;
|
||||||
rowClick(row) {
|
});
|
||||||
this.sflogId = row.id;
|
},
|
||||||
this.sflogItem = row;
|
handleQuery() {
|
||||||
this.getSflogItem(row.id);
|
this.$refs.table.queryData(this.query);
|
||||||
this.getSflogexp(row.id);
|
},
|
||||||
},
|
sflog_export() {
|
||||||
getSflogexp(id) {
|
this.limitedExport = true;
|
||||||
let that = this;
|
},
|
||||||
that.$API.wpm.sflogexp.list.req({ page: 0, sflog: id }).then(res => {
|
rowClick(row) {
|
||||||
that.sflogexpList = res;
|
this.sflogId = row.id;
|
||||||
})
|
this.sflogItem = row;
|
||||||
},
|
this.getSflogItem(row.id);
|
||||||
getSflogItem(id) {
|
this.getSflogexp(row.id);
|
||||||
let that = this;
|
},
|
||||||
that.$API.enm.enstat.req({ type: 'sflog', sflog: id, page: 0 }).then(res => {
|
getSflogexp(id) {
|
||||||
if (res.length > 0) {
|
let that = this;
|
||||||
that.reportItem = res[0];
|
that.$API.wpm.sflogexp.list
|
||||||
}
|
.req({ page: 0, sflog: id })
|
||||||
})
|
.then((res) => {
|
||||||
},
|
that.sflogexpList = res;
|
||||||
//编辑
|
});
|
||||||
sflog_edit(row) {
|
},
|
||||||
let jsonStr = JSON.stringify(row);
|
getSflogItem(id) {
|
||||||
this.$TOOL.data.remove("sflogItem")
|
let that = this;
|
||||||
this.$TOOL.data.set('sflogItem', jsonStr)
|
that.$API.enm.enstat
|
||||||
this.$router.push({
|
.req({ type: "sflog", sflog: id, page: 0 })
|
||||||
name: "logDetail",
|
.then((res) => {
|
||||||
query: {
|
if (res.length > 0) {
|
||||||
mgroupId: row.mgroup,
|
that.reportItem = res[0];
|
||||||
deptId: this.deptId
|
}
|
||||||
},
|
});
|
||||||
});
|
},
|
||||||
},
|
//编辑
|
||||||
handlePrint() {
|
sflog_edit(row) {
|
||||||
this.$PRINT('#myReport');
|
let jsonStr = JSON.stringify(row);
|
||||||
},
|
this.$TOOL.data.remove("sflogItem");
|
||||||
exportExcel() {
|
this.$TOOL.data.set("sflogItem", jsonStr);
|
||||||
this.exportLoading = true;
|
this.$router.push({
|
||||||
this.$XLSX('#myTable', this.tableName)
|
name: "logDetail",
|
||||||
this.exportLoading = false;
|
query: {
|
||||||
},
|
mgroupId: row.mgroup,
|
||||||
},
|
deptId: this.deptId,
|
||||||
|
},
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handlePrint() {
|
||||||
|
this.$PRINT("#myReport");
|
||||||
|
},
|
||||||
|
exportExcel() {
|
||||||
|
this.exportLoading = true;
|
||||||
|
this.$XLSX("#myTable", this.tableName);
|
||||||
|
this.exportLoading = false;
|
||||||
|
},
|
||||||
|
},
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style scoped>
|
<style scoped>
|
||||||
#numTable {
|
#numTable {
|
||||||
margin-left: 37px;
|
margin-left: 37px;
|
||||||
}
|
}
|
||||||
|
|
||||||
#numTable td {
|
#numTable td {
|
||||||
height: 32px;
|
height: 32px;
|
||||||
padding-left: 5px;
|
padding-left: 5px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.numCell {
|
.numCell {
|
||||||
width: 80px;
|
width: 80px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.numCell.numCell_last {
|
.numCell.numCell_last {
|
||||||
width: 100px;
|
width: 100px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.searchHead {
|
.searchHead {
|
||||||
display: flex
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
.middleText {
|
.middleText {
|
||||||
height: 32px;
|
height: 32px;
|
||||||
line-height: 32px;
|
line-height: 32px;
|
||||||
margin: 0 5px;
|
margin: 0 5px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
}
|
}
|
||||||
|
|
||||||
.searchBtn {
|
.searchBtn {
|
||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
@ -1,253 +1,304 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-header>
|
<el-header>
|
||||||
<div class="left-panel">
|
<div class="left-panel">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="query.year_s"
|
v-model="query.year_s"
|
||||||
type="year"
|
type="year"
|
||||||
value-format="YYYY"
|
value-format="YYYY"
|
||||||
format="YYYY"
|
format="YYYY"
|
||||||
placeholder="查询年份"
|
placeholder="查询年份"
|
||||||
class="headerSearch"
|
class="headerSearch"
|
||||||
/>
|
/>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-search"
|
icon="el-icon-search"
|
||||||
@click="handleQuery"
|
@click="handleQuery"
|
||||||
></el-button>
|
></el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="exportExcel()"
|
@click="exportExcel()"
|
||||||
:loading = "exportLoading"
|
:loading="exportLoading"
|
||||||
>导出xlsx
|
>导出xlsx
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button type="primary" @click="handlePrint">打印 </el-button>
|
||||||
type="primary"
|
</div>
|
||||||
@click="handlePrint"
|
</el-header>
|
||||||
>打印
|
<el-card style="margin-top: 5px">
|
||||||
</el-button>
|
<div class="printWrap">
|
||||||
</div>
|
<div ref="print" id="myReport" class="printContainer">
|
||||||
</el-header>
|
<table
|
||||||
<el-card style="margin-top:5px">
|
border="1"
|
||||||
<div class="printWrap">
|
width="1900"
|
||||||
<div ref="print" id="myReport" class="printContainer">
|
cellspacing="0"
|
||||||
<table border="1" width="1900" cellspacing="0" :key="timeStamp" id="myTable" class="myTable">
|
:key="timeStamp"
|
||||||
<thead class="myTableHead">
|
id="myTable"
|
||||||
<tr>
|
class="myTable"
|
||||||
<th colspan="19">水泥磨工段班组月度对比分析</th>
|
>
|
||||||
</tr>
|
<thead class="myTableHead">
|
||||||
<tr>
|
<tr>
|
||||||
<th rowspan="2">月份</th>
|
<th colspan="19">水泥磨工段班组月度对比分析</th>
|
||||||
<th rowspan="2">班组</th>
|
</tr>
|
||||||
<th colspan="2">总产量(t)</th>
|
<tr>
|
||||||
<th>运转率</th>
|
<th rowspan="2">月份</th>
|
||||||
<th>成本</th>
|
<th rowspan="2">班组</th>
|
||||||
<th colspan="3">质量</th>
|
<th colspan="2">总产量(t)</th>
|
||||||
<th colspan="9">单位产品电耗</th>
|
<th>运转率</th>
|
||||||
<th rowspan="2">得分</th>
|
<th>成本</th>
|
||||||
</tr>
|
<th colspan="3">质量</th>
|
||||||
<tr>
|
<th colspan="9">单位产品电耗</th>
|
||||||
<th>总产量(t)</th>
|
<th rowspan="2">得分</th>
|
||||||
<th>台时产量(t/h)</th>
|
</tr>
|
||||||
<th>运转率(%)</th>
|
<tr>
|
||||||
<th>单位产品成本(元/吨)</th>
|
<th>总产量(t)</th>
|
||||||
<th>比表面积(%)</th>
|
<th>台时产量(t/h)</th>
|
||||||
<th>SO3(%)</th>
|
<th>运转率(%)</th>
|
||||||
<th>掺量(%)</th>
|
<th>单位产品成本(元/吨)</th>
|
||||||
<th>循环风机1906(KW·h/t)</th>
|
<th>比表面积(%)</th>
|
||||||
<th>系统风机(KW·h/t)</th>
|
<th>SO3(%)</th>
|
||||||
<th>水平涡流选粉机1915(KW·h/t)</th>
|
<th>掺量(%)</th>
|
||||||
<th>目标值(kW·h/t)</th>
|
<th>循环风机1906(KW·h/t)</th>
|
||||||
<th>当期与目标值差值(kW·h/t)</th>
|
<th>系统风机(KW·h/t)</th>
|
||||||
<th>环期值(kW·h/t)</th>
|
<th>水平涡流选粉机1915(KW·h/t)</th>
|
||||||
<th>当期与环期差值(kW·h/t)</th>
|
<th>目标值(kW·h/t)</th>
|
||||||
<th>环比增长率(%)</th>
|
<th>当期与目标值差值(kW·h/t)</th>
|
||||||
<th>同比增长率(%)</th>
|
<th>环期值(kW·h/t)</th>
|
||||||
</tr>
|
<th>当期与环期差值(kW·h/t)</th>
|
||||||
</thead>
|
<th>环比增长率(%)</th>
|
||||||
<tr v-for="(item,index) in tableDatas" :key="index">
|
<th>同比增长率(%)</th>
|
||||||
<td v-for="(item0,index0) in item" :key="index0" class="numCell"> <span v-if="item0">{{item0}}</span> <span v-else>0</span></td>
|
</tr>
|
||||||
</tr>
|
</thead>
|
||||||
</table>
|
<tr v-for="(item, index) in tableDatas" :key="index">
|
||||||
</div>
|
<td
|
||||||
</div>
|
v-for="(item0, index0) in item"
|
||||||
</el-card>
|
:key="index0"
|
||||||
</div>
|
class="numCell"
|
||||||
</template>
|
>
|
||||||
|
<span v-if="item0">{{ item0 }}</span>
|
||||||
|
<span v-else>0</span>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
timeStamp:0,
|
timeStamp: 0,
|
||||||
query:{
|
query: {
|
||||||
year_s:'',
|
year_s: "",
|
||||||
page : 0,
|
page: 0,
|
||||||
type : 'month_st',
|
type: "month_st",
|
||||||
mgroup:'3347217651339837440',
|
mgroup: "3347217651339837440",
|
||||||
},
|
},
|
||||||
tableDatas:[],
|
tableDatas: [],
|
||||||
};
|
exportLoading: false,
|
||||||
},
|
};
|
||||||
mounted() {
|
},
|
||||||
let that = this;
|
mounted() {
|
||||||
var myDate = new Date();
|
let that = this;
|
||||||
let year = myDate.getFullYear();
|
var myDate = new Date();
|
||||||
that.query.year_s = year;
|
let year = myDate.getFullYear();
|
||||||
let params = {};
|
this.timeStamp = myDate.getTime();
|
||||||
params.page=0;
|
that.query.year_s = year;
|
||||||
params.year=year;
|
this.$API.mtm.mgroup.list
|
||||||
params.mgroup=that.query.mgroup;
|
.req({ page: 0, search: "水泥磨" })
|
||||||
this.$API.mtm.goal.list.req(params).then((res) => {
|
.then((res) => {
|
||||||
let data = [];
|
console.log("水泥磨", res);
|
||||||
if(res.length>0){
|
that.query.mgroup = res[0].id;
|
||||||
data = res[0];
|
let params = {};
|
||||||
}
|
params.page = 0;
|
||||||
that.getData(data);
|
params.year = year;
|
||||||
})
|
params.mgroup = that.query.mgroup;
|
||||||
},
|
this.$API.mtm.goal.list.req(params).then((res) => {
|
||||||
methods: {
|
let data = [];
|
||||||
getData(goalData){
|
if (res.length > 0) {
|
||||||
let that = this;
|
data = res[0];
|
||||||
let query0={};
|
}
|
||||||
query0.page = 0;
|
that.getData(data);
|
||||||
query0.type='month_st';
|
});
|
||||||
query0.year_s = that.query.year_s-1;
|
});
|
||||||
query0.mgroup='3346520558031773696';
|
},
|
||||||
let wrapArr = [],wrapArr0 = [] ,wrapArrs = [];
|
methods: {
|
||||||
this.$API.enm.enstat.req(query0).then((res0) => {
|
getData(goalData) {
|
||||||
let data0 = [];//去年的值
|
let that = this;
|
||||||
data0 = res0;
|
let query0 = {};
|
||||||
if(data0.length>0){
|
query0.page = 0;
|
||||||
data0.forEach(item0 => {
|
query0.type = "month_st";
|
||||||
//先按月份排序,再按班组排序
|
query0.year_s = that.query.year_s - 1;
|
||||||
let n0 = item0.month_s;
|
query0.mgroup = that.query.mgroup;
|
||||||
let ind0 = 0;
|
let wrapArr = [],
|
||||||
if(team_name0.indexOf('甲')>-1){
|
wrapArr0 = [],
|
||||||
ind0 = (n0-1)*3;
|
wrapArrs = [];
|
||||||
}else if(team_name0.indexOf('乙')>-1){
|
this.$API.enm.enstat.req(query0).then((res0) => {
|
||||||
ind0 = (n0-1)*3+1;
|
let data0 = []; //去年的值
|
||||||
}else if(team_name0.indexOf('丙')>-1){
|
data0 = res0;
|
||||||
ind0 = (n0-1)*3+2;
|
if (data0.length > 0) {
|
||||||
}
|
data0.forEach((item0) => {
|
||||||
wrapArr0[ind0] = item0;
|
//先按月份排序,再按班组排序
|
||||||
});
|
let n0 = item0.month_s;
|
||||||
console.log(wrapArr0)
|
let ind0 = 0;
|
||||||
}else{
|
let team_name0 = item0.team_name;
|
||||||
}
|
if (team_name0.indexOf("甲") > -1) {
|
||||||
this.$API.enm.enstat.req(that.query).then((res) => {
|
ind0 = (n0 - 1) * 3;
|
||||||
//今年的值
|
} else if (team_name0.indexOf("乙") > -1) {
|
||||||
let data = res;
|
ind0 = (n0 - 1) * 3 + 1;
|
||||||
if(data.length>0){
|
} else if (team_name0.indexOf("丙") > -1) {
|
||||||
data.forEach(item => {
|
ind0 = (n0 - 1) * 3 + 2;
|
||||||
//先按月份排序,再按班组排序
|
}
|
||||||
let n = item.month_s;
|
wrapArr0[ind0] = item0;
|
||||||
let team_name = item.team_name;
|
});
|
||||||
let ind = 0;
|
console.log(wrapArr0);
|
||||||
if(team_name.indexOf('甲')>-1){
|
} else {
|
||||||
ind = (n-1)*3;
|
}
|
||||||
}else if(team_name.indexOf('乙')>-1){
|
this.$API.enm.enstat.req(that.query).then((res) => {
|
||||||
ind = (n-1)*3+1;
|
//今年的值
|
||||||
}else if(team_name.indexOf('丙')>-1){
|
let data = res;
|
||||||
ind = (n-1)*3+2;
|
if (data.length > 0) {
|
||||||
}
|
data.forEach((item) => {
|
||||||
wrapArrs[ind] = item;
|
//先按月份排序,再按班组排序
|
||||||
let arr = [];
|
let n = item.month_s;
|
||||||
let time = ''+item.year_s+'.'+item.month_s;
|
let team_name = item.team_name;
|
||||||
arr.push(time);
|
let ind = 0;
|
||||||
arr.push(item.team_name);
|
if (team_name.indexOf("甲") > -1) {
|
||||||
arr.push(item.total_production);
|
ind = (n - 1) * 3;
|
||||||
arr.push(item.production_hour);
|
} else if (team_name.indexOf("乙") > -1) {
|
||||||
arr.push(item.run_rate);
|
ind = (n - 1) * 3 + 1;
|
||||||
arr.push(item.production_cost_unit);
|
} else if (team_name.indexOf("丙") > -1) {
|
||||||
//质量
|
ind = (n - 1) * 3 + 2;
|
||||||
arr[6]=item.出磨水泥_比表面积_rate_pass!=null?item.出磨水泥_比表面积_rate_pass:'/';
|
}
|
||||||
arr[7]=item.出磨水泥_SO3_rate_pass!=null?item.出磨水泥_SO3_rate_pass:'/';
|
wrapArrs[ind] = item;
|
||||||
arr[8]=item.出磨水泥_掺量_rate_pass!=null?item.出磨水泥_掺量_rate_pass:'/';
|
let arr = [];
|
||||||
//设备
|
let time = "" + item.year_s + "." + item.month_s;
|
||||||
arr[9]=item.循环风机1906_consume_unit!=null?item.循环风机1906_consume_unit:'/';
|
arr.push(time);
|
||||||
arr[10]=item.系统风机_consume_unit!=null?item.系统风机_consume_unit:'/';
|
arr.push(item.team_name);
|
||||||
arr[11]=item.水平涡流选粉机1915_consume_unit!=null?item.水平涡流选粉机1915_consume_unit:'/';
|
arr.push(item.total_production);
|
||||||
// arr[12]=item.新增磨尾风机_consume_unit!=null?item.新增磨尾风机_consume_unit:'/';
|
arr.push(item.production_hour);
|
||||||
|
arr.push(item.run_rate);
|
||||||
|
arr.push(item.production_cost_unit);
|
||||||
|
//质量
|
||||||
|
arr[6] =
|
||||||
|
item.出磨水泥_比表面积_rate_pass != null
|
||||||
|
? item.出磨水泥_比表面积_rate_pass
|
||||||
|
: "/";
|
||||||
|
arr[7] =
|
||||||
|
item.出磨水泥_SO3_rate_pass != null
|
||||||
|
? item.出磨水泥_SO3_rate_pass
|
||||||
|
: "/";
|
||||||
|
arr[8] =
|
||||||
|
item.出磨水泥_掺量_rate_pass != null
|
||||||
|
? item.出磨水泥_掺量_rate_pass
|
||||||
|
: "/";
|
||||||
|
//设备
|
||||||
|
arr[9] =
|
||||||
|
item.循环风机1906_consume_unit != null
|
||||||
|
? item.循环风机1906_consume_unit
|
||||||
|
: "/";
|
||||||
|
arr[10] =
|
||||||
|
item.系统风机_consume_unit != null
|
||||||
|
? item.系统风机_consume_unit
|
||||||
|
: "/";
|
||||||
|
arr[11] =
|
||||||
|
item.水平涡流选粉机1915_consume_unit != null
|
||||||
|
? item.水平涡流选粉机1915_consume_unit
|
||||||
|
: "/";
|
||||||
|
// arr[12]=item.新增磨尾风机_consume_unit!=null?item.新增磨尾风机_consume_unit:'/';
|
||||||
|
|
||||||
// arr[13]=item.elec_consume_unit//当期值(KW·h/t)
|
// arr[13]=item.elec_consume_unit//当期值(KW·h/t)
|
||||||
let keyVale ='goal_val_'+n;
|
let keyVale = "goal_val_" + n;
|
||||||
arr[12]=goalData[keyVale];//目标值(KW·h/t)//需要接口获取
|
arr[12] = goalData[keyVale]; //目标值(KW·h/t)//需要接口获取
|
||||||
arr[13]=arr[12]-item.celec_consume_unit;//当期与目标差值(KW·h/t)
|
arr[13] = arr[12] - item.celec_consume_unit; //当期与目标差值(KW·h/t)
|
||||||
let ind_pre = 0,huanqi = 0,huanqicha=0,tongqi=0,tongqicha=0;
|
let ind_pre = 0,
|
||||||
if(n==1){
|
huanqi = 0,
|
||||||
ind_pre = 12;
|
huanqicha = 0,
|
||||||
huanqi = wrapArr0[ind_pre]?wrapArr0[ind_pre].elec_consume_unit:'/';
|
tongqi = 0,
|
||||||
}else{
|
tongqicha = 0;
|
||||||
ind_pre=n-1;
|
if (n == 1) {
|
||||||
huanqi = wrapArr[ind_pre]?wrapArr[ind_pre].elec_consume_unit?wrapArr[ind_pre].elec_consume_unit:'/':'/'
|
ind_pre = 12;
|
||||||
}
|
huanqi = wrapArr0[ind_pre]
|
||||||
arr[14]=huanqi;//环期值(KW·h/t)上个月的值
|
? wrapArr0[ind_pre].elec_consume_unit
|
||||||
if(huanqi!=='/'){
|
: "/";
|
||||||
huanqicha = item.celec_consume_unit-huanqi;
|
} else {
|
||||||
}else{
|
ind_pre = n - 1;
|
||||||
huanqicha = item.celec_consume_unit
|
huanqi = wrapArr[ind_pre]
|
||||||
}
|
? wrapArr[ind_pre].elec_consume_unit
|
||||||
arr[15]=huanqicha;//当期与环期差值(KW·h/t)
|
? wrapArr[ind_pre].elec_consume_unit
|
||||||
arr[16]=huanqi!='/'? huanqicha/huanqi*100:0;//环比增长率(%)
|
: "/"
|
||||||
if(wrapArr0[n]){
|
: "/";
|
||||||
tongqicha = item.celec_consume_unit-wrapArr0[n].celec_consume_unit;
|
}
|
||||||
tongqi = tongqicha/tongqi;
|
arr[14] = huanqi; //环期值(KW·h/t)上个月的值
|
||||||
}else{
|
if (huanqi !== "/") {
|
||||||
tongqicha = item.celec_consume_unit;
|
huanqicha = item.celec_consume_unit - huanqi;
|
||||||
tongqi = 0;
|
} else {
|
||||||
}
|
huanqicha = item.celec_consume_unit;
|
||||||
|
}
|
||||||
arr[17]=tongqi;//同比增长率(%):本月-去年本月/去年
|
arr[15] = huanqicha; //当期与环期差值(KW·h/t)
|
||||||
arr[18]=0.00;//同比增长率(%)
|
arr[16] =
|
||||||
wrapArr[ind] = arr;
|
huanqi != "/" ? (huanqicha / huanqi) * 100 : 0; //环比增长率(%)
|
||||||
});
|
if (wrapArr0[n]) {
|
||||||
let newArr= [];
|
tongqicha =
|
||||||
for (let i = 0; i < wrapArr.length; i++) {
|
item.celec_consume_unit -
|
||||||
let item = wrapArr[i];
|
wrapArr0[n].celec_consume_unit;
|
||||||
console.log(item);
|
tongqi = tongqicha / tongqi;
|
||||||
if (item==undefined) {}else{
|
} else {
|
||||||
newArr.push(wrapArr[i])
|
tongqicha = item.celec_consume_unit;
|
||||||
}
|
tongqi = 0;
|
||||||
}
|
}
|
||||||
that.tableDatas = newArr;
|
|
||||||
}else{
|
arr[17] = tongqi; //同比增长率(%):本月-去年本月/去年
|
||||||
}
|
arr[18] = 0.0; //同比增长率(%)
|
||||||
})
|
wrapArr[ind] = arr;
|
||||||
})
|
});
|
||||||
},
|
let newArr = [];
|
||||||
handleQuery(){
|
for (let i = 0; i < wrapArr.length; i++) {
|
||||||
this.tableDatas = [];
|
let item = wrapArr[i];
|
||||||
this.getData();
|
console.log(item);
|
||||||
},
|
if (item == undefined) {
|
||||||
itemClick(type,item){
|
} else {
|
||||||
this.type=type;
|
newArr.push(wrapArr[i]);
|
||||||
this.asynDialog = true;
|
}
|
||||||
},
|
}
|
||||||
itemClick1(type,item){
|
that.tableDatas = newArr;
|
||||||
this.chartShow = false;
|
} else {
|
||||||
this.$API.bi.dataset.exec
|
}
|
||||||
.req('3322567213885833216')
|
});
|
||||||
.then((res) => {
|
});
|
||||||
this.myOption = JSON.parse(res.echart_options);
|
},
|
||||||
// debugger;
|
handleQuery() {
|
||||||
console.log(this.myOption)
|
this.tableDatas = [];
|
||||||
this.chartShow = true;
|
this.getData();
|
||||||
});
|
},
|
||||||
},
|
itemClick(type, item) {
|
||||||
handlePrint() {
|
this.type = type;
|
||||||
this.$PRINT('#myReport');
|
this.asynDialog = true;
|
||||||
},
|
},
|
||||||
exportExcel() {
|
itemClick1(type, item) {
|
||||||
this.exportLoading = true;
|
this.chartShow = false;
|
||||||
this.$XLSX('#myTable', this.tableName)
|
this.$API.bi.dataset.exec.req("3322567213885833216").then((res) => {
|
||||||
this.exportLoading = false;
|
this.myOption = JSON.parse(res.echart_options);
|
||||||
},
|
// debugger;
|
||||||
}
|
console.log(this.myOption);
|
||||||
};
|
this.chartShow = true;
|
||||||
|
});
|
||||||
|
},
|
||||||
|
handlePrint() {
|
||||||
|
this.$PRINT("#myReport");
|
||||||
|
},
|
||||||
|
exportExcel() {
|
||||||
|
this.exportLoading = true;
|
||||||
|
this.$XLSX("#myTable", this.tableName);
|
||||||
|
this.exportLoading = false;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped>
|
||||||
.printWrap{
|
.printWrap {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
overflow-x: scroll;
|
overflow-x: scroll;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
@ -1,376 +1,468 @@
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-header>
|
<el-header>
|
||||||
<div class="left-panel">
|
<div class="left-panel">
|
||||||
<el-date-picker
|
<el-date-picker
|
||||||
v-model="query.year_s"
|
v-model="query.year_s"
|
||||||
type="year"
|
type="year"
|
||||||
value-format="YYYY"
|
value-format="YYYY"
|
||||||
format="YYYY"
|
format="YYYY"
|
||||||
placeholder="查询年份"
|
placeholder="查询年份"
|
||||||
class="headerSearch"
|
class="headerSearch"
|
||||||
/>
|
/>
|
||||||
<el-select
|
<el-select
|
||||||
v-model="query.type"
|
v-model="query.type"
|
||||||
placeholder="查询类型"
|
placeholder="查询类型"
|
||||||
clearable
|
clearable
|
||||||
@change="typeCange"
|
@change="typeCange"
|
||||||
>
|
>
|
||||||
<el-option
|
<el-option
|
||||||
v-for="item in options"
|
v-for="item in options"
|
||||||
:key="item.id"
|
:key="item.id"
|
||||||
:label="item.name"
|
:label="item.name"
|
||||||
:value="item.id"
|
:value="item.id"
|
||||||
></el-option>
|
></el-option>
|
||||||
</el-select>
|
</el-select>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
icon="el-icon-search"
|
icon="el-icon-search"
|
||||||
@click="handleQuery"
|
@click="handleQuery"
|
||||||
></el-button>
|
></el-button>
|
||||||
<el-button
|
<el-button
|
||||||
type="primary"
|
type="primary"
|
||||||
@click="exportExcel()"
|
@click="exportExcel()"
|
||||||
:loading = "exportLoading"
|
:loading="exportLoading"
|
||||||
>导出xlsx
|
>导出xlsx
|
||||||
</el-button>
|
</el-button>
|
||||||
<el-button
|
<el-button type="primary" @click="handlePrint">打印 </el-button>
|
||||||
type="primary"
|
</div>
|
||||||
@click="handlePrint"
|
</el-header>
|
||||||
>打印
|
<el-card style="margin-top: 5px">
|
||||||
</el-button>
|
<div class="printWrap">
|
||||||
</div>
|
<div ref="print" id="myReport" class="printContainer">
|
||||||
</el-header>
|
<table
|
||||||
<el-card style="margin-top:5px">
|
border="1"
|
||||||
<div class="printWrap">
|
width="1075"
|
||||||
<div ref="print" id="myReport" class="printContainer">
|
cellspacing="0"
|
||||||
<table border="1" width="1075" cellspacing="0" :key="0" id="myTable" class="myTable" v-if="query.type==1">
|
:key="0"
|
||||||
<thead class="myTableHead">
|
id="myTable"
|
||||||
<tr>
|
class="myTable"
|
||||||
<th colspan="9">水泥磨工段车间单位产品电耗月度分析表</th>
|
v-if="query.type == 1"
|
||||||
</tr>
|
>
|
||||||
<tr>
|
<thead class="myTableHead">
|
||||||
<th rowspan="2">月份</th>
|
<tr>
|
||||||
<th rowspan="2">当期值(KW·h/t)</th>
|
<th colspan="9">
|
||||||
<th rowspan="2">目标值(KW·h/t)</th>
|
水泥磨工段车间单位产品电耗月度分析表
|
||||||
<th colspan="3">国家标准(KW·h/t)</th>
|
</th>
|
||||||
<th rowspan="2">当期与环期差值(KW·h/t)</th>
|
</tr>
|
||||||
<th rowspan="2">环比增长率(%)</th>
|
<tr>
|
||||||
<th rowspan="2">同比增长率(%)</th>
|
<th rowspan="2">月份</th>
|
||||||
</tr>
|
<th rowspan="2">当期值(KW·h/t)</th>
|
||||||
<tr>
|
<th rowspan="2">目标值(KW·h/t)</th>
|
||||||
<th>1级</th>
|
<th colspan="3">国家标准(KW·h/t)</th>
|
||||||
<th>2级</th>
|
<th rowspan="2">当期与环期差值(KW·h/t)</th>
|
||||||
<th>3级</th>
|
<th rowspan="2">环比增长率(%)</th>
|
||||||
</tr>
|
<th rowspan="2">同比增长率(%)</th>
|
||||||
</thead>
|
</tr>
|
||||||
<tbody>
|
<tr>
|
||||||
<tr v-for="item in tableDatas" :key="item">
|
<th>1级</th>
|
||||||
<td v-for="(item1,ind) in item" :key="ind" class="numCell">
|
<th>2级</th>
|
||||||
<div :class="bindClass(item1,ind)">
|
<th>3级</th>
|
||||||
<span v-if="item1<0&&ind==6">▲</span>
|
</tr>
|
||||||
<span v-if="item1<0&&ind==6">▼</span>
|
</thead>
|
||||||
{{item1}}
|
<tbody>
|
||||||
</div>
|
<tr v-for="item in tableDatas" :key="item">
|
||||||
</td>
|
<td
|
||||||
</tr>
|
v-for="(item1, ind) in item"
|
||||||
</tbody>
|
:key="ind"
|
||||||
</table>
|
class="numCell"
|
||||||
<table border="1" width="1075" cellspacing="0" :key="1" id="myTable1" class="myTable" v-else>
|
>
|
||||||
<thead class="myTableHead">
|
<div :class="bindClass(item1, ind)">
|
||||||
<tr>
|
<span v-if="item1 < 0 && ind == 6"
|
||||||
<th colspan="9">水泥磨工段车间单位产品综合能耗月度分析表</th>
|
>▲</span
|
||||||
</tr>
|
>
|
||||||
<tr>
|
<span v-if="item1 < 0 && ind == 6"
|
||||||
<th rowspan="2">月份</th>
|
>▼</span
|
||||||
<th rowspan="2">当期值(KW·h/t)</th>
|
>
|
||||||
<th rowspan="2">目标值(KW·h/t)</th>
|
{{ item1 }}
|
||||||
<th colspan="3">国家标准(KW·h/t)</th>
|
</div>
|
||||||
<th rowspan="2">当期与环期差值(KW·h/t)</th>
|
</td>
|
||||||
<th rowspan="2">环比增长率(%)</th>
|
</tr>
|
||||||
<th rowspan="2">同比增长率(%)</th>
|
</tbody>
|
||||||
</tr>
|
</table>
|
||||||
<tr>
|
<table
|
||||||
<th>1级</th>
|
border="1"
|
||||||
<th>2级</th>
|
width="1075"
|
||||||
<th>3级</th>
|
cellspacing="0"
|
||||||
</tr>
|
:key="1"
|
||||||
</thead>
|
id="myTable1"
|
||||||
<tbody>
|
class="myTable"
|
||||||
<tr v-for="item in tableDatas2" :key="item">
|
v-else
|
||||||
<td v-for="(item1,ind) in item" :key="ind" class="numCell">
|
>
|
||||||
<div :class="bindClass(item1,ind)">
|
<thead class="myTableHead">
|
||||||
<span v-if="item1<0&&ind==6">▲</span>
|
<tr>
|
||||||
<span v-if="item1<0&&ind==6">▼</span>
|
<th colspan="9">
|
||||||
{{item1}}
|
水泥磨工段车间单位产品综合能耗月度分析表
|
||||||
</div>
|
</th>
|
||||||
</td>
|
</tr>
|
||||||
</tr>
|
<tr>
|
||||||
</tbody>
|
<th rowspan="2">月份</th>
|
||||||
</table>
|
<th rowspan="2">当期值(KW·h/t)</th>
|
||||||
</div>
|
<th rowspan="2">目标值(KW·h/t)</th>
|
||||||
</div>
|
<th colspan="3">国家标准(KW·h/t)</th>
|
||||||
</el-card>
|
<th rowspan="2">当期与环期差值(KW·h/t)</th>
|
||||||
</div>
|
<th rowspan="2">环比增长率(%)</th>
|
||||||
</template>
|
<th rowspan="2">同比增长率(%)</th>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<th>1级</th>
|
||||||
|
<th>2级</th>
|
||||||
|
<th>3级</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr v-for="item in tableDatas2" :key="item">
|
||||||
|
<td
|
||||||
|
v-for="(item1, ind) in item"
|
||||||
|
:key="ind"
|
||||||
|
class="numCell"
|
||||||
|
>
|
||||||
|
<div :class="bindClass(item1, ind)">
|
||||||
|
<span v-if="item1 < 0 && ind == 6"
|
||||||
|
>▲</span
|
||||||
|
>
|
||||||
|
<span v-if="item1 < 0 && ind == 6"
|
||||||
|
>▼</span
|
||||||
|
>
|
||||||
|
{{ item1 }}
|
||||||
|
</div>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</el-card>
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import scEcharts from "@/components/scEcharts";
|
import scEcharts from "@/components/scEcharts";
|
||||||
import { defineAsyncComponent } from 'vue'
|
import { defineAsyncComponent } from "vue";
|
||||||
export default {
|
export default {
|
||||||
components: {
|
components: {
|
||||||
scEcharts,
|
scEcharts,
|
||||||
charts: defineAsyncComponent(() => import("@/components/scEnm/lineChartsdialog.vue")),
|
charts: defineAsyncComponent(() =>
|
||||||
},
|
import("@/components/scEnm/lineChartsdialog.vue")
|
||||||
data() {
|
),
|
||||||
return {
|
},
|
||||||
chartShow: false,
|
data() {
|
||||||
myOption: null,
|
return {
|
||||||
query: {
|
exportLoading: false,
|
||||||
type:1,
|
chartShow: false,
|
||||||
year_s:'',
|
myOption: null,
|
||||||
mgroup:'3347217651339837440',
|
query: {
|
||||||
},
|
type: 1,
|
||||||
monthGoal:[],
|
year_s: "",
|
||||||
monthGoal2:[],
|
mgroup: "",
|
||||||
tableDatas:[],
|
},
|
||||||
tableDatas2:[],
|
monthGoal: [],
|
||||||
options:[{
|
monthGoal2: [],
|
||||||
name:'电耗',id:1,
|
tableDatas: [],
|
||||||
},{
|
tableDatas2: [],
|
||||||
name:'综合能耗',id:2,
|
options: [
|
||||||
}],
|
{
|
||||||
modelValue:true,
|
name: "电耗",
|
||||||
type:'hours',
|
id: 1,
|
||||||
title:'title',
|
},
|
||||||
apiObj:'',
|
{
|
||||||
showClose:true,
|
name: "综合能耗",
|
||||||
echartType:'line',
|
id: 2,
|
||||||
asynDialog:false,
|
},
|
||||||
};
|
],
|
||||||
},
|
modelValue: true,
|
||||||
mounted() {
|
type: "hours",
|
||||||
let that = this;
|
title: "title",
|
||||||
var myDate = new Date();
|
apiObj: "",
|
||||||
let year = myDate.getFullYear();
|
showClose: true,
|
||||||
that.query.year_s = year;
|
echartType: "line",
|
||||||
//月目标
|
asynDialog: false,
|
||||||
let paramsGoal = {};
|
};
|
||||||
paramsGoal.page=0;
|
},
|
||||||
paramsGoal.mgroup=that.query.mgroup;
|
mounted() {
|
||||||
that.$API.mtm.goal.list.req(paramsGoal).then((ress) => {
|
let that = this;
|
||||||
if(ress.length>0){
|
var myDate = new Date();
|
||||||
let monthGoal = [];
|
let year = myDate.getFullYear();
|
||||||
ress.forEach(goal=>{
|
that.query.year_s = year;
|
||||||
if(goal.goal_cate_name=='单位产品分布电耗(KW·h/t)'){
|
that.timeStamp = myDate.getTime();
|
||||||
monthGoal[0]=goal.goal_val;
|
this.$API.mtm.mgroup.list
|
||||||
monthGoal[1]=goal.goal_val_2;
|
.req({ page: 0, search: "水泥磨" })
|
||||||
monthGoal[2]=goal.goal_val_3;
|
.then((res) => {
|
||||||
monthGoal[3]=goal.goal_val_4;
|
console.log("水泥磨", res);
|
||||||
monthGoal[4]=goal.goal_val_5;
|
that.query.mgroup = res[0].id;
|
||||||
monthGoal[5]=goal.goal_val_6;
|
//月目标
|
||||||
monthGoal[6]=goal.goal_val_7;
|
this.getMonthGoal();
|
||||||
monthGoal[7]=goal.goal_val_8;
|
});
|
||||||
monthGoal[8]=goal.goal_val_9;
|
},
|
||||||
monthGoal[9]=goal.goal_val_10;
|
methods: {
|
||||||
monthGoal[10]=goal.goal_val_11;
|
// 动态绑定Class
|
||||||
monthGoal[11]=goal.goal_val_12;
|
bindClass(item, index) {
|
||||||
monthGoal[12]=goal.goal_val_12;
|
let classInfo = { redColor: false, greenColor: false };
|
||||||
that.monthGoal = monthGoal;
|
if (index == 6) {
|
||||||
}
|
if (typeof item == "number") {
|
||||||
if(goal.goal_cate_name=='单位产品综合能耗(kgce/t)'){
|
if (item > 0) {
|
||||||
monthGoal2[0]=goal.goal_val;
|
classInfo.greenColor = true;
|
||||||
monthGoal2[1]=goal.goal_val_2;
|
classInfo.redColor = false;
|
||||||
monthGoal2[2]=goal.goal_val_3;
|
} else if (item < 0) {
|
||||||
monthGoal2[3]=goal.goal_val_4;
|
classInfo.redColor = true;
|
||||||
monthGoal2[4]=goal.goal_val_5;
|
classInfo.greenColor = false;
|
||||||
monthGoal2[5]=goal.goal_val_6;
|
}
|
||||||
monthGoal2[6]=goal.goal_val_7;
|
}
|
||||||
monthGoal2[7]=goal.goal_val_8;
|
}
|
||||||
monthGoal2[8]=goal.goal_val_9;
|
return classInfo;
|
||||||
monthGoal2[9]=goal.goal_val_10;
|
},
|
||||||
monthGoal2[10]=goal.goal_val_11;
|
//月目标
|
||||||
monthGoal2[11]=goal.goal_val_12;
|
getMonthGoal() {
|
||||||
monthGoal2[12]=goal.goal_val_12;
|
let that = this;
|
||||||
that.monthGoal2 = monthGoal2;
|
let paramsGoal = {};
|
||||||
}
|
paramsGoal.page = 0;
|
||||||
})
|
paramsGoal.mgroup = that.query.mgroup;
|
||||||
this.getData();
|
that.$API.mtm.goal.list.req(paramsGoal).then((ress) => {
|
||||||
}else{
|
if (ress.length > 0) {
|
||||||
this.getData();
|
let monthGoal = [];
|
||||||
}
|
ress.forEach((goal) => {
|
||||||
})
|
if (
|
||||||
},
|
goal.goal_cate_name == "单位产品分布电耗(KW·h/t)"
|
||||||
methods: {
|
) {
|
||||||
// 动态绑定Class
|
monthGoal[0] = goal.goal_val;
|
||||||
bindClass(item,index){
|
monthGoal[1] = goal.goal_val_2;
|
||||||
let classInfo = { redColor: false, greenColor: false }
|
monthGoal[2] = goal.goal_val_3;
|
||||||
if(index==6){
|
monthGoal[3] = goal.goal_val_4;
|
||||||
if( typeof(item)=='number'){
|
monthGoal[4] = goal.goal_val_5;
|
||||||
if(item>0){
|
monthGoal[5] = goal.goal_val_6;
|
||||||
classInfo.greenColor = true;
|
monthGoal[6] = goal.goal_val_7;
|
||||||
classInfo.redColor = false;
|
monthGoal[7] = goal.goal_val_8;
|
||||||
}else if(item<0){
|
monthGoal[8] = goal.goal_val_9;
|
||||||
classInfo.redColor = true;
|
monthGoal[9] = goal.goal_val_10;
|
||||||
classInfo.greenColor = false
|
monthGoal[10] = goal.goal_val_11;
|
||||||
}
|
monthGoal[11] = goal.goal_val_12;
|
||||||
}
|
monthGoal[12] = goal.goal_val_12;
|
||||||
}
|
that.monthGoal = monthGoal;
|
||||||
return classInfo
|
}
|
||||||
},
|
if (
|
||||||
getData(){
|
goal.goal_cate_name == "单位产品综合能耗(kgce/t)"
|
||||||
let that = this;
|
) {
|
||||||
let query0={};
|
monthGoal2[0] = goal.goal_val;
|
||||||
query0.page = 0;
|
monthGoal2[1] = goal.goal_val_2;
|
||||||
query0.type='month_s';
|
monthGoal2[2] = goal.goal_val_3;
|
||||||
query0.year_s = that.query.year_s-1;
|
monthGoal2[3] = goal.goal_val_4;
|
||||||
query0.mgroup=that.query.mgroup;
|
monthGoal2[4] = goal.goal_val_5;
|
||||||
let wrapArr = [],wrapArr0 = [] ,wrapArrs = [],wrapArrs2 = [];
|
monthGoal2[5] = goal.goal_val_6;
|
||||||
this.$API.enm.enstat.req(query0).then((res0) => {
|
monthGoal2[6] = goal.goal_val_7;
|
||||||
let data0 = res0;
|
monthGoal2[7] = goal.goal_val_8;
|
||||||
if(data0.length>0){
|
monthGoal2[8] = goal.goal_val_9;
|
||||||
data0.forEach(item0 => {
|
monthGoal2[9] = goal.goal_val_10;
|
||||||
//先按月份排序,再按班组排序
|
monthGoal2[10] = goal.goal_val_11;
|
||||||
let ind0 = item0.month_s;
|
monthGoal2[11] = goal.goal_val_12;
|
||||||
wrapArr0[ind0] = item0;
|
monthGoal2[12] = goal.goal_val_12;
|
||||||
});
|
that.monthGoal2 = monthGoal2;
|
||||||
}
|
}
|
||||||
let query={};
|
});
|
||||||
query.page = 0;
|
this.getData();
|
||||||
query.type='month_s';
|
} else {
|
||||||
query.year_s = that.query.year_s;
|
this.getData();
|
||||||
query.mgroup=that.query.mgroup;
|
}
|
||||||
that.$API.enm.enstat.req(query).then((res) => {
|
});
|
||||||
let data = res;
|
},
|
||||||
if(data.length>0){
|
getData() {
|
||||||
data.forEach(item => {
|
let that = this;
|
||||||
//先按月份排序,再按班组排序
|
let query0 = {};
|
||||||
let ind = item.month_s;
|
query0.page = 0;
|
||||||
let arr = [];
|
query0.type = "month_s";
|
||||||
let time = ''+item.year_s+'.'+item.month_s;
|
query0.year_s = that.query.year_s - 1;
|
||||||
arr.push(time);
|
query0.mgroup = that.query.mgroup;
|
||||||
arr.push(item.elec_consume_unit);//当期值(KW·h/t)
|
let wrapArr = [],
|
||||||
arr[2] = that.monthGoal[ind]!==undefined?that.monthGoal[ind]:'/';
|
wrapArr0 = [],
|
||||||
wrapArr[ind] = arr;
|
wrapArrs = [],
|
||||||
});
|
wrapArrs2 = [];
|
||||||
wrapArr.forEach((item,index)=>{
|
this.$API.enm.enstat.req(query0).then((res0) => {
|
||||||
let ind = item.month_s;
|
let data0 = res0;
|
||||||
let arrs = [],arrs2=[];
|
if (data0.length > 0) {
|
||||||
arrs[0]=item[0];
|
data0.forEach((item0) => {
|
||||||
arrs[1]=item[1];
|
//先按月份排序,再按班组排序
|
||||||
arrs[2]=item[2];
|
let ind0 = item0.month_s;
|
||||||
arrs[3]=26;
|
wrapArr0[ind0] = item0;
|
||||||
arrs[4]=29;
|
});
|
||||||
arrs[5]=34;
|
}
|
||||||
//当期与环期差值(KW·h/t)
|
let query = {};
|
||||||
let lastNum = 0,lastDiff = 0;
|
query.page = 0;
|
||||||
if(index>1){
|
query.type = "month_s";
|
||||||
let num = index-1;
|
query.year_s = that.query.year_s;
|
||||||
if(wrapArr[num]&&wrapArr[num].elec_consume_unit){
|
query.mgroup = that.query.mgroup;
|
||||||
lastNum = wrapArr[num].elec_consume_unit;
|
that.$API.enm.enstat.req(query).then((res) => {
|
||||||
}else{
|
let data = res;
|
||||||
lastNum='/'
|
if (data.length > 0) {
|
||||||
}
|
data.forEach((item) => {
|
||||||
}else{
|
//先按月份排序,再按班组排序
|
||||||
lastNum = wrapArr0[12]?wrapArr0[12].elec_consume_unit:'/';
|
let ind = item.month_s;
|
||||||
}
|
let arr = [];
|
||||||
if(arrs[1]!=='/'&&lastNum!=='/'){
|
let time = "" + item.year_s + "." + item.month_s;
|
||||||
lastDiff =arrs[1]- lastNum;
|
arr.push(time);
|
||||||
}else{
|
arr.push(item.elec_consume_unit); //当期值(KW·h/t)
|
||||||
lastDiff = '/';
|
arr[2] =
|
||||||
}
|
that.monthGoal[ind] !== undefined
|
||||||
arrs[6]=lastDiff;
|
? that.monthGoal[ind]
|
||||||
//环比增长率(%)
|
: "/";
|
||||||
let lastRate = 0;
|
wrapArr[ind] = arr;
|
||||||
if(lastDiff=='/'&&lastNum!=='/'&&lastNum!==0){
|
});
|
||||||
lastRate = (lastDiff/lastNum)*100;
|
wrapArr.forEach((item, index) => {
|
||||||
}else{
|
let ind = item.month_s;
|
||||||
lastRate = '/'
|
let arrs = [],
|
||||||
}
|
arrs2 = [];
|
||||||
arrs[7]=lastRate;
|
arrs[0] = item[0];
|
||||||
//同比增长率(%)需要当前值-上一年同一个月的值即wrapArr0[ind].elec_consume_unit
|
arrs[1] = item[1];
|
||||||
let sameRate =0;
|
arrs[2] = item[2];
|
||||||
if(wrapArr0[index]&&wrapArr0[index].elec_consume_unit){
|
arrs[3] = 26;
|
||||||
sameRate =((arrs[1]- wrapArr0[index].elec_consume_unit)/wrapArr0[index].elec_consume_unit)*100
|
arrs[4] = 29;
|
||||||
}else{
|
arrs[5] = 34;
|
||||||
sameRate='/';
|
//当期与环期差值(KW·h/t)
|
||||||
}
|
let lastNum = 0,
|
||||||
arrs[8]=sameRate;
|
lastDiff = 0;
|
||||||
wrapArrs.push(arrs);
|
if (index > 1) {
|
||||||
|
let num = index - 1;
|
||||||
|
if (
|
||||||
|
wrapArr[num] &&
|
||||||
|
wrapArr[num].elec_consume_unit
|
||||||
|
) {
|
||||||
|
lastNum = wrapArr[num].elec_consume_unit;
|
||||||
|
} else {
|
||||||
|
lastNum = "/";
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
lastNum = wrapArr0[12]
|
||||||
|
? wrapArr0[12].elec_consume_unit
|
||||||
|
: "/";
|
||||||
|
}
|
||||||
|
if (arrs[1] !== "/" && lastNum !== "/") {
|
||||||
|
lastDiff = arrs[1] - lastNum;
|
||||||
|
} else {
|
||||||
|
lastDiff = "/";
|
||||||
|
}
|
||||||
|
arrs[6] = lastDiff;
|
||||||
|
//环比增长率(%)
|
||||||
|
let lastRate = 0;
|
||||||
|
if (
|
||||||
|
lastDiff == "/" &&
|
||||||
|
lastNum !== "/" &&
|
||||||
|
lastNum !== 0
|
||||||
|
) {
|
||||||
|
lastRate = (lastDiff / lastNum) * 100;
|
||||||
|
} else {
|
||||||
|
lastRate = "/";
|
||||||
|
}
|
||||||
|
arrs[7] = lastRate;
|
||||||
|
//同比增长率(%)需要当前值-上一年同一个月的值即wrapArr0[ind].elec_consume_unit
|
||||||
|
let sameRate = 0;
|
||||||
|
if (
|
||||||
|
wrapArr0[index] &&
|
||||||
|
wrapArr0[index].elec_consume_unit
|
||||||
|
) {
|
||||||
|
sameRate =
|
||||||
|
((arrs[1] -
|
||||||
|
wrapArr0[index].elec_consume_unit) /
|
||||||
|
wrapArr0[index].elec_consume_unit) *
|
||||||
|
100;
|
||||||
|
} else {
|
||||||
|
sameRate = "/";
|
||||||
|
}
|
||||||
|
arrs[8] = sameRate;
|
||||||
|
wrapArrs.push(arrs);
|
||||||
|
|
||||||
arrs2[0]=item[0];
|
arrs2[0] = item[0];
|
||||||
arrs2[1]=item.cen_consume_unit;
|
arrs2[1] = item.cen_consume_unit;
|
||||||
arrs2[2]=that.monthGoal2[ind]!==undefined?that.monthGoal2[ind]:'/';
|
arrs2[2] =
|
||||||
arrs2[3]=80;
|
that.monthGoal2[ind] !== undefined
|
||||||
arrs2[4]=87;
|
? that.monthGoal2[ind]
|
||||||
arrs2[5]=94;
|
: "/";
|
||||||
//当期与环期差值(KW·h/t)
|
arrs2[3] = 80;
|
||||||
let lastNum2 = 0,lastDiff2 = 0;
|
arrs2[4] = 87;
|
||||||
if(index>1){
|
arrs2[5] = 94;
|
||||||
let num = index-1;
|
//当期与环期差值(KW·h/t)
|
||||||
if(wrapArr[num]&&wrapArr[num].cen_consume_unit){
|
let lastNum2 = 0,
|
||||||
lastNum2 = wrapArr[num].cen_consume_unit;
|
lastDiff2 = 0;
|
||||||
}else{
|
if (index > 1) {
|
||||||
lastNum2='/'
|
let num = index - 1;
|
||||||
}
|
if (
|
||||||
}else{
|
wrapArr[num] &&
|
||||||
lastNum2 = wrapArr0[12]?wrapArr0[12].cen_consume_unit:'/';
|
wrapArr[num].cen_consume_unit
|
||||||
}
|
) {
|
||||||
if(arrs2[1]!=='/'&&lastNum2!=='/'){
|
lastNum2 = wrapArr[num].cen_consume_unit;
|
||||||
lastDiff2 =arrs2[1]- lastNum2;
|
} else {
|
||||||
}else{
|
lastNum2 = "/";
|
||||||
lastDiff2 = '/';
|
}
|
||||||
}
|
} else {
|
||||||
arrs2[6]=lastDiff2;
|
lastNum2 = wrapArr0[12]
|
||||||
//环比增长率(%)
|
? wrapArr0[12].cen_consume_unit
|
||||||
let lastRate2 = 0;
|
: "/";
|
||||||
if(lastDiff2=='/'&&lastNum2!=='/'&&lastNum2!==0){
|
}
|
||||||
lastRate2 = (lastDiff2/lastNum2)*100;
|
if (arrs2[1] !== "/" && lastNum2 !== "/") {
|
||||||
}else{
|
lastDiff2 = arrs2[1] - lastNum2;
|
||||||
lastRate2 = '/'
|
} else {
|
||||||
}
|
lastDiff2 = "/";
|
||||||
arrs2[7]=lastRate2;
|
}
|
||||||
//同比增长率(%)需要当前值-上一年同一个月的值即wrapArr0[ind].elec_consume_unit
|
arrs2[6] = lastDiff2;
|
||||||
let sameRate2 =0;
|
//环比增长率(%)
|
||||||
if(wrapArr0[index]&&wrapArr0[index].cen_consume_unit){
|
let lastRate2 = 0;
|
||||||
sameRate2 =((arrs[1]- wrapArr0[index].cen_consume_unit)/wrapArr0[index].cen_consume_unit)*100
|
if (
|
||||||
}else{
|
lastDiff2 == "/" &&
|
||||||
sameRate2='/';
|
lastNum2 !== "/" &&
|
||||||
}
|
lastNum2 !== 0
|
||||||
arrs2[8]=sameRate2;
|
) {
|
||||||
wrapArrs2.push(arrs2);
|
lastRate2 = (lastDiff2 / lastNum2) * 100;
|
||||||
})
|
} else {
|
||||||
that.tableDatas = wrapArrs;
|
lastRate2 = "/";
|
||||||
that.tableDatas2 = wrapArrs2;
|
}
|
||||||
}else{
|
arrs2[7] = lastRate2;
|
||||||
}
|
//同比增长率(%)需要当前值-上一年同一个月的值即wrapArr0[ind].elec_consume_unit
|
||||||
})
|
let sameRate2 = 0;
|
||||||
})
|
if (
|
||||||
},
|
wrapArr0[index] &&
|
||||||
itemClick(type,item){
|
wrapArr0[index].cen_consume_unit
|
||||||
this.type=type;
|
) {
|
||||||
this.asynDialog = true;
|
sameRate2 =
|
||||||
},
|
((arrs[1] -
|
||||||
itemClick1(type,item){
|
wrapArr0[index].cen_consume_unit) /
|
||||||
this.chartShow = false;
|
wrapArr0[index].cen_consume_unit) *
|
||||||
this.$API.bi.dataset.exec
|
100;
|
||||||
.req('3322567213885833216')
|
} else {
|
||||||
.then((res) => {
|
sameRate2 = "/";
|
||||||
this.myOption = JSON.parse(res.echart_options);
|
}
|
||||||
debugger;
|
arrs2[8] = sameRate2;
|
||||||
console.log(this.myOption)
|
wrapArrs2.push(arrs2);
|
||||||
this.chartShow = true;
|
});
|
||||||
});
|
that.tableDatas = wrapArrs;
|
||||||
},
|
that.tableDatas2 = wrapArrs2;
|
||||||
handlePrint() {
|
} else {
|
||||||
this.$PRINT('#myReport');
|
}
|
||||||
},
|
});
|
||||||
exportExcel() {
|
});
|
||||||
this.exportLoading = true;
|
},
|
||||||
this.$XLSX('#myTable', this.tableName)
|
itemClick(type, item) {
|
||||||
this.exportLoading = false;
|
this.type = type;
|
||||||
},
|
this.asynDialog = true;
|
||||||
}
|
},
|
||||||
};
|
handleQuery() {
|
||||||
|
this.getMonthGoal();
|
||||||
|
},
|
||||||
|
typeCange() {},
|
||||||
|
handlePrint() {
|
||||||
|
this.$PRINT("#myReport");
|
||||||
|
},
|
||||||
|
exportExcel() {
|
||||||
|
this.exportLoading = true;
|
||||||
|
this.$XLSX("#myTable", this.tableName);
|
||||||
|
this.exportLoading = false;
|
||||||
|
},
|
||||||
|
},
|
||||||
|
};
|
||||||
</script>
|
</script>
|
||||||
<style scoped>
|
<style scoped></style>
|
||||||
</style>
|
|
||||||
|
|
Loading…
Reference in New Issue