新增报表
This commit is contained in:
parent
29c3a9fb72
commit
5ea4c219ed
2
.env.dev
2
.env.dev
@ -1,7 +1,7 @@
|
|||||||
###
|
###
|
||||||
# @Author: zhp
|
# @Author: zhp
|
||||||
# @Date: 2024-04-12 14:30:48
|
# @Date: 2024-04-12 14:30:48
|
||||||
# @LastEditTime: 2024-04-22 08:45:38
|
# @LastEditTime: 2024-04-22 16:16:52
|
||||||
# @LastEditors: zhp
|
# @LastEditors: zhp
|
||||||
# @Description:
|
# @Description:
|
||||||
###
|
###
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2024-04-18 09:27:54
|
* @Date: 2024-04-18 09:27:54
|
||||||
* @LastEditTime: 2024-04-19 16:12:49
|
* @LastEditTime: 2024-04-22 16:21:26
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
*/
|
*/
|
||||||
@ -42,7 +42,23 @@ export function getAutoDailyData(data) {
|
|||||||
export function getQualityRecordReport(data) {
|
export function getQualityRecordReport(data) {
|
||||||
return request({
|
return request({
|
||||||
url: 'base/quality-inspection-record/qualityRecordReport',
|
url: 'base/quality-inspection-record/qualityRecordReport',
|
||||||
method: 'get',
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function getProductChildData(data) {
|
||||||
|
return request({
|
||||||
|
url: 'base/report-auto-ydaily-det/list',
|
||||||
|
method: 'post',
|
||||||
|
data: data
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
export function updateAutoDailyData(data) {
|
||||||
|
return request({
|
||||||
|
url: 'base/report-auto-daily/update',
|
||||||
|
method: 'put',
|
||||||
data: data
|
data: data
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2024-01-29 16:50:26
|
* @Date: 2024-01-29 16:50:26
|
||||||
* @LastEditTime: 2024-04-19 16:06:21
|
* @LastEditTime: 2024-04-22 09:42:45
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -34,7 +34,7 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="8">
|
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="8">
|
||||||
<base-container :no-content-padding="true" :title="'产量及良率统计'" :size="'small'"
|
<base-container :show-time="true" :no-content-padding="true" :title="'产量及良率统计'" :size="'small'"
|
||||||
:title-icon="'energyMonitoring'">
|
:title-icon="'energyMonitoring'">
|
||||||
<!-- <div style="width: 45%;position: absolute; top: 3em; right: 3em;">
|
<!-- <div style="width: 45%;position: absolute; top: 3em; right: 3em;">
|
||||||
<top-radio-group />
|
<top-radio-group />
|
||||||
@ -53,7 +53,8 @@
|
|||||||
</el-col>
|
</el-col>
|
||||||
|
|
||||||
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="8">
|
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="8">
|
||||||
<base-container :no-content-padding="true" :title="'ISRA 缺陷数据'" :size="'small'" :title-icon="'scrap'">
|
<base-container :show-time="true" :no-content-padding="true" :title="'ISRA 缺陷数据'" :size="'small'"
|
||||||
|
:title-icon="'scrap'">
|
||||||
<!-- <base-table1 :page="1" :limit="999" :show-index="false" :table-config="ISRATableProps"
|
<!-- <base-table1 :page="1" :limit="999" :show-index="false" :table-config="ISRATableProps"
|
||||||
:table-data="ISRAList" /> -->
|
:table-data="ISRAList" /> -->
|
||||||
<ISRAChart ref="ISRAChart" />
|
<ISRAChart ref="ISRAChart" />
|
||||||
@ -64,8 +65,8 @@
|
|||||||
|
|
||||||
<el-row :style="{ padding: '0 ' + 9 + 'px' }" :gutter="10" type="flex" class="flex-1">
|
<el-row :style="{ padding: '0 ' + 9 + 'px' }" :gutter="10" type="flex" class="flex-1">
|
||||||
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12">
|
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12">
|
||||||
<base-container :no-content-padding="true" :height="256" :title="'废片 缺陷数据'" :size="'eqStatus'"
|
<base-container :show-time="true" :no-content-padding="true" :height="256" :title="'废片 缺陷数据'"
|
||||||
:title-icon="'scrap'">
|
:size="'eqStatus'" :title-icon="'scrap'">
|
||||||
<!-- <div style="width: 45%;position: absolute; top: 3em; right: 3em;">
|
<!-- <div style="width: 45%;position: absolute; top: 3em; right: 3em;">
|
||||||
<top-radio-group />
|
<top-radio-group />
|
||||||
</div> -->
|
</div> -->
|
||||||
@ -98,7 +99,8 @@
|
|||||||
</base-container>
|
</base-container>
|
||||||
</el-col>
|
</el-col>
|
||||||
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="14">
|
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="14">
|
||||||
<base-container :height="318 + 338 + 16" :size="'eqStatus'" :title="'设备状态监控'" :title-icon="'eqMonitoring'">
|
<base-container :show-time="false" :height="318 + 338 + 16" :size="'eqStatus'" :title="'设备状态监控'"
|
||||||
|
:title-icon="'eqMonitoring'">
|
||||||
<!-- <div style="width: 45%;position: absolute; top: 3em; right: 3em;">
|
<!-- <div style="width: 45%;position: absolute; top: 3em; right: 3em;">
|
||||||
<top-radio-group />
|
<top-radio-group />
|
||||||
</div> -->
|
</div> -->
|
||||||
@ -652,7 +654,7 @@ export default {
|
|||||||
wasteList.push(ele.wastArea)
|
wasteList.push(ele.wastArea)
|
||||||
nameWasteList.push('缺陷面积:' + this.NumFormat(ele.wastArea) + '㎡')
|
nameWasteList.push('缺陷面积:' + this.NumFormat(ele.wastArea) + '㎡')
|
||||||
sumAreaList.push(ele.sumArea)
|
sumAreaList.push(ele.sumArea)
|
||||||
yieldList.push(parseFloat((ele.yield * 100).toFixed(0)))
|
yieldList.push(parseFloat((ele.yield * 100).toFixed(2)))
|
||||||
})
|
})
|
||||||
this.$nextTick(() => {
|
this.$nextTick(() => {
|
||||||
this.$refs.firstPileChart.initChart(nameList, [topNameList[0]], [nameWasteList[0]], [productList[0]], [wasteList[0]])
|
this.$refs.firstPileChart.initChart(nameList, [topNameList[0]], [nameWasteList[0]], [productList[0]], [wasteList[0]])
|
||||||
|
@ -170,11 +170,11 @@ export default {
|
|||||||
},
|
},
|
||||||
formatter: (params) => {
|
formatter: (params) => {
|
||||||
//调用自定义显示格式
|
//调用自定义显示格式
|
||||||
return this.getEqualNewlineString(params.value + " | " + params.percent.toFixed(0) + "%" + "\n" + params.name,10);
|
return this.getEqualNewlineString(params.value + " | " + params.percent.toFixed(0) + "%");
|
||||||
},
|
},
|
||||||
textStyle: { // 提示文字的样式
|
textStyle: { // 提示文字的样式
|
||||||
// color: '#595959',
|
// color: '#595959',
|
||||||
fontSize: 18
|
fontSize: 16
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @Author: gtz
|
* @Author: gtz
|
||||||
* @Date: 2022-01-19 15:58:17
|
* @Date: 2022-01-19 15:58:17
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @LastEditTime: 2024-03-29 14:47:29
|
* @LastEditTime: 2024-04-22 09:41:21
|
||||||
* @Description: file content
|
* @Description: file content
|
||||||
* @FilePath: \mt-bus-fe\src\views\OperationalOverview\components\baseContainer\index.vue
|
* @FilePath: \mt-bus-fe\src\views\OperationalOverview\components\baseContainer\index.vue
|
||||||
-->
|
-->
|
||||||
@ -30,7 +30,7 @@
|
|||||||
<!-- <span v-if="showTime" style="font-size: 20px;color:#52FFF8;margin-left: 10px;margin-top: 2px;">
|
<!-- <span v-if="showTime" style="font-size: 20px;color:#52FFF8;margin-left: 10px;margin-top: 2px;">
|
||||||
{{ time2 +'-'+ time }}
|
{{ time2 +'-'+ time }}
|
||||||
</span> -->
|
</span> -->
|
||||||
<span style="font-size: 20px;color:#52FFF8;margin-left: 10px;margin-top: 2px;">
|
<span v-if="showTime" style="font-size: 20px;color:#52FFF8;margin-left: 10px;margin-top: 2px;">
|
||||||
{{ startTime + '-' + endTime }}
|
{{ startTime + '-' + endTime }}
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
@ -56,6 +56,10 @@ export default {
|
|||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: true
|
default: true
|
||||||
},
|
},
|
||||||
|
showTime: {
|
||||||
|
type: Boolean,
|
||||||
|
default: true
|
||||||
|
},
|
||||||
noPadding: {
|
noPadding: {
|
||||||
type: Boolean,
|
type: Boolean,
|
||||||
default: false
|
default: false
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2023-09-21 09:06:28
|
* @Date: 2023-09-21 09:06:28
|
||||||
* @LastEditTime: 2024-04-16 13:39:25
|
* @LastEditTime: 2024-04-22 09:36:58
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -97,7 +97,7 @@ export default {
|
|||||||
{ offset: 0.3, color: '#1295FF' }
|
{ offset: 0.3, color: '#1295FF' }
|
||||||
]),
|
]),
|
||||||
label: {
|
label: {
|
||||||
show: true, //开启显示
|
show: false, //开启显示
|
||||||
position: 'top', //在上方显示
|
position: 'top', //在上方显示
|
||||||
textStyle: { //数值样式
|
textStyle: { //数值样式
|
||||||
color: 'rgba(255,255,255,0.5)', // 坐标值得具体的颜色
|
color: 'rgba(255,255,255,0.5)', // 坐标值得具体的颜色
|
||||||
|
@ -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-18 08:42:00
|
* @LastEditTime: 2024-04-22 12:15:49
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
<template>
|
<template>
|
||||||
@ -25,19 +25,19 @@
|
|||||||
<el-row class="container-main flex-col" type="flex">
|
<el-row class="container-main flex-col" type="flex">
|
||||||
<el-row :style="{ padding: '0 ' + 9 + 'px' }" :gutter="15" type="flex" class="flex-1" style="height: 50%">
|
<el-row :style="{ padding: '0 ' + 9 + 'px' }" :gutter="15" type="flex" class="flex-1" style="height: 50%">
|
||||||
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="8" height="100%">
|
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="8" height="100%">
|
||||||
<base-container :title="'设备报警'" :size="'small'" :height="318" :title-icon="'eqAlarm'">
|
<base-container :show-time="true" :title="'设备报警'" :size="'small'" :height="318" :title-icon="'eqAlarm'">
|
||||||
<dv-scroll-board class="eqTable" :config="eqConfig" style="width: 100%; height: 350px"
|
<dv-scroll-board class="eqTable" :config="eqConfig" style="width: 100%; height: 350px"
|
||||||
ref="eqScrollBoard" />
|
ref="eqScrollBoard" />
|
||||||
</base-container>
|
</base-container>
|
||||||
</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 :title="'各工序缺陷汇总'" :size="'small'" :title-icon="'scrap'">
|
<base-container :show-time="true" :title="'各工序缺陷汇总'" :size="'small'" :title-icon="'scrap'">
|
||||||
<dv-scroll-board :config="processConfig" style="width: 100%; height: 350px" ref="processScrollBoard" />
|
<dv-scroll-board :config="processConfig" style="width: 100%; height: 350px" ref="processScrollBoard" />
|
||||||
</base-container>
|
</base-container>
|
||||||
</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 :height="318" :size="'small'" :title="'工单监控'" :title-icon="'eqMonitoring'">
|
<base-container :show-time="true" :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"> -->
|
||||||
@ -52,8 +52,7 @@
|
|||||||
<span v-if="op.planQuantity" class="orderPlan" style="font-size: 14px;opacity: calc(.6);">{{
|
<span v-if="op.planQuantity" class="orderPlan" style="font-size: 14px;opacity: calc(.6);">{{
|
||||||
op.planQuantity }}</span>
|
op.planQuantity }}</span>
|
||||||
</span>
|
</span>
|
||||||
<span v-if="op.actualQuantity" class="orderFinish"
|
<span v-if="op.actualQuantity" class="orderFinish" style="font-size: 14px;margin-left: 130px;">{{
|
||||||
style="font-size: 14px;margin-left: 130px;">{{
|
|
||||||
op.actualQuantity
|
op.actualQuantity
|
||||||
}}</span>
|
}}</span>
|
||||||
<el-divider class="split" style="background-color: rgba(0, 255, 247, 1)" v-if="op.actualQuantity"
|
<el-divider class="split" style="background-color: rgba(0, 255, 247, 1)" v-if="op.actualQuantity"
|
||||||
@ -70,8 +69,8 @@
|
|||||||
|
|
||||||
<el-row :style="{ padding: '0 ' + 9 + 'px' }" :gutter="12" type="flex" class="flex-1">
|
<el-row :style="{ padding: '0 ' + 9 + 'px' }" :gutter="12" type="flex" class="flex-1">
|
||||||
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12">
|
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="12">
|
||||||
<base-container :show-yes-time="true" :no-content-padding="true" :height="256" :size="'eqStatus'"
|
<base-container :show-time="true" :show-yes-time="true" :no-content-padding="true" :height="256"
|
||||||
:title="'能源监控'" :title-icon="'energyMonitoring'">
|
:size="'eqStatus'" :title="'能源监控'" :title-icon="'energyMonitoring'">
|
||||||
<el-row :gutter="9">
|
<el-row :gutter="9">
|
||||||
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="24">
|
<el-col :style="{ margin: 8 + 'px' + ' 0' }" :span="24">
|
||||||
<linear-bar-chart ref="EnergyMonitoringChart" :name-list="EnergyMonitoringNameList"
|
<linear-bar-chart ref="EnergyMonitoringChart" :name-list="EnergyMonitoringNameList"
|
||||||
@ -136,7 +135,7 @@ const qualityYearList = [
|
|||||||
name: '固化机',
|
name: '固化机',
|
||||||
code: 'EQ20240110111700000201',
|
code: 'EQ20240110111700000201',
|
||||||
status: '正常',
|
status: '正常',
|
||||||
error: 'true',
|
error: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '磨边清洗机',
|
name: '磨边清洗机',
|
||||||
@ -148,7 +147,7 @@ const qualityYearList = [
|
|||||||
name: '预热机',
|
name: '预热机',
|
||||||
code: 'EQ20240110111700000205',
|
code: 'EQ20240110111700000205',
|
||||||
status: '故障',
|
status: '故障',
|
||||||
error: true,
|
error: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '下片机',
|
name: '下片机',
|
||||||
@ -159,7 +158,7 @@ const qualityYearList = [
|
|||||||
name: '冷却机',
|
name: '冷却机',
|
||||||
code: 'EQ20240110111700000203',
|
code: 'EQ20240110111700000203',
|
||||||
status: '正常',
|
status: '正常',
|
||||||
error: true,
|
error: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: 'A储片机106',
|
name: 'A储片机106',
|
||||||
@ -177,7 +176,7 @@ const qualityYearList = [
|
|||||||
name: '二次磨边机',
|
name: '二次磨边机',
|
||||||
code: ' EQ20240110110927000181',
|
code: ' EQ20240110110927000181',
|
||||||
status: '正常',
|
status: '正常',
|
||||||
error: true,
|
error: false,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
name: '测试设备',
|
name: '测试设备',
|
||||||
@ -483,7 +482,7 @@ export default {
|
|||||||
</span>`,
|
</span>`,
|
||||||
`<span style="color:rgba(255,255,255,0.5)">${item.code || ''}</span>`,
|
`<span style="color:rgba(255,255,255,0.5)">${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: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 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: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 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:13px 10px 0 0 ' : 'box-shadow: 0px 0px 2px 1px red;width:6px;height:6px;border-radius: 50%; background-color: red;float:left;margin:13px 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:13px 10px 0 0 ' : 'box-shadow: 0px 0px 2px 1px red;width:6px;height:6px;border-radius: 50%; background-color: red;float:left;margin:13px 10px 0 0 '}"></div> ${item.error == true ? '是' : '否' || ''}</span>`,
|
||||||
]);
|
]);
|
||||||
this.eqConfig.data = eqArr;
|
this.eqConfig.data = eqArr;
|
||||||
let data = [
|
let data = [
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2024-01-24 15:15:24
|
* @Date: 2024-01-24 15:15:24
|
||||||
* @LastEditTime: 2024-04-18 16:49:31
|
* @LastEditTime: 2024-04-22 16:14:19
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -12,8 +12,7 @@
|
|||||||
</el-alert> -->
|
</el-alert> -->
|
||||||
<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="time">
|
<el-form-item label="日" prop="time">
|
||||||
<el-date-picker v-model="listQuery.time" value-format="timestamp" type="datetime"
|
<el-date-picker v-model="listQuery.time" value-format="timestamp" type="datetime" placeholder="选择日期">
|
||||||
placeholder="选择日期">
|
|
||||||
</el-date-picker>
|
</el-date-picker>
|
||||||
</el-form-item>
|
</el-form-item>
|
||||||
<el-form-item>
|
<el-form-item>
|
||||||
@ -24,8 +23,15 @@
|
|||||||
</el-form-item>
|
</el-form-item>
|
||||||
</el-form>
|
</el-form>
|
||||||
</div>
|
</div>
|
||||||
|
<el-col :span="16">
|
||||||
<inputTable :date="date" :data="tableData" :time="[startTimeStamp]" :sum="all" :type="listQuery.reportType"
|
<inputTable :date="date" :data="tableData" :time="[startTimeStamp]" :sum="all" :type="listQuery.reportType"
|
||||||
@refreshDataList="getDataList" />
|
@refreshDataList="getDataList" />
|
||||||
|
</el-col>
|
||||||
|
<el-col :span="8">
|
||||||
|
<inputTableTwo :data="tableDataChild" :time="[startTimeStamp]" :sum="all" :type="listQuery.reportType"
|
||||||
|
@refreshDataList="getDataList" />
|
||||||
|
</el-col>
|
||||||
|
|
||||||
<!-- <pagination
|
<!-- <pagination
|
||||||
:limit.sync="listQuery.pageSize"
|
:limit.sync="listQuery.pageSize"
|
||||||
:page.sync="listQuery.pageNo"
|
:page.sync="listQuery.pageNo"
|
||||||
@ -36,18 +42,21 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
// import { parseTime } from '../../core/mixins/code-filter';
|
// import { parseTime } from '../../core/mixins/code-filter';
|
||||||
import { getAutoDailyData } from '@/api/report/qcReport';
|
import { getAutoDailyData, getProductChildData } from '@/api/report/qcReport';
|
||||||
import inputTable from './inputTable.vue';
|
import inputTable from './inputTable.vue';
|
||||||
|
import inputTableTwo from './inputTableTwo.vue';
|
||||||
|
|
||||||
// import { getCorePLList } from '@/api/base/coreProductionLine';
|
// import { getCorePLList } from '@/api/base/coreProductionLine';
|
||||||
import moment from 'moment'
|
import moment from 'moment'
|
||||||
import FileSaver from 'file-saver'
|
import FileSaver from 'file-saver'
|
||||||
// import * as XLSX from 'xlsx'
|
// import * as XLSX from 'xlsx'
|
||||||
export default {
|
export default {
|
||||||
components: { inputTable },
|
components: { inputTable, inputTableTwo },
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
urlOptions: {
|
urlOptions: {
|
||||||
getDataListURL: getAutoDailyData,
|
getDataListURL: getAutoDailyData,
|
||||||
|
getChildDataListURL: getProductChildData,
|
||||||
// exportURL: exportGlasscExcel
|
// exportURL: exportGlasscExcel
|
||||||
},
|
},
|
||||||
listQuery: {
|
listQuery: {
|
||||||
@ -62,6 +71,7 @@ export default {
|
|||||||
startTimeStamp: '',
|
startTimeStamp: '',
|
||||||
endTimeStamp: '',
|
endTimeStamp: '',
|
||||||
tableData: [],
|
tableData: [],
|
||||||
|
tableDataChild:[],
|
||||||
proLineList: [],
|
proLineList: [],
|
||||||
all: {}
|
all: {}
|
||||||
};
|
};
|
||||||
@ -119,12 +129,45 @@ export default {
|
|||||||
console.log(res.data.datas);
|
console.log(res.data.datas);
|
||||||
let arr = res.data.datas
|
let arr = res.data.datas
|
||||||
let obj = res.data.reportAutoYdailyRespVO
|
let obj = res.data.reportAutoYdailyRespVO
|
||||||
obj.lineName = '合计'
|
obj.lineName = '压延线产量合计'
|
||||||
arr.push(obj)
|
arr.push(obj)
|
||||||
// this.tableData.push(res.data.reportAutoYdailyRespVO)
|
// this.tableData.push(res.data.reportAutoYdailyRespVO)
|
||||||
this.tableData = arr
|
this.tableData = arr
|
||||||
this.listQuery.total = res.data.length;
|
this.listQuery.total = res.data.length;
|
||||||
this.dataListLoading = false;
|
this.dataListLoading = false;
|
||||||
|
})
|
||||||
|
await this.urlOptions.getChildDataListURL(this.listQuery).then(res => {
|
||||||
|
console.log(res.data.datas)
|
||||||
|
// res.data.datas.sort((a, b) => {
|
||||||
|
// if (a['lineName'] != b['lineName']) {
|
||||||
|
// return a['lineName'].localeCompare(b['lineName']);
|
||||||
|
// }
|
||||||
|
// // if (a['groupClasses'] == '白班' && b['groupClasses'] == '夜班' ) {
|
||||||
|
// // return a['groupClasses'].localeCompare(b['groupClasses']);
|
||||||
|
// // }
|
||||||
|
// // if (a['groupClasses'] == '夜班') {
|
||||||
|
// // return a['groupClasses'].localeCompare(b['groupClasses']);
|
||||||
|
// // }
|
||||||
|
// })
|
||||||
|
console.log(res.data.datas);
|
||||||
|
let arr = res.data.datas
|
||||||
|
this.tableData.forEach(ele => {
|
||||||
|
res.data.datas.forEach(item => {
|
||||||
|
if (ele.lineName === item.lineName && item.groupClasses != '小计') {
|
||||||
|
item.width = ele.width
|
||||||
|
item.thick = ele.thick
|
||||||
|
item.length = ele.length
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
let obj = res.data.reportAutoYdailyDetRespVO
|
||||||
|
// obj.lineName = '合计'
|
||||||
|
arr.push(obj)
|
||||||
|
// this.tableChildData.push(res.data.reportAutoYdailyRespVO)
|
||||||
|
this.tableDataChild = arr
|
||||||
|
console.log(this.tableDataChild);
|
||||||
|
// this.listQuery.total = res.data.length;
|
||||||
|
this.dataListLoading = false;
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
add0(m) {
|
add0(m) {
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
<!--
|
<!--
|
||||||
* @Author: zhp
|
* @Author: zhp
|
||||||
* @Date: 2024-04-18 15:49:48
|
* @Date: 2024-04-18 15:49:48
|
||||||
* @LastEditTime: 2024-04-18 16:30:42
|
* @LastEditTime: 2024-04-22 16:15:08
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -13,18 +13,21 @@
|
|||||||
<el-button v-if="edit" size="small" @click="handleReturn()">返回</el-button>
|
<el-button v-if="edit" size="small" @click="handleReturn()">返回</el-button>
|
||||||
<el-button v-if="edit" size="small" @click="updateData">保存</el-button>
|
<el-button v-if="edit" size="small" @click="updateData">保存</el-button>
|
||||||
</el-row>
|
</el-row>
|
||||||
<el-table :id="id" :data="data" border style="width: 100%">
|
<el-table :span-method="objectSpanMethod" :id="id" :data="data" border style="width: 100%">
|
||||||
<el-table-column v-for="(item, index) in cols" :key="index" :prop="item.prop" :label="item.label"
|
<el-table-column v-for="(item, index) in cols" :key="index" :prop="item.prop" :label="item.label"
|
||||||
:align="item.align ? item.align : 'left'">
|
:align="item.align ? item.align : 'left'">
|
||||||
|
|
||||||
<el-table-column v-for="(it, index1) in item.children" :key="index1" :prop="it.prop" :label="it.label"
|
<el-table-column v-for="(it, index1) in item.children" :key="index1" :prop="it.prop" :label="it.label"
|
||||||
:align="item.align ? item.align : 'left'">
|
:align="item.align ? item.align : 'left'">
|
||||||
<el-table-column v-for="(y, index2) in it.children" :key="index2" :prop="y.prop" :label="y.label">
|
|
||||||
<template slot-scope="scope">
|
<template slot-scope="scope">
|
||||||
<span v-if="!edit">{{ scope.row[y.prop] }}</span>
|
<span v-if="!edit">{{ scope.row[it.prop] }}</span>
|
||||||
<el-input type="number" @change="handleChange" :disabled="y.prop == 'dailyOutputTrend' || y.prop === 'originalGlassStatisticsTrend'
|
<el-input @change="handleChange"
|
||||||
|| y.prop === 'actualProductTrend' || y.prop === 'originalGlassPassTrend' || y.prop === 'originalGlassPassNow' || y.prop === 'originalGlassPassHis'
|
:disabled="it.label == '生产线' || it.label == '良品重量(吨)' || it.label == '月累计面积'" v-else
|
||||||
" v-else v-model="scope.row[y.prop]"></el-input>
|
v-model="scope.row[it.prop]">
|
||||||
|
</el-input>
|
||||||
</template>
|
</template>
|
||||||
|
<el-table-column v-for="(y, index2) in it.children" :key="index2" :prop="y.prop" :label="y.label">
|
||||||
|
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
</el-table-column>
|
</el-table-column>
|
||||||
@ -35,7 +38,8 @@
|
|||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
import { updateGlass, updateGlassRemark } from '@/api/report/glass';
|
import { updateAutoDailyData } from '@/api/report/qcReport';
|
||||||
|
|
||||||
|
|
||||||
const cols = [
|
const cols = [
|
||||||
{
|
{
|
||||||
@ -227,6 +231,45 @@ const cols = [
|
|||||||
// }
|
// }
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
|
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
||||||
|
let spanOneArr = [], concatOne = 0;
|
||||||
|
this.data.map((item, index) => {
|
||||||
|
if (index === 0) {
|
||||||
|
spanOneArr.push(1);
|
||||||
|
} else {
|
||||||
|
//第一列需合并相同内容的判断条件
|
||||||
|
if (item.lineName === this.data[index - 1].lineName) {
|
||||||
|
spanOneArr[concatOne] += 1;
|
||||||
|
spanOneArr.push(0);
|
||||||
|
} else {
|
||||||
|
spanOneArr.push(1);
|
||||||
|
concatOne = index;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (columnIndex === 0) {
|
||||||
|
const _row = spanOneArr[rowIndex];
|
||||||
|
const _col = _row > 0 ? 1 : 0;
|
||||||
|
return {
|
||||||
|
rowspan: _row,
|
||||||
|
colspan: _col
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// if (columnIndex == 0 ) {
|
||||||
|
// // if (rowIndex == this.data.length-1) {
|
||||||
|
// // console.log(rowIndex)
|
||||||
|
// return {
|
||||||
|
// rowspan: this.data.length - 1,
|
||||||
|
// colspan: 3
|
||||||
|
// };
|
||||||
|
// // } else {
|
||||||
|
// // return {
|
||||||
|
// // rowspan: 0,
|
||||||
|
// // colspan: 0
|
||||||
|
// // };
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
},
|
||||||
handleReturn() {
|
handleReturn() {
|
||||||
this.edit = false
|
this.edit = false
|
||||||
console.log(this.$parent.getDataList());
|
console.log(this.$parent.getDataList());
|
||||||
@ -234,19 +277,8 @@ const cols = [
|
|||||||
handleChange(e) {
|
handleChange(e) {
|
||||||
},
|
},
|
||||||
updateData() {
|
updateData() {
|
||||||
// let obj = {}
|
let data = this.data.slice(0, -1)
|
||||||
// this.data.forEach((ele, index) => {
|
// console.log(obj)
|
||||||
// if (ele.det === false) {
|
|
||||||
// this.data[index].lineId = ''
|
|
||||||
// this.data[index].remark = this.remark
|
|
||||||
// obj = ele
|
|
||||||
// delete this.data[index].dailyOutputTrend
|
|
||||||
// delete this.data[index].originalGlassStatisticsTrend
|
|
||||||
// delete this.data[index].actualProductTrend
|
|
||||||
// delete this.data[index].originalGlassPassTrend
|
|
||||||
// this.data.splice(index, 1)
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
// let updateArr = this.data
|
// let updateArr = this.data
|
||||||
// updateArr.forEach((ele, index) => {
|
// updateArr.forEach((ele, index) => {
|
||||||
// delete ele.dailyOutputTrend
|
// delete ele.dailyOutputTrend
|
||||||
@ -260,12 +292,12 @@ const cols = [
|
|||||||
// delete ele.actualProductTrend
|
// delete ele.actualProductTrend
|
||||||
// delete ele.originalGlassPassTrend
|
// delete ele.originalGlassPassTrend
|
||||||
// });
|
// });
|
||||||
updateGlass(updateArr).then(response => {
|
updateAutoDailyData(data).then(response => {
|
||||||
updateGlassRemark(obj).then(res => {
|
// updateGlassRemark(obj).then(res => {
|
||||||
this.$modal.msgSuccess("修改成功");
|
this.$modal.msgSuccess("修改成功")
|
||||||
this.edit = false;
|
this.edit = false
|
||||||
this.$emit("refreshDataList");
|
// this.$emit("refreshDataList");
|
||||||
});
|
// });
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
252
src/views/report/Environmental/productionDayR/inputTableTwo.vue
Normal file
252
src/views/report/Environmental/productionDayR/inputTableTwo.vue
Normal file
@ -0,0 +1,252 @@
|
|||||||
|
<!--
|
||||||
|
* @Author: zhp
|
||||||
|
* @Date: 2024-04-22 13:18:59
|
||||||
|
* @LastEditTime: 2024-04-22 16:15:14
|
||||||
|
* @LastEditors: zhp
|
||||||
|
* @Description:
|
||||||
|
-->
|
||||||
|
<template>
|
||||||
|
<div>
|
||||||
|
<el-row style="float: right; margin-bottom: 5px">
|
||||||
|
<!-- <el-button v-if="!edit && this.$auth.hasPermi('base:report-auto-original-glass:update')" :disabled="noData"
|
||||||
|
size="small" @click="edit = true">编辑</el-button>
|
||||||
|
<el-button v-if="edit" size="small" @click="handleReturn()">返回</el-button>
|
||||||
|
<el-button v-if="edit" size="small" @click="updateData">保存</el-button> -->
|
||||||
|
</el-row>
|
||||||
|
<el-table style="margin-top:38px;width: 100%" :span-method="objectSpanMethod" :data="data" :id="id" border>
|
||||||
|
<el-table-column v-for="(item, index) in cols" :key="index" :prop="item.prop" :label="item.label"
|
||||||
|
:align="item.align ? item.align : 'left'">
|
||||||
|
<el-table-column v-for="(it, index1) in item.children" :key="index1" :prop="it.prop" :label="it.label"
|
||||||
|
:align="item.align ? item.align : 'left'">
|
||||||
|
<el-table-column v-for="(y, index2) in it.children" :key="index2" :prop="y.prop" :label="y.label">
|
||||||
|
<template slot-scope="scope">
|
||||||
|
<span v-if="!edit">{{ scope.row[y.prop] }}</span>
|
||||||
|
<el-input type="number" @change="handleChange" :disabled="false" v-else v-model="scope.row[y.prop]">
|
||||||
|
</el-input>
|
||||||
|
</template>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table-column>
|
||||||
|
</el-table>
|
||||||
|
<!-- <el-input type="textarea" v-model="remark" placeholder="备注" :disabled="!edit" :autosize="{ minRows: 2, maxRows: 6}">
|
||||||
|
</el-input> -->
|
||||||
|
</div>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
import { updateGlass, updateGlassRemark } from '@/api/report/glass';
|
||||||
|
|
||||||
|
const cols = [
|
||||||
|
{
|
||||||
|
prop: 'xc',
|
||||||
|
// label: '许昌安彩新能科技有限公司2024年4月份生产日报',
|
||||||
|
align: 'center',
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
prop: 'lineName',
|
||||||
|
label: '产线',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'groupClasses',
|
||||||
|
label: '班次',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'tractionSpeed',
|
||||||
|
label: '拉引速度(米/分)',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'width',
|
||||||
|
label: '板宽(mm)',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'weight',
|
||||||
|
label: '板重(g)',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'pullWeight',
|
||||||
|
label: '拉引速度(吨/班)',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'pullArea',
|
||||||
|
label: '拉引面积(平方米)',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'm',
|
||||||
|
label: '尺寸(长、宽、厚)毫米',
|
||||||
|
align: 'center',
|
||||||
|
children: [
|
||||||
|
{
|
||||||
|
prop: 'length',
|
||||||
|
label: '长',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'width',
|
||||||
|
label: '宽',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: 'thick',
|
||||||
|
label: '高',
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
}
|
||||||
|
]
|
||||||
|
export default {
|
||||||
|
props: {
|
||||||
|
data: {
|
||||||
|
type: Array,
|
||||||
|
default: () => [],
|
||||||
|
},
|
||||||
|
id: {
|
||||||
|
type: String,
|
||||||
|
default:'exportTable'
|
||||||
|
},
|
||||||
|
time: {
|
||||||
|
type: Array,
|
||||||
|
default: () => [],
|
||||||
|
},
|
||||||
|
date: {
|
||||||
|
type: String,
|
||||||
|
default:''
|
||||||
|
},
|
||||||
|
sum: {
|
||||||
|
type: Object,
|
||||||
|
default: () => {},
|
||||||
|
},
|
||||||
|
type: {
|
||||||
|
type: Number,
|
||||||
|
default: 3,
|
||||||
|
}
|
||||||
|
},
|
||||||
|
data() {
|
||||||
|
return {
|
||||||
|
cols,
|
||||||
|
remark:null,
|
||||||
|
edit: false,
|
||||||
|
noData:false,
|
||||||
|
};
|
||||||
|
},
|
||||||
|
watch: {
|
||||||
|
data: {
|
||||||
|
handler(newv, oldv) {
|
||||||
|
if (newv.length != 0) {
|
||||||
|
this.noData = false
|
||||||
|
} else {
|
||||||
|
this.noData = true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
time: {
|
||||||
|
immediate: true,
|
||||||
|
handler(newv, oldv) {
|
||||||
|
if (newv[0] !== '') {
|
||||||
|
this.cols[0].label = this.date + '(' + newv[0] + '-' + newv[1] + ')'
|
||||||
|
} else {
|
||||||
|
this.cols[0].label = this.date
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
// type: {
|
||||||
|
// immediate: true,
|
||||||
|
// handler(newv, oldv) {
|
||||||
|
// let text1 = '', text2 = '', text3 = ''
|
||||||
|
// if (newv === 3) {
|
||||||
|
// text1 = '本周'
|
||||||
|
// text2 = '上周'
|
||||||
|
// text3 = '原片合计(片/周)'
|
||||||
|
// } else if (newv === 4) {
|
||||||
|
// text1 = '本月'
|
||||||
|
// text2 = '上月'
|
||||||
|
// text3 = '原片合计(片/月)'
|
||||||
|
// } else if (newv === 2) {
|
||||||
|
// text1 = '今日'
|
||||||
|
// text2 = '昨日'
|
||||||
|
// text3 = '原片合计(片/日)'
|
||||||
|
// } else {
|
||||||
|
// text1 = '本年'
|
||||||
|
// text2 = '上年'
|
||||||
|
// text3 = '原片合计(片/年)'
|
||||||
|
// }
|
||||||
|
// this.cols[0].children[1].children[0].label = text1
|
||||||
|
// this.cols[0].children[1].children[1].label = text2
|
||||||
|
// this.cols[0].children[2].children[0].label = text1
|
||||||
|
// this.cols[0].children[2].children[1].label = text2
|
||||||
|
// this.cols[0].children[3].children[0].label = text1
|
||||||
|
// this.cols[0].children[3].children[1].label = text2
|
||||||
|
// this.cols[0].children[4].children[0].label = text1
|
||||||
|
// this.cols[0].children[4].children[1].label = text2
|
||||||
|
// this.cols[0].children[2].label = text3
|
||||||
|
// }
|
||||||
|
// }
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
||||||
|
let spanOneArr = [], concatOne = 0;
|
||||||
|
this.data.map((item, index) => {
|
||||||
|
if (index === 0) {
|
||||||
|
spanOneArr.push(1);
|
||||||
|
} else {
|
||||||
|
//第一列需合并相同内容的判断条件
|
||||||
|
if (item.lineName === this.data[index - 1].lineName) {
|
||||||
|
spanOneArr[concatOne] += 1;
|
||||||
|
spanOneArr.push(0);
|
||||||
|
} else {
|
||||||
|
spanOneArr.push(1);
|
||||||
|
concatOne = index;
|
||||||
|
};
|
||||||
|
}
|
||||||
|
});
|
||||||
|
if (columnIndex === 0) {
|
||||||
|
const _row = spanOneArr[rowIndex];
|
||||||
|
const _col = _row > 0 ? 1 : 0;
|
||||||
|
return {
|
||||||
|
rowspan: _row,
|
||||||
|
colspan: _col
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
handleReturn() {
|
||||||
|
this.edit = false
|
||||||
|
console.log(this.$parent.getDataList());
|
||||||
|
},
|
||||||
|
handleChange(e) {
|
||||||
|
},
|
||||||
|
updateData() {
|
||||||
|
// let obj = {}
|
||||||
|
// this.data.forEach((ele, index) => {
|
||||||
|
// if (ele.det === false) {
|
||||||
|
// this.data[index].lineId = ''
|
||||||
|
// this.data[index].remark = this.remark
|
||||||
|
// obj = ele
|
||||||
|
// delete this.data[index].dailyOutputTrend
|
||||||
|
// delete this.data[index].originalGlassStatisticsTrend
|
||||||
|
// delete this.data[index].actualProductTrend
|
||||||
|
// delete this.data[index].originalGlassPassTrend
|
||||||
|
// this.data.splice(index, 1)
|
||||||
|
// }
|
||||||
|
// })
|
||||||
|
// let updateArr = this.data
|
||||||
|
// updateArr.forEach((ele, index) => {
|
||||||
|
// delete ele.dailyOutputTrend
|
||||||
|
// delete ele.originalGlassStatisticsTrend
|
||||||
|
// delete ele.actualProductTrend
|
||||||
|
// delete ele.originalGlassPassTrend
|
||||||
|
// });
|
||||||
|
// this.data.forEach((ele, index) => {
|
||||||
|
// delete ele.dailyOutputTrend
|
||||||
|
// delete ele.originalGlassStatisticsTrend
|
||||||
|
// delete ele.actualProductTrend
|
||||||
|
// delete ele.originalGlassPassTrend
|
||||||
|
// });
|
||||||
|
// updateGlass(updateArr).then(response => {
|
||||||
|
// updateGlassRemark(obj).then(res => {
|
||||||
|
// this.$modal.msgSuccess("修改成功");
|
||||||
|
// this.edit = false;
|
||||||
|
// this.$emit("refreshDataList");
|
||||||
|
// });
|
||||||
|
// });
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
</script>
|
@ -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-22 08:48:08
|
* @LastEditTime: 2024-04-22 17:10:49
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -116,10 +116,6 @@ export default {
|
|||||||
},
|
},
|
||||||
codeList: ['sj1', 'sj2', 'sj3', 'sj4', 'sj5', 'sj7', 'sj8', 'sj10', 'sj11', 'sj12', 'sj13', 'sj14'],
|
codeList: ['sj1', 'sj2', 'sj3', 'sj4', 'sj5', 'sj7', 'sj8', 'sj10', 'sj11', 'sj12', 'sj13', 'sj14'],
|
||||||
tableData: [],
|
tableData: [],
|
||||||
listQuery: {
|
|
||||||
productionLineId: 1696716506443354114,
|
|
||||||
startTime: "2024-01-19 07:00:00"
|
|
||||||
},
|
|
||||||
formConfig: [
|
formConfig: [
|
||||||
{
|
{
|
||||||
type: 'datePicker',
|
type: 'datePicker',
|
||||||
@ -157,8 +153,8 @@ export default {
|
|||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
// this.formConfig[1].defaultSelect[]
|
// this.formConfig[1].defaultSelect[]
|
||||||
this.listQuery.startTime = this.formConfig[0].defaultSelect[0]
|
// this.listQuery.startTime = this.formConfig[0].defaultSelect[0]
|
||||||
this.listQuery.endTime = this.formConfig[0].defaultSelect[1]
|
// this.listQuery.endTime = this.formConfig[0].defaultSelect[1]
|
||||||
// this.formConfig[0].defaultSelect[0] = Date.now()-24*60*60-1000
|
// this.formConfig[0].defaultSelect[0] = Date.now()-24*60*60-1000
|
||||||
this.getDataList()
|
this.getDataList()
|
||||||
// this.getSpanArr(this.tableData)
|
// this.getSpanArr(this.tableData)
|
||||||
@ -239,7 +235,10 @@ export default {
|
|||||||
this.dataListLoading = true;
|
this.dataListLoading = true;
|
||||||
// this.listQuery.startTime = '1713197388000';
|
// this.listQuery.startTime = '1713197388000';
|
||||||
// this.listQuery.endTime = '1713254961000';
|
// this.listQuery.endTime = '1713254961000';
|
||||||
this.urlOptions.getDataListURL(this.listQuery).then(res => {
|
this.urlOptions.getDataListURL({
|
||||||
|
productionLineId: '1696716506443354114',
|
||||||
|
startTime: '1705618800000'
|
||||||
|
},).then(res => {
|
||||||
console.log(res.data);
|
console.log(res.data);
|
||||||
// console.log(res)
|
// console.log(res)
|
||||||
// console.log(res.data)
|
// console.log(res.data)
|
||||||
|
@ -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-18 16:26:48
|
* @LastEditTime: 2024-04-22 14:42:31
|
||||||
* @LastEditors: zhp
|
* @LastEditors: zhp
|
||||||
* @Description:
|
* @Description:
|
||||||
-->
|
-->
|
||||||
@ -163,35 +163,35 @@ export default {
|
|||||||
// this.getDict();
|
// this.getDict();
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getSummaries(param) {
|
// getSummaries(param) {
|
||||||
console.log(columns)
|
// console.log(columns)
|
||||||
|
|
||||||
const { columns, data } = param;
|
// const { columns, data } = param;
|
||||||
const sums = [];
|
// const sums = [];
|
||||||
columns.forEach((column, index) => {
|
// columns.forEach((column, index) => {
|
||||||
if (index === 0) {
|
// if (index === 0) {
|
||||||
sums[index] = '合计';
|
// sums[index] = '合计';
|
||||||
return;
|
// return;
|
||||||
}
|
// }
|
||||||
const values = data.map(item => Number(item[column.property]));
|
// const values = data.map(item => Number(item[column.property]));
|
||||||
// const data = data.map(item => !Number(item[column.property]));
|
// // const data = data.map(item => !Number(item[column.property]));
|
||||||
if (!values.every(value => isNaN(value))) {
|
// if (!values.every(value => isNaN(value))) {
|
||||||
sums[index] = values.reduce((prev, curr) => {
|
// sums[index] = values.reduce((prev, curr) => {
|
||||||
const value = Number(curr);
|
// const value = Number(curr);
|
||||||
if (!isNaN(value)) {
|
// if (!isNaN(value)) {
|
||||||
return prev + curr;
|
// return prev + curr;
|
||||||
} else {
|
// } else {
|
||||||
return prev;
|
// return prev;
|
||||||
}
|
// }
|
||||||
}, 0);
|
// }, 0);
|
||||||
sums[index] += ' ';
|
// sums[index] += ' ';
|
||||||
} else {
|
// } else {
|
||||||
sums[index] = '-';
|
// sums[index] = '-';
|
||||||
}
|
// }
|
||||||
});
|
// });
|
||||||
|
|
||||||
return sums;
|
// return sums;
|
||||||
},
|
// },
|
||||||
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
objectSpanMethod({ row, column, rowIndex, columnIndex }) {
|
||||||
let spanOneArr = [], concatOne = 0;
|
let spanOneArr = [], concatOne = 0;
|
||||||
this.tableData.map((item, index) => {
|
this.tableData.map((item, index) => {
|
||||||
|
Loading…
Reference in New Issue
Block a user