Compare commits

...

18 Commits

Author SHA1 Message Date
ab5867c4fd 修改 2024-04-24 17:05:19 +08:00
ec0c09a674 Merge pull request 'projects/mesxc-zhp' (#358) from projects/mesxc-zhp into projects/mesxc-test
Reviewed-on: #358
2024-04-24 14:54:40 +08:00
‘937886381’
90e9b179eb Merge branch 'projects/mesxc-test' into projects/mesxc-zhp 2024-04-24 14:52:32 +08:00
‘937886381’
8e2b332c7b 修改bug 2024-04-24 14:52:01 +08:00
f37a12d2e1 Merge pull request '修改bug' (#357) from projects/mesxc-zhp into projects/mesxc-test
Reviewed-on: #357
2024-04-24 14:38:13 +08:00
cb19872012 Merge pull request 'projects/mesxc-zhp' (#356) from projects/mesxc-zhp into projects/mesxc-test
Reviewed-on: #356
2024-04-24 14:37:05 +08:00
‘937886381’
8ba79185d4 修改bug 2024-04-24 14:36:45 +08:00
‘937886381’
104cda5a41 Merge branch 'projects/mesxc-test' into projects/mesxc-zhp 2024-04-24 14:34:08 +08:00
‘937886381’
151c5708c4 修改bug 2024-04-24 14:33:46 +08:00
837735b7e8 Merge pull request 'projects/mesxc-zhp' (#355) from projects/mesxc-zhp into projects/mesxc-test
Reviewed-on: #355
2024-04-24 14:25:03 +08:00
‘937886381’
e00a08385f Merge branch 'projects/mesxc-test' into projects/mesxc-zhp 2024-04-24 14:23:47 +08:00
‘937886381’
a8c3d2c585 修改bug 2024-04-24 14:23:13 +08:00
eb097e77bd Merge pull request 'projects/mesxc-zhp' (#354) from projects/mesxc-zhp into projects/mesxc-test
Reviewed-on: #354
2024-04-24 13:50:44 +08:00
‘937886381’
30eecb8bd1 Merge branch 'projects/mesxc-test' into projects/mesxc-zhp 2024-04-24 13:49:44 +08:00
‘937886381’
f4a6229170 修改bug 2024-04-24 13:49:23 +08:00
ab593bff20 Merge pull request 'projects/mesxc-zjl' (#353) from projects/mesxc-zjl into projects/mesxc-test
Reviewed-on: #353
2024-04-24 13:32:26 +08:00
‘937886381’
22f3c87f02 Merge branch 'projects/mesxc-test' into projects/mesxc-zhp 2024-04-23 16:47:49 +08:00
‘937886381’
1f54c9179d 修改bug 2024-04-23 16:47:27 +08:00
9 changed files with 119 additions and 97 deletions

View File

@ -13,7 +13,8 @@ VUE_APP_TITLE = MES系统
# 芋道管理系统/开发环境 # 芋道管理系统/开发环境
VUE_APP_BASE_API = 'http://192.168.0.33:48082' VUE_APP_BASE_API = 'http://192.168.0.33:48082'
# VUE_APP_BASE_API = 'http://192.168.4.176:48082' # VUE_APP_BASE_API = 'http://xcac.mes.picaiba.com/'
# VUE_APP_BASE_API = 'http://10.70.2.2:8080'
# 积木报表指向地址 # 积木报表指向地址
VUE_APP_JIMU_API = 'http://192.168.1.101:48082' VUE_APP_JIMU_API = 'http://192.168.1.101:48082'

View File

@ -2,7 +2,7 @@
* @Author: zwq * @Author: zwq
* @Date: 2021-07-19 15:18:30 * @Date: 2021-07-19 15:18:30
* @LastEditors: zhp * @LastEditors: zhp
* @LastEditTime: 2024-04-22 12:15:49 * @LastEditTime: 2024-04-24 14:48:00
* @Description: * @Description:
--> -->
<template> <template>
@ -37,7 +37,7 @@
</el-col> </el-col>
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="8" height="100%"> <el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="8" height="100%">
<base-container :show-time="true" :height="318" :size="'small'" :title="'工单监控'" :title-icon="'eqMonitoring'"> <base-container :show-time="false" :height="318" :size="'small'" :title="'工单监控'" :title-icon="'eqMonitoring'">
<div class="order" style="width: 100%; overflow: hidden scroll; height: 350px"> <div class="order" style="width: 100%; overflow: hidden scroll; height: 350px">
<el-row v-for="op in orderList" :key="op.id" style="margin-bottom: .5em;overflow: hidden;"> <el-row v-for="op in orderList" :key="op.id" style="margin-bottom: .5em;overflow: hidden;">
<!-- <el-col :span="12"> --> <!-- <el-col :span="12"> -->
@ -749,7 +749,7 @@ export default {
item.code || '' item.code || ''
}</span>`, }</span>`,
`<span style="color:rgba(255,255,255,0.5)"><div style="${item.status == '正常' ? 'box-shadow: 0px 0px 2px 1px #2760FF;width:6px;height:6px;border-radius: 50%;background-color: #2760FF;float:left;margin:10px 10px 0 0 ' : 'box-shadow: 0px 0px 2px 1px #FFBD02;width:6px;height:6px;border-radius: 50%; background-color: #FFBD02;float:left;margin:10px 10px 0 0 '}"></div> ${item.status || ''}</span>`, `<span style="color:rgba(255,255,255,0.5)"><div style="${item.status == '正常' ? 'box-shadow: 0px 0px 2px 1px #2760FF;width:6px;height:6px;border-radius: 50%;background-color: #2760FF;float:left;margin:10px 10px 0 0 ' : 'box-shadow: 0px 0px 2px 1px #FFBD02;width:6px;height:6px;border-radius: 50%; background-color: #FFBD02;float:left;margin:10px 10px 0 0 '}"></div> ${item.status || ''}</span>`,
`<span style="color:rgba(255,255,255,0.5)"><div style="${item.error == 'false' ? 'box-shadow: 0px 0px 2px 1px #2760FF;width:6px;height:6px;border-radius: 50%;background-color: #2760FF;float:left;margin:10px 10px 0 0 ' : 'box-shadow: 0px 0px 2px 1px red;width:6px;height:6px;border-radius: 50%; background-color: red;float:left;margin:10px 10px 0 0 '}"></div> ${item.error == true ?'是' :'否' || ''}</span>`, `<span style="color:rgba(255,255,255,0.5)"><div style="${item.error == false ? 'box-shadow: 0px 0px 2px 1px #2760FF;width:6px;height:6px;border-radius: 50%;background-color: #2760FF;float:left;margin:10px 10px 0 0 ' : 'box-shadow: 0px 0px 2px 1px red;width:6px;height:6px;border-radius: 50%; background-color: red;float:left;margin:10px 10px 0 0 '}"></div> ${item.error == true ?'是' :'否' || ''}</span>`,
]); ]);
this.eqConfig.data = eqArr; this.eqConfig.data = eqArr;
// this.$nextTick(() => { // this.$nextTick(() => {

View File

@ -85,7 +85,7 @@ export default {
color: this.colors, color: this.colors,
title: { title: {
text: num, text: num,
subtext: '总数', subtext: '总数/个',
top: '32%', top: '32%',
left: '49%', left: '49%',
textAlign: 'center', textAlign: 'center',

View File

@ -66,8 +66,10 @@ export default {
`<span title=${item.name || ''}>${item.name || ''}</span>`, `<span title=${item.name || ''}>${item.name || ''}</span>`,
`<span title=${item.code || ''}>${item.code || ''}</span>`, `<span title=${item.code || ''}>${item.code || ''}</span>`,
`<span><div style="${ `<span><div style="${
item.status == '正常' item.status == '运行'
? 'box-shadow: 0px 0px 2px 1px #2760FF;width:6px;height:6px;border-radius: 50%;background-color: #2760FF;float:left;margin:13px 10px 0 0 ' ? 'box-shadow: 0px 0px 2px 1px #2760FF;width:6px;height:6px;border-radius: 50%;background-color: #2760FF;float:left;margin:13px 10px 0 0 '
: item.status == '故障'
? 'box-shadow: 0px 0px 2px 1px red;width:6px;height:6px;border-radius: 50%; background-color: red;float:left;margin:13px 10px 0 0 '
: 'box-shadow: 0px 0px 2px 1px #FFBD02;width:6px;height:6px;border-radius: 50%; background-color: #FFBD02;float:left;margin:13px 10px 0 0 ' : 'box-shadow: 0px 0px 2px 1px #FFBD02;width:6px;height:6px;border-radius: 50%; background-color: #FFBD02;float:left;margin:13px 10px 0 0 '
}"></div> ${item.status || ''}</span>`, }"></div> ${item.status || ''}</span>`,
`<span"><div style="${ `<span"><div style="${

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-04-18 14:08:46 * @Date: 2024-04-18 14:08:46
* @LastEditTime: 2024-04-23 16:18:27 * @LastEditTime: 2024-04-24 13:52:45
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -25,18 +25,20 @@
</el-table> --> </el-table> -->
<el-table class="baseTable" :span-method="objectSpanMethod" :data="tableData" style="width: 100%"> <el-table class="baseTable" :span-method="objectSpanMethod" :data="tableData" style="width: 100%">
<el-table-column label="原料样式" align="right" width="150"> <el-table-column align="center" prop="" label="配料日报" width="120">
<el-table-column prop="className" label="时间" width="120"> <el-table-column label="原料样式" align="right" width="150">
<el-table-column prop="className" label="时间" width="120">
</el-table-column>
</el-table-column> </el-table-column>
</el-table-column> <el-table-column align="center" prop="putType" label="" width="180">
<el-table-column prop="putType" label="" width="180"> </el-table-column>
</el-table-column> <!-- <el-table-column prop label="参考标准及评价方法">
<!-- <el-table-column prop label="参考标准及评价方法">
<el-table-column prop="activityName"></el-table-column> <el-table-column prop="activityName"></el-table-column>
<el-table-column prop="message"></el-table-column> <el-table-column prop="message"></el-table-column>
</el-table-column> --> </el-table-column> -->
<el-table-column style="text-align: center;" v-for="(item,index) in codeList " :prop="item" :label="item"> <el-table-column align="center" style="text-align: center;" v-for="(item,index) in codeList " :prop="item"
<!-- <template slot-scope="scope"> :label="item">
<!-- <template slot-scope="scope">
<el-col :span="12"> <el-col :span="12">
{{ codeList[index] }} {{ codeList[index] }}
</el-col> </el-col>
@ -49,6 +51,7 @@
</el-col> </el-col>
</el-row> </el-row>
</template> --> </template> -->
</el-table-column>
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- <pagination :limit.sync="listQuery.pageSize" :page.sync="listQuery.pageNo" :total="listQuery.total" <!-- <pagination :limit.sync="listQuery.pageSize" :page.sync="listQuery.pageNo" :total="listQuery.total"
@ -145,7 +148,7 @@ export default {
endPlaceholder: '结束时间', endPlaceholder: '结束时间',
param: 'checkTime', param: 'checkTime',
defaultSelect: [Date.now() - 24 * 60 * 60 - 1000, Date.now()], defaultSelect: [Date.now() - 24 * 60 * 60 - 1000, Date.now()],
width: 250 width: 350
}, },
{ {
type:'button', type:'button',
@ -157,7 +160,7 @@ export default {
type:'button', type:'button',
btnName: '导出', btnName: '导出',
name: 'export', name: 'export',
color: 'success', color: 'primary',
plain: true plain: true
}, },
], ],
@ -212,7 +215,7 @@ export default {
} }
} }
if (columnIndex === 1) { if (columnIndex === 1) {
if (rowIndex === 1 || rowIndex === 3 || rowIndex === 5 || rowIndex === 7 || rowIndex === 9 || rowIndex === 11) { if (rowIndex %2 == 1) {
return { return {
rowspan: 1, rowspan: 1,
colspan: 2 colspan: 2
@ -220,7 +223,7 @@ export default {
} }
} }
if (columnIndex === 4 || columnIndex === 5 || columnIndex === 6 || columnIndex === 7 || columnIndex === 8 || columnIndex === 9 || columnIndex === 10 || columnIndex === 11 || columnIndex === 12 || columnIndex === 13) { if (columnIndex === 4 || columnIndex === 5 || columnIndex === 6 || columnIndex === 7 || columnIndex === 8 || columnIndex === 9 || columnIndex === 10 || columnIndex === 11 || columnIndex === 12 || columnIndex === 13) {
if (rowIndex === 0 || rowIndex === 2 || rowIndex === 4 || rowIndex === 6 || rowIndex === 8 || rowIndex === 10) { if (rowIndex % 2 == 0) {
return { return {
rowspan: 2, rowspan: 2,
colspan: 1 colspan: 1
@ -252,7 +255,7 @@ export default {
// Blob // Blob
new Blob([wbout], { type: "application/octet-stream" }), new Blob([wbout], { type: "application/octet-stream" }),
// //
"原片各线堆垛表.xlsx" "切割堆垛日报表.xlsx"
); );
} catch (e) { } catch (e) {
if (typeof console !== "undefined") console.log(e, wbout); if (typeof console !== "undefined") console.log(e, wbout);
@ -558,11 +561,13 @@ export default {
background: none; background: none;
} }
::v-deep.el-table thead.is-group tr:first-of-type th:first-of-type { /* ::v-deep.el-table thead.is-group tr:first-of-type th:first-of-type {
border-bottom: none;
} */
::v-deep.el-table thead.is-group tr:nth-child(2) th:nth-child(1) {
border-bottom: none; border-bottom: none;
} }
::v-deep.el-table thead.is-group tr:nth-child(2) th:first-of-type:before {
::v-deep.el-table thead.is-group tr:first-of-type th:first-of-type:before {
content: ''; content: '';
position: absolute; position: absolute;
width: 1px; width: 1px;
@ -578,7 +583,7 @@ export default {
transform-origin: top; transform-origin: top;
} }
::v-deep.el-table thead.is-group tr:last-of-type th:first-of-type:before { ::v-deep.el-table thead.is-group tr:nth-child(3) th:first-of-type:before {
content: ''; content: '';
position: absolute; position: absolute;
width: 1px; width: 1px;

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-04-18 10:01:33 * @Date: 2024-04-18 10:01:33
* @LastEditTime: 2024-04-23 15:15:22 * @LastEditTime: 2024-04-24 09:34:36
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -41,6 +41,7 @@ import {
} from '@/api/report/qcReport'; } from '@/api/report/qcReport';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin'; import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
import FileSaver from 'file-saver' import FileSaver from 'file-saver'
import { parseTime } from '../../../core/mixins/code-filter';
// import { getList, } from "@/api/base/qualityScrapType"; // import { getList, } from "@/api/base/qualityScrapType";
const tableProps = [ const tableProps = [
// { // {
@ -70,7 +71,7 @@ const tableProps = [
}, },
{ {
prop: 'thickness', prop: 'thickness',
label: '厚度' label: '厚度mm'
}, },
{ {
prop: 'glassCode', prop: 'glassCode',
@ -79,7 +80,9 @@ const tableProps = [
{ {
prop: 'stackingType', prop: 'stackingType',
label: '堆垛方式', label: '堆垛方式',
filter: (val) => val == 1 ? '集装架' : '堵头箱', // filter: (val) =>
// val != null ? ['', ''][val] : '',
// filter: ((val) => { val == 1 ? '' : '' }),
}, },
{ {
prop: 'pieces', prop: 'pieces',
@ -95,16 +98,16 @@ const tableProps = [
}, },
{ {
prop: 'dusting', prop: 'dusting',
label: '堆垛情况', label: '喷粉情况',
}, },
{ {
prop: 'palletNumber', prop: 'palletNumber',
label: '堆垛时间',
},
{
prop: 'endTime',
label: '集装架号', label: '集装架号',
}, },
{
prop: 'remark',
label: '备注',
}
] ]
} }
]; ];
@ -318,7 +321,23 @@ export default {
// // console.log(); // // console.log();
// // } // // }
// }) // })
this.tableData = response.data this.tableData = response.data.map((ele) => {
return {
lineName: ele.lineName,
className: ele.className,
groupName: ele.groupName,
size: ele.size,
thickness: ele.thickness,
glassCode: ele.glassCode,
stackingType: ele.stackingType == 1 ? '集装架' : '堵头箱',
pieces: ele.pieces,
originCode: ele.originCode,
endTime: parseTime(ele.endTime),
dusting: ele.dusting,
palletNumber: ele.palletNumber,
remark:ele.remark
}
})
// let obj = {} // let obj = {}
// response.data.reduce((prev, curr) => { // response.data.reduce((prev, curr) => {
// console.log(prev, curr) // console.log(prev, curr)
@ -405,12 +424,12 @@ export default {
}, },
}; };
</script> </script>
<style> <style scoped>
.baseTable .el-table__body tr.current-row>td.el-table__cell { ::v-deep.baseTable .el-table__body tr.current-row>td.el-table__cell {
background-color: #EAF1FC; background-color: #EAF1FC;
} }
.baseTable .el-table .el-table__cell { ::v-deep .baseTable .el-table .el-table__cell {
padding: 0; padding: 0;
height: 35px; height: 35px;
} }

View File

@ -1,14 +1,14 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-04-18 14:08:46 * @Date: 2024-04-18 14:08:46
* @LastEditTime: 2024-04-23 15:08:44 * @LastEditTime: 2024-04-24 14:41:01
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
<template> <template>
<div class="app-container"> <div class="app-container">
<el-form :model="listQuery" :inline="true" ref="dataForm" class="blueTip"> <el-form :model="listQuery" :inline="true" ref="dataForm" class="blueTip">
<el-form-item label="" prop="startTime"> <el-form-item label="时间" prop="startTime">
<el-date-picker v-model="listQuery.startTime" value-format="timestamp" type="date" placeholder="选择日期"> <el-date-picker v-model="listQuery.startTime" value-format="timestamp" type="date" placeholder="选择日期">
</el-date-picker> </el-date-picker>
</el-form-item> </el-form-item>
@ -61,7 +61,12 @@
</el-table-column> </el-table-column>
<div slot="append" v-if="this.tableData.length != 0" style="text-align: center"> <div slot="append" v-if="this.tableData.length != 0" style="text-align: center">
<!--在此处添加你想要插入在表格最后一行的内容--> <!--在此处添加你想要插入在表格最后一行的内容-->
<el-col :span="8">
人工监测人员
</el-col>
<el-col :span="8">
<!-- {{ }} -->
</el-col>
<el-col :span="8"> <el-col :span="8">
合计 合计
</el-col> </el-col>
@ -205,7 +210,7 @@ export default {
prop: 'num11' prop: 'num11'
}, },
{ {
label: '合计', label: '不良合计',
prop: 'sum' prop: 'sum'
} }
], ],
@ -234,7 +239,7 @@ export default {
type: 'button', type: 'button',
btnName: '导出', btnName: '导出',
name: 'export', name: 'export',
color: 'success', color: 'primary',
plain: true plain: true
}, },
], ],
@ -305,8 +310,9 @@ export default {
return y + '-' + m + '-' + d + ' ' + h + ':' + minute + ':' + second; return y + '-' + m + '-' + d + ' ' + h + ':' + minute + ':' + second;
}, },
handleGetClass(e) { handleGetClass(e) {
let str = this.listQuery.startTime
this.listQuery.startTime = new Date(new Date().setHours(0, 7, 0, 0)).getTime() // console.log(str);
this.listQuery.startTime = new Date(new Date(str).setHours(0, 7, 0, 0)).getTime()
// console.log(startTime1) // console.log(startTime1)
this.codeList = [] this.codeList = []
if (e === '早班查询') { if (e === '早班查询') {
@ -360,7 +366,7 @@ export default {
prop: 'num11' prop: 'num11'
}, },
{ {
label: '合计', label: '不良合计',
prop: 'sum' prop: 'sum'
} }
] ]
@ -369,8 +375,9 @@ export default {
]) ])
this.getDataList() this.getDataList()
} else { } else {
// this.codeList = [] let str = this.listQuery.startTime
this.listQuery.startTime = new Date(new Date().setHours(1, 9, 0, 0)).getTime() // console.log(str);
this.listQuery.startTime = new Date(new Date(str).setHours(0, 7, 0, 0)).getTime()
let arr = [ let arr = [
{ {
label: '19:00', label: '19:00',
@ -422,7 +429,7 @@ export default {
prop: 'num11' prop: 'num11'
}, },
{ {
label: '合计', label: '不良合计',
prop: 'sum' prop: 'sum'
} }
] ]
@ -477,6 +484,15 @@ export default {
// }, // },
// //
getDataList() { getDataList() {
if (this.radio === '晚班查询') {
let str = this.listQuery.startTime
// console.log(str);
this.listQuery.startTime = new Date(new Date(str).setHours(1, 9, 0, 0)).getTime()
} else {
let str = this.listQuery.startTime
// console.log(str);
this.listQuery.startTime = new Date(new Date(str).setHours(0, 7, 0, 0)).getTime()
}
this.dataListLoading = true; this.dataListLoading = true;
// this.listQuery.startTime = '1713197388000'; // this.listQuery.startTime = '1713197388000';
// this.listQuery.endTime = '1713254961000'; // this.listQuery.endTime = '1713254961000';

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-04-18 10:01:33 * @Date: 2024-04-18 10:01:33
* @LastEditTime: 2024-04-23 15:15:45 * @LastEditTime: 2024-04-24 09:56:20
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
@ -11,9 +11,10 @@
<el-table :header-cell-style="{ <el-table :header-cell-style="{
background: '#F2F4F9', background: '#F2F4F9',
color: '#606266' color: '#606266'
}" class="baseTable" :max-height="tableH" id="exportTable" :data="tableData" style="width: 100%" }" class="baseTable" border :max-height="tableH" id="exportTable" :data="tableData" style="width: 100%"
:span-method="objectSpanMethod"> :span-method="objectSpanMethod">
<el-table-column v-for="item in tableProps" :prop="item.prop" :label="item.label" align="center"> <el-table-column :width="item.width" v-for="item in tableProps" :prop="item.prop" :label="item.label"
align="center">
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- <pagination :limit.sync="listQuery.pageSize" :page.sync="listQuery.pageNo" :total="listQuery.total" <!-- <pagination :limit.sync="listQuery.pageSize" :page.sync="listQuery.pageNo" :total="listQuery.total"
@ -39,6 +40,7 @@ import {
getOriginalLineDataList getOriginalLineDataList
} from '@/api/report/qcReport'; } from '@/api/report/qcReport';
import tableHeightMixin from '@/mixins/lb/tableHeightMixin'; import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
import { width } from '@antv/x6-common/lib/dom/position';
import FileSaver from 'file-saver' import FileSaver from 'file-saver'
// import { getList, } from "@/api/base/qualityScrapType"; // import { getList, } from "@/api/base/qualityScrapType";
const tableProps = [ const tableProps = [
@ -49,11 +51,13 @@ const tableProps = [
// }, // },
{ {
prop: 'lineName', prop: 'lineName',
label: '产线' label: '产线',
width:'100'
}, },
{ {
prop: 'equipmentName', prop: 'equipmentName',
label: '' label: '',
width: '200'
}, },
{ {
prop: 'num', prop: 'num',
@ -122,7 +126,7 @@ export default {
type: 'datePicker', type: 'datePicker',
label: '时间段', label: '时间段',
dateType: 'daterange', dateType: 'daterange',
format: 'yyyy-MM-dd HH:mm:ss', // format: 'yyyy-MM-dd HH:mm:ss',
valueFormat: "timestamp", valueFormat: "timestamp",
rangeSeparator: '-', rangeSeparator: '-',
startPlaceholder: '开始时间', startPlaceholder: '开始时间',
@ -154,7 +158,7 @@ export default {
type:'button', type:'button',
btnName: '导出', btnName: '导出',
name: 'export', name: 'export',
color: 'success', color: 'primary',
plain: true plain: true
}, },
], ],

View File

@ -1,19 +1,19 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2024-04-18 15:07:53 * @Date: 2024-04-18 15:07:53
* @LastEditTime: 2024-04-23 15:15:52 * @LastEditTime: 2024-04-24 09:58:07
* @LastEditors: zhp * @LastEditors: zhp
* @Description: * @Description:
--> -->
<template> <template>
<div class="app-container"> <div class="app-container">
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" /> <search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
<el-table show-summary :header-cell-style="{ <el-table :header-cell-style="{
background: '#F2F4F9', background: '#F2F4F9',
color: '#606266' color: '#606266'
}" class="baseTable" :max-height="tableH" id="exportTable" :data="tableData" style="width: 100%" }" class="baseTable" border id="exportTable" :data="tableData" style="width: 100%" :span-method="objectSpanMethod">
:span-method="objectSpanMethod"> <el-table-column :width="item.width" v-for="item in tableProps" :prop="item.prop" :label="item.label"
<el-table-column v-for="item in tableProps" :prop="item.prop" :label="item.label" align="center"> align="center">
</el-table-column> </el-table-column>
</el-table> </el-table>
<!-- <pagination :limit.sync="listQuery.pageSize" :page.sync="listQuery.pageNo" :total="listQuery.total" <!-- <pagination :limit.sync="listQuery.pageSize" :page.sync="listQuery.pageNo" :total="listQuery.total"
@ -49,11 +49,13 @@ const tableProps = [
// }, // },
{ {
prop: 'lineName', prop: 'lineName',
label: '产线' label: '产线',
width:'150',
}, },
{ {
prop: 'dataType', prop: 'dataType',
label: '' label: '',
width: '150',
}, },
{ {
prop: 'type', prop: 'type',
@ -69,7 +71,7 @@ const tableProps = [
}, },
{ {
prop: 'rate', prop: 'rate',
label: '占比', label: '占比%',
// filter: (val) => val == false ? '' : '', // filter: (val) => val == false ? '' : '',
}, },
// { // {
@ -121,7 +123,7 @@ export default {
type: 'datePicker', type: 'datePicker',
label: '时间段', label: '时间段',
dateType: 'daterange', dateType: 'daterange',
format: 'yyyy-MM-dd HH:mm:ss', // format: 'yyyy-MM-dd HH:mm:ss',
valueFormat: "timestamp", valueFormat: "timestamp",
rangeSeparator: '-', rangeSeparator: '-',
startPlaceholder: '开始时间', startPlaceholder: '开始时间',
@ -153,7 +155,7 @@ export default {
type:'button', type:'button',
btnName: '导出', btnName: '导出',
name: 'export', name: 'export',
color: 'success', color: 'primary',
plain: true plain: true
}, },
], ],
@ -179,34 +181,6 @@ export default {
console.log(res) console.log(res)
this.formConfig[1].selectOptions = res.data this.formConfig[1].selectOptions = res.data
}, },
getSummaries(param) {
console.log(columns)
const { columns, data } = param;
const sums = [];
columns.forEach((column, index) => {
if (index === 0) {
sums[index] = '合计';
return;
}
const values = data.map(item => Number(item[column.property]));
if (!values.every(value => isNaN(value))) {
sums[index] = values.reduce((prev, curr) => {
const value = Number(curr);
if (!isNaN(value)) {
return prev + curr;
} else {
return prev;
}
}, 0);
sums[index] += ' ';
} else {
sums[index] = '-';
}
});
return sums;
},
objectSpanMethod({ row, column, rowIndex, columnIndex }) { objectSpanMethod({ row, column, rowIndex, columnIndex }) {
let spanOneArr = [], concatOne = 0; let spanOneArr = [], concatOne = 0;
let spanTwoArr = [], concatTwo = 0; let spanTwoArr = [], concatTwo = 0;
@ -276,7 +250,7 @@ export default {
// Blob // Blob
new Blob([wbout], { type: "application/octet-stream" }), new Blob([wbout], { type: "application/octet-stream" }),
// //
"原片各线堆垛表.xlsx" "原片各线优化切割堆垛表.xlsx"
); );
} catch (e) { } catch (e) {
if (typeof console !== "undefined") console.log(e, wbout); if (typeof console !== "undefined") console.log(e, wbout);
@ -319,7 +293,7 @@ export default {
type: ele.type, type: ele.type,
pieces: ele.pieces, pieces: ele.pieces,
area: ele.area, area: ele.area,
rate: ele.rate rate: (ele.rate * 100).toFixed(2)
// useNum: ele.useNum, // useNum: ele.useNum,
// num: ele.num, // num: ele.num,
// size: typeof (ele.size) // size: typeof (ele.size)
@ -412,13 +386,14 @@ export default {
}, },
}; };
</script> </script>
<style> <style scoped>
.baseTable .el-table__body tr.current-row>td.el-table__cell { ::v-deep.baseTable .el-table__body tr.current-row>td.el-table__cell {
background-color: #EAF1FC; background-color: #EAF1FC;
} }
.baseTable .el-table .el-table__cell { ::v-deep .baseTable .el-table .el-table__cell {
padding: 0; padding: 0;
height: 35px; height: 35px;
} }
</style> </style>