fix:交接班日志报告报表填充数据并导出

This commit is contained in:
shijing 2023-09-11 15:12:48 +08:00
parent 7a7ad8c9ce
commit b149cb59e7
7 changed files with 493 additions and 732 deletions

View File

@ -731,7 +731,7 @@ export default {
// mesh
const mesh_rect = new BABYLON_GUI.Rectangle('mesh_rect');
mesh_rect.width = "80px";
mesh_rect.width = "180px";
mesh_rect.height = "20px";
mesh_rect.background = 'orange'
mesh_rect.alpha = 0.6
@ -747,8 +747,13 @@ export default {
var remoteGlbUrl = process.env.VUE_APP_BASEURL + "/media/model/factory.glb";
BABYLON.SceneLoader.Append(remoteGlbUrl, "", scene, function (scene) {
debugger;
console.log(scene)
// debugger;
// console.log(scene)
// console.table(scene.meshes)
let data = scene.meshes;
data.forEach(item=>{
console.log(item.name)
})
for (let key in that.sectionNames) {
var value = that.sectionNames[key];
@ -888,14 +893,17 @@ export default {
if (pickResult.hit) {
const mesh = pickResult.pickedMesh;
highlightLayer.removeAllMeshes();
if (mesh.name == '柱体.024') {
// mesh
highlightLayer.addMesh(mesh, new BABYLON.Color3(1, 1, 0.5));
if(
mesh.name=='熟料库_primitive0'
){
// mesh
highlightLayer.addMesh(mesh, new BABYLON.Color3(1, 1, 0.5));
that.currentLightMesh = mesh;
mesh_rect.linkWithMesh(mesh);
mesh_name.text = mesh.name;
mesh_rect.isVisible = true;
}
}
});
// checkbox.isChecked = true; //

View File

@ -63,7 +63,6 @@
@row-click="rowClick"
>
<el-table-column type="index" width="50"/>
<!-- <el-table-column label="关联工段" prop="mgroup_name"></el-table-column> -->
<el-table-column label="开始时间" prop="start_time">
<template #default="scope">
<span>{{ scope.row.start_time.slice(0,16)}}</span>
@ -102,6 +101,19 @@
关闭
</el-button>
</template>
<div class="left-panel">
<el-button
type="primary"
@click="exportExcel()"
:loading = "exportLoading"
>导出xlsx
</el-button>
<el-button
type="primary"
@click="handlePrint"
>打印
</el-button>
</div>
<el-main class="nopadding">
<div ref="print" id="myReport" class="printContainer">
<div style="margin-right: 20px;text-align: center;font-size: 16px;font-weight: bold;margin-bottom: 20px;">
@ -109,76 +121,65 @@
<span v-if="sflogItem.team_name">{{ sflogItem.team_name }}</span>
交接班记录
</div>
<h3 style="text-align: center;display: flex;justify-content: space-around;">
<span>2023.06.21</span>
<span>白班</span>
<span>甲班</span>
</h3>
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable">
<tbody>
<tr>
<td class="numCell">日期</td>
<td class="numCell" v-if="sflogItem.end_time">{{sflogItem.end_time.slice(0,10)}}</td>
<td class="numCell">班次</td>
<td class="numCell">{{ sflogItem.shift_name }}</td>
<td class="numCell">班组</td>
<td class="numCell"><span v-if="sflogItem.team_name">{{ sflogItem.team_name }}</span></td>
</tr>
<tr>
<td class="numCell">产量t</td>
<td class="numCell">{{value1}}</td>
<td class="numCell">{{reportItem.total_production}}</td>
<td class="numCell">台时t/h</td>
<td class="numCell">{{value3}}</td>
<td class="numCell">{{reportItem.production_hour}}</td>
<td class="numCell">运转时间h</td>
<td class="numCell">{{value5}}</td>
<td class="numCell">{{reportItem.run_hour}}</td>
</tr>
<tr>
<td class="numCell">运转率%</td>
<td class="numCell">{{value1}}</td>
<td class="numCell">{{reportItem.run_rate*100}}</td>
<td class="numCell">停机时长h</td>
<td class="numCell">{{value3}}</td>
<td class="numCell">{{reportItem.shut_hour}}</td>
<td class="numCell">煤磨分布电耗KW·h/t</td>
<td class="numCell">{{value5}}</td>
<td class="numCell">{{reportItem.elec_consume_unit}}</td>
</tr>
<tr>
<td class="numCell">煤粉细度合格率%</td>
<td class="numCell">{{value1}}</td>
<td class="numCell" v-if="reportItem.煤粉_细度_rate_pass">{{reportItem.煤粉_细度_rate_pass*100}}</td>
<td class="numCell" v-else>0</td>
<td class="numCell">煤粉水分合格率%</td>
<td class="numCell">{{value5}}</td>
</tr>
<tr>
<td class="numCell">生产情况记录</td>
<td class="numCell" colspan="5">时间类别原因处置措施处置人</td>
<td class="numCell" v-if="reportItem.煤粉_水分_rate_pass">{{reportItem.煤粉_水分_rate_pass*100}}</td>
<td class="numCell" v-else>0</td>
</tr>
<tr v-if="sflogexpList.length>0">
<td class="numCell" :rowspan="sflogexpList.length+1">生产情况记录</td>
<td class="numCell">时间</td>
<td class="numCell">类别</td>
<td class="numCell">原因</td>
<td class="numCell">处置措施</td>
<td class="numCell">处置人</td>
</tr>
<tr v-for="item in sflogexpList" :key="item.id">
<td class="numCell">{{ item.happen_time}}</td>
<td class="numCell">{{ item.cate}}</td>
<td class="numCell">{{ item.reason}}</td>
<td class="numCell">{{ item.measure}}</td>
<td class="numCell">{{ item.handler}}</td>
</tr>
</tbody>
</table>
</div>
</el-main>
</el-drawer>
</el-container>
<save-dialog
v-if="dialog.save"
ref="saveDialog"
:deptId ="deptId"
@success="handleSaveSuccess"
@closed="dialog.save = false"
></save-dialog>
<other-dialog
v-if="dialog.other"
ref="otherDialog"
@success="handleOtherSuccess"
@closed="dialog.other = false"
></other-dialog>
<quastat-dialog
v-if="dialog.check"
ref="checkDialog"
@success="handleCheckSuccess"
@closed="dialog.save = false"
></quastat-dialog>
</template>
<script>
import saveDialog from "./../enm_rm/handover_form.vue";
import quastatDialog from "./../enm_rm/quastat_form.vue";
import otherDialog from "./../enm_rm/other_form.vue";
export default {
name: "listSon",
components: {
saveDialog,
otherDialog,
quastatDialog
},
name: "sflog",
data() {
return {
apiObj: this.$API.wpm.sflog.list,
@ -191,24 +192,12 @@
mgroup:'3347217512021835776',
},
deptId :'3347207082608115712',
query2: {},
dialog: {
save: false,
check: false,
other:false,
},
sflogItem:{},
selection: [],
value1:1,
value3:3,
value5:5,
modelValue:true,
showClose:true,
echartType:'line',
asynDialog:false,
options:[],
optionsShift:[],
limitedExport:false,
reportItem:{},
sflogexpList:[],
};
},
mounted(){
@ -238,7 +227,23 @@
rowClick(row) {
this.sflogId = row.id;
this.sflogItem = row;
// this.$refs.table2.queryData({post: row.id});
this.getSflogItem(row.id);
this.getSflogexp(row.id);
},
getSflogexp(id){
let that = this;
that.$API.wpm.sflogexp.list.req({page:0,sflog:id}).then(res=>{
that.sflogexpList = res;
})
},
getSflogItem(id){
let that =this;
that.$API.enm.enstat.req({type:'sflog',sflog:id,page:0}).then(res=>{
if(res.length>0){
that.reportItem = res[0];
}
console.log(res[0])
})
},
//
sflog_edit(row) {
@ -252,74 +257,6 @@
deptId:this.deptId
},
});
// this.dialog.save = true;
// this.$nextTick(() => {
// this.$refs.saveDialog.open("edit").setData(row);
// });
},
//
sflog_check(row){
this.dialog.check = true;
this.$nextTick(() => {
this.$refs.checkDialog.open("edit").setData(row);
});
},
//
sflog_other(row){
this.dialog.other = true;
this.$nextTick(() => {
this.$refs.otherDialog.open("edit").setData(row);
});
},
// //
// table_show(row) {
// this.dialog.save = true;
// this.$nextTick(() => {
// this.$refs.checkDialog.open("edit").setData(row);
// });
// },
//
async table_del(row) {
this.$API.wpm.sflog.delete.req(row.id)
.then((res) => {
this.$message.success("删除成功");
return res;
})
.catch((err) => {
return err;
});
},
//
handleSaveSuccess(data, mode) {
this.$refs.table.refresh()
this.dialog.save = false;
},
handleOtherSuccess(){
this.dialog.other = false;
},
handleCheckSuccess(){
this.dialog.check = false;
},
closed() {
this.dialog.save = false;
this.$refs.table2.refresh();
},
handleDel(row) {
this.$confirm(`确定删除选中的记录吗?`, "提示", {
type: "warning",
}).then(() => {
this.$API.wpm.shift.delete.req(row.id).then((res) => {
if (res.err_msg) {
this.$message.error(res.err_msg);
} else {
// const loading = this.$loading();
// this.$refs.table2.refresh();
// loading.close();
// this.$message.success("");
}
});
})
.catch(() => {});
},
handlePrint() {
this.$PRINT('#myReport');

View File

@ -101,6 +101,19 @@
关闭
</el-button>
</template>
<div class="left-panel">
<el-button
type="primary"
@click="exportExcel()"
:loading = "exportLoading"
>导出xlsx
</el-button>
<el-button
type="primary"
@click="handlePrint"
>打印
</el-button>
</div>
<el-main class="nopadding">
<div ref="print" id="myReport" class="printContainer">
<div style="margin-right: 20px;text-align: center;font-size: 16px;font-weight: bold;margin-bottom: 20px;">
@ -108,95 +121,87 @@
<span v-if="sflogItem.team_name">{{ sflogItem.team_name }}</span>
交接班记录
</div>
<h3 style="text-align: center;display: flex;justify-content: space-around;">
<span>2023.06.21</span>
<span>白班</span>
<span>甲班</span>
</h3>
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable">
<tbody>
<tr>
<td class="numCell">日期</td>
<td class="numCell" v-if="sflogItem.end_time">{{sflogItem.end_time.slice(0,10)}}</td>
<td class="numCell">班次</td>
<td class="numCell">{{ sflogItem.shift_name }}</td>
<td class="numCell">班组</td>
<td class="numCell"><span v-if="sflogItem.team_name">{{ sflogItem.team_name }}</span></td>
</tr>
<tr>
<td class="numCell">产量t</td>
<td class="numCell">{{value1}}</td>
<td class="numCell">{{reportItem.total_production}}</td>
<td class="numCell">台时t/h</td>
<td class="numCell">{{value3}}</td>
<td class="numCell">{{reportItem.production_hour}}</td>
<td class="numCell">运转时间h</td>
<td class="numCell">{{value5}}</td>
<td class="numCell">{{reportItem.run_hour}}</td>
</tr>
<tr>
<td class="numCell">运转率%</td>
<td class="numCell">{{value1}}</td>
<td class="numCell">{{reportItem.run_rate*100}}</td>
<td class="numCell">停机时长h</td>
<td class="numCell">{{value3}}</td>
<td class="numCell">{{reportItem.shut_hour}}</td>
<td class="numCell">单位产品分布电耗KW·h/t</td>
<td class="numCell">{{value5}}</td>
<td class="numCell">{{reportItem.elec_consume_unit}}</td>
</tr>
<tr>
<td class="numCell">单位产品标煤耗kgce/t</td>
<td class="numCell">{{value1}}</td>
<td class="numCell">熟料立升重合格率</td>
<td class="numCell">{{value3}}</td>
<td class="numCell">熟料f-CaO合格率</td>
<td class="numCell">{{value5}}</td>
<td class="numCell">{{reportItem.coal_consume_unit}}</td>
<td class="numCell">熟料立升重合格率%</td>
<td class="numCell" v-if="reportItem.入磨熟料_立升重_rate_pass">{{reportItem.入磨熟料_立升重_rate_pass*100}}</td>
<td class="numCell" v-else>0</td>
<td class="numCell">熟料f-CaO合格率%</td>
<td class="numCell" v-if="reportItem['入磨熟料_f-CaO_rate_pass']">{{reportItem['入磨熟料_f-CaO_rate_pass']*100}}</td>
<td class="numCell" v-else>0</td>
</tr>
<tr>
<td class="numCell">入窑生料细度合格率%</td>
<td class="numCell">{{value5}}</td>
<td class="numCell" v-if="reportItem.入窑生料_细度_rate_pass">{{reportItem.入窑生料_细度_rate_pass*100}}</td>
<td class="numCell" v-else>0</td>
<td class="numCell">入窑生料CaO合格率%</td>
<td class="numCell">{{value1}}</td>
<td class="numCell" v-if="reportItem.入窑生料_CaO_rate_pass">{{reportItem.入窑生料_CaO_rate_pass*100}}</td>
<td class="numCell" v-else>0</td>
<td class="numCell">入窑生料Fe₂O₃合格率%</td>
<td class="numCell">{{value3}}</td>
</tr>
<td class="numCell" v-if="reportItem.入窑生料_Fe2O3_rate_pass">{{reportItem.入窑生料_Fe2O3_rate_pass*100}}</td>
<td class="numCell" v-else>0</td>
</tr>
<tr>
<td class="numCell">入窑生料水分合格率%</td>
<td class="numCell">{{value1}}</td>
<td class="numCell" v-if="reportItem.入窑生料_水分_rate_pass">{{reportItem.入窑生料_水分_rate_pass*100}}</td>
<td class="numCell" v-else>0</td>
<td class="numCell">单位成本/</td>
<td class="numCell">{{value3}}</td>
<td class="numCell">{{reportItem.production_cost_unit}}</td>
<td class="numCell"></td>
<td class="numCell"></td>
</tr>
<tr>
<td class="numCell">生产情况记录</td>
<td class="numCell" colspan="5">时间类别原因处置措施处置人</td>
</tr>
<tr v-if="sflogexpList.length>0">
<td class="numCell" :rowspan="sflogexpList.length+1">生产情况记录</td>
<td class="numCell">时间</td>
<td class="numCell">类别</td>
<td class="numCell">原因</td>
<td class="numCell">处置措施</td>
<td class="numCell">处置人</td>
</tr>
<tr v-for="item in sflogexpList" :key="item.id">
<td class="numCell">{{ item.happen_time}}</td>
<td class="numCell">{{ item.cate}}</td>
<td class="numCell">{{ item.reason}}</td>
<td class="numCell">{{ item.measure}}</td>
<td class="numCell">{{ item.handler}}</td>
</tr>
</tbody>
</table>
</div>
</el-main>
</el-drawer>
</el-container>
<save-dialog
v-if="dialog.save"
ref="saveDialog"
:deptId ="deptId"
:mgroupId="query.mgroup"
@success="handleSaveSuccess"
@closed="dialog.save = false"
></save-dialog>
<other-dialog
v-if="dialog.other"
ref="otherDialog"
@success="handleOtherSuccess"
@closed="dialog.other = false"
></other-dialog>
<quastat-dialog
v-if="dialog.check"
ref="checkDialog"
@success="handleCheckSuccess"
@closed="dialog.save = false"
></quastat-dialog>
</template>
<script>
import saveDialog from "./../enm_rm/handover_form.vue";
import quastatDialog from "./../enm_rm/quastat_form.vue";
import otherDialog from "./../enm_rm/other_form.vue";
export default {
name: "listSon",
components: {
saveDialog,
otherDialog,
quastatDialog
},
name: "sflog",
data() {
return {
apiObj: this.$API.wpm.sflog.list,
@ -210,24 +215,12 @@ import otherDialog from "./../enm_rm/other_form.vue";
},
deptId :'3347207082608115712',
query2: {},
dialog: {
save: false,
check: false,
other:false,
},
sflogItem:{},
selection: [],
value1:1,
value3:3,
value5:5,
modelValue:true,
showClose:true,
echartType:'line',
asynDialog:false,
options:[],
optionsShift:[],
limitedExport:false,
reportItem:{},
sflogexpList:[],
};
},
mounted(){
@ -257,7 +250,23 @@ import otherDialog from "./../enm_rm/other_form.vue";
rowClick(row) {
this.sflogId = row.id;
this.sflogItem = row;
// this.$refs.table2.queryData({post: row.id});
this.getSflogItem(row.id);
this.getSflogexp(row.id);
},
getSflogexp(id){
let that = this;
that.$API.wpm.sflogexp.list.req({page:0,sflog:id}).then(res=>{
that.sflogexpList = res;
})
},
getSflogItem(id){
let that =this;
that.$API.enm.enstat.req({type:'sflog',sflog:id,page:0}).then(res=>{
if(res.length>0){
that.reportItem = res[0];
}
console.log(res[0])
})
},
//
sflog_edit(row) {
@ -271,74 +280,6 @@ import otherDialog from "./../enm_rm/other_form.vue";
deptId:this.deptId
},
});
// this.dialog.save = true;
// this.$nextTick(() => {
// this.$refs.saveDialog.open("edit").setData(row);
// });
},
//
sflog_check(row){
this.dialog.check = true;
this.$nextTick(() => {
this.$refs.checkDialog.open("edit").setData(row);
});
},
//
sflog_other(row){
this.dialog.other = true;
this.$nextTick(() => {
this.$refs.otherDialog.open("edit").setData(row);
});
},
// //
// table_show(row) {
// this.dialog.save = true;
// this.$nextTick(() => {
// this.$refs.checkDialog.open("edit").setData(row);
// });
// },
//
async table_del(row) {
this.$API.wpm.sflog.delete.req(row.id)
.then((res) => {
this.$message.success("删除成功");
return res;
})
.catch((err) => {
return err;
});
},
//
handleSaveSuccess(data, mode) {
this.$refs.table.refresh()
this.dialog.save = false;
},
handleOtherSuccess(){
this.dialog.other = false;
},
handleCheckSuccess(){
this.dialog.check = false;
},
closed() {
this.dialog.save = false;
this.$refs.table2.refresh();
},
handleDel(row) {
this.$confirm(`确定删除选中的记录吗?`, "提示", {
type: "warning",
}).then(() => {
this.$API.wpm.shift.delete.req(row.id).then((res) => {
if (res.err_msg) {
this.$message.error(res.err_msg);
} else {
// const loading = this.$loading();
// this.$refs.table2.refresh();
// loading.close();
// this.$message.success("");
}
});
})
.catch(() => {});
},
handlePrint() {
this.$PRINT('#myReport');

View File

@ -102,6 +102,19 @@
关闭
</el-button>
</template>
<div class="left-panel">
<el-button
type="primary"
@click="exportExcel()"
:loading = "exportLoading"
>导出xlsx
</el-button>
<el-button
type="primary"
@click="handlePrint"
>打印
</el-button>
</div>
<el-main class="nopadding">
<div ref="print" id="myReport" class="printContainer">
<div style="margin-right: 20px;text-align: center;font-size: 16px;font-weight: bold;margin-bottom: 20px;">
@ -109,38 +122,54 @@
<span v-if="sflogItem.team_name">{{ sflogItem.team_name }}</span>
交接班记录
</div>
<h3 style="text-align: center;display: flex;justify-content: space-around;">
<span>2023.06.21</span>
<span>白班</span>
<span>甲班</span>
</h3>
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable">
<tbody>
<tr>
<td class="numCell">日期</td>
<td class="numCell" v-if="sflogItem.end_time">{{sflogItem.end_time.slice(0,10)}}</td>
<td class="numCell">班次</td>
<td class="numCell">{{ sflogItem.shift_name }}</td>
<td class="numCell">班组</td>
<td class="numCell"><span v-if="sflogItem.team_name">{{ sflogItem.team_name }}</span></td>
</tr>
<tr>
<td class="numCell">产量t</td>
<td class="numCell">{{value1}}</td>
<td class="numCell">{{reportItem.total_production}}</td>
<td class="numCell">台时t/h</td>
<td class="numCell">{{value3}}</td>
<td class="numCell">{{reportItem.production_hour}}</td>
<td class="numCell">运转时间h</td>
<td class="numCell">{{value5}}</td>
<td class="numCell">{{reportItem.run_hour}}</td>
</tr>
<tr>
<td class="numCell">运转率%</td>
<td class="numCell">{{value1}}</td>
<td class="numCell">{{reportItem.run_rate*100}}</td>
<td class="numCell">停机时长h</td>
<td class="numCell">{{value3}}</td>
<td class="numCell">{{reportItem.shut_hour}}</td>
<td class="numCell">煤磨分布电耗KW·h/t</td>
<td class="numCell">{{value5}}</td>
<td class="numCell">{{reportItem.elec_consume_unit}}</td>
</tr>
<tr>
<td class="numCell">煤粉细度合格率%</td>
<td class="numCell">{{value1}}</td>
<td class="numCell" v-if="reportItem.煤粉_细度_rate_pass">{{reportItem.煤粉_细度_rate_pass*100}}</td>
<td class="numCell" v-else>0</td>
<td class="numCell">煤粉水分合格率%</td>
<td class="numCell">{{value5}}</td>
<td class="numCell" v-if="reportItem.煤粉_水分_rate_pass">{{reportItem.煤粉_水分_rate_pass*100}}</td>
<td class="numCell" v-else>0</td>
</tr>
<tr>
<td class="numCell">生产情况记录</td>
<td class="numCell" colspan="5">时间类别原因处置措施处置人</td>
<tr v-if="sflogexpList.length>0">
<td class="numCell" :rowspan="sflogexpList.length+1">生产情况记录</td>
<td class="numCell">时间</td>
<td class="numCell">类别</td>
<td class="numCell">原因</td>
<td class="numCell">处置措施</td>
<td class="numCell">处置人</td>
</tr>
<tr v-for="item in sflogexpList" :key="item.id">
<td class="numCell">{{ item.happen_time}}</td>
<td class="numCell">{{ item.cate}}</td>
<td class="numCell">{{ item.reason}}</td>
<td class="numCell">{{ item.measure}}</td>
<td class="numCell">{{ item.handler}}</td>
</tr>
</tbody>
</table>
@ -148,37 +177,12 @@
</el-main>
</el-drawer>
</el-container>
<save-dialog
v-if="dialog.save"
ref="saveDialog"
:deptId ="deptId"
@success="handleSaveSuccess"
@closed="dialog.save = false"
></save-dialog>
<other-dialog
v-if="dialog.other"
ref="otherDialog"
@success="handleOtherSuccess"
@closed="dialog.other = false"
></other-dialog>
<quastat-dialog
v-if="dialog.check"
ref="checkDialog"
@success="handleCheckSuccess"
@closed="dialog.save = false"
></quastat-dialog>
</template>
<script>
import saveDialog from "./../enm_rm/handover_form.vue";
import quastatDialog from "./../enm_rm/quastat_form.vue";
import otherDialog from "./../enm_rm/other_form.vue";
export default {
name: "shuinimo",
components: {
saveDialog,
otherDialog,
quastatDialog
},
name: "sflog",
data() {
return {
apiObj: this.$API.wpm.sflog.list,
@ -191,24 +195,12 @@
mgroup:'3347217651339837440',
},
deptId:'3347207316583170048',
query2: {},
dialog: {
save: false,
check: false,
other:false,
},
sflogItem:{},
selection: [],
value1:1,
value3:3,
value5:5,
modelValue:true,
showClose:true,
echartType:'line',
asynDialog:false,
options:[],
optionsShift:[],
limitedExport:false,
reportItem:{},
sflogexpList:[],
};
},
mounted(){
@ -238,7 +230,22 @@
rowClick(row) {
this.sflogId = row.id;
this.sflogItem = row;
// this.$refs.table2.queryData({post: row.id});
this.getSflogItem(row.id);
this.getSflogexp(row.id);
},
getSflogexp(id){
let that = this;
that.$API.wpm.sflogexp.list.req({page:0,sflog:id}).then(res=>{
that.sflogexpList = res;
})
},
getSflogItem(id){
let that =this;
that.$API.enm.enstat.req({type:'sflog',sflog:id,page:0}).then(res=>{
if(res.length>0){
that.reportItem = res[0];
}
})
},
//
sflog_edit(row) {
@ -252,74 +259,6 @@
deptId:this.deptId
},
});
// this.dialog.save = true;
// this.$nextTick(() => {
// this.$refs.saveDialog.open("edit").setData(row);
// });
},
//
sflog_check(row){
this.dialog.check = true;
this.$nextTick(() => {
this.$refs.checkDialog.open("edit").setData(row);
});
},
//
sflog_other(row){
this.dialog.other = true;
this.$nextTick(() => {
this.$refs.otherDialog.open("edit").setData(row);
});
},
// //
// table_show(row) {
// this.dialog.save = true;
// this.$nextTick(() => {
// this.$refs.checkDialog.open("edit").setData(row);
// });
// },
//
async table_del(row) {
this.$API.wpm.sflog.delete.req(row.id)
.then((res) => {
this.$message.success("删除成功");
return res;
})
.catch((err) => {
return err;
});
},
//
handleSaveSuccess(data, mode) {
this.$refs.table.refresh()
this.dialog.save = false;
},
handleOtherSuccess(){
this.dialog.other = false;
},
handleCheckSuccess(){
this.dialog.check = false;
},
closed() {
this.dialog.save = false;
this.$refs.table2.refresh();
},
handleDel(row) {
this.$confirm(`确定删除选中的记录吗?`, "提示", {
type: "warning",
}).then(() => {
this.$API.wpm.shift.delete.req(row.id).then((res) => {
if (res.err_msg) {
this.$message.error(res.err_msg);
} else {
// const loading = this.$loading();
// this.$refs.table2.refresh();
// loading.close();
// this.$message.success("");
}
});
})
.catch(() => {});
},
handlePrint() {
this.$PRINT('#myReport');

View File

@ -102,6 +102,19 @@
关闭
</el-button>
</template>
<div class="left-panel">
<el-button
type="primary"
@click="exportExcel()"
:loading = "exportLoading"
>导出xlsx
</el-button>
<el-button
type="primary"
@click="handlePrint"
>打印
</el-button>
</div>
<el-main class="nopadding">
<div ref="print" id="myReport" class="printContainer">
<div style="margin-right: 20px;text-align: center;font-size: 16px;font-weight: bold;margin-bottom: 20px;">
@ -109,22 +122,36 @@
<span v-if="sflogItem.team_name">{{ sflogItem.team_name }}</span>
交接班记录
</div>
<h3 style="text-align: center;display: flex;justify-content: space-around;">
<span>2023.06.21</span>
<span>白班</span>
<span>甲班</span>
</h3>
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable">
<tbody>
<tr>
<td class="numCell">产量t</td>
<td class="numCell">{{value1}}</td>
<td class="numCell">单位产品分布电耗KW·h/t</td>
<td class="numCell">{{value3}}</td>
<tr>
<td class="numCell">日期</td>
<td class="numCell" v-if="sflogItem.end_time">{{sflogItem.end_time.slice(0,10)}}</td>
<td class="numCell">班次</td>
<td class="numCell">{{ sflogItem.shift_name }}</td>
<td class="numCell">班组</td>
<td class="numCell"><span v-if="sflogItem.team_name">{{ sflogItem.team_name }}</span></td>
</tr>
<tr>
<td class="numCell">生产情况记录</td>
<td class="numCell" colspan="5">时间类别原因处置措施处置人</td>
<td class="numCell">产量t</td>
<td class="numCell">{{reportItem.total_production}}</td>
<td class="numCell">单位产品分布电耗KW·h/t</td>
<td class="numCell">{{reportItem.elec_consume_unit}}</td>
</tr>
<tr v-if="sflogexpList.length>0">
<td class="numCell" :rowspan="sflogexpList.length+1">生产情况记录</td>
<td class="numCell">时间</td>
<td class="numCell">类别</td>
<td class="numCell">原因</td>
<td class="numCell">处置措施</td>
<td class="numCell">处置人</td>
</tr>
<tr v-for="item in sflogexpList" :key="item.id">
<td class="numCell">{{ item.happen_time}}</td>
<td class="numCell">{{ item.cate}}</td>
<td class="numCell">{{ item.reason}}</td>
<td class="numCell">{{ item.measure}}</td>
<td class="numCell">{{ item.handler}}</td>
</tr>
</tbody>
</table>
@ -132,28 +159,11 @@
</el-main>
</el-drawer>
</el-container>
<save-dialog
v-if="dialog.save"
ref="saveDialog"
:deptId ="deptId"
@success="handleSaveSuccess"
@closed="dialog.save = false"
></save-dialog>
<other-dialog
v-if="dialog.other"
ref="otherDialog"
@success="handleOtherSuccess"
@closed="dialog.other = false"
></other-dialog>
</template>
<script>
import otherDialog from "./../enm_rm/other_form.vue";
import saveDialog from "./../enm_rm/handover_form.vue";
export default {
name: "listSon",
components: {
saveDialog,otherDialog
},
name: "packsflog",
data() {
return {
apiObj: this.$API.wpm.sflog.list,
@ -162,23 +172,13 @@ import saveDialog from "./../enm_rm/handover_form.vue";
mgroup:'3347217757455728640',
},
deptId:'3347207316583170048',
query2: {},
dialog: {
save: false,
other:false
},
sflogItem:{},
selection: [],
value1:1,
value3:3,
value5:5,
modelValue:true,
showClose:true,
echartType:'line',
asynDialog:false,
options:[],
optionsShift:[],
limitedExport:false,
reportItem:{},
sflogexpList:[],
};
},
mounted(){
@ -208,6 +208,23 @@ import saveDialog from "./../enm_rm/handover_form.vue";
rowClick(row) {
this.sflogId = row.id;
this.sflogItem = row;
this.getSflogItem(row.id);
this.getSflogexp(row.id);
},
getSflogexp(id){
let that = this;
that.$API.wpm.sflogexp.list.req({page:0,sflog:id}).then(res=>{
that.sflogexpList = res;
})
},
getSflogItem(id){
let that =this;
that.$API.enm.enstat.req({type:'sflog',sflog:id,page:0}).then(res=>{
if(res.length>0){
that.reportItem = res[0];
}
console.log(res[0])
})
},
//
sflog_edit(row) {
@ -221,58 +238,6 @@ import saveDialog from "./../enm_rm/handover_form.vue";
deptId:this.deptId
},
});
// this.dialog.save = true;
// this.$nextTick(() => {
// this.$refs.saveDialog.open("edit").setData(row);
// });
},
//
async table_del(row) {
this.$API.wpm.sflog.delete.req(row.id)
.then((res) => {
this.$message.success("删除成功");
return res;
})
.catch((err) => {
return err;
});
},
//
sflog_other(row){
this.dialog.other = true;
this.$nextTick(() => {
this.$refs.otherDialog.open("edit").setData(row);
});
},
//
handleSaveSuccess(data, mode) {
this.$refs.table.refresh()
this.dialog.save = false;
},
handleOtherSuccess(){
this.dialog.other = false;
},
closed() {
this.dialog.save = false;
this.$refs.table2.refresh();
},
handleDel(row) {
this.$confirm(`确定删除选中的记录吗?`, "提示", {
type: "warning",
}).then(() => {
this.$API.wpm.shift.delete.req(row.id).then((res) => {
if (res.err_msg) {
this.$message.error(res.err_msg);
} else {
// const loading = this.$loading();
// this.$refs.table2.refresh();
// loading.close();
// this.$message.success("");
}
});
})
.catch(() => {});
},
handlePrint() {
this.$PRINT('#myReport');

View File

@ -1,97 +1,97 @@
<template>
<el-container>
<el-header>
<div class="left-panel">
<div style="margin-right: 20px">交接班日志</div>
<el-date-picker
v-model="query.start_time__gte"
type="date"
value-format="YYYY-MM-DD HH:mm:ss"
format="YYYY-MM-DD"
placeholder="开始时间"
style=" width: 120px"
/>
<el-date-picker
v-model="query.end_time__lt"
type="date"
value-format="YYYY-MM-DD HH:mm:ss"
format="YYYY-MM-DD"
placeholder="结束时间"
style="margin-left: 2px; width: 120px"
/>
<el-select
v-model="query.shift"
placeholder="班次"
clearable
style="margin-left: 2px; width: 120px"
>
<el-option
v-for="item in optionsShift"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
<el-select
v-model="query.team"
placeholder="班组"
clearable
style="margin-left: 2px; width: 120px"
>
<el-option
v-for="item in options"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
<el-button
type="primary"
icon="el-icon-search"
@click="handleQuery"
></el-button>
</div>
</el-header>
<el-main class="nopadding">
<scTable
ref="table"
:apiObj="apiObj"
row-key="id"
stripe
:params="query"
highlightCurrentRow
@row-click="rowClick"
>
<el-table-column type="index" width="50"/>
<el-table-column label="开始时间" prop="start_time">
<template #default="scope">
<span>{{ scope.row.start_time.slice(0,16)}}</span>
</template>
</el-table-column>
<el-table-column label="结束时间" prop="end_time">
<template #default="scope">
<span>{{ scope.row.end_time.slice(0,16)}}</span>
</template>
</el-table-column>
<el-table-column label="班组名称" prop="team_name"></el-table-column>
<el-table-column label="当前班次" prop="shift_name"></el-table-column>
<el-table-column label="班长" prop="leader_name"></el-table-column>
<el-table-column label="检验时间">
<template #default="scope">
<span v-if="scope.row.last_test_time">{{ scope.row.last_test_time.slice(0,16)}}</span>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="140">
<template #default="scope">
<el-button link size="small" @click="sflog_edit(scope.row)" type="primary">编辑</el-button>
<!-- <el-button link size="small" @click="sflog_check(scope.row)" type="primary">质量检验</el-button> -->
<!-- <el-button link size="small" @click="sflog_other(scope.row)" type="primary">其他能源</el-button> -->
<el-divider direction="vertical"></el-divider>
<el-button link size="small" @click="sflog_export(scope.row)" type="success">报表</el-button>
</template>
</el-table-column>
</scTable>
</el-main>
<div class="left-panel">
<div style="margin-right: 20px">交接班日志</div>
<el-date-picker
v-model="query.start_time__gte"
type="date"
value-format="YYYY-MM-DD HH:mm:ss"
format="YYYY-MM-DD"
placeholder="开始时间"
style=" width: 120px"
/>
<el-date-picker
v-model="query.end_time__lt"
type="date"
value-format="YYYY-MM-DD HH:mm:ss"
format="YYYY-MM-DD"
placeholder="结束时间"
style="margin-left: 2px; width: 120px"
/>
<el-select
v-model="query.shift"
placeholder="班次"
clearable
style="margin-left: 2px; width: 120px"
>
<el-option
v-for="item in optionsShift"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
<el-select
v-model="query.team"
placeholder="班组"
clearable
style="margin-left: 2px; width: 120px"
>
<el-option
v-for="item in options"
:key="item.id"
:label="item.name"
:value="item.id"
></el-option>
</el-select>
<el-button
type="primary"
icon="el-icon-search"
@click="handleQuery"
></el-button>
</div>
</el-header>
<el-main class="nopadding">
<scTable
ref="table"
:apiObj="apiObj"
row-key="id"
stripe
:params="query"
highlightCurrentRow
@row-click="rowClick"
>
<el-table-column type="index" width="50"/>
<el-table-column label="开始时间" prop="start_time">
<template #default="scope">
<span>{{ scope.row.start_time.slice(0,16)}}</span>
</template>
</el-table-column>
<el-table-column label="结束时间" prop="end_time">
<template #default="scope">
<span>{{ scope.row.end_time.slice(0,16)}}</span>
</template>
</el-table-column>
<el-table-column label="班组名称" prop="team_name"></el-table-column>
<el-table-column label="当前班次" prop="shift_name"></el-table-column>
<el-table-column label="班长" prop="leader_name"></el-table-column>
<el-table-column label="检验时间">
<template #default="scope">
<span v-if="scope.row.last_test_time">{{ scope.row.last_test_time.slice(0,16)}}</span>
</template>
</el-table-column>
<el-table-column label="操作" fixed="right" align="center" width="140">
<template #default="scope">
<el-button link size="small" @click="sflog_edit(scope.row)" type="primary">编辑</el-button>
<!-- <el-button link size="small" @click="sflog_check(scope.row)" type="primary">质量检验</el-button> -->
<!-- <el-button link size="small" @click="sflog_other(scope.row)" type="primary">其他能源</el-button> -->
<el-divider direction="vertical"></el-divider>
<el-button link size="small" @click="sflog_export(scope.row)" type="success">报表</el-button>
</template>
</el-table-column>
</scTable>
</el-main>
<el-drawer v-model="limitedExport" size="60%" :show-close="false">
<template #header="{ close, titleId, titleClass }">
<h4 :id="titleId" :class="titleClass">交接班日志</h4>
@ -100,6 +100,19 @@
关闭
</el-button>
</template>
<div class="left-panel">
<el-button
type="primary"
@click="exportExcel()"
:loading = "exportLoading"
>导出xlsx
</el-button>
<el-button
type="primary"
@click="handlePrint"
>打印
</el-button>
</div>
<el-main class="nopadding">
<div ref="print" id="myReport" class="printContainer">
<div style="margin-right: 20px;text-align: center;font-size: 16px;font-weight: bold;margin-bottom: 20px;">
@ -107,56 +120,77 @@
<span v-if="sflogItem.team_name">{{ sflogItem.team_name }}</span>
交接班记录
</div>
<h3 style="text-align: center;display: flex;justify-content: space-around;">
<span>2023.06.21</span>
<span>白班</span>
<span>甲班</span>
</h3>
<table border="1" width="1000" cellspacing="0" :key="timeStamp" id="myTable">
<tbody>
<tr>
<td class="numCell">日期</td>
<td class="numCell" v-if="sflogItem.end_time">{{sflogItem.end_time.slice(0,10)}}</td>
<td class="numCell">班次</td>
<td class="numCell">{{ sflogItem.shift_name }}</td>
<td class="numCell">班组</td>
<td class="numCell"><span v-if="sflogItem.team_name">{{ sflogItem.team_name }}</span></td>
</tr>
<tr>
<td class="numCell">产量t</td>
<td class="numCell">{{value1}}</td>
<td class="numCell">{{reportItem.total_production}}</td>
<td class="numCell">台时t/h</td>
<td class="numCell">{{value3}}</td>
<td class="numCell">{{reportItem.production_hour}}</td>
<td class="numCell">运转时间h</td>
<td class="numCell">{{value5}}</td>
<td class="numCell">{{reportItem.run_hour}}</td>
</tr>
<tr>
<td class="numCell">运转率%</td>
<td class="numCell">{{value1}}</td>
<td class="numCell">{{reportItem.run_rate*100}}</td>
<td class="numCell">停机时长h</td>
<td class="numCell">{{value3}}</td>
<td class="numCell">{{reportItem.shut_hour}}</td>
<td class="numCell">当期单位产品电耗kW·h/t</td>
<td class="numCell">{{value5}}</td>
<td class="numCell">{{reportItem.elec_consume_unit}}</td>
</tr>
<tr>
<td class="numCell">辅料细度合格率%</td>
<td class="numCell">{{value1}}</td>
<td class="numCell" v-if="reportItem.辅料_细度_rate_pass">{{reportItem.辅料_细度_rate_pass*100}}</td>
<td class="numCell" v-else>0</td>
<td class="numCell">辅料Fe₂O₃合格率%</td>
<td class="numCell">{{value3}}</td>
<td class="numCell" v-if="reportItem.辅料_Fe2O3_rate_pass">{{reportItem.辅料_Fe2O3_rate_pass*100}}</td>
<td class="numCell" v-else>0</td>
<td class="numCell">辅料水分合格率%</td>
<td class="numCell">{{value5}}</td>
<td class="numCell" v-if="reportItem.辅料_水分_rate_pass">{{reportItem.辅料_水分_rate_pass*100}}</td>
<td class="numCell" v-else>0</td>
</tr>
<tr>
<td class="numCell">干混生料CaO合格率%</td>
<td class="numCell">{{value1}}</td>
<td class="numCell" v-if="reportItem.干混生料_CaO_rate_pass">{{reportItem.干混生料_CaO_rate_pass*100}}</td>
<td class="numCell" v-else>0</td>
<td class="numCell">干混生料Fe₂O₃合格率%</td>
<td class="numCell">{{value3}}</td>
<td class="numCell" v-if="reportItem.干混生料_Fe2O3_rate_pass">{{reportItem.干混生料_Fe2O3_rate_pass*100}}</td>
<td class="numCell" v-else>0</td>
<td class="numCell">干混生料细度合格率%</td>
<td class="numCell">{{value5}}</td>
<td class="numCell" v-if="reportItem.干混生料_细度_rate_pass">{{reportItem.干混生料_细度_rate_pass*100}}</td>
<td class="numCell" v-else>0</td>
</tr>
<tr>
<td class="numCell">干混生料水分合格率%</td>
<td class="numCell">{{value1}}</td>
<td class="numCell" v-if="reportItem.干混生料_水分_rate_pass">{{reportItem.干混生料_水分_rate_pass*100}}</td>
<td class="numCell" v-else>0</td>
<td class="numCell">单位成本/</td>
<td class="numCell">{{value3}}</td>
<td class="numCell">{{reportItem.production_cost_unit}}</td>
<td class="numCell"></td>
<td class="numCell"></td>
</tr>
<tr>
<td class="numCell">生产情况记录</td>
<td class="numCell" colspan="5">时间类别原因处置措施处置人</td>
<tr v-if="sflogexpList.length>0">
<td class="numCell" :rowspan="sflogexpList.length+1">生产情况记录</td>
<td class="numCell">时间</td>
<td class="numCell">类别</td>
<td class="numCell">原因</td>
<td class="numCell">处置措施</td>
<td class="numCell">处置人</td>
</tr>
<tr v-for="item in sflogexpList" :key="item.id">
<td class="numCell">{{ item.happen_time}}</td>
<td class="numCell">{{ item.cate}}</td>
<td class="numCell">{{ item.reason}}</td>
<td class="numCell">{{ item.measure}}</td>
<td class="numCell">{{ item.handler}}</td>
</tr>
</tbody>
</table>
@ -164,7 +198,7 @@
</el-main>
</el-drawer>
</el-container>
<save-dialog
<!-- <save-dialog
v-if="dialog.save"
ref="saveDialog"
:deptId ="deptId"
@ -182,14 +216,14 @@
ref="checkDialog"
@success="handleCheckSuccess"
@closed="dialog.save = false"
></quastat-dialog>
></quastat-dialog> -->
</template>
<script>
import saveDialog from "./handover_form.vue";
import quastatDialog from "./quastat_form.vue";
import otherDialog from "./other_form.vue";
export default {
name: "listSon",
name: "sflog",
components: {
saveDialog,
otherDialog,
@ -203,17 +237,9 @@ import otherDialog from "./other_form.vue";
mgroup:'3346520558031773696',
},
deptId :"3345780809943797760",
query2: {},
dialog: {
save: false,
check: false,
other:false,
},
sflogItem:{},
selection: [],
value1:1,
value3:3,
value5:5,
modelValue:true,
showClose:true,
echartType:'line',
@ -222,10 +248,12 @@ import otherDialog from "./other_form.vue";
optionsShift:[],
teamOptions:[],
limitedExport:false,
reportItem:{},
sflogexpList:[],
};
},
mounted(){
// this.getTeam();
this.getTeam();
this.getShfit();
},
methods: {
@ -251,7 +279,23 @@ import otherDialog from "./other_form.vue";
rowClick(row) {
this.sflogId = row.id;
this.sflogItem = row;
// this.$refs.table2.queryData({post: row.id});
this.getSflogItem(row.id);
this.getSflogexp(row.id);
},
getSflogexp(id){
let that = this;
that.$API.wpm.sflogexp.list.req({page:0,sflog:id}).then(res=>{
that.sflogexpList = res;
})
},
getSflogItem(id){
let that =this;
that.$API.enm.enstat.req({type:'sflog',sflog:id,page:0}).then(res=>{
if(res.length>0){
that.reportItem = res[0];
}
console.log(res[0])
})
},
//
sflog_edit(row) {

View File

@ -63,7 +63,6 @@
@row-click="rowClick"
>
<el-table-column type="index" width="50"/>
<!-- <el-table-column label="关联工段" prop="mgroup_name"></el-table-column> -->
<el-table-column label="开始时间" prop="start_time">
<template #default="scope">
<span>{{ scope.row.start_time.slice(0,16)}}</span>
@ -77,7 +76,6 @@
<el-table-column label="班组名称" prop="team_name"></el-table-column>
<el-table-column label="当前班次" prop="shift_name"></el-table-column>
<el-table-column label="班长" prop="leader_name"></el-table-column>
<el-table-column label="检验时间">
<template #default="scope">
<span v-if="scope.row.last_test_time">{{ scope.row.last_test_time.slice(0,16)}}</span>
@ -86,8 +84,6 @@
<el-table-column label="操作" fixed="right" align="center" width="150">
<template #default="scope">
<el-button link size="small" @click="sflog_edit(scope.row)" type="primary">编辑</el-button>
<!-- <el-button link size="small" @click="sflog_check(scope.row)" type="primary">质量检验</el-button> -->
<!-- <el-button link size="small" @click="sflog_other(scope.row)" type="primary">其他能源</el-button> -->
<el-divider direction="vertical"></el-divider>
<el-button link size="small" @click="sflog_export(scope.row)" type="success">报表</el-button>
</template>
@ -103,18 +99,18 @@
</el-button>
</template>
<div class="left-panel">
<el-button
type="primary"
@click="exportExcel()"
:loading = "exportLoading"
>导出xlsx
</el-button>
<el-button
type="primary"
@click="handlePrint"
>打印
</el-button>
</div>
<el-button
type="primary"
@click="exportExcel()"
:loading = "exportLoading"
>导出xlsx
</el-button>
<el-button
type="primary"
@click="handlePrint"
>打印
</el-button>
</div>
<el-main class="nopadding">
<div ref="print" id="myReport" class="printContainer">
<div style="margin-right: 20px;text-align: center;font-size: 16px;font-weight: bold;margin-bottom: 20px;">
@ -140,9 +136,20 @@
<td class="numCell">单位成本/</td>
<td class="numCell">{{reportItem.production_cost_unit}}</td>
</tr>
<tr>
<td class="numCell">生产情况记录</td>
<td class="numCell" colspan="5">时间类别原因处置措施处置人</td>
<tr v-if="sflogexpList.length>0">
<td class="numCell" :rowspan="sflogexpList.length+1">生产情况记录</td>
<td class="numCell">时间</td>
<td class="numCell">类别</td>
<td class="numCell">原因</td>
<td class="numCell">处置措施</td>
<td class="numCell">处置人</td>
</tr>
<tr v-for="item in sflogexpList" :key="item.id">
<td class="numCell">{{ item.happen_time}}</td>
<td class="numCell">{{ item.cate}}</td>
<td class="numCell">{{ item.reason}}</td>
<td class="numCell">{{ item.measure}}</td>
<td class="numCell">{{ item.handler}}</td>
</tr>
</tbody>
</table>
@ -150,28 +157,10 @@
</el-main>
</el-drawer>
</el-container>
<save-dialog
v-if="dialog.save"
ref="saveDialog"
:deptId ="deptId"
@success="handleSaveSuccess"
@closed="dialog.save = false"
></save-dialog>
<other-dialog
v-if="dialog.other"
ref="otherDialog"
@success="handleOtherSuccess"
@closed="dialog.other = false"
></other-dialog>
</template>
</template>
<script>
import otherDialog from "./../enm_rm/other_form.vue";
import saveDialog from "./../enm_rm/handover_form.vue";
export default {
name: "listSon",
components: {
saveDialog,otherDialog
},
name: "sflog",
data() {
return {
apiObj: this.$API.wpm.sflog.list,
@ -180,24 +169,12 @@
mgroup:'3346491835287007232',
},
deptId:'3345780809943797760',
query2: {},
dialog: {
save: false,
other:false
},
sflogItem:{},
selection: [],
value1:1,
value3:3,
value5:5,
modelValue:true,
showClose:true,
echartType:'line',
asynDialog:false,
options:[],
optionsShift:[],
limitedExport:false,
reportItem:{},
sflogexpList:[],
};
},
mounted(){
@ -228,16 +205,17 @@
this.sflogId = row.id;
this.sflogItem = row;
this.getSflogItem(row.id);
console.log(row)
this.getSflogexp(row.id);
},
getSflogexp(id){
let that = this;
that.$API.wpm.sflogexp.list.req({page:0,sflog:id}).then(res=>{
that.sflogexpList = res;
})
},
getSflogItem(id){
let that =this;
let obj = {};
obj.type = 'sflog';
obj.sflog = id;
that.$API.enm.enstat.req({type:'sflog',sflog:id,page:0}).then(res=>{
// debugger;
if(res.length>0){
that.reportItem = res[0];
}
@ -256,57 +234,6 @@
deptId:this.deptId
},
});
// this.dialog.save = true;
// this.$nextTick(() => {
// 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) {
this.$API.wpm.sflog.delete.req(row.id)
.then((res) => {
this.$message.success("删除成功");
return res;
})
.catch((err) => {
return err;
});
},
//
handleSaveSuccess(data, mode) {
this.$refs.table.refresh()
this.dialog.save = false;
},
handleOtherSuccess(){
this.dialog.other = false;
},
closed() {
this.dialog.save = false;
this.$refs.table2.refresh();
},
handleDel(row) {
this.$confirm(`确定删除选中的记录吗?`, "提示", {
type: "warning",
}).then(() => {
this.$API.wpm.shift.delete.req(row.id).then((res) => {
if (res.err_msg) {
this.$message.error(res.err_msg);
} else {
// const loading = this.$loading();
// this.$refs.table2.refresh();
// loading.close();
// this.$message.success("");
}
});
})
.catch(() => {});
},
handlePrint() {
this.$PRINT('#myReport');