工段菜单
This commit is contained in:
parent
c3a656fc5d
commit
6078fb329f
|
|
@ -94,4 +94,13 @@ export default {
|
|||
}
|
||||
},
|
||||
},
|
||||
enstat: {
|
||||
name: "测点原始记录",
|
||||
req: async function(data){
|
||||
return await http.get(
|
||||
`${config.API_URL}/enm/enstat/`,
|
||||
data
|
||||
);
|
||||
}
|
||||
},
|
||||
}
|
||||
|
|
@ -126,8 +126,70 @@ const routes = [
|
|||
]
|
||||
},
|
||||
{
|
||||
"name": "rm_enm",
|
||||
"path": "/rm_enm",
|
||||
"name": "enm_slag",
|
||||
"path": "/enm_slag",
|
||||
"meta": {
|
||||
"title": "电石渣",
|
||||
"icon": "el-icon-grid",
|
||||
"type": "menu",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"name": "slag_report",
|
||||
"path": "/enm_slag/report",
|
||||
"meta": {
|
||||
"title": "生产报告",
|
||||
"icon": "el-icon-grid",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
"component": "enm_slag/report"
|
||||
},
|
||||
{
|
||||
"name": "slag_power",
|
||||
"path": "/enm_slag/power",
|
||||
"meta": {
|
||||
"title": "单位产品电耗",
|
||||
"icon": "el-icon-grid",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
"component": "enm_slag/power"
|
||||
},
|
||||
{
|
||||
"name": "slag_teamAnalysis",
|
||||
"path": "/enm_slag/teamAnalysis",
|
||||
"meta": {
|
||||
"title": "班组月度对比",
|
||||
"icon": "el-icon-grid",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
"component": "enm_slag/teamAnalysis"
|
||||
},
|
||||
{
|
||||
"name": "slag_workshopAnalysis",
|
||||
"path": "/enm_slag/workshopAnalysis",
|
||||
"meta": {
|
||||
"title": "车间单耗分析",
|
||||
"icon": "el-icon-grid",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
"component": "enm_slag/workshopAnalysis"
|
||||
},
|
||||
{
|
||||
"name": "slag_handoverLog",
|
||||
"path": "/enm_slag/handoverLog",
|
||||
"meta": {
|
||||
"title": "交接班日志",
|
||||
"icon": "el-icon-grid",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
"component": "enm_slag/handoverLog"
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "enm_rm",
|
||||
"path": "/enm_rm",
|
||||
"meta": {
|
||||
"title": "原料磨",
|
||||
"icon": "el-icon-grid",
|
||||
|
|
@ -137,53 +199,301 @@ const routes = [
|
|||
"children": [
|
||||
{
|
||||
"name": "report",
|
||||
"path": "/rm_enm/report",
|
||||
"path": "/enm_rm/report",
|
||||
"meta": {
|
||||
"title": "生产报告",
|
||||
"icon": "el-icon-grid",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
"component": "rm_enm/report"
|
||||
"component": "enm_rm/report"
|
||||
},
|
||||
{
|
||||
"name": "power",
|
||||
"path": "/rm_enm/power",
|
||||
"path": "/enm_rm/power",
|
||||
"meta": {
|
||||
"title": "单位产品电耗",
|
||||
"icon": "el-icon-grid",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
"component": "rm_enm/power"
|
||||
"component": "enm_rm/power"
|
||||
},
|
||||
{
|
||||
"name": "teamAnalysis",
|
||||
"path": "/rm_enm/teamAnalysis",
|
||||
"path": "/enm_rm/teamAnalysis",
|
||||
"meta": {
|
||||
"title": "班组月度对比",
|
||||
"icon": "el-icon-grid",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
"component": "rm_enm/teamAnalysis"
|
||||
"component": "enm_rm/teamAnalysis"
|
||||
},
|
||||
{
|
||||
"name": "workshopAnalysis",
|
||||
"path": "/rm_enm/workshopAnalysis",
|
||||
"path": "/enm_rm/workshopAnalysis",
|
||||
"meta": {
|
||||
"title": "车间单耗分析",
|
||||
"icon": "el-icon-grid",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
"component": "rm_enm/workshopAnalysis"
|
||||
"component": "enm_rm/workshopAnalysis"
|
||||
},
|
||||
{
|
||||
"name": "handoverLog",
|
||||
"path": "/rm_enm/handoverLog",
|
||||
"path": "/enm_rm/handoverLog",
|
||||
"meta": {
|
||||
"title": "交接班日志",
|
||||
"icon": "el-icon-grid",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
"component": "rm_enm/handoverLog"
|
||||
"component": "enm_rm/handoverLog"
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "enm_kiln",
|
||||
"path": "/enm_kiln",
|
||||
"meta": {
|
||||
"title": "回转窑",
|
||||
"icon": "el-icon-grid",
|
||||
"type": "menu",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"name": "kiln_report",
|
||||
"path": "/enm_kiln/report",
|
||||
"meta": {
|
||||
"title": "生产报告",
|
||||
"icon": "el-icon-grid",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
"component": "enm_kiln/report"
|
||||
},
|
||||
{
|
||||
"name": "kiln_power",
|
||||
"path": "/enm_kiln/power",
|
||||
"meta": {
|
||||
"title": "单位产品电耗",
|
||||
"icon": "el-icon-grid",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
"component": "enm_kiln/power"
|
||||
},
|
||||
{
|
||||
"name": "kiln_teamAnalysis",
|
||||
"path": "/enm_kiln/teamAnalysis",
|
||||
"meta": {
|
||||
"title": "班组月度对比",
|
||||
"icon": "el-icon-grid",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
"component": "enm_kiln/teamAnalysis"
|
||||
},
|
||||
{
|
||||
"name": "kiln_workshopAnalysis",
|
||||
"path": "/enm_kiln/workshopAnalysis",
|
||||
"meta": {
|
||||
"title": "车间单耗分析",
|
||||
"icon": "el-icon-grid",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
"component": "enm_kiln/workshopAnalysis"
|
||||
},
|
||||
{
|
||||
"name": "kiln_handoverLog",
|
||||
"path": "/enm_kiln/handoverLog",
|
||||
"meta": {
|
||||
"title": "交接班日志",
|
||||
"icon": "el-icon-grid",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
"component": "enm_kiln/handoverLog"
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "enm_coal",
|
||||
"path": "/enm_coal",
|
||||
"meta": {
|
||||
"title": "煤磨",
|
||||
"icon": "el-icon-grid",
|
||||
"type": "menu",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"name": "coal_report",
|
||||
"path": "/enm_coal/report",
|
||||
"meta": {
|
||||
"title": "生产报告",
|
||||
"icon": "el-icon-grid",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
"component": "enm_coal/report"
|
||||
},
|
||||
{
|
||||
"name": "coal_power",
|
||||
"path": "/enm_coal/power",
|
||||
"meta": {
|
||||
"title": "单位产品电耗",
|
||||
"icon": "el-icon-grid",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
"component": "enm_coal/power"
|
||||
},
|
||||
{
|
||||
"name": "coal_teamAnalysis",
|
||||
"path": "/enm_coal/teamAnalysis",
|
||||
"meta": {
|
||||
"title": "班组月度对比",
|
||||
"icon": "el-icon-grid",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
"component": "enm_coal/teamAnalysis"
|
||||
},
|
||||
{
|
||||
"name": "coal_workshopAnalysis",
|
||||
"path": "/enm_coal/workshopAnalysis",
|
||||
"meta": {
|
||||
"title": "车间单耗分析",
|
||||
"icon": "el-icon-grid",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
"component": "enm_coal/workshopAnalysis"
|
||||
},
|
||||
{
|
||||
"name": "coal_handoverLog",
|
||||
"path": "/enm_coal/handoverLog",
|
||||
"meta": {
|
||||
"title": "交接班日志",
|
||||
"icon": "el-icon-grid",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
"component": "enm_coal/handoverLog"
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "enm_mill",
|
||||
"path": "/enm_mill",
|
||||
"meta": {
|
||||
"title": "水泥磨",
|
||||
"icon": "el-icon-grid",
|
||||
"type": "menu",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"name": "mill_report",
|
||||
"path": "/enm_mill/report",
|
||||
"meta": {
|
||||
"title": "生产报告",
|
||||
"icon": "el-icon-grid",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
"component": "enm_mill/report"
|
||||
},
|
||||
{
|
||||
"name": "mill_power",
|
||||
"path": "/enm_mill/power",
|
||||
"meta": {
|
||||
"title": "单位产品电耗",
|
||||
"icon": "el-icon-grid",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
"component": "enm_mill/power"
|
||||
},
|
||||
{
|
||||
"name": "mill_teamAnalysis",
|
||||
"path": "/enm_mill/teamAnalysis",
|
||||
"meta": {
|
||||
"title": "班组月度对比",
|
||||
"icon": "el-icon-grid",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
"component": "enm_mill/teamAnalysis"
|
||||
},
|
||||
{
|
||||
"name": "mill_workshopAnalysis",
|
||||
"path": "/enm_mill/workshopAnalysis",
|
||||
"meta": {
|
||||
"title": "车间单耗分析",
|
||||
"icon": "el-icon-grid",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
"component": "enm_mill/workshopAnalysis"
|
||||
},
|
||||
{
|
||||
"name": "mill_handoverLog",
|
||||
"path": "/enm_mill/handoverLog",
|
||||
"meta": {
|
||||
"title": "交接班日志",
|
||||
"icon": "el-icon-grid",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
"component": "enm_mill/handoverLog"
|
||||
},
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "enm_pack",
|
||||
"path": "/enm_pack",
|
||||
"meta": {
|
||||
"title": "水泥包装",
|
||||
"icon": "el-icon-grid",
|
||||
"type": "menu",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
"children": [
|
||||
{
|
||||
"name": "pack_report",
|
||||
"path": "/enm_pack/report",
|
||||
"meta": {
|
||||
"title": "生产报告",
|
||||
"icon": "el-icon-grid",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
"component": "enm_pack/report"
|
||||
},
|
||||
// {
|
||||
// "name": "pack_power",
|
||||
// "path": "/enm_pack/power",
|
||||
// "meta": {
|
||||
// "title": "单位产品电耗",
|
||||
// "icon": "el-icon-grid",
|
||||
// "perms": ["bi"]
|
||||
// },
|
||||
// "component": "enm_pack/power"
|
||||
// },
|
||||
{
|
||||
"name": "pack_teamAnalysis",
|
||||
"path": "/enm_pack/teamAnalysis",
|
||||
"meta": {
|
||||
"title": "班组月度对比",
|
||||
"icon": "el-icon-grid",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
"component": "enm_pack/teamAnalysis"
|
||||
},
|
||||
{
|
||||
"name": "pack_workshopAnalysis",
|
||||
"path": "/enm_pack/workshopAnalysis",
|
||||
"meta": {
|
||||
"title": "车间单耗分析",
|
||||
"icon": "el-icon-grid",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
"component": "enm_pack/workshopAnalysis"
|
||||
},
|
||||
{
|
||||
"name": "pack_handoverLog",
|
||||
"path": "/enm_pack/handoverLog",
|
||||
"meta": {
|
||||
"title": "交接班日志",
|
||||
"icon": "el-icon-grid",
|
||||
"perms": ["bi"]
|
||||
},
|
||||
"component": "enm_pack/handoverLog"
|
||||
},
|
||||
]
|
||||
},
|
||||
|
|
|
|||
|
|
@ -0,0 +1,321 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<div style="margin-right: 20px">交接班日志</div>
|
||||
<el-date-picker
|
||||
v-model="query.time"
|
||||
type="date"
|
||||
value-format="YYYY-MM-DD"
|
||||
format="YYYY-MM-DD"
|
||||
placeholder="日志时间"
|
||||
/>
|
||||
<el-select
|
||||
v-model="query.shift"
|
||||
placeholder="班次"
|
||||
clearable
|
||||
style="margin-left: 2px; width: 120px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in optionsShift"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
<el-select
|
||||
v-model="query.team"
|
||||
placeholder="班组"
|
||||
clearable
|
||||
style="margin-left: 2px; width: 120px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></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" width="80"></el-table-column>
|
||||
<el-table-column label="当前班次" prop="shift_name" width="80"></el-table-column>
|
||||
<el-table-column label="班长" prop="leader_name" width="80"></el-table-column>
|
||||
|
||||
<el-table-column label="检验时间">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.last_test_time">{{ scope.row.last_test_time.slice(0,16)}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" width="140">
|
||||
<template #default="scope">
|
||||
<el-button link size="small" @click="sflog_edit(scope.row)" type="primary">编辑</el-button>
|
||||
<el-button link size="small" @click="sflog_check(scope.row)" type="primary">质量检验</el-button>
|
||||
<el-button link size="small" @click="sflog_other(scope.row)" type="primary">其他能源</el-button>
|
||||
<el-button link size="small" @click="sflog_export(scope.row)" type="success">报表</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-main>
|
||||
<el-drawer v-model="limitedExport" size="60%" :show-close="false">
|
||||
<template #header="{ close, titleId, titleClass }">
|
||||
<h4 :id="titleId" :class="titleClass">交接班日志</h4>
|
||||
<el-button type="danger" @click="close">
|
||||
<el-icon class="el-icon--left"><CircleCloseFilled /></el-icon>
|
||||
关闭
|
||||
</el-button>
|
||||
</template>
|
||||
<el-main class="nopadding">
|
||||
<div ref="print" id="myReport" class="printContainer">
|
||||
<div style="margin-right: 20px;text-align: center;font-size: 16px;font-weight: bold;margin-bottom: 20px;">
|
||||
<span v-if="sflogItem.end_time">{{sflogItem.end_time.slice(0,10)}}{{ sflogItem.shift_name }}</span>
|
||||
<span v-if="sflogItem.team_name">{{ sflogItem.team_name }}</span>
|
||||
交接班记录
|
||||
</div>
|
||||
<h3 style="text-align: center;display: flex;justify-content: space-around;">
|
||||
<span>2023.06.21</span>
|
||||
<span>白班</span>
|
||||
<span>甲班</span>
|
||||
</h3>
|
||||
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="numCell">产量(t)</td>
|
||||
<td class="numCell">{{value1}}</td>
|
||||
<td class="numCell">台时(t/h)</td>
|
||||
<td class="numCell">{{value3}}</td>
|
||||
<td class="numCell">运转时间(h)</td>
|
||||
<td class="numCell">{{value5}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="numCell">运转率(%)</td>
|
||||
<td class="numCell">{{value1}}</td>
|
||||
<td class="numCell">停机时长(h)</td>
|
||||
<td class="numCell">{{value3}}</td>
|
||||
<td class="numCell">煤磨分布电耗(KW·h/t)</td>
|
||||
<td class="numCell">{{value5}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="numCell">煤粉细度合格率(%)</td>
|
||||
<td class="numCell">{{value1}}</td>
|
||||
<td class="numCell">煤粉水分合格率(%)</td>
|
||||
<td class="numCell">{{value5}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="numCell">生产情况记录</td>
|
||||
<td class="numCell" colspan="5">时间、类别、原因、处置措施、处置人</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</el-main>
|
||||
</el-drawer>
|
||||
</el-container>
|
||||
<save-dialog
|
||||
v-if="dialog.save"
|
||||
ref="saveDialog"
|
||||
@success="handleSaveSuccess"
|
||||
@closed="dialog.save = false"
|
||||
></save-dialog>
|
||||
<other-dialog
|
||||
v-if="dialog.other"
|
||||
ref="otherDialog"
|
||||
@success="handleOtherSuccess"
|
||||
@closed="dialog.other = false"
|
||||
></other-dialog>
|
||||
<quastat-dialog
|
||||
v-if="dialog.check"
|
||||
ref="checkDialog"
|
||||
@success="handleCheckSuccess"
|
||||
@closed="dialog.save = false"
|
||||
></quastat-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import saveDialog from "./handover_form.vue";
|
||||
import quastatDialog from "./quastat_form.vue";
|
||||
import otherDialog from "./other_form.vue";
|
||||
export default {
|
||||
name: "listSon",
|
||||
components: {
|
||||
saveDialog,
|
||||
otherDialog,
|
||||
quastatDialog
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
apiObj: this.$API.wpm.sflog.list,
|
||||
apiObj2: null,
|
||||
query: {
|
||||
mgroup:'3347217512021835776',
|
||||
},
|
||||
query2: {},
|
||||
dialog: {
|
||||
save: false,
|
||||
check: false,
|
||||
other:false,
|
||||
},
|
||||
sflogItem:{},
|
||||
selection: [],
|
||||
value1:1,
|
||||
value3:3,
|
||||
value5:5,
|
||||
modelValue:true,
|
||||
showClose:true,
|
||||
echartType:'line',
|
||||
asynDialog:false,
|
||||
options:[],
|
||||
optionsShift:[],
|
||||
limitedExport:false,
|
||||
};
|
||||
},
|
||||
|
||||
methods: {
|
||||
sflog_export(){
|
||||
this.limitedExport = true;
|
||||
},
|
||||
rowClick(row) {
|
||||
this.sflogId = row.id;
|
||||
this.sflogItem = row;
|
||||
// this.$refs.table2.queryData({post: row.id});
|
||||
},
|
||||
//编辑
|
||||
sflog_edit(row) {
|
||||
this.dialog.save = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.saveDialog.open("edit").setData(row);
|
||||
});
|
||||
},
|
||||
//质量检验
|
||||
sflog_check(row){
|
||||
this.dialog.check = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.checkDialog.open("edit").setData(row);
|
||||
});
|
||||
},
|
||||
//其他能源物料
|
||||
sflog_other(row){
|
||||
this.dialog.other = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.otherDialog.open("edit").setData(row);
|
||||
});
|
||||
},
|
||||
// //查看
|
||||
// table_show(row) {
|
||||
// this.dialog.save = true;
|
||||
// this.$nextTick(() => {
|
||||
// this.$refs.checkDialog.open("edit").setData(row);
|
||||
// });
|
||||
// },
|
||||
//删除
|
||||
async table_del(row) {
|
||||
this.$API.wpm.sflog.delete.req(row.id)
|
||||
.then((res) => {
|
||||
this.$message.success("删除成功");
|
||||
return res;
|
||||
})
|
||||
.catch((err) => {
|
||||
return err;
|
||||
});
|
||||
},
|
||||
//新增岗位后更新数据
|
||||
handleSaveSuccess(data, mode) {
|
||||
this.$refs.table.refresh()
|
||||
this.dialog.save = false;
|
||||
},
|
||||
handleOtherSuccess(){
|
||||
this.dialog.other = false;
|
||||
},
|
||||
handleCheckSuccess(){
|
||||
this.dialog.check = false;
|
||||
},
|
||||
closed() {
|
||||
this.dialog.save = false;
|
||||
this.$refs.table2.refresh();
|
||||
},
|
||||
handleDel(row) {
|
||||
this.$confirm(`确定删除选中的记录吗?`, "提示", {
|
||||
type: "warning",
|
||||
}).then(() => {
|
||||
this.$API.wpm.shift.delete.req(row.id).then((res) => {
|
||||
if (res.err_msg) {
|
||||
this.$message.error(res.err_msg);
|
||||
} else {
|
||||
// const loading = this.$loading();
|
||||
// this.$refs.table2.refresh();
|
||||
// loading.close();
|
||||
// this.$message.success("操作成功");
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
handlePrint() {
|
||||
this.$PRINT('#myReport');
|
||||
},
|
||||
exportExcel() {
|
||||
this.exportLoading = true;
|
||||
this.$XLSX('#myTable', this.tableName)
|
||||
this.exportLoading = false;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.printContainer{
|
||||
width: 1075px;
|
||||
}
|
||||
#numTable{
|
||||
margin-left: 37px;
|
||||
}
|
||||
#numTable td{
|
||||
height: 32px;
|
||||
padding-left: 5px;
|
||||
}
|
||||
.numCell{
|
||||
width: 80px;
|
||||
}
|
||||
.numCell.numCell_last{
|
||||
width: 100px;
|
||||
}
|
||||
.searchHead{
|
||||
display:flex
|
||||
}
|
||||
.middleText{
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
margin: 0 5px;
|
||||
display: inline-block;
|
||||
}
|
||||
.searchBtn{
|
||||
margin-left: 5px;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
|
@ -0,0 +1,212 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="exportExcel()"
|
||||
:loading = "exportLoading"
|
||||
>导出xlsx
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="handlePrint"
|
||||
>打印
|
||||
</el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-card style="margin-top:5px">
|
||||
<div ref="print" id="myReport" class="printContainer">
|
||||
<h3 style="text-align: center;">主要设备(100KW以上)单位产品电耗数据表</h3>
|
||||
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable">
|
||||
<thead style="background: #efefef;height: 40px;">
|
||||
<tr>
|
||||
<th>设备名称</th>
|
||||
<th>设备编号</th>
|
||||
<th>单位</th>
|
||||
<th>上个小时</th>
|
||||
<th>昨日</th>
|
||||
<th>本月</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item) in tableDatas" :key="item">
|
||||
<td class="numCell">{{item.name}}</td>
|
||||
<td class="numCell">{{item.number}}</td>
|
||||
<td class="numCell">{{item.unit}}</td>
|
||||
<td class="numCell hoursItem" @click="itemClick('hours',item)" style="background: rgba(238, 179, 179, 0.8);">{{item[0]}}</td>
|
||||
<td class="numCell monthItem" @click="itemClick('month',item)" style="background: rgba(238, 189, 124, 0.8);">{{item[2]}}</td>
|
||||
<td class="numCell yearItem" @click="itemClick1('year',item)" style="background: rgba(186, 236, 135, 0.8);">{{item[3]}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<sc-dialog v-model="chartShow" draggable title="创建/编辑人员证书">
|
||||
<div class="searchHead" v-if="type=='hours'">
|
||||
<el-date-picker
|
||||
v-model="query.start_time"
|
||||
type="date"
|
||||
placeholder="选择时间"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<span class="middleText">至</span>
|
||||
<el-date-picker
|
||||
v-model="query.end_time"
|
||||
type="date"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
start-placeholder="结束日期"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-button type="primary" class="searchBtn" @click="dataSearch">查询</el-button>
|
||||
</div>
|
||||
<div class="searchHead" v-if="type=='days'">
|
||||
<el-date-picker
|
||||
v-model="query.start_time"
|
||||
type="date"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
start-placeholder="开始日期"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-date-picker
|
||||
v-model="query.end_time"
|
||||
type="date"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
start-placeholder="结束日期"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-button type="primary" class="searchBtn" @click="dataSearch">查询</el-button>
|
||||
</div>
|
||||
<div class="searchHead" v-if="type=='month'">
|
||||
<el-date-picker
|
||||
v-model="query.start_time"
|
||||
type="month"
|
||||
format="YYYY-MM"
|
||||
value-format="YYYY-MM"
|
||||
start-placeholder="开始月份"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-date-picker
|
||||
v-model="query.end_time"
|
||||
type="month"
|
||||
format="YYYY-MM"
|
||||
value-format="YYYY-MM"
|
||||
start-placeholder="结束月份"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-button type="primary" class="searchBtn" @click="dataSearch">查询</el-button>
|
||||
</div>
|
||||
<scEcharts height="360px" :option="myOption" v-if="chartShow"></scEcharts>
|
||||
</sc-dialog>
|
||||
<charts
|
||||
v-if="asynDialog"
|
||||
:type="type"
|
||||
:title="title"
|
||||
:modelValue="modelValue"
|
||||
:showClose="showClose"
|
||||
:echartType='echartType'
|
||||
@closed="asynDialog = false"
|
||||
></charts>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import scEcharts from "@/components/scEcharts";
|
||||
import { defineAsyncComponent } from 'vue'
|
||||
export default {
|
||||
components: {
|
||||
scEcharts,
|
||||
charts: defineAsyncComponent(() => import("@/components/scEnm/lineChartsdialog.vue")),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
chartShow: false,
|
||||
myOption: null,
|
||||
timeStamp:0,
|
||||
listQuery:{
|
||||
belong_dept:'',
|
||||
task2__year:'',
|
||||
page:0
|
||||
},
|
||||
query:{
|
||||
time:''
|
||||
},
|
||||
tableName:'主要设备(100KW以上)单位产品电耗数据表',
|
||||
tableDatas:[
|
||||
{name:'煤磨排风机主电机',number:'NM001',unit:'KW·h/t',hours:'',days:'',month:''},
|
||||
{name:'煤磨主电机',number:'NM002',unit:'KW·h/t',hours:'',days:'',month:''},
|
||||
],
|
||||
modelValue:true,
|
||||
type:'hours',
|
||||
title:'title',
|
||||
apiObj:'',
|
||||
showClose:true,
|
||||
echartType:'line',
|
||||
asynDialog:false,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
|
||||
itemClick(type,item){
|
||||
this.type=type;
|
||||
this.asynDialog = true;
|
||||
},
|
||||
itemClick1(type,item){
|
||||
this.chartShow = false;
|
||||
this.$API.bi.dataset.exec
|
||||
.req('3322567213885833216')
|
||||
.then((res) => {
|
||||
this.myOption = JSON.parse(res.echart_options);
|
||||
debugger;
|
||||
console.log(this.myOption)
|
||||
this.chartShow = true;
|
||||
});
|
||||
},
|
||||
handlePrint() {
|
||||
this.$PRINT('#myReport');
|
||||
},
|
||||
exportExcel() {
|
||||
this.exportLoading = true;
|
||||
this.$XLSX('#myTable', this.tableName)
|
||||
this.exportLoading = false;
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.printContainer{
|
||||
width: 1075px;
|
||||
}
|
||||
#numTable{
|
||||
margin-left: 37px;
|
||||
}
|
||||
#numTable td{
|
||||
height: 32px;
|
||||
padding-left: 5px;
|
||||
}
|
||||
.numCell{
|
||||
width: 80px;
|
||||
height: 35px;
|
||||
}
|
||||
.numCell.numCell_last{
|
||||
width: 100px;
|
||||
}
|
||||
.searchHead{
|
||||
display:flex
|
||||
}
|
||||
.middleText{
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
margin: 0 5px;
|
||||
display: inline-block;
|
||||
}
|
||||
.searchBtn{
|
||||
margin-left: 5px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -34,31 +34,22 @@
|
|||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item,index) in tableDatas" :key="item">
|
||||
<td v-if="index==0" rowspan="2">产量</td>
|
||||
<td v-if="index==0">总产量(t)</td>
|
||||
<td v-if="index==1">台时产量(t/h)</td>
|
||||
<td v-if="index==2" rowspan="2">运转时间</td>
|
||||
<td v-if="index==2">运转时间(t)</td>
|
||||
<td v-if="index==3">运转率(%)</td>
|
||||
<td v-if="index==4">能耗</td>
|
||||
<td v-if="index==4">生料分布电耗(KW·h/t)</td>
|
||||
<td v-if="index==5">成本</td>
|
||||
<td v-if="index==5">生料成本(元/吨)</td>
|
||||
<td v-if="index==6">质量</td>
|
||||
<td v-if="index==6">合格率(%)</td>
|
||||
<td class="numCell hoursItem" @click="itemClick('hours',item)" style="background: rgba(238, 179, 179, 0.8);">{{item[0]}}</td>
|
||||
<td class="numCell daysItem" @click="itemClick('days',item)" style="background: rgba(239, 90, 90, 0.8);">{{item[1]}}</td>
|
||||
<td class="numCell monthItem" @click="itemClick('month',item)" style="background: rgba(238, 189, 124, 0.8);">{{item[2]}}</td>
|
||||
<td class="numCell yearItem" @click="itemClick1('year',item)" style="background: rgba(186, 236, 135, 0.8);">{{item[3]}}</td>
|
||||
<td class="numCell">{{item[4]}}</td>
|
||||
<td class="numCell">{{item[5]}}</td>
|
||||
<td class="numCell" v-if="index==0||index==2" rowspan="2">{{item[0]}}</td>
|
||||
<td class="numCell" v-else-if="index==4">{{item[0]}}</td>
|
||||
<td class="numCell">{{item[1]}}</td>
|
||||
<td class="numCell hoursItem" @click="itemClick('hours',item)" style="background: rgba(238, 179, 179, 0.8);">{{item[2]}}</td>
|
||||
<td class="numCell daysItem" @click="itemClick('days',item)" style="background: rgba(239, 90, 90, 0.8);">{{item[3]}}</td>
|
||||
<td class="numCell monthItem" @click="itemClick('month',item)" style="background: rgba(238, 189, 124, 0.8);">{{item[4]}}</td>
|
||||
<td class="numCell yearItem" @click="itemClick1('year',item)" style="background: rgba(186, 236, 135, 0.8);">{{item[5]}}</td>
|
||||
<td class="numCell">{{item[6]}}</td>
|
||||
<td class="numCell">{{item[7]}}</td>
|
||||
<td class="numCell">{{item[8]}}</td>
|
||||
<td class="numCell">{{item[9]}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<sc-dialog v-model="chartShow" draggable title="创建/编辑人员证书">
|
||||
<sc-dialog v-model="chartShow" draggable title="煤磨工段">
|
||||
<div class="searchHead" v-if="type=='hours'">
|
||||
<el-date-picker
|
||||
v-model="query.start_time"
|
||||
|
|
@ -172,18 +163,16 @@
|
|||
time:''
|
||||
},
|
||||
tableDatas:[
|
||||
[0,0,0,0,0,0,0,0],
|
||||
[1,1,1,1,1,1,1,1],
|
||||
[2,2,2,2,2,2,2,2],
|
||||
[3,3,3,3,3,3,3,3],
|
||||
[4,4,4,4,4,4,4,4],
|
||||
[5,5,5,5,5,5,5,5],
|
||||
[6,6,6,6,6,6,6,6]
|
||||
['产量','总产量(t)',0,0,0,0,0,0,0,0],
|
||||
['产量','台时产量(t/h)',0,0,0,0,0,0,0,0],
|
||||
['运转时间','运转时间(h)',0,0,0,0,0,0,0,0],
|
||||
['运转时间','运转率(%)',0,0,0,0,0,0,0,0],
|
||||
['能耗','煤磨分布电耗(KW·h/t)',0,0,0,0,0,0,0,0],
|
||||
],
|
||||
tableName:'生产报告',
|
||||
modelValue:true,
|
||||
type:'hours',
|
||||
title:'title',
|
||||
title:'煤磨工段',
|
||||
apiObj:'',
|
||||
showClose:true,
|
||||
echartType:'line',
|
||||
|
|
@ -0,0 +1,169 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-date-picker
|
||||
v-model="query.time"
|
||||
type="month"
|
||||
value-format="YYYY-MM"
|
||||
format="YYYY-MM"
|
||||
placeholder="基础月份"
|
||||
/>
|
||||
<el-date-picker
|
||||
v-model="query.time2"
|
||||
type="month"
|
||||
value-format="YYYY-MM"
|
||||
format="YYYY-MM"
|
||||
placeholder="对比月份"
|
||||
/>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="handleQuery"
|
||||
></el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="exportExcel()"
|
||||
:loading = "exportLoading"
|
||||
>导出xlsx
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="handlePrint"
|
||||
>打印
|
||||
</el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-card style="margin-top:5px">
|
||||
<div ref="print" id="myReport" class="printContainer">
|
||||
<h3 style="text-align: center;">主要设备(100KW以上)单位产品电耗数据表</h3>
|
||||
<table border="1" cellspacing="0" :key="timeStamp" id="myTable">
|
||||
<thead style="background: #efefef;height: 40px;">
|
||||
<tr>
|
||||
<th rowspan="2">月份</th>
|
||||
<th rowspan="2">班组</th>
|
||||
<th rowspan="2">总产量(t)</th>
|
||||
<th rowspan="2">台时产量(t/h)</th>
|
||||
<th rowspan="2">运转率(%)</th>
|
||||
<th colspan="2">质量</th>
|
||||
<th colspan="8">单位产品电耗</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>细度(%)</th>
|
||||
<th>水分(%)</th>
|
||||
<th>煤磨排风机主电机单位产品电耗(KW·h/t)</th>
|
||||
<th>当期单位产品电耗(kW·h/h)</th>
|
||||
<th>单位产品电耗目标值(kW·h/h)</th>
|
||||
<th>当期单位产品电耗与目标值差值(kW·h/h)</th>
|
||||
<th>环期单位产品电耗(kW·h/h)</th>
|
||||
<th>当期单位产品电耗与环期差值(kW·h/h)</th>
|
||||
<th>当期单位产品电耗环比增长率(%)</th>
|
||||
<th>同比增长率(%)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr v-for="(item,index) in tableDatas" :key="index">
|
||||
<td v-if="index%3==0" rowspan="3" style="width:50px">{{item.month}}</td>
|
||||
<td class="numCell">{{item.name}}</td>
|
||||
<td class="numCell">{{item.number}}</td>
|
||||
<td class="numCell">{{item.unit}}</td>
|
||||
<td class="numCell">{{item.hours}}</td>
|
||||
<td class="numCell">{{item.days}}</td>
|
||||
<td class="numCell">{{item.months}}</td>
|
||||
<td class="numCell">{{item.hours}}</td>
|
||||
<td class="numCell">{{item.days}}</td>
|
||||
<td class="numCell">{{item.months}}</td>
|
||||
<td class="numCell">{{item.hours}}</td>
|
||||
<td class="numCell">{{item.days}}</td>
|
||||
<td class="numCell">{{item.months}}</td>
|
||||
<td class="numCell">{{item.months}}</td>
|
||||
<td class="numCell">{{item.hours}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
timeStamp:0,
|
||||
listQuery:{
|
||||
belong_dept:'',
|
||||
task2__year:'',
|
||||
page:0
|
||||
},
|
||||
query:{
|
||||
time:'',
|
||||
time2:'',
|
||||
},
|
||||
tableDatas:[
|
||||
{month:'2023.1',name:'甲组',number:'NM001',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
{month:'2023.1',name:'乙组',number:'NM002',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
{month:'2023.1',name:'丙组',number:'NM003',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
{month:'2023.2',name:'甲组',number:'NM004',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
{month:'2023.2',name:'乙组',number:'NM005',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
{month:'2023.2',name:'丙组',number:'NM006',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
|
||||
itemClick(type,item){
|
||||
this.type=type;
|
||||
this.asynDialog = true;
|
||||
},
|
||||
itemClick1(type,item){
|
||||
this.chartShow = false;
|
||||
this.$API.bi.dataset.exec
|
||||
.req('3322567213885833216')
|
||||
.then((res) => {
|
||||
this.myOption = JSON.parse(res.echart_options);
|
||||
debugger;
|
||||
console.log(this.myOption)
|
||||
this.chartShow = true;
|
||||
});
|
||||
},
|
||||
handlePrint() {
|
||||
this.$PRINT('#myReport');
|
||||
},
|
||||
exportExcel() {
|
||||
this.exportLoading = true;
|
||||
this.$XLSX('#myTable', this.tableName)
|
||||
this.exportLoading = false;
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.printContainer{
|
||||
width: 1075px;
|
||||
}
|
||||
#numTable{
|
||||
margin-left: 37px;
|
||||
}
|
||||
#numTable td{
|
||||
height: 32px;
|
||||
padding-left: 5px;
|
||||
}
|
||||
.numCell{
|
||||
width: 80px;
|
||||
}
|
||||
.numCell.numCell_last{
|
||||
width: 100px;
|
||||
}
|
||||
.searchHead{
|
||||
display:flex
|
||||
}
|
||||
.middleText{
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
margin: 0 5px;
|
||||
display: inline-block;
|
||||
}
|
||||
.searchBtn{
|
||||
margin-left: 5px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,340 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<div style="margin-right: 20px">交接班日志</div>
|
||||
<el-date-picker
|
||||
v-model="query.time"
|
||||
type="date"
|
||||
value-format="YYYY-MM-DD"
|
||||
format="YYYY-MM-DD"
|
||||
placeholder="日志时间"
|
||||
/>
|
||||
<el-select
|
||||
v-model="query.shift"
|
||||
placeholder="班次"
|
||||
clearable
|
||||
style="margin-left: 2px; width: 120px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in optionsShift"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
<el-select
|
||||
v-model="query.team"
|
||||
placeholder="班组"
|
||||
clearable
|
||||
style="margin-left: 2px; width: 120px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></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" width="80"></el-table-column>
|
||||
<el-table-column label="当前班次" prop="shift_name" width="80"></el-table-column>
|
||||
<el-table-column label="班长" prop="leader_name" width="80"></el-table-column>
|
||||
|
||||
<el-table-column label="检验时间">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.last_test_time">{{ scope.row.last_test_time.slice(0,16)}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" width="140">
|
||||
<template #default="scope">
|
||||
<el-button link size="small" @click="sflog_edit(scope.row)" type="primary">编辑</el-button>
|
||||
<el-button link size="small" @click="sflog_check(scope.row)" type="primary">质量检验</el-button>
|
||||
<el-button link size="small" @click="sflog_other(scope.row)" type="primary">其他能源</el-button>
|
||||
<el-button link size="small" @click="sflog_export(scope.row)" type="success">报表</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-main>
|
||||
<el-drawer v-model="limitedExport" size="60%" :show-close="false">
|
||||
<template #header="{ close, titleId, titleClass }">
|
||||
<h4 :id="titleId" :class="titleClass">交接班日志</h4>
|
||||
<el-button type="danger" @click="close">
|
||||
<el-icon class="el-icon--left"><CircleCloseFilled /></el-icon>
|
||||
关闭
|
||||
</el-button>
|
||||
</template>
|
||||
<el-main class="nopadding">
|
||||
<div ref="print" id="myReport" class="printContainer">
|
||||
<div style="margin-right: 20px;text-align: center;font-size: 16px;font-weight: bold;margin-bottom: 20px;">
|
||||
<span v-if="sflogItem.end_time">{{sflogItem.end_time.slice(0,10)}}{{ sflogItem.shift_name }}</span>
|
||||
<span v-if="sflogItem.team_name">{{ sflogItem.team_name }}</span>
|
||||
交接班记录
|
||||
</div>
|
||||
<h3 style="text-align: center;display: flex;justify-content: space-around;">
|
||||
<span>2023.06.21</span>
|
||||
<span>白班</span>
|
||||
<span>甲班</span>
|
||||
</h3>
|
||||
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="numCell">产量(t)</td>
|
||||
<td class="numCell">{{value1}}</td>
|
||||
<td class="numCell">台时(t/h)</td>
|
||||
<td class="numCell">{{value3}}</td>
|
||||
<td class="numCell">运转时间(h)</td>
|
||||
<td class="numCell">{{value5}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="numCell">运转率(%)</td>
|
||||
<td class="numCell">{{value1}}</td>
|
||||
<td class="numCell">停机时长(h)</td>
|
||||
<td class="numCell">{{value3}}</td>
|
||||
<td class="numCell">单位产品分布电耗(KW·h/t)</td>
|
||||
<td class="numCell">{{value5}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="numCell">单位产品标煤耗(kgce/t)</td>
|
||||
<td class="numCell">{{value1}}</td>
|
||||
<td class="numCell">熟料立升重合格率</td>
|
||||
<td class="numCell">{{value3}}</td>
|
||||
<td class="numCell">熟料f-CaO合格率</td>
|
||||
<td class="numCell">{{value5}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="numCell">入窑生料细度合格率(%)</td>
|
||||
<td class="numCell">{{value5}}</td>
|
||||
<td class="numCell">入窑生料CaO合格率(%)</td>
|
||||
<td class="numCell">{{value1}}</td>
|
||||
<td class="numCell">入窑生料Fe₂O₃合格率(%)</td>
|
||||
<td class="numCell">{{value3}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="numCell">入窑生料水分合格率(%)</td>
|
||||
<td class="numCell">{{value1}}</td>
|
||||
<td class="numCell">单位成本(元/吨)</td>
|
||||
<td class="numCell">{{value3}}</td>
|
||||
<td class="numCell"></td>
|
||||
<td class="numCell"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="numCell">生产情况记录</td>
|
||||
<td class="numCell" colspan="5">时间、类别、原因、处置措施、处置人</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</el-main>
|
||||
</el-drawer>
|
||||
</el-container>
|
||||
<save-dialog
|
||||
v-if="dialog.save"
|
||||
ref="saveDialog"
|
||||
@success="handleSaveSuccess"
|
||||
@closed="dialog.save = false"
|
||||
></save-dialog>
|
||||
<other-dialog
|
||||
v-if="dialog.other"
|
||||
ref="otherDialog"
|
||||
@success="handleOtherSuccess"
|
||||
@closed="dialog.other = false"
|
||||
></other-dialog>
|
||||
<quastat-dialog
|
||||
v-if="dialog.check"
|
||||
ref="checkDialog"
|
||||
@success="handleCheckSuccess"
|
||||
@closed="dialog.save = false"
|
||||
></quastat-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import saveDialog from "./handover_form.vue";
|
||||
import quastatDialog from "./quastat_form.vue";
|
||||
import otherDialog from "./other_form.vue";
|
||||
export default {
|
||||
name: "listSon",
|
||||
components: {
|
||||
saveDialog,
|
||||
otherDialog,
|
||||
quastatDialog
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
apiObj: this.$API.wpm.sflog.list,
|
||||
apiObj2: null,
|
||||
query: {
|
||||
mgroup:'3347217246321065984',
|
||||
},
|
||||
query2: {},
|
||||
dialog: {
|
||||
save: false,
|
||||
check: false,
|
||||
other:false,
|
||||
},
|
||||
sflogItem:{},
|
||||
selection: [],
|
||||
value1:1,
|
||||
value3:3,
|
||||
value5:5,
|
||||
modelValue:true,
|
||||
showClose:true,
|
||||
echartType:'line',
|
||||
asynDialog:false,
|
||||
options:[],
|
||||
optionsShift:[],
|
||||
limitedExport:false,
|
||||
};
|
||||
},
|
||||
|
||||
methods: {
|
||||
sflog_export(){
|
||||
this.limitedExport = true;
|
||||
},
|
||||
rowClick(row) {
|
||||
this.sflogId = row.id;
|
||||
this.sflogItem = row;
|
||||
// this.$refs.table2.queryData({post: row.id});
|
||||
},
|
||||
//编辑
|
||||
sflog_edit(row) {
|
||||
this.dialog.save = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.saveDialog.open("edit").setData(row);
|
||||
});
|
||||
},
|
||||
//质量检验
|
||||
sflog_check(row){
|
||||
this.dialog.check = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.checkDialog.open("edit").setData(row);
|
||||
});
|
||||
},
|
||||
//其他能源物料
|
||||
sflog_other(row){
|
||||
this.dialog.other = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.otherDialog.open("edit").setData(row);
|
||||
});
|
||||
},
|
||||
// //查看
|
||||
// table_show(row) {
|
||||
// this.dialog.save = true;
|
||||
// this.$nextTick(() => {
|
||||
// this.$refs.checkDialog.open("edit").setData(row);
|
||||
// });
|
||||
// },
|
||||
//删除
|
||||
async table_del(row) {
|
||||
this.$API.wpm.sflog.delete.req(row.id)
|
||||
.then((res) => {
|
||||
this.$message.success("删除成功");
|
||||
return res;
|
||||
})
|
||||
.catch((err) => {
|
||||
return err;
|
||||
});
|
||||
},
|
||||
//新增岗位后更新数据
|
||||
handleSaveSuccess(data, mode) {
|
||||
this.$refs.table.refresh()
|
||||
this.dialog.save = false;
|
||||
},
|
||||
handleOtherSuccess(){
|
||||
this.dialog.other = false;
|
||||
},
|
||||
handleCheckSuccess(){
|
||||
this.dialog.check = false;
|
||||
},
|
||||
closed() {
|
||||
this.dialog.save = false;
|
||||
this.$refs.table2.refresh();
|
||||
},
|
||||
handleDel(row) {
|
||||
this.$confirm(`确定删除选中的记录吗?`, "提示", {
|
||||
type: "warning",
|
||||
}).then(() => {
|
||||
this.$API.wpm.shift.delete.req(row.id).then((res) => {
|
||||
if (res.err_msg) {
|
||||
this.$message.error(res.err_msg);
|
||||
} else {
|
||||
// const loading = this.$loading();
|
||||
// this.$refs.table2.refresh();
|
||||
// loading.close();
|
||||
// this.$message.success("操作成功");
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
handlePrint() {
|
||||
this.$PRINT('#myReport');
|
||||
},
|
||||
exportExcel() {
|
||||
this.exportLoading = true;
|
||||
this.$XLSX('#myTable', this.tableName)
|
||||
this.exportLoading = false;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.printContainer{
|
||||
width: 1075px;
|
||||
}
|
||||
#numTable{
|
||||
margin-left: 37px;
|
||||
}
|
||||
#numTable td{
|
||||
height: 32px;
|
||||
padding-left: 5px;
|
||||
}
|
||||
.numCell{
|
||||
width: 80px;
|
||||
text-align: center;
|
||||
}
|
||||
.numCell.numCell_last{
|
||||
width: 100px;
|
||||
}
|
||||
.searchHead{
|
||||
display:flex
|
||||
}
|
||||
.middleText{
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
margin: 0 5px;
|
||||
display: inline-block;
|
||||
}
|
||||
.searchBtn{
|
||||
margin-left: 5px;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
|
@ -0,0 +1,198 @@
|
|||
<template>
|
||||
<el-dialog
|
||||
:title="titleMap[mode]"
|
||||
v-model="visible"
|
||||
:size="1000"
|
||||
destroy-on-close
|
||||
@closed="$emit('closed')"
|
||||
>
|
||||
<el-container v-loading="loading">
|
||||
<el-main style="padding: 0 20px 20px 20px">
|
||||
<el-form
|
||||
ref="dialogForm"
|
||||
:model="form"
|
||||
label-width="100px"
|
||||
label-position="right"
|
||||
:rules="rule1"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="关联工段" prop="mgroup">
|
||||
<el-input v-model="form.mgroup_name" placeholder="关联工段" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="当班班次" prop="shift">
|
||||
<el-input v-model="form.shift_name" placeholder="当班班次" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="开始时间" prop="start_time">
|
||||
<el-date-picker
|
||||
disabled
|
||||
v-model="form.start_time"
|
||||
type="datetime"
|
||||
format="YYYY-MM-DD HH:mm"
|
||||
placeholder="基础月份"
|
||||
style="width: 100%;"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="结束时间" prop="end_time">
|
||||
<el-date-picker
|
||||
disabled
|
||||
v-model="form.end_time"
|
||||
type="datetime"
|
||||
format="YYYY-MM-DD HH:mm"
|
||||
placeholder="对比月份"
|
||||
style="width: 100%;"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="当班班组" prop="team">
|
||||
<el-select
|
||||
v-model="form.team"
|
||||
placeholder="当班班组"
|
||||
clearable
|
||||
style="width: 100%;"
|
||||
@change="teamChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in teamOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="班组班长" prop="leader_name">
|
||||
<el-input v-model="form.leader_name" placeholder="班组班长" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col>
|
||||
<el-form-item label="生产情况记录">
|
||||
<el-input
|
||||
type="textarea"
|
||||
:rows="4"
|
||||
v-model="form.note"
|
||||
placeholder="生产情况记录"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-main>
|
||||
<el-footer>
|
||||
<el-button type="primary" :loading="isSaveing" @click="submit">保存</el-button>
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
</el-footer>
|
||||
</el-container>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
emits: ["success", "closed"],
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
mode: "add",
|
||||
titleMap: {
|
||||
add: "交接班日志",
|
||||
edit: "交接班日志",
|
||||
show: "查看交接班日志",
|
||||
},
|
||||
form: {
|
||||
type:10,
|
||||
},
|
||||
rules: {
|
||||
name: [{required: true, message: "请输入", trigger: "blur"}],
|
||||
number: [{required: true, message: "请输入", trigger: "blur"}],
|
||||
keeper_name: [{required: true, message: "请输入", trigger: "blur"}],
|
||||
belong_dept: [{required: true, message: "请选择", trigger: "blur"}]
|
||||
},
|
||||
visible: false,
|
||||
isSaveing: false,
|
||||
keeperOptions: [],
|
||||
depOptions: [],
|
||||
selectionFilters: [],
|
||||
setFiltersVisible: false,
|
||||
teamOptions:[],
|
||||
shiftOptions:[],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
//获取班组
|
||||
this.getTeam();
|
||||
this.getShfit();
|
||||
},
|
||||
methods: {
|
||||
getTeam(){
|
||||
this.$API.mtm.team.list.req({page:0}).then(res=>{
|
||||
this.teamOptions = res;
|
||||
})
|
||||
},
|
||||
getShfit(){
|
||||
this.$API.mtm.shift.req({page:0}).then(res=>{
|
||||
this.shiftOptions = res;
|
||||
})
|
||||
},
|
||||
//显示
|
||||
open(mode = "add") {
|
||||
this.mode = mode;
|
||||
this.visible = true;
|
||||
return this;
|
||||
},
|
||||
teamChange(data){
|
||||
let that = this;
|
||||
that.teamOptions.forEach(item=>{
|
||||
if(item.id==data){
|
||||
that.form.leader_name = item.leader_name;
|
||||
that.form.leader= item.leader;
|
||||
}
|
||||
})
|
||||
},
|
||||
//表单提交方法
|
||||
submit() {
|
||||
this.$refs.dialogForm.validate(async (valid) => {
|
||||
if (valid) {
|
||||
this.isSaveing = true;
|
||||
try {
|
||||
let obj={};
|
||||
obj.note = this.form.note;
|
||||
obj.team = this.form.team;
|
||||
obj.shift = this.form.shift;
|
||||
obj.leader = this.form.leader;
|
||||
this.$API.wpm.sflog.update.req(this.form.id,obj).then(res=>{
|
||||
this.isSaveing = false;
|
||||
this.$emit("success", this.form, this.mode);
|
||||
this.visible = false;
|
||||
this.$message.success("操作成功");
|
||||
return res;
|
||||
})
|
||||
} catch (err) {
|
||||
//可以处理校验错误
|
||||
this.isSaveing = false;
|
||||
return err;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
//表单注入数据
|
||||
setData(data) {
|
||||
Object.assign(this.form,data);
|
||||
},
|
||||
//设置过滤项
|
||||
setFilters(filters) {
|
||||
this.selectionFilters = filters;
|
||||
this.setFiltersVisible = true;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
</style>
|
||||
|
||||
|
|
@ -0,0 +1,189 @@
|
|||
<template>
|
||||
<el-dialog
|
||||
:title="titleMap[mode]"
|
||||
v-model="visible"
|
||||
:size="1000"
|
||||
destroy-on-close
|
||||
@closed="$emit('closed')"
|
||||
>
|
||||
<el-container v-loading="loading">
|
||||
<el-main style="padding: 0 20px 20px 20px">
|
||||
<el-form
|
||||
ref="dialogForm"
|
||||
:model="form"
|
||||
label-width="100px"
|
||||
label-position="right"
|
||||
:rules="rules"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="关联工段" prop="mgroup">
|
||||
<el-input v-model="form.mgroup_name" placeholder="关联工段" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="当班班次">
|
||||
<el-input v-model="form.shift_name" placeholder="当班班次" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="开始时间" prop="start_time">
|
||||
<el-input v-model="form.start_time" placeholder="结束时间" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="结束时间" prop="end_time">
|
||||
<el-input v-model="form.end_time" placeholder="结束时间" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="当班班组" prop="team">
|
||||
<el-input v-model="form.team_name" placeholder="班组班长" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="班组班长" prop="leader_name">
|
||||
<el-input v-model="form.leader_name" placeholder="班组班长" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="检测时间" prop="time">
|
||||
<el-date-picker
|
||||
v-model="form.time"
|
||||
type="datetime"
|
||||
value-format="YYYY-MM-DD HH:mm"
|
||||
format="YYYY-MM-DD HH:mm"
|
||||
placeholder="检测时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24" class="formUnitWrap">
|
||||
<el-form-item label="水耗统计" prop="val">
|
||||
<el-input-number v-model="form.val" :precision="2" controls-position="right" placeholder="水耗统计" style="width: 100%;"></el-input-number>
|
||||
</el-form-item>
|
||||
<span class="formUnit">(t)</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-main>
|
||||
<el-footer>
|
||||
<el-button type="primary" :loading="isSaveing" @click="submit">保存</el-button>
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
</el-footer>
|
||||
</el-container>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
emits: ["success", "closed"],
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
mode: "add",
|
||||
titleMap: {
|
||||
add: "其他能源录入",
|
||||
edit: "其他能源录入",
|
||||
show: "其他能源录入",
|
||||
},
|
||||
form: {
|
||||
type:10,
|
||||
},
|
||||
rules: {
|
||||
val: [{required: true, message: "请输入检测值", trigger: "blur"}],
|
||||
time: [{required: true, message: "请选择检测时间", trigger: "blur"}]
|
||||
},
|
||||
visible: false,
|
||||
isSaveing: false,
|
||||
keeperOptions: [],
|
||||
depOptions: [],
|
||||
selectionFilters: [],
|
||||
setFiltersVisible: false,
|
||||
teamOptions:[],
|
||||
shiftOptions:[],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
//获取班组
|
||||
this.getTeam();
|
||||
this.getShfit();
|
||||
},
|
||||
methods: {
|
||||
getTeam(){
|
||||
this.$API.mtm.team.list.req({page:0}).then(res=>{
|
||||
this.teamOptions = res;
|
||||
})
|
||||
},
|
||||
getShfit(){
|
||||
this.$API.mtm.shift.req({page:0}).then(res=>{
|
||||
this.shiftOptions = res;
|
||||
})
|
||||
},
|
||||
//显示
|
||||
open(mode = "add") {
|
||||
this.mode = mode;
|
||||
this.visible = true;
|
||||
return this;
|
||||
},
|
||||
teamChange(data){
|
||||
let that = this;
|
||||
that.teamOptions.forEach(item=>{
|
||||
if(item.id==data){
|
||||
that.form.leader_name = item.leader_name;
|
||||
that.form.leader= item.leader;
|
||||
}
|
||||
})
|
||||
},
|
||||
//表单提交方法
|
||||
submit() {
|
||||
this.$refs.dialogForm.validate(async (valid) => {
|
||||
if (valid) {
|
||||
this.isSaveing = true;
|
||||
try {
|
||||
let obj={};
|
||||
debugger;
|
||||
obj.year_s = this.form.time.slice(0,4);
|
||||
obj.month_s = this.form.time.slice(5,7);
|
||||
obj.day_s = this.form.time.slice(8,10);
|
||||
obj.hour = this.form.time.slice(11,13);
|
||||
obj.val = this.form.val;
|
||||
obj.sflog = this.form.id;
|
||||
obj.material = '3349350755361792000';
|
||||
obj.mpoint = '3349214860667219968';
|
||||
this.$API.enm.mpoint.statCreate.req(obj).then(res=>{
|
||||
this.isSaveing = false;
|
||||
this.$emit("success", this.form, this.mode);
|
||||
this.visible = false;
|
||||
this.$message.success("操作成功");
|
||||
return res;
|
||||
})
|
||||
} catch (err) {
|
||||
//可以处理校验错误
|
||||
this.isSaveing = false;
|
||||
return err;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
//表单注入数据
|
||||
setData(data) {
|
||||
Object.assign(this.form,data);
|
||||
},
|
||||
//设置过滤项
|
||||
setFilters(filters) {
|
||||
this.selectionFilters = filters;
|
||||
this.setFiltersVisible = true;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.formUnit{
|
||||
position: absolute;
|
||||
right: -17px;
|
||||
top: 7px;
|
||||
}
|
||||
.formUnitWrap{
|
||||
position: relative;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
|
@ -0,0 +1,224 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="exportExcel()"
|
||||
:loading = "exportLoading"
|
||||
>导出xlsx
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="handlePrint"
|
||||
>打印
|
||||
</el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-card style="margin-top:5px">
|
||||
<div ref="print" id="myReport" class="printContainer">
|
||||
<h3 style="text-align: center;">主要设备(100KW以上)单位产品电耗数据表</h3>
|
||||
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable">
|
||||
<thead style="background: #efefef;height: 40px;">
|
||||
<tr>
|
||||
<th>设备名称</th>
|
||||
<th>设备编号</th>
|
||||
<th>单位</th>
|
||||
<th>上个小时</th>
|
||||
<th>昨日</th>
|
||||
<th>本月</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item) in tableDatas" :key="item">
|
||||
<td class="numCell">{{item.name}}</td>
|
||||
<td class="numCell">{{item.number}}</td>
|
||||
<td class="numCell">{{item.unit}}</td>
|
||||
<td class="numCell hoursItem" @click="itemClick('hours',item)" style="background: rgba(238, 179, 179, 0.8);">{{item[0]}}</td>
|
||||
<td class="numCell monthItem" @click="itemClick('month',item)" style="background: rgba(238, 189, 124, 0.8);">{{item[2]}}</td>
|
||||
<td class="numCell yearItem" @click="itemClick1('year',item)" style="background: rgba(186, 236, 135, 0.8);">{{item[3]}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<sc-dialog v-model="chartShow" draggable title="创建/编辑人员证书">
|
||||
<div class="searchHead" v-if="type=='hours'">
|
||||
<el-date-picker
|
||||
v-model="query.start_time"
|
||||
type="date"
|
||||
placeholder="选择时间"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<span class="middleText">至</span>
|
||||
<el-date-picker
|
||||
v-model="query.end_time"
|
||||
type="date"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
start-placeholder="结束日期"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-button type="primary" class="searchBtn" @click="dataSearch">查询</el-button>
|
||||
</div>
|
||||
<div class="searchHead" v-if="type=='days'">
|
||||
<el-date-picker
|
||||
v-model="query.start_time"
|
||||
type="date"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
start-placeholder="开始日期"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-date-picker
|
||||
v-model="query.end_time"
|
||||
type="date"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
start-placeholder="结束日期"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-button type="primary" class="searchBtn" @click="dataSearch">查询</el-button>
|
||||
</div>
|
||||
<div class="searchHead" v-if="type=='month'">
|
||||
<el-date-picker
|
||||
v-model="query.start_time"
|
||||
type="month"
|
||||
format="YYYY-MM"
|
||||
value-format="YYYY-MM"
|
||||
start-placeholder="开始月份"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-date-picker
|
||||
v-model="query.end_time"
|
||||
type="month"
|
||||
format="YYYY-MM"
|
||||
value-format="YYYY-MM"
|
||||
start-placeholder="结束月份"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-button type="primary" class="searchBtn" @click="dataSearch">查询</el-button>
|
||||
</div>
|
||||
<scEcharts height="360px" :option="myOption" v-if="chartShow"></scEcharts>
|
||||
</sc-dialog>
|
||||
<charts
|
||||
v-if="asynDialog"
|
||||
:type="type"
|
||||
:title="title"
|
||||
:modelValue="modelValue"
|
||||
:showClose="showClose"
|
||||
:echartType='echartType'
|
||||
@closed="asynDialog = false"
|
||||
></charts>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import scEcharts from "@/components/scEcharts";
|
||||
import { defineAsyncComponent } from 'vue'
|
||||
export default {
|
||||
components: {
|
||||
scEcharts,
|
||||
charts: defineAsyncComponent(() => import("@/components/scEnm/lineChartsdialog.vue")),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
chartShow: false,
|
||||
myOption: null,
|
||||
timeStamp:0,
|
||||
listQuery:{
|
||||
belong_dept:'',
|
||||
task2__year:'',
|
||||
page:0
|
||||
},
|
||||
query:{
|
||||
time:''
|
||||
},
|
||||
tableName:'主要设备(100KW以上)单位产品电耗数据表',
|
||||
tableDatas:[
|
||||
{name:'高温风机',number:'NM001',unit:'KW·h/t',hours:'1',days:'24',month:'720'},
|
||||
{name:'窑主电机',number:'NM002',unit:'KW·h/t',hours:'1',days:'24',month:'720'},
|
||||
{name:'篦冷机一室风机电机',number:'NM003',unit:'KW·h/t',hours:'1',days:'24',month:'720'},
|
||||
{name:'篦冷机三室风机电机',number:'NM004',unit:'KW·h/t',hours:'1',days:'24',month:'720'},
|
||||
{name:'篦冷机二室风机电机',number:'NM005',unit:'KW·h/t',hours:'1',days:'24',month:'720'},
|
||||
{name:'篦冷机一室充气梁风机(左)电机',number:'NM006',unit:'KW·h/t',hours:'1',days:'24',month:'720'},
|
||||
{name:'篦冷机一室充气梁风机(右)电机',number:'NM006',unit:'KW·h/t',hours:'1',days:'24',month:'720'},
|
||||
{name:'窑头排风机主电机',number:'NM006',unit:'KW·h/t',hours:'1',days:'24',month:'720'},
|
||||
{name:'头煤粉罗茨电机(东、备用)',number:'NM006',unit:'KW·h/t',hours:'1',days:'24',month:'720'},
|
||||
{name:'尾煤粉罗茨电机(西)',number:'NM006',unit:'KW·h/t',hours:'1',days:'24',month:'720'},
|
||||
{name:'空压机3301',number:'NM006',unit:'KW·h/t',hours:'1',days:'24',month:'720'},
|
||||
{name:'空压机3303',number:'NM006',unit:'KW·h/t',hours:'1',days:'24',month:'720'},
|
||||
{name:'空压机3308',number:'NM006',unit:'KW·h/t',hours:'1',days:'24',month:'720'},
|
||||
{name:'空压机3318',number:'NM006',unit:'KW·h/t',hours:'1',days:'24',month:'720'},
|
||||
],
|
||||
modelValue:true,
|
||||
type:'hours',
|
||||
title:'title',
|
||||
apiObj:'',
|
||||
showClose:true,
|
||||
echartType:'line',
|
||||
asynDialog:false,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
|
||||
itemClick(type,item){
|
||||
this.type=type;
|
||||
this.asynDialog = true;
|
||||
},
|
||||
itemClick1(type,item){
|
||||
this.chartShow = false;
|
||||
this.$API.bi.dataset.exec
|
||||
.req('3322567213885833216')
|
||||
.then((res) => {
|
||||
this.myOption = JSON.parse(res.echart_options);
|
||||
debugger;
|
||||
console.log(this.myOption)
|
||||
this.chartShow = true;
|
||||
});
|
||||
},
|
||||
handlePrint() {
|
||||
this.$PRINT('#myReport');
|
||||
},
|
||||
exportExcel() {
|
||||
this.exportLoading = true;
|
||||
this.$XLSX('#myTable', this.tableName)
|
||||
this.exportLoading = false;
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.printContainer{
|
||||
width: 1075px;
|
||||
}
|
||||
#numTable{
|
||||
margin-left: 37px;
|
||||
}
|
||||
#numTable td{
|
||||
height: 32px;
|
||||
padding-left: 5px;
|
||||
}
|
||||
.numCell{
|
||||
width: 80px;
|
||||
height: 35px;
|
||||
}
|
||||
.numCell.numCell_last{
|
||||
width: 100px;
|
||||
}
|
||||
.searchHead{
|
||||
display:flex
|
||||
}
|
||||
.middleText{
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
margin: 0 5px;
|
||||
display: inline-block;
|
||||
}
|
||||
.searchBtn{
|
||||
margin-left: 5px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,253 @@
|
|||
<template>
|
||||
<el-dialog
|
||||
:title="titleMap[mode]"
|
||||
v-model="visible"
|
||||
:size="1000"
|
||||
destroy-on-close
|
||||
id="bigDialog"
|
||||
class="bigDialog"
|
||||
@closed="$emit('closed')"
|
||||
>
|
||||
<el-container v-loading="loading">
|
||||
<el-main style="padding: 0 20px 20px 20px">
|
||||
<el-form
|
||||
ref="dialogForm"
|
||||
:model="form"
|
||||
label-width="85px"
|
||||
label-position="right"
|
||||
:rules="rule1"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="关联工段">
|
||||
<el-input v-model="form.mgroup_name" placeholder="关联工段" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="当前班次">
|
||||
<el-input v-model="form.shift_name" placeholder="当前班次" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="当前班组">
|
||||
<el-input v-model="form.team_name" placeholder="当前班组" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="班组组长">
|
||||
<el-input v-model="form.team_name" placeholder="班组组长" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="开始时间">
|
||||
<el-input v-model="form.start_time" placeholder="开始时间" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="结束时间">
|
||||
<el-input v-model="form.end_time" placeholder="结束时间" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-divider />
|
||||
</el-row>
|
||||
|
||||
<!-- <el-row>
|
||||
<el-col :lg="8" :md="12">
|
||||
<el-form-item label="关联产物" prop="material">
|
||||
<el-select
|
||||
v-model="form.material"
|
||||
placeholder="关联产物"
|
||||
clearable
|
||||
style="width: 100%;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in teamOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :lg="8" :md="12">
|
||||
<el-form-item label="质检项目" prop="testitem">
|
||||
<el-select
|
||||
v-model="form.testitem"
|
||||
placeholder="质检项目"
|
||||
clearable
|
||||
style="width: 100%;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in teamOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :lg="8" :md="12">
|
||||
<el-form-item label="平均值" prop="team">
|
||||
<el-input v-model="form.number" placeholder="平均值" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :lg="8" :md="12">
|
||||
<el-form-item label="检验次数" prop="mgroup">
|
||||
<el-input v-model="form.number" placeholder="检验次数"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :lg="8" :md="12">
|
||||
<el-form-item label="合格次数" prop="number">
|
||||
<el-input v-model="form.number" placeholder="合格次数"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-divider />
|
||||
</el-row> -->
|
||||
</el-form>
|
||||
<sc-form-table
|
||||
v-model="form.list"
|
||||
:addTemplate="addTemplate"
|
||||
placeholder="暂无数据"
|
||||
>
|
||||
<el-table-column prop="material" label="关联产物" min-width="150">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.id">{{ scope.row.material_name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="testitem" label="质检项目" min-width="150">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.id">{{ scope.row.testitem_name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="val_avg" label="平均值" min-width="150">
|
||||
<template #default="scope">
|
||||
<el-input
|
||||
v-model="scope.row.val_avg"
|
||||
placeholder="请输入内容"
|
||||
></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="num_test" label="检验次数" min-width="150">
|
||||
<template #default="scope">
|
||||
<el-input
|
||||
v-model="scope.row.num_test"
|
||||
placeholder="请输入内容"
|
||||
></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="num_ok" label="合格次数" min-width="150">
|
||||
<template #default="scope">
|
||||
<el-input
|
||||
v-model="scope.row.num_ok"
|
||||
placeholder="请输入内容"
|
||||
></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</sc-form-table>
|
||||
</el-main>
|
||||
<el-footer>
|
||||
<el-button type="primary" :loading="isSaveing" @click="submit">保存</el-button>
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
</el-footer>
|
||||
</el-container>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
emits: ["success", "closed"],
|
||||
data() {
|
||||
return {
|
||||
addTemplate: {
|
||||
material: "",
|
||||
testitem: "",
|
||||
val_avg: "",
|
||||
num_test: "",
|
||||
num_ok: "",
|
||||
},
|
||||
loading: false,
|
||||
mode: "add",
|
||||
titleMap: {
|
||||
add: "质量检验",
|
||||
edit: "质量检验",
|
||||
show: "质量检验",
|
||||
},
|
||||
form: {
|
||||
type:10,
|
||||
list:[]
|
||||
},
|
||||
rules: {
|
||||
name: [{required: true, message: "请输入", trigger: "blur"}],
|
||||
number: [{required: true, message: "请输入", trigger: "blur"}],
|
||||
keeper_name: [{required: true, message: "请输入", trigger: "blur"}],
|
||||
belong_dept: [{required: true, message: "请选择", trigger: "blur"}]
|
||||
},
|
||||
visible: false,
|
||||
isSaveing: false,
|
||||
keeperOptions: [],
|
||||
depOptions: [],
|
||||
selectionFilters: [],
|
||||
setFiltersVisible: false,
|
||||
teamOptions:[],
|
||||
shiftOptions:[],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
//是否已经保存过
|
||||
//若新增,调用init接口,若编辑修改,调get接口
|
||||
},
|
||||
methods: {
|
||||
|
||||
//显示
|
||||
open(mode = "add") {
|
||||
this.mode = mode;
|
||||
this.visible = true;
|
||||
return this;
|
||||
},
|
||||
getReceptionist(data) {
|
||||
this.form.leader=data.id;
|
||||
this.form.leader_name=data.name
|
||||
},
|
||||
//表单提交方法
|
||||
submit() {
|
||||
this.isSaveing = true;
|
||||
this.$API.qm.updateQuastat.req('bulk',this.form.list).then(res=>{
|
||||
this.isSaveing = false;
|
||||
this.$emit("success", this.form, this.mode);
|
||||
this.visible = false;
|
||||
this.$message.success("操作成功");
|
||||
}).catch(res=>{
|
||||
this.isSaveing = false;
|
||||
})
|
||||
// this.$refs.dialogForm.validate(async (valid) => {
|
||||
// if (valid) {
|
||||
|
||||
// }
|
||||
// });
|
||||
},
|
||||
//表单注入数据
|
||||
setData(data) {
|
||||
Object.assign(this.form,data);
|
||||
this.getsflogItem(this.form.id);
|
||||
},
|
||||
getsflogItem(id){
|
||||
this.$API.wpm.sflog.init_test.req(id).then(res=>{
|
||||
this.form.list = res;
|
||||
})
|
||||
},
|
||||
//设置过滤项
|
||||
setFilters(filters) {
|
||||
this.selectionFilters = filters;
|
||||
this.setFiltersVisible = true;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
#bigDialog{
|
||||
width: 90%;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
|
@ -0,0 +1,247 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="exportExcel()"
|
||||
:loading = "exportLoading"
|
||||
>导出xlsx
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="handlePrint"
|
||||
>打印
|
||||
</el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-card style="margin-top:5px">
|
||||
<div ref="print" id="myReport" class="printContainer">
|
||||
<h3 style="text-align: center;">生产报告</h3>
|
||||
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable">
|
||||
<thead style="background: #efefef;height: 40px;">
|
||||
<tr>
|
||||
<th colspan="2">参数</th>
|
||||
<th>上个小时</th>
|
||||
<th>昨日</th>
|
||||
<th>本月</th>
|
||||
<th>本年</th>
|
||||
<th>月目标值</th>
|
||||
<th>月完成度</th>
|
||||
<th>年目标值</th>
|
||||
<th>年完成度</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item,index) in tableDatas" :key="index">
|
||||
<td class="numCell" v-if="index==0||index==2" rowspan="2">{{ item[0] }}</td>
|
||||
<td class="numCell" v-else-if="index==4" rowspan="4">{{ item[0] }}</td>
|
||||
<td class="numCell" v-else-if="index==8">{{ item[0] }}</td>
|
||||
<td class="numCell">{{item[1]}}</td>
|
||||
<td class="numCell hoursItem" @click="itemClick('hours',item)" style="background: rgba(238, 179, 179, 0.8);">{{item[2]}}</td>
|
||||
<td class="numCell daysItem" @click="itemClick('days',item)" style="background: rgba(239, 90, 90, 0.8);">{{item[3]}}</td>
|
||||
<td class="numCell monthItem" @click="itemClick('month',item)" style="background: rgba(238, 189, 124, 0.8);">{{item[4]}}</td>
|
||||
<td class="numCell yearItem" @click="itemClick1('year',item)" style="background: rgba(186, 236, 135, 0.8);">{{item[5]}}</td>
|
||||
<td class="numCell">{{item[6]}}</td>
|
||||
<td class="numCell">{{item[7]}}</td>
|
||||
<td class="numCell">{{item[8]}}</td>
|
||||
<td class="numCell">{{item[9]}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<sc-dialog v-model="chartShow" draggable title="回转窑工段">
|
||||
<div class="searchHead" v-if="type=='hours'">
|
||||
<el-date-picker
|
||||
v-model="query.start_time"
|
||||
type="date"
|
||||
placeholder="选择时间"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<span class="middleText">至</span>
|
||||
<el-date-picker
|
||||
v-model="query.end_time"
|
||||
type="date"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
start-placeholder="结束日期"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-button type="primary" class="searchBtn" @click="dataSearch">查询</el-button>
|
||||
</div>
|
||||
<div class="searchHead" v-if="type=='days'">
|
||||
<el-date-picker
|
||||
v-model="query.start_time"
|
||||
type="date"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
start-placeholder="开始日期"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-date-picker
|
||||
v-model="query.end_time"
|
||||
type="date"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
start-placeholder="结束日期"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-button type="primary" class="searchBtn" @click="dataSearch">查询</el-button>
|
||||
</div>
|
||||
<div class="searchHead" v-if="type=='month'">
|
||||
<el-date-picker
|
||||
v-model="query.start_time"
|
||||
type="month"
|
||||
format="YYYY-MM"
|
||||
value-format="YYYY-MM"
|
||||
start-placeholder="开始月份"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-date-picker
|
||||
v-model="query.end_time"
|
||||
type="month"
|
||||
format="YYYY-MM"
|
||||
value-format="YYYY-MM"
|
||||
start-placeholder="结束月份"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-button type="primary" class="searchBtn" @click="dataSearch">查询</el-button>
|
||||
</div>
|
||||
<div class="searchHead" v-if="type=='year'">
|
||||
<el-date-picker
|
||||
v-model="query.start_time"
|
||||
type="year"
|
||||
format="YYYY"
|
||||
value-format="YYYY"
|
||||
start-placeholder="开始日期"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-date-picker
|
||||
v-model="query.end_time"
|
||||
type="year"
|
||||
format="YYYY"
|
||||
value-format="YYYY"
|
||||
start-placeholder="结束日期"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-button type="primary" class="searchBtn" @click="dataSearch">查询</el-button>
|
||||
</div>
|
||||
<scEcharts height="360px" :option="myOption" v-if="chartShow"></scEcharts>
|
||||
</sc-dialog>
|
||||
<charts
|
||||
v-if="asynDialog"
|
||||
:type="type"
|
||||
:title="title"
|
||||
:modelValue="modelValue"
|
||||
:showClose="showClose"
|
||||
:echartType='echartType'
|
||||
@closed="asynDialog = false"
|
||||
></charts>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import scEcharts from "@/components/scEcharts";
|
||||
import { defineAsyncComponent } from 'vue'
|
||||
export default {
|
||||
components: {
|
||||
scEcharts,
|
||||
charts: defineAsyncComponent(() => import("@/components/scEnm/lineChartsdialog.vue")),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
chartShow: false,
|
||||
myOption: null,
|
||||
timeStamp:0,
|
||||
listQuery:{
|
||||
belong_dept:'',
|
||||
task2__year:'',
|
||||
page:0
|
||||
},
|
||||
query:{
|
||||
time:''
|
||||
},
|
||||
tableDatas:[
|
||||
['产量','总产量(t)',0,0,0,0,0,0,0,0],
|
||||
['产量','台时产量(t/h)',0,0,0,0,0,0,0,0],
|
||||
['运转时间','运转时间(h)',0,0,0,0,0,0,0,0],
|
||||
['运转时间','运转率(%)',0,0,0,0,0,0,0,0],
|
||||
['能耗','单位产品分布电耗(KW·h/t)',1,1,1,1,1,1,1,1],
|
||||
['能耗','单位产品综合电耗(KW·h/t)',1,1,1,1,1,1,1,1],
|
||||
['能耗','单位产品标煤耗(kgce/t)',1,1,1,1,1,1,1,1],
|
||||
['能耗','单位产品综合能耗(kgce/t)',1,1,1,1,1,1,1,1],
|
||||
['成本','电石渣成本(元/吨)',2,2,2,2,2,2,2,2],
|
||||
],
|
||||
tableName:'生产报告',
|
||||
modelValue:true,
|
||||
type:'hours',
|
||||
title:'回转窑工段',
|
||||
apiObj:'',
|
||||
showClose:true,
|
||||
echartType:'line',
|
||||
asynDialog:false,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
|
||||
itemClick(type,item){
|
||||
this.type=type;
|
||||
this.asynDialog = true;
|
||||
},
|
||||
itemClick1(type,item){
|
||||
this.chartShow = false;
|
||||
this.$API.bi.dataset.exec
|
||||
.req('3322567213885833216')
|
||||
.then((res) => {
|
||||
this.myOption = JSON.parse(res.echart_options);
|
||||
debugger;
|
||||
console.log(this.myOption)
|
||||
this.chartShow = true;
|
||||
});
|
||||
},
|
||||
handlePrint() {
|
||||
this.$PRINT('#myReport');
|
||||
},
|
||||
exportExcel() {
|
||||
this.exportLoading = true;
|
||||
this.$XLSX('#myTable', this.tableName)
|
||||
this.exportLoading = false;
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.printContainer{
|
||||
width: 1075px;
|
||||
}
|
||||
#numTable{
|
||||
margin-left: 37px;
|
||||
}
|
||||
#numTable td{
|
||||
height: 32px;
|
||||
padding-left: 5px;
|
||||
}
|
||||
.numCell{
|
||||
width: 80px;
|
||||
height: 35px;
|
||||
}
|
||||
.numCell.numCell_last{
|
||||
width: 100px;
|
||||
}
|
||||
.searchHead{
|
||||
display:flex
|
||||
}
|
||||
.middleText{
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
margin: 0 5px;
|
||||
display: inline-block;
|
||||
}
|
||||
.searchBtn{
|
||||
margin-left: 5px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,208 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-date-picker
|
||||
v-model="query.time"
|
||||
type="month"
|
||||
value-format="YYYY-MM"
|
||||
format="YYYY-MM"
|
||||
placeholder="基础月份"
|
||||
/>
|
||||
<el-date-picker
|
||||
v-model="query.time2"
|
||||
type="month"
|
||||
value-format="YYYY-MM"
|
||||
format="YYYY-MM"
|
||||
placeholder="对比月份"
|
||||
/>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="handleQuery"
|
||||
></el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="exportExcel()"
|
||||
:loading = "exportLoading"
|
||||
>导出xlsx
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="handlePrint"
|
||||
>打印
|
||||
</el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-card style="margin-top:5px">
|
||||
<div ref="print" id="myReport" class="printContainer">
|
||||
<h3 style="text-align: center;">主要设备(100KW以上)单位产品电耗数据表</h3>
|
||||
<table border="1" cellspacing="0" :key="timeStamp" id="myTable">
|
||||
<thead style="background: #efefef;height: 40px;">
|
||||
<tr>
|
||||
<th rowspan="2">月份</th>
|
||||
<th rowspan="2">班组</th>
|
||||
<th colspan="2">产量</th>
|
||||
<th>运转率</th>
|
||||
<th>成本</th>
|
||||
<th colspan="8">质量</th>
|
||||
<th colspan="19">产品单位能耗</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>总产量(t)</th>
|
||||
<th>台时产量(t/h)</th>
|
||||
<th>运转率(%)</th>
|
||||
<th>单位产品成本(元/吨)</th>
|
||||
<th>CaO(%)</th>
|
||||
<th>Fe₂O₃(%)</th>
|
||||
<th>细度(%)</th>
|
||||
<th>水分(%)</th>
|
||||
<th>立升重(%)</th>
|
||||
<th>f-CaO(%)</th>
|
||||
<th>细度(%)</th>
|
||||
<th>水分(%)</th>
|
||||
<th>高温风机单位产品标煤耗(kgce/t)</th>
|
||||
<th>篦冷机一室风机电机单位产品标煤耗(kgce/t)</th>
|
||||
<th>篦冷机三室风机电机单位产品标煤耗(kgce/t)</th>
|
||||
<th>篦冷机二室风机电机单位产品标煤耗(kgce/t)</th>
|
||||
<th>窑头排风机主电机单位产品标煤耗(kgce/t)</th>
|
||||
<th>当期单位产品标煤耗(kgce/t))</th>
|
||||
<th>单位产品标煤耗目标值(kgce/t)</th>
|
||||
<th>当期单位产品标煤耗与目标差值(kgce/t)</th>
|
||||
<th>环期单位产品标煤耗(kgce/t)</th>
|
||||
<th>当期单位产品标煤耗与环期差值(kgce/t)</th>
|
||||
<th>单位产品标煤耗环比增长率(%)</th>
|
||||
<th>单位产品标煤耗同比增长率(%)</th>
|
||||
<th>当期单位产品电耗(kW·h/h)</th>
|
||||
<th>单位产品电耗目标值(kW·h/h)</th>
|
||||
<th>当期单位产品电耗与目标值差值(kW·h/h)</th>
|
||||
<th>环期单位产品电耗(kW·h/h)</th>
|
||||
<th>当期单位产品电耗与环期差值(kW·h/h)</th>
|
||||
<th>当期单位产品电耗环比增长率(%)</th>
|
||||
<th>同比增长率(%)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr v-for="(item,index) in tableDatas" :key="index">
|
||||
<td v-if="index%3==0" rowspan="3" style="width:50px">{{item.month}}</td>
|
||||
<td class="numCell">{{item.name}}</td>
|
||||
<td class="numCell">{{item.number}}</td>
|
||||
<td class="numCell">{{item.unit}}</td>
|
||||
<td class="numCell">{{item.hours}}</td>
|
||||
<td class="numCell">{{item.days}}</td>
|
||||
<td class="numCell">{{item.months}}</td>
|
||||
<td class="numCell">{{item.hours}}</td>
|
||||
<td class="numCell">{{item.days}}</td>
|
||||
<td class="numCell">{{item.months}}</td>
|
||||
<td class="numCell">{{item.hours}}</td>
|
||||
<td class="numCell">{{item.days}}</td>
|
||||
<td class="numCell">{{item.months}}</td>
|
||||
<td class="numCell">{{item.months}}</td>
|
||||
<td class="numCell">{{item.hours}}</td>
|
||||
<td class="numCell">{{item.days}}</td>
|
||||
<td class="numCell">{{item.months}}</td>
|
||||
<td class="numCell">{{item.hours}}</td>
|
||||
<td class="numCell">{{item.days}}</td>
|
||||
<td class="numCell">{{item.months}}</td>
|
||||
<td class="numCell">{{item.hours}}</td>
|
||||
<td class="numCell">{{item.days}}</td>
|
||||
<td class="numCell">{{item.months}}</td>
|
||||
<td class="numCell">{{item.hours}}</td>
|
||||
<td class="numCell">{{item.days}}</td>
|
||||
<td class="numCell">{{item.months}}</td>
|
||||
<td class="numCell">{{item.months}}</td>
|
||||
<td class="numCell">{{item.hours}}</td>
|
||||
<td class="numCell">{{item.days}}</td>
|
||||
<td class="numCell">{{item.months}}</td>
|
||||
<td class="numCell">{{item.hours}}</td>
|
||||
<td class="numCell">{{item.days}}</td>
|
||||
<td class="numCell">{{item.months}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
timeStamp:0,
|
||||
listQuery:{
|
||||
belong_dept:'',
|
||||
task2__year:'',
|
||||
page:0
|
||||
},
|
||||
query:{
|
||||
time:'',
|
||||
time2:'',
|
||||
},
|
||||
tableDatas:[
|
||||
{month:'2023.1',name:'甲组',number:'NM001',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
{month:'2023.1',name:'乙组',number:'NM002',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
{month:'2023.1',name:'丙组',number:'NM003',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
{month:'2023.2',name:'甲组',number:'NM004',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
{month:'2023.2',name:'乙组',number:'NM005',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
{month:'2023.2',name:'丙组',number:'NM006',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
|
||||
itemClick(type,item){
|
||||
this.type=type;
|
||||
this.asynDialog = true;
|
||||
},
|
||||
itemClick1(type,item){
|
||||
this.chartShow = false;
|
||||
this.$API.bi.dataset.exec
|
||||
.req('3322567213885833216')
|
||||
.then((res) => {
|
||||
this.myOption = JSON.parse(res.echart_options);
|
||||
debugger;
|
||||
console.log(this.myOption)
|
||||
this.chartShow = true;
|
||||
});
|
||||
},
|
||||
handlePrint() {
|
||||
this.$PRINT('#myReport');
|
||||
},
|
||||
exportExcel() {
|
||||
this.exportLoading = true;
|
||||
this.$XLSX('#myTable', this.tableName)
|
||||
this.exportLoading = false;
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.printContainer{
|
||||
width: 1075px;
|
||||
}
|
||||
#numTable{
|
||||
margin-left: 37px;
|
||||
}
|
||||
#numTable td{
|
||||
height: 32px;
|
||||
padding-left: 5px;
|
||||
}
|
||||
.numCell{
|
||||
width: 80px;
|
||||
}
|
||||
.numCell.numCell_last{
|
||||
width: 100px;
|
||||
}
|
||||
.searchHead{
|
||||
display:flex
|
||||
}
|
||||
.middleText{
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
margin: 0 5px;
|
||||
display: inline-block;
|
||||
}
|
||||
.searchBtn{
|
||||
margin-left: 5px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,267 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-date-picker
|
||||
v-model="monthrange"
|
||||
type="monthrange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始月份"
|
||||
end-placeholder="结束月份"
|
||||
value-format="YYYY-MM"
|
||||
format="YYYY-MM"
|
||||
/>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="handleQuery"
|
||||
></el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="exportExcel()"
|
||||
:loading = "exportLoading"
|
||||
>导出xlsx
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="handlePrint"
|
||||
>打印
|
||||
</el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-card style="margin-top:5px">
|
||||
<div ref="print" id="myReport" class="printContainer">
|
||||
<h3 style="text-align: center;">车间单位产品电耗月度分析表</h3>
|
||||
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable">
|
||||
<thead style="background: #efefef;height: 80px;">
|
||||
<tr>
|
||||
<th colspan="8">车间单位产品电耗月度分析表</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>月份</th>
|
||||
<th>当期值(KW·h/t)</th>
|
||||
<th>目标值(KW·h/t)</th>
|
||||
<th>当期与目标差值(KW·h/t)</th>
|
||||
<th>环期值(KW·h/t)</th>
|
||||
<th>当期与环期差值(KW·h/t)</th>
|
||||
<th>环比增长率(%)</th>
|
||||
<th>同比增长率(%)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item) in tableDatas" :key="item">
|
||||
<td class="numCell">{{item.month}}</td>
|
||||
<td class="numCell">{{item.value1}}</td>
|
||||
<td class="numCell">{{item.value2}}</td>
|
||||
<td class="numCell">{{item.value3}}</td>
|
||||
<td class="numCell">{{item.value4}}</td>
|
||||
<td class="numCell">{{item.value5}}</td>
|
||||
<td class="numCell">{{item.value6}}</td>
|
||||
<td class="numCell">{{item.value7}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3 style="text-align: center;"> 车间单位产品综合电耗月度分析表</h3>
|
||||
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable1">
|
||||
<thead style="background: #efefef;height: 120px;">
|
||||
<tr>
|
||||
<th colspan="9">车间单位产品综合电耗月度分析表</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="2">月份</th>
|
||||
<th rowspan="2">当期值(KW·h/t)</th>
|
||||
<th rowspan="2">目标值(KW·h/t)</th>
|
||||
<th colspan="3">国家标准(KW·h/t)</th>
|
||||
<th rowspan="2">当期与环期差值(KW·h/t)</th>
|
||||
<th rowspan="2">环比增长率(%)</th>
|
||||
<th rowspan="2">同比增长率(%)</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>1级</th>
|
||||
<th>2级</th>
|
||||
<th>3级</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item) in tableDatas" :key="item">
|
||||
<td class="numCell">{{item.month}}</td>
|
||||
<td class="numCell">{{item.value1}}</td>
|
||||
<td class="numCell">{{item.value2}}</td>
|
||||
<td class="numCell">{{item.value3}}</td>
|
||||
<td class="numCell">{{item.value4}}</td>
|
||||
<td class="numCell">{{item.value5}}</td>
|
||||
<td class="numCell">{{item.value6}}</td>
|
||||
<td class="numCell">{{item.value7}}</td>
|
||||
<td class="numCell">{{item.value7}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3 style="text-align: center;"> 车间单位产品标煤耗月度分析表</h3>
|
||||
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable1">
|
||||
<thead style="background: #efefef;height: 120px;">
|
||||
<tr>
|
||||
<th colspan="9">车间单位产品标煤耗月度分析表</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="2">月份</th>
|
||||
<th rowspan="2">当期值(KW·h/t)</th>
|
||||
<th rowspan="2">目标值(KW·h/t)</th>
|
||||
<th colspan="3">国家标准(KW·h/t)</th>
|
||||
<th rowspan="2">当期与环期差值(KW·h/t)</th>
|
||||
<th rowspan="2">环比增长率(%)</th>
|
||||
<th rowspan="2">同比增长率(%)</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>1级</th>
|
||||
<th>2级</th>
|
||||
<th>3级</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item) in tableDatas" :key="item">
|
||||
<td class="numCell">{{item.month}}</td>
|
||||
<td class="numCell">{{item.value1}}</td>
|
||||
<td class="numCell">{{item.value2}}</td>
|
||||
<td class="numCell">{{item.value3}}</td>
|
||||
<td class="numCell">{{item.value4}}</td>
|
||||
<td class="numCell">{{item.value5}}</td>
|
||||
<td class="numCell">{{item.value6}}</td>
|
||||
<td class="numCell">{{item.value7}}</td>
|
||||
<td class="numCell">{{item.value7}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3 style="text-align: center;"> 车间单位产品综合能耗月度分析表</h3>
|
||||
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable1">
|
||||
<thead style="background: #efefef;height: 120px;">
|
||||
<tr>
|
||||
<th colspan="9">车间单位产品综合能耗月度分析表</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="2">月份</th>
|
||||
<th rowspan="2">当期值(KW·h/t)</th>
|
||||
<th rowspan="2">目标值(KW·h/t)</th>
|
||||
<th colspan="3">国家标准(KW·h/t)</th>
|
||||
<th rowspan="2">当期与环期差值(KW·h/t)</th>
|
||||
<th rowspan="2">环比增长率(%)</th>
|
||||
<th rowspan="2">同比增长率(%)</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>1级</th>
|
||||
<th>2级</th>
|
||||
<th>3级</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item) in tableDatas" :key="item">
|
||||
<td class="numCell">{{item.month}}</td>
|
||||
<td class="numCell">{{item.value1}}</td>
|
||||
<td class="numCell">{{item.value2}}</td>
|
||||
<td class="numCell">{{item.value3}}</td>
|
||||
<td class="numCell">{{item.value4}}</td>
|
||||
<td class="numCell">{{item.value5}}</td>
|
||||
<td class="numCell">{{item.value6}}</td>
|
||||
<td class="numCell">{{item.value7}}</td>
|
||||
<td class="numCell">{{item.value7}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import scEcharts from "@/components/scEcharts";
|
||||
import { defineAsyncComponent } from 'vue'
|
||||
export default {
|
||||
components: {
|
||||
scEcharts,
|
||||
charts: defineAsyncComponent(() => import("@/components/scEnm/lineChartsdialog.vue")),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
chartShow: false,
|
||||
myOption: null,
|
||||
timeStamp:0,
|
||||
listQuery:{
|
||||
belong_dept:'',
|
||||
task2__year:'',
|
||||
page:0
|
||||
},
|
||||
query:{
|
||||
time:''
|
||||
},
|
||||
tableDatas:[
|
||||
{month:'2023-05',value1:'1203',value2:'1200',value3:'3',value4:'1150',value5:'50',value6:'0.4',value7:'0.4'},
|
||||
{month:'2023-06',value1:'1203',value2:'1200',value3:'3',value4:'1150',value5:'50',value6:'0.4',value7:'0.4'},
|
||||
{month:'2023-07',value1:'1203',value2:'1200',value3:'3',value4:'1150',value5:'50',value6:'0.4',value7:'0.4'},
|
||||
],
|
||||
modelValue:true,
|
||||
type:'hours',
|
||||
title:'title',
|
||||
apiObj:'',
|
||||
showClose:true,
|
||||
echartType:'line',
|
||||
asynDialog:false,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
|
||||
itemClick(type,item){
|
||||
this.type=type;
|
||||
this.asynDialog = true;
|
||||
},
|
||||
itemClick1(type,item){
|
||||
this.chartShow = false;
|
||||
this.$API.bi.dataset.exec
|
||||
.req('3322567213885833216')
|
||||
.then((res) => {
|
||||
this.myOption = JSON.parse(res.echart_options);
|
||||
debugger;
|
||||
console.log(this.myOption)
|
||||
this.chartShow = true;
|
||||
});
|
||||
},
|
||||
handlePrint() {
|
||||
this.$PRINT('#myReport');
|
||||
},
|
||||
exportExcel() {
|
||||
this.exportLoading = true;
|
||||
this.$XLSX('#myTable', this.tableName)
|
||||
this.exportLoading = false;
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.printContainer{
|
||||
width: 1075px;
|
||||
}
|
||||
#numTable{
|
||||
margin-left: 37px;
|
||||
}
|
||||
#numTable td{
|
||||
height: 32px;
|
||||
padding-left: 5px;
|
||||
}
|
||||
.numCell{
|
||||
width: 80px;
|
||||
}
|
||||
.numCell.numCell_last{
|
||||
width: 100px;
|
||||
}
|
||||
.searchHead{
|
||||
display:flex
|
||||
}
|
||||
.middleText{
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
margin: 0 5px;
|
||||
display: inline-block;
|
||||
}
|
||||
.searchBtn{
|
||||
margin-left: 5px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,321 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<div style="margin-right: 20px">交接班日志</div>
|
||||
<el-date-picker
|
||||
v-model="query.time"
|
||||
type="date"
|
||||
value-format="YYYY-MM-DD"
|
||||
format="YYYY-MM-DD"
|
||||
placeholder="日志时间"
|
||||
/>
|
||||
<el-select
|
||||
v-model="query.shift"
|
||||
placeholder="班次"
|
||||
clearable
|
||||
style="margin-left: 2px; width: 120px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in optionsShift"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
<el-select
|
||||
v-model="query.team"
|
||||
placeholder="班组"
|
||||
clearable
|
||||
style="margin-left: 2px; width: 120px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></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" width="80"></el-table-column>
|
||||
<el-table-column label="当前班次" prop="shift_name" width="80"></el-table-column>
|
||||
<el-table-column label="班长" prop="leader_name" width="80"></el-table-column>
|
||||
|
||||
<el-table-column label="检验时间">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.last_test_time">{{ scope.row.last_test_time.slice(0,16)}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" width="140">
|
||||
<template #default="scope">
|
||||
<el-button link size="small" @click="sflog_edit(scope.row)" type="primary">编辑</el-button>
|
||||
<el-button link size="small" @click="sflog_check(scope.row)" type="primary">质量检验</el-button>
|
||||
<el-button link size="small" @click="sflog_other(scope.row)" type="primary">其他能源</el-button>
|
||||
<el-button link size="small" @click="sflog_export(scope.row)" type="success">报表</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-main>
|
||||
<el-drawer v-model="limitedExport" size="60%" :show-close="false">
|
||||
<template #header="{ close, titleId, titleClass }">
|
||||
<h4 :id="titleId" :class="titleClass">交接班日志</h4>
|
||||
<el-button type="danger" @click="close">
|
||||
<el-icon class="el-icon--left"><CircleCloseFilled /></el-icon>
|
||||
关闭
|
||||
</el-button>
|
||||
</template>
|
||||
<el-main class="nopadding">
|
||||
<div ref="print" id="myReport" class="printContainer">
|
||||
<div style="margin-right: 20px;text-align: center;font-size: 16px;font-weight: bold;margin-bottom: 20px;">
|
||||
<span v-if="sflogItem.end_time">{{sflogItem.end_time.slice(0,10)}}{{ sflogItem.shift_name }}</span>
|
||||
<span v-if="sflogItem.team_name">{{ sflogItem.team_name }}</span>
|
||||
交接班记录
|
||||
</div>
|
||||
<h3 style="text-align: center;display: flex;justify-content: space-around;">
|
||||
<span>2023.06.21</span>
|
||||
<span>白班</span>
|
||||
<span>甲班</span>
|
||||
</h3>
|
||||
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="numCell">产量(t)</td>
|
||||
<td class="numCell">{{value1}}</td>
|
||||
<td class="numCell">台时(t/h)</td>
|
||||
<td class="numCell">{{value3}}</td>
|
||||
<td class="numCell">运转时间(h)</td>
|
||||
<td class="numCell">{{value5}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="numCell">运转率(%)</td>
|
||||
<td class="numCell">{{value1}}</td>
|
||||
<td class="numCell">停机时长(h)</td>
|
||||
<td class="numCell">{{value3}}</td>
|
||||
<td class="numCell">煤磨分布电耗(KW·h/t)</td>
|
||||
<td class="numCell">{{value5}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="numCell">煤粉细度合格率(%)</td>
|
||||
<td class="numCell">{{value1}}</td>
|
||||
<td class="numCell">煤粉水分合格率(%)</td>
|
||||
<td class="numCell">{{value5}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="numCell">生产情况记录</td>
|
||||
<td class="numCell" colspan="5">时间、类别、原因、处置措施、处置人</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</el-main>
|
||||
</el-drawer>
|
||||
</el-container>
|
||||
<save-dialog
|
||||
v-if="dialog.save"
|
||||
ref="saveDialog"
|
||||
@success="handleSaveSuccess"
|
||||
@closed="dialog.save = false"
|
||||
></save-dialog>
|
||||
<other-dialog
|
||||
v-if="dialog.other"
|
||||
ref="otherDialog"
|
||||
@success="handleOtherSuccess"
|
||||
@closed="dialog.other = false"
|
||||
></other-dialog>
|
||||
<quastat-dialog
|
||||
v-if="dialog.check"
|
||||
ref="checkDialog"
|
||||
@success="handleCheckSuccess"
|
||||
@closed="dialog.save = false"
|
||||
></quastat-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import saveDialog from "./handover_form.vue";
|
||||
import quastatDialog from "./quastat_form.vue";
|
||||
import otherDialog from "./other_form.vue";
|
||||
export default {
|
||||
name: "listSon",
|
||||
components: {
|
||||
saveDialog,
|
||||
otherDialog,
|
||||
quastatDialog
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
apiObj: this.$API.wpm.sflog.list,
|
||||
apiObj2: null,
|
||||
query: {
|
||||
mgroup:'3347217651339837440',
|
||||
},
|
||||
query2: {},
|
||||
dialog: {
|
||||
save: false,
|
||||
check: false,
|
||||
other:false,
|
||||
},
|
||||
sflogItem:{},
|
||||
selection: [],
|
||||
value1:1,
|
||||
value3:3,
|
||||
value5:5,
|
||||
modelValue:true,
|
||||
showClose:true,
|
||||
echartType:'line',
|
||||
asynDialog:false,
|
||||
options:[],
|
||||
optionsShift:[],
|
||||
limitedExport:false,
|
||||
};
|
||||
},
|
||||
|
||||
methods: {
|
||||
sflog_export(){
|
||||
this.limitedExport = true;
|
||||
},
|
||||
rowClick(row) {
|
||||
this.sflogId = row.id;
|
||||
this.sflogItem = row;
|
||||
// this.$refs.table2.queryData({post: row.id});
|
||||
},
|
||||
//编辑
|
||||
sflog_edit(row) {
|
||||
this.dialog.save = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.saveDialog.open("edit").setData(row);
|
||||
});
|
||||
},
|
||||
//质量检验
|
||||
sflog_check(row){
|
||||
this.dialog.check = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.checkDialog.open("edit").setData(row);
|
||||
});
|
||||
},
|
||||
//其他能源物料
|
||||
sflog_other(row){
|
||||
this.dialog.other = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.otherDialog.open("edit").setData(row);
|
||||
});
|
||||
},
|
||||
// //查看
|
||||
// table_show(row) {
|
||||
// this.dialog.save = true;
|
||||
// this.$nextTick(() => {
|
||||
// this.$refs.checkDialog.open("edit").setData(row);
|
||||
// });
|
||||
// },
|
||||
//删除
|
||||
async table_del(row) {
|
||||
this.$API.wpm.sflog.delete.req(row.id)
|
||||
.then((res) => {
|
||||
this.$message.success("删除成功");
|
||||
return res;
|
||||
})
|
||||
.catch((err) => {
|
||||
return err;
|
||||
});
|
||||
},
|
||||
//新增岗位后更新数据
|
||||
handleSaveSuccess(data, mode) {
|
||||
this.$refs.table.refresh()
|
||||
this.dialog.save = false;
|
||||
},
|
||||
handleOtherSuccess(){
|
||||
this.dialog.other = false;
|
||||
},
|
||||
handleCheckSuccess(){
|
||||
this.dialog.check = false;
|
||||
},
|
||||
closed() {
|
||||
this.dialog.save = false;
|
||||
this.$refs.table2.refresh();
|
||||
},
|
||||
handleDel(row) {
|
||||
this.$confirm(`确定删除选中的记录吗?`, "提示", {
|
||||
type: "warning",
|
||||
}).then(() => {
|
||||
this.$API.wpm.shift.delete.req(row.id).then((res) => {
|
||||
if (res.err_msg) {
|
||||
this.$message.error(res.err_msg);
|
||||
} else {
|
||||
// const loading = this.$loading();
|
||||
// this.$refs.table2.refresh();
|
||||
// loading.close();
|
||||
// this.$message.success("操作成功");
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
handlePrint() {
|
||||
this.$PRINT('#myReport');
|
||||
},
|
||||
exportExcel() {
|
||||
this.exportLoading = true;
|
||||
this.$XLSX('#myTable', this.tableName)
|
||||
this.exportLoading = false;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.printContainer{
|
||||
width: 1075px;
|
||||
}
|
||||
#numTable{
|
||||
margin-left: 37px;
|
||||
}
|
||||
#numTable td{
|
||||
height: 32px;
|
||||
padding-left: 5px;
|
||||
}
|
||||
.numCell{
|
||||
width: 80px;
|
||||
}
|
||||
.numCell.numCell_last{
|
||||
width: 100px;
|
||||
}
|
||||
.searchHead{
|
||||
display:flex
|
||||
}
|
||||
.middleText{
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
margin: 0 5px;
|
||||
display: inline-block;
|
||||
}
|
||||
.searchBtn{
|
||||
margin-left: 5px;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
|
@ -0,0 +1,198 @@
|
|||
<template>
|
||||
<el-dialog
|
||||
:title="titleMap[mode]"
|
||||
v-model="visible"
|
||||
:size="1000"
|
||||
destroy-on-close
|
||||
@closed="$emit('closed')"
|
||||
>
|
||||
<el-container v-loading="loading">
|
||||
<el-main style="padding: 0 20px 20px 20px">
|
||||
<el-form
|
||||
ref="dialogForm"
|
||||
:model="form"
|
||||
label-width="100px"
|
||||
label-position="right"
|
||||
:rules="rule1"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="关联工段" prop="mgroup">
|
||||
<el-input v-model="form.mgroup_name" placeholder="关联工段" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="当班班次" prop="shift">
|
||||
<el-input v-model="form.shift_name" placeholder="当班班次" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="开始时间" prop="start_time">
|
||||
<el-date-picker
|
||||
disabled
|
||||
v-model="form.start_time"
|
||||
type="datetime"
|
||||
format="YYYY-MM-DD HH:mm"
|
||||
placeholder="基础月份"
|
||||
style="width: 100%;"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="结束时间" prop="end_time">
|
||||
<el-date-picker
|
||||
disabled
|
||||
v-model="form.end_time"
|
||||
type="datetime"
|
||||
format="YYYY-MM-DD HH:mm"
|
||||
placeholder="对比月份"
|
||||
style="width: 100%;"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="当班班组" prop="team">
|
||||
<el-select
|
||||
v-model="form.team"
|
||||
placeholder="当班班组"
|
||||
clearable
|
||||
style="width: 100%;"
|
||||
@change="teamChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in teamOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="班组班长" prop="leader_name">
|
||||
<el-input v-model="form.leader_name" placeholder="班组班长" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col>
|
||||
<el-form-item label="生产情况记录">
|
||||
<el-input
|
||||
type="textarea"
|
||||
:rows="4"
|
||||
v-model="form.note"
|
||||
placeholder="生产情况记录"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-main>
|
||||
<el-footer>
|
||||
<el-button type="primary" :loading="isSaveing" @click="submit">保存</el-button>
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
</el-footer>
|
||||
</el-container>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
emits: ["success", "closed"],
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
mode: "add",
|
||||
titleMap: {
|
||||
add: "交接班日志",
|
||||
edit: "交接班日志",
|
||||
show: "查看交接班日志",
|
||||
},
|
||||
form: {
|
||||
type:10,
|
||||
},
|
||||
rules: {
|
||||
name: [{required: true, message: "请输入", trigger: "blur"}],
|
||||
number: [{required: true, message: "请输入", trigger: "blur"}],
|
||||
keeper_name: [{required: true, message: "请输入", trigger: "blur"}],
|
||||
belong_dept: [{required: true, message: "请选择", trigger: "blur"}]
|
||||
},
|
||||
visible: false,
|
||||
isSaveing: false,
|
||||
keeperOptions: [],
|
||||
depOptions: [],
|
||||
selectionFilters: [],
|
||||
setFiltersVisible: false,
|
||||
teamOptions:[],
|
||||
shiftOptions:[],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
//获取班组
|
||||
this.getTeam();
|
||||
this.getShfit();
|
||||
},
|
||||
methods: {
|
||||
getTeam(){
|
||||
this.$API.mtm.team.list.req({page:0}).then(res=>{
|
||||
this.teamOptions = res;
|
||||
})
|
||||
},
|
||||
getShfit(){
|
||||
this.$API.mtm.shift.req({page:0}).then(res=>{
|
||||
this.shiftOptions = res;
|
||||
})
|
||||
},
|
||||
//显示
|
||||
open(mode = "add") {
|
||||
this.mode = mode;
|
||||
this.visible = true;
|
||||
return this;
|
||||
},
|
||||
teamChange(data){
|
||||
let that = this;
|
||||
that.teamOptions.forEach(item=>{
|
||||
if(item.id==data){
|
||||
that.form.leader_name = item.leader_name;
|
||||
that.form.leader= item.leader;
|
||||
}
|
||||
})
|
||||
},
|
||||
//表单提交方法
|
||||
submit() {
|
||||
this.$refs.dialogForm.validate(async (valid) => {
|
||||
if (valid) {
|
||||
this.isSaveing = true;
|
||||
try {
|
||||
let obj={};
|
||||
obj.note = this.form.note;
|
||||
obj.team = this.form.team;
|
||||
obj.shift = this.form.shift;
|
||||
obj.leader = this.form.leader;
|
||||
this.$API.wpm.sflog.update.req(this.form.id,obj).then(res=>{
|
||||
this.isSaveing = false;
|
||||
this.$emit("success", this.form, this.mode);
|
||||
this.visible = false;
|
||||
this.$message.success("操作成功");
|
||||
return res;
|
||||
})
|
||||
} catch (err) {
|
||||
//可以处理校验错误
|
||||
this.isSaveing = false;
|
||||
return err;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
//表单注入数据
|
||||
setData(data) {
|
||||
Object.assign(this.form,data);
|
||||
},
|
||||
//设置过滤项
|
||||
setFilters(filters) {
|
||||
this.selectionFilters = filters;
|
||||
this.setFiltersVisible = true;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
</style>
|
||||
|
||||
|
|
@ -0,0 +1,189 @@
|
|||
<template>
|
||||
<el-dialog
|
||||
:title="titleMap[mode]"
|
||||
v-model="visible"
|
||||
:size="1000"
|
||||
destroy-on-close
|
||||
@closed="$emit('closed')"
|
||||
>
|
||||
<el-container v-loading="loading">
|
||||
<el-main style="padding: 0 20px 20px 20px">
|
||||
<el-form
|
||||
ref="dialogForm"
|
||||
:model="form"
|
||||
label-width="100px"
|
||||
label-position="right"
|
||||
:rules="rules"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="关联工段" prop="mgroup">
|
||||
<el-input v-model="form.mgroup_name" placeholder="关联工段" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="当班班次">
|
||||
<el-input v-model="form.shift_name" placeholder="当班班次" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="开始时间" prop="start_time">
|
||||
<el-input v-model="form.start_time" placeholder="结束时间" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="结束时间" prop="end_time">
|
||||
<el-input v-model="form.end_time" placeholder="结束时间" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="当班班组" prop="team">
|
||||
<el-input v-model="form.team_name" placeholder="班组班长" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="班组班长" prop="leader_name">
|
||||
<el-input v-model="form.leader_name" placeholder="班组班长" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="检测时间" prop="time">
|
||||
<el-date-picker
|
||||
v-model="form.time"
|
||||
type="datetime"
|
||||
value-format="YYYY-MM-DD HH:mm"
|
||||
format="YYYY-MM-DD HH:mm"
|
||||
placeholder="检测时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24" class="formUnitWrap">
|
||||
<el-form-item label="水耗统计" prop="val">
|
||||
<el-input-number v-model="form.val" :precision="2" controls-position="right" placeholder="水耗统计" style="width: 100%;"></el-input-number>
|
||||
</el-form-item>
|
||||
<span class="formUnit">(t)</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-main>
|
||||
<el-footer>
|
||||
<el-button type="primary" :loading="isSaveing" @click="submit">保存</el-button>
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
</el-footer>
|
||||
</el-container>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
emits: ["success", "closed"],
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
mode: "add",
|
||||
titleMap: {
|
||||
add: "其他能源录入",
|
||||
edit: "其他能源录入",
|
||||
show: "其他能源录入",
|
||||
},
|
||||
form: {
|
||||
type:10,
|
||||
},
|
||||
rules: {
|
||||
val: [{required: true, message: "请输入检测值", trigger: "blur"}],
|
||||
time: [{required: true, message: "请选择检测时间", trigger: "blur"}]
|
||||
},
|
||||
visible: false,
|
||||
isSaveing: false,
|
||||
keeperOptions: [],
|
||||
depOptions: [],
|
||||
selectionFilters: [],
|
||||
setFiltersVisible: false,
|
||||
teamOptions:[],
|
||||
shiftOptions:[],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
//获取班组
|
||||
this.getTeam();
|
||||
this.getShfit();
|
||||
},
|
||||
methods: {
|
||||
getTeam(){
|
||||
this.$API.mtm.team.list.req({page:0}).then(res=>{
|
||||
this.teamOptions = res;
|
||||
})
|
||||
},
|
||||
getShfit(){
|
||||
this.$API.mtm.shift.req({page:0}).then(res=>{
|
||||
this.shiftOptions = res;
|
||||
})
|
||||
},
|
||||
//显示
|
||||
open(mode = "add") {
|
||||
this.mode = mode;
|
||||
this.visible = true;
|
||||
return this;
|
||||
},
|
||||
teamChange(data){
|
||||
let that = this;
|
||||
that.teamOptions.forEach(item=>{
|
||||
if(item.id==data){
|
||||
that.form.leader_name = item.leader_name;
|
||||
that.form.leader= item.leader;
|
||||
}
|
||||
})
|
||||
},
|
||||
//表单提交方法
|
||||
submit() {
|
||||
this.$refs.dialogForm.validate(async (valid) => {
|
||||
if (valid) {
|
||||
this.isSaveing = true;
|
||||
try {
|
||||
let obj={};
|
||||
debugger;
|
||||
obj.year_s = this.form.time.slice(0,4);
|
||||
obj.month_s = this.form.time.slice(5,7);
|
||||
obj.day_s = this.form.time.slice(8,10);
|
||||
obj.hour = this.form.time.slice(11,13);
|
||||
obj.val = this.form.val;
|
||||
obj.sflog = this.form.id;
|
||||
obj.material = '3349350755361792000';
|
||||
obj.mpoint = '3349214860667219968';
|
||||
this.$API.enm.mpoint.statCreate.req(obj).then(res=>{
|
||||
this.isSaveing = false;
|
||||
this.$emit("success", this.form, this.mode);
|
||||
this.visible = false;
|
||||
this.$message.success("操作成功");
|
||||
return res;
|
||||
})
|
||||
} catch (err) {
|
||||
//可以处理校验错误
|
||||
this.isSaveing = false;
|
||||
return err;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
//表单注入数据
|
||||
setData(data) {
|
||||
Object.assign(this.form,data);
|
||||
},
|
||||
//设置过滤项
|
||||
setFilters(filters) {
|
||||
this.selectionFilters = filters;
|
||||
this.setFiltersVisible = true;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.formUnit{
|
||||
position: absolute;
|
||||
right: -17px;
|
||||
top: 7px;
|
||||
}
|
||||
.formUnitWrap{
|
||||
position: relative;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
|
@ -0,0 +1,219 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="exportExcel()"
|
||||
:loading = "exportLoading"
|
||||
>导出xlsx
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="handlePrint"
|
||||
>打印
|
||||
</el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-card style="margin-top:5px">
|
||||
<div ref="print" id="myReport" class="printContainer">
|
||||
<h3 style="text-align: center;">主要设备(100KW以上)单位产品电耗数据表</h3>
|
||||
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable">
|
||||
<thead style="background: #efefef;height: 40px;">
|
||||
<tr>
|
||||
<th>设备名称</th>
|
||||
<th>设备编号</th>
|
||||
<th>单位</th>
|
||||
<th>上个小时</th>
|
||||
<th>昨日</th>
|
||||
<th>本月</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item) in tableDatas" :key="item">
|
||||
<td class="numCell">{{item.name}}</td>
|
||||
<td class="numCell">{{item.number}}</td>
|
||||
<td class="numCell">{{item.unit}}</td>
|
||||
<td class="numCell hoursItem" @click="itemClick('hours',item)" style="background: rgba(238, 179, 179, 0.8);">{{item[0]}}</td>
|
||||
<td class="numCell monthItem" @click="itemClick('month',item)" style="background: rgba(238, 189, 124, 0.8);">{{item[2]}}</td>
|
||||
<td class="numCell yearItem" @click="itemClick1('year',item)" style="background: rgba(186, 236, 135, 0.8);">{{item[3]}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<sc-dialog v-model="chartShow" draggable title="创建/编辑人员证书">
|
||||
<div class="searchHead" v-if="type=='hours'">
|
||||
<el-date-picker
|
||||
v-model="query.start_time"
|
||||
type="date"
|
||||
placeholder="选择时间"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<span class="middleText">至</span>
|
||||
<el-date-picker
|
||||
v-model="query.end_time"
|
||||
type="date"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
start-placeholder="结束日期"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-button type="primary" class="searchBtn" @click="dataSearch">查询</el-button>
|
||||
</div>
|
||||
<div class="searchHead" v-if="type=='days'">
|
||||
<el-date-picker
|
||||
v-model="query.start_time"
|
||||
type="date"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
start-placeholder="开始日期"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-date-picker
|
||||
v-model="query.end_time"
|
||||
type="date"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
start-placeholder="结束日期"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-button type="primary" class="searchBtn" @click="dataSearch">查询</el-button>
|
||||
</div>
|
||||
<div class="searchHead" v-if="type=='month'">
|
||||
<el-date-picker
|
||||
v-model="query.start_time"
|
||||
type="month"
|
||||
format="YYYY-MM"
|
||||
value-format="YYYY-MM"
|
||||
start-placeholder="开始月份"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-date-picker
|
||||
v-model="query.end_time"
|
||||
type="month"
|
||||
format="YYYY-MM"
|
||||
value-format="YYYY-MM"
|
||||
start-placeholder="结束月份"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-button type="primary" class="searchBtn" @click="dataSearch">查询</el-button>
|
||||
</div>
|
||||
<scEcharts height="360px" :option="myOption" v-if="chartShow"></scEcharts>
|
||||
</sc-dialog>
|
||||
<charts
|
||||
v-if="asynDialog"
|
||||
:type="type"
|
||||
:title="title"
|
||||
:modelValue="modelValue"
|
||||
:showClose="showClose"
|
||||
:echartType='echartType'
|
||||
@closed="asynDialog = false"
|
||||
></charts>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import scEcharts from "@/components/scEcharts";
|
||||
import { defineAsyncComponent } from 'vue'
|
||||
export default {
|
||||
components: {
|
||||
scEcharts,
|
||||
charts: defineAsyncComponent(() => import("@/components/scEnm/lineChartsdialog.vue")),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
chartShow: false,
|
||||
myOption: null,
|
||||
timeStamp:0,
|
||||
listQuery:{
|
||||
belong_dept:'',
|
||||
task2__year:'',
|
||||
page:0
|
||||
},
|
||||
query:{
|
||||
time:''
|
||||
},
|
||||
tableName:'主要设备(100KW以上)单位产品电耗数据表',
|
||||
tableDatas:[
|
||||
{name:'循环风机1906',number:'NM001',unit:'KW·h/t',hours:'',days:'',month:''},
|
||||
{name:'系统风机',number:'NM002',unit:'KW·h/t',hours:'',days:'',month:''},
|
||||
{name:'水平涡流选粉机1915电耗',number:'NM002',unit:'KW·h/t',hours:'',days:'',month:''},
|
||||
{name:'水泥磨主电机',number:'NM002',unit:'KW·h/t',hours:'',days:'',month:''},
|
||||
{name:'辊压机动辊电机',number:'NM002',unit:'KW·h/t',hours:'',days:'',month:''},
|
||||
{name:'辊压机定辊电机',number:'NM002',unit:'KW·h/t',hours:'',days:'',month:''},
|
||||
{name:'新增磨尾风机',number:'NM002',unit:'KW·h/t',hours:'',days:'',month:''},
|
||||
{name:'水泥1#空压机',number:'NM002',unit:'KW·h/t',hours:'',days:'',month:''},
|
||||
{name:'水泥2#空压机',number:'NM002',unit:'KW·h/t',hours:'',days:'',month:''},
|
||||
],
|
||||
modelValue:true,
|
||||
type:'hours',
|
||||
title:'title',
|
||||
apiObj:'',
|
||||
showClose:true,
|
||||
echartType:'line',
|
||||
asynDialog:false,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
|
||||
itemClick(type,item){
|
||||
this.type=type;
|
||||
this.asynDialog = true;
|
||||
},
|
||||
itemClick1(type,item){
|
||||
this.chartShow = false;
|
||||
this.$API.bi.dataset.exec
|
||||
.req('3322567213885833216')
|
||||
.then((res) => {
|
||||
this.myOption = JSON.parse(res.echart_options);
|
||||
debugger;
|
||||
console.log(this.myOption)
|
||||
this.chartShow = true;
|
||||
});
|
||||
},
|
||||
handlePrint() {
|
||||
this.$PRINT('#myReport');
|
||||
},
|
||||
exportExcel() {
|
||||
this.exportLoading = true;
|
||||
this.$XLSX('#myTable', this.tableName)
|
||||
this.exportLoading = false;
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.printContainer{
|
||||
width: 1075px;
|
||||
}
|
||||
#numTable{
|
||||
margin-left: 37px;
|
||||
}
|
||||
#numTable td{
|
||||
height: 32px;
|
||||
padding-left: 5px;
|
||||
}
|
||||
.numCell{
|
||||
width: 80px;
|
||||
height: 35px;
|
||||
}
|
||||
.numCell.numCell_last{
|
||||
width: 100px;
|
||||
}
|
||||
.searchHead{
|
||||
display:flex
|
||||
}
|
||||
.middleText{
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
margin: 0 5px;
|
||||
display: inline-block;
|
||||
}
|
||||
.searchBtn{
|
||||
margin-left: 5px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,253 @@
|
|||
<template>
|
||||
<el-dialog
|
||||
:title="titleMap[mode]"
|
||||
v-model="visible"
|
||||
:size="1000"
|
||||
destroy-on-close
|
||||
id="bigDialog"
|
||||
class="bigDialog"
|
||||
@closed="$emit('closed')"
|
||||
>
|
||||
<el-container v-loading="loading">
|
||||
<el-main style="padding: 0 20px 20px 20px">
|
||||
<el-form
|
||||
ref="dialogForm"
|
||||
:model="form"
|
||||
label-width="85px"
|
||||
label-position="right"
|
||||
:rules="rule1"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="关联工段">
|
||||
<el-input v-model="form.mgroup_name" placeholder="关联工段" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="当前班次">
|
||||
<el-input v-model="form.shift_name" placeholder="当前班次" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="当前班组">
|
||||
<el-input v-model="form.team_name" placeholder="当前班组" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="班组组长">
|
||||
<el-input v-model="form.team_name" placeholder="班组组长" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="开始时间">
|
||||
<el-input v-model="form.start_time" placeholder="开始时间" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="结束时间">
|
||||
<el-input v-model="form.end_time" placeholder="结束时间" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-divider />
|
||||
</el-row>
|
||||
|
||||
<!-- <el-row>
|
||||
<el-col :lg="8" :md="12">
|
||||
<el-form-item label="关联产物" prop="material">
|
||||
<el-select
|
||||
v-model="form.material"
|
||||
placeholder="关联产物"
|
||||
clearable
|
||||
style="width: 100%;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in teamOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :lg="8" :md="12">
|
||||
<el-form-item label="质检项目" prop="testitem">
|
||||
<el-select
|
||||
v-model="form.testitem"
|
||||
placeholder="质检项目"
|
||||
clearable
|
||||
style="width: 100%;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in teamOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :lg="8" :md="12">
|
||||
<el-form-item label="平均值" prop="team">
|
||||
<el-input v-model="form.number" placeholder="平均值" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :lg="8" :md="12">
|
||||
<el-form-item label="检验次数" prop="mgroup">
|
||||
<el-input v-model="form.number" placeholder="检验次数"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :lg="8" :md="12">
|
||||
<el-form-item label="合格次数" prop="number">
|
||||
<el-input v-model="form.number" placeholder="合格次数"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-divider />
|
||||
</el-row> -->
|
||||
</el-form>
|
||||
<sc-form-table
|
||||
v-model="form.list"
|
||||
:addTemplate="addTemplate"
|
||||
placeholder="暂无数据"
|
||||
>
|
||||
<el-table-column prop="material" label="关联产物" min-width="150">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.id">{{ scope.row.material_name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="testitem" label="质检项目" min-width="150">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.id">{{ scope.row.testitem_name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="val_avg" label="平均值" min-width="150">
|
||||
<template #default="scope">
|
||||
<el-input
|
||||
v-model="scope.row.val_avg"
|
||||
placeholder="请输入内容"
|
||||
></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="num_test" label="检验次数" min-width="150">
|
||||
<template #default="scope">
|
||||
<el-input
|
||||
v-model="scope.row.num_test"
|
||||
placeholder="请输入内容"
|
||||
></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="num_ok" label="合格次数" min-width="150">
|
||||
<template #default="scope">
|
||||
<el-input
|
||||
v-model="scope.row.num_ok"
|
||||
placeholder="请输入内容"
|
||||
></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</sc-form-table>
|
||||
</el-main>
|
||||
<el-footer>
|
||||
<el-button type="primary" :loading="isSaveing" @click="submit">保存</el-button>
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
</el-footer>
|
||||
</el-container>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
emits: ["success", "closed"],
|
||||
data() {
|
||||
return {
|
||||
addTemplate: {
|
||||
material: "",
|
||||
testitem: "",
|
||||
val_avg: "",
|
||||
num_test: "",
|
||||
num_ok: "",
|
||||
},
|
||||
loading: false,
|
||||
mode: "add",
|
||||
titleMap: {
|
||||
add: "质量检验",
|
||||
edit: "质量检验",
|
||||
show: "质量检验",
|
||||
},
|
||||
form: {
|
||||
type:10,
|
||||
list:[]
|
||||
},
|
||||
rules: {
|
||||
name: [{required: true, message: "请输入", trigger: "blur"}],
|
||||
number: [{required: true, message: "请输入", trigger: "blur"}],
|
||||
keeper_name: [{required: true, message: "请输入", trigger: "blur"}],
|
||||
belong_dept: [{required: true, message: "请选择", trigger: "blur"}]
|
||||
},
|
||||
visible: false,
|
||||
isSaveing: false,
|
||||
keeperOptions: [],
|
||||
depOptions: [],
|
||||
selectionFilters: [],
|
||||
setFiltersVisible: false,
|
||||
teamOptions:[],
|
||||
shiftOptions:[],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
//是否已经保存过
|
||||
//若新增,调用init接口,若编辑修改,调get接口
|
||||
},
|
||||
methods: {
|
||||
|
||||
//显示
|
||||
open(mode = "add") {
|
||||
this.mode = mode;
|
||||
this.visible = true;
|
||||
return this;
|
||||
},
|
||||
getReceptionist(data) {
|
||||
this.form.leader=data.id;
|
||||
this.form.leader_name=data.name
|
||||
},
|
||||
//表单提交方法
|
||||
submit() {
|
||||
this.isSaveing = true;
|
||||
this.$API.qm.updateQuastat.req('bulk',this.form.list).then(res=>{
|
||||
this.isSaveing = false;
|
||||
this.$emit("success", this.form, this.mode);
|
||||
this.visible = false;
|
||||
this.$message.success("操作成功");
|
||||
}).catch(res=>{
|
||||
this.isSaveing = false;
|
||||
})
|
||||
// this.$refs.dialogForm.validate(async (valid) => {
|
||||
// if (valid) {
|
||||
|
||||
// }
|
||||
// });
|
||||
},
|
||||
//表单注入数据
|
||||
setData(data) {
|
||||
Object.assign(this.form,data);
|
||||
this.getsflogItem(this.form.id);
|
||||
},
|
||||
getsflogItem(id){
|
||||
this.$API.wpm.sflog.init_test.req(id).then(res=>{
|
||||
this.form.list = res;
|
||||
})
|
||||
},
|
||||
//设置过滤项
|
||||
setFilters(filters) {
|
||||
this.selectionFilters = filters;
|
||||
this.setFiltersVisible = true;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
#bigDialog{
|
||||
width: 90%;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
|
@ -0,0 +1,244 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="exportExcel()"
|
||||
:loading = "exportLoading"
|
||||
>导出xlsx
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="handlePrint"
|
||||
>打印
|
||||
</el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-card style="margin-top:5px">
|
||||
<div ref="print" id="myReport" class="printContainer">
|
||||
<h3 style="text-align: center;">生产报告</h3>
|
||||
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable">
|
||||
<thead style="background: #efefef;height: 40px;">
|
||||
<tr>
|
||||
<th colspan="2">参数</th>
|
||||
<th>上个小时</th>
|
||||
<th>昨日</th>
|
||||
<th>本月</th>
|
||||
<th>本年</th>
|
||||
<th>月目标值</th>
|
||||
<th>月完成度</th>
|
||||
<th>年目标值</th>
|
||||
<th>年完成度</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item,index) in tableDatas" :key="item">
|
||||
<td class="numCell" v-if="index==0||index==2||index==4" rowspan="2">{{item[0]}}</td>
|
||||
<td class="numCell" v-else-if="index==6">{{item[0]}}</td>
|
||||
<td class="numCell">{{item[1]}}</td>
|
||||
<td class="numCell hoursItem" @click="itemClick('hours',item)" style="background: rgba(238, 179, 179, 0.8);">{{item[2]}}</td>
|
||||
<td class="numCell daysItem" @click="itemClick('days',item)" style="background: rgba(239, 90, 90, 0.8);">{{item[3]}}</td>
|
||||
<td class="numCell monthItem" @click="itemClick('month',item)" style="background: rgba(238, 189, 124, 0.8);">{{item[4]}}</td>
|
||||
<td class="numCell yearItem" @click="itemClick1('year',item)" style="background: rgba(186, 236, 135, 0.8);">{{item[5]}}</td>
|
||||
<td class="numCell">{{item[6]}}</td>
|
||||
<td class="numCell">{{item[7]}}</td>
|
||||
<td class="numCell">{{item[8]}}</td>
|
||||
<td class="numCell">{{item[9]}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<sc-dialog v-model="chartShow" draggable title="水泥磨工段">
|
||||
<div class="searchHead" v-if="type=='hours'">
|
||||
<el-date-picker
|
||||
v-model="query.start_time"
|
||||
type="date"
|
||||
placeholder="选择时间"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<span class="middleText">至</span>
|
||||
<el-date-picker
|
||||
v-model="query.end_time"
|
||||
type="date"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
start-placeholder="结束日期"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-button type="primary" class="searchBtn" @click="dataSearch">查询</el-button>
|
||||
</div>
|
||||
<div class="searchHead" v-if="type=='days'">
|
||||
<el-date-picker
|
||||
v-model="query.start_time"
|
||||
type="date"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
start-placeholder="开始日期"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-date-picker
|
||||
v-model="query.end_time"
|
||||
type="date"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
start-placeholder="结束日期"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-button type="primary" class="searchBtn" @click="dataSearch">查询</el-button>
|
||||
</div>
|
||||
<div class="searchHead" v-if="type=='month'">
|
||||
<el-date-picker
|
||||
v-model="query.start_time"
|
||||
type="month"
|
||||
format="YYYY-MM"
|
||||
value-format="YYYY-MM"
|
||||
start-placeholder="开始月份"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-date-picker
|
||||
v-model="query.end_time"
|
||||
type="month"
|
||||
format="YYYY-MM"
|
||||
value-format="YYYY-MM"
|
||||
start-placeholder="结束月份"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-button type="primary" class="searchBtn" @click="dataSearch">查询</el-button>
|
||||
</div>
|
||||
<div class="searchHead" v-if="type=='year'">
|
||||
<el-date-picker
|
||||
v-model="query.start_time"
|
||||
type="year"
|
||||
format="YYYY"
|
||||
value-format="YYYY"
|
||||
start-placeholder="开始日期"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-date-picker
|
||||
v-model="query.end_time"
|
||||
type="year"
|
||||
format="YYYY"
|
||||
value-format="YYYY"
|
||||
start-placeholder="结束日期"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-button type="primary" class="searchBtn" @click="dataSearch">查询</el-button>
|
||||
</div>
|
||||
<scEcharts height="360px" :option="myOption" v-if="chartShow"></scEcharts>
|
||||
</sc-dialog>
|
||||
<charts
|
||||
v-if="asynDialog"
|
||||
:type="type"
|
||||
:title="title"
|
||||
:modelValue="modelValue"
|
||||
:showClose="showClose"
|
||||
:echartType='echartType'
|
||||
@closed="asynDialog = false"
|
||||
></charts>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import scEcharts from "@/components/scEcharts";
|
||||
import { defineAsyncComponent } from 'vue'
|
||||
export default {
|
||||
components: {
|
||||
scEcharts,
|
||||
charts: defineAsyncComponent(() => import("@/components/scEnm/lineChartsdialog.vue")),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
chartShow: false,
|
||||
myOption: null,
|
||||
timeStamp:0,
|
||||
listQuery:{
|
||||
belong_dept:'',
|
||||
task2__year:'',
|
||||
page:0
|
||||
},
|
||||
query:{
|
||||
time:''
|
||||
},
|
||||
tableDatas:[
|
||||
['产量','总产量(t)',0,0,0,0,0,0,0,0],
|
||||
['产量','台时产量(t/h)',0,0,0,0,0,0,0,0],
|
||||
['运转时间','运转时间(h)',0,0,0,0,0,0,0,0],
|
||||
['运转时间','运转率(%)',0,0,0,0,0,0,0,0],
|
||||
['能耗','单位产品分布电耗(KW·h/t)',0,0,0,0,0,0,0,0],
|
||||
['能耗','单位产品综合能耗(KW·h/t)',0,0,0,0,0,0,0,0],
|
||||
['能耗','煤磨分布电耗(KW·h/t)',0,0,0,0,0,0,0,0],
|
||||
],
|
||||
tableName:'生产报告',
|
||||
modelValue:true,
|
||||
type:'hours',
|
||||
title:'水泥磨工段',
|
||||
apiObj:'',
|
||||
showClose:true,
|
||||
echartType:'line',
|
||||
asynDialog:false,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
|
||||
itemClick(type,item){
|
||||
this.type=type;
|
||||
this.asynDialog = true;
|
||||
},
|
||||
itemClick1(type,item){
|
||||
this.chartShow = false;
|
||||
this.$API.bi.dataset.exec
|
||||
.req('3322567213885833216')
|
||||
.then((res) => {
|
||||
this.myOption = JSON.parse(res.echart_options);
|
||||
debugger;
|
||||
console.log(this.myOption)
|
||||
this.chartShow = true;
|
||||
});
|
||||
},
|
||||
handlePrint() {
|
||||
this.$PRINT('#myReport');
|
||||
},
|
||||
exportExcel() {
|
||||
this.exportLoading = true;
|
||||
this.$XLSX('#myTable', this.tableName)
|
||||
this.exportLoading = false;
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.printContainer{
|
||||
width: 1075px;
|
||||
}
|
||||
#numTable{
|
||||
margin-left: 37px;
|
||||
}
|
||||
#numTable td{
|
||||
height: 32px;
|
||||
padding-left: 5px;
|
||||
}
|
||||
.numCell{
|
||||
width: 80px;
|
||||
height: 35px;
|
||||
}
|
||||
.numCell.numCell_last{
|
||||
width: 100px;
|
||||
}
|
||||
.searchHead{
|
||||
display:flex
|
||||
}
|
||||
.middleText{
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
margin: 0 5px;
|
||||
display: inline-block;
|
||||
}
|
||||
.searchBtn{
|
||||
margin-left: 5px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,178 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-date-picker
|
||||
v-model="query.time"
|
||||
type="month"
|
||||
value-format="YYYY-MM"
|
||||
format="YYYY-MM"
|
||||
placeholder="基础月份"
|
||||
/>
|
||||
<el-date-picker
|
||||
v-model="query.time2"
|
||||
type="month"
|
||||
value-format="YYYY-MM"
|
||||
format="YYYY-MM"
|
||||
placeholder="对比月份"
|
||||
/>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="handleQuery"
|
||||
></el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="exportExcel()"
|
||||
:loading = "exportLoading"
|
||||
>导出xlsx
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="handlePrint"
|
||||
>打印
|
||||
</el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-card style="margin-top:5px">
|
||||
<div ref="print" id="myReport" class="printContainer">
|
||||
<h3 style="text-align: center;">主要设备(100KW以上)单位产品电耗数据表</h3>
|
||||
<table border="1" cellspacing="0" :key="timeStamp" id="myTable">
|
||||
<thead style="background: #efefef;height: 40px;">
|
||||
<tr>
|
||||
<th rowspan="2">月份</th>
|
||||
<th rowspan="2">班组</th>
|
||||
<th colspan="2">总产量(t)</th>
|
||||
<th>运转率</th>
|
||||
<th>成本</th>
|
||||
<th colspan="3">质量</th>
|
||||
<th colspan="10">单位产品电耗</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>总产量(t)</th>
|
||||
<th>台时产量(t/h)</th>
|
||||
<th>运转率(%)</th>
|
||||
<th>单位产品成本(元/吨)</th>
|
||||
<th>比表面积(%)</th>
|
||||
<th>SO3(%)</th>
|
||||
<th>掺量(%)</th>
|
||||
<th>循环风机1906单位产品电耗(KW·h/t)</th>
|
||||
<th>系统风机单位产品电耗(KW·h/t)</th>
|
||||
<th>水平涡流选粉机1915电耗单位产品电耗(KW·h/t)</th>
|
||||
<th>目标值(kW·h/h)</th>
|
||||
<th>当期与目标值差值(kW·h/h)</th>
|
||||
<th>环期值(kW·h/h)</th>
|
||||
<th>当期与环期差值(kW·h/h)</th>
|
||||
<th>环比增长率(%)</th>
|
||||
<th>同比增长率(%)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr v-for="(item,index) in tableDatas" :key="index">
|
||||
<td v-if="index%3==0" rowspan="3" style="width:50px">{{item.month}}</td>
|
||||
<td class="numCell">{{item.name}}</td>
|
||||
<td class="numCell">{{item.number}}</td>
|
||||
<td class="numCell">{{item.unit}}</td>
|
||||
<td class="numCell">{{item.hours}}</td>
|
||||
<td class="numCell">{{item.days}}</td>
|
||||
<td class="numCell">{{item.months}}</td>
|
||||
<td class="numCell">{{item.hours}}</td>
|
||||
<td class="numCell">{{item.days}}</td>
|
||||
<td class="numCell">{{item.months}}</td>
|
||||
<td class="numCell">{{item.hours}}</td>
|
||||
<td class="numCell">{{item.days}}</td>
|
||||
<td class="numCell">{{item.months}}</td>
|
||||
<td class="numCell">{{item.months}}</td>
|
||||
<td class="numCell">{{item.hours}}</td>
|
||||
<td class="numCell">{{item.months}}</td>
|
||||
<td class="numCell">{{item.months}}</td>
|
||||
<td class="numCell">{{item.hours}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
timeStamp:0,
|
||||
listQuery:{
|
||||
belong_dept:'',
|
||||
task2__year:'',
|
||||
page:0
|
||||
},
|
||||
query:{
|
||||
time:'',
|
||||
time2:'',
|
||||
},
|
||||
tableDatas:[
|
||||
{month:'2023.1',name:'甲组',number:'NM001',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
{month:'2023.1',name:'乙组',number:'NM002',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
{month:'2023.1',name:'丙组',number:'NM003',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
{month:'2023.2',name:'甲组',number:'NM004',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
{month:'2023.2',name:'乙组',number:'NM005',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
{month:'2023.2',name:'丙组',number:'NM006',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
|
||||
itemClick(type,item){
|
||||
this.type=type;
|
||||
this.asynDialog = true;
|
||||
},
|
||||
itemClick1(type,item){
|
||||
this.chartShow = false;
|
||||
this.$API.bi.dataset.exec
|
||||
.req('3322567213885833216')
|
||||
.then((res) => {
|
||||
this.myOption = JSON.parse(res.echart_options);
|
||||
debugger;
|
||||
console.log(this.myOption)
|
||||
this.chartShow = true;
|
||||
});
|
||||
},
|
||||
handlePrint() {
|
||||
this.$PRINT('#myReport');
|
||||
},
|
||||
exportExcel() {
|
||||
this.exportLoading = true;
|
||||
this.$XLSX('#myTable', this.tableName)
|
||||
this.exportLoading = false;
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.printContainer{
|
||||
width: 1075px;
|
||||
}
|
||||
#numTable{
|
||||
margin-left: 37px;
|
||||
}
|
||||
#numTable td{
|
||||
height: 32px;
|
||||
padding-left: 5px;
|
||||
}
|
||||
.numCell{
|
||||
width: 80px;
|
||||
}
|
||||
.numCell.numCell_last{
|
||||
width: 100px;
|
||||
}
|
||||
.searchHead{
|
||||
display:flex
|
||||
}
|
||||
.middleText{
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
margin: 0 5px;
|
||||
display: inline-block;
|
||||
}
|
||||
.searchBtn{
|
||||
margin-left: 5px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,202 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-date-picker
|
||||
v-model="monthrange"
|
||||
type="monthrange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始月份"
|
||||
end-placeholder="结束月份"
|
||||
value-format="YYYY-MM"
|
||||
format="YYYY-MM"
|
||||
/>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="handleQuery"
|
||||
></el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="exportExcel()"
|
||||
:loading = "exportLoading"
|
||||
>导出xlsx
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="handlePrint"
|
||||
>打印
|
||||
</el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-card style="margin-top:5px">
|
||||
<div ref="print" id="myReport" class="printContainer">
|
||||
<h3 style="text-align: center;"> 车间单位产品电耗月度分析表</h3>
|
||||
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable">
|
||||
<thead style="background: #efefef;height: 120px;">
|
||||
<tr>
|
||||
<th colspan="9">车间单位产品电耗月度分析表</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="2">月份</th>
|
||||
<th rowspan="2">当期值(KW·h/t)</th>
|
||||
<th rowspan="2">目标值(KW·h/t)</th>
|
||||
<th colspan="3">国家标准(KW·h/t)</th>
|
||||
<th rowspan="2">当期与环期差值(KW·h/t)</th>
|
||||
<th rowspan="2">环比增长率(%)</th>
|
||||
<th rowspan="2">同比增长率(%)</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>1级</th>
|
||||
<th>2级</th>
|
||||
<th>3级</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item) in tableDatas" :key="item">
|
||||
<td class="numCell">{{item.month}}</td>
|
||||
<td class="numCell">{{item.value1}}</td>
|
||||
<td class="numCell">{{item.value2}}</td>
|
||||
<td class="numCell">{{item.value3}}</td>
|
||||
<td class="numCell">{{item.value4}}</td>
|
||||
<td class="numCell">{{item.value5}}</td>
|
||||
<td class="numCell">{{item.value6}}</td>
|
||||
<td class="numCell">{{item.value7}}</td>
|
||||
<td class="numCell">{{item.value7}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
<h3 style="text-align: center;"> 车间单位产品综合能耗月度分析表</h3>
|
||||
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable1">
|
||||
<thead style="background: #efefef;height: 120px;">
|
||||
<tr>
|
||||
<th colspan="9">车间单位产品综合能耗月度分析表</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="2">月份</th>
|
||||
<th rowspan="2">当期值(KW·h/t)</th>
|
||||
<th rowspan="2">目标值(KW·h/t)</th>
|
||||
<th colspan="3">国家标准(KW·h/t)</th>
|
||||
<th rowspan="2">当期与环期差值(KW·h/t)</th>
|
||||
<th rowspan="2">环比增长率(%)</th>
|
||||
<th rowspan="2">同比增长率(%)</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>1级</th>
|
||||
<th>2级</th>
|
||||
<th>3级</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item) in tableDatas" :key="item">
|
||||
<td class="numCell">{{item.month}}</td>
|
||||
<td class="numCell">{{item.value1}}</td>
|
||||
<td class="numCell">{{item.value2}}</td>
|
||||
<td class="numCell">{{item.value3}}</td>
|
||||
<td class="numCell">{{item.value4}}</td>
|
||||
<td class="numCell">{{item.value5}}</td>
|
||||
<td class="numCell">{{item.value6}}</td>
|
||||
<td class="numCell">{{item.value7}}</td>
|
||||
<td class="numCell">{{item.value7}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import scEcharts from "@/components/scEcharts";
|
||||
import { defineAsyncComponent } from 'vue'
|
||||
export default {
|
||||
components: {
|
||||
scEcharts,
|
||||
charts: defineAsyncComponent(() => import("@/components/scEnm/lineChartsdialog.vue")),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
chartShow: false,
|
||||
myOption: null,
|
||||
timeStamp:0,
|
||||
listQuery:{
|
||||
belong_dept:'',
|
||||
task2__year:'',
|
||||
page:0
|
||||
},
|
||||
query:{
|
||||
time:''
|
||||
},
|
||||
tableDatas:[
|
||||
{month:'2023-05',value1:'1203',value2:'1200',value3:'3',value4:'1150',value5:'50',value6:'0.4',value7:'0.4'},
|
||||
{month:'2023-06',value1:'1203',value2:'1200',value3:'3',value4:'1150',value5:'50',value6:'0.4',value7:'0.4'},
|
||||
{month:'2023-07',value1:'1203',value2:'1200',value3:'3',value4:'1150',value5:'50',value6:'0.4',value7:'0.4'},
|
||||
],
|
||||
modelValue:true,
|
||||
type:'hours',
|
||||
title:'title',
|
||||
apiObj:'',
|
||||
showClose:true,
|
||||
echartType:'line',
|
||||
asynDialog:false,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
|
||||
itemClick(type,item){
|
||||
this.type=type;
|
||||
this.asynDialog = true;
|
||||
},
|
||||
itemClick1(type,item){
|
||||
this.chartShow = false;
|
||||
this.$API.bi.dataset.exec
|
||||
.req('3322567213885833216')
|
||||
.then((res) => {
|
||||
this.myOption = JSON.parse(res.echart_options);
|
||||
debugger;
|
||||
console.log(this.myOption)
|
||||
this.chartShow = true;
|
||||
});
|
||||
},
|
||||
handlePrint() {
|
||||
this.$PRINT('#myReport');
|
||||
},
|
||||
exportExcel() {
|
||||
this.exportLoading = true;
|
||||
this.$XLSX('#myTable', this.tableName)
|
||||
this.exportLoading = false;
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.printContainer{
|
||||
width: 1075px;
|
||||
}
|
||||
#numTable{
|
||||
margin-left: 37px;
|
||||
}
|
||||
#numTable td{
|
||||
height: 32px;
|
||||
padding-left: 5px;
|
||||
}
|
||||
.numCell{
|
||||
width: 80px;
|
||||
}
|
||||
.numCell.numCell_last{
|
||||
width: 100px;
|
||||
}
|
||||
.searchHead{
|
||||
display:flex
|
||||
}
|
||||
.middleText{
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
margin: 0 5px;
|
||||
display: inline-block;
|
||||
}
|
||||
.searchBtn{
|
||||
margin-left: 5px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,266 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<div style="margin-right: 20px">交接班日志</div>
|
||||
<el-date-picker
|
||||
v-model="query.time"
|
||||
type="date"
|
||||
value-format="YYYY-MM-DD"
|
||||
format="YYYY-MM-DD"
|
||||
placeholder="日志时间"
|
||||
/>
|
||||
<el-select
|
||||
v-model="query.shift"
|
||||
placeholder="班次"
|
||||
clearable
|
||||
style="margin-left: 2px; width: 120px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in optionsShift"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
<el-select
|
||||
v-model="query.team"
|
||||
placeholder="班组"
|
||||
clearable
|
||||
style="margin-left: 2px; width: 120px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></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="检验时间">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.last_test_time">{{ scope.row.last_test_time.slice(0,16)}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" width="100">
|
||||
<template #default="scope">
|
||||
<el-button link size="small" @click="sflog_edit(scope.row)" type="primary">编辑</el-button>
|
||||
<!-- <el-button link size="small" @click="sflog_check(scope.row)" type="primary">质量检验</el-button> -->
|
||||
<!-- <el-button link size="small" @click="sflog_other(scope.row)" type="primary">其他能源</el-button> -->
|
||||
<el-button link size="small" @click="sflog_export(scope.row)" type="success">报表</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-main>
|
||||
<el-drawer v-model="limitedExport" size="60%" :show-close="false">
|
||||
<template #header="{ close, titleId, titleClass }">
|
||||
<h4 :id="titleId" :class="titleClass">交接班日志</h4>
|
||||
<el-button type="danger" @click="close">
|
||||
<el-icon class="el-icon--left"><CircleCloseFilled /></el-icon>
|
||||
关闭
|
||||
</el-button>
|
||||
</template>
|
||||
<el-main class="nopadding">
|
||||
<div ref="print" id="myReport" class="printContainer">
|
||||
<div style="margin-right: 20px;text-align: center;font-size: 16px;font-weight: bold;margin-bottom: 20px;">
|
||||
<span v-if="sflogItem.end_time">{{sflogItem.end_time.slice(0,10)}}{{ sflogItem.shift_name }}</span>
|
||||
<span v-if="sflogItem.team_name">{{ sflogItem.team_name }}</span>
|
||||
交接班记录
|
||||
</div>
|
||||
<h3 style="text-align: center;display: flex;justify-content: space-around;">
|
||||
<span>2023.06.21</span>
|
||||
<span>白班</span>
|
||||
<span>甲班</span>
|
||||
</h3>
|
||||
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="numCell">产量(t)</td>
|
||||
<td class="numCell">{{value1}}</td>
|
||||
<td class="numCell">单位产品分布电耗(KW·h/t)</td>
|
||||
<td class="numCell">{{value3}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="numCell">生产情况记录</td>
|
||||
<td class="numCell" colspan="5">时间、类别、原因、处置措施、处置人</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</el-main>
|
||||
</el-drawer>
|
||||
</el-container>
|
||||
<save-dialog
|
||||
v-if="dialog.save"
|
||||
ref="saveDialog"
|
||||
@success="handleSaveSuccess"
|
||||
@closed="dialog.save = false"
|
||||
></save-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import saveDialog from "./handover_form.vue";
|
||||
export default {
|
||||
name: "listSon",
|
||||
components: {
|
||||
saveDialog,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
apiObj: this.$API.wpm.sflog.list,
|
||||
apiObj2: null,
|
||||
query: {
|
||||
mgroup:'3346491835287007232',
|
||||
},
|
||||
query2: {},
|
||||
dialog: {
|
||||
save: false,
|
||||
},
|
||||
sflogItem:{},
|
||||
selection: [],
|
||||
value1:1,
|
||||
value3:3,
|
||||
value5:5,
|
||||
modelValue:true,
|
||||
showClose:true,
|
||||
echartType:'line',
|
||||
asynDialog:false,
|
||||
options:[],
|
||||
optionsShift:[],
|
||||
limitedExport:false,
|
||||
};
|
||||
},
|
||||
|
||||
methods: {
|
||||
sflog_export(){
|
||||
this.limitedExport = true;
|
||||
},
|
||||
rowClick(row) {
|
||||
this.sflogId = row.id;
|
||||
this.sflogItem = row;
|
||||
},
|
||||
//编辑
|
||||
sflog_edit(row) {
|
||||
this.dialog.save = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.saveDialog.open("edit").setData(row);
|
||||
});
|
||||
},
|
||||
|
||||
//删除
|
||||
async table_del(row) {
|
||||
this.$API.wpm.sflog.delete.req(row.id)
|
||||
.then((res) => {
|
||||
this.$message.success("删除成功");
|
||||
return res;
|
||||
})
|
||||
.catch((err) => {
|
||||
return err;
|
||||
});
|
||||
},
|
||||
//新增岗位后更新数据
|
||||
handleSaveSuccess(data, mode) {
|
||||
this.$refs.table.refresh()
|
||||
this.dialog.save = false;
|
||||
},
|
||||
handleOtherSuccess(){
|
||||
this.dialog.other = false;
|
||||
},
|
||||
handleCheckSuccess(){
|
||||
this.dialog.check = false;
|
||||
},
|
||||
closed() {
|
||||
this.dialog.save = false;
|
||||
this.$refs.table2.refresh();
|
||||
},
|
||||
handleDel(row) {
|
||||
this.$confirm(`确定删除选中的记录吗?`, "提示", {
|
||||
type: "warning",
|
||||
}).then(() => {
|
||||
this.$API.wpm.shift.delete.req(row.id).then((res) => {
|
||||
if (res.err_msg) {
|
||||
this.$message.error(res.err_msg);
|
||||
} else {
|
||||
// const loading = this.$loading();
|
||||
// this.$refs.table2.refresh();
|
||||
// loading.close();
|
||||
// this.$message.success("操作成功");
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
handlePrint() {
|
||||
this.$PRINT('#myReport');
|
||||
},
|
||||
exportExcel() {
|
||||
this.exportLoading = true;
|
||||
this.$XLSX('#myTable', this.tableName)
|
||||
this.exportLoading = false;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.printContainer{
|
||||
width: 1075px;
|
||||
}
|
||||
#numTable{
|
||||
margin-left: 37px;
|
||||
}
|
||||
#numTable td{
|
||||
height: 32px;
|
||||
padding-left: 5px;
|
||||
}
|
||||
.numCell{
|
||||
width: 80px;
|
||||
}
|
||||
.numCell.numCell_last{
|
||||
width: 100px;
|
||||
}
|
||||
.searchHead{
|
||||
display:flex
|
||||
}
|
||||
.middleText{
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
margin: 0 5px;
|
||||
display: inline-block;
|
||||
}
|
||||
.searchBtn{
|
||||
margin-left: 5px;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
|
@ -0,0 +1,198 @@
|
|||
<template>
|
||||
<el-dialog
|
||||
:title="titleMap[mode]"
|
||||
v-model="visible"
|
||||
:size="1000"
|
||||
destroy-on-close
|
||||
@closed="$emit('closed')"
|
||||
>
|
||||
<el-container v-loading="loading">
|
||||
<el-main style="padding: 0 20px 20px 20px">
|
||||
<el-form
|
||||
ref="dialogForm"
|
||||
:model="form"
|
||||
label-width="100px"
|
||||
label-position="right"
|
||||
:rules="rule1"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="关联工段" prop="mgroup">
|
||||
<el-input v-model="form.mgroup_name" placeholder="关联工段" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="当班班次" prop="shift">
|
||||
<el-input v-model="form.shift_name" placeholder="当班班次" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="开始时间" prop="start_time">
|
||||
<el-date-picker
|
||||
disabled
|
||||
v-model="form.start_time"
|
||||
type="datetime"
|
||||
format="YYYY-MM-DD HH:mm"
|
||||
placeholder="基础月份"
|
||||
style="width: 100%;"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="结束时间" prop="end_time">
|
||||
<el-date-picker
|
||||
disabled
|
||||
v-model="form.end_time"
|
||||
type="datetime"
|
||||
format="YYYY-MM-DD HH:mm"
|
||||
placeholder="对比月份"
|
||||
style="width: 100%;"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="当班班组" prop="team">
|
||||
<el-select
|
||||
v-model="form.team"
|
||||
placeholder="当班班组"
|
||||
clearable
|
||||
style="width: 100%;"
|
||||
@change="teamChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in teamOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="班组班长" prop="leader_name">
|
||||
<el-input v-model="form.leader_name" placeholder="班组班长" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col>
|
||||
<el-form-item label="生产情况记录">
|
||||
<el-input
|
||||
type="textarea"
|
||||
:rows="4"
|
||||
v-model="form.note"
|
||||
placeholder="生产情况记录"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-main>
|
||||
<el-footer>
|
||||
<el-button type="primary" :loading="isSaveing" @click="submit">保存</el-button>
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
</el-footer>
|
||||
</el-container>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
emits: ["success", "closed"],
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
mode: "add",
|
||||
titleMap: {
|
||||
add: "交接班日志",
|
||||
edit: "交接班日志",
|
||||
show: "查看交接班日志",
|
||||
},
|
||||
form: {
|
||||
type:10,
|
||||
},
|
||||
rules: {
|
||||
name: [{required: true, message: "请输入", trigger: "blur"}],
|
||||
number: [{required: true, message: "请输入", trigger: "blur"}],
|
||||
keeper_name: [{required: true, message: "请输入", trigger: "blur"}],
|
||||
belong_dept: [{required: true, message: "请选择", trigger: "blur"}]
|
||||
},
|
||||
visible: false,
|
||||
isSaveing: false,
|
||||
keeperOptions: [],
|
||||
depOptions: [],
|
||||
selectionFilters: [],
|
||||
setFiltersVisible: false,
|
||||
teamOptions:[],
|
||||
shiftOptions:[],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
//获取班组
|
||||
this.getTeam();
|
||||
this.getShfit();
|
||||
},
|
||||
methods: {
|
||||
getTeam(){
|
||||
this.$API.mtm.team.list.req({page:0}).then(res=>{
|
||||
this.teamOptions = res;
|
||||
})
|
||||
},
|
||||
getShfit(){
|
||||
this.$API.mtm.shift.req({page:0}).then(res=>{
|
||||
this.shiftOptions = res;
|
||||
})
|
||||
},
|
||||
//显示
|
||||
open(mode = "add") {
|
||||
this.mode = mode;
|
||||
this.visible = true;
|
||||
return this;
|
||||
},
|
||||
teamChange(data){
|
||||
let that = this;
|
||||
that.teamOptions.forEach(item=>{
|
||||
if(item.id==data){
|
||||
that.form.leader_name = item.leader_name;
|
||||
that.form.leader= item.leader;
|
||||
}
|
||||
})
|
||||
},
|
||||
//表单提交方法
|
||||
submit() {
|
||||
this.$refs.dialogForm.validate(async (valid) => {
|
||||
if (valid) {
|
||||
this.isSaveing = true;
|
||||
try {
|
||||
let obj={};
|
||||
obj.note = this.form.note;
|
||||
obj.team = this.form.team;
|
||||
obj.shift = this.form.shift;
|
||||
obj.leader = this.form.leader;
|
||||
this.$API.wpm.sflog.update.req(this.form.id,obj).then(res=>{
|
||||
this.isSaveing = false;
|
||||
this.$emit("success", this.form, this.mode);
|
||||
this.visible = false;
|
||||
this.$message.success("操作成功");
|
||||
return res;
|
||||
})
|
||||
} catch (err) {
|
||||
//可以处理校验错误
|
||||
this.isSaveing = false;
|
||||
return err;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
//表单注入数据
|
||||
setData(data) {
|
||||
Object.assign(this.form,data);
|
||||
},
|
||||
//设置过滤项
|
||||
setFilters(filters) {
|
||||
this.selectionFilters = filters;
|
||||
this.setFiltersVisible = true;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
</style>
|
||||
|
||||
|
|
@ -0,0 +1,189 @@
|
|||
<template>
|
||||
<el-dialog
|
||||
:title="titleMap[mode]"
|
||||
v-model="visible"
|
||||
:size="1000"
|
||||
destroy-on-close
|
||||
@closed="$emit('closed')"
|
||||
>
|
||||
<el-container v-loading="loading">
|
||||
<el-main style="padding: 0 20px 20px 20px">
|
||||
<el-form
|
||||
ref="dialogForm"
|
||||
:model="form"
|
||||
label-width="100px"
|
||||
label-position="right"
|
||||
:rules="rules"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="关联工段" prop="mgroup">
|
||||
<el-input v-model="form.mgroup_name" placeholder="关联工段" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="当班班次">
|
||||
<el-input v-model="form.shift_name" placeholder="当班班次" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="开始时间" prop="start_time">
|
||||
<el-input v-model="form.start_time" placeholder="结束时间" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="结束时间" prop="end_time">
|
||||
<el-input v-model="form.end_time" placeholder="结束时间" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="当班班组" prop="team">
|
||||
<el-input v-model="form.team_name" placeholder="班组班长" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="班组班长" prop="leader_name">
|
||||
<el-input v-model="form.leader_name" placeholder="班组班长" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="检测时间" prop="time">
|
||||
<el-date-picker
|
||||
v-model="form.time"
|
||||
type="datetime"
|
||||
value-format="YYYY-MM-DD HH:mm"
|
||||
format="YYYY-MM-DD HH:mm"
|
||||
placeholder="检测时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24" class="formUnitWrap">
|
||||
<el-form-item label="水耗统计" prop="val">
|
||||
<el-input-number v-model="form.val" :precision="2" controls-position="right" placeholder="水耗统计" style="width: 100%;"></el-input-number>
|
||||
</el-form-item>
|
||||
<span class="formUnit">(t)</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-main>
|
||||
<el-footer>
|
||||
<el-button type="primary" :loading="isSaveing" @click="submit">保存</el-button>
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
</el-footer>
|
||||
</el-container>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
emits: ["success", "closed"],
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
mode: "add",
|
||||
titleMap: {
|
||||
add: "其他能源录入",
|
||||
edit: "其他能源录入",
|
||||
show: "其他能源录入",
|
||||
},
|
||||
form: {
|
||||
type:10,
|
||||
},
|
||||
rules: {
|
||||
val: [{required: true, message: "请输入检测值", trigger: "blur"}],
|
||||
time: [{required: true, message: "请选择检测时间", trigger: "blur"}]
|
||||
},
|
||||
visible: false,
|
||||
isSaveing: false,
|
||||
keeperOptions: [],
|
||||
depOptions: [],
|
||||
selectionFilters: [],
|
||||
setFiltersVisible: false,
|
||||
teamOptions:[],
|
||||
shiftOptions:[],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
//获取班组
|
||||
this.getTeam();
|
||||
this.getShfit();
|
||||
},
|
||||
methods: {
|
||||
getTeam(){
|
||||
this.$API.mtm.team.list.req({page:0}).then(res=>{
|
||||
this.teamOptions = res;
|
||||
})
|
||||
},
|
||||
getShfit(){
|
||||
this.$API.mtm.shift.req({page:0}).then(res=>{
|
||||
this.shiftOptions = res;
|
||||
})
|
||||
},
|
||||
//显示
|
||||
open(mode = "add") {
|
||||
this.mode = mode;
|
||||
this.visible = true;
|
||||
return this;
|
||||
},
|
||||
teamChange(data){
|
||||
let that = this;
|
||||
that.teamOptions.forEach(item=>{
|
||||
if(item.id==data){
|
||||
that.form.leader_name = item.leader_name;
|
||||
that.form.leader= item.leader;
|
||||
}
|
||||
})
|
||||
},
|
||||
//表单提交方法
|
||||
submit() {
|
||||
this.$refs.dialogForm.validate(async (valid) => {
|
||||
if (valid) {
|
||||
this.isSaveing = true;
|
||||
try {
|
||||
let obj={};
|
||||
debugger;
|
||||
obj.year_s = this.form.time.slice(0,4);
|
||||
obj.month_s = this.form.time.slice(5,7);
|
||||
obj.day_s = this.form.time.slice(8,10);
|
||||
obj.hour = this.form.time.slice(11,13);
|
||||
obj.val = this.form.val;
|
||||
obj.sflog = this.form.id;
|
||||
obj.material = '3349350755361792000';
|
||||
obj.mpoint = '3349214860667219968';
|
||||
this.$API.enm.mpoint.statCreate.req(obj).then(res=>{
|
||||
this.isSaveing = false;
|
||||
this.$emit("success", this.form, this.mode);
|
||||
this.visible = false;
|
||||
this.$message.success("操作成功");
|
||||
return res;
|
||||
})
|
||||
} catch (err) {
|
||||
//可以处理校验错误
|
||||
this.isSaveing = false;
|
||||
return err;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
//表单注入数据
|
||||
setData(data) {
|
||||
Object.assign(this.form,data);
|
||||
},
|
||||
//设置过滤项
|
||||
setFilters(filters) {
|
||||
this.selectionFilters = filters;
|
||||
this.setFiltersVisible = true;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.formUnit{
|
||||
position: absolute;
|
||||
right: -17px;
|
||||
top: 7px;
|
||||
}
|
||||
.formUnitWrap{
|
||||
position: relative;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
|
@ -0,0 +1,211 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="exportExcel()"
|
||||
:loading = "exportLoading"
|
||||
>导出xlsx
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="handlePrint"
|
||||
>打印
|
||||
</el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-card style="margin-top:5px">
|
||||
<div ref="print" id="myReport" class="printContainer">
|
||||
<h3 style="text-align: center;">主要设备(100KW以上)单位产品电耗数据表</h3>
|
||||
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable">
|
||||
<thead style="background: #efefef;height: 40px;">
|
||||
<tr>
|
||||
<th>设备名称</th>
|
||||
<th>设备编号</th>
|
||||
<th>单位</th>
|
||||
<th>上个小时</th>
|
||||
<th>昨日</th>
|
||||
<th>本月</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item) in tableDatas" :key="item">
|
||||
<td class="numCell">{{item.name}}</td>
|
||||
<td class="numCell">{{item.number}}</td>
|
||||
<td class="numCell">{{item.unit}}</td>
|
||||
<td class="numCell hoursItem" @click="itemClick('hours',item)" style="background: rgba(238, 179, 179, 0.8);">{{item.hours}}</td>
|
||||
<td class="numCell monthItem" @click="itemClick('month',item)" style="background: rgba(238, 189, 124, 0.8);">{{item.days}}</td>
|
||||
<td class="numCell yearItem" @click="itemClick1('year',item)" style="background: rgba(186, 236, 135, 0.8);">{{item.month}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<sc-dialog v-model="chartShow" draggable title="创建/编辑人员证书">
|
||||
<div class="searchHead" v-if="type=='hours'">
|
||||
<el-date-picker
|
||||
v-model="query.start_time"
|
||||
type="date"
|
||||
placeholder="选择时间"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<span class="middleText">至</span>
|
||||
<el-date-picker
|
||||
v-model="query.end_time"
|
||||
type="date"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
start-placeholder="结束日期"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-button type="primary" class="searchBtn" @click="dataSearch">查询</el-button>
|
||||
</div>
|
||||
<div class="searchHead" v-if="type=='days'">
|
||||
<el-date-picker
|
||||
v-model="query.start_time"
|
||||
type="date"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
start-placeholder="开始日期"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-date-picker
|
||||
v-model="query.end_time"
|
||||
type="date"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
start-placeholder="结束日期"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-button type="primary" class="searchBtn" @click="dataSearch">查询</el-button>
|
||||
</div>
|
||||
<div class="searchHead" v-if="type=='month'">
|
||||
<el-date-picker
|
||||
v-model="query.start_time"
|
||||
type="month"
|
||||
format="YYYY-MM"
|
||||
value-format="YYYY-MM"
|
||||
start-placeholder="开始月份"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-date-picker
|
||||
v-model="query.end_time"
|
||||
type="month"
|
||||
format="YYYY-MM"
|
||||
value-format="YYYY-MM"
|
||||
start-placeholder="结束月份"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-button type="primary" class="searchBtn" @click="dataSearch">查询</el-button>
|
||||
</div>
|
||||
<scEcharts height="360px" :option="myOption" v-if="chartShow"></scEcharts>
|
||||
</sc-dialog>
|
||||
<charts
|
||||
v-if="asynDialog"
|
||||
:type="type"
|
||||
:title="title"
|
||||
:modelValue="modelValue"
|
||||
:showClose="showClose"
|
||||
:echartType='echartType'
|
||||
@closed="asynDialog = false"
|
||||
></charts>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import scEcharts from "@/components/scEcharts";
|
||||
import { defineAsyncComponent } from 'vue'
|
||||
export default {
|
||||
components: {
|
||||
scEcharts,
|
||||
charts: defineAsyncComponent(() => import("@/components/scEnm/lineChartsdialog.vue")),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
chartShow: false,
|
||||
myOption: null,
|
||||
timeStamp:0,
|
||||
listQuery:{
|
||||
belong_dept:'',
|
||||
task2__year:'',
|
||||
page:0
|
||||
},
|
||||
query:{
|
||||
time:''
|
||||
},
|
||||
tableName:'主要设备(100KW以上)单位产品电耗数据表',
|
||||
tableDatas:[
|
||||
{name:'烘干破主电机',number:'NM001',unit:'KW·h/t',hours:'120',days:'2000',month:'60000'},
|
||||
],
|
||||
modelValue:true,
|
||||
type:'hours',
|
||||
title:'title',
|
||||
apiObj:'',
|
||||
showClose:true,
|
||||
echartType:'line',
|
||||
asynDialog:false,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
|
||||
itemClick(type,item){
|
||||
this.type=type;
|
||||
this.asynDialog = true;
|
||||
},
|
||||
itemClick1(type,item){
|
||||
this.chartShow = false;
|
||||
this.$API.bi.dataset.exec
|
||||
.req('3322567213885833216')
|
||||
.then((res) => {
|
||||
this.myOption = JSON.parse(res.echart_options);
|
||||
debugger;
|
||||
console.log(this.myOption)
|
||||
this.chartShow = true;
|
||||
});
|
||||
},
|
||||
handlePrint() {
|
||||
this.$PRINT('#myReport');
|
||||
},
|
||||
exportExcel() {
|
||||
this.exportLoading = true;
|
||||
this.$XLSX('#myTable', this.tableName)
|
||||
this.exportLoading = false;
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.printContainer{
|
||||
width: 1075px;
|
||||
}
|
||||
#numTable{
|
||||
margin-left: 37px;
|
||||
}
|
||||
#numTable td{
|
||||
height: 32px;
|
||||
padding-left: 5px;
|
||||
}
|
||||
.numCell{
|
||||
width: 80px;
|
||||
height: 35px;
|
||||
}
|
||||
.numCell.numCell_last{
|
||||
width: 100px;
|
||||
}
|
||||
.searchHead{
|
||||
display:flex
|
||||
}
|
||||
.middleText{
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
margin: 0 5px;
|
||||
display: inline-block;
|
||||
}
|
||||
.searchBtn{
|
||||
margin-left: 5px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,253 @@
|
|||
<template>
|
||||
<el-dialog
|
||||
:title="titleMap[mode]"
|
||||
v-model="visible"
|
||||
:size="1000"
|
||||
destroy-on-close
|
||||
id="bigDialog"
|
||||
class="bigDialog"
|
||||
@closed="$emit('closed')"
|
||||
>
|
||||
<el-container v-loading="loading">
|
||||
<el-main style="padding: 0 20px 20px 20px">
|
||||
<el-form
|
||||
ref="dialogForm"
|
||||
:model="form"
|
||||
label-width="85px"
|
||||
label-position="right"
|
||||
:rules="rule1"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="关联工段">
|
||||
<el-input v-model="form.mgroup_name" placeholder="关联工段" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="当前班次">
|
||||
<el-input v-model="form.shift_name" placeholder="当前班次" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="当前班组">
|
||||
<el-input v-model="form.team_name" placeholder="当前班组" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="班组组长">
|
||||
<el-input v-model="form.team_name" placeholder="班组组长" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="开始时间">
|
||||
<el-input v-model="form.start_time" placeholder="开始时间" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="结束时间">
|
||||
<el-input v-model="form.end_time" placeholder="结束时间" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-divider />
|
||||
</el-row>
|
||||
|
||||
<!-- <el-row>
|
||||
<el-col :lg="8" :md="12">
|
||||
<el-form-item label="关联产物" prop="material">
|
||||
<el-select
|
||||
v-model="form.material"
|
||||
placeholder="关联产物"
|
||||
clearable
|
||||
style="width: 100%;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in teamOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :lg="8" :md="12">
|
||||
<el-form-item label="质检项目" prop="testitem">
|
||||
<el-select
|
||||
v-model="form.testitem"
|
||||
placeholder="质检项目"
|
||||
clearable
|
||||
style="width: 100%;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in teamOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :lg="8" :md="12">
|
||||
<el-form-item label="平均值" prop="team">
|
||||
<el-input v-model="form.number" placeholder="平均值" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :lg="8" :md="12">
|
||||
<el-form-item label="检验次数" prop="mgroup">
|
||||
<el-input v-model="form.number" placeholder="检验次数"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :lg="8" :md="12">
|
||||
<el-form-item label="合格次数" prop="number">
|
||||
<el-input v-model="form.number" placeholder="合格次数"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-divider />
|
||||
</el-row> -->
|
||||
</el-form>
|
||||
<sc-form-table
|
||||
v-model="form.list"
|
||||
:addTemplate="addTemplate"
|
||||
placeholder="暂无数据"
|
||||
>
|
||||
<el-table-column prop="material" label="关联产物" min-width="150">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.id">{{ scope.row.material_name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="testitem" label="质检项目" min-width="150">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.id">{{ scope.row.testitem_name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="val_avg" label="平均值" min-width="150">
|
||||
<template #default="scope">
|
||||
<el-input
|
||||
v-model="scope.row.val_avg"
|
||||
placeholder="请输入内容"
|
||||
></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="num_test" label="检验次数" min-width="150">
|
||||
<template #default="scope">
|
||||
<el-input
|
||||
v-model="scope.row.num_test"
|
||||
placeholder="请输入内容"
|
||||
></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="num_ok" label="合格次数" min-width="150">
|
||||
<template #default="scope">
|
||||
<el-input
|
||||
v-model="scope.row.num_ok"
|
||||
placeholder="请输入内容"
|
||||
></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</sc-form-table>
|
||||
</el-main>
|
||||
<el-footer>
|
||||
<el-button type="primary" :loading="isSaveing" @click="submit">保存</el-button>
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
</el-footer>
|
||||
</el-container>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
emits: ["success", "closed"],
|
||||
data() {
|
||||
return {
|
||||
addTemplate: {
|
||||
material: "",
|
||||
testitem: "",
|
||||
val_avg: "",
|
||||
num_test: "",
|
||||
num_ok: "",
|
||||
},
|
||||
loading: false,
|
||||
mode: "add",
|
||||
titleMap: {
|
||||
add: "质量检验",
|
||||
edit: "质量检验",
|
||||
show: "质量检验",
|
||||
},
|
||||
form: {
|
||||
type:10,
|
||||
list:[]
|
||||
},
|
||||
rules: {
|
||||
name: [{required: true, message: "请输入", trigger: "blur"}],
|
||||
number: [{required: true, message: "请输入", trigger: "blur"}],
|
||||
keeper_name: [{required: true, message: "请输入", trigger: "blur"}],
|
||||
belong_dept: [{required: true, message: "请选择", trigger: "blur"}]
|
||||
},
|
||||
visible: false,
|
||||
isSaveing: false,
|
||||
keeperOptions: [],
|
||||
depOptions: [],
|
||||
selectionFilters: [],
|
||||
setFiltersVisible: false,
|
||||
teamOptions:[],
|
||||
shiftOptions:[],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
//是否已经保存过
|
||||
//若新增,调用init接口,若编辑修改,调get接口
|
||||
},
|
||||
methods: {
|
||||
|
||||
//显示
|
||||
open(mode = "add") {
|
||||
this.mode = mode;
|
||||
this.visible = true;
|
||||
return this;
|
||||
},
|
||||
getReceptionist(data) {
|
||||
this.form.leader=data.id;
|
||||
this.form.leader_name=data.name
|
||||
},
|
||||
//表单提交方法
|
||||
submit() {
|
||||
this.isSaveing = true;
|
||||
this.$API.qm.updateQuastat.req('bulk',this.form.list).then(res=>{
|
||||
this.isSaveing = false;
|
||||
this.$emit("success", this.form, this.mode);
|
||||
this.visible = false;
|
||||
this.$message.success("操作成功");
|
||||
}).catch(res=>{
|
||||
this.isSaveing = false;
|
||||
})
|
||||
// this.$refs.dialogForm.validate(async (valid) => {
|
||||
// if (valid) {
|
||||
|
||||
// }
|
||||
// });
|
||||
},
|
||||
//表单注入数据
|
||||
setData(data) {
|
||||
Object.assign(this.form,data);
|
||||
this.getsflogItem(this.form.id);
|
||||
},
|
||||
getsflogItem(id){
|
||||
this.$API.wpm.sflog.init_test.req(id).then(res=>{
|
||||
this.form.list = res;
|
||||
})
|
||||
},
|
||||
//设置过滤项
|
||||
setFilters(filters) {
|
||||
this.selectionFilters = filters;
|
||||
this.setFiltersVisible = true;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
#bigDialog{
|
||||
width: 90%;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
|
@ -0,0 +1,239 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="exportExcel()"
|
||||
:loading = "exportLoading"
|
||||
>导出xlsx
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="handlePrint"
|
||||
>打印
|
||||
</el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-card style="margin-top:5px">
|
||||
<div ref="print" id="myReport" class="printContainer">
|
||||
<h3 style="text-align: center;">生产报告</h3>
|
||||
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable">
|
||||
<thead style="background: #efefef;height: 40px;">
|
||||
<tr>
|
||||
<th colspan="2">参数</th>
|
||||
<th>上个小时</th>
|
||||
<th>昨日</th>
|
||||
<th>本月</th>
|
||||
<th>本年</th>
|
||||
<th>月目标值</th>
|
||||
<th>月完成度</th>
|
||||
<th>年目标值</th>
|
||||
<th>年完成度</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item) in tableDatas" :key="item">
|
||||
<td class="numCell">{{item[0]}}</td>
|
||||
<td class="numCell">{{item[1]}}</td>
|
||||
<td class="numCell hoursItem" @click="itemClick('hours',item)" style="background: rgba(238, 179, 179, 0.8);">{{item[2]}}</td>
|
||||
<td class="numCell daysItem" @click="itemClick('days',item)" style="background: rgba(239, 90, 90, 0.8);">{{item[3]}}</td>
|
||||
<td class="numCell monthItem" @click="itemClick('month',item)" style="background: rgba(238, 189, 124, 0.8);">{{item[4]}}</td>
|
||||
<td class="numCell yearItem" @click="itemClick1('year',item)" style="background: rgba(186, 236, 135, 0.8);">{{item[5]}}</td>
|
||||
<td class="numCell">{{item[6]}}</td>
|
||||
<td class="numCell">{{item[7]}}</td>
|
||||
<td class="numCell">{{item[8]}}</td>
|
||||
<td class="numCell">{{item[9]}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<sc-dialog v-model="chartShow" draggable title="水泥磨工段">
|
||||
<div class="searchHead" v-if="type=='hours'">
|
||||
<el-date-picker
|
||||
v-model="query.start_time"
|
||||
type="date"
|
||||
placeholder="选择时间"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<span class="middleText">至</span>
|
||||
<el-date-picker
|
||||
v-model="query.end_time"
|
||||
type="date"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
start-placeholder="结束日期"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-button type="primary" class="searchBtn" @click="dataSearch">查询</el-button>
|
||||
</div>
|
||||
<div class="searchHead" v-if="type=='days'">
|
||||
<el-date-picker
|
||||
v-model="query.start_time"
|
||||
type="date"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
start-placeholder="开始日期"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-date-picker
|
||||
v-model="query.end_time"
|
||||
type="date"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
start-placeholder="结束日期"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-button type="primary" class="searchBtn" @click="dataSearch">查询</el-button>
|
||||
</div>
|
||||
<div class="searchHead" v-if="type=='month'">
|
||||
<el-date-picker
|
||||
v-model="query.start_time"
|
||||
type="month"
|
||||
format="YYYY-MM"
|
||||
value-format="YYYY-MM"
|
||||
start-placeholder="开始月份"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-date-picker
|
||||
v-model="query.end_time"
|
||||
type="month"
|
||||
format="YYYY-MM"
|
||||
value-format="YYYY-MM"
|
||||
start-placeholder="结束月份"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-button type="primary" class="searchBtn" @click="dataSearch">查询</el-button>
|
||||
</div>
|
||||
<div class="searchHead" v-if="type=='year'">
|
||||
<el-date-picker
|
||||
v-model="query.start_time"
|
||||
type="year"
|
||||
format="YYYY"
|
||||
value-format="YYYY"
|
||||
start-placeholder="开始日期"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-date-picker
|
||||
v-model="query.end_time"
|
||||
type="year"
|
||||
format="YYYY"
|
||||
value-format="YYYY"
|
||||
start-placeholder="结束日期"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-button type="primary" class="searchBtn" @click="dataSearch">查询</el-button>
|
||||
</div>
|
||||
<scEcharts height="360px" :option="myOption" v-if="chartShow"></scEcharts>
|
||||
</sc-dialog>
|
||||
<charts
|
||||
v-if="asynDialog"
|
||||
:type="type"
|
||||
:title="title"
|
||||
:modelValue="modelValue"
|
||||
:showClose="showClose"
|
||||
:echartType='echartType'
|
||||
@closed="asynDialog = false"
|
||||
></charts>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import scEcharts from "@/components/scEcharts";
|
||||
import { defineAsyncComponent } from 'vue'
|
||||
export default {
|
||||
components: {
|
||||
scEcharts,
|
||||
charts: defineAsyncComponent(() => import("@/components/scEnm/lineChartsdialog.vue")),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
chartShow: false,
|
||||
myOption: null,
|
||||
timeStamp:0,
|
||||
listQuery:{
|
||||
belong_dept:'',
|
||||
task2__year:'',
|
||||
page:0
|
||||
},
|
||||
query:{
|
||||
time:''
|
||||
},
|
||||
tableDatas:[
|
||||
['产量','总产量(t)',0,0,0,0,0,0,0,0],
|
||||
['能耗','单位产品分布电耗(KW·h/t)',1,1,1,1,1,1,1,1],
|
||||
],
|
||||
tableName:'生产报告',
|
||||
modelValue:true,
|
||||
type:'hours',
|
||||
title:'水泥磨工段',
|
||||
apiObj:'',
|
||||
showClose:true,
|
||||
echartType:'line',
|
||||
asynDialog:false,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
|
||||
itemClick(type,item){
|
||||
this.type=type;
|
||||
this.asynDialog = true;
|
||||
},
|
||||
itemClick1(type,item){
|
||||
this.chartShow = false;
|
||||
this.$API.bi.dataset.exec
|
||||
.req('3322567213885833216')
|
||||
.then((res) => {
|
||||
this.myOption = JSON.parse(res.echart_options);
|
||||
debugger;
|
||||
console.log(this.myOption)
|
||||
this.chartShow = true;
|
||||
});
|
||||
},
|
||||
handlePrint() {
|
||||
this.$PRINT('#myReport');
|
||||
},
|
||||
exportExcel() {
|
||||
this.exportLoading = true;
|
||||
this.$XLSX('#myTable', this.tableName)
|
||||
this.exportLoading = false;
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.printContainer{
|
||||
width: 1075px;
|
||||
}
|
||||
#numTable{
|
||||
margin-left: 37px;
|
||||
}
|
||||
#numTable td{
|
||||
height: 32px;
|
||||
padding-left: 5px;
|
||||
}
|
||||
.numCell{
|
||||
width: 80px;
|
||||
height: 35px;
|
||||
text-align: center;
|
||||
}
|
||||
.numCell.numCell_last{
|
||||
width: 100px;
|
||||
}
|
||||
.searchHead{
|
||||
display:flex
|
||||
}
|
||||
.middleText{
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
margin: 0 5px;
|
||||
display: inline-block;
|
||||
}
|
||||
.searchBtn{
|
||||
margin-left: 5px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,155 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-date-picker
|
||||
v-model="query.time"
|
||||
type="month"
|
||||
value-format="YYYY-MM"
|
||||
format="YYYY-MM"
|
||||
placeholder="基础月份"
|
||||
/>
|
||||
<el-date-picker
|
||||
v-model="query.time2"
|
||||
type="month"
|
||||
value-format="YYYY-MM"
|
||||
format="YYYY-MM"
|
||||
placeholder="对比月份"
|
||||
/>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="handleQuery"
|
||||
></el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="exportExcel()"
|
||||
:loading = "exportLoading"
|
||||
>导出xlsx
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="handlePrint"
|
||||
>打印
|
||||
</el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-card style="margin-top:5px">
|
||||
<div ref="print" id="myReport" class="printContainer">
|
||||
<h3 style="text-align: center;">主要设备(100KW以上)单位产品电耗数据表</h3>
|
||||
<table border="1" cellspacing="0" :key="timeStamp" id="myTable">
|
||||
<thead style="background: #efefef;height: 40px;">
|
||||
<tr>
|
||||
<th>月份</th>
|
||||
<th>班组</th>
|
||||
<th>总产量(t)</th>
|
||||
<th>当期单位产品电耗(kW·h/h)</th>
|
||||
<th>单位产品电耗目标值(kW·h/h)</th>
|
||||
<th>当期单位产品电耗与目标值差值(kW·h/h)</th>
|
||||
<th>环期单位产品电耗(kW·h/h)</th>
|
||||
<th>当期单位产品电耗与环期差值(kW·h/h)</th>
|
||||
<th>当期单位产品电耗环比增长率(%)</th>
|
||||
<th>同比增长率(%)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr v-for="(item,index) in tableDatas" :key="index">
|
||||
<td v-if="index%3==0" rowspan="3" style="width:50px">{{item.month}}</td>
|
||||
<td class="numCell">{{item.name}}</td>
|
||||
<td class="numCell">{{item.number}}</td>
|
||||
<td class="numCell">{{item.unit}}</td>
|
||||
<td class="numCell">{{item.hours}}</td>
|
||||
<td class="numCell">{{item.days}}</td>
|
||||
<td class="numCell">{{item.months}}</td>
|
||||
<td class="numCell">{{item.hours}}</td>
|
||||
<td class="numCell">{{item.days}}</td>
|
||||
<td class="numCell">{{item.months}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
timeStamp:0,
|
||||
listQuery:{
|
||||
belong_dept:'',
|
||||
task2__year:'',
|
||||
page:0
|
||||
},
|
||||
query:{
|
||||
time:'',
|
||||
time2:'',
|
||||
},
|
||||
tableDatas:[
|
||||
{month:'2023.1',name:'甲组',number:'NM001',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
{month:'2023.1',name:'乙组',number:'NM002',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
{month:'2023.1',name:'丙组',number:'NM003',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
{month:'2023.2',name:'甲组',number:'NM004',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
{month:'2023.2',name:'乙组',number:'NM005',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
{month:'2023.2',name:'丙组',number:'NM006',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
|
||||
itemClick(type,item){
|
||||
this.type=type;
|
||||
this.asynDialog = true;
|
||||
},
|
||||
itemClick1(type,item){
|
||||
this.chartShow = false;
|
||||
this.$API.bi.dataset.exec
|
||||
.req('3322567213885833216')
|
||||
.then((res) => {
|
||||
this.myOption = JSON.parse(res.echart_options);
|
||||
debugger;
|
||||
console.log(this.myOption)
|
||||
this.chartShow = true;
|
||||
});
|
||||
},
|
||||
handlePrint() {
|
||||
this.$PRINT('#myReport');
|
||||
},
|
||||
exportExcel() {
|
||||
this.exportLoading = true;
|
||||
this.$XLSX('#myTable', this.tableName)
|
||||
this.exportLoading = false;
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.printContainer{
|
||||
width: 1075px;
|
||||
}
|
||||
#numTable{
|
||||
margin-left: 37px;
|
||||
}
|
||||
#numTable td{
|
||||
height: 32px;
|
||||
padding-left: 5px;
|
||||
}
|
||||
.numCell{
|
||||
width: 80px;
|
||||
}
|
||||
.numCell.numCell_last{
|
||||
width: 100px;
|
||||
}
|
||||
.searchHead{
|
||||
display:flex
|
||||
}
|
||||
.middleText{
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
margin: 0 5px;
|
||||
display: inline-block;
|
||||
}
|
||||
.searchBtn{
|
||||
margin-left: 5px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,159 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-date-picker
|
||||
v-model="monthrange"
|
||||
type="monthrange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始月份"
|
||||
end-placeholder="结束月份"
|
||||
value-format="YYYY-MM"
|
||||
format="YYYY-MM"
|
||||
/>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="handleQuery"
|
||||
></el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="exportExcel()"
|
||||
:loading = "exportLoading"
|
||||
>导出xlsx
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="handlePrint"
|
||||
>打印
|
||||
</el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-card style="margin-top:5px">
|
||||
<div ref="print" id="myReport" class="printContainer">
|
||||
<h3 style="text-align: center;">车间单位产品电耗月度分析表</h3>
|
||||
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable">
|
||||
<thead style="background: #efefef;height: 40px;">
|
||||
<tr>
|
||||
<th>月份</th>
|
||||
<th>当期值(KW·h/t)</th>
|
||||
<th>目标值(KW·h/t)</th>
|
||||
<th>当期与目标差值(KW·h/t)</th>
|
||||
<th>环期值(KW·h/t)</th>
|
||||
<th>当期与环期差值(KW·h/t)</th>
|
||||
<th>环比增长率(%)</th>
|
||||
<th>同比增长率(%)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item) in tableDatas" :key="item">
|
||||
<td class="numCell">{{item.month}}</td>
|
||||
<td class="numCell">{{item.value1}}</td>
|
||||
<td class="numCell">{{item.value2}}</td>
|
||||
<td class="numCell">{{item.value3}}</td>
|
||||
<td class="numCell">{{item.value4}}</td>
|
||||
<td class="numCell">{{item.value5}}</td>
|
||||
<td class="numCell">{{item.value6}}</td>
|
||||
<td class="numCell">{{item.value7}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import scEcharts from "@/components/scEcharts";
|
||||
import { defineAsyncComponent } from 'vue'
|
||||
export default {
|
||||
components: {
|
||||
scEcharts,
|
||||
charts: defineAsyncComponent(() => import("@/components/scEnm/lineChartsdialog.vue")),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
chartShow: false,
|
||||
myOption: null,
|
||||
timeStamp:0,
|
||||
listQuery:{
|
||||
belong_dept:'',
|
||||
task2__year:'',
|
||||
page:0
|
||||
},
|
||||
query:{
|
||||
time:''
|
||||
},
|
||||
tableDatas:[
|
||||
{month:'2023-05',value1:'1203',value2:'1200',value3:'3',value4:'1150',value5:'50',value6:'0.4',value7:'0.4'},
|
||||
{month:'2023-06',value1:'1203',value2:'1200',value3:'3',value4:'1150',value5:'50',value6:'0.4',value7:'0.4'},
|
||||
{month:'2023-07',value1:'1203',value2:'1200',value3:'3',value4:'1150',value5:'50',value6:'0.4',value7:'0.4'},
|
||||
],
|
||||
modelValue:true,
|
||||
type:'hours',
|
||||
title:'title',
|
||||
apiObj:'',
|
||||
showClose:true,
|
||||
echartType:'line',
|
||||
asynDialog:false,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
|
||||
itemClick(type,item){
|
||||
this.type=type;
|
||||
this.asynDialog = true;
|
||||
},
|
||||
itemClick1(type,item){
|
||||
this.chartShow = false;
|
||||
this.$API.bi.dataset.exec
|
||||
.req('3322567213885833216')
|
||||
.then((res) => {
|
||||
this.myOption = JSON.parse(res.echart_options);
|
||||
debugger;
|
||||
console.log(this.myOption)
|
||||
this.chartShow = true;
|
||||
});
|
||||
},
|
||||
handlePrint() {
|
||||
this.$PRINT('#myReport');
|
||||
},
|
||||
exportExcel() {
|
||||
this.exportLoading = true;
|
||||
this.$XLSX('#myTable', this.tableName)
|
||||
this.exportLoading = false;
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.printContainer{
|
||||
width: 1075px;
|
||||
}
|
||||
#numTable{
|
||||
margin-left: 37px;
|
||||
}
|
||||
#numTable td{
|
||||
height: 32px;
|
||||
padding-left: 5px;
|
||||
}
|
||||
.numCell{
|
||||
width: 80px;
|
||||
}
|
||||
.numCell.numCell_last{
|
||||
width: 100px;
|
||||
}
|
||||
.searchHead{
|
||||
display:flex
|
||||
}
|
||||
.middleText{
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
margin: 0 5px;
|
||||
display: inline-block;
|
||||
}
|
||||
.searchBtn{
|
||||
margin-left: 5px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,198 @@
|
|||
<template>
|
||||
<el-dialog
|
||||
:title="titleMap[mode]"
|
||||
v-model="visible"
|
||||
:size="1000"
|
||||
destroy-on-close
|
||||
@closed="$emit('closed')"
|
||||
>
|
||||
<el-container v-loading="loading">
|
||||
<el-main style="padding: 0 20px 20px 20px">
|
||||
<el-form
|
||||
ref="dialogForm"
|
||||
:model="form"
|
||||
label-width="100px"
|
||||
label-position="right"
|
||||
:rules="rule1"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="关联工段" prop="mgroup">
|
||||
<el-input v-model="form.mgroup_name" placeholder="关联工段" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="当班班次" prop="shift">
|
||||
<el-input v-model="form.shift_name" placeholder="当班班次" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="开始时间" prop="start_time">
|
||||
<el-date-picker
|
||||
disabled
|
||||
v-model="form.start_time"
|
||||
type="datetime"
|
||||
format="YYYY-MM-DD HH:mm"
|
||||
placeholder="基础月份"
|
||||
style="width: 100%;"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="结束时间" prop="end_time">
|
||||
<el-date-picker
|
||||
disabled
|
||||
v-model="form.end_time"
|
||||
type="datetime"
|
||||
format="YYYY-MM-DD HH:mm"
|
||||
placeholder="对比月份"
|
||||
style="width: 100%;"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="当班班组" prop="team">
|
||||
<el-select
|
||||
v-model="form.team"
|
||||
placeholder="当班班组"
|
||||
clearable
|
||||
style="width: 100%;"
|
||||
@change="teamChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in teamOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="班组班长" prop="leader_name">
|
||||
<el-input v-model="form.leader_name" placeholder="班组班长" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col>
|
||||
<el-form-item label="生产情况记录">
|
||||
<el-input
|
||||
type="textarea"
|
||||
:rows="4"
|
||||
v-model="form.note"
|
||||
placeholder="生产情况记录"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-main>
|
||||
<el-footer>
|
||||
<el-button type="primary" :loading="isSaveing" @click="submit">保存</el-button>
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
</el-footer>
|
||||
</el-container>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
emits: ["success", "closed"],
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
mode: "add",
|
||||
titleMap: {
|
||||
add: "交接班日志",
|
||||
edit: "交接班日志",
|
||||
show: "查看交接班日志",
|
||||
},
|
||||
form: {
|
||||
type:10,
|
||||
},
|
||||
rules: {
|
||||
name: [{required: true, message: "请输入", trigger: "blur"}],
|
||||
number: [{required: true, message: "请输入", trigger: "blur"}],
|
||||
keeper_name: [{required: true, message: "请输入", trigger: "blur"}],
|
||||
belong_dept: [{required: true, message: "请选择", trigger: "blur"}]
|
||||
},
|
||||
visible: false,
|
||||
isSaveing: false,
|
||||
keeperOptions: [],
|
||||
depOptions: [],
|
||||
selectionFilters: [],
|
||||
setFiltersVisible: false,
|
||||
teamOptions:[],
|
||||
shiftOptions:[],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
//获取班组
|
||||
this.getTeam();
|
||||
this.getShfit();
|
||||
},
|
||||
methods: {
|
||||
getTeam(){
|
||||
this.$API.mtm.team.list.req({page:0}).then(res=>{
|
||||
this.teamOptions = res;
|
||||
})
|
||||
},
|
||||
getShfit(){
|
||||
this.$API.mtm.shift.req({page:0}).then(res=>{
|
||||
this.shiftOptions = res;
|
||||
})
|
||||
},
|
||||
//显示
|
||||
open(mode = "add") {
|
||||
this.mode = mode;
|
||||
this.visible = true;
|
||||
return this;
|
||||
},
|
||||
teamChange(data){
|
||||
let that = this;
|
||||
that.teamOptions.forEach(item=>{
|
||||
if(item.id==data){
|
||||
that.form.leader_name = item.leader_name;
|
||||
that.form.leader= item.leader;
|
||||
}
|
||||
})
|
||||
},
|
||||
//表单提交方法
|
||||
submit() {
|
||||
this.$refs.dialogForm.validate(async (valid) => {
|
||||
if (valid) {
|
||||
this.isSaveing = true;
|
||||
try {
|
||||
let obj={};
|
||||
obj.note = this.form.note;
|
||||
obj.team = this.form.team;
|
||||
obj.shift = this.form.shift;
|
||||
obj.leader = this.form.leader;
|
||||
this.$API.wpm.sflog.update.req(this.form.id,obj).then(res=>{
|
||||
this.isSaveing = false;
|
||||
this.$emit("success", this.form, this.mode);
|
||||
this.visible = false;
|
||||
this.$message.success("操作成功");
|
||||
return res;
|
||||
})
|
||||
} catch (err) {
|
||||
//可以处理校验错误
|
||||
this.isSaveing = false;
|
||||
return err;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
//表单注入数据
|
||||
setData(data) {
|
||||
Object.assign(this.form,data);
|
||||
},
|
||||
//设置过滤项
|
||||
setFilters(filters) {
|
||||
this.selectionFilters = filters;
|
||||
this.setFiltersVisible = true;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
</style>
|
||||
|
||||
|
|
@ -0,0 +1,189 @@
|
|||
<template>
|
||||
<el-dialog
|
||||
:title="titleMap[mode]"
|
||||
v-model="visible"
|
||||
:size="1000"
|
||||
destroy-on-close
|
||||
@closed="$emit('closed')"
|
||||
>
|
||||
<el-container v-loading="loading">
|
||||
<el-main style="padding: 0 20px 20px 20px">
|
||||
<el-form
|
||||
ref="dialogForm"
|
||||
:model="form"
|
||||
label-width="100px"
|
||||
label-position="right"
|
||||
:rules="rules"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="关联工段" prop="mgroup">
|
||||
<el-input v-model="form.mgroup_name" placeholder="关联工段" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="当班班次">
|
||||
<el-input v-model="form.shift_name" placeholder="当班班次" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="开始时间" prop="start_time">
|
||||
<el-input v-model="form.start_time" placeholder="结束时间" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="结束时间" prop="end_time">
|
||||
<el-input v-model="form.end_time" placeholder="结束时间" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="当班班组" prop="team">
|
||||
<el-input v-model="form.team_name" placeholder="班组班长" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="班组班长" prop="leader_name">
|
||||
<el-input v-model="form.leader_name" placeholder="班组班长" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="检测时间" prop="time">
|
||||
<el-date-picker
|
||||
v-model="form.time"
|
||||
type="datetime"
|
||||
value-format="YYYY-MM-DD HH:mm"
|
||||
format="YYYY-MM-DD HH:mm"
|
||||
placeholder="检测时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24" class="formUnitWrap">
|
||||
<el-form-item label="水耗统计" prop="val">
|
||||
<el-input-number v-model="form.val" :precision="2" controls-position="right" placeholder="水耗统计" style="width: 100%;"></el-input-number>
|
||||
</el-form-item>
|
||||
<span class="formUnit">(t)</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-main>
|
||||
<el-footer>
|
||||
<el-button type="primary" :loading="isSaveing" @click="submit">保存</el-button>
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
</el-footer>
|
||||
</el-container>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
emits: ["success", "closed"],
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
mode: "add",
|
||||
titleMap: {
|
||||
add: "其他能源录入",
|
||||
edit: "其他能源录入",
|
||||
show: "其他能源录入",
|
||||
},
|
||||
form: {
|
||||
type:10,
|
||||
},
|
||||
rules: {
|
||||
val: [{required: true, message: "请输入检测值", trigger: "blur"}],
|
||||
time: [{required: true, message: "请选择检测时间", trigger: "blur"}]
|
||||
},
|
||||
visible: false,
|
||||
isSaveing: false,
|
||||
keeperOptions: [],
|
||||
depOptions: [],
|
||||
selectionFilters: [],
|
||||
setFiltersVisible: false,
|
||||
teamOptions:[],
|
||||
shiftOptions:[],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
//获取班组
|
||||
this.getTeam();
|
||||
this.getShfit();
|
||||
},
|
||||
methods: {
|
||||
getTeam(){
|
||||
this.$API.mtm.team.list.req({page:0}).then(res=>{
|
||||
this.teamOptions = res;
|
||||
})
|
||||
},
|
||||
getShfit(){
|
||||
this.$API.mtm.shift.req({page:0}).then(res=>{
|
||||
this.shiftOptions = res;
|
||||
})
|
||||
},
|
||||
//显示
|
||||
open(mode = "add") {
|
||||
this.mode = mode;
|
||||
this.visible = true;
|
||||
return this;
|
||||
},
|
||||
teamChange(data){
|
||||
let that = this;
|
||||
that.teamOptions.forEach(item=>{
|
||||
if(item.id==data){
|
||||
that.form.leader_name = item.leader_name;
|
||||
that.form.leader= item.leader;
|
||||
}
|
||||
})
|
||||
},
|
||||
//表单提交方法
|
||||
submit() {
|
||||
this.$refs.dialogForm.validate(async (valid) => {
|
||||
if (valid) {
|
||||
this.isSaveing = true;
|
||||
try {
|
||||
let obj={};
|
||||
debugger;
|
||||
obj.year_s = this.form.time.slice(0,4);
|
||||
obj.month_s = this.form.time.slice(5,7);
|
||||
obj.day_s = this.form.time.slice(8,10);
|
||||
obj.hour = this.form.time.slice(11,13);
|
||||
obj.val = this.form.val;
|
||||
obj.sflog = this.form.id;
|
||||
obj.material = '3349350755361792000';
|
||||
obj.mpoint = '3349214860667219968';
|
||||
this.$API.enm.mpoint.statCreate.req(obj).then(res=>{
|
||||
this.isSaveing = false;
|
||||
this.$emit("success", this.form, this.mode);
|
||||
this.visible = false;
|
||||
this.$message.success("操作成功");
|
||||
return res;
|
||||
})
|
||||
} catch (err) {
|
||||
//可以处理校验错误
|
||||
this.isSaveing = false;
|
||||
return err;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
//表单注入数据
|
||||
setData(data) {
|
||||
Object.assign(this.form,data);
|
||||
},
|
||||
//设置过滤项
|
||||
setFilters(filters) {
|
||||
this.selectionFilters = filters;
|
||||
this.setFiltersVisible = true;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.formUnit{
|
||||
position: absolute;
|
||||
right: -17px;
|
||||
top: 7px;
|
||||
}
|
||||
.formUnitWrap{
|
||||
position: relative;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
|
@ -0,0 +1,253 @@
|
|||
<template>
|
||||
<el-dialog
|
||||
:title="titleMap[mode]"
|
||||
v-model="visible"
|
||||
:size="1000"
|
||||
destroy-on-close
|
||||
id="bigDialog"
|
||||
class="bigDialog"
|
||||
@closed="$emit('closed')"
|
||||
>
|
||||
<el-container v-loading="loading">
|
||||
<el-main style="padding: 0 20px 20px 20px">
|
||||
<el-form
|
||||
ref="dialogForm"
|
||||
:model="form"
|
||||
label-width="85px"
|
||||
label-position="right"
|
||||
:rules="rule1"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="关联工段">
|
||||
<el-input v-model="form.mgroup_name" placeholder="关联工段" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="当前班次">
|
||||
<el-input v-model="form.shift_name" placeholder="当前班次" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="当前班组">
|
||||
<el-input v-model="form.team_name" placeholder="当前班组" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="班组组长">
|
||||
<el-input v-model="form.team_name" placeholder="班组组长" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="开始时间">
|
||||
<el-input v-model="form.start_time" placeholder="开始时间" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="结束时间">
|
||||
<el-input v-model="form.end_time" placeholder="结束时间" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-divider />
|
||||
</el-row>
|
||||
|
||||
<!-- <el-row>
|
||||
<el-col :lg="8" :md="12">
|
||||
<el-form-item label="关联产物" prop="material">
|
||||
<el-select
|
||||
v-model="form.material"
|
||||
placeholder="关联产物"
|
||||
clearable
|
||||
style="width: 100%;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in teamOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :lg="8" :md="12">
|
||||
<el-form-item label="质检项目" prop="testitem">
|
||||
<el-select
|
||||
v-model="form.testitem"
|
||||
placeholder="质检项目"
|
||||
clearable
|
||||
style="width: 100%;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in teamOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :lg="8" :md="12">
|
||||
<el-form-item label="平均值" prop="team">
|
||||
<el-input v-model="form.number" placeholder="平均值" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :lg="8" :md="12">
|
||||
<el-form-item label="检验次数" prop="mgroup">
|
||||
<el-input v-model="form.number" placeholder="检验次数"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :lg="8" :md="12">
|
||||
<el-form-item label="合格次数" prop="number">
|
||||
<el-input v-model="form.number" placeholder="合格次数"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-divider />
|
||||
</el-row> -->
|
||||
</el-form>
|
||||
<sc-form-table
|
||||
v-model="form.list"
|
||||
:addTemplate="addTemplate"
|
||||
placeholder="暂无数据"
|
||||
>
|
||||
<el-table-column prop="material" label="关联产物" min-width="150">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.id">{{ scope.row.material_name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="testitem" label="质检项目" min-width="150">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.id">{{ scope.row.testitem_name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="val_avg" label="平均值" min-width="150">
|
||||
<template #default="scope">
|
||||
<el-input
|
||||
v-model="scope.row.val_avg"
|
||||
placeholder="请输入内容"
|
||||
></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="num_test" label="检验次数" min-width="150">
|
||||
<template #default="scope">
|
||||
<el-input
|
||||
v-model="scope.row.num_test"
|
||||
placeholder="请输入内容"
|
||||
></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="num_ok" label="合格次数" min-width="150">
|
||||
<template #default="scope">
|
||||
<el-input
|
||||
v-model="scope.row.num_ok"
|
||||
placeholder="请输入内容"
|
||||
></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</sc-form-table>
|
||||
</el-main>
|
||||
<el-footer>
|
||||
<el-button type="primary" :loading="isSaveing" @click="submit">保存</el-button>
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
</el-footer>
|
||||
</el-container>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
emits: ["success", "closed"],
|
||||
data() {
|
||||
return {
|
||||
addTemplate: {
|
||||
material: "",
|
||||
testitem: "",
|
||||
val_avg: "",
|
||||
num_test: "",
|
||||
num_ok: "",
|
||||
},
|
||||
loading: false,
|
||||
mode: "add",
|
||||
titleMap: {
|
||||
add: "质量检验",
|
||||
edit: "质量检验",
|
||||
show: "质量检验",
|
||||
},
|
||||
form: {
|
||||
type:10,
|
||||
list:[]
|
||||
},
|
||||
rules: {
|
||||
name: [{required: true, message: "请输入", trigger: "blur"}],
|
||||
number: [{required: true, message: "请输入", trigger: "blur"}],
|
||||
keeper_name: [{required: true, message: "请输入", trigger: "blur"}],
|
||||
belong_dept: [{required: true, message: "请选择", trigger: "blur"}]
|
||||
},
|
||||
visible: false,
|
||||
isSaveing: false,
|
||||
keeperOptions: [],
|
||||
depOptions: [],
|
||||
selectionFilters: [],
|
||||
setFiltersVisible: false,
|
||||
teamOptions:[],
|
||||
shiftOptions:[],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
//是否已经保存过
|
||||
//若新增,调用init接口,若编辑修改,调get接口
|
||||
},
|
||||
methods: {
|
||||
|
||||
//显示
|
||||
open(mode = "add") {
|
||||
this.mode = mode;
|
||||
this.visible = true;
|
||||
return this;
|
||||
},
|
||||
getReceptionist(data) {
|
||||
this.form.leader=data.id;
|
||||
this.form.leader_name=data.name
|
||||
},
|
||||
//表单提交方法
|
||||
submit() {
|
||||
this.isSaveing = true;
|
||||
this.$API.qm.updateQuastat.req('bulk',this.form.list).then(res=>{
|
||||
this.isSaveing = false;
|
||||
this.$emit("success", this.form, this.mode);
|
||||
this.visible = false;
|
||||
this.$message.success("操作成功");
|
||||
}).catch(res=>{
|
||||
this.isSaveing = false;
|
||||
})
|
||||
// this.$refs.dialogForm.validate(async (valid) => {
|
||||
// if (valid) {
|
||||
|
||||
// }
|
||||
// });
|
||||
},
|
||||
//表单注入数据
|
||||
setData(data) {
|
||||
Object.assign(this.form,data);
|
||||
this.getsflogItem(this.form.id);
|
||||
},
|
||||
getsflogItem(id){
|
||||
this.$API.wpm.sflog.init_test.req(id).then(res=>{
|
||||
this.form.list = res;
|
||||
})
|
||||
},
|
||||
//设置过滤项
|
||||
setFilters(filters) {
|
||||
this.selectionFilters = filters;
|
||||
this.setFiltersVisible = true;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
#bigDialog{
|
||||
width: 90%;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
|
@ -0,0 +1,243 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="exportExcel()"
|
||||
:loading = "exportLoading"
|
||||
>导出xlsx
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="handlePrint"
|
||||
>打印
|
||||
</el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-card style="margin-top:5px">
|
||||
<div ref="print" id="myReport" class="printContainer">
|
||||
<h3 style="text-align: center;">生产报告</h3>
|
||||
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable">
|
||||
<thead style="background: #efefef;height: 40px;">
|
||||
<tr>
|
||||
<th colspan="2">参数</th>
|
||||
<th>上个小时</th>
|
||||
<th>昨日</th>
|
||||
<th>本月</th>
|
||||
<th>本年</th>
|
||||
<th>月目标值</th>
|
||||
<th>月完成度</th>
|
||||
<th>年目标值</th>
|
||||
<th>年完成度</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item,index) in tableDatas" :key="item">
|
||||
<td class="numCell" v-if="index==0||index==2" rowspan="2">{{item[0]}}</td>
|
||||
<td class="numCell" v-if="index==4||index==5">{{item[0]}}</td>
|
||||
<td class="numCell">{{item[1]}}</td>
|
||||
<td class="numCell hoursItem" @click="itemClick('hours',item)" style="background: rgba(238, 179, 179, 0.8);">{{item[2]}}</td>
|
||||
<td class="numCell daysItem" @click="itemClick('days',item)" style="background: rgba(239, 90, 90, 0.8);">{{item[3]}}</td>
|
||||
<td class="numCell monthItem" @click="itemClick('month',item)" style="background: rgba(238, 189, 124, 0.8);">{{item[4]}}</td>
|
||||
<td class="numCell yearItem" @click="itemClick1('year',item)" style="background: rgba(186, 236, 135, 0.8);">{{item[5]}}</td>
|
||||
<td class="numCell">{{item[6]}}</td>
|
||||
<td class="numCell">{{item[7]}}</td>
|
||||
<td class="numCell">{{item[8]}}</td>
|
||||
<td class="numCell">{{item[9]}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<sc-dialog v-model="chartShow" draggable title="原料磨工段">
|
||||
<div class="searchHead" v-if="type=='hours'">
|
||||
<el-date-picker
|
||||
v-model="query.start_time"
|
||||
type="date"
|
||||
placeholder="选择时间"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<span class="middleText">至</span>
|
||||
<el-date-picker
|
||||
v-model="query.end_time"
|
||||
type="date"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
start-placeholder="结束日期"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-button type="primary" class="searchBtn" @click="dataSearch">查询</el-button>
|
||||
</div>
|
||||
<div class="searchHead" v-if="type=='days'">
|
||||
<el-date-picker
|
||||
v-model="query.start_time"
|
||||
type="date"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
start-placeholder="开始日期"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-date-picker
|
||||
v-model="query.end_time"
|
||||
type="date"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
start-placeholder="结束日期"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-button type="primary" class="searchBtn" @click="dataSearch">查询</el-button>
|
||||
</div>
|
||||
<div class="searchHead" v-if="type=='month'">
|
||||
<el-date-picker
|
||||
v-model="query.start_time"
|
||||
type="month"
|
||||
format="YYYY-MM"
|
||||
value-format="YYYY-MM"
|
||||
start-placeholder="开始月份"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-date-picker
|
||||
v-model="query.end_time"
|
||||
type="month"
|
||||
format="YYYY-MM"
|
||||
value-format="YYYY-MM"
|
||||
start-placeholder="结束月份"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-button type="primary" class="searchBtn" @click="dataSearch">查询</el-button>
|
||||
</div>
|
||||
<div class="searchHead" v-if="type=='year'">
|
||||
<el-date-picker
|
||||
v-model="query.start_time"
|
||||
type="year"
|
||||
format="YYYY"
|
||||
value-format="YYYY"
|
||||
start-placeholder="开始日期"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-date-picker
|
||||
v-model="query.end_time"
|
||||
type="year"
|
||||
format="YYYY"
|
||||
value-format="YYYY"
|
||||
start-placeholder="结束日期"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-button type="primary" class="searchBtn" @click="dataSearch">查询</el-button>
|
||||
</div>
|
||||
<scEcharts height="360px" :option="myOption" v-if="chartShow"></scEcharts>
|
||||
</sc-dialog>
|
||||
<charts
|
||||
v-if="asynDialog"
|
||||
:type="type"
|
||||
:title="title"
|
||||
:modelValue="modelValue"
|
||||
:showClose="showClose"
|
||||
:echartType='echartType'
|
||||
@closed="asynDialog = false"
|
||||
></charts>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import scEcharts from "@/components/scEcharts";
|
||||
import { defineAsyncComponent } from 'vue'
|
||||
export default {
|
||||
components: {
|
||||
scEcharts,
|
||||
charts: defineAsyncComponent(() => import("@/components/scEnm/lineChartsdialog.vue")),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
chartShow: false,
|
||||
myOption: null,
|
||||
timeStamp:0,
|
||||
listQuery:{
|
||||
belong_dept:'',
|
||||
task2__year:'',
|
||||
page:0
|
||||
},
|
||||
query:{
|
||||
time:''
|
||||
},
|
||||
tableDatas:[
|
||||
['产量','总产量(t)',0,0,0,0,0,0,0,0],
|
||||
['产量','台时产量(t/h)',0,0,0,0,0,0,0,0],
|
||||
['运转时间','运转时间(h)',0,0,0,0,0,0,0,0],
|
||||
['运转时间','运转率(%)',0,0,0,0,0,0,0,0],
|
||||
['能耗','煤磨分布电耗(KW·h/t)',0,0,0,0,0,0,0,0],
|
||||
['成本','生料成本(元/吨)',0,0,0,0,0,0,0,0],
|
||||
],
|
||||
tableName:'生产报告',
|
||||
modelValue:true,
|
||||
type:'hours',
|
||||
title:'原料磨工段',
|
||||
apiObj:'',
|
||||
showClose:true,
|
||||
echartType:'line',
|
||||
asynDialog:false,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
|
||||
itemClick(type,item){
|
||||
this.type=type;
|
||||
this.asynDialog = true;
|
||||
},
|
||||
itemClick1(type,item){
|
||||
this.chartShow = false;
|
||||
this.$API.bi.dataset.exec
|
||||
.req('3322567213885833216')
|
||||
.then((res) => {
|
||||
this.myOption = JSON.parse(res.echart_options);
|
||||
debugger;
|
||||
console.log(this.myOption)
|
||||
this.chartShow = true;
|
||||
});
|
||||
},
|
||||
handlePrint() {
|
||||
this.$PRINT('#myReport');
|
||||
},
|
||||
exportExcel() {
|
||||
this.exportLoading = true;
|
||||
this.$XLSX('#myTable', this.tableName)
|
||||
this.exportLoading = false;
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.printContainer{
|
||||
width: 1075px;
|
||||
}
|
||||
#numTable{
|
||||
margin-left: 37px;
|
||||
}
|
||||
#numTable td{
|
||||
height: 32px;
|
||||
padding-left: 5px;
|
||||
}
|
||||
.numCell{
|
||||
width: 80px;
|
||||
height: 35px;
|
||||
}
|
||||
.numCell.numCell_last{
|
||||
width: 100px;
|
||||
}
|
||||
.searchHead{
|
||||
display:flex
|
||||
}
|
||||
.middleText{
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
margin: 0 5px;
|
||||
display: inline-block;
|
||||
}
|
||||
.searchBtn{
|
||||
margin-left: 5px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,159 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-date-picker
|
||||
v-model="monthrange"
|
||||
type="monthrange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始月份"
|
||||
end-placeholder="结束月份"
|
||||
value-format="YYYY-MM"
|
||||
format="YYYY-MM"
|
||||
/>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="handleQuery"
|
||||
></el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="exportExcel()"
|
||||
:loading = "exportLoading"
|
||||
>导出xlsx
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="handlePrint"
|
||||
>打印
|
||||
</el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-card style="margin-top:5px">
|
||||
<div ref="print" id="myReport" class="printContainer">
|
||||
<h3 style="text-align: center;">车间单位产品电耗月度分析表</h3>
|
||||
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable">
|
||||
<thead style="background: #efefef;height: 40px;">
|
||||
<tr>
|
||||
<th>月份</th>
|
||||
<th>当期值(KW·h/t)</th>
|
||||
<th>目标值(KW·h/t)</th>
|
||||
<th>当期与目标差值(KW·h/t)</th>
|
||||
<th>环期值(KW·h/t)</th>
|
||||
<th>当期与环期差值(KW·h/t)</th>
|
||||
<th>环比增长率(%)</th>
|
||||
<th>同比增长率(%)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item) in tableDatas" :key="item">
|
||||
<td class="numCell">{{item.month}}</td>
|
||||
<td class="numCell">{{item.value1}}</td>
|
||||
<td class="numCell">{{item.value2}}</td>
|
||||
<td class="numCell">{{item.value3}}</td>
|
||||
<td class="numCell">{{item.value4}}</td>
|
||||
<td class="numCell">{{item.value5}}</td>
|
||||
<td class="numCell">{{item.value6}}</td>
|
||||
<td class="numCell">{{item.value7}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import scEcharts from "@/components/scEcharts";
|
||||
import { defineAsyncComponent } from 'vue'
|
||||
export default {
|
||||
components: {
|
||||
scEcharts,
|
||||
charts: defineAsyncComponent(() => import("@/components/scEnm/lineChartsdialog.vue")),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
chartShow: false,
|
||||
myOption: null,
|
||||
timeStamp:0,
|
||||
listQuery:{
|
||||
belong_dept:'',
|
||||
task2__year:'',
|
||||
page:0
|
||||
},
|
||||
query:{
|
||||
time:''
|
||||
},
|
||||
tableDatas:[
|
||||
{month:'2023-05',value1:'1203',value2:'1200',value3:'3',value4:'1150',value5:'50',value6:'0.4',value7:'0.4'},
|
||||
{month:'2023-06',value1:'1203',value2:'1200',value3:'3',value4:'1150',value5:'50',value6:'0.4',value7:'0.4'},
|
||||
{month:'2023-07',value1:'1203',value2:'1200',value3:'3',value4:'1150',value5:'50',value6:'0.4',value7:'0.4'},
|
||||
],
|
||||
modelValue:true,
|
||||
type:'hours',
|
||||
title:'title',
|
||||
apiObj:'',
|
||||
showClose:true,
|
||||
echartType:'line',
|
||||
asynDialog:false,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
|
||||
itemClick(type,item){
|
||||
this.type=type;
|
||||
this.asynDialog = true;
|
||||
},
|
||||
itemClick1(type,item){
|
||||
this.chartShow = false;
|
||||
this.$API.bi.dataset.exec
|
||||
.req('3322567213885833216')
|
||||
.then((res) => {
|
||||
this.myOption = JSON.parse(res.echart_options);
|
||||
debugger;
|
||||
console.log(this.myOption)
|
||||
this.chartShow = true;
|
||||
});
|
||||
},
|
||||
handlePrint() {
|
||||
this.$PRINT('#myReport');
|
||||
},
|
||||
exportExcel() {
|
||||
this.exportLoading = true;
|
||||
this.$XLSX('#myTable', this.tableName)
|
||||
this.exportLoading = false;
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.printContainer{
|
||||
width: 1075px;
|
||||
}
|
||||
#numTable{
|
||||
margin-left: 37px;
|
||||
}
|
||||
#numTable td{
|
||||
height: 32px;
|
||||
padding-left: 5px;
|
||||
}
|
||||
.numCell{
|
||||
width: 80px;
|
||||
}
|
||||
.numCell.numCell_last{
|
||||
width: 100px;
|
||||
}
|
||||
.searchHead{
|
||||
display:flex
|
||||
}
|
||||
.middleText{
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
margin: 0 5px;
|
||||
display: inline-block;
|
||||
}
|
||||
.searchBtn{
|
||||
margin-left: 5px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,268 @@
|
|||
<template>
|
||||
<el-container>
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<div style="margin-right: 20px">交接班日志</div>
|
||||
<el-date-picker
|
||||
v-model="query.time"
|
||||
type="date"
|
||||
value-format="YYYY-MM-DD"
|
||||
format="YYYY-MM-DD"
|
||||
placeholder="日志时间"
|
||||
/>
|
||||
<el-select
|
||||
v-model="query.shift"
|
||||
placeholder="班次"
|
||||
clearable
|
||||
style="margin-left: 2px; width: 120px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in optionsShift"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></el-option>
|
||||
</el-select>
|
||||
<el-select
|
||||
v-model="query.team"
|
||||
placeholder="班组"
|
||||
clearable
|
||||
style="margin-left: 2px; width: 120px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in options"
|
||||
:key="item.value"
|
||||
:label="item.label"
|
||||
:value="item.value"
|
||||
></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="检验时间">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.last_test_time">{{ scope.row.last_test_time.slice(0,16)}}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="操作" fixed="right" align="center" width="100">
|
||||
<template #default="scope">
|
||||
<el-button link size="small" @click="sflog_edit(scope.row)" type="primary">编辑</el-button>
|
||||
<!-- <el-button link size="small" @click="sflog_check(scope.row)" type="primary">质量检验</el-button> -->
|
||||
<!-- <el-button link size="small" @click="sflog_other(scope.row)" type="primary">其他能源</el-button> -->
|
||||
<el-button link size="small" @click="sflog_export(scope.row)" type="success">报表</el-button>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</scTable>
|
||||
</el-main>
|
||||
<el-drawer v-model="limitedExport" size="60%" :show-close="false">
|
||||
<template #header="{ close, titleId, titleClass }">
|
||||
<h4 :id="titleId" :class="titleClass">交接班日志</h4>
|
||||
<el-button type="danger" @click="close">
|
||||
<el-icon class="el-icon--left"><CircleCloseFilled /></el-icon>
|
||||
关闭
|
||||
</el-button>
|
||||
</template>
|
||||
<el-main class="nopadding">
|
||||
<div ref="print" id="myReport" class="printContainer">
|
||||
<div style="margin-right: 20px;text-align: center;font-size: 16px;font-weight: bold;margin-bottom: 20px;">
|
||||
<span v-if="sflogItem.end_time">{{sflogItem.end_time.slice(0,10)}}{{ sflogItem.shift_name }}</span>
|
||||
<span v-if="sflogItem.team_name">{{ sflogItem.team_name }}</span>
|
||||
交接班记录
|
||||
</div>
|
||||
<h3 style="text-align: center;display: flex;justify-content: space-around;">
|
||||
<span>2023.06.21</span>
|
||||
<span>白班</span>
|
||||
<span>甲班</span>
|
||||
</h3>
|
||||
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable">
|
||||
<tbody>
|
||||
<tr>
|
||||
<td class="numCell">产量(t)</td>
|
||||
<td class="numCell">{{value1}}</td>
|
||||
<td class="numCell">单位产品分布电耗(KW·h/t)</td>
|
||||
<td class="numCell">{{value3}}</td>
|
||||
<td class="numCell">单位成本(元/吨)</td>
|
||||
<td class="numCell">{{value5}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="numCell">生产情况记录</td>
|
||||
<td class="numCell" colspan="5">时间、类别、原因、处置措施、处置人</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</el-main>
|
||||
</el-drawer>
|
||||
</el-container>
|
||||
<save-dialog
|
||||
v-if="dialog.save"
|
||||
ref="saveDialog"
|
||||
@success="handleSaveSuccess"
|
||||
@closed="dialog.save = false"
|
||||
></save-dialog>
|
||||
</template>
|
||||
<script>
|
||||
import saveDialog from "./handover_form.vue";
|
||||
export default {
|
||||
name: "listSon",
|
||||
components: {
|
||||
saveDialog,
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
apiObj: this.$API.wpm.sflog.list,
|
||||
apiObj2: null,
|
||||
query: {
|
||||
mgroup:'3346491835287007232',
|
||||
},
|
||||
query2: {},
|
||||
dialog: {
|
||||
save: false,
|
||||
},
|
||||
sflogItem:{},
|
||||
selection: [],
|
||||
value1:1,
|
||||
value3:3,
|
||||
value5:5,
|
||||
modelValue:true,
|
||||
showClose:true,
|
||||
echartType:'line',
|
||||
asynDialog:false,
|
||||
options:[],
|
||||
optionsShift:[],
|
||||
limitedExport:false,
|
||||
};
|
||||
},
|
||||
|
||||
methods: {
|
||||
sflog_export(){
|
||||
this.limitedExport = true;
|
||||
},
|
||||
rowClick(row) {
|
||||
this.sflogId = row.id;
|
||||
this.sflogItem = row;
|
||||
},
|
||||
//编辑
|
||||
sflog_edit(row) {
|
||||
this.dialog.save = true;
|
||||
this.$nextTick(() => {
|
||||
this.$refs.saveDialog.open("edit").setData(row);
|
||||
});
|
||||
},
|
||||
|
||||
//删除
|
||||
async table_del(row) {
|
||||
this.$API.wpm.sflog.delete.req(row.id)
|
||||
.then((res) => {
|
||||
this.$message.success("删除成功");
|
||||
return res;
|
||||
})
|
||||
.catch((err) => {
|
||||
return err;
|
||||
});
|
||||
},
|
||||
//新增岗位后更新数据
|
||||
handleSaveSuccess(data, mode) {
|
||||
this.$refs.table.refresh()
|
||||
this.dialog.save = false;
|
||||
},
|
||||
handleOtherSuccess(){
|
||||
this.dialog.other = false;
|
||||
},
|
||||
handleCheckSuccess(){
|
||||
this.dialog.check = false;
|
||||
},
|
||||
closed() {
|
||||
this.dialog.save = false;
|
||||
this.$refs.table2.refresh();
|
||||
},
|
||||
handleDel(row) {
|
||||
this.$confirm(`确定删除选中的记录吗?`, "提示", {
|
||||
type: "warning",
|
||||
}).then(() => {
|
||||
this.$API.wpm.shift.delete.req(row.id).then((res) => {
|
||||
if (res.err_msg) {
|
||||
this.$message.error(res.err_msg);
|
||||
} else {
|
||||
// const loading = this.$loading();
|
||||
// this.$refs.table2.refresh();
|
||||
// loading.close();
|
||||
// this.$message.success("操作成功");
|
||||
}
|
||||
});
|
||||
})
|
||||
.catch(() => {});
|
||||
},
|
||||
handlePrint() {
|
||||
this.$PRINT('#myReport');
|
||||
},
|
||||
exportExcel() {
|
||||
this.exportLoading = true;
|
||||
this.$XLSX('#myTable', this.tableName)
|
||||
this.exportLoading = false;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.printContainer{
|
||||
width: 1075px;
|
||||
}
|
||||
#numTable{
|
||||
margin-left: 37px;
|
||||
}
|
||||
#numTable td{
|
||||
height: 32px;
|
||||
padding-left: 5px;
|
||||
}
|
||||
.numCell{
|
||||
width: 80px;
|
||||
}
|
||||
.numCell.numCell_last{
|
||||
width: 100px;
|
||||
}
|
||||
.searchHead{
|
||||
display:flex
|
||||
}
|
||||
.middleText{
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
margin: 0 5px;
|
||||
display: inline-block;
|
||||
}
|
||||
.searchBtn{
|
||||
margin-left: 5px;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
|
@ -0,0 +1,198 @@
|
|||
<template>
|
||||
<el-dialog
|
||||
:title="titleMap[mode]"
|
||||
v-model="visible"
|
||||
:size="1000"
|
||||
destroy-on-close
|
||||
@closed="$emit('closed')"
|
||||
>
|
||||
<el-container v-loading="loading">
|
||||
<el-main style="padding: 0 20px 20px 20px">
|
||||
<el-form
|
||||
ref="dialogForm"
|
||||
:model="form"
|
||||
label-width="100px"
|
||||
label-position="right"
|
||||
:rules="rule1"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="关联工段" prop="mgroup">
|
||||
<el-input v-model="form.mgroup_name" placeholder="关联工段" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="当班班次" prop="shift">
|
||||
<el-input v-model="form.shift_name" placeholder="当班班次" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="开始时间" prop="start_time">
|
||||
<el-date-picker
|
||||
disabled
|
||||
v-model="form.start_time"
|
||||
type="datetime"
|
||||
format="YYYY-MM-DD HH:mm"
|
||||
placeholder="基础月份"
|
||||
style="width: 100%;"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="结束时间" prop="end_time">
|
||||
<el-date-picker
|
||||
disabled
|
||||
v-model="form.end_time"
|
||||
type="datetime"
|
||||
format="YYYY-MM-DD HH:mm"
|
||||
placeholder="对比月份"
|
||||
style="width: 100%;"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="当班班组" prop="team">
|
||||
<el-select
|
||||
v-model="form.team"
|
||||
placeholder="当班班组"
|
||||
clearable
|
||||
style="width: 100%;"
|
||||
@change="teamChange"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in teamOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="班组班长" prop="leader_name">
|
||||
<el-input v-model="form.leader_name" placeholder="班组班长" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col>
|
||||
<el-form-item label="生产情况记录">
|
||||
<el-input
|
||||
type="textarea"
|
||||
:rows="4"
|
||||
v-model="form.note"
|
||||
placeholder="生产情况记录"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-main>
|
||||
<el-footer>
|
||||
<el-button type="primary" :loading="isSaveing" @click="submit">保存</el-button>
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
</el-footer>
|
||||
</el-container>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
emits: ["success", "closed"],
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
mode: "add",
|
||||
titleMap: {
|
||||
add: "交接班日志",
|
||||
edit: "交接班日志",
|
||||
show: "查看交接班日志",
|
||||
},
|
||||
form: {
|
||||
type:10,
|
||||
},
|
||||
rules: {
|
||||
name: [{required: true, message: "请输入", trigger: "blur"}],
|
||||
number: [{required: true, message: "请输入", trigger: "blur"}],
|
||||
keeper_name: [{required: true, message: "请输入", trigger: "blur"}],
|
||||
belong_dept: [{required: true, message: "请选择", trigger: "blur"}]
|
||||
},
|
||||
visible: false,
|
||||
isSaveing: false,
|
||||
keeperOptions: [],
|
||||
depOptions: [],
|
||||
selectionFilters: [],
|
||||
setFiltersVisible: false,
|
||||
teamOptions:[],
|
||||
shiftOptions:[],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
//获取班组
|
||||
this.getTeam();
|
||||
this.getShfit();
|
||||
},
|
||||
methods: {
|
||||
getTeam(){
|
||||
this.$API.mtm.team.list.req({page:0}).then(res=>{
|
||||
this.teamOptions = res;
|
||||
})
|
||||
},
|
||||
getShfit(){
|
||||
this.$API.mtm.shift.req({page:0}).then(res=>{
|
||||
this.shiftOptions = res;
|
||||
})
|
||||
},
|
||||
//显示
|
||||
open(mode = "add") {
|
||||
this.mode = mode;
|
||||
this.visible = true;
|
||||
return this;
|
||||
},
|
||||
teamChange(data){
|
||||
let that = this;
|
||||
that.teamOptions.forEach(item=>{
|
||||
if(item.id==data){
|
||||
that.form.leader_name = item.leader_name;
|
||||
that.form.leader= item.leader;
|
||||
}
|
||||
})
|
||||
},
|
||||
//表单提交方法
|
||||
submit() {
|
||||
this.$refs.dialogForm.validate(async (valid) => {
|
||||
if (valid) {
|
||||
this.isSaveing = true;
|
||||
try {
|
||||
let obj={};
|
||||
obj.note = this.form.note;
|
||||
obj.team = this.form.team;
|
||||
obj.shift = this.form.shift;
|
||||
obj.leader = this.form.leader;
|
||||
this.$API.wpm.sflog.update.req(this.form.id,obj).then(res=>{
|
||||
this.isSaveing = false;
|
||||
this.$emit("success", this.form, this.mode);
|
||||
this.visible = false;
|
||||
this.$message.success("操作成功");
|
||||
return res;
|
||||
})
|
||||
} catch (err) {
|
||||
//可以处理校验错误
|
||||
this.isSaveing = false;
|
||||
return err;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
//表单注入数据
|
||||
setData(data) {
|
||||
Object.assign(this.form,data);
|
||||
},
|
||||
//设置过滤项
|
||||
setFilters(filters) {
|
||||
this.selectionFilters = filters;
|
||||
this.setFiltersVisible = true;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
</style>
|
||||
|
||||
|
|
@ -0,0 +1,189 @@
|
|||
<template>
|
||||
<el-dialog
|
||||
:title="titleMap[mode]"
|
||||
v-model="visible"
|
||||
:size="1000"
|
||||
destroy-on-close
|
||||
@closed="$emit('closed')"
|
||||
>
|
||||
<el-container v-loading="loading">
|
||||
<el-main style="padding: 0 20px 20px 20px">
|
||||
<el-form
|
||||
ref="dialogForm"
|
||||
:model="form"
|
||||
label-width="100px"
|
||||
label-position="right"
|
||||
:rules="rules"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="关联工段" prop="mgroup">
|
||||
<el-input v-model="form.mgroup_name" placeholder="关联工段" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="当班班次">
|
||||
<el-input v-model="form.shift_name" placeholder="当班班次" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="开始时间" prop="start_time">
|
||||
<el-input v-model="form.start_time" placeholder="结束时间" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="结束时间" prop="end_time">
|
||||
<el-input v-model="form.end_time" placeholder="结束时间" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="当班班组" prop="team">
|
||||
<el-input v-model="form.team_name" placeholder="班组班长" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="班组班长" prop="leader_name">
|
||||
<el-input v-model="form.leader_name" placeholder="班组班长" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="检测时间" prop="time">
|
||||
<el-date-picker
|
||||
v-model="form.time"
|
||||
type="datetime"
|
||||
value-format="YYYY-MM-DD HH:mm"
|
||||
format="YYYY-MM-DD HH:mm"
|
||||
placeholder="检测时间"
|
||||
/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24" class="formUnitWrap">
|
||||
<el-form-item label="水耗统计" prop="val">
|
||||
<el-input-number v-model="form.val" :precision="2" controls-position="right" placeholder="水耗统计" style="width: 100%;"></el-input-number>
|
||||
</el-form-item>
|
||||
<span class="formUnit">(t)</span>
|
||||
</el-col>
|
||||
</el-row>
|
||||
</el-form>
|
||||
</el-main>
|
||||
<el-footer>
|
||||
<el-button type="primary" :loading="isSaveing" @click="submit">保存</el-button>
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
</el-footer>
|
||||
</el-container>
|
||||
</el-dialog>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
emits: ["success", "closed"],
|
||||
data() {
|
||||
return {
|
||||
loading: false,
|
||||
mode: "add",
|
||||
titleMap: {
|
||||
add: "其他能源录入",
|
||||
edit: "其他能源录入",
|
||||
show: "其他能源录入",
|
||||
},
|
||||
form: {
|
||||
type:10,
|
||||
},
|
||||
rules: {
|
||||
val: [{required: true, message: "请输入检测值", trigger: "blur"}],
|
||||
time: [{required: true, message: "请选择检测时间", trigger: "blur"}]
|
||||
},
|
||||
visible: false,
|
||||
isSaveing: false,
|
||||
keeperOptions: [],
|
||||
depOptions: [],
|
||||
selectionFilters: [],
|
||||
setFiltersVisible: false,
|
||||
teamOptions:[],
|
||||
shiftOptions:[],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
//获取班组
|
||||
this.getTeam();
|
||||
this.getShfit();
|
||||
},
|
||||
methods: {
|
||||
getTeam(){
|
||||
this.$API.mtm.team.list.req({page:0}).then(res=>{
|
||||
this.teamOptions = res;
|
||||
})
|
||||
},
|
||||
getShfit(){
|
||||
this.$API.mtm.shift.req({page:0}).then(res=>{
|
||||
this.shiftOptions = res;
|
||||
})
|
||||
},
|
||||
//显示
|
||||
open(mode = "add") {
|
||||
this.mode = mode;
|
||||
this.visible = true;
|
||||
return this;
|
||||
},
|
||||
teamChange(data){
|
||||
let that = this;
|
||||
that.teamOptions.forEach(item=>{
|
||||
if(item.id==data){
|
||||
that.form.leader_name = item.leader_name;
|
||||
that.form.leader= item.leader;
|
||||
}
|
||||
})
|
||||
},
|
||||
//表单提交方法
|
||||
submit() {
|
||||
this.$refs.dialogForm.validate(async (valid) => {
|
||||
if (valid) {
|
||||
this.isSaveing = true;
|
||||
try {
|
||||
let obj={};
|
||||
debugger;
|
||||
obj.year_s = this.form.time.slice(0,4);
|
||||
obj.month_s = this.form.time.slice(5,7);
|
||||
obj.day_s = this.form.time.slice(8,10);
|
||||
obj.hour = this.form.time.slice(11,13);
|
||||
obj.val = this.form.val;
|
||||
obj.sflog = this.form.id;
|
||||
obj.material = '3349350755361792000';
|
||||
obj.mpoint = '3349214860667219968';
|
||||
this.$API.enm.mpoint.statCreate.req(obj).then(res=>{
|
||||
this.isSaveing = false;
|
||||
this.$emit("success", this.form, this.mode);
|
||||
this.visible = false;
|
||||
this.$message.success("操作成功");
|
||||
return res;
|
||||
})
|
||||
} catch (err) {
|
||||
//可以处理校验错误
|
||||
this.isSaveing = false;
|
||||
return err;
|
||||
}
|
||||
}
|
||||
});
|
||||
},
|
||||
//表单注入数据
|
||||
setData(data) {
|
||||
Object.assign(this.form,data);
|
||||
},
|
||||
//设置过滤项
|
||||
setFilters(filters) {
|
||||
this.selectionFilters = filters;
|
||||
this.setFiltersVisible = true;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.formUnit{
|
||||
position: absolute;
|
||||
right: -17px;
|
||||
top: 7px;
|
||||
}
|
||||
.formUnitWrap{
|
||||
position: relative;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
|
@ -0,0 +1,211 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="exportExcel()"
|
||||
:loading = "exportLoading"
|
||||
>导出xlsx
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="handlePrint"
|
||||
>打印
|
||||
</el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-card style="margin-top:5px">
|
||||
<div ref="print" id="myReport" class="printContainer">
|
||||
<h3 style="text-align: center;">主要设备(100KW以上)单位产品电耗数据表</h3>
|
||||
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable">
|
||||
<thead style="background: #efefef;height: 40px;">
|
||||
<tr>
|
||||
<th>设备名称</th>
|
||||
<th>设备编号</th>
|
||||
<th>单位</th>
|
||||
<th>上个小时</th>
|
||||
<th>昨日</th>
|
||||
<th>本月</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item) in tableDatas" :key="item">
|
||||
<td class="numCell">{{item.name}}</td>
|
||||
<td class="numCell">{{item.number}}</td>
|
||||
<td class="numCell">{{item.unit}}</td>
|
||||
<td class="numCell hoursItem" @click="itemClick('hours',item)" style="background: rgba(238, 179, 179, 0.8);">{{item.hours}}</td>
|
||||
<td class="numCell monthItem" @click="itemClick('month',item)" style="background: rgba(238, 189, 124, 0.8);">{{item.days}}</td>
|
||||
<td class="numCell yearItem" @click="itemClick1('year',item)" style="background: rgba(186, 236, 135, 0.8);">{{item.month}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<sc-dialog v-model="chartShow" draggable title="创建/编辑人员证书">
|
||||
<div class="searchHead" v-if="type=='hours'">
|
||||
<el-date-picker
|
||||
v-model="query.start_time"
|
||||
type="date"
|
||||
placeholder="选择时间"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<span class="middleText">至</span>
|
||||
<el-date-picker
|
||||
v-model="query.end_time"
|
||||
type="date"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
start-placeholder="结束日期"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-button type="primary" class="searchBtn" @click="dataSearch">查询</el-button>
|
||||
</div>
|
||||
<div class="searchHead" v-if="type=='days'">
|
||||
<el-date-picker
|
||||
v-model="query.start_time"
|
||||
type="date"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
start-placeholder="开始日期"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-date-picker
|
||||
v-model="query.end_time"
|
||||
type="date"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
start-placeholder="结束日期"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-button type="primary" class="searchBtn" @click="dataSearch">查询</el-button>
|
||||
</div>
|
||||
<div class="searchHead" v-if="type=='month'">
|
||||
<el-date-picker
|
||||
v-model="query.start_time"
|
||||
type="month"
|
||||
format="YYYY-MM"
|
||||
value-format="YYYY-MM"
|
||||
start-placeholder="开始月份"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-date-picker
|
||||
v-model="query.end_time"
|
||||
type="month"
|
||||
format="YYYY-MM"
|
||||
value-format="YYYY-MM"
|
||||
start-placeholder="结束月份"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-button type="primary" class="searchBtn" @click="dataSearch">查询</el-button>
|
||||
</div>
|
||||
<scEcharts height="360px" :option="myOption" v-if="chartShow"></scEcharts>
|
||||
</sc-dialog>
|
||||
<charts
|
||||
v-if="asynDialog"
|
||||
:type="type"
|
||||
:title="title"
|
||||
:modelValue="modelValue"
|
||||
:showClose="showClose"
|
||||
:echartType='echartType'
|
||||
@closed="asynDialog = false"
|
||||
></charts>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import scEcharts from "@/components/scEcharts";
|
||||
import { defineAsyncComponent } from 'vue'
|
||||
export default {
|
||||
components: {
|
||||
scEcharts,
|
||||
charts: defineAsyncComponent(() => import("@/components/scEnm/lineChartsdialog.vue")),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
chartShow: false,
|
||||
myOption: null,
|
||||
timeStamp:0,
|
||||
listQuery:{
|
||||
belong_dept:'',
|
||||
task2__year:'',
|
||||
page:0
|
||||
},
|
||||
query:{
|
||||
time:''
|
||||
},
|
||||
tableName:'主要设备(100KW以上)单位产品电耗数据表',
|
||||
tableDatas:[
|
||||
{name:'烘干破主电机',number:'NM001',unit:'KW·h/t',hours:'120',days:'2000',month:'60000'},
|
||||
],
|
||||
modelValue:true,
|
||||
type:'hours',
|
||||
title:'title',
|
||||
apiObj:'',
|
||||
showClose:true,
|
||||
echartType:'line',
|
||||
asynDialog:false,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
|
||||
itemClick(type,item){
|
||||
this.type=type;
|
||||
this.asynDialog = true;
|
||||
},
|
||||
itemClick1(type,item){
|
||||
this.chartShow = false;
|
||||
this.$API.bi.dataset.exec
|
||||
.req('3322567213885833216')
|
||||
.then((res) => {
|
||||
this.myOption = JSON.parse(res.echart_options);
|
||||
debugger;
|
||||
console.log(this.myOption)
|
||||
this.chartShow = true;
|
||||
});
|
||||
},
|
||||
handlePrint() {
|
||||
this.$PRINT('#myReport');
|
||||
},
|
||||
exportExcel() {
|
||||
this.exportLoading = true;
|
||||
this.$XLSX('#myTable', this.tableName)
|
||||
this.exportLoading = false;
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.printContainer{
|
||||
width: 1075px;
|
||||
}
|
||||
#numTable{
|
||||
margin-left: 37px;
|
||||
}
|
||||
#numTable td{
|
||||
height: 32px;
|
||||
padding-left: 5px;
|
||||
}
|
||||
.numCell{
|
||||
width: 80px;
|
||||
height: 35px;
|
||||
}
|
||||
.numCell.numCell_last{
|
||||
width: 100px;
|
||||
}
|
||||
.searchHead{
|
||||
display:flex
|
||||
}
|
||||
.middleText{
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
margin: 0 5px;
|
||||
display: inline-block;
|
||||
}
|
||||
.searchBtn{
|
||||
margin-left: 5px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,253 @@
|
|||
<template>
|
||||
<el-dialog
|
||||
:title="titleMap[mode]"
|
||||
v-model="visible"
|
||||
:size="1000"
|
||||
destroy-on-close
|
||||
id="bigDialog"
|
||||
class="bigDialog"
|
||||
@closed="$emit('closed')"
|
||||
>
|
||||
<el-container v-loading="loading">
|
||||
<el-main style="padding: 0 20px 20px 20px">
|
||||
<el-form
|
||||
ref="dialogForm"
|
||||
:model="form"
|
||||
label-width="85px"
|
||||
label-position="right"
|
||||
:rules="rule1"
|
||||
>
|
||||
<el-row>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="关联工段">
|
||||
<el-input v-model="form.mgroup_name" placeholder="关联工段" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="当前班次">
|
||||
<el-input v-model="form.shift_name" placeholder="当前班次" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="当前班组">
|
||||
<el-input v-model="form.team_name" placeholder="当前班组" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="班组组长">
|
||||
<el-input v-model="form.team_name" placeholder="班组组长" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="开始时间">
|
||||
<el-input v-model="form.start_time" placeholder="开始时间" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :md="12" :sm="24">
|
||||
<el-form-item label="结束时间">
|
||||
<el-input v-model="form.end_time" placeholder="结束时间" disabled/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-divider />
|
||||
</el-row>
|
||||
|
||||
<!-- <el-row>
|
||||
<el-col :lg="8" :md="12">
|
||||
<el-form-item label="关联产物" prop="material">
|
||||
<el-select
|
||||
v-model="form.material"
|
||||
placeholder="关联产物"
|
||||
clearable
|
||||
style="width: 100%;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in teamOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :lg="8" :md="12">
|
||||
<el-form-item label="质检项目" prop="testitem">
|
||||
<el-select
|
||||
v-model="form.testitem"
|
||||
placeholder="质检项目"
|
||||
clearable
|
||||
style="width: 100%;"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in teamOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :lg="8" :md="12">
|
||||
<el-form-item label="平均值" prop="team">
|
||||
<el-input v-model="form.number" placeholder="平均值" />
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :lg="8" :md="12">
|
||||
<el-form-item label="检验次数" prop="mgroup">
|
||||
<el-input v-model="form.number" placeholder="检验次数"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
<el-col :lg="8" :md="12">
|
||||
<el-form-item label="合格次数" prop="number">
|
||||
<el-input v-model="form.number" placeholder="合格次数"/>
|
||||
</el-form-item>
|
||||
</el-col>
|
||||
|
||||
<el-divider />
|
||||
</el-row> -->
|
||||
</el-form>
|
||||
<sc-form-table
|
||||
v-model="form.list"
|
||||
:addTemplate="addTemplate"
|
||||
placeholder="暂无数据"
|
||||
>
|
||||
<el-table-column prop="material" label="关联产物" min-width="150">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.id">{{ scope.row.material_name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="testitem" label="质检项目" min-width="150">
|
||||
<template #default="scope">
|
||||
<span v-if="scope.row.id">{{ scope.row.testitem_name }}</span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="val_avg" label="平均值" min-width="150">
|
||||
<template #default="scope">
|
||||
<el-input
|
||||
v-model="scope.row.val_avg"
|
||||
placeholder="请输入内容"
|
||||
></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="num_test" label="检验次数" min-width="150">
|
||||
<template #default="scope">
|
||||
<el-input
|
||||
v-model="scope.row.num_test"
|
||||
placeholder="请输入内容"
|
||||
></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="num_ok" label="合格次数" min-width="150">
|
||||
<template #default="scope">
|
||||
<el-input
|
||||
v-model="scope.row.num_ok"
|
||||
placeholder="请输入内容"
|
||||
></el-input>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</sc-form-table>
|
||||
</el-main>
|
||||
<el-footer>
|
||||
<el-button type="primary" :loading="isSaveing" @click="submit">保存</el-button>
|
||||
<el-button @click="visible = false">取消</el-button>
|
||||
</el-footer>
|
||||
</el-container>
|
||||
</el-dialog>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
emits: ["success", "closed"],
|
||||
data() {
|
||||
return {
|
||||
addTemplate: {
|
||||
material: "",
|
||||
testitem: "",
|
||||
val_avg: "",
|
||||
num_test: "",
|
||||
num_ok: "",
|
||||
},
|
||||
loading: false,
|
||||
mode: "add",
|
||||
titleMap: {
|
||||
add: "质量检验",
|
||||
edit: "质量检验",
|
||||
show: "质量检验",
|
||||
},
|
||||
form: {
|
||||
type:10,
|
||||
list:[]
|
||||
},
|
||||
rules: {
|
||||
name: [{required: true, message: "请输入", trigger: "blur"}],
|
||||
number: [{required: true, message: "请输入", trigger: "blur"}],
|
||||
keeper_name: [{required: true, message: "请输入", trigger: "blur"}],
|
||||
belong_dept: [{required: true, message: "请选择", trigger: "blur"}]
|
||||
},
|
||||
visible: false,
|
||||
isSaveing: false,
|
||||
keeperOptions: [],
|
||||
depOptions: [],
|
||||
selectionFilters: [],
|
||||
setFiltersVisible: false,
|
||||
teamOptions:[],
|
||||
shiftOptions:[],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
//是否已经保存过
|
||||
//若新增,调用init接口,若编辑修改,调get接口
|
||||
},
|
||||
methods: {
|
||||
|
||||
//显示
|
||||
open(mode = "add") {
|
||||
this.mode = mode;
|
||||
this.visible = true;
|
||||
return this;
|
||||
},
|
||||
getReceptionist(data) {
|
||||
this.form.leader=data.id;
|
||||
this.form.leader_name=data.name
|
||||
},
|
||||
//表单提交方法
|
||||
submit() {
|
||||
this.isSaveing = true;
|
||||
this.$API.qm.updateQuastat.req('bulk',this.form.list).then(res=>{
|
||||
this.isSaveing = false;
|
||||
this.$emit("success", this.form, this.mode);
|
||||
this.visible = false;
|
||||
this.$message.success("操作成功");
|
||||
}).catch(res=>{
|
||||
this.isSaveing = false;
|
||||
})
|
||||
// this.$refs.dialogForm.validate(async (valid) => {
|
||||
// if (valid) {
|
||||
|
||||
// }
|
||||
// });
|
||||
},
|
||||
//表单注入数据
|
||||
setData(data) {
|
||||
Object.assign(this.form,data);
|
||||
this.getsflogItem(this.form.id);
|
||||
},
|
||||
getsflogItem(id){
|
||||
this.$API.wpm.sflog.init_test.req(id).then(res=>{
|
||||
this.form.list = res;
|
||||
})
|
||||
},
|
||||
//设置过滤项
|
||||
setFilters(filters) {
|
||||
this.selectionFilters = filters;
|
||||
this.setFiltersVisible = true;
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
#bigDialog{
|
||||
width: 90%;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
|
@ -0,0 +1,240 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="exportExcel()"
|
||||
:loading = "exportLoading"
|
||||
>导出xlsx
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="handlePrint"
|
||||
>打印
|
||||
</el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-card style="margin-top:5px">
|
||||
<div ref="print" id="myReport" class="printContainer">
|
||||
<h3 style="text-align: center;">生产报告</h3>
|
||||
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable">
|
||||
<thead style="background: #efefef;height: 40px;">
|
||||
<tr>
|
||||
<th colspan="2">参数</th>
|
||||
<th>上个小时</th>
|
||||
<th>昨日</th>
|
||||
<th>本月</th>
|
||||
<th>本年</th>
|
||||
<th>月目标值</th>
|
||||
<th>月完成度</th>
|
||||
<th>年目标值</th>
|
||||
<th>年完成度</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item) in tableDatas" :key="item">
|
||||
<td class="numCell">{{item[0]}}</td>
|
||||
<td class="numCell">{{item[1]}}</td>
|
||||
<td class="numCell hoursItem" @click="itemClick('hours',item)" style="background: rgba(238, 179, 179, 0.8);">{{item[2]}}</td>
|
||||
<td class="numCell daysItem" @click="itemClick('days',item)" style="background: rgba(239, 90, 90, 0.8);">{{item[3]}}</td>
|
||||
<td class="numCell monthItem" @click="itemClick('month',item)" style="background: rgba(238, 189, 124, 0.8);">{{item[4]}}</td>
|
||||
<td class="numCell yearItem" @click="itemClick1('year',item)" style="background: rgba(186, 236, 135, 0.8);">{{item[5]}}</td>
|
||||
<td class="numCell">{{item[6]}}</td>
|
||||
<td class="numCell">{{item[7]}}</td>
|
||||
<td class="numCell">{{item[8]}}</td>
|
||||
<td class="numCell">{{item[9]}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
<sc-dialog v-model="chartShow" draggable title="电石渣工段">
|
||||
<div class="searchHead" v-if="type=='hours'">
|
||||
<el-date-picker
|
||||
v-model="query.start_time"
|
||||
type="date"
|
||||
placeholder="选择时间"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<span class="middleText">至</span>
|
||||
<el-date-picker
|
||||
v-model="query.end_time"
|
||||
type="date"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
start-placeholder="结束日期"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-button type="primary" class="searchBtn" @click="dataSearch">查询</el-button>
|
||||
</div>
|
||||
<div class="searchHead" v-if="type=='days'">
|
||||
<el-date-picker
|
||||
v-model="query.start_time"
|
||||
type="date"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
start-placeholder="开始日期"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-date-picker
|
||||
v-model="query.end_time"
|
||||
type="date"
|
||||
format="YYYY-MM-DD"
|
||||
value-format="YYYY-MM-DD"
|
||||
start-placeholder="结束日期"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-button type="primary" class="searchBtn" @click="dataSearch">查询</el-button>
|
||||
</div>
|
||||
<div class="searchHead" v-if="type=='month'">
|
||||
<el-date-picker
|
||||
v-model="query.start_time"
|
||||
type="month"
|
||||
format="YYYY-MM"
|
||||
value-format="YYYY-MM"
|
||||
start-placeholder="开始月份"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-date-picker
|
||||
v-model="query.end_time"
|
||||
type="month"
|
||||
format="YYYY-MM"
|
||||
value-format="YYYY-MM"
|
||||
start-placeholder="结束月份"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-button type="primary" class="searchBtn" @click="dataSearch">查询</el-button>
|
||||
</div>
|
||||
<div class="searchHead" v-if="type=='year'">
|
||||
<el-date-picker
|
||||
v-model="query.start_time"
|
||||
type="year"
|
||||
format="YYYY"
|
||||
value-format="YYYY"
|
||||
start-placeholder="开始日期"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-date-picker
|
||||
v-model="query.end_time"
|
||||
type="year"
|
||||
format="YYYY"
|
||||
value-format="YYYY"
|
||||
start-placeholder="结束日期"
|
||||
:picker-options="pickerOptions"
|
||||
/>
|
||||
<el-button type="primary" class="searchBtn" @click="dataSearch">查询</el-button>
|
||||
</div>
|
||||
<scEcharts height="360px" :option="myOption" v-if="chartShow"></scEcharts>
|
||||
</sc-dialog>
|
||||
<charts
|
||||
v-if="asynDialog"
|
||||
:type="type"
|
||||
:title="title"
|
||||
:modelValue="modelValue"
|
||||
:showClose="showClose"
|
||||
:echartType='echartType'
|
||||
@closed="asynDialog = false"
|
||||
></charts>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import scEcharts from "@/components/scEcharts";
|
||||
import { defineAsyncComponent } from 'vue'
|
||||
export default {
|
||||
components: {
|
||||
scEcharts,
|
||||
charts: defineAsyncComponent(() => import("@/components/scEnm/lineChartsdialog.vue")),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
chartShow: false,
|
||||
myOption: null,
|
||||
timeStamp:0,
|
||||
listQuery:{
|
||||
belong_dept:'',
|
||||
task2__year:'',
|
||||
page:0
|
||||
},
|
||||
query:{
|
||||
time:''
|
||||
},
|
||||
tableDatas:[
|
||||
['产量','总产量(t)',0,0,0,0,0,0,0,0],
|
||||
['能耗','单位产品分布电耗(KW·h/t)',1,1,1,1,1,1,1,1],
|
||||
['成本','电石渣成本(元/吨)',2,2,2,2,2,2,2,2],
|
||||
],
|
||||
tableName:'生产报告',
|
||||
modelValue:true,
|
||||
type:'hours',
|
||||
title:'电石渣工段',
|
||||
apiObj:'',
|
||||
showClose:true,
|
||||
echartType:'line',
|
||||
asynDialog:false,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
|
||||
itemClick(type,item){
|
||||
this.type=type;
|
||||
this.asynDialog = true;
|
||||
},
|
||||
itemClick1(type,item){
|
||||
this.chartShow = false;
|
||||
this.$API.bi.dataset.exec
|
||||
.req('3322567213885833216')
|
||||
.then((res) => {
|
||||
this.myOption = JSON.parse(res.echart_options);
|
||||
debugger;
|
||||
console.log(this.myOption)
|
||||
this.chartShow = true;
|
||||
});
|
||||
},
|
||||
handlePrint() {
|
||||
this.$PRINT('#myReport');
|
||||
},
|
||||
exportExcel() {
|
||||
this.exportLoading = true;
|
||||
this.$XLSX('#myTable', this.tableName)
|
||||
this.exportLoading = false;
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.printContainer{
|
||||
width: 1075px;
|
||||
}
|
||||
#numTable{
|
||||
margin-left: 37px;
|
||||
}
|
||||
#numTable td{
|
||||
height: 32px;
|
||||
padding-left: 5px;
|
||||
}
|
||||
.numCell{
|
||||
width: 80px;
|
||||
height: 35px;
|
||||
text-align: center;
|
||||
}
|
||||
.numCell.numCell_last{
|
||||
width: 100px;
|
||||
}
|
||||
.searchHead{
|
||||
display:flex
|
||||
}
|
||||
.middleText{
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
margin: 0 5px;
|
||||
display: inline-block;
|
||||
}
|
||||
.searchBtn{
|
||||
margin-left: 5px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,176 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-date-picker
|
||||
v-model="query.time"
|
||||
type="month"
|
||||
value-format="YYYY-MM"
|
||||
format="YYYY-MM"
|
||||
placeholder="基础月份"
|
||||
/>
|
||||
<el-date-picker
|
||||
v-model="query.time2"
|
||||
type="month"
|
||||
value-format="YYYY-MM"
|
||||
format="YYYY-MM"
|
||||
placeholder="对比月份"
|
||||
/>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="handleQuery"
|
||||
></el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="exportExcel()"
|
||||
:loading = "exportLoading"
|
||||
>导出xlsx
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="handlePrint"
|
||||
>打印
|
||||
</el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-card style="margin-top:5px">
|
||||
<div ref="print" id="myReport" class="printContainer">
|
||||
<h3 style="text-align: center;">主要设备(100KW以上)单位产品电耗数据表</h3>
|
||||
<table border="1" cellspacing="0" :key="timeStamp" id="myTable">
|
||||
<thead style="background: #efefef;height: 40px;">
|
||||
<tr>
|
||||
<th rowspan="2">月份</th>
|
||||
<th rowspan="2">班组</th>
|
||||
<th colspan="2">产量</th>
|
||||
<th>运转率</th>
|
||||
<th>成本</th>
|
||||
<th colspan="4">质量</th>
|
||||
<th colspan="7">单位产品电耗</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>总产量(t)</th>
|
||||
<th>台时产量(t/h)</th>
|
||||
<th>运转率(%)</th>
|
||||
<th>单位产品成本(元/吨)</th>
|
||||
<th>细度(%)</th>
|
||||
<th>Fe₂O₃(%)</th>
|
||||
<th>水分(%)</th>
|
||||
<th>CaO(%)</th>
|
||||
<th>当期单位产品电耗(kW·h/h)</th>
|
||||
<th>单位产品电耗目标值(kW·h/h)</th>
|
||||
<th>当期单位产品电耗与目标值差值(kW·h/h)</th>
|
||||
<th>环期单位产品电耗(kW·h/h)</th>
|
||||
<th>当期单位产品电耗与环期差值(kW·h/h)</th>
|
||||
<th>当期单位产品电耗环比增长率(%)</th>
|
||||
<th>同比增长率(%)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr v-for="(item,index) in tableDatas" :key="index">
|
||||
<td v-if="index%3==0" rowspan="3" style="width:50px">{{item.month}}</td>
|
||||
<td class="numCell">{{item.name}}</td>
|
||||
<td class="numCell">{{item.number}}</td>
|
||||
<td class="numCell">{{item.unit}}</td>
|
||||
<td class="numCell">{{item.hours}}</td>
|
||||
<td class="numCell">{{item.days}}</td>
|
||||
<td class="numCell">{{item.months}}</td>
|
||||
<td class="numCell">{{item.hours}}</td>
|
||||
<td class="numCell">{{item.days}}</td>
|
||||
<td class="numCell">{{item.months}}</td>
|
||||
<td class="numCell">{{item.hours}}</td>
|
||||
<td class="numCell">{{item.days}}</td>
|
||||
<td class="numCell">{{item.months}}</td>
|
||||
<td class="numCell">{{item.months}}</td>
|
||||
<td class="numCell">{{item.hours}}</td>
|
||||
<td class="numCell">{{item.days}}</td>
|
||||
<td class="numCell">{{item.months}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
data() {
|
||||
return {
|
||||
timeStamp:0,
|
||||
listQuery:{
|
||||
belong_dept:'',
|
||||
task2__year:'',
|
||||
page:0
|
||||
},
|
||||
query:{
|
||||
time:'',
|
||||
time2:'',
|
||||
},
|
||||
tableDatas:[
|
||||
{month:'2023.1',name:'甲组',number:'NM001',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
{month:'2023.1',name:'乙组',number:'NM002',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
{month:'2023.1',name:'丙组',number:'NM003',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
{month:'2023.2',name:'甲组',number:'NM004',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
{month:'2023.2',name:'乙组',number:'NM005',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
{month:'2023.2',name:'丙组',number:'NM006',unit:'KW·h/t',hours:'1',days:'2',months:'3'},
|
||||
],
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
|
||||
itemClick(type,item){
|
||||
this.type=type;
|
||||
this.asynDialog = true;
|
||||
},
|
||||
itemClick1(type,item){
|
||||
this.chartShow = false;
|
||||
this.$API.bi.dataset.exec
|
||||
.req('3322567213885833216')
|
||||
.then((res) => {
|
||||
this.myOption = JSON.parse(res.echart_options);
|
||||
debugger;
|
||||
console.log(this.myOption)
|
||||
this.chartShow = true;
|
||||
});
|
||||
},
|
||||
handlePrint() {
|
||||
this.$PRINT('#myReport');
|
||||
},
|
||||
exportExcel() {
|
||||
this.exportLoading = true;
|
||||
this.$XLSX('#myTable', this.tableName)
|
||||
this.exportLoading = false;
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.printContainer{
|
||||
width: 1075px;
|
||||
}
|
||||
#numTable{
|
||||
margin-left: 37px;
|
||||
}
|
||||
#numTable td{
|
||||
height: 32px;
|
||||
padding-left: 5px;
|
||||
}
|
||||
.numCell{
|
||||
width: 80px;
|
||||
}
|
||||
.numCell.numCell_last{
|
||||
width: 100px;
|
||||
}
|
||||
.searchHead{
|
||||
display:flex
|
||||
}
|
||||
.middleText{
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
margin: 0 5px;
|
||||
display: inline-block;
|
||||
}
|
||||
.searchBtn{
|
||||
margin-left: 5px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -0,0 +1,159 @@
|
|||
<template>
|
||||
<div class="app-container">
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-date-picker
|
||||
v-model="monthrange"
|
||||
type="monthrange"
|
||||
range-separator="至"
|
||||
start-placeholder="开始月份"
|
||||
end-placeholder="结束月份"
|
||||
value-format="YYYY-MM"
|
||||
format="YYYY-MM"
|
||||
/>
|
||||
<el-button
|
||||
type="primary"
|
||||
icon="el-icon-search"
|
||||
@click="handleQuery"
|
||||
></el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="exportExcel()"
|
||||
:loading = "exportLoading"
|
||||
>导出xlsx
|
||||
</el-button>
|
||||
<el-button
|
||||
type="primary"
|
||||
@click="handlePrint"
|
||||
>打印
|
||||
</el-button>
|
||||
</div>
|
||||
</el-header>
|
||||
<el-card style="margin-top:5px">
|
||||
<div ref="print" id="myReport" class="printContainer">
|
||||
<h3 style="text-align: center;">车间单位产品电耗月度分析表</h3>
|
||||
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable">
|
||||
<thead style="background: #efefef;height: 40px;">
|
||||
<tr>
|
||||
<th>月份</th>
|
||||
<th>当期值(KW·h/t)</th>
|
||||
<th>目标值(KW·h/t)</th>
|
||||
<th>当期与目标差值(KW·h/t)</th>
|
||||
<th>环期值(KW·h/t)</th>
|
||||
<th>当期与环期差值(KW·h/t)</th>
|
||||
<th>环比增长率(%)</th>
|
||||
<th>同比增长率(%)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr v-for="(item) in tableDatas" :key="item">
|
||||
<td class="numCell">{{item.month}}</td>
|
||||
<td class="numCell">{{item.value1}}</td>
|
||||
<td class="numCell">{{item.value2}}</td>
|
||||
<td class="numCell">{{item.value3}}</td>
|
||||
<td class="numCell">{{item.value4}}</td>
|
||||
<td class="numCell">{{item.value5}}</td>
|
||||
<td class="numCell">{{item.value6}}</td>
|
||||
<td class="numCell">{{item.value7}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</el-card>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import scEcharts from "@/components/scEcharts";
|
||||
import { defineAsyncComponent } from 'vue'
|
||||
export default {
|
||||
components: {
|
||||
scEcharts,
|
||||
charts: defineAsyncComponent(() => import("@/components/scEnm/lineChartsdialog.vue")),
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
chartShow: false,
|
||||
myOption: null,
|
||||
timeStamp:0,
|
||||
listQuery:{
|
||||
belong_dept:'',
|
||||
task2__year:'',
|
||||
page:0
|
||||
},
|
||||
query:{
|
||||
time:''
|
||||
},
|
||||
tableDatas:[
|
||||
{month:'2023-05',value1:'1203',value2:'1200',value3:'3',value4:'1150',value5:'50',value6:'0.4',value7:'0.4'},
|
||||
{month:'2023-06',value1:'1203',value2:'1200',value3:'3',value4:'1150',value5:'50',value6:'0.4',value7:'0.4'},
|
||||
{month:'2023-07',value1:'1203',value2:'1200',value3:'3',value4:'1150',value5:'50',value6:'0.4',value7:'0.4'},
|
||||
],
|
||||
modelValue:true,
|
||||
type:'hours',
|
||||
title:'title',
|
||||
apiObj:'',
|
||||
showClose:true,
|
||||
echartType:'line',
|
||||
asynDialog:false,
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
},
|
||||
methods: {
|
||||
|
||||
itemClick(type,item){
|
||||
this.type=type;
|
||||
this.asynDialog = true;
|
||||
},
|
||||
itemClick1(type,item){
|
||||
this.chartShow = false;
|
||||
this.$API.bi.dataset.exec
|
||||
.req('3322567213885833216')
|
||||
.then((res) => {
|
||||
this.myOption = JSON.parse(res.echart_options);
|
||||
debugger;
|
||||
console.log(this.myOption)
|
||||
this.chartShow = true;
|
||||
});
|
||||
},
|
||||
handlePrint() {
|
||||
this.$PRINT('#myReport');
|
||||
},
|
||||
exportExcel() {
|
||||
this.exportLoading = true;
|
||||
this.$XLSX('#myTable', this.tableName)
|
||||
this.exportLoading = false;
|
||||
},
|
||||
}
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.printContainer{
|
||||
width: 1075px;
|
||||
}
|
||||
#numTable{
|
||||
margin-left: 37px;
|
||||
}
|
||||
#numTable td{
|
||||
height: 32px;
|
||||
padding-left: 5px;
|
||||
}
|
||||
.numCell{
|
||||
width: 80px;
|
||||
}
|
||||
.numCell.numCell_last{
|
||||
width: 100px;
|
||||
}
|
||||
.searchHead{
|
||||
display:flex
|
||||
}
|
||||
.middleText{
|
||||
height: 32px;
|
||||
line-height: 32px;
|
||||
margin: 0 5px;
|
||||
display: inline-block;
|
||||
}
|
||||
.searchBtn{
|
||||
margin-left: 5px;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -3,190 +3,125 @@
|
|||
<div class="widgets-content">
|
||||
<div class="widgets" ref="widgets">
|
||||
<div class="widgets-wrapper">
|
||||
<el-card shadow="hover" class="item-background" style="wdith:100%;padding: 0 20px 0 10px;">
|
||||
<!-- <el-card shadow="hover" class="item-background" style="wdith:100%;padding: 0 20px 0 10px;">
|
||||
<div class="time">
|
||||
<div>{{ day }}</div>
|
||||
<text>当前时间</text>
|
||||
<h3>{{ time }}</h3>
|
||||
</div>
|
||||
</el-card>
|
||||
<el-row :gutter="6" style="padding: 6px;">
|
||||
<el-col><h4>成本统计</h4></el-col>
|
||||
<el-col :span="6">
|
||||
<el-card class="costCard">
|
||||
<div class="itemTxt">月电石渣成本:</div>
|
||||
<div class="itemNumber">1208</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-card class="costCard">
|
||||
<div class="itemTxt">月熟料成本:</div>
|
||||
<div class="itemNumber">1208</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-card class="costCard">
|
||||
<div class="itemTxt">月生料成本:</div>
|
||||
<div class="itemNumber">1208</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-card class="costCard">
|
||||
<div class="itemTxt">月水泥成本:</div>
|
||||
<div class="itemNumber">1208</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="6" style="padding: 6px;">
|
||||
</el-card> -->
|
||||
<el-row :gutter="6" style="padding: 10px;">
|
||||
<el-col>
|
||||
<h4>能耗</h4>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-card class="energyCard">
|
||||
<div class="itemTxt">熟料月综合电耗:</div>
|
||||
<div class="itemNumber">1208</div>
|
||||
<div class="itemTxt">本年度熟料综合电耗:</div>
|
||||
<div class="itemNumber yearNumber">35620</div>
|
||||
<el-card header="成本统计" style="border-radius: 10px;">
|
||||
<div class="itemsWrap">
|
||||
<div class="items" style="width: 200px;text-align: center;">
|
||||
<div class="item-number">1208</div>
|
||||
<div class="item-name">月电石渣成本</div>
|
||||
</div>
|
||||
<div class="items" style="width: 200px;text-align: center;">
|
||||
<div class="item-number">1208</div>
|
||||
<div class="item-name">月熟料成</div>
|
||||
</div>
|
||||
<div class="items" style="width: 200px;text-align: center;">
|
||||
<div class="item-number">1208</div>
|
||||
<div class="item-name">月生料成本</div>
|
||||
</div>
|
||||
<div class="items" style="width: 200px;text-align: center;">
|
||||
<div class="item-number">1208</div>
|
||||
<div class="item-name">月水泥成本</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-card class="energyCard">
|
||||
<div class="itemTxt">熟料月单位标煤耗:</div>
|
||||
<div class="itemNumber">1208</div>
|
||||
<div class="itemTxt">本年度熟料单位标煤耗:</div>
|
||||
<div class="itemNumber yearNumber">35620</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-card class="energyCard">
|
||||
<div class="itemTxt">熟料月综合能耗:</div>
|
||||
<div class="itemNumber">1208</div>
|
||||
<div class="itemTxt">本年度熟料综合能耗:</div>
|
||||
<div class="itemNumber yearNumber">35620</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-card class="energyCard">
|
||||
<div class="itemTxt">水泥月综合能耗:</div>
|
||||
<div class="itemNumber">1208</div>
|
||||
<div class="itemTxt">本年度水泥综合能耗:</div>
|
||||
<div class="itemNumber yearNumber">35620</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-card class="energyCard">
|
||||
<div class="itemTxt">月电石渣分布电耗:</div>
|
||||
<div class="itemNumber">1208</div>
|
||||
<div class="itemTxt">本年度电石渣分布电耗:</div>
|
||||
<div class="itemNumber yearNumber">35620</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-card class="energyCard">
|
||||
<div class="itemTxt">月生料分布电耗:</div>
|
||||
<div class="itemNumber">1208</div>
|
||||
<div class="itemTxt">本年度生料分布电耗:</div>
|
||||
<div class="itemNumber yearNumber">35620</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-card class="energyCard">
|
||||
<div class="itemTxt">月熟料分布电耗:</div>
|
||||
<div class="itemNumber">1208</div>
|
||||
<div class="itemTxt">本年度熟料分布电耗:</div>
|
||||
<div class="itemNumber yearNumber">35620</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-card class="energyCard">
|
||||
<div class="itemTxt">月水泥粉磨分布电耗:</div>
|
||||
<div class="itemNumber">1208</div>
|
||||
<div class="itemTxt">本年度水泥粉磨分布电耗:</div>
|
||||
<div class="itemNumber yearNumber">35620</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="8">
|
||||
<el-card class="energyCard">
|
||||
<div class="itemTxt">月水泥包装分布电耗:</div>
|
||||
<div class="itemNumber">1208</div>
|
||||
<div class="itemTxt">本年度水泥包装分布电耗:</div>
|
||||
<div class="itemNumber yearNumber">35620</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
</el-row>
|
||||
<el-row :gutter="6">
|
||||
<el-col>
|
||||
<p>产量及完成度</p>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-card class="numberCard">
|
||||
<div style="width:100%;display: flex;justify-content: space-around;">
|
||||
<div>
|
||||
<div class="itemTxt">月电石渣产量:</div>
|
||||
<div class="itemNumber">1208</div>
|
||||
<div class="itemTxt">月完成度:</div>
|
||||
<div class="itemNumber yearNumber">35620</div>
|
||||
<el-card header="能耗" style="border-radius: 10px;">
|
||||
<div class="itemsWrap">
|
||||
<div class="items" style="width: 200px;text-align: center;">
|
||||
<div class="item-number">1208</div>
|
||||
<div class="item-name">熟料月综合电耗</div>
|
||||
<div class="item-percent">1208/35620(年度比)</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="itemTxt">本年累计电石渣产量:</div>
|
||||
<div class="itemNumber">1208</div>
|
||||
<div class="itemTxt">年完成度:</div>
|
||||
<div class="itemNumber yearNumber">35620</div>
|
||||
<div class="items" style="width: 200px;text-align: center;">
|
||||
<div class="item-number">1208</div>
|
||||
<div class="item-name">熟料月单位标煤耗</div>
|
||||
<div class="item-percent">1208/35620(年度比)</div>
|
||||
</div>
|
||||
<div class="items" style="width: 200px;text-align: center;">
|
||||
<div class="item-number">1208</div>
|
||||
<div class="item-name">熟料月综合能耗</div>
|
||||
<div class="item-percent">1208/35620(年度比)</div>
|
||||
</div>
|
||||
<div class="items" style="width: 200px;text-align: center;">
|
||||
<div class="item-number">1208</div>
|
||||
<div class="item-name">水泥月综合能耗</div>
|
||||
<div class="item-percent">1208/35620(年度比)</div>
|
||||
</div>
|
||||
<div class="items" style="width: 200px;text-align: center;">
|
||||
<div class="item-number">1208</div>
|
||||
<div class="item-name">月电石渣分布电耗</div>
|
||||
<div class="item-percent">1208/35620(年度比)</div>
|
||||
</div>
|
||||
<div class="items" style="width: 200px;text-align: center;">
|
||||
<div class="item-number">1208</div>
|
||||
<div class="item-name">月生料分布电耗</div>
|
||||
<div class="item-percent">1208/35620(年度比)</div>
|
||||
</div>
|
||||
<div class="items" style="width: 200px;text-align: center;">
|
||||
<div class="item-number">1208</div>
|
||||
<div class="item-name">月熟料分布电耗</div>
|
||||
<div class="item-percent">1208/35620(年度比)</div>
|
||||
</div>
|
||||
<div class="items" style="width: 200px;text-align: center;">
|
||||
<div class="item-number">1208</div>
|
||||
<div class="item-name">月水泥粉磨分布电耗</div>
|
||||
<div class="item-percent">1208/35620(年度比)</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-card class="numberCard">
|
||||
<div style="width:100%;display: flex;justify-content: space-around;">
|
||||
<div>
|
||||
<div class="itemTxt">月生料产量:</div>
|
||||
<div class="itemNumber">1208</div>
|
||||
<div class="itemTxt">月完成度:</div>
|
||||
<div class="itemNumber yearNumber">35620</div>
|
||||
<el-col>
|
||||
<el-card header="产量及完成度" style="border-radius: 10px;">
|
||||
<div class="itemsWrap">
|
||||
<div class="items" style="width: 200px;text-align: center;">
|
||||
<div class="item-number">1208</div>
|
||||
<div class="item-name">月电石渣产量</div>
|
||||
<div class="item-percent">99%(完成度)</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="itemTxt">本年累计生料产量:</div>
|
||||
<div class="itemNumber">1208</div>
|
||||
<div class="itemTxt">年完成度:</div>
|
||||
<div class="itemNumber yearNumber">35620</div>
|
||||
<div class="items" style="width: 200px;text-align: center;">
|
||||
<div class="item-number">1208</div>
|
||||
<div class="item-name">本年累计电石渣产量</div>
|
||||
<div class="item-percent">99%(完成度)</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-card class="numberCard">
|
||||
<div style="width:100%;display: flex;justify-content: space-around;">
|
||||
<div>
|
||||
<div class="itemTxt">月熟料产量:</div>
|
||||
<div class="itemNumber">1208</div>
|
||||
<div class="itemTxt">月完成度:</div>
|
||||
<div class="itemNumber yearNumber">35620</div>
|
||||
<div class="items" style="width: 200px;text-align: center;">
|
||||
<div class="item-number">1208</div>
|
||||
<div class="item-name">熟料月单位标煤耗</div>
|
||||
<div class="item-percent">100%(完成度)</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="itemTxt">本年累计熟料产量:</div>
|
||||
<div class="itemNumber">1208</div>
|
||||
<div class="itemTxt">年完成度:</div>
|
||||
<div class="itemNumber yearNumber">35620</div>
|
||||
<div class="items" style="width: 200px;text-align: center;">
|
||||
<div class="item-number">1208</div>
|
||||
<div class="item-name">本年累计生料产量</div>
|
||||
<div class="item-percent">100%(完成度)</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
<el-col :span="6">
|
||||
<el-card class="numberCard">
|
||||
<div style="width:100%;display: flex;justify-content: space-around;">
|
||||
<div>
|
||||
<div class="itemTxt">月水泥产量:</div>
|
||||
<div class="itemNumber">1208</div>
|
||||
<div class="itemTxt">月完成度:</div>
|
||||
<div class="itemNumber yearNumber">35620</div>
|
||||
<div class="items" style="width: 200px;text-align: center;">
|
||||
<div class="item-number">1208</div>
|
||||
<div class="item-name">熟料月综合能耗</div>
|
||||
<div class="item-percent">100%(完成度)</div>
|
||||
</div>
|
||||
<div>
|
||||
<div class="itemTxt">本年累计水泥产量:</div>
|
||||
<div class="itemNumber">1208</div>
|
||||
<div class="itemTxt">年完成度:</div>
|
||||
<div class="itemNumber yearNumber">35620</div>
|
||||
<div class="items" style="width: 200px;text-align: center;">
|
||||
<div class="item-number">1208</div>
|
||||
<div class="item-name">本年累计熟料产量</div>
|
||||
<div class="item-percent">100%(完成度)</div>
|
||||
</div>
|
||||
<div class="items" style="width: 200px;text-align: center;">
|
||||
<div class="item-number">1208</div>
|
||||
<div class="item-name">水泥月综合能耗</div>
|
||||
<div class="item-percent">100%(完成度)</div>
|
||||
</div>
|
||||
<div class="items" style="width: 200px;text-align: center;">
|
||||
<div class="item-number">1208</div>
|
||||
<div class="item-name">本年累计水泥产量</div>
|
||||
<div class="item-percent">100%(完成度)</div>
|
||||
</div>
|
||||
</div>
|
||||
</el-card>
|
||||
</el-col>
|
||||
|
|
@ -371,8 +306,41 @@
|
|||
font-size: 30px;
|
||||
color: #46d388;
|
||||
text-align: center;
|
||||
|
||||
}
|
||||
.itemNumber.yearNumber{
|
||||
color: #7f9eff;
|
||||
}
|
||||
.itemsWrap{
|
||||
display: flex;
|
||||
padding: 20px;
|
||||
}
|
||||
.items{
|
||||
border-right: 1px dashed #cccccc;
|
||||
}
|
||||
.items:last-child{
|
||||
border-right: 0;
|
||||
}
|
||||
.item-number{
|
||||
font-weight: 600;
|
||||
font-size: 24px;
|
||||
color: #1e2126;
|
||||
letter-spacing: .1px;
|
||||
text-align: center;
|
||||
line-height: 36px;
|
||||
}
|
||||
.item-name{
|
||||
font-size: 14px;
|
||||
color: #4e5b71;
|
||||
letter-spacing: .1px;
|
||||
text-align: center;
|
||||
line-height: 20px;
|
||||
}
|
||||
.item-percent{
|
||||
font-size: 9px;
|
||||
color: #b5c0ce;
|
||||
letter-spacing: .08px;
|
||||
text-align: center;
|
||||
line-height: 12px;
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -3,6 +3,19 @@
|
|||
<div class="app-container">
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-select
|
||||
v-model="query.mgroup"
|
||||
placeholder="工段"
|
||||
clearable
|
||||
style="margin-left: 2px; width: 200px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in mgroupOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
<el-select
|
||||
v-model="query.type"
|
||||
placeholder="查询类型"
|
||||
|
|
@ -22,7 +35,7 @@
|
|||
value-format="YYYY-MM-DD"
|
||||
format="YYYY-MM-DD"
|
||||
placeholder="日"
|
||||
v-if="query.type==0||query.type==1"
|
||||
v-if="query.type==0"
|
||||
/>
|
||||
<!-- 选择班次 -->
|
||||
<el-select
|
||||
|
|
@ -45,6 +58,14 @@
|
|||
value-format="YYYY-MM"
|
||||
format="YYYY-MM"
|
||||
placeholder="月份"
|
||||
v-if="query.type==1"
|
||||
/>
|
||||
<el-date-picker
|
||||
v-model="query.year"
|
||||
type="year"
|
||||
value-format="YYYY"
|
||||
format="YYYY"
|
||||
placeholder="年份"
|
||||
v-if="query.type==2"
|
||||
/>
|
||||
<el-button
|
||||
|
|
@ -66,159 +87,11 @@
|
|||
</div>
|
||||
</el-header>
|
||||
<el-card style="margin-top:5px">
|
||||
<div ref="print" id="myReport" class="printContainer" style="display: none;">
|
||||
<table border="1" cellspacing="0" :key="timeStamp" id="myTable">
|
||||
<thead style="background: #efefef;height: 40px;">
|
||||
<tr>
|
||||
<th colspan="8">电石渣干粉核算</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>要素</th>
|
||||
<th>类别</th>
|
||||
<th>费用名称</th>
|
||||
<th>实际产量</th>
|
||||
<th>消耗量</th>
|
||||
<th>单价</th>
|
||||
<th>总成本</th>
|
||||
<th>单位成本</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr v-for="(item,index) in tableDatas" :key="index">
|
||||
<td class="numCell" v-if="index==0" rowspan="3">{{item[0]}}</td>
|
||||
<td class="numCell" v-else-if="index==3" rowspan="2">{{item[0]}}</td>
|
||||
<td class="numCell" v-else-if="index==5" rowspan="8">{{item[0]}}</td>
|
||||
<td class="numCell" v-else-if="index==13" colspan="3">{{item[0]}}</td>
|
||||
<td class="numCell" v-if="index==1||index==7" rowspan="2">{{item[1]}}</td>
|
||||
<td class="numCell" v-else-if="index==3||index==4" colspan="2">{{item[1]}}</td>
|
||||
<td class="numCell" v-else-if="index==13" colspan="4">{{item[1]}}</td>
|
||||
<td class="numCell" style="display: none;" v-else-if="index==2||index==8">{{item[1]}}</td>
|
||||
<td class="numCell" v-else>{{item[1]}}</td>
|
||||
<td class="numCell">{{item[2]}}</td>
|
||||
<td class="numCell" v-if="index!==13">{{item[3]}}</td>
|
||||
<td class="numCell" v-if="index!==13">{{item[4]}}</td>
|
||||
<td class="numCell" v-if="index!==13">{{item[5]}}</td>
|
||||
<td class="numCell" v-if="index!==13">{{item[6]}}</td>
|
||||
<td class="numCell" style="display: none;" v-if="index==3||index==4||index==13">{{item[7]}}</td>
|
||||
<td class="numCell" v-else>{{item[7]}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="1" cellspacing="0" :key="timeStamp" id="myTable2">
|
||||
<thead style="background: #efefef;height: 40px;">
|
||||
<tr>
|
||||
<th colspan="8">生料核算</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>要素</th>
|
||||
<th>类别</th>
|
||||
<th>费用名称</th>
|
||||
<th>实际产量</th>
|
||||
<th>消耗量</th>
|
||||
<th>单价</th>
|
||||
<th>总成本</th>
|
||||
<th>单位成本</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr v-for="(item,index) in tableDatas2" :key="index">
|
||||
<td class="numCell" v-if="index==0" rowspan="6">{{item[0]}}</td>
|
||||
<td class="numCell" v-else-if="index==6" rowspan="2">{{item[0]}}</td>
|
||||
<td class="numCell" v-else-if="index==8" rowspan="8">{{item[0]}}</td>
|
||||
<td class="numCell" v-else-if="index==16" colspan="3">{{item[0]}}</td>
|
||||
|
||||
<td class="numCell" v-if="index==0" rowspan="4">{{item[1]}}</td>
|
||||
<td class="numCell" v-else-if="index==4||index==10" rowspan="2">{{item[1]}}</td>
|
||||
<td class="numCell" v-else-if="index==6||index==7" colspan="2">{{item[1]}}</td>
|
||||
<td class="numCell" v-else-if="index==16" colspan="4">{{item[1]}}</td>
|
||||
<td class="numCell" style="display: none;" v-else-if="index==1||index==2||index==3||index==5||index==11">{{item[1]}}</td>
|
||||
<td class="numCell" v-else>{{item[1]}}</td>
|
||||
|
||||
<td class="numCell">{{item[2]}}</td>
|
||||
<td class="numCell" v-if="index!==16">{{item[3]}}</td>
|
||||
<td class="numCell" v-if="index!==16">{{item[4]}}</td>
|
||||
<td class="numCell" v-if="index!==16">{{item[5]}}</td>
|
||||
<td class="numCell" v-if="index!==16">{{item[6]}}</td>
|
||||
<td class="numCell" style="display: none;" v-if="index==6||index==7||index==16">{{item[7]}}</td>
|
||||
<td class="numCell" v-else>{{item[7]}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="1" cellspacing="0" :key="timeStamp" id="myTable3">
|
||||
<thead style="background: #efefef;height: 40px;">
|
||||
<tr>
|
||||
<th colspan="8">熟料核算</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>要素</th>
|
||||
<th>类别</th>
|
||||
<th>费用名称</th>
|
||||
<th>实际产量</th>
|
||||
<th>消耗量</th>
|
||||
<th>单价</th>
|
||||
<th>总成本</th>
|
||||
<th>单位成本</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr v-for="(item,index) in tableDatas3" :key="index">
|
||||
<td class="numCell" v-if="index==0" rowspan="4">{{item[0]}}</td>
|
||||
<td class="numCell" v-else-if="index==4" rowspan="2">{{item[0]}}</td>
|
||||
<td class="numCell" v-else-if="index==6" rowspan="8">{{item[0]}}</td>
|
||||
<td class="numCell" v-else-if="index==14" colspan="3">{{item[0]}}</td>
|
||||
|
||||
<td class="numCell" v-if="index==2||index==8" rowspan="2">{{item[1]}}</td>
|
||||
<td class="numCell" v-else-if="index==4||index==5" colspan="2">{{item[1]}}</td>
|
||||
<td class="numCell" v-else-if="index==14" colspan="4">{{item[1]}}</td>
|
||||
<td class="numCell" style="display: none;" v-else-if="index==3||index==9">{{item[1]}}</td>
|
||||
<td class="numCell" v-else>{{item[1]}}</td>
|
||||
<td class="numCell">{{item[2]}}</td>
|
||||
<td class="numCell" v-if="index!==14">{{item[3]}}</td>
|
||||
<td class="numCell" v-if="index!==14">{{item[4]}}</td>
|
||||
<td class="numCell" v-if="index!==14">{{item[5]}}</td>
|
||||
<td class="numCell" v-if="index!==14">{{item[6]}}</td>
|
||||
<td class="numCell" style="display: none;" v-if="index==4||index==5||index==14">{{item[7]}}</td>
|
||||
<td class="numCell" v-else>{{item[7]}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="1" cellspacing="0" :key="timeStamp" id="myTable4">
|
||||
<thead style="background: #efefef;height: 40px;">
|
||||
<tr>
|
||||
<th colspan="8">水泥核算</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>要素</th>
|
||||
<th>类别</th>
|
||||
<th>费用名称</th>
|
||||
<th>实际产量</th>
|
||||
<th>消耗量</th>
|
||||
<th>单价</th>
|
||||
<th>总成本</th>
|
||||
<th>单位成本</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr v-for="(item,index) in tableDatas4" :key="index">
|
||||
<td class="numCell" v-if="index==0" rowspan="10">{{item[0]}}</td>
|
||||
<td class="numCell" v-else-if="index==10" rowspan="2">{{item[0]}}</td>
|
||||
<td class="numCell" v-else-if="index==12" rowspan="8">{{item[0]}}</td>
|
||||
<td class="numCell" v-else-if="index==20" colspan="3">{{item[0]}}</td>
|
||||
|
||||
<td class="numCell" v-if="index==1" rowspan="4">{{item[1]}}</td>
|
||||
<td class="numCell" v-else-if="index==8||index==5" rowspan="2">{{item[1]}}</td>
|
||||
<td class="numCell" v-else-if="index==10||index==11" colspan="2">{{item[1]}}</td>
|
||||
<td class="numCell" v-else-if="index==20" colspan="4">{{item[1]}}</td>
|
||||
<td class="numCell" style="display: none;" v-else-if="index==2||index==3||index==6||index==4||index==9">{{item[1]}}</td>
|
||||
<td class="numCell" v-else>{{item[1]}}</td>
|
||||
<td class="numCell">{{item[2]}}</td>
|
||||
<td class="numCell" v-if="index!==20">{{item[3]}}</td>
|
||||
<td class="numCell" v-if="index!==20">{{item[4]}}</td>
|
||||
<td class="numCell" v-if="index!==20">{{item[5]}}</td>
|
||||
<td class="numCell" v-if="index!==20">{{item[6]}}</td>
|
||||
<td class="numCell" style="display: none;" v-if="index==10||index==11||index==20">{{item[7]}}</td>
|
||||
<td class="numCell" v-else>{{item[7]}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
<div ref="print" id="myReport" class="printContainer">
|
||||
<table border="1" cellspacing="0" :key="timeStamp" id="myTable">
|
||||
<thead style="background: #efefef;height: 40px;">
|
||||
<tr>
|
||||
<th colspan="24">电石渣干粉核算</th>
|
||||
<th :colspan="allCol">电石渣干粉核算</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="3">日期</th>
|
||||
|
|
@ -227,315 +100,14 @@
|
|||
<th rowspan="3">实际产量(t)</th>
|
||||
<th rowspan="3">总成本(元)</th>
|
||||
<th rowspan="3">单位成本(元/吨)</th>
|
||||
<th colspan="8">直接材料</th>
|
||||
<th colspan="2">直接人工</th>
|
||||
<th colspan="8">制造费用</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="4">原材料</th>
|
||||
<th colspan="4">电</th>
|
||||
<th>车间人员工资</th>
|
||||
<th>劳务工资</th>
|
||||
<th>倒运费用</th>
|
||||
<th>材料出库</th>
|
||||
<th colspan="2">维修费用</th>
|
||||
<th>装卸费</th>
|
||||
<th>差旅费</th>
|
||||
<th>折旧</th>
|
||||
<th>摊销</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>湿电石渣(t)</th>
|
||||
<th>单价(元/吨)</th>
|
||||
<th>总成本(元)</th>
|
||||
<th>单位成本(元/吨)</th>
|
||||
<th>动力电(kw.h)</th>
|
||||
<th>单价(元/度)</th>
|
||||
<th>总成本(元)</th>
|
||||
<th>单位成本(元/度)</th>
|
||||
|
||||
<th>单位成本(元/吨)</th>
|
||||
<th>单位成本(元/吨)</th>
|
||||
|
||||
<th>单位成本(元/吨)</th>
|
||||
<th>单位成本(元/吨)</th>
|
||||
<th>检修单位成本(元/吨)</th>
|
||||
<th>外协施工费用单位成本(元/吨)</th>
|
||||
<th>单位成本(元/吨)</th>
|
||||
<th>单位成本(元/吨)</th>
|
||||
<th>单位成本(元/吨)</th>
|
||||
<th>无形资产摊销单位成本(元/吨)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr v-for="(item,index) in tableData1" :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>
|
||||
<td class="numCell">{{item[9]}}</td>
|
||||
<td class="numCell">{{item[10]}}</td>
|
||||
<td class="numCell">{{item[11]}}</td>
|
||||
<td class="numCell">{{item[12]}}</td>
|
||||
<td class="numCell">{{item[13]}}</td>
|
||||
<td class="numCell">{{item[14]}}</td>
|
||||
<td class="numCell">{{item[15]}}</td>
|
||||
<td class="numCell">{{item[16]}}</td>
|
||||
<td class="numCell">{{item[17]}}</td>
|
||||
<td class="numCell">{{item[18]}}</td>
|
||||
<td class="numCell">{{item[19]}}</td>
|
||||
<td class="numCell">{{item[20]}}</td>
|
||||
<td class="numCell">{{item[21]}}</td>
|
||||
<td class="numCell">{{item[22]}}</td>
|
||||
<td class="numCell">{{item[23]}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- 生料核算 -->
|
||||
<table border="1" cellspacing="0" :key="timeStamp" id="myTable">
|
||||
<thead style="background: #efefef;height: 40px;">
|
||||
<tr>
|
||||
<th colspan="24">生料核算</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="3">日期</th>
|
||||
<th rowspan="3">班次</th>
|
||||
<th rowspan="3">班组</th>
|
||||
<th rowspan="3">实际产量(t)</th>
|
||||
<th rowspan="3">总成本(元)</th>
|
||||
<th rowspan="3">单位成本(元/吨)</th>
|
||||
<th colspan="24">直接材料</th>
|
||||
<!-- <th colspan="2">直接人工</th>
|
||||
<th colspan="8">制造费用</th> -->
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="16">原材料</th>
|
||||
<!-- <th colspan="8">电和水</th> -->
|
||||
<!-- <th>车间人员工资</th>
|
||||
<th>劳务工资</th>
|
||||
<th>倒运费用</th>
|
||||
<th>材料出库</th>
|
||||
<th colspan="2">维修费用</th>
|
||||
<th>装卸费</th>
|
||||
<th>差旅费</th>
|
||||
<th>折旧</th>
|
||||
<th>摊销</th> -->
|
||||
</tr>
|
||||
<tr>
|
||||
<th>干粉(t)</th>
|
||||
<th>单价(元/吨)</th>
|
||||
<th>总成本(元)</th>
|
||||
<th>单位成本(元/吨)</th>
|
||||
<th>辅料(t)</th>
|
||||
<th>单价(元/吨)</th>
|
||||
<th>总成本(元)</th>
|
||||
<th>单位成本(元/吨)</th>
|
||||
<th>粉煤灰(t)</th>
|
||||
<th>单价(元/吨)</th>
|
||||
<th>总成本(元)</th>
|
||||
<th>单位成本(元/吨)</th>
|
||||
<th>电石厂除尘灰(t)</th>
|
||||
<th>单价(元/吨)</th>
|
||||
<th>总成本(元)</th>
|
||||
<th>单位成本(元/吨)</th>
|
||||
<!-- <th>动力电(kw.h)</th>
|
||||
<th>单价(元/度)</th>
|
||||
<th>总成本(元)</th>
|
||||
<th>单位成本(元/度)</th>
|
||||
<th>工业水(t)</th>
|
||||
<th>单价(元/吨)</th>
|
||||
<th>总成本(元)</th>
|
||||
<th>单位成本(元/吨)</th> -->
|
||||
|
||||
<!-- <th>单位成本(元/吨)</th>
|
||||
<th>单位成本(元/吨)</th>
|
||||
|
||||
<th>单位成本(元/吨)</th>
|
||||
<th>单位成本(元/吨)</th>
|
||||
<th>检修单位成本(元/吨)</th>
|
||||
<th>外协施工费用单位成本(元/吨)</th>
|
||||
<th>单位成本(元/吨)</th>
|
||||
<th>单位成本(元/吨)</th>
|
||||
<th>单位成本(元/吨)</th>
|
||||
<th>无形资产摊销单位成本(元/吨)</th> -->
|
||||
</tr>
|
||||
</thead>
|
||||
<tr v-for="(item,index) in tableData1" :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>
|
||||
<td class="numCell">{{item[9]}}</td>
|
||||
<td class="numCell">{{item[10]}}</td>
|
||||
<td class="numCell">{{item[11]}}</td>
|
||||
<td class="numCell">{{item[12]}}</td>
|
||||
<td class="numCell">{{item[13]}}</td>
|
||||
<td class="numCell">{{item[14]}}</td>
|
||||
<td class="numCell">{{item[15]}}</td>
|
||||
<td class="numCell">{{item[16]}}</td>
|
||||
<td class="numCell">{{item[17]}}</td>
|
||||
<td class="numCell">{{item[18]}}</td>
|
||||
<td class="numCell">{{item[19]}}</td>
|
||||
<td class="numCell">{{item[20]}}</td>
|
||||
<td class="numCell">{{item[21]}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="1" cellspacing="0" :key="timeStamp" id="myTable">
|
||||
<thead style="background: #efefef;height: 40px;">
|
||||
<tr>
|
||||
<th colspan="24">生料核算</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="3">日期</th>
|
||||
<th rowspan="3">班次</th>
|
||||
<th rowspan="3">班组</th>
|
||||
<th colspan="8">直接材料</th>
|
||||
<th colspan="2">直接人工</th>
|
||||
<th colspan="8">制造费用</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="8">电和水</th>
|
||||
<th>车间人员工资</th>
|
||||
<th>劳务工资</th>
|
||||
<th>倒运费用</th>
|
||||
<th>材料出库</th>
|
||||
<th colspan="2">维修费用</th>
|
||||
<th>装卸费</th>
|
||||
<th>差旅费</th>
|
||||
<th>折旧</th>
|
||||
<th>摊销</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>动力电(kw.h)</th>
|
||||
<th>单价(元/度)</th>
|
||||
<th>总成本(元)</th>
|
||||
<th>单位成本(元/度)</th>
|
||||
<th>工业水(t)</th>
|
||||
<th>单价(元/吨)</th>
|
||||
<th>总成本(元)</th>
|
||||
<th>单位成本(元/吨)</th>
|
||||
|
||||
<th>单位成本(元/吨)</th>
|
||||
<th>单位成本(元/吨)</th>
|
||||
|
||||
<th>单位成本(元/吨)</th>
|
||||
<th>单位成本(元/吨)</th>
|
||||
<th>检修单位成本(元/吨)</th>
|
||||
<th>外协施工费用单位成本(元/吨)</th>
|
||||
<th>单位成本(元/吨)</th>
|
||||
<th>单位成本(元/吨)</th>
|
||||
<th>单位成本(元/吨)</th>
|
||||
<th>无形资产摊销单位成本(元/吨)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr v-for="(item,index) in tableData1" :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>
|
||||
<td class="numCell">{{item[9]}}</td>
|
||||
<td class="numCell">{{item[10]}}</td>
|
||||
<td class="numCell">{{item[11]}}</td>
|
||||
<td class="numCell">{{item[12]}}</td>
|
||||
<td class="numCell">{{item[13]}}</td>
|
||||
<td class="numCell">{{item[14]}}</td>
|
||||
<td class="numCell">{{item[15]}}</td>
|
||||
<td class="numCell">{{item[16]}}</td>
|
||||
<td class="numCell">{{item[17]}}</td>
|
||||
<td class="numCell">{{item[18]}}</td>
|
||||
<td class="numCell">{{item[19]}}</td>
|
||||
<td class="numCell">{{item[20]}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- 熟料核算 -->
|
||||
<table border="1" cellspacing="0" :key="timeStamp" id="myTable">
|
||||
<thead style="background: #efefef;height: 40px;">
|
||||
<tr>
|
||||
<th colspan="24">熟料核算</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="3">日期</th>
|
||||
<th rowspan="3">班次</th>
|
||||
<th rowspan="3">班组</th>
|
||||
<th rowspan="3">实际产量(t)</th>
|
||||
<th rowspan="3">总成本(元)</th>
|
||||
<th rowspan="3">单位成本(元/吨)</th>
|
||||
<th colspan="16">直接材料</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="8">原材料</th>
|
||||
<th colspan="8">电和水</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>生料(t)</th>
|
||||
<th>单价(元/吨)</th>
|
||||
<th>总成本(元)</th>
|
||||
<th>单位成本(元/吨)</th>
|
||||
<th>原煤(t)</th>
|
||||
<th>单价(元/吨)</th>
|
||||
<th>总成本(元)</th>
|
||||
<th>单位成本(元/吨)</th>
|
||||
<th>动力电(kw.h)</th>
|
||||
<th>单价(元/度)</th>
|
||||
<th>总成本(元)</th>
|
||||
<th>单位成本(元/度)</th>
|
||||
<th>工业水(t)</th>
|
||||
<th>单价(元/吨)</th>
|
||||
<th>总成本(元)</th>
|
||||
<th>单位成本(元/吨)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr v-for="(item,index) in tableData1" :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>
|
||||
<td class="numCell">{{item[9]}}</td>
|
||||
<td class="numCell">{{item[10]}}</td>
|
||||
<td class="numCell">{{item[11]}}</td>
|
||||
<td class="numCell">{{item[12]}}</td>
|
||||
<td class="numCell">{{item[13]}}</td>
|
||||
<td class="numCell">{{item[14]}}</td>
|
||||
<td class="numCell">{{item[15]}}</td>
|
||||
<td class="numCell">{{item[16]}}</td>
|
||||
<td class="numCell">{{item[17]}}</td>
|
||||
<td class="numCell">{{item[18]}}</td>
|
||||
<td class="numCell">{{item[19]}}</td>
|
||||
<td class="numCell">{{item[20]}}</td>
|
||||
<td class="numCell">{{item[21]}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="1" cellspacing="0" :key="timeStamp" id="myTable">
|
||||
<thead style="background: #efefef;height: 40px;">
|
||||
<tr>
|
||||
<th colspan="24">生料核算</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="3">日期</th>
|
||||
<th rowspan="3">班次</th>
|
||||
<th rowspan="3">班组</th>
|
||||
<th :colspan="materialList.length">直接材料</th>
|
||||
<th colspan="2">直接人工</th>
|
||||
<th colspan="8">制造费用</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th v-if="data1>0" :colspan="data1">原材料</th>
|
||||
<th v-if="data3>0" :colspan="data3">辅助材料</th>
|
||||
<th v-if="data2>0" :colspan="data2">电/水</th>
|
||||
<th>车间人员工资</th>
|
||||
<th>劳务工资</th>
|
||||
<th>倒运费用</th>
|
||||
|
|
@ -547,6 +119,7 @@
|
|||
<th>摊销</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th v-for="(item,index) in materialList" :key="index">{{ item }}</th>
|
||||
<th>单位成本(元/吨)</th>
|
||||
<th>单位成本(元/吨)</th>
|
||||
<th>单位成本(元/吨)</th>
|
||||
|
|
@ -560,188 +133,7 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tr v-for="(item,index) in tableData1" :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>
|
||||
<td class="numCell">{{item[9]}}</td>
|
||||
<td class="numCell">{{item[10]}}</td>
|
||||
<td class="numCell">{{item[11]}}</td>
|
||||
<td class="numCell">{{item[12]}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<!-- 水泥核算 -->
|
||||
<table border="1" cellspacing="0" :key="timeStamp" id="myTable">
|
||||
<thead style="background: #efefef;height: 40px;">
|
||||
<tr>
|
||||
<th colspan="40">水泥核算</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="3">日期</th>
|
||||
<th rowspan="3">班次</th>
|
||||
<th rowspan="3">班组</th>
|
||||
<th rowspan="3">实际产量(t)</th>
|
||||
<th rowspan="3">总成本(元)</th>
|
||||
<th rowspan="3">单位成本(元/吨)</th>
|
||||
<th colspan="28">直接材料</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="28">原材料</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>熟料(t)</th>
|
||||
<th>单价(元/吨)</th>
|
||||
<th>总成本(元)</th>
|
||||
<th>单位成本(元/吨)</th>
|
||||
<th>废石灰石粉(t)</th>
|
||||
<th>单价(元/吨)</th>
|
||||
<th>总成本(元)</th>
|
||||
<th>单位成本(元/吨)</th>
|
||||
<th>脱硫石膏(t)</th>
|
||||
<th>单价(元/吨)</th>
|
||||
<th>总成本(元)</th>
|
||||
<th>单位成本(元/吨)</th>
|
||||
<th>粉煤灰(t)</th>
|
||||
<th>单价(元/吨)</th>
|
||||
<th>总成本(元)</th>
|
||||
<th>单位成本(元/吨)</th>
|
||||
<th>矿粉(t)</th>
|
||||
<th>单价(元/吨)</th>
|
||||
<th>总成本(元)</th>
|
||||
<th>单位成本(元/吨)</th>
|
||||
<th>助磨剂(t)</th>
|
||||
<th>单价(元/吨)</th>
|
||||
<th>总成本(元)</th>
|
||||
<th>单位成本(元/吨)</th>
|
||||
|
||||
|
||||
</tr>
|
||||
</thead>
|
||||
<tr v-for="(item,index) in tableData1" :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>
|
||||
<td class="numCell">{{item[9]}}</td>
|
||||
<td class="numCell">{{item[10]}}</td>
|
||||
<td class="numCell">{{item[11]}}</td>
|
||||
<td class="numCell">{{item[12]}}</td>
|
||||
<td class="numCell">{{item[13]}}</td>
|
||||
<td class="numCell">{{item[14]}}</td>
|
||||
<td class="numCell">{{item[15]}}</td>
|
||||
<td class="numCell">{{item[16]}}</td>
|
||||
<td class="numCell">{{item[17]}}</td>
|
||||
<td class="numCell">{{item[18]}}</td>
|
||||
<td class="numCell">{{item[19]}}</td>
|
||||
<td class="numCell">{{item[20]}}</td>
|
||||
<td class="numCell">{{item[21]}}</td>
|
||||
<td class="numCell">{{item[21]}}</td>
|
||||
<td class="numCell">{{item[21]}}</td>
|
||||
<td class="numCell">{{item[21]}}</td>
|
||||
<td class="numCell">{{item[21]}}</td>
|
||||
<td class="numCell">{{item[21]}}</td>
|
||||
<td class="numCell">{{item[21]}}</td>
|
||||
<td class="numCell">{{item[21]}}</td>
|
||||
<td class="numCell">{{item[21]}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="1" cellspacing="0" :key="timeStamp" id="myTable">
|
||||
<thead style="background: #efefef;height: 40px;">
|
||||
<tr>
|
||||
<th colspan="29">水泥核算</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th rowspan="3">日期</th>
|
||||
<th rowspan="3">班次</th>
|
||||
<th rowspan="3">班组</th>
|
||||
<th colspan="16">直接材料</th>
|
||||
<th colspan="2">直接人工</th>
|
||||
<th colspan="8">制造费用</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="8">原材料</th>
|
||||
<th colspan="8">电和水</th>
|
||||
<th>车间人员工资</th>
|
||||
<th>劳务工资</th>
|
||||
<th>倒运费用</th>
|
||||
<th>材料出库</th>
|
||||
<th colspan="2">维修费用</th>
|
||||
<th>装卸费</th>
|
||||
<th>差旅费</th>
|
||||
<th>折旧</th>
|
||||
<th>摊销</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>缓凝剂(t)</th>
|
||||
<th>单价(元/吨)</th>
|
||||
<th>总成本(元)</th>
|
||||
<th>单位成本(元/吨)</th>
|
||||
<th>包装袋(t)</th>
|
||||
<th>单价(元/吨)</th>
|
||||
<th>总成本(元)</th>
|
||||
<th>单位成本(元/吨)</th>
|
||||
<th>动力电(kw.h)</th>
|
||||
<th>单价(元/度)</th>
|
||||
<th>总成本(元)</th>
|
||||
<th>单位成本(元/度)</th>
|
||||
<th>工业水(t)</th>
|
||||
<th>单价(元/吨)</th>
|
||||
<th>总成本(元)</th>
|
||||
<th>单位成本(元/吨)</th>
|
||||
|
||||
<th>单位成本(元/吨)</th>
|
||||
<th>单位成本(元/吨)</th>
|
||||
|
||||
<th>单位成本(元/吨)</th>
|
||||
<th>单位成本(元/吨)</th>
|
||||
<th>检修单位成本(元/吨)</th>
|
||||
<th>外协施工费用单位成本(元/吨)</th>
|
||||
<th>单位成本(元/吨)</th>
|
||||
<th>单位成本(元/吨)</th>
|
||||
<th>单位成本(元/吨)</th>
|
||||
<th>无形资产摊销单位成本(元/吨)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr v-for="(item,index) in tableData1" :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>
|
||||
<td class="numCell">{{item[9]}}</td>
|
||||
<td class="numCell">{{item[10]}}</td>
|
||||
<td class="numCell">{{item[11]}}</td>
|
||||
<td class="numCell">{{item[12]}}</td>
|
||||
<td class="numCell">{{item[13]}}</td>
|
||||
<td class="numCell">{{item[14]}}</td>
|
||||
<td class="numCell">{{item[15]}}</td>
|
||||
<td class="numCell">{{item[16]}}</td>
|
||||
<td class="numCell">{{item[17]}}</td>
|
||||
<td class="numCell">{{item[18]}}</td>
|
||||
<td class="numCell">{{item[19]}}</td>
|
||||
<td class="numCell">{{item[20]}}</td>
|
||||
<td class="numCell">{{item[20]}}</td>
|
||||
<td class="numCell">{{item[20]}}</td>
|
||||
<td class="numCell">{{item[20]}}</td>
|
||||
<td class="numCell">{{item[20]}}</td>
|
||||
<td class="numCell">{{item[20]}}</td>
|
||||
<td class="numCell">{{item[20]}}</td>
|
||||
<td class="numCell">{{item[20]}}</td>
|
||||
<td class="numCell">{{item[20]}}</td>
|
||||
<td class="tableCell" v-for="(item1,index1) in item" :key="index1">{{ item1 }}</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
|
@ -753,111 +145,27 @@
|
|||
data() {
|
||||
return {
|
||||
query:{
|
||||
type:0,
|
||||
type:1,
|
||||
day:'',
|
||||
month:'',
|
||||
year:'',
|
||||
shift:'',
|
||||
},
|
||||
allCol:16,
|
||||
data1:0,//原材料
|
||||
data2:0,//电和水
|
||||
data3:0,//辅助材料
|
||||
data4:0,//助剂
|
||||
data5:0,//包装
|
||||
materialList:[],
|
||||
mgroupOptions:[],
|
||||
tableName:'班组成本计算',
|
||||
options:[
|
||||
{id:0,name:'班统计'},
|
||||
{id:1,name:'日统计'},
|
||||
{id:2,name:'月统计'},
|
||||
],
|
||||
tableHead:['车间','工段','能源分类','1号','2号','3号','4号','5号','6号','7号','8号'],
|
||||
tableDatas:[
|
||||
['直接材料','原材料','湿电石渣',1,2,3,4,5],
|
||||
['直接材料','电、水','动力电',1,2,3,4,5],
|
||||
['直接材料','电、水','工业水',1,2,3,4,5],
|
||||
|
||||
|
||||
['直接人工','车间人员工资','/','/','/','/',5],
|
||||
['直接人工','车间人员工资','/','/','/','/',5],
|
||||
|
||||
['制造费用','倒运费用','倒运费用','/','/','/','/',5],
|
||||
['制造费用','材料出库','物料消耗','/','/','/','/',5],
|
||||
['制造费用','维修费用','检修','/','/','/','/',5],
|
||||
['制造费用','维修费用','外协施工费用','/','/','/','/',5],
|
||||
['制造费用','装卸费','装卸费 ','/','/','/','/',5],
|
||||
['制造费用','差旅费','差旅费','/','/','/','/',5],
|
||||
['制造费用','折旧','折旧','/','/','/','/',5],
|
||||
['制造费用','摊销','无形资产摊销','/','/','/','/',5],
|
||||
['成本合计','',''],
|
||||
],
|
||||
tableDatas2:[
|
||||
['直接材料','原材料','干粉',1,2,3,4,5],
|
||||
['直接材料','原材料','辅料',1,2,3,4,5],
|
||||
['直接材料','原材料','粉煤灰',1,2,3,4,5],
|
||||
['直接材料','原材料','电石厂除尘灰',1,2,3,4,5],
|
||||
['直接材料','电、水','动力电',1,2,3,4,5],
|
||||
['直接材料','电、水','工业水',1,2,3,4,5],
|
||||
|
||||
|
||||
['直接人工','车间人员工资','/','/','/','/',5],
|
||||
['直接人工','车间人员工资','/','/','/','/',5],
|
||||
|
||||
['制造费用','倒运费用','倒运费用','/','/','/','/',5],
|
||||
['制造费用','材料出库','物料消耗','/','/','/','/',5],
|
||||
['制造费用','维修费用','检修','/','/','/','/',5],
|
||||
['制造费用','维修费用','外协施工费用','/','/','/','/',5],
|
||||
['制造费用','装卸费 ','装卸费 ','/','/','/','/',5],
|
||||
['制造费用','差旅费','差旅费','/','/','/','/',5],
|
||||
['制造费用','折旧','折旧','/','/','/','/',5],
|
||||
['制造费用','摊销','无形资产摊销','/','/','/','/',5],
|
||||
['成本合计','',''],
|
||||
],
|
||||
tableDatas3:[
|
||||
['直接材料','原材料','生料',1,2,3,4,5],
|
||||
['直接材料','辅助材料','原煤',1,2,3,4,5],
|
||||
['直接材料','电、水','动力电',1,2,3,4,5],
|
||||
['直接材料','电、水','工业水',1,2,3,4,5],
|
||||
['直接人工','车间人员工资','/','/','/','/',5],
|
||||
['直接人工','车间人员工资','/','/','/','/',5],
|
||||
['制造费用','倒运费用','倒运费用','/','/','/','/',5],
|
||||
['制造费用','材料出库','物料消耗','/','/','/','/',5],
|
||||
['制造费用','维修费用','检修','/','/','/','/',5],
|
||||
['制造费用','维修费用','外协施工费用','/','/','/','/',5],
|
||||
['制造费用','装卸费 ','装卸费 ','/','/','/','/',5],
|
||||
['制造费用','差旅费','差旅费','/','/','/','/',5],
|
||||
['制造费用','折旧','折旧','/','/','/','/',5],
|
||||
['制造费用','摊销','无形资产摊销','/','/','/','/',5],
|
||||
['成本合计','',''],
|
||||
],
|
||||
tableDatas4:[
|
||||
['直接材料','原材料','熟料',1,2,3,4,5],
|
||||
['直接材料','辅助材料','废石灰石粉',1,2,3,4,5],
|
||||
['直接材料','辅助材料','脱硫石膏',1,2,3,4,5],
|
||||
['直接材料','辅助材料','粉煤灰',1,2,3,4,5],
|
||||
['直接材料','辅助材料','矿粉',1,2,3,4,5],
|
||||
['直接材料','助剂','助磨剂',1,2,3,4,5],
|
||||
['直接材料','助剂','缓凝剂',1,2,3,4,5],
|
||||
['直接材料','包装','包装袋',1,2,3,4,5],
|
||||
['直接材料','电、水','动力电',1,2,3,4,5],
|
||||
['直接材料','电、水','工业水',1,2,3,4,5],
|
||||
['直接人工','车间人员工资','/','/','/','/',5],
|
||||
['直接人工','车间人员工资','/','/','/','/',5],
|
||||
['制造费用','倒运费用','倒运费用','/','/','/','/',5],
|
||||
['制造费用','材料出库','物料消耗','/','/','/','/',5],
|
||||
['制造费用','维修费用','检修','/','/','/','/',5],
|
||||
['制造费用','维修费用','外协施工费用','/','/','/','/',5],
|
||||
['制造费用','装卸费 ','装卸费 ','/','/','/','/',5],
|
||||
['制造费用','差旅费','差旅费','/','/','/','/',5],
|
||||
['制造费用','折旧','折旧','/','/','/','/',5],
|
||||
['制造费用','摊销','无形资产摊销','/','/','/','/',5],
|
||||
['成本合计','',''],
|
||||
],
|
||||
tableData1:[
|
||||
['2023.07.10','夜班','甲组',1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5],
|
||||
['2023.07.10','夜班','甲组',1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5],
|
||||
['2023.07.10','夜班','甲组',1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5],
|
||||
['2023.07.10','夜班','甲组',1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5],
|
||||
['2023.07.10','夜班','甲组',1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5],
|
||||
['2023.07.10','夜班','甲组',1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5],
|
||||
['2023.07.10','夜班','甲组',1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5],
|
||||
['2023.07.10','夜班','甲组',1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5],
|
||||
['2023.07.10','夜班','甲组',1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5],
|
||||
['2023.07.10','夜班','甲组',1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5,1,2,3,4,5],
|
||||
],
|
||||
tableData1:[],
|
||||
optionsShift:[],
|
||||
sourceData:{}
|
||||
};
|
||||
|
|
@ -870,14 +178,24 @@
|
|||
}
|
||||
this.query.month = myDate.getFullYear()+'-'+month;
|
||||
this.getShift();
|
||||
this.getMgroup();
|
||||
|
||||
},
|
||||
methods: {
|
||||
//获取工段列表
|
||||
getMgroup(){
|
||||
this.$API.mtm.mgroup.list.req({page:0}).then(res=>{
|
||||
this.mgroupOptions = res;
|
||||
this.query.mgroup = res[8].id
|
||||
})
|
||||
},
|
||||
//班组列表
|
||||
getShift(){
|
||||
this.$API.mtm.shift.req({page:0}).then(res=>{
|
||||
this.optionsShift = res;
|
||||
})
|
||||
},
|
||||
//查询类型
|
||||
typeCange(value){
|
||||
if(value==1){
|
||||
this.tableName = '班组成本计算'
|
||||
|
|
@ -889,21 +207,81 @@
|
|||
},
|
||||
getData(){
|
||||
let that = this;
|
||||
let params = {query:{}};
|
||||
let id = '';
|
||||
that.data1 = 0;
|
||||
that.data2 = 0;
|
||||
that.data3 = 0;
|
||||
that.data4 = 0;
|
||||
that.data5 = 0;
|
||||
let params = {};
|
||||
let arr = [];
|
||||
params.page=0;
|
||||
params.mgroup=that.query.mgroup;
|
||||
if(that.query.type==0){//班
|
||||
arr = that.query.month.split('-');
|
||||
params.query.year_s = Number(arr[0]);
|
||||
params.query.month_s = Number(arr[1]);
|
||||
id='energy_day'
|
||||
arr = that.query.day.split('-');
|
||||
params.year_s = Number(arr[0]);
|
||||
params.month_s = Number(arr[1]);
|
||||
params.day_s = Number(arr[2]);
|
||||
params.type="day_s"
|
||||
}else if(that.query.type==1){//日
|
||||
params.query.year_s = Number(that.query.year);
|
||||
id='energy_month'
|
||||
arr = that.query.month.split('-');
|
||||
params.year_s = Number(arr[0]);
|
||||
params.month_s = Number(arr[1]);
|
||||
params.type="day_s"
|
||||
}else{//月
|
||||
params.query.year_s = Number(that.query.yearStart);
|
||||
id='energy_year'
|
||||
params.year_s = Number(that.query.year);
|
||||
params.type="month_s"
|
||||
}
|
||||
that.$API.enm.enstat.req(params).then(res=>{
|
||||
if(res.length>0){
|
||||
let materials = res[0].imaterial_data;
|
||||
let arr = [];
|
||||
materials.forEach(item=>{
|
||||
if(item.material_type==0){//电水
|
||||
that.data2=that.data2+4;
|
||||
}else if(item.material_type==30||item.material_type==20){//原材料
|
||||
that.data1=that.data1+4;
|
||||
}else if(item.material_type==40){//辅助材料
|
||||
that.data3=that.data3+4;
|
||||
}
|
||||
arr.push(item.material_name)
|
||||
arr.push('单价(元/吨)')
|
||||
arr.push('总成本(元)')
|
||||
arr.push('单位成本(元/吨)')
|
||||
})
|
||||
that.allCol = arr.length+16
|
||||
that.materialList = arr;
|
||||
let dataArr = [];
|
||||
res.forEach(itemData=>{
|
||||
let time ='';
|
||||
dataArr = [];
|
||||
if(that.query.type==0){
|
||||
time = itemData.year_s+'.'+itemData.month_s+'.'+itemData.day_s;
|
||||
}else if(that.query.type==1){
|
||||
time = itemData.year_s+'.'+itemData.month_s+'.'+itemData.day_s;
|
||||
}else{
|
||||
time = itemData.year_s;
|
||||
}
|
||||
dataArr.push(time);
|
||||
dataArr.push(itemData.shift);
|
||||
dataArr.push(itemData.shift);
|
||||
dataArr.push(itemData.total_production);
|
||||
dataArr.push(itemData.coal_consume_unit);
|
||||
dataArr.push(itemData.cen_consume_unit);
|
||||
let sub1data = itemData.imaterial_data;
|
||||
for(let i=0;i<sub1data.length;i++){
|
||||
dataArr.push(sub1data[i].price_unit)
|
||||
dataArr.push(sub1data[i].price_unit)
|
||||
dataArr.push(sub1data[i].cost)
|
||||
dataArr.push(sub1data[i].cost_unit)
|
||||
}
|
||||
let otherdata = itemData.other_cost_data;
|
||||
for(let j=0;j<otherdata.length;j++){
|
||||
dataArr.push(otherdata[j].cost_unit)
|
||||
}
|
||||
that.tableData1.push(dataArr)
|
||||
})
|
||||
}
|
||||
})
|
||||
},
|
||||
getTableData(){
|
||||
this.getData();
|
||||
|
|
@ -922,7 +300,8 @@
|
|||
</script>
|
||||
<style scoped>
|
||||
.printContainer{
|
||||
width: 1075px;
|
||||
width:100%;
|
||||
overflow-x:scroll;
|
||||
}
|
||||
#numTable td{
|
||||
height: 32px;
|
||||
|
|
@ -946,7 +325,14 @@
|
|||
.searchBtn{
|
||||
margin-left: 5px;
|
||||
}
|
||||
#myTable,#myTable2,#myTable3,#myTable4{
|
||||
#myTable{
|
||||
font-size: 14px;
|
||||
display: inline-block;
|
||||
}
|
||||
.tableCell{
|
||||
min-width: 100px;
|
||||
height: 30px;
|
||||
line-height: 30px;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
|
|
@ -2,20 +2,34 @@
|
|||
<div class="app-container">
|
||||
<el-header>
|
||||
<div class="left-panel">
|
||||
<el-select
|
||||
v-model="query.belong_dept"
|
||||
placeholder="车间"
|
||||
clearable
|
||||
@change="deptChange"
|
||||
style="margin-left: 2px; width: 200px"
|
||||
>
|
||||
<el-option
|
||||
v-for="item in deptOptions"
|
||||
:key="item.id"
|
||||
:label="item.name"
|
||||
:value="item.id"
|
||||
></el-option>
|
||||
</el-select>
|
||||
<el-select
|
||||
v-model="query.type"
|
||||
placeholder="查询类型"
|
||||
clearable
|
||||
@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
|
||||
</el-select>
|
||||
<el-date-picker
|
||||
v-model="query.month"
|
||||
type="month"
|
||||
value-format="YYYY-MM"
|
||||
|
|
@ -61,64 +75,7 @@
|
|||
<el-card style="margin-top:5px">
|
||||
<div ref="print" id="myReport" class="printContainer">
|
||||
<h3 style="text-align: center;">{{ tableName }}</h3>
|
||||
<table border="1" cellspacing="0" :key="timeStamp" id="myTable">
|
||||
<thead style="background: #efefef;height: 40px;">
|
||||
<tr>
|
||||
<th rowspan="3">日期</th>
|
||||
<th colspan="5">原料车间</th>
|
||||
<th colspan="7">烧成车间</th>
|
||||
<th colspan="5">水泥车间</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th colspan="2">电石渣</th>
|
||||
<th colspan="2">原料磨</th>
|
||||
<th rowspan="2">压缩空气(m3)</th>
|
||||
<th colspan="4">回转窑</th>
|
||||
<th colspan="2">煤磨</th>
|
||||
<th rowspan="2">压缩空气(m3)</th>
|
||||
<th colspan="2">水泥磨</th>
|
||||
<th colspan="2">包装</th>
|
||||
<th rowspan="2">压缩空气(m3)</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<th>电量(KW.h)</th>
|
||||
<th>水(t)</th>
|
||||
<th>电量(KW.h)</th>
|
||||
<th>水(t)</th>
|
||||
<th>电量(KW.h)</th>
|
||||
<th>煤粉(t)</th>
|
||||
<th>水(t)</th>
|
||||
<th>蒸汽(t)</th>
|
||||
<th>电量(KW.h)</th>
|
||||
<th>水(t)</th>
|
||||
<th>电量(KW.h)</th>
|
||||
<th>水(t)</th>
|
||||
<th>电量(KW.h)</th>
|
||||
<th>水(t)</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tr v-for="(item,index) in tableDatas3" :key="index">
|
||||
<td style="width: 45px;">{{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>
|
||||
<td class="numCell">{{item[9]}}</td>
|
||||
<td class="numCell">{{item[10]}}</td>
|
||||
<td class="numCell">{{item[11]}}</td>
|
||||
<td class="numCell">{{item[12]}}</td>
|
||||
<td class="numCell">{{item[13]}}</td>
|
||||
<td class="numCell">{{item[14]}}</td>
|
||||
<td class="numCell">{{item[15]}}</td>
|
||||
<td class="numCell">{{item[16]}}</td>
|
||||
<td class="numCell">{{item[17]}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="1" cellspacing="0" :key="timeStamp" id="myTable1">
|
||||
<table border="1" cellspacing="0" :key="timeStamp" id="myTable1" v-if="deptName=='原料车间'">
|
||||
<thead style="background: #efefef;height: 40px;">
|
||||
<tr>
|
||||
<th rowspan="3">日期</th>
|
||||
|
|
@ -159,7 +116,7 @@
|
|||
<td class="numCell">{{item[11]}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="1" cellspacing="0" :key="timeStamp" id="myTable2">
|
||||
<table border="1" cellspacing="0" :key="timeStamp" id="myTable2" v-if="deptName=='烧成车间'">
|
||||
<thead style="background: #efefef;height: 40px;">
|
||||
<tr>
|
||||
<th rowspan="3">日期</th>
|
||||
|
|
@ -210,7 +167,7 @@
|
|||
<td class="numCell">{{item[16]}}</td>
|
||||
</tr>
|
||||
</table>
|
||||
<table border="1" cellspacing="0" :key="timeStamp" id="myTable3">
|
||||
<table border="1" cellspacing="0" :key="timeStamp" id="myTable3" v-if="deptName=='水泥车间'">
|
||||
<thead style="background: #efefef;height: 40px;">
|
||||
<tr>
|
||||
<th rowspan="3">日期</th>
|
||||
|
|
@ -235,7 +192,11 @@
|
|||
</tr>
|
||||
</thead>
|
||||
<tr v-for="(item,index) in tableDatas3" :key="index">
|
||||
<td style="width: 45px;">{{item[0]}}</td>
|
||||
<template v-if="item!==null&&item!==undefined">
|
||||
<td v-for="(item1,index1) in item" :key="index1">{{ item1 }}</td>
|
||||
</template>
|
||||
|
||||
<!-- <td style="width: 45px;">{{item[0]}}</td>
|
||||
<td class="numCell">{{item[1]}}</td>
|
||||
<td class="numCell">{{item[2]}}</td>
|
||||
<td class="numCell">{{item[3]}}</td>
|
||||
|
|
@ -245,7 +206,7 @@
|
|||
<td class="numCell">{{item[7]}}</td>
|
||||
<td class="numCell">{{item[8]}}</td>
|
||||
<td class="numCell">{{item[9]}}</td>
|
||||
<td class="numCell">{{item[10]}}</td>
|
||||
<td class="numCell">{{item[10]}}</td> -->
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
|
|
@ -262,6 +223,7 @@
|
|||
month:'',
|
||||
yearStart:'',
|
||||
},
|
||||
deptName:'',
|
||||
tableName:'全场能源日统计',
|
||||
options:[
|
||||
{id:0,name:'日统计'},
|
||||
|
|
@ -298,6 +260,7 @@
|
|||
['水泥车间','包装','水(t)',1,2,3,4,5,6],
|
||||
['水泥车间','压缩空气(m3)',1,2,3,4,5,6],
|
||||
],
|
||||
deptOptions:[],
|
||||
tableDatas3:[],
|
||||
sourceData:{}
|
||||
};
|
||||
|
|
@ -309,7 +272,8 @@
|
|||
month = '0'+month;
|
||||
}
|
||||
this.query.month = myDate.getFullYear()+'-'+month;
|
||||
this.getData();
|
||||
this.getGroup();
|
||||
// this.getMgroup();
|
||||
|
||||
},
|
||||
methods: {
|
||||
|
|
@ -322,193 +286,93 @@
|
|||
this.tableName = '全场能源年统计'
|
||||
}
|
||||
},
|
||||
deptChange(e){
|
||||
let that = this;
|
||||
that.deptOptions.forEach(item=>{
|
||||
if(item.id==e){
|
||||
that.deptName = item.name;
|
||||
}
|
||||
})
|
||||
},
|
||||
getGroup() {
|
||||
let that = this;
|
||||
that.$API.system.dept.list.req({ page_size: 3 , type:'dept'}).then(res=>{
|
||||
that.deptOptions = res.results;
|
||||
that.deptName = res.results[0].name;
|
||||
that.query.belong_dept = res.results[0].id;
|
||||
that.getData();
|
||||
});
|
||||
},
|
||||
getData(){
|
||||
let that = this;
|
||||
let params = {query:{}};
|
||||
let params = {};
|
||||
let id = '';
|
||||
let arr = [];
|
||||
if(that.query.type==0){//日
|
||||
params.type='day_s';
|
||||
arr = that.query.month.split('-');
|
||||
params.query.year_s = Number(arr[0]);
|
||||
params.query.month_s = Number(arr[1]);
|
||||
id='energy_day'
|
||||
params.year_s = Number(arr[0]);
|
||||
params.month_s = Number(arr[1]);
|
||||
}else if(that.query.type==1){//月
|
||||
params.query.year_s = Number(that.query.year);
|
||||
id='energy_month'
|
||||
}else{//年
|
||||
params.query.year_s = Number(that.query.yearStart);
|
||||
id='energy_year'
|
||||
params.type='month_s';
|
||||
params.year_s = Number(that.query.year);
|
||||
}
|
||||
this.$API.bi.dataset.exec.req(id,params).then((res) => {
|
||||
that.tableName = res.name;
|
||||
let data = res.data.ds0;
|
||||
let data0 = data.slice(1,data.length);
|
||||
params.mgroup__belong_dept = that.query.belong_dept;
|
||||
this.$API.enm.enstat.req(params).then((res) => {
|
||||
let data = res.results;
|
||||
let wrapArr = [];
|
||||
let innerArr = [];
|
||||
let ind = 0;
|
||||
let roomInd = 1;
|
||||
let mgroupInd = 2;
|
||||
let mpointInd =3;
|
||||
let valueInd = 4;
|
||||
if(that.query.type==0){//日统计
|
||||
arr = that.query.month.split('-');
|
||||
var date =new Date(Number(arr[0]), Number(arr[1]), 0).getDate();
|
||||
for(let d = 1;d<=date;d++){
|
||||
let arr = [];
|
||||
arr[0]=d;
|
||||
innerArr.push(arr)
|
||||
}
|
||||
}else if(that.query.type==1){//月统计
|
||||
innerArr = [['一'],['二'],['三'],['四'],['五'],['六'],['七'],['八'],['九'],['十'],['十一'],['十二']]
|
||||
}else{//年统计
|
||||
let nowDate = new Date().getFullYear();
|
||||
let num = Number(nowDate)-Number(that.query.yearStart) +1;
|
||||
for(let y = 0;y<num;y++){
|
||||
let arr = [];
|
||||
arr[0] = 2023-y;
|
||||
innerArr.push(arr)
|
||||
}
|
||||
}
|
||||
//1、将相同日期或月份/年份的数据放到一组
|
||||
data0.forEach(item => {
|
||||
data.forEach(item => {
|
||||
if(that.query.type==0){//日统计
|
||||
ind = item[0]-1;
|
||||
ind = item.day_s-1;
|
||||
}else if(that.query.type==1){//月统计
|
||||
ind = item[0]-1;
|
||||
}else{//年统计
|
||||
ind = item[0]-2023;
|
||||
ind = item.month_s-1;
|
||||
}
|
||||
if(wrapArr[ind]){
|
||||
}else{
|
||||
wrapArr[ind] = [];
|
||||
}
|
||||
wrapArr[ind].push(item);
|
||||
if(innerArr[ind]){
|
||||
if(that.deptName=='原料车间'){
|
||||
if(item.mgroup_name=='电石渣'){
|
||||
wrapArr[ind][0]=item
|
||||
}else if(item.mgroup_name=='原料磨'){
|
||||
wrapArr[ind][1]=item
|
||||
}
|
||||
}else if(that.deptName=='烧成车间'){
|
||||
if(item.mgroup_name=='回转窑'){
|
||||
wrapArr[ind][1]=item
|
||||
}else{
|
||||
wrapArr[ind][0]=item
|
||||
}
|
||||
}else{
|
||||
innerArr[ind] = [];
|
||||
}
|
||||
// debugger;
|
||||
if(item[roomInd]=="原料车间"){
|
||||
if(item[mgroupInd]=="电石渣"){
|
||||
if(item[mpointInd]=="动力电"){
|
||||
innerArr[ind][1] = Number(item[valueInd]).toFixed(2)
|
||||
}else{
|
||||
innerArr[ind][2] = Number(item[valueInd]).toFixed(2)
|
||||
}
|
||||
}else if(item[mgroupInd]=="原料磨"){
|
||||
if(item[mpointInd]=="动力电"){
|
||||
innerArr[ind][3] = Number(item[valueInd]).toFixed(2)
|
||||
}else{
|
||||
innerArr[ind][4] = Number(item[valueInd]).toFixed(2)
|
||||
}
|
||||
}else if(item[mgroupInd]=="压缩空气"){
|
||||
innerArr[ind][5] = Number(item[valueInd]).toFixed(2)
|
||||
}
|
||||
}else if(item[roomInd]=="烧成车间"){
|
||||
if(item[mgroupInd]=="回转窑"){
|
||||
if(item[mpointInd]=="动力电"){
|
||||
innerArr[ind][6] = Number(item[valueInd]).toFixed(2)
|
||||
}else if(item[mpointInd]=="煤粉"){
|
||||
innerArr[ind][7] = Number(item[valueInd]).toFixed(2)
|
||||
}else if(item[mpointInd]=="工业水"){
|
||||
innerArr[ind][8] = Number(item[valueInd]).toFixed(2)
|
||||
}else{
|
||||
innerArr[ind][9] = Number(item[valueInd]).toFixed(2)
|
||||
}
|
||||
}else if(item[mgroupInd]=="煤磨"){
|
||||
if(item[mpointInd]=="动力电"){
|
||||
innerArr[ind][10] = Number(item[valueInd]).toFixed(2)
|
||||
}else{
|
||||
innerArr[ind][11] = Number(item[valueInd]).toFixed(2)
|
||||
}
|
||||
}else if(item[mgroupInd]=="压缩空气"){
|
||||
innerArr[ind][12] = Number(item[valueInd]).toFixed(2)
|
||||
}
|
||||
}else if(item[roomInd]=="水泥车间"){
|
||||
if(item[mgroupInd]=="水泥磨"){
|
||||
if(item[mpointInd]=="动力电"){
|
||||
innerArr[ind][13] = Number(item[valueInd]).toFixed(2)
|
||||
}else{
|
||||
innerArr[ind][14] = Number(item[valueInd]).toFixed(2)
|
||||
}
|
||||
}else if(item[mgroupInd]=="水泥包装"){
|
||||
if(item[mpointInd]=="动力电"){
|
||||
innerArr[ind][15] = Number(item[valueInd]).toFixed(2)
|
||||
}else{
|
||||
innerArr[ind][16] = Number(item[valueInd]).toFixed(2)
|
||||
}
|
||||
}else if(item[mgroupInd]=="压缩空气"){
|
||||
innerArr[ind][17] = Number(item[valueInd]).toFixed(2)
|
||||
if(item.mgroup_name=='水泥磨'){
|
||||
wrapArr[ind][1]=item
|
||||
}else{
|
||||
wrapArr[ind][0]=item
|
||||
}
|
||||
}
|
||||
that.tableDatas3 = innerArr;
|
||||
|
||||
});
|
||||
|
||||
//2、根据表头位置进行排序
|
||||
// let innerArr = [];
|
||||
// innerArr = [];
|
||||
// for(let i = 0;i<wrapArr.length;i++){
|
||||
// let item0 = wrapArr[i];
|
||||
// for(let j = 0;j<item0.length;j++){
|
||||
// let item1 = item0[j];
|
||||
// if(item1[roomInd]=="原料车间"){
|
||||
// if(item1[mgroupInd]=="电石渣"){
|
||||
// if(item1[mpointInd]=="动力电"){
|
||||
// innerArr[1] = item1[valueInd]
|
||||
// }else{
|
||||
// innerArr[2] = item1[valueInd]
|
||||
// }
|
||||
// }else if(item1[mgroupInd]=="原料"){
|
||||
// if(item1[mpointInd]=="动力电"){
|
||||
// innerArr[3] = item1[valueInd]
|
||||
// }else{
|
||||
// innerArr[4] = item1[valueInd]
|
||||
// }
|
||||
// }else if(item1[mgroupInd]=="压缩空气"){
|
||||
// innerArr[5] = item1[valueInd]
|
||||
// }
|
||||
// }else if(item1[roomInd]=="烧成车间"){
|
||||
// if(item1[mgroupInd]=="回转窑"){
|
||||
// if(item1[mpointInd]=="动力电"){
|
||||
// innerArr[6] = item1[valueInd]
|
||||
// }else if(item1[mpointInd]=="煤粉"){
|
||||
// innerArr[7] = item1[valueInd]
|
||||
// }else if(item1[mpointInd]=="工业水"){
|
||||
// innerArr[8] = item1[valueInd]
|
||||
// }else{
|
||||
// innerArr[9] = item1[valueInd]
|
||||
// }
|
||||
// }else if(item1[mgroupInd]=="煤磨"){
|
||||
// if(item1[mpointInd]=="动力电"){
|
||||
// innerArr[10] = item1[valueInd]
|
||||
// }else{
|
||||
// innerArr[11] = item1[valueInd]
|
||||
// }
|
||||
// }else if(item1[mgroupInd]=="压缩空气"){
|
||||
// innerArr[12] = item1[valueInd]
|
||||
// }
|
||||
// }else if(item1[roomInd]=="水泥车间"){
|
||||
// if(item1[mgroupInd]=="水泥磨"){
|
||||
// if(item1[mpointInd]=="动力电"){
|
||||
// innerArr[13] = item1[valueInd]
|
||||
// }else{
|
||||
// innerArr[14] = item1[valueInd]
|
||||
// }
|
||||
// }else if(item1[mgroupInd]=="包装"){
|
||||
// if(item1[mpointInd]=="动力电"){
|
||||
// innerArr[15] = item1[valueInd]
|
||||
// }else{
|
||||
// innerArr[16] = item1[valueInd]
|
||||
// }
|
||||
// }else if(item1[mgroupInd]=="压缩空气"){
|
||||
// innerArr[17] = item1[valueInd]
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
this.tableDatas3 = innerArr;
|
||||
wrapArr.forEach((item1)=>{
|
||||
if(item1!=undefined){
|
||||
let itemArr = [];
|
||||
let time =item1[0].day_s!=null? item1[0].year_s+'.'+item1[0].month_s+'.'+item1[0].day_s:item1[0].year_s+'.'+item1[0].month_s;
|
||||
itemArr[0] = time;
|
||||
itemArr[1] = item1[0].elec_consume;
|
||||
itemArr[2] = item1[0].coal_consume_unit;
|
||||
itemArr[3] = item1[0].total_production;
|
||||
itemArr[4] = item1[0].cen_consume_unit;
|
||||
itemArr[5] = item1[1].elec_consume;
|
||||
itemArr[6] = item1[1].coal_consume_unit;
|
||||
itemArr[7] = item1[1].cen_consume_unit;
|
||||
itemArr[8] = item1[1].cen_consume_unit;
|
||||
itemArr[9] = item1[1].total_production;
|
||||
itemArr[10] = item1[1].cen_consume_unit;
|
||||
innerArr.push(itemArr)
|
||||
}
|
||||
})
|
||||
that.tableDatas3 = innerArr;
|
||||
});
|
||||
},
|
||||
getTableData(){
|
||||
|
|
|
|||
Loading…
Reference in New Issue