表格样式变动
This commit is contained in:
parent
6078fb329f
commit
4119c93408
22
src/App.vue
22
src/App.vue
|
|
@ -43,4 +43,26 @@
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss">
|
||||||
@import '@/style/style.scss';
|
@import '@/style/style.scss';
|
||||||
|
.myTable{
|
||||||
|
margin-left: 37px;
|
||||||
|
border: 1px solid #cccccc;
|
||||||
|
}
|
||||||
|
.myTableHead{
|
||||||
|
background: #008080;
|
||||||
|
color:#ffffff;
|
||||||
|
}
|
||||||
|
.myTable th{
|
||||||
|
height: 40px;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
.myTable td{
|
||||||
|
height: 32px;
|
||||||
|
padding-left: 5px;
|
||||||
|
border: 1px solid #cccccc;
|
||||||
|
}
|
||||||
|
.numCell{
|
||||||
|
width: 80px;
|
||||||
|
height: 35px;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|
|
||||||
|
|
@ -158,9 +158,9 @@
|
||||||
></quastat-dialog>
|
></quastat-dialog>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import saveDialog from "./handover_form.vue";
|
import saveDialog from "./../enm_rm/handover_form.vue";
|
||||||
import quastatDialog from "./quastat_form.vue";
|
import quastatDialog from "./../enm_rm/quastat_form.vue";
|
||||||
import otherDialog from "./other_form.vue";
|
import otherDialog from "./../enm_rm/other_form.vue";
|
||||||
export default {
|
export default {
|
||||||
name: "listSon",
|
name: "listSon",
|
||||||
components: {
|
components: {
|
||||||
|
|
|
||||||
|
|
@ -1,198 +0,0 @@
|
||||||
<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>
|
|
||||||
|
|
||||||
|
|
@ -1,189 +0,0 @@
|
||||||
<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>
|
|
||||||
|
|
||||||
|
|
@ -17,9 +17,11 @@
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-card style="margin-top:5px">
|
<el-card style="margin-top:5px">
|
||||||
<div ref="print" id="myReport" class="printContainer">
|
<div ref="print" id="myReport" class="printContainer">
|
||||||
<h3 style="text-align: center;">主要设备(100KW以上)单位产品电耗数据表</h3>
|
<table border="1" width="1000" cellspacing="0" :key="timeStamp" class="myTable" id="myTable">
|
||||||
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable">
|
<thead class="myTableHead">
|
||||||
<thead style="background: #efefef;height: 40px;">
|
<tr>
|
||||||
|
<th colspan="6">煤磨工段主要设备(100KW以上)单位产品电耗数据表</th>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>设备名称</th>
|
<th>设备名称</th>
|
||||||
<th>设备编号</th>
|
<th>设备编号</th>
|
||||||
|
|
@ -34,9 +36,9 @@
|
||||||
<td class="numCell">{{item.name}}</td>
|
<td class="numCell">{{item.name}}</td>
|
||||||
<td class="numCell">{{item.number}}</td>
|
<td class="numCell">{{item.number}}</td>
|
||||||
<td class="numCell">{{item.unit}}</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 hoursItem" @click="itemClick('hours',item)">{{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 monthItem" @click="itemClick('month',item)">{{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 yearItem" @click="itemClick1('year',item)">{{item[3]}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
@ -183,30 +185,4 @@
|
||||||
.printContainer{
|
.printContainer{
|
||||||
width: 1075px;
|
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>
|
</style>
|
||||||
|
|
@ -1,253 +0,0 @@
|
||||||
<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>
|
|
||||||
|
|
||||||
|
|
@ -17,9 +17,11 @@
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-card style="margin-top:5px">
|
<el-card style="margin-top:5px">
|
||||||
<div ref="print" id="myReport" class="printContainer">
|
<div ref="print" id="myReport" class="printContainer">
|
||||||
<h3 style="text-align: center;">生产报告</h3>
|
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable" class="myTable">
|
||||||
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable">
|
<thead class="myTableHead">
|
||||||
<thead style="background: #efefef;height: 40px;">
|
<tr>
|
||||||
|
<th colspan="10">煤磨工段生产报告</th>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="2">参数</th>
|
<th colspan="2">参数</th>
|
||||||
<th>上个小时</th>
|
<th>上个小时</th>
|
||||||
|
|
@ -37,10 +39,10 @@
|
||||||
<td class="numCell" v-if="index==0||index==2" rowspan="2">{{item[0]}}</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" v-else-if="index==4">{{item[0]}}</td>
|
||||||
<td class="numCell">{{item[1]}}</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 hoursItem" @click="itemClick('hours',item)">{{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 daysItem" @click="itemClick('days',item)">{{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 monthItem" @click="itemClick('month',item)">{{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 yearItem" @click="itemClick1('year',item)">{{item[5]}}</td>
|
||||||
<td class="numCell">{{item[6]}}</td>
|
<td class="numCell">{{item[6]}}</td>
|
||||||
<td class="numCell">{{item[7]}}</td>
|
<td class="numCell">{{item[7]}}</td>
|
||||||
<td class="numCell">{{item[8]}}</td>
|
<td class="numCell">{{item[8]}}</td>
|
||||||
|
|
@ -213,30 +215,4 @@
|
||||||
.printContainer{
|
.printContainer{
|
||||||
width: 1075px;
|
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>
|
</style>
|
||||||
|
|
@ -36,9 +36,11 @@
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-card style="margin-top:5px">
|
<el-card style="margin-top:5px">
|
||||||
<div ref="print" id="myReport" class="printContainer">
|
<div ref="print" id="myReport" class="printContainer">
|
||||||
<h3 style="text-align: center;">主要设备(100KW以上)单位产品电耗数据表</h3>
|
<table border="1" cellspacing="0" :key="timeStamp" id="myTable" class="myTable">
|
||||||
<table border="1" cellspacing="0" :key="timeStamp" id="myTable">
|
<thead class="myTableHead">
|
||||||
<thead style="background: #efefef;height: 40px;">
|
<tr>
|
||||||
|
<th colspan="19">煤磨工段班组月度对比分析</th>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th rowspan="2">月份</th>
|
<th rowspan="2">月份</th>
|
||||||
<th rowspan="2">班组</th>
|
<th rowspan="2">班组</th>
|
||||||
|
|
@ -141,29 +143,4 @@
|
||||||
.printContainer{
|
.printContainer{
|
||||||
width: 1075px;
|
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>
|
</style>
|
||||||
|
|
@ -31,9 +31,11 @@
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-card style="margin-top:5px">
|
<el-card style="margin-top:5px">
|
||||||
<div ref="print" id="myReport" class="printContainer">
|
<div ref="print" id="myReport" class="printContainer">
|
||||||
<h3 style="text-align: center;">车间单位产品电耗月度分析表</h3>
|
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable" class="myTable">
|
||||||
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable">
|
<thead class="myTableHead">
|
||||||
<thead style="background: #efefef;height: 40px;">
|
<tr>
|
||||||
|
<th colspan="8">煤磨工段车间单位产品电耗月度分析表</th>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>月份</th>
|
<th>月份</th>
|
||||||
<th>当期值(KW·h/t)</th>
|
<th>当期值(KW·h/t)</th>
|
||||||
|
|
@ -131,29 +133,4 @@
|
||||||
.printContainer{
|
.printContainer{
|
||||||
width: 1075px;
|
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>
|
</style>
|
||||||
|
|
@ -176,9 +176,9 @@
|
||||||
></quastat-dialog>
|
></quastat-dialog>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import saveDialog from "./handover_form.vue";
|
import saveDialog from "./../enm_rm/handover_form.vue";
|
||||||
import quastatDialog from "./quastat_form.vue";
|
import quastatDialog from "./../enm_rm/quastat_form.vue";
|
||||||
import otherDialog from "./other_form.vue";
|
import otherDialog from "./../enm_rm/other_form.vue";
|
||||||
export default {
|
export default {
|
||||||
name: "listSon",
|
name: "listSon",
|
||||||
components: {
|
components: {
|
||||||
|
|
|
||||||
|
|
@ -1,198 +0,0 @@
|
||||||
<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>
|
|
||||||
|
|
||||||
|
|
@ -1,189 +0,0 @@
|
||||||
<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>
|
|
||||||
|
|
||||||
|
|
@ -17,9 +17,11 @@
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-card style="margin-top:5px">
|
<el-card style="margin-top:5px">
|
||||||
<div ref="print" id="myReport" class="printContainer">
|
<div ref="print" id="myReport" class="printContainer">
|
||||||
<h3 style="text-align: center;">主要设备(100KW以上)单位产品电耗数据表</h3>
|
<table border="1" width="1000" cellspacing="0" :key="timeStamp" class="myTable" id="myTable">
|
||||||
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable">
|
<thead class="myTableHead">
|
||||||
<thead style="background: #efefef;height: 40px;">
|
<tr>
|
||||||
|
<th colspan="6">回转窑工段主要设备(100KW以上)单位产品电耗数据表</th>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>设备名称</th>
|
<th>设备名称</th>
|
||||||
<th>设备编号</th>
|
<th>设备编号</th>
|
||||||
|
|
@ -34,9 +36,9 @@
|
||||||
<td class="numCell">{{item.name}}</td>
|
<td class="numCell">{{item.name}}</td>
|
||||||
<td class="numCell">{{item.number}}</td>
|
<td class="numCell">{{item.number}}</td>
|
||||||
<td class="numCell">{{item.unit}}</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 hoursItem" @click="itemClick('hours',item)">{{item.hours}}</td>
|
||||||
<td class="numCell monthItem" @click="itemClick('month',item)" style="background: rgba(238, 189, 124, 0.8);">{{item[2]}}</td>
|
<td class="numCell monthItem" @click="itemClick('month',item)">{{item.days}}</td>
|
||||||
<td class="numCell yearItem" @click="itemClick1('year',item)" style="background: rgba(186, 236, 135, 0.8);">{{item[3]}}</td>
|
<td class="numCell yearItem" @click="itemClick1('year',item)">{{item.month}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
@ -195,30 +197,4 @@
|
||||||
.printContainer{
|
.printContainer{
|
||||||
width: 1075px;
|
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>
|
</style>
|
||||||
|
|
@ -1,253 +0,0 @@
|
||||||
<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>
|
|
||||||
|
|
||||||
|
|
@ -17,9 +17,11 @@
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-card style="margin-top:5px">
|
<el-card style="margin-top:5px">
|
||||||
<div ref="print" id="myReport" class="printContainer">
|
<div ref="print" id="myReport" class="printContainer">
|
||||||
<h3 style="text-align: center;">生产报告</h3>
|
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable" class="myTable">
|
||||||
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable">
|
<thead class="myTableHead">
|
||||||
<thead style="background: #efefef;height: 40px;">
|
<tr>
|
||||||
|
<th colspan="10">回转窑工段生产报告</th>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="2">参数</th>
|
<th colspan="2">参数</th>
|
||||||
<th>上个小时</th>
|
<th>上个小时</th>
|
||||||
|
|
@ -38,10 +40,10 @@
|
||||||
<td class="numCell" v-else-if="index==4" rowspan="4">{{ 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" v-else-if="index==8">{{ item[0] }}</td>
|
||||||
<td class="numCell">{{item[1]}}</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 hoursItem" @click="itemClick('hours',item)" >{{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 daysItem" @click="itemClick('days',item)">{{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 monthItem" @click="itemClick('month',item)">{{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 yearItem" @click="itemClick1('year',item)">{{item[5]}}</td>
|
||||||
<td class="numCell">{{item[6]}}</td>
|
<td class="numCell">{{item[6]}}</td>
|
||||||
<td class="numCell">{{item[7]}}</td>
|
<td class="numCell">{{item[7]}}</td>
|
||||||
<td class="numCell">{{item[8]}}</td>
|
<td class="numCell">{{item[8]}}</td>
|
||||||
|
|
@ -218,30 +220,4 @@
|
||||||
.printContainer{
|
.printContainer{
|
||||||
width: 1075px;
|
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>
|
</style>
|
||||||
|
|
@ -36,9 +36,11 @@
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-card style="margin-top:5px">
|
<el-card style="margin-top:5px">
|
||||||
<div ref="print" id="myReport" class="printContainer">
|
<div ref="print" id="myReport" class="printContainer">
|
||||||
<h3 style="text-align: center;">主要设备(100KW以上)单位产品电耗数据表</h3>
|
<table border="1" cellspacing="0" :key="timeStamp" id="myTable" class="myTable">
|
||||||
<table border="1" cellspacing="0" :key="timeStamp" id="myTable">
|
<thead class="myTableHead">
|
||||||
<thead style="background: #efefef;height: 40px;">
|
<tr>
|
||||||
|
<th colspan="45">回转窑工段班组月度对比分析</th>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th rowspan="2">月份</th>
|
<th rowspan="2">月份</th>
|
||||||
<th rowspan="2">班组</th>
|
<th rowspan="2">班组</th>
|
||||||
|
|
@ -180,29 +182,4 @@
|
||||||
.printContainer{
|
.printContainer{
|
||||||
width: 1075px;
|
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>
|
</style>
|
||||||
|
|
@ -31,9 +31,8 @@
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-card style="margin-top:5px">
|
<el-card style="margin-top:5px">
|
||||||
<div ref="print" id="myReport" class="printContainer">
|
<div ref="print" id="myReport" class="printContainer">
|
||||||
<h3 style="text-align: center;">车间单位产品电耗月度分析表</h3>
|
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable" class="myTable">
|
||||||
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable">
|
<thead class="myTableHead">
|
||||||
<thead style="background: #efefef;height: 80px;">
|
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="8">车间单位产品电耗月度分析表</th>
|
<th colspan="8">车间单位产品电耗月度分析表</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
@ -61,9 +60,8 @@
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<h3 style="text-align: center;"> 车间单位产品综合电耗月度分析表</h3>
|
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable1" class="myTable">
|
||||||
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable1">
|
<thead class="myTableHead">
|
||||||
<thead style="background: #efefef;height: 120px;">
|
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="9">车间单位产品综合电耗月度分析表</th>
|
<th colspan="9">车间单位产品综合电耗月度分析表</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
@ -96,9 +94,8 @@
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<h3 style="text-align: center;"> 车间单位产品标煤耗月度分析表</h3>
|
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable1" class="myTable">
|
||||||
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable1">
|
<thead class="myTableHead">
|
||||||
<thead style="background: #efefef;height: 120px;">
|
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="9">车间单位产品标煤耗月度分析表</th>
|
<th colspan="9">车间单位产品标煤耗月度分析表</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
@ -131,9 +128,8 @@
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<h3 style="text-align: center;"> 车间单位产品综合能耗月度分析表</h3>
|
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable1" class="myTable">
|
||||||
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable1">
|
<thead class="myTableHead">
|
||||||
<thead style="background: #efefef;height: 120px;">
|
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="9">车间单位产品综合能耗月度分析表</th>
|
<th colspan="9">车间单位产品综合能耗月度分析表</th>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
@ -239,29 +235,4 @@
|
||||||
.printContainer{
|
.printContainer{
|
||||||
width: 1075px;
|
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>
|
</style>
|
||||||
|
|
@ -158,11 +158,11 @@
|
||||||
></quastat-dialog>
|
></quastat-dialog>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import saveDialog from "./handover_form.vue";
|
import saveDialog from "./../enm_rm/handover_form.vue";
|
||||||
import quastatDialog from "./quastat_form.vue";
|
import quastatDialog from "./../enm_rm/quastat_form.vue";
|
||||||
import otherDialog from "./other_form.vue";
|
import otherDialog from "./../enm_rm/other_form.vue";
|
||||||
export default {
|
export default {
|
||||||
name: "listSon",
|
name: "shuinimo",
|
||||||
components: {
|
components: {
|
||||||
saveDialog,
|
saveDialog,
|
||||||
otherDialog,
|
otherDialog,
|
||||||
|
|
|
||||||
|
|
@ -1,198 +0,0 @@
|
||||||
<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>
|
|
||||||
|
|
||||||
|
|
@ -1,189 +0,0 @@
|
||||||
<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>
|
|
||||||
|
|
||||||
|
|
@ -17,9 +17,11 @@
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-card style="margin-top:5px">
|
<el-card style="margin-top:5px">
|
||||||
<div ref="print" id="myReport" class="printContainer">
|
<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" class="myTable">
|
||||||
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable">
|
<thead class="myTableHead">
|
||||||
<thead style="background: #efefef;height: 40px;">
|
<tr>
|
||||||
|
<th colspan="6">水泥磨工段主要设备(100KW以上)单位产品电耗数据表</th>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>设备名称</th>
|
<th>设备名称</th>
|
||||||
<th>设备编号</th>
|
<th>设备编号</th>
|
||||||
|
|
@ -34,9 +36,9 @@
|
||||||
<td class="numCell">{{item.name}}</td>
|
<td class="numCell">{{item.name}}</td>
|
||||||
<td class="numCell">{{item.number}}</td>
|
<td class="numCell">{{item.number}}</td>
|
||||||
<td class="numCell">{{item.unit}}</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 hoursItem" @click="itemClick('hours',item)">{{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 monthItem" @click="itemClick('month',item)">{{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 yearItem" @click="itemClick1('year',item)">{{item[3]}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
@ -190,30 +192,4 @@
|
||||||
.printContainer{
|
.printContainer{
|
||||||
width: 1075px;
|
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>
|
</style>
|
||||||
|
|
@ -1,253 +0,0 @@
|
||||||
<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>
|
|
||||||
|
|
||||||
|
|
@ -17,9 +17,11 @@
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-card style="margin-top:5px">
|
<el-card style="margin-top:5px">
|
||||||
<div ref="print" id="myReport" class="printContainer">
|
<div ref="print" id="myReport" class="printContainer">
|
||||||
<h3 style="text-align: center;">生产报告</h3>
|
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable" class="myTable">
|
||||||
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable">
|
<thead class="myTableHead">
|
||||||
<thead style="background: #efefef;height: 40px;">
|
<tr>
|
||||||
|
<th colspan="10">水泥磨工段生产报告</th>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="2">参数</th>
|
<th colspan="2">参数</th>
|
||||||
<th>上个小时</th>
|
<th>上个小时</th>
|
||||||
|
|
@ -37,10 +39,10 @@
|
||||||
<td class="numCell" v-if="index==0||index==2||index==4" rowspan="2">{{item[0]}}</td>
|
<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" v-else-if="index==6">{{item[0]}}</td>
|
||||||
<td class="numCell">{{item[1]}}</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 hoursItem" @click="itemClick('hours',item)">{{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 daysItem" @click="itemClick('days',item)">{{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 monthItem" @click="itemClick('month',item)">{{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 yearItem" @click="itemClick1('year',item)">{{item[5]}}</td>
|
||||||
<td class="numCell">{{item[6]}}</td>
|
<td class="numCell">{{item[6]}}</td>
|
||||||
<td class="numCell">{{item[7]}}</td>
|
<td class="numCell">{{item[7]}}</td>
|
||||||
<td class="numCell">{{item[8]}}</td>
|
<td class="numCell">{{item[8]}}</td>
|
||||||
|
|
@ -215,30 +217,4 @@
|
||||||
.printContainer{
|
.printContainer{
|
||||||
width: 1075px;
|
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>
|
</style>
|
||||||
|
|
@ -36,9 +36,11 @@
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-card style="margin-top:5px">
|
<el-card style="margin-top:5px">
|
||||||
<div ref="print" id="myReport" class="printContainer">
|
<div ref="print" id="myReport" class="printContainer">
|
||||||
<h3 style="text-align: center;">主要设备(100KW以上)单位产品电耗数据表</h3>
|
<table border="1" cellspacing="0" :key="timeStamp" id="myTable" class="myTable">
|
||||||
<table border="1" cellspacing="0" :key="timeStamp" id="myTable">
|
<thead class="myTableHead">
|
||||||
<thead style="background: #efefef;height: 40px;">
|
<tr>
|
||||||
|
<th colspan="19">水泥磨工段班组月度对比分析</th>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th rowspan="2">月份</th>
|
<th rowspan="2">月份</th>
|
||||||
<th rowspan="2">班组</th>
|
<th rowspan="2">班组</th>
|
||||||
|
|
@ -150,29 +152,4 @@
|
||||||
.printContainer{
|
.printContainer{
|
||||||
width: 1075px;
|
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>
|
</style>
|
||||||
|
|
@ -31,11 +31,10 @@
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-card style="margin-top:5px">
|
<el-card style="margin-top:5px">
|
||||||
<div ref="print" id="myReport" class="printContainer">
|
<div ref="print" id="myReport" class="printContainer">
|
||||||
<h3 style="text-align: center;"> 车间单位产品电耗月度分析表</h3>
|
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable" class="myTable">
|
||||||
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable">
|
<thead class="myTableHead">
|
||||||
<thead style="background: #efefef;height: 120px;">
|
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="9">车间单位产品电耗月度分析表</th>
|
<th colspan="9">水泥磨工段车间单位产品电耗月度分析表</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th rowspan="2">月份</th>
|
<th rowspan="2">月份</th>
|
||||||
|
|
@ -66,11 +65,10 @@
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
<h3 style="text-align: center;"> 车间单位产品综合能耗月度分析表</h3>
|
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable1" class="myTable">
|
||||||
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable1">
|
<thead class="myTableHead">
|
||||||
<thead style="background: #efefef;height: 120px;">
|
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="9">车间单位产品综合能耗月度分析表</th>
|
<th colspan="9">水泥磨工段车间单位产品综合能耗月度分析表</th>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th rowspan="2">月份</th>
|
<th rowspan="2">月份</th>
|
||||||
|
|
@ -174,29 +172,4 @@
|
||||||
.printContainer{
|
.printContainer{
|
||||||
width: 1075px;
|
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>
|
</style>
|
||||||
|
|
@ -128,13 +128,20 @@
|
||||||
@success="handleSaveSuccess"
|
@success="handleSaveSuccess"
|
||||||
@closed="dialog.save = false"
|
@closed="dialog.save = false"
|
||||||
></save-dialog>
|
></save-dialog>
|
||||||
|
<other-dialog
|
||||||
|
v-if="dialog.other"
|
||||||
|
ref="otherDialog"
|
||||||
|
@success="handleOtherSuccess"
|
||||||
|
@closed="dialog.other = false"
|
||||||
|
></other-dialog>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import saveDialog from "./handover_form.vue";
|
import otherDialog from "./../enm_rm/other_form.vue";
|
||||||
|
import saveDialog from "./../enm_rm/handover_form.vue";
|
||||||
export default {
|
export default {
|
||||||
name: "listSon",
|
name: "listSon",
|
||||||
components: {
|
components: {
|
||||||
saveDialog,
|
saveDialog,otherDialog
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
@ -146,6 +153,7 @@ import saveDialog from "./handover_form.vue";
|
||||||
query2: {},
|
query2: {},
|
||||||
dialog: {
|
dialog: {
|
||||||
save: false,
|
save: false,
|
||||||
|
other:false
|
||||||
},
|
},
|
||||||
sflogItem:{},
|
sflogItem:{},
|
||||||
selection: [],
|
selection: [],
|
||||||
|
|
@ -189,6 +197,13 @@ import saveDialog from "./handover_form.vue";
|
||||||
return err;
|
return err;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
//其他能源物料
|
||||||
|
sflog_other(row){
|
||||||
|
this.dialog.other = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.otherDialog.open("edit").setData(row);
|
||||||
|
});
|
||||||
|
},
|
||||||
//新增岗位后更新数据
|
//新增岗位后更新数据
|
||||||
handleSaveSuccess(data, mode) {
|
handleSaveSuccess(data, mode) {
|
||||||
this.$refs.table.refresh()
|
this.$refs.table.refresh()
|
||||||
|
|
@ -197,9 +212,6 @@ import saveDialog from "./handover_form.vue";
|
||||||
handleOtherSuccess(){
|
handleOtherSuccess(){
|
||||||
this.dialog.other = false;
|
this.dialog.other = false;
|
||||||
},
|
},
|
||||||
handleCheckSuccess(){
|
|
||||||
this.dialog.check = false;
|
|
||||||
},
|
|
||||||
closed() {
|
closed() {
|
||||||
this.dialog.save = false;
|
this.dialog.save = false;
|
||||||
this.$refs.table2.refresh();
|
this.$refs.table2.refresh();
|
||||||
|
|
|
||||||
|
|
@ -1,198 +0,0 @@
|
||||||
<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>
|
|
||||||
|
|
||||||
|
|
@ -1,189 +0,0 @@
|
||||||
<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>
|
|
||||||
|
|
||||||
|
|
@ -17,9 +17,11 @@
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-card style="margin-top:5px">
|
<el-card style="margin-top:5px">
|
||||||
<div ref="print" id="myReport" class="printContainer">
|
<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" class="myTable">
|
||||||
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable">
|
<thead class="myTableHead">
|
||||||
<thead style="background: #efefef;height: 40px;">
|
<tr>
|
||||||
|
<th colspan="6">水泥包装工段主要设备(100KW以上)单位产品电耗数据表</th>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>设备名称</th>
|
<th>设备名称</th>
|
||||||
<th>设备编号</th>
|
<th>设备编号</th>
|
||||||
|
|
@ -34,9 +36,9 @@
|
||||||
<td class="numCell">{{item.name}}</td>
|
<td class="numCell">{{item.name}}</td>
|
||||||
<td class="numCell">{{item.number}}</td>
|
<td class="numCell">{{item.number}}</td>
|
||||||
<td class="numCell">{{item.unit}}</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 hoursItem" @click="itemClick('hours',item)">{{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 monthItem" @click="itemClick('month',item)">{{item.days}}</td>
|
||||||
<td class="numCell yearItem" @click="itemClick1('year',item)" style="background: rgba(186, 236, 135, 0.8);">{{item.month}}</td>
|
<td class="numCell yearItem" @click="itemClick1('year',item)">{{item.month}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
@ -182,30 +184,4 @@
|
||||||
.printContainer{
|
.printContainer{
|
||||||
width: 1075px;
|
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>
|
</style>
|
||||||
|
|
@ -1,253 +0,0 @@
|
||||||
<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>
|
|
||||||
|
|
||||||
|
|
@ -17,9 +17,11 @@
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-card style="margin-top:5px">
|
<el-card style="margin-top:5px">
|
||||||
<div ref="print" id="myReport" class="printContainer">
|
<div ref="print" id="myReport" class="printContainer">
|
||||||
<h3 style="text-align: center;">生产报告</h3>
|
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable" class="myTable">
|
||||||
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable">
|
<thead class="myTableHead">
|
||||||
<thead style="background: #efefef;height: 40px;">
|
<tr>
|
||||||
|
<th colspan="10">水泥包装工段生产报告</th>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="2">参数</th>
|
<th colspan="2">参数</th>
|
||||||
<th>上个小时</th>
|
<th>上个小时</th>
|
||||||
|
|
@ -36,10 +38,10 @@
|
||||||
<tr v-for="(item) in tableDatas" :key="item">
|
<tr v-for="(item) in tableDatas" :key="item">
|
||||||
<td class="numCell">{{item[0]}}</td>
|
<td class="numCell">{{item[0]}}</td>
|
||||||
<td class="numCell">{{item[1]}}</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 hoursItem" @click="itemClick('hours',item)">{{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 daysItem" @click="itemClick('days',item)">{{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 monthItem" @click="itemClick('month',item)">{{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 yearItem" @click="itemClick1('year',item)">{{item[5]}}</td>
|
||||||
<td class="numCell">{{item[6]}}</td>
|
<td class="numCell">{{item[6]}}</td>
|
||||||
<td class="numCell">{{item[7]}}</td>
|
<td class="numCell">{{item[7]}}</td>
|
||||||
<td class="numCell">{{item[8]}}</td>
|
<td class="numCell">{{item[8]}}</td>
|
||||||
|
|
@ -209,31 +211,5 @@
|
||||||
.printContainer{
|
.printContainer{
|
||||||
width: 1075px;
|
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>
|
</style>
|
||||||
|
|
@ -36,9 +36,11 @@
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-card style="margin-top:5px">
|
<el-card style="margin-top:5px">
|
||||||
<div ref="print" id="myReport" class="printContainer">
|
<div ref="print" id="myReport" class="printContainer">
|
||||||
<h3 style="text-align: center;">主要设备(100KW以上)单位产品电耗数据表</h3>
|
<table border="1" cellspacing="0" :key="timeStamp" id="myTable" class="myTable">
|
||||||
<table border="1" cellspacing="0" :key="timeStamp" id="myTable">
|
<thead class="myTableHead">
|
||||||
<thead style="background: #efefef;height: 40px;">
|
<tr>
|
||||||
|
<th colspan="10">电水泥包装工段班组月度对比分析</th>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>月份</th>
|
<th>月份</th>
|
||||||
<th>班组</th>
|
<th>班组</th>
|
||||||
|
|
@ -127,29 +129,4 @@
|
||||||
.printContainer{
|
.printContainer{
|
||||||
width: 1075px;
|
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>
|
</style>
|
||||||
|
|
@ -31,9 +31,11 @@
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-card style="margin-top:5px">
|
<el-card style="margin-top:5px">
|
||||||
<div ref="print" id="myReport" class="printContainer">
|
<div ref="print" id="myReport" class="printContainer">
|
||||||
<h3 style="text-align: center;">车间单位产品电耗月度分析表</h3>
|
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable" class="myTable">
|
||||||
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable">
|
<thead class="myTableHead">
|
||||||
<thead style="background: #efefef;height: 40px;">
|
<tr>
|
||||||
|
<th colspan="8">水泥包装工段车间单位产品电耗月度分析表</th>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>月份</th>
|
<th>月份</th>
|
||||||
<th>当期值(KW·h/t)</th>
|
<th>当期值(KW·h/t)</th>
|
||||||
|
|
@ -131,29 +133,4 @@
|
||||||
.printContainer{
|
.printContainer{
|
||||||
width: 1075px;
|
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>
|
</style>
|
||||||
|
|
@ -17,9 +17,11 @@
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-card style="margin-top:5px">
|
<el-card style="margin-top:5px">
|
||||||
<div ref="print" id="myReport" class="printContainer">
|
<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" class="myTable">
|
||||||
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable">
|
<thead class="myTableHead">
|
||||||
<thead style="background: #efefef;height: 40px;">
|
<tr>
|
||||||
|
<th colspan="10">原料磨工段主要设备(100KW以上)单位产品电耗数据表</th>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>设备名称</th>
|
<th>设备名称</th>
|
||||||
<th>设备编号</th>
|
<th>设备编号</th>
|
||||||
|
|
@ -34,9 +36,9 @@
|
||||||
<td class="numCell">{{item.name}}</td>
|
<td class="numCell">{{item.name}}</td>
|
||||||
<td class="numCell">{{item.number}}</td>
|
<td class="numCell">{{item.number}}</td>
|
||||||
<td class="numCell">{{item.unit}}</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 hoursItem" @click="itemClick('hours',item)">{{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 monthItem" @click="itemClick('month',item)">{{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 yearItem" @click="itemClick1('year',item)">{{item[3]}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
@ -187,30 +189,4 @@
|
||||||
.printContainer{
|
.printContainer{
|
||||||
width: 1075px;
|
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>
|
</style>
|
||||||
|
|
@ -50,64 +50,12 @@
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-divider />
|
<el-divider />
|
||||||
</el-row>
|
</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>
|
</el-form>
|
||||||
<sc-form-table
|
<sc-form-table
|
||||||
v-model="form.list"
|
v-model="form.list"
|
||||||
:addTemplate="addTemplate"
|
:addTemplate="addTemplate"
|
||||||
|
:hideAdd="hideAdd"
|
||||||
|
:hideDelete="hideDelete"
|
||||||
placeholder="暂无数据"
|
placeholder="暂无数据"
|
||||||
>
|
>
|
||||||
<el-table-column prop="material" label="关联产物" min-width="150">
|
<el-table-column prop="material" label="关联产物" min-width="150">
|
||||||
|
|
@ -166,6 +114,8 @@
|
||||||
num_test: "",
|
num_test: "",
|
||||||
num_ok: "",
|
num_ok: "",
|
||||||
},
|
},
|
||||||
|
hideAdd:true,
|
||||||
|
hideDelete:true,
|
||||||
loading: false,
|
loading: false,
|
||||||
mode: "add",
|
mode: "add",
|
||||||
titleMap: {
|
titleMap: {
|
||||||
|
|
|
||||||
|
|
@ -17,9 +17,11 @@
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-card style="margin-top:5px">
|
<el-card style="margin-top:5px">
|
||||||
<div ref="print" id="myReport" class="printContainer">
|
<div ref="print" id="myReport" class="printContainer">
|
||||||
<h3 style="text-align: center;">生产报告</h3>
|
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable" class="myTable">
|
||||||
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable">
|
<thead class="myTableHead">
|
||||||
<thead style="background: #efefef;height: 40px;">
|
<tr>
|
||||||
|
<th colspan="10">原料磨工段生产报告</th>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="2">参数</th>
|
<th colspan="2">参数</th>
|
||||||
<th>上个小时</th>
|
<th>上个小时</th>
|
||||||
|
|
@ -37,10 +39,10 @@
|
||||||
<td class="numCell" v-if="index==0||index==2" rowspan="2">{{item[0]}}</td>
|
<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" v-if="index==4||index==5">{{item[0]}}</td>
|
||||||
<td class="numCell">{{item[1]}}</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 hoursItem" @click="itemClick('hours',item)">{{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 daysItem" @click="itemClick('days',item)">{{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 monthItem" @click="itemClick('month',item)">{{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 yearItem" @click="itemClick1('year',item)">{{item[5]}}</td>
|
||||||
<td class="numCell">{{item[6]}}</td>
|
<td class="numCell">{{item[6]}}</td>
|
||||||
<td class="numCell">{{item[7]}}</td>
|
<td class="numCell">{{item[7]}}</td>
|
||||||
<td class="numCell">{{item[8]}}</td>
|
<td class="numCell">{{item[8]}}</td>
|
||||||
|
|
@ -214,30 +216,4 @@
|
||||||
.printContainer{
|
.printContainer{
|
||||||
width: 1075px;
|
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>
|
</style>
|
||||||
|
|
@ -36,9 +36,11 @@
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-card style="margin-top:5px">
|
<el-card style="margin-top:5px">
|
||||||
<div ref="print" id="myReport" class="printContainer">
|
<div ref="print" id="myReport" class="printContainer">
|
||||||
<h3 style="text-align: center;">主要设备(100KW以上)单位产品电耗数据表</h3>
|
<table border="1" cellspacing="0" :key="timeStamp" id="myTable" class="myTable">
|
||||||
<table border="1" cellspacing="0" :key="timeStamp" id="myTable">
|
<thead class="myTableHead">
|
||||||
<thead style="background: #efefef;height: 40px;">
|
<tr>
|
||||||
|
<th colspan="19">原料磨工段班组月度对比分析</th>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th rowspan="2">月份</th>
|
<th rowspan="2">月份</th>
|
||||||
<th rowspan="2">班组</th>
|
<th rowspan="2">班组</th>
|
||||||
|
|
@ -148,29 +150,4 @@
|
||||||
.printContainer{
|
.printContainer{
|
||||||
width: 1075px;
|
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>
|
</style>
|
||||||
|
|
@ -31,9 +31,11 @@
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-card style="margin-top:5px">
|
<el-card style="margin-top:5px">
|
||||||
<div ref="print" id="myReport" class="printContainer">
|
<div ref="print" id="myReport" class="printContainer">
|
||||||
<h3 style="text-align: center;">车间单位产品电耗月度分析表</h3>
|
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable" class="myTable">
|
||||||
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable">
|
<thead class="myTableHead">
|
||||||
<thead style="background: #efefef;height: 40px;">
|
<tr>
|
||||||
|
<th colspan="10">原料磨工段车间单位产品电耗月度分析表</th>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>月份</th>
|
<th>月份</th>
|
||||||
<th>当期值(KW·h/t)</th>
|
<th>当期值(KW·h/t)</th>
|
||||||
|
|
@ -131,29 +133,4 @@
|
||||||
.printContainer{
|
.printContainer{
|
||||||
width: 1075px;
|
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>
|
</style>
|
||||||
|
|
@ -74,11 +74,11 @@
|
||||||
<span v-if="scope.row.last_test_time">{{ scope.row.last_test_time.slice(0,16)}}</span>
|
<span v-if="scope.row.last_test_time">{{ scope.row.last_test_time.slice(0,16)}}</span>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
<el-table-column label="操作" fixed="right" align="center" width="100">
|
<el-table-column label="操作" fixed="right" align="center" width="150">
|
||||||
<template #default="scope">
|
<template #default="scope">
|
||||||
<el-button link size="small" @click="sflog_edit(scope.row)" type="primary">编辑</el-button>
|
<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_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_other(scope.row)" type="primary">其他能源</el-button>
|
||||||
<el-button link size="small" @click="sflog_export(scope.row)" type="success">报表</el-button>
|
<el-button link size="small" @click="sflog_export(scope.row)" type="success">报表</el-button>
|
||||||
</template>
|
</template>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
|
|
@ -130,13 +130,20 @@
|
||||||
@success="handleSaveSuccess"
|
@success="handleSaveSuccess"
|
||||||
@closed="dialog.save = false"
|
@closed="dialog.save = false"
|
||||||
></save-dialog>
|
></save-dialog>
|
||||||
|
<other-dialog
|
||||||
|
v-if="dialog.other"
|
||||||
|
ref="otherDialog"
|
||||||
|
@success="handleOtherSuccess"
|
||||||
|
@closed="dialog.other = false"
|
||||||
|
></other-dialog>
|
||||||
</template>
|
</template>
|
||||||
<script>
|
<script>
|
||||||
import saveDialog from "./handover_form.vue";
|
import otherDialog from "./../enm_rm/other_form.vue";
|
||||||
|
import saveDialog from "./../enm_rm/handover_form.vue";
|
||||||
export default {
|
export default {
|
||||||
name: "listSon",
|
name: "listSon",
|
||||||
components: {
|
components: {
|
||||||
saveDialog,
|
saveDialog,otherDialog
|
||||||
},
|
},
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
|
@ -148,6 +155,7 @@ import saveDialog from "./handover_form.vue";
|
||||||
query2: {},
|
query2: {},
|
||||||
dialog: {
|
dialog: {
|
||||||
save: false,
|
save: false,
|
||||||
|
other:false
|
||||||
},
|
},
|
||||||
sflogItem:{},
|
sflogItem:{},
|
||||||
selection: [],
|
selection: [],
|
||||||
|
|
@ -179,7 +187,13 @@ import saveDialog from "./handover_form.vue";
|
||||||
this.$refs.saveDialog.open("edit").setData(row);
|
this.$refs.saveDialog.open("edit").setData(row);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
//其他能源物料
|
||||||
|
sflog_other(row){
|
||||||
|
this.dialog.other = true;
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.otherDialog.open("edit").setData(row);
|
||||||
|
});
|
||||||
|
},
|
||||||
//删除
|
//删除
|
||||||
async table_del(row) {
|
async table_del(row) {
|
||||||
this.$API.wpm.sflog.delete.req(row.id)
|
this.$API.wpm.sflog.delete.req(row.id)
|
||||||
|
|
@ -199,9 +213,6 @@ import saveDialog from "./handover_form.vue";
|
||||||
handleOtherSuccess(){
|
handleOtherSuccess(){
|
||||||
this.dialog.other = false;
|
this.dialog.other = false;
|
||||||
},
|
},
|
||||||
handleCheckSuccess(){
|
|
||||||
this.dialog.check = false;
|
|
||||||
},
|
|
||||||
closed() {
|
closed() {
|
||||||
this.dialog.save = false;
|
this.dialog.save = false;
|
||||||
this.$refs.table2.refresh();
|
this.$refs.table2.refresh();
|
||||||
|
|
|
||||||
|
|
@ -1,198 +0,0 @@
|
||||||
<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>
|
|
||||||
|
|
||||||
|
|
@ -1,189 +0,0 @@
|
||||||
<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>
|
|
||||||
|
|
||||||
|
|
@ -17,9 +17,11 @@
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-card style="margin-top:5px">
|
<el-card style="margin-top:5px">
|
||||||
<div ref="print" id="myReport" class="printContainer">
|
<div ref="print" id="myReport" class="printContainer">
|
||||||
<h3 style="text-align: center;">主要设备(100KW以上)单位产品电耗数据表</h3>
|
<table border="1" width="1000" cellspacing="0" :key="timeStamp" class="myTable" id="myTable">
|
||||||
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable">
|
<thead class="myTableHead">
|
||||||
<thead style="background: #efefef;height: 40px;">
|
<tr>
|
||||||
|
<th colspan="6">电石渣工段主要设备(100KW以上)单位产品电耗数据表</th>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>设备名称</th>
|
<th>设备名称</th>
|
||||||
<th>设备编号</th>
|
<th>设备编号</th>
|
||||||
|
|
@ -34,9 +36,9 @@
|
||||||
<td class="numCell">{{item.name}}</td>
|
<td class="numCell">{{item.name}}</td>
|
||||||
<td class="numCell">{{item.number}}</td>
|
<td class="numCell">{{item.number}}</td>
|
||||||
<td class="numCell">{{item.unit}}</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 hoursItem" @click="itemClick('hours',item)">{{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 monthItem" @click="itemClick('month',item)">{{item.days}}</td>
|
||||||
<td class="numCell yearItem" @click="itemClick1('year',item)" style="background: rgba(186, 236, 135, 0.8);">{{item.month}}</td>
|
<td class="numCell yearItem" @click="itemClick1('year',item)">{{item.month}}</td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
|
|
@ -182,30 +184,4 @@
|
||||||
.printContainer{
|
.printContainer{
|
||||||
width: 1075px;
|
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>
|
</style>
|
||||||
|
|
@ -1,253 +0,0 @@
|
||||||
<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>
|
|
||||||
|
|
||||||
|
|
@ -17,9 +17,11 @@
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-card style="margin-top:5px">
|
<el-card style="margin-top:5px">
|
||||||
<div ref="print" id="myReport" class="printContainer">
|
<div ref="print" id="myReport" class="printContainer">
|
||||||
<h3 style="text-align: center;">生产报告</h3>
|
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable" class="myTable">
|
||||||
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable">
|
<thead class="myTableHead">
|
||||||
<thead style="background: #efefef;height: 40px;">
|
<tr>
|
||||||
|
<th colspan="10">电石渣工段生产报告</th>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th colspan="2">参数</th>
|
<th colspan="2">参数</th>
|
||||||
<th>上个小时</th>
|
<th>上个小时</th>
|
||||||
|
|
@ -36,10 +38,10 @@
|
||||||
<tr v-for="(item) in tableDatas" :key="item">
|
<tr v-for="(item) in tableDatas" :key="item">
|
||||||
<td class="numCell">{{item[0]}}</td>
|
<td class="numCell">{{item[0]}}</td>
|
||||||
<td class="numCell">{{item[1]}}</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 hoursItem" @click="itemClick('hours',item)" >{{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 daysItem" @click="itemClick('days',item)">{{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 monthItem" @click="itemClick('month',item)">{{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 yearItem" @click="itemClick1('year',item)">{{item[5]}}</td>
|
||||||
<td class="numCell">{{item[6]}}</td>
|
<td class="numCell">{{item[6]}}</td>
|
||||||
<td class="numCell">{{item[7]}}</td>
|
<td class="numCell">{{item[7]}}</td>
|
||||||
<td class="numCell">{{item[8]}}</td>
|
<td class="numCell">{{item[8]}}</td>
|
||||||
|
|
@ -210,31 +212,4 @@
|
||||||
.printContainer{
|
.printContainer{
|
||||||
width: 1075px;
|
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>
|
</style>
|
||||||
|
|
@ -36,9 +36,11 @@
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-card style="margin-top:5px">
|
<el-card style="margin-top:5px">
|
||||||
<div ref="print" id="myReport" class="printContainer">
|
<div ref="print" id="myReport" class="printContainer">
|
||||||
<h3 style="text-align: center;">主要设备(100KW以上)单位产品电耗数据表</h3>
|
<table border="1" cellspacing="0" :key="timeStamp" id="myTable" class="myTable">
|
||||||
<table border="1" cellspacing="0" :key="timeStamp" id="myTable">
|
<thead class="myTableHead">
|
||||||
<thead style="background: #efefef;height: 40px;">
|
<tr>
|
||||||
|
<th colspan="19">电石渣工段班组月度对比分析</th>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th rowspan="2">月份</th>
|
<th rowspan="2">月份</th>
|
||||||
<th rowspan="2">班组</th>
|
<th rowspan="2">班组</th>
|
||||||
|
|
@ -148,29 +150,4 @@
|
||||||
.printContainer{
|
.printContainer{
|
||||||
width: 1075px;
|
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>
|
</style>
|
||||||
|
|
@ -31,9 +31,11 @@
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-card style="margin-top:5px">
|
<el-card style="margin-top:5px">
|
||||||
<div ref="print" id="myReport" class="printContainer">
|
<div ref="print" id="myReport" class="printContainer">
|
||||||
<h3 style="text-align: center;">车间单位产品电耗月度分析表</h3>
|
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable" class="myTable">
|
||||||
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable">
|
<thead class="myTableHead">
|
||||||
<thead style="background: #efefef;height: 40px;">
|
<tr>
|
||||||
|
<th colspan="8">车间单位产品电耗月度分析表</th>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<th>月份</th>
|
<th>月份</th>
|
||||||
<th>当期值(KW·h/t)</th>
|
<th>当期值(KW·h/t)</th>
|
||||||
|
|
@ -131,29 +133,4 @@
|
||||||
.printContainer{
|
.printContainer{
|
||||||
width: 1075px;
|
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>
|
</style>
|
||||||
|
|
@ -52,7 +52,7 @@
|
||||||
|
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-main class="nopadding">
|
<el-main class="nopadding">
|
||||||
<scTable ref="table" :apiObj="apiObj" row-key="id" hidePagination>
|
<scTable ref="table" :apiObj="apiObj" row-key="id">
|
||||||
<el-table-column label="#" type="index" width="50"></el-table-column>
|
<el-table-column label="#" type="index" width="50"></el-table-column>
|
||||||
<el-table-column label="年" prop="year" min-width="100"></el-table-column>
|
<el-table-column label="年" prop="year" min-width="100"></el-table-column>
|
||||||
<el-table-column label="月" prop="month" min-width="100"></el-table-column>
|
<el-table-column label="月" prop="month" min-width="100"></el-table-column>
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@
|
||||||
|
|
||||||
</el-header>
|
</el-header>
|
||||||
<el-main class="nopadding">
|
<el-main class="nopadding">
|
||||||
<scTable ref="table" :apiObj="apiObj" row-key="id" hidePagination>
|
<scTable ref="table" :apiObj="apiObj" row-key="id">
|
||||||
<el-table-column label="#" type="index" width="50"></el-table-column>
|
<el-table-column label="#" type="index" width="50"></el-table-column>
|
||||||
<el-table-column label="年" prop="year" min-width="100"></el-table-column>
|
<el-table-column label="年" prop="year" min-width="100"></el-table-column>
|
||||||
<el-table-column label="月" prop="month" min-width="100"></el-table-column>
|
<el-table-column label="月" prop="month" min-width="100"></el-table-column>
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,19 @@
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<el-header>
|
<el-header>
|
||||||
<div class="left-panel">
|
<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
|
<el-select
|
||||||
v-model="query.type"
|
v-model="query.type"
|
||||||
placeholder="查询类型"
|
placeholder="查询类型"
|
||||||
|
|
@ -296,6 +309,7 @@
|
||||||
{id:1,name:'月报表'},
|
{id:1,name:'月报表'},
|
||||||
{id:2,name:'年报表'},
|
{id:2,name:'年报表'},
|
||||||
],
|
],
|
||||||
|
mgroupOptions:[],
|
||||||
tableTime:'',
|
tableTime:'',
|
||||||
tableName:'质检日报表',
|
tableName:'质检日报表',
|
||||||
tableHead:['车间','物料','检验项目','平均值','检次','合次','合格率'],
|
tableHead:['车间','物料','检验项目','平均值','检次','合次','合格率'],
|
||||||
|
|
@ -347,9 +361,17 @@
|
||||||
}
|
}
|
||||||
this.query.day = myDate.getFullYear()+'-'+month+'-'+days;
|
this.query.day = myDate.getFullYear()+'-'+month+'-'+days;
|
||||||
this.getTableData();
|
this.getTableData();
|
||||||
|
this.getMgroup();
|
||||||
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
//获取工段列表
|
||||||
|
getMgroup(){
|
||||||
|
this.$API.mtm.mgroup.list.req({page:0}).then(res=>{
|
||||||
|
this.mgroupOptions = res;
|
||||||
|
this.query.mgroup = res[8].id
|
||||||
|
})
|
||||||
|
},
|
||||||
typeCange(value){
|
typeCange(value){
|
||||||
if(value==1){
|
if(value==1){
|
||||||
this.tableName = '质检日报表'
|
this.tableName = '质检日报表'
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue