Compare commits
No commits in common. "97f9b52e87753988d3c870ca96ac0233a87e679e" and "f08c79fc23f756ef18a7438b2577998ff7011b65" have entirely different histories.
97f9b52e87
...
f08c79fc23
6
.env.dev
6
.env.dev
@ -1,8 +1,8 @@
|
|||||||
###
|
###
|
||||||
# @Author: Do not edit
|
# @Author: Do not edit
|
||||||
# @Date: 2023-08-29 09:40:39
|
# @Date: 2023-08-29 09:40:39
|
||||||
# @LastEditTime: 2023-09-12 14:01:15
|
# @LastEditTime: 2023-09-11 15:55:29
|
||||||
# @LastEditors: zhp
|
# @LastEditors: DY
|
||||||
# @Description:
|
# @Description:
|
||||||
###
|
###
|
||||||
# 开发环境配置
|
# 开发环境配置
|
||||||
@ -12,7 +12,7 @@ ENV = 'development'
|
|||||||
VUE_APP_TITLE = 芋道管理系统
|
VUE_APP_TITLE = 芋道管理系统
|
||||||
|
|
||||||
# 芋道管理系统/开发环境
|
# 芋道管理系统/开发环境
|
||||||
VUE_APP_BASE_API = 'http://192.168.1.188:48080'
|
VUE_APP_BASE_API = 'http://192.168.1.49:48080'
|
||||||
# VUE_APP_BASE_API = 'http://192.168.1.8:48080'
|
# VUE_APP_BASE_API = 'http://192.168.1.8:48080'
|
||||||
# VUE_APP_BASE_API = 'http://192.168.0.33:48080'
|
# VUE_APP_BASE_API = 'http://192.168.0.33:48080'
|
||||||
# VUE_APP_BASE_API = 'http://192.168.1.188:48080'
|
# VUE_APP_BASE_API = 'http://192.168.1.188:48080'
|
||||||
|
@ -1,24 +0,0 @@
|
|||||||
/*
|
|
||||||
* @Author: zhp
|
|
||||||
* @Date: 2023-09-12 14:07:04
|
|
||||||
* @LastEditTime: 2023-09-13 09:53:45
|
|
||||||
* @LastEditors: zhp
|
|
||||||
* @Description:
|
|
||||||
*/
|
|
||||||
import request from '@/utils/request'
|
|
||||||
|
|
||||||
export function getYieldAnalysisPageData(data) {
|
|
||||||
return request({
|
|
||||||
url: '/analysis/production-analysis/getOutput',
|
|
||||||
method: 'post',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
export function getCT(data) {
|
|
||||||
return request({
|
|
||||||
url: '/analysis/production-analysis/getCT',
|
|
||||||
method: 'post',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
@ -1,16 +0,0 @@
|
|||||||
/*
|
|
||||||
* @Author: zhp
|
|
||||||
* @Date: 2023-09-12 14:07:04
|
|
||||||
* @LastEditTime: 2023-09-13 09:46:44
|
|
||||||
* @LastEditors: zhp
|
|
||||||
* @Description:
|
|
||||||
*/
|
|
||||||
import request from '@/utils/request'
|
|
||||||
|
|
||||||
export function getSectionDataSearch(data) {
|
|
||||||
return request({
|
|
||||||
url: '/monitoring/production-monitor/getSectionDataSearch',
|
|
||||||
method: 'post',
|
|
||||||
data: data
|
|
||||||
})
|
|
||||||
}
|
|
@ -1,13 +1,6 @@
|
|||||||
/*
|
|
||||||
* @Author: zhp
|
|
||||||
* @Date: 2023-09-11 16:18:44
|
|
||||||
* @LastEditTime: 2023-09-12 14:25:01
|
|
||||||
* @LastEditors: zhp
|
|
||||||
* @Description:
|
|
||||||
*/
|
|
||||||
import Mock from 'mockjs';
|
import Mock from 'mockjs';
|
||||||
|
|
||||||
const baseURL = 'http://192.168.1.188:48080/admin-api';
|
const baseURL = 'http://192.168.1.49:48080/admin-api';
|
||||||
|
|
||||||
Mock.setup({
|
Mock.setup({
|
||||||
timeout: 200,
|
timeout: 200,
|
||||||
|
@ -1,93 +0,0 @@
|
|||||||
<!--
|
|
||||||
* @Author: zhp
|
|
||||||
* @Date: 2023-09-13 09:02:25
|
|
||||||
* @LastEditTime: 2023-09-13 10:33:20
|
|
||||||
* @LastEditors: zhp
|
|
||||||
* @Description:
|
|
||||||
-->
|
|
||||||
<template>
|
|
||||||
<div :class="className" :style="{height:height,width:width}" />
|
|
||||||
</template>
|
|
||||||
|
|
||||||
<script>
|
|
||||||
import * as echarts from 'echarts'
|
|
||||||
require('echarts/theme/macarons') // echarts theme
|
|
||||||
// import resize from './mixins/resize'
|
|
||||||
|
|
||||||
export default {
|
|
||||||
// mixins: [resize],
|
|
||||||
props: {
|
|
||||||
className: {
|
|
||||||
type: String,
|
|
||||||
default: 'chart'
|
|
||||||
},
|
|
||||||
width: {
|
|
||||||
type: String,
|
|
||||||
default: '100%'
|
|
||||||
},
|
|
||||||
height: {
|
|
||||||
type: String,
|
|
||||||
default: '350px'
|
|
||||||
},
|
|
||||||
// autoResize: {
|
|
||||||
// type: Boolean,
|
|
||||||
// default: true
|
|
||||||
// }
|
|
||||||
},
|
|
||||||
data() {
|
|
||||||
return {
|
|
||||||
chart: null
|
|
||||||
}
|
|
||||||
},
|
|
||||||
// watch: {
|
|
||||||
// chartData: {
|
|
||||||
// deep: true,
|
|
||||||
// handler(val) {
|
|
||||||
// this.setOptions(val)
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// },
|
|
||||||
mounted() {
|
|
||||||
// this.$nextTick(() => {
|
|
||||||
// this.initChart()
|
|
||||||
// })
|
|
||||||
},
|
|
||||||
// beforeDestroy() {
|
|
||||||
// if (!this.chart) {
|
|
||||||
// return
|
|
||||||
// }
|
|
||||||
// this.chart.dispose()
|
|
||||||
// this.chart = null
|
|
||||||
// },
|
|
||||||
methods: {
|
|
||||||
initChart(xData, yData,lineName) {
|
|
||||||
console.log(xData,yData);
|
|
||||||
this.chart = echarts.init(this.$el, 'macarons')
|
|
||||||
this.setOptions(xData, yData, lineName)
|
|
||||||
},
|
|
||||||
setOptions(xData, yData, lineName) {
|
|
||||||
let seriesData = []
|
|
||||||
lineName.forEach((item,index) => {
|
|
||||||
seriesData.push({
|
|
||||||
name: item,
|
|
||||||
data: yData[index],
|
|
||||||
type: 'line',
|
|
||||||
})
|
|
||||||
})
|
|
||||||
this.chart.setOption({
|
|
||||||
xAxis: {
|
|
||||||
type: 'category',
|
|
||||||
data: xData
|
|
||||||
},
|
|
||||||
legend: {
|
|
||||||
data:lineName
|
|
||||||
},
|
|
||||||
yAxis: {
|
|
||||||
type: 'value'
|
|
||||||
},
|
|
||||||
series: seriesData
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
</script>
|
|
@ -1,200 +1,159 @@
|
|||||||
|
<!--
|
||||||
|
* @Author: zhp
|
||||||
|
* @Date: 2023-09-11 14:21:21
|
||||||
|
* @LastEditTime: 2023-09-11 14:26:04
|
||||||
|
* @LastEditors: zhp
|
||||||
|
* @Description:
|
||||||
|
-->
|
||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
|
<search-bar
|
||||||
<base-table v-loading="dataListLoading" :table-props="tableProps" :table-data="tableData" />
|
:formConfigs="formConfig"
|
||||||
<line-chart ref="lineChart" />
|
ref="searchBarForm"
|
||||||
<!-- <pagination
|
@headBtnClick="buttonClick" />
|
||||||
|
<base-table
|
||||||
|
v-loading="dataListLoading"
|
||||||
|
:table-props="tableProps"
|
||||||
|
:page="listQuery.pageNo"
|
||||||
|
:limit="listQuery.pageSize"
|
||||||
|
:table-data="tableData" />
|
||||||
|
<pagination
|
||||||
:limit.sync="listQuery.pageSize"
|
:limit.sync="listQuery.pageSize"
|
||||||
:page.sync="listQuery.pageNo"
|
:page.sync="listQuery.pageNo"
|
||||||
:total="listQuery.total"
|
:total="listQuery.total"
|
||||||
@pagination="getDataList" /> -->
|
@pagination="getDataList" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// import basicPage from '../../mixins/basic-page';
|
import basicPage from '../../mixins/basic-page';
|
||||||
import { parseTime } from '../../mixins/code-filter';
|
import { parseTime } from '../../mixins/code-filter';
|
||||||
import { getCT } from '@/api/core/analysis/index';
|
import { getLineBindProductLogPage } from '@/api/core/base/lineBindProductLog';
|
||||||
import { getProductionLinePage } from '@/api/core/base/productionLine';
|
import { getProductionLinePage } from '@/api/core/base/productionLine';
|
||||||
import lineChart from '../LineChart'
|
import { getWorkshopSectionPage } from '@/api/core/base/workshopSection';
|
||||||
// import { getWorkshopSectionPage } from '@/api/core/base/workshopSection';
|
|
||||||
|
|
||||||
// const tableProps = [
|
const tableProps = [
|
||||||
// // {
|
{
|
||||||
// // prop: 'lineName',
|
prop: 'productionLineName',
|
||||||
// // label: '产线',
|
label: '产线名称',
|
||||||
// // align: 'center',
|
align: 'center',
|
||||||
// // },
|
},
|
||||||
// // {
|
{
|
||||||
// // prop: 'sum',
|
prop: '',
|
||||||
// // label: '合计',
|
label: '工段名称',
|
||||||
// // align: 'center',
|
align: 'center',
|
||||||
// // },
|
},
|
||||||
// // {
|
{
|
||||||
// // prop: 'dynamicValue',
|
prop: '',
|
||||||
// // label: 'dynamicName',
|
label: '进片数量/片',
|
||||||
// // align: 'center',
|
align: 'center',
|
||||||
// // children:[
|
},
|
||||||
|
{
|
||||||
// // ]
|
prop: '',
|
||||||
// // }
|
label: '出片数量/片',
|
||||||
// ];
|
align: 'center',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: '',
|
||||||
|
label: '损耗数量/片',
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: '',
|
||||||
|
label: '损耗面积/m²',
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: '',
|
||||||
|
label: '损耗比例/%',
|
||||||
|
align: 'center',
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
mixins: [basicPage],
|
||||||
lineChart,
|
data() {
|
||||||
},
|
return {
|
||||||
// mixins: [basicPage],
|
urlOptions: {
|
||||||
data() {
|
getDataListURL: getLineBindProductLogPage,
|
||||||
return {
|
},
|
||||||
urlOptions: {
|
tableProps,
|
||||||
getDataListURL: getCT,
|
tableData: [],
|
||||||
},
|
optionArrUrl: [getProductionLinePage, getWorkshopSectionPage],
|
||||||
tableProps: [],
|
formConfig: [
|
||||||
dataListLoading: false,
|
{
|
||||||
tableData: [],
|
type: 'select',
|
||||||
listQuery: {
|
label: '产线',
|
||||||
// time: ''
|
selectOptions: [],
|
||||||
endTime: undefined,
|
param: 'productionLineId',
|
||||||
lineId:undefined,
|
defaultSelect: '',
|
||||||
startTime:undefined
|
filterable: true,
|
||||||
},
|
},
|
||||||
xData: [],
|
{
|
||||||
yData: [],
|
type: 'datePicker',
|
||||||
optionArrUrl: [getProductionLinePage],
|
label: '时间',
|
||||||
formConfig: [
|
dateType: 'daterange',
|
||||||
{
|
format: 'yyyy-MM-dd',
|
||||||
type: 'select',
|
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
||||||
label: '产线',
|
rangeSeparator: '-',
|
||||||
selectOptions: [],
|
startPlaceholder: '开始时间',
|
||||||
param: 'lineIds',
|
endPlaceholder: '结束时间',
|
||||||
defaultSelect: '',
|
param: 'createTime',
|
||||||
multiple: true,
|
},
|
||||||
filterable: true,
|
{
|
||||||
},
|
type: 'button',
|
||||||
{
|
btnName: '搜索',
|
||||||
type: 'datePicker',
|
name: 'search',
|
||||||
label: '时间',
|
color: 'primary',
|
||||||
dateType: 'datetime',
|
},
|
||||||
format: 'yyyy-MM-dd',
|
{
|
||||||
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
type: 'button',
|
||||||
rangeSeparator: '-',
|
btnName: '导出',
|
||||||
startPlaceholder: '开始时间',
|
name: 'export',
|
||||||
endPlaceholder: '结束时间',
|
},
|
||||||
param: 'time',
|
],
|
||||||
},
|
};
|
||||||
{
|
},
|
||||||
type: 'button',
|
components: {
|
||||||
btnName: '搜索',
|
},
|
||||||
name: 'search',
|
created() {
|
||||||
color: 'primary',
|
this.getArr();
|
||||||
}
|
},
|
||||||
],
|
methods: {
|
||||||
};
|
getArr() {
|
||||||
},
|
const params = {
|
||||||
created() {
|
page: 1,
|
||||||
this.getArr();
|
limit: 500,
|
||||||
},
|
};
|
||||||
methods: {
|
this.optionArrUrl.forEach((item, index) => {
|
||||||
getArr() {
|
item(params).then((response) => {
|
||||||
const params = {
|
this.formConfig[index].selectOptions = response.data.list;
|
||||||
page: 1,
|
});
|
||||||
limit: 500,
|
});
|
||||||
};
|
},
|
||||||
this.optionArrUrl.forEach((item, index) => {
|
buttonClick(val) {
|
||||||
item(params).then((response) => {
|
switch (val.btnName) {
|
||||||
this.formConfig[index].selectOptions = response.data.list
|
case 'search':
|
||||||
});
|
this.listQuery.pageNo = 1;
|
||||||
});
|
this.listQuery.pageSize = 10;
|
||||||
},
|
this.listQuery.productionLineId = val.productionLineId;
|
||||||
getData() {
|
this.listQuery.productId = val.productId;
|
||||||
this.listQuery.lineId = '1672847052717821953'
|
this.listQuery.createTime = val.createTime;
|
||||||
this.listQuery.startTime = '1693497600000';
|
this.getDataList();
|
||||||
this.listQuery.endTime = '1693843200000';
|
break;
|
||||||
this.urlOptions.getDataListURL(this.listQuery).then(res => {
|
case 'reset':
|
||||||
console.log(res)
|
this.$refs.searchBarForm.resetForm();
|
||||||
let arr = [
|
this.listQuery = {
|
||||||
{
|
pageSize: 10,
|
||||||
prop: 'sectionName',
|
pageNo: 1,
|
||||||
label: '工段',
|
total: 1,
|
||||||
align: 'center',
|
};
|
||||||
},
|
this.getDataList();
|
||||||
{
|
break;
|
||||||
prop: 'equName',
|
default:
|
||||||
label: '设备',
|
console.log(val);
|
||||||
align: 'center',
|
}
|
||||||
},
|
},
|
||||||
]
|
},
|
||||||
let eqArr= []
|
|
||||||
res.data.data.forEach((ele, index) => {
|
|
||||||
console.log(ele);
|
|
||||||
eqArr.push(ele.equName)
|
|
||||||
})
|
|
||||||
console.log(eqArr)
|
|
||||||
// console.log(res.data.nameData.slice(1))
|
|
||||||
res.data.nameData.forEach(item => {
|
|
||||||
if (eqArr[0] === item.parentId) {
|
|
||||||
const props = {
|
|
||||||
'prop': item.name,
|
|
||||||
'label': item.name,
|
|
||||||
'align': 'center'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
arr[2].children.push(props)
|
|
||||||
})
|
|
||||||
let obj = {
|
|
||||||
lineName: res.data.data[0].lineName,
|
|
||||||
sum: res.data.data[0].sum,
|
|
||||||
}
|
|
||||||
res.data.data[0].data[0].children.forEach((item, index) => {
|
|
||||||
console.log(item)
|
|
||||||
// let data = 'data' + Number(index+1)
|
|
||||||
obj['' + item.dynamicName + ''] = item.dynamicValue
|
|
||||||
})
|
|
||||||
this.tableData = [obj]
|
|
||||||
console.log(this.tableData)
|
|
||||||
console.log(arr)
|
|
||||||
this.tableProps = arr
|
|
||||||
let xData = []
|
|
||||||
|
|
||||||
res.data.nameData.forEach(item => {
|
|
||||||
xData.push(item.name)
|
|
||||||
// arr[2].children.push(props)
|
|
||||||
})
|
|
||||||
let yData = []
|
|
||||||
res.data.data[0].data[0].children.forEach((item, index) => {
|
|
||||||
// console.log(item)
|
|
||||||
yData.push(item.dynamicValue)
|
|
||||||
// let data = 'data' + Number(index+1)
|
|
||||||
// obj['' + item.dynamicName + ''] = item.dynamicValue
|
|
||||||
})
|
|
||||||
console.log(this.yData)
|
|
||||||
this.$refs.lineChart.initChart(xData, yData)
|
|
||||||
// this.total = response.data.total;
|
|
||||||
// this.dataListLoading = false;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
buttonClick(val) {
|
|
||||||
// console.log(val)
|
|
||||||
switch (val.btnName) {
|
|
||||||
case 'search':
|
|
||||||
// this.listQuery.pageNo = 1;
|
|
||||||
// this.listQuery.pageSize = 10;
|
|
||||||
this.getData()
|
|
||||||
break;
|
|
||||||
case 'reset':
|
|
||||||
this.$refs.searchBarForm.resetForm();
|
|
||||||
this.listQuery = {
|
|
||||||
pageSize: 10,
|
|
||||||
pageNo: 1,
|
|
||||||
total: 1,
|
|
||||||
};
|
|
||||||
this.getDataList();
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
console.log(val);
|
|
||||||
}
|
|
||||||
},
|
|
||||||
},
|
|
||||||
};
|
};
|
||||||
</script>
|
</script>
|
||||||
|
@ -1,95 +1,114 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="app-container">
|
<div class="app-container">
|
||||||
<search-bar :formConfigs="formConfig" ref="searchBarForm" @headBtnClick="buttonClick" />
|
<search-bar
|
||||||
<base-table v-loading="dataListLoading" :table-props="tableProps" :table-data="tableData" />
|
:formConfigs="formConfig"
|
||||||
<line-chart ref="lineChart" />
|
ref="searchBarForm"
|
||||||
<!-- <pagination
|
@headBtnClick="buttonClick" />
|
||||||
|
<base-table
|
||||||
|
v-loading="dataListLoading"
|
||||||
|
:table-props="tableProps"
|
||||||
|
:page="listQuery.pageNo"
|
||||||
|
:limit="listQuery.pageSize"
|
||||||
|
:table-data="tableData" />
|
||||||
|
<pagination
|
||||||
:limit.sync="listQuery.pageSize"
|
:limit.sync="listQuery.pageSize"
|
||||||
:page.sync="listQuery.pageNo"
|
:page.sync="listQuery.pageNo"
|
||||||
:total="listQuery.total"
|
:total="listQuery.total"
|
||||||
@pagination="getDataList" /> -->
|
@pagination="getDataList" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// import basicPage from '../../mixins/basic-page';
|
import basicPage from '../../mixins/basic-page';
|
||||||
import { parseTime } from '../../mixins/code-filter';
|
import { parseTime } from '../../mixins/code-filter';
|
||||||
import { getYieldAnalysisPageData } from '@/api/core/analysis/index';
|
import { getLineBindProductLogPage } from '@/api/core/base/lineBindProductLog';
|
||||||
import { getProductionLinePage } from '@/api/core/base/productionLine';
|
import { getProductionLinePage } from '@/api/core/base/productionLine';
|
||||||
import lineChart from '../LineChart'
|
import { getWorkshopSectionPage } from '@/api/core/base/workshopSection';
|
||||||
// import { getWorkshopSectionPage } from '@/api/core/base/workshopSection';
|
|
||||||
|
|
||||||
// const tableProps = [
|
const tableProps = [
|
||||||
// // {
|
{
|
||||||
// // prop: 'lineName',
|
prop: 'productionLineName',
|
||||||
// // label: '产线',
|
label: '产线',
|
||||||
// // align: 'center',
|
align: 'center',
|
||||||
// // },
|
},
|
||||||
// // {
|
{
|
||||||
// // prop: 'sum',
|
prop: '',
|
||||||
// // label: '合计',
|
label: '合计',
|
||||||
// // align: 'center',
|
align: 'center',
|
||||||
// // },
|
},
|
||||||
// // {
|
{
|
||||||
// // prop: 'dynamicValue',
|
prop: '',
|
||||||
// // label: 'dynamicName',
|
label: '进片数量/片',
|
||||||
// // align: 'center',
|
align: 'center',
|
||||||
// // children:[
|
},
|
||||||
|
{
|
||||||
// // ]
|
prop: '',
|
||||||
// // }
|
label: '出片数量/片',
|
||||||
// ];
|
align: 'center',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: '',
|
||||||
|
label: '损耗数量/片',
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: '',
|
||||||
|
label: '损耗面积/m²',
|
||||||
|
align: 'center',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
prop: '',
|
||||||
|
label: '损耗比例/%',
|
||||||
|
align: 'center',
|
||||||
|
}
|
||||||
|
];
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
components: {
|
mixins: [basicPage],
|
||||||
lineChart,
|
|
||||||
},
|
|
||||||
// mixins: [basicPage],
|
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
urlOptions: {
|
urlOptions: {
|
||||||
getDataListURL: getYieldAnalysisPageData,
|
getDataListURL: getLineBindProductLogPage,
|
||||||
},
|
},
|
||||||
tableProps:[],
|
tableProps,
|
||||||
dataListLoading:false,
|
tableData: [],
|
||||||
tableData: [],
|
optionArrUrl: [getProductionLinePage, getWorkshopSectionPage],
|
||||||
listQuery: {
|
|
||||||
lineIds: [],
|
|
||||||
time: ''
|
|
||||||
},
|
|
||||||
xData: [],
|
|
||||||
yData:[],
|
|
||||||
optionArrUrl: [getProductionLinePage ],
|
|
||||||
formConfig: [
|
formConfig: [
|
||||||
{
|
{
|
||||||
type: 'select',
|
type: 'select',
|
||||||
label: '产线',
|
label: '产线',
|
||||||
selectOptions: [],
|
selectOptions: [],
|
||||||
param: 'lineIds',
|
param: 'productionLineId',
|
||||||
defaultSelect: '',
|
defaultSelect: '',
|
||||||
multiple:true,
|
|
||||||
filterable: true,
|
filterable: true,
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'datePicker',
|
type: 'datePicker',
|
||||||
label: '时间',
|
label: '时间',
|
||||||
dateType: 'datetime',
|
dateType: 'daterange',
|
||||||
format: 'yyyy-MM-dd',
|
format: 'yyyy-MM-dd',
|
||||||
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
||||||
rangeSeparator: '-',
|
rangeSeparator: '-',
|
||||||
startPlaceholder: '开始时间',
|
startPlaceholder: '开始时间',
|
||||||
endPlaceholder: '结束时间',
|
endPlaceholder: '结束时间',
|
||||||
param: 'time',
|
param: 'createTime',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'button',
|
type: 'button',
|
||||||
btnName: '搜索',
|
btnName: '搜索',
|
||||||
name: 'search',
|
name: 'search',
|
||||||
color: 'primary',
|
color: 'primary',
|
||||||
}
|
},
|
||||||
|
{
|
||||||
|
type: 'button',
|
||||||
|
btnName: '导出',
|
||||||
|
name: 'export',
|
||||||
|
},
|
||||||
],
|
],
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
components: {
|
||||||
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getArr();
|
this.getArr();
|
||||||
},
|
},
|
||||||
@ -101,109 +120,19 @@ export default {
|
|||||||
};
|
};
|
||||||
this.optionArrUrl.forEach((item, index) => {
|
this.optionArrUrl.forEach((item, index) => {
|
||||||
item(params).then((response) => {
|
item(params).then((response) => {
|
||||||
this.formConfig[index].selectOptions = response.data.list
|
this.formConfig[index].selectOptions = response.data.list;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getData() {
|
buttonClick(val) {
|
||||||
// this.listQuery.lineIds = ['1672847052717821953']
|
|
||||||
// this.listQuery.productId = val.productId;
|
|
||||||
// this.listQuery.time = '1694486098000';
|
|
||||||
this.urlOptions.getDataListURL(this.listQuery).then(res => {
|
|
||||||
let arr = [
|
|
||||||
{
|
|
||||||
prop: 'lineName',
|
|
||||||
label: '产线',
|
|
||||||
align: 'center',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: 'sum',
|
|
||||||
label: '合计',
|
|
||||||
align: 'center',
|
|
||||||
},
|
|
||||||
{
|
|
||||||
prop: res.data.nameData[0].name,
|
|
||||||
label: res.data.nameData[0].name,
|
|
||||||
align: 'center',
|
|
||||||
children:[
|
|
||||||
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
console.log(res.data.nameData.slice(1))
|
|
||||||
res.data.nameData.slice(1).forEach(item => {
|
|
||||||
const props = {
|
|
||||||
'prop': item.name,
|
|
||||||
'label': item.name,
|
|
||||||
'align': 'center'
|
|
||||||
}
|
|
||||||
arr[2].children.push(props)
|
|
||||||
})
|
|
||||||
let tableDataArr =[]
|
|
||||||
res.data.data.forEach(item => {
|
|
||||||
let obj = {}
|
|
||||||
obj.lineName= item.lineName,
|
|
||||||
obj.sum= item.sum,
|
|
||||||
item.data.forEach((ele, index) => {
|
|
||||||
// console.log(ele)
|
|
||||||
ele.children.forEach((e) => {
|
|
||||||
console.log(e.dynamicName)
|
|
||||||
obj['' + e.dynamicName + ''] = e.dynamicValue
|
|
||||||
console.log(obj['' + e.dynamicName + '']);
|
|
||||||
})
|
|
||||||
})
|
|
||||||
tableDataArr.push(obj)
|
|
||||||
});
|
|
||||||
this.tableData = tableDataArr
|
|
||||||
console.log(this.tableData)
|
|
||||||
console.log(arr)
|
|
||||||
this.tableProps = arr
|
|
||||||
let xData = []
|
|
||||||
|
|
||||||
res.data.nameData.slice(1).forEach(item => {
|
|
||||||
xData.push(item.name)
|
|
||||||
// arr[2].children.push(props)
|
|
||||||
})
|
|
||||||
let yAllData = []
|
|
||||||
let lineName = []
|
|
||||||
res.data.data.forEach(item => {
|
|
||||||
let yData = []
|
|
||||||
lineName.push(item.lineName)
|
|
||||||
// let obj = {}
|
|
||||||
// obj.lineName = item.lineName,
|
|
||||||
// obj.sum = item.sum,
|
|
||||||
item.data.forEach((ele, index) => {
|
|
||||||
// console.log(ele)
|
|
||||||
ele.children.forEach((e) => {
|
|
||||||
// let yData = []
|
|
||||||
yData.push(e.dynamicValue)
|
|
||||||
})
|
|
||||||
})
|
|
||||||
yAllData.push(yData)
|
|
||||||
});
|
|
||||||
console.log(lineName)
|
|
||||||
// res.data.data[0].data[0].children.forEach((item, index) => {
|
|
||||||
// // console.log(item)
|
|
||||||
// yData.push(item.dynamicValue)
|
|
||||||
// // let data = 'data' + Number(index+1)
|
|
||||||
// // obj['' + item.dynamicName + ''] = item.dynamicValue
|
|
||||||
// })
|
|
||||||
// console.log(this.yData)
|
|
||||||
this.$refs.lineChart.initChart(xData, yAllData, lineName)
|
|
||||||
// this.total = response.data.total;
|
|
||||||
// this.dataListLoading = false;
|
|
||||||
});
|
|
||||||
},
|
|
||||||
buttonClick(val) {
|
|
||||||
// console.log(val)
|
|
||||||
switch (val.btnName) {
|
switch (val.btnName) {
|
||||||
case 'search':
|
case 'search':
|
||||||
this.listQuery.lineIds = val.lineIds ? val.lineIds :undefined
|
this.listQuery.pageNo = 1;
|
||||||
// this.listQuery.productId = val.productId;
|
this.listQuery.pageSize = 10;
|
||||||
this.listQuery.time = val.time ? new Date(val.time).getTime() : undefined
|
this.listQuery.productionLineId = val.productionLineId;
|
||||||
// this.listQuery.pageNo = 1;
|
this.listQuery.productId = val.productId;
|
||||||
// this.listQuery.pageSize = 10;
|
this.listQuery.createTime = val.createTime;
|
||||||
this.getData()
|
this.getDataList();
|
||||||
break;
|
break;
|
||||||
case 'reset':
|
case 'reset':
|
||||||
this.$refs.searchBarForm.resetForm();
|
this.$refs.searchBarForm.resetForm();
|
||||||
|
@ -7,82 +7,78 @@
|
|||||||
<base-table
|
<base-table
|
||||||
v-loading="dataListLoading"
|
v-loading="dataListLoading"
|
||||||
:table-props="tableProps"
|
:table-props="tableProps"
|
||||||
|
:page="listQuery.pageNo"
|
||||||
|
:limit="listQuery.pageSize"
|
||||||
:table-data="tableData" />
|
:table-data="tableData" />
|
||||||
<!-- <pagination
|
<pagination
|
||||||
:limit.sync="listQuery.pageSize"
|
:limit.sync="listQuery.pageSize"
|
||||||
:page.sync="listQuery.pageNo"
|
:page.sync="listQuery.pageNo"
|
||||||
:total="listQuery.total"
|
:total="listQuery.total"
|
||||||
@pagination="getDataList" /> -->
|
@pagination="getDataList" />
|
||||||
</div>
|
</div>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
// import basicPage from '../../mixins/basic-page';
|
import basicPage from '../../mixins/basic-page';
|
||||||
import { parseTime } from '../../mixins/code-filter';
|
import { parseTime } from '../../mixins/code-filter';
|
||||||
import { getSectionDataSearch } from '@/api/core/monitoring';
|
import { getLineBindProductLogPage } from '@/api/core/base/lineBindProductLog';
|
||||||
import { getProductionLinePage } from '@/api/core/base/productionLine';
|
import { getProductionLinePage } from '@/api/core/base/productionLine';
|
||||||
import { getWorkshopSectionPage } from '@/api/core/base/workshopSection';
|
import { getWorkshopSectionPage } from '@/api/core/base/workshopSection';
|
||||||
|
|
||||||
const tableProps = [
|
const tableProps = [
|
||||||
{
|
{
|
||||||
prop: 'proLineName',
|
prop: 'productionLineName',
|
||||||
label: '产线名称',
|
label: '产线名称',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'sectionName',
|
prop: '',
|
||||||
label: '工段名称',
|
label: '工段名称',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'inputNum',
|
prop: '',
|
||||||
label: '进片数量/片',
|
label: '进片数量/片',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'outputNum',
|
prop: '',
|
||||||
label: '出片数量/片',
|
label: '出片数量/片',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'lossNum',
|
prop: '',
|
||||||
label: '损耗数量/片',
|
label: '损耗数量/片',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'lossArea',
|
prop: '',
|
||||||
label: '损耗面积/m²',
|
label: '损耗面积/m²',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
prop: 'lossRate',
|
prop: '',
|
||||||
label: '损耗比例/%',
|
label: '损耗比例/%',
|
||||||
align: 'center',
|
align: 'center',
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
// mixins: [basicPage],
|
mixins: [basicPage],
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
urlOptions: {
|
urlOptions: {
|
||||||
getDataListURL: getSectionDataSearch,
|
getDataListURL: getLineBindProductLogPage,
|
||||||
},
|
},
|
||||||
tableProps,
|
tableProps,
|
||||||
tableData: [],
|
tableData: [],
|
||||||
listQuery: {
|
|
||||||
proLineId:undefined,
|
|
||||||
sectionId: undefined,
|
|
||||||
startTime: undefined,
|
|
||||||
endTime: undefined,
|
|
||||||
},
|
|
||||||
optionArrUrl: [getProductionLinePage, getWorkshopSectionPage],
|
optionArrUrl: [getProductionLinePage, getWorkshopSectionPage],
|
||||||
formConfig: [
|
formConfig: [
|
||||||
{
|
{
|
||||||
type: 'select',
|
type: 'select',
|
||||||
label: '产线',
|
label: '产线',
|
||||||
selectOptions: [],
|
selectOptions: [],
|
||||||
param: 'proLineId',
|
param: 'productionLineId',
|
||||||
defaultSelect: '',
|
defaultSelect: '',
|
||||||
filterable: true,
|
filterable: true,
|
||||||
},
|
},
|
||||||
@ -90,7 +86,7 @@ export default {
|
|||||||
type: 'select',
|
type: 'select',
|
||||||
label: '工段',
|
label: '工段',
|
||||||
selectOptions: [],
|
selectOptions: [],
|
||||||
param: 'sectionId',
|
param: 'productId',
|
||||||
defaultSelect: '',
|
defaultSelect: '',
|
||||||
filterable: true,
|
filterable: true,
|
||||||
},
|
},
|
||||||
@ -103,7 +99,7 @@ export default {
|
|||||||
rangeSeparator: '-',
|
rangeSeparator: '-',
|
||||||
startPlaceholder: '开始时间',
|
startPlaceholder: '开始时间',
|
||||||
endPlaceholder: '结束时间',
|
endPlaceholder: '结束时间',
|
||||||
param: 'timeSlot',
|
param: 'createTime',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
type: 'button',
|
type: 'button',
|
||||||
@ -122,8 +118,7 @@ export default {
|
|||||||
components: {
|
components: {
|
||||||
},
|
},
|
||||||
created() {
|
created() {
|
||||||
this.getArr();
|
this.getArr();
|
||||||
this.getDataList()
|
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
getArr() {
|
getArr() {
|
||||||
@ -136,30 +131,16 @@ export default {
|
|||||||
this.formConfig[index].selectOptions = response.data.list;
|
this.formConfig[index].selectOptions = response.data.list;
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
getDataList() {
|
buttonClick(val) {
|
||||||
// this.listQuery.proLineId = '1672847052717821953';
|
switch (val.btnName) {
|
||||||
// this.listQuery.startTime = '1690626657000'
|
case 'search':
|
||||||
// this.listQuery.endTime = '1693564257000'
|
this.listQuery.pageNo = 1;
|
||||||
this.urlOptions.getDataListURL(this.listQuery).then(res => {
|
this.listQuery.pageSize = 10;
|
||||||
this.tableData = res.data
|
this.listQuery.productionLineId = val.productionLineId;
|
||||||
// this.total = response.data.total;
|
this.listQuery.productId = val.productId;
|
||||||
this.dataListLoading = false;
|
this.listQuery.createTime = val.createTime;
|
||||||
});
|
this.getDataList();
|
||||||
},
|
|
||||||
buttonClick(val) {
|
|
||||||
console.log(val)
|
|
||||||
switch (val.btnName) {
|
|
||||||
case 'search':
|
|
||||||
console.log(val.timeSlot);
|
|
||||||
|
|
||||||
// this.listQuery.pageNo = 1;
|
|
||||||
// this.listQuery.pageSize = 10;
|
|
||||||
this.listQuery.proLineId = val.proLineId ? val.proLineId : undefined
|
|
||||||
this.listQuery.sectionId = val.sectionId ? val.sectionId : undefined
|
|
||||||
this.listQuery.startTime = val.timeSlot ? new Date(val.timeSlot[0]).getTime() : undefined
|
|
||||||
this.listQuery.endTime = val.timeSlot ? new Date(val.timeSlot[1]).getTime() : undefined
|
|
||||||
this.getDataList();
|
|
||||||
break;
|
break;
|
||||||
case 'reset':
|
case 'reset':
|
||||||
this.$refs.searchBarForm.resetForm();
|
this.$refs.searchBarForm.resetForm();
|
||||||
|
Loading…
Reference in New Issue
Block a user