Compare commits
18 Commits
4b01dd3ec3
...
ab5867c4fd
Author | SHA1 | Date | |
---|---|---|---|
ab5867c4fd | |||
ec0c09a674 | |||
|
90e9b179eb | ||
|
8e2b332c7b | ||
f37a12d2e1 | |||
cb19872012 | |||
|
8ba79185d4 | ||
|
104cda5a41 | ||
|
151c5708c4 | ||
837735b7e8 | |||
|
e00a08385f | ||
|
a8c3d2c585 | ||
eb097e77bd | |||
|
30eecb8bd1 | ||
|
f4a6229170 | ||
ab593bff20 | |||
|
22f3c87f02 | ||
|
1f54c9179d |
3
.env.dev
3
.env.dev
@ -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.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'
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2021-07-19 15:18:30
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2024-04-22 12:15:49
|
||||
* @LastEditTime: 2024-04-24 14:48:00
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -37,7 +37,7 @@
|
||||
</el-col>
|
||||
|
||||
<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">
|
||||
<el-row v-for="op in orderList" :key="op.id" style="margin-bottom: .5em;overflow: hidden;">
|
||||
<!-- <el-col :span="12"> -->
|
||||
@ -749,7 +749,7 @@ export default {
|
||||
item.code || ''
|
||||
}</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.$nextTick(() => {
|
||||
|
@ -85,7 +85,7 @@ export default {
|
||||
color: this.colors,
|
||||
title: {
|
||||
text: num,
|
||||
subtext: '总数',
|
||||
subtext: '总数/个',
|
||||
top: '32%',
|
||||
left: '49%',
|
||||
textAlign: 'center',
|
||||
|
@ -66,8 +66,10 @@ export default {
|
||||
`<span title=${item.name || ''}>${item.name || ''}</span>`,
|
||||
`<span title=${item.code || ''}>${item.code || ''}</span>`,
|
||||
`<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 '
|
||||
: 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 '
|
||||
}"></div> ${item.status || ''}</span>`,
|
||||
`<span"><div style="${
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2024-04-18 14:08:46
|
||||
* @LastEditTime: 2024-04-23 16:18:27
|
||||
* @LastEditTime: 2024-04-24 13:52:45
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -25,17 +25,19 @@
|
||||
</el-table> -->
|
||||
|
||||
<el-table class="baseTable" :span-method="objectSpanMethod" :data="tableData" style="width: 100%">
|
||||
<el-table-column align="center" prop="" 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 prop="putType" label="" width="180">
|
||||
<el-table-column align="center" prop="putType" label="" width="180">
|
||||
</el-table-column>
|
||||
<!-- <el-table-column prop label="参考标准及评价方法">
|
||||
<el-table-column prop="activityName"></el-table-column>
|
||||
<el-table-column prop="message"></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"
|
||||
:label="item">
|
||||
<!-- <template slot-scope="scope">
|
||||
<el-col :span="12">
|
||||
{{ codeList[index] }}
|
||||
@ -50,6 +52,7 @@
|
||||
</el-row>
|
||||
</template> -->
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- <pagination :limit.sync="listQuery.pageSize" :page.sync="listQuery.pageNo" :total="listQuery.total"
|
||||
@pagination="getDataList" /> -->
|
||||
@ -145,7 +148,7 @@ export default {
|
||||
endPlaceholder: '结束时间',
|
||||
param: 'checkTime',
|
||||
defaultSelect: [Date.now() - 24 * 60 * 60 - 1000, Date.now()],
|
||||
width: 250
|
||||
width: 350
|
||||
},
|
||||
{
|
||||
type:'button',
|
||||
@ -157,7 +160,7 @@ export default {
|
||||
type:'button',
|
||||
btnName: '导出',
|
||||
name: 'export',
|
||||
color: 'success',
|
||||
color: 'primary',
|
||||
plain: true
|
||||
},
|
||||
],
|
||||
@ -212,7 +215,7 @@ export default {
|
||||
}
|
||||
}
|
||||
if (columnIndex === 1) {
|
||||
if (rowIndex === 1 || rowIndex === 3 || rowIndex === 5 || rowIndex === 7 || rowIndex === 9 || rowIndex === 11) {
|
||||
if (rowIndex %2 == 1) {
|
||||
return {
|
||||
rowspan: 1,
|
||||
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 (rowIndex === 0 || rowIndex === 2 || rowIndex === 4 || rowIndex === 6 || rowIndex === 8 || rowIndex === 10) {
|
||||
if (rowIndex % 2 == 0) {
|
||||
return {
|
||||
rowspan: 2,
|
||||
colspan: 1
|
||||
@ -252,7 +255,7 @@ export default {
|
||||
//返回一个新创建的 Blob 对象,其内容由参数中给定的数组串联组成。
|
||||
new Blob([wbout], { type: "application/octet-stream" }),
|
||||
//设置导出文件名称
|
||||
"原片各线堆垛表.xlsx"
|
||||
"切割堆垛日报表.xlsx"
|
||||
);
|
||||
} catch (e) {
|
||||
if (typeof console !== "undefined") console.log(e, wbout);
|
||||
@ -558,11 +561,13 @@ export default {
|
||||
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;
|
||||
}
|
||||
|
||||
::v-deep.el-table thead.is-group tr:first-of-type th:first-of-type:before {
|
||||
::v-deep.el-table thead.is-group tr:nth-child(2) th:first-of-type:before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
@ -578,7 +583,7 @@ export default {
|
||||
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: '';
|
||||
position: absolute;
|
||||
width: 1px;
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2024-04-18 10:01:33
|
||||
* @LastEditTime: 2024-04-23 15:15:22
|
||||
* @LastEditTime: 2024-04-24 09:34:36
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -41,6 +41,7 @@ import {
|
||||
} from '@/api/report/qcReport';
|
||||
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
|
||||
import FileSaver from 'file-saver'
|
||||
import { parseTime } from '../../../core/mixins/code-filter';
|
||||
// import { getList, } from "@/api/base/qualityScrapType";
|
||||
const tableProps = [
|
||||
// {
|
||||
@ -70,7 +71,7 @@ const tableProps = [
|
||||
},
|
||||
{
|
||||
prop: 'thickness',
|
||||
label: '厚度'
|
||||
label: '厚度mm'
|
||||
},
|
||||
{
|
||||
prop: 'glassCode',
|
||||
@ -79,7 +80,9 @@ const tableProps = [
|
||||
{
|
||||
prop: 'stackingType',
|
||||
label: '堆垛方式',
|
||||
filter: (val) => val == 1 ? '集装架' : '堵头箱',
|
||||
// filter: (val) =>
|
||||
// val != null ? ['集装架', '堵头箱'][val] : '',
|
||||
// filter: ((val) => { val == 1 ? '集装架' : '堵头箱' }),
|
||||
},
|
||||
{
|
||||
prop: 'pieces',
|
||||
@ -95,16 +98,16 @@ const tableProps = [
|
||||
},
|
||||
{
|
||||
prop: 'dusting',
|
||||
label: '堆垛情况',
|
||||
label: '喷粉情况',
|
||||
},
|
||||
{
|
||||
prop: 'palletNumber',
|
||||
label: '堆垛时间',
|
||||
},
|
||||
{
|
||||
prop: 'endTime',
|
||||
label: '集装架号',
|
||||
},
|
||||
{
|
||||
prop: 'remark',
|
||||
label: '备注',
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
@ -318,7 +321,23 @@ export default {
|
||||
// // 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 = {}
|
||||
// response.data.reduce((prev, curr) => {
|
||||
// console.log(prev, curr)
|
||||
@ -405,12 +424,12 @@ export default {
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.baseTable .el-table__body tr.current-row>td.el-table__cell {
|
||||
<style scoped>
|
||||
::v-deep.baseTable .el-table__body tr.current-row>td.el-table__cell {
|
||||
background-color: #EAF1FC;
|
||||
}
|
||||
|
||||
.baseTable .el-table .el-table__cell {
|
||||
::v-deep .baseTable .el-table .el-table__cell {
|
||||
padding: 0;
|
||||
height: 35px;
|
||||
}
|
||||
|
@ -1,14 +1,14 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2024-04-18 14:08:46
|
||||
* @LastEditTime: 2024-04-23 15:08:44
|
||||
* @LastEditTime: 2024-04-24 14:41:01
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<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>
|
||||
</el-form-item>
|
||||
@ -61,7 +61,12 @@
|
||||
</el-table-column>
|
||||
<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>
|
||||
@ -205,7 +210,7 @@ export default {
|
||||
prop: 'num11'
|
||||
},
|
||||
{
|
||||
label: '合计',
|
||||
label: '不良合计',
|
||||
prop: 'sum'
|
||||
}
|
||||
],
|
||||
@ -234,7 +239,7 @@ export default {
|
||||
type: 'button',
|
||||
btnName: '导出',
|
||||
name: 'export',
|
||||
color: 'success',
|
||||
color: 'primary',
|
||||
plain: true
|
||||
},
|
||||
],
|
||||
@ -305,8 +310,9 @@ export default {
|
||||
return y + '-' + m + '-' + d + ' ' + h + ':' + minute + ':' + second;
|
||||
},
|
||||
handleGetClass(e) {
|
||||
|
||||
this.listQuery.startTime = new Date(new Date().setHours(0, 7, 0, 0)).getTime()
|
||||
let str = this.listQuery.startTime
|
||||
// console.log(str);
|
||||
this.listQuery.startTime = new Date(new Date(str).setHours(0, 7, 0, 0)).getTime()
|
||||
// console.log(startTime1)
|
||||
this.codeList = []
|
||||
if (e === '早班查询') {
|
||||
@ -360,7 +366,7 @@ export default {
|
||||
prop: 'num11'
|
||||
},
|
||||
{
|
||||
label: '合计',
|
||||
label: '不良合计',
|
||||
prop: 'sum'
|
||||
}
|
||||
]
|
||||
@ -369,8 +375,9 @@ export default {
|
||||
])
|
||||
this.getDataList()
|
||||
} else {
|
||||
// this.codeList = []
|
||||
this.listQuery.startTime = new Date(new Date().setHours(1, 9, 0, 0)).getTime()
|
||||
let str = this.listQuery.startTime
|
||||
// console.log(str);
|
||||
this.listQuery.startTime = new Date(new Date(str).setHours(0, 7, 0, 0)).getTime()
|
||||
let arr = [
|
||||
{
|
||||
label: '19:00',
|
||||
@ -422,7 +429,7 @@ export default {
|
||||
prop: 'num11'
|
||||
},
|
||||
{
|
||||
label: '合计',
|
||||
label: '不良合计',
|
||||
prop: 'sum'
|
||||
}
|
||||
]
|
||||
@ -477,6 +484,15 @@ export default {
|
||||
// },
|
||||
// 获取数据列表
|
||||
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.listQuery.startTime = '1713197388000';
|
||||
// this.listQuery.endTime = '1713254961000';
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2024-04-18 10:01:33
|
||||
* @LastEditTime: 2024-04-23 15:15:45
|
||||
* @LastEditTime: 2024-04-24 09:56:20
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -11,9 +11,10 @@
|
||||
<el-table :header-cell-style="{
|
||||
background: '#F2F4F9',
|
||||
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">
|
||||
<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>
|
||||
<!-- <pagination :limit.sync="listQuery.pageSize" :page.sync="listQuery.pageNo" :total="listQuery.total"
|
||||
@ -39,6 +40,7 @@ import {
|
||||
getOriginalLineDataList
|
||||
} from '@/api/report/qcReport';
|
||||
import tableHeightMixin from '@/mixins/lb/tableHeightMixin';
|
||||
import { width } from '@antv/x6-common/lib/dom/position';
|
||||
import FileSaver from 'file-saver'
|
||||
// import { getList, } from "@/api/base/qualityScrapType";
|
||||
const tableProps = [
|
||||
@ -49,11 +51,13 @@ const tableProps = [
|
||||
// },
|
||||
{
|
||||
prop: 'lineName',
|
||||
label: '产线'
|
||||
label: '产线',
|
||||
width:'100'
|
||||
},
|
||||
{
|
||||
prop: 'equipmentName',
|
||||
label: ''
|
||||
label: '',
|
||||
width: '200'
|
||||
},
|
||||
{
|
||||
prop: 'num',
|
||||
@ -122,7 +126,7 @@ export default {
|
||||
type: 'datePicker',
|
||||
label: '时间段',
|
||||
dateType: 'daterange',
|
||||
format: 'yyyy-MM-dd HH:mm:ss',
|
||||
// format: 'yyyy-MM-dd HH:mm:ss',
|
||||
valueFormat: "timestamp",
|
||||
rangeSeparator: '-',
|
||||
startPlaceholder: '开始时间',
|
||||
@ -154,7 +158,7 @@ export default {
|
||||
type:'button',
|
||||
btnName: '导出',
|
||||
name: 'export',
|
||||
color: 'success',
|
||||
color: 'primary',
|
||||
plain: true
|
||||
},
|
||||
],
|
||||
|
@ -1,19 +1,19 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2024-04-18 15:07:53
|
||||
* @LastEditTime: 2024-04-23 15:15:52
|
||||
* @LastEditTime: 2024-04-24 09:58:07
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
|
||||
<el-table show-summary :header-cell-style="{
|
||||
<el-table :header-cell-style="{
|
||||
background: '#F2F4F9',
|
||||
color: '#606266'
|
||||
}" class="baseTable" :max-height="tableH" id="exportTable" :data="tableData" style="width: 100%"
|
||||
:span-method="objectSpanMethod">
|
||||
<el-table-column v-for="item in tableProps" :prop="item.prop" :label="item.label" align="center">
|
||||
}" class="baseTable" border id="exportTable" :data="tableData" style="width: 100%" :span-method="objectSpanMethod">
|
||||
<el-table-column :width="item.width" v-for="item in tableProps" :prop="item.prop" :label="item.label"
|
||||
align="center">
|
||||
</el-table-column>
|
||||
</el-table>
|
||||
<!-- <pagination :limit.sync="listQuery.pageSize" :page.sync="listQuery.pageNo" :total="listQuery.total"
|
||||
@ -49,11 +49,13 @@ const tableProps = [
|
||||
// },
|
||||
{
|
||||
prop: 'lineName',
|
||||
label: '产线'
|
||||
label: '产线',
|
||||
width:'150',
|
||||
},
|
||||
{
|
||||
prop: 'dataType',
|
||||
label: ''
|
||||
label: '',
|
||||
width: '150',
|
||||
},
|
||||
{
|
||||
prop: 'type',
|
||||
@ -69,7 +71,7 @@ const tableProps = [
|
||||
},
|
||||
{
|
||||
prop: 'rate',
|
||||
label: '占比',
|
||||
label: '占比%',
|
||||
// filter: (val) => val == false ? '不合格' : '合格',
|
||||
},
|
||||
// {
|
||||
@ -121,7 +123,7 @@ export default {
|
||||
type: 'datePicker',
|
||||
label: '时间段',
|
||||
dateType: 'daterange',
|
||||
format: 'yyyy-MM-dd HH:mm:ss',
|
||||
// format: 'yyyy-MM-dd HH:mm:ss',
|
||||
valueFormat: "timestamp",
|
||||
rangeSeparator: '-',
|
||||
startPlaceholder: '开始时间',
|
||||
@ -153,7 +155,7 @@ export default {
|
||||
type:'button',
|
||||
btnName: '导出',
|
||||
name: 'export',
|
||||
color: 'success',
|
||||
color: 'primary',
|
||||
plain: true
|
||||
},
|
||||
],
|
||||
@ -179,34 +181,6 @@ export default {
|
||||
console.log(res)
|
||||
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 }) {
|
||||
let spanOneArr = [], concatOne = 0;
|
||||
let spanTwoArr = [], concatTwo = 0;
|
||||
@ -276,7 +250,7 @@ export default {
|
||||
//返回一个新创建的 Blob 对象,其内容由参数中给定的数组串联组成。
|
||||
new Blob([wbout], { type: "application/octet-stream" }),
|
||||
//设置导出文件名称
|
||||
"原片各线堆垛表.xlsx"
|
||||
"原片各线优化切割堆垛表.xlsx"
|
||||
);
|
||||
} catch (e) {
|
||||
if (typeof console !== "undefined") console.log(e, wbout);
|
||||
@ -319,7 +293,7 @@ export default {
|
||||
type: ele.type,
|
||||
pieces: ele.pieces,
|
||||
area: ele.area,
|
||||
rate: ele.rate
|
||||
rate: (ele.rate * 100).toFixed(2)
|
||||
// useNum: ele.useNum,
|
||||
// num: ele.num,
|
||||
// size: typeof (ele.size)
|
||||
@ -412,13 +386,14 @@ export default {
|
||||
},
|
||||
};
|
||||
</script>
|
||||
<style>
|
||||
.baseTable .el-table__body tr.current-row>td.el-table__cell {
|
||||
<style scoped>
|
||||
::v-deep.baseTable .el-table__body tr.current-row>td.el-table__cell {
|
||||
background-color: #EAF1FC;
|
||||
}
|
||||
|
||||
.baseTable .el-table .el-table__cell {
|
||||
::v-deep .baseTable .el-table .el-table__cell {
|
||||
padding: 0;
|
||||
height: 35px;
|
||||
}
|
||||
|
||||
</style>
|
||||
|
Loading…
Reference in New Issue
Block a user