projects/mesxc-zhp #234

Merged
juzi merged 2 commits from projects/mesxc-zhp into projects/mesxc-test 2024-03-07 16:33:39 +08:00
11 changed files with 221 additions and 128 deletions

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2021-07-19 15:18:30
* @LastEditors: zhp
* @LastEditTime: 2024-03-06 10:57:52
* @LastEditTime: 2024-03-06 12:01:10
* @Description:
-->
<template>
@ -632,12 +632,12 @@ export default {
])
this.eqConfig.data = eqArr
this.$refs['eqScrollBoard'].updateRows(eqArr)
this.$refs.productLineChart.initChart(['D61', 'D62', 'D63', 'D64', 'D65',], [98, 97, 98.7, 98.5, 98.3,], [3134, 2323, 3232, 3233, 2321])
this.getList()
this.initWebSocket()
this.SJGInitWebSocket()
this.getTimes()
// this.$refs.EnergyMonitoringChart.initChart(['Y61', 'Y62', 'Y63', 'Y64', 'Y65',], [3134, 2323, 3232, 3233, 2321])
this.$refs.productLineChart.initChart(['D61', 'D62', 'D63', 'D64', 'D65',], [98, 97, 98.7, 98.5, 98.3,], [3134, 2323, 3232, 3233, 2321])
const _this = this;
_this.beilv2 = document.documentElement.clientWidth / 1920
window.onresize = () => {

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2024-01-24 15:15:24
* @LastEditTime: 2024-03-05 09:36:28
* @LastEditTime: 2024-03-07 16:21:26
* @LastEditors: zhp
* @Description:
-->
@ -21,7 +21,7 @@
</el-form-item>
</el-form>
</div>
<inputTable :data="tableData" :time="[startTimeStamp, endTimeStamp]" :sum="all" :type="listQuery.reportType"
<inputTable :date="date" :data="tableData" :time="[startTimeStamp, endTimeStamp]" :sum="all" :type="listQuery.reportType"
@refreshDataList="getDataList" />
<!-- <pagination
:limit.sync="listQuery.pageSize"
@ -52,7 +52,8 @@ export default {
total: 0,
reportType: 2,
reportTime: []
},
},
date:'许昌安彩日原片生产汇总',
reportTime: '',
startTimeStamp: '',
endTimeStamp: '',
@ -75,14 +76,34 @@ export default {
const res = await getCorePLList();
this.proLineList = res.data;
},
//
//
multipliedByHundred(str) {
let floatVal = parseFloat(str);
if (isNaN(floatVal)) {
return 0;
}
floatVal = Math.round(str * 10000) / 100;
let strVal = floatVal.toString();
let searchVal = strVal.indexOf('.');
if (searchVal < 0) {
searchVal = strVal.length;
strVal += '.';
}
while (strVal.length <= searchVal + 2) {
strVal += '0';
}
return parseFloat(strVal);
},
async getDataList() {
this.dataListLoading = true;
await this.urlOptions.getDataListURL(this.listQuery).then(response => {
this.tableData = response.data.filter(item => {
this.proLineList.forEach(it => {
if (item.lineId === it.id) {
item.lineName = it.name
item.lineName = it.name
item.originalGlassStatisticsTrend = item.originalGlassStatisticsTrend ? this.multipliedByHundred(item.originalGlassStatisticsTrend) + '%' : null
item.actualProductTrend = item.actualProductTrend ? this.multipliedByHundred(item.actualProductTrend) + '%' : null
item.originalGlassPassTrend = item.originalGlassPassTrend ? this.multipliedByHundred(item.originalGlassPassTrend) * 100 + '%' : null
}
})
if (item.det === false) {
@ -121,6 +142,7 @@ export default {
this.listQuery.reportTime[0] = this.format(val.setHours(7, 0, 0)) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
this.listQuery.reportTime[1] = this.format(val.setHours(7, 0, 0) + 24 * 60 * 60 * 1000) //+ ' 23:59:59' //new Date(this.endTimeStamp + ' 23:59:59').getTime() / 1000
console.log(this.listQuery.reportTime);
this.getDataList();
} else {
this.listQuery.reportTime = []
}
@ -159,7 +181,7 @@ export default {
this.exportLoading = true;
return this.urlOptions.exportURL(params);
}).then(response => {
this.$download.excel(response, '原片生产报.xls');
this.$download.excel(response, '原片生产报.xls');
this.exportLoading = false;
}).catch(() => { });
}

View File

@ -1,8 +1,8 @@
<!--
* @Author: Do not edit
* @Date: 2023-12-13 14:10:04
* @LastEditTime: 2023-12-14 10:18:20
* @LastEditors: DY
* @LastEditTime: 2024-03-07 16:17:14
* @LastEditors: zhp
* @Description:
-->
<template>
@ -92,6 +92,7 @@ const cols = [
{
prop: 'originalGlassStatisticsTrend',
label: '增减',
// filter:(v)=>{v + '%'}
}
]
},
@ -111,6 +112,7 @@ const cols = [
{
prop: 'actualProductTrend',
label: '增减',
// filter: (v) => { v + '%' }
}
]
},
@ -145,6 +147,10 @@ const cols = [
type: Array,
default: () => [],
},
date: {
type: String,
default:''
},
sum: {
type: Object,
default: () => {},
@ -165,9 +171,9 @@ const cols = [
immediate: true,
handler(newv, oldv) {
if (newv[0] !== '') {
this.cols[0].label = '许昌安彩周原片生产汇总' + '(' + newv[0] + '-' + newv[1] + ')'
this.cols[0].label = this.date + '(' + newv[0] + '-' + newv[1] + ')'
} else {
this.cols[0].label = '许昌安彩周原片生产汇总'
this.cols[0].label = this.date
}
}
},

View File

@ -1,33 +1,27 @@
<template>
<div class="app-container">
<div>
<el-form
:model="listQuery"
:inline="true"
ref="dataForm"
class="blueTip">
<el-form-item label="月" prop="reportTime">
<el-date-picker
v-model="reportTime"
type="month"
size="small"
@change="changeTime"
placeholder="选择月">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button v-if="this.$auth.hasPermi('report:glass-month:query')" type="primary" size="small" @click="getDataList">查询</el-button>
<el-button v-if="this.$auth.hasPermi('report:glass-month:export')" type="primary" size="small" plain @click="handleExport">导出</el-button>
</el-form-item>
</el-form>
</div>
<inputTable :data="tableData" :time="[startTimeStamp, endTimeStamp]" :sum="all" :type="listQuery.reportType" @refreshDataList="getDataList" />
<!-- <pagination
<div class="app-container">
<div>
<el-form :model="listQuery" :inline="true" ref="dataForm" class="blueTip">
<el-form-item label="月" prop="reportTime">
<el-date-picker v-model="reportTime" type="month" size="small" @change="changeTime" placeholder="选择月">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button v-if="this.$auth.hasPermi('report:glass-month:query')" type="primary" size="small"
@click="getDataList">查询</el-button>
<el-button v-if="this.$auth.hasPermi('report:glass-month:export')" type="primary" size="small" plain
@click="handleExport">导出</el-button>
</el-form-item>
</el-form>
</div>
<inputTable :date="date" :data="tableData" :time="[startTimeStamp, endTimeStamp]" :sum="all"
:type="listQuery.reportType" @refreshDataList="getDataList" />
<!-- <pagination
:limit.sync="listQuery.pageSize"
:page.sync="listQuery.pageNo"
:total="listQuery.total"
@pagination="getDataList" /> -->
</div>
</div>
</template>
<script>
@ -50,7 +44,8 @@ export default {
total: 0,
reportType: 4,
reportTime: []
},
},
date: '许昌安彩月原片生产汇总',
reportTime: '',
startTimeStamp: '',
endTimeStamp: '',

View File

@ -1,35 +1,29 @@
<template>
<div class="app-container">
<!-- <search-bar
<div class="app-container">
<!-- <search-bar
:formConfigs="formConfig"
ref="searchBarForm"
@headBtnClick="buttonClick" /> -->
<div>
<el-form
:model="listQuery"
:inline="true"
ref="dataForm"
class="blueTip">
<el-form-item label="周" prop="reportTime">
<el-date-picker
v-model="reportTime"
type="week"
size="small"
@change="changeTime"
:picker-options="{firstDayOfWeek: 1}"
:format="'yyyy 第 WW 周' + '\u3000' + startTimeStamp + '-' + endTimeStamp"
style="width: 350px"
placeholder="选择周">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button v-if="this.$auth.hasPermi('report:glass-weekly:query')" type="primary" size="small" @click="getDataList">查询</el-button>
<el-button v-if="this.$auth.hasPermi('report:glass-weekly:export')" type="primary" size="small" plain @click="handleExport">导出</el-button>
</el-form-item>
</el-form>
</div>
<inputTable :data="tableData" :time="[startTimeStamp, endTimeStamp]" :sum="all" :type="listQuery.reportType" @refreshDataList="getDataList" />
</div>
<div>
<el-form :model="listQuery" :inline="true" ref="dataForm" class="blueTip">
<el-form-item label="周" prop="reportTime">
<el-date-picker v-model="reportTime" type="week" size="small" @change="changeTime"
:picker-options="{firstDayOfWeek: 1}"
:format="'yyyy 第 WW 周' + '\u3000' + startTimeStamp + '-' + endTimeStamp" style="width: 350px"
placeholder="选择周">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button v-if="this.$auth.hasPermi('report:glass-weekly:query')" type="primary" size="small"
@click="getDataList">查询</el-button>
<el-button v-if="this.$auth.hasPermi('report:glass-weekly:export')" type="primary" size="small" plain
@click="handleExport">导出</el-button>
</el-form-item>
</el-form>
</div>
<inputTable :date="date" :data="tableData" :time="[startTimeStamp, endTimeStamp]" :sum="all"
:type="listQuery.reportType" @refreshDataList="getDataList" />
</div>
</template>
<script>
@ -52,7 +46,8 @@ export default {
total: 0,
reportType: 3,
reportTime: []
},
},
date: '许昌安彩周原片生产汇总',
reportTime: '',
startTimeStamp: '',
endTimeStamp: '',

View File

@ -1,31 +1,24 @@
<template>
<div class="app-container">
<div>
<el-form
:model="listQuery"
:inline="true"
ref="dataForm"
class="blueTip">
<el-form-item label="年" prop="reportTime">
<el-date-picker
v-model="reportTime"
type="year"
size="small"
@change="changeTime"
:picker-options="{firstDayOfWeek: 1}"
:format="'yyyy 年' + '\u3000' + startTimeStamp + '-' + endTimeStamp"
style="width: 350px"
placeholder="选择年">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button v-if="this.$auth.hasPermi('report:glass-year:query')" type="primary" size="small" @click="getDataList">查询</el-button>
<el-button v-if="this.$auth.hasPermi('report:glass-year:export')" type="primary" size="small" plain @click="handleExport">导出</el-button>
</el-form-item>
</el-form>
</div>
<inputTable :data="tableData" :time="[startTimeStamp, endTimeStamp]" :sum="all" :type="listQuery.reportType" @refreshDataList="getDataList" />
</div>
<div class="app-container">
<div>
<el-form :model="listQuery" :inline="true" ref="dataForm" class="blueTip">
<el-form-item label="年" prop="reportTime">
<el-date-picker v-model="reportTime" type="year" size="small" @change="changeTime"
:picker-options="{firstDayOfWeek: 1}" :format="'yyyy 年' + '\u3000' + startTimeStamp + '-' + endTimeStamp"
style="width: 350px" placeholder="选择年">
</el-date-picker>
</el-form-item>
<el-form-item>
<el-button v-if="this.$auth.hasPermi('report:glass-year:query')" type="primary" size="small"
@click="getDataList">查询</el-button>
<el-button v-if="this.$auth.hasPermi('report:glass-year:export')" type="primary" size="small" plain
@click="handleExport">导出</el-button>
</el-form-item>
</el-form>
</div>
<inputTable :date="date" :data="tableData" :time="[startTimeStamp, endTimeStamp]" :sum="all"
:type="listQuery.reportType" @refreshDataList="getDataList" />
</div>
</template>
<script>
@ -48,7 +41,8 @@ export default {
total: 0,
reportType: 5,
reportTime: []
},
},
date: '许昌安彩年原片生产汇总',
reportTime: '',
startTimeStamp: '',
endTimeStamp: '',

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-12-12 13:45:25
* @LastEditTime: 2024-03-05 09:36:18
* @LastEditTime: 2024-03-07 16:10:22
* @LastEditors: zhp
* @Description:
-->
@ -24,11 +24,11 @@
background: '#F2F4F9',
color: '#606266'
}">
<el-table-column :label="'许昌安彩成品生产汇总' + timeTips" align="center">
<el-table-column prop="lineId" label="生产线">
<el-table-column :label="'许昌安彩成品生产汇总' + timeTips" align="center">
<el-table-column prop="lineName" label="生产线">
<template slot-scope="scope">
<el-input v-if="!disabled" v-model="scope.row.lineId" :disabled="disabled"></el-input>
<span v-else>{{ scope.row.lineId }} </span>
<el-input v-if="!disabled" v-model="scope.row.lineName" :disabled="disabled"></el-input>
<span v-else>{{ scope.row.lineName }} </span>
</template>
</el-table-column>
<el-table-column label="投入数㎡">
@ -153,12 +153,12 @@ import {
// import Editor from '@/components/Editor';
import moment from 'moment';
// import DialogForm from './dialogForm.vue';
import { getCorePLList } from '@/api/base/coreProductionLine';
// import basicPageMixin from '@/mixins/lb/basicPageMixin';
const tableProps = [
{
// width: 128,
prop: 'lineId',
prop: 'lineName',
label: '生产线',
},
{
@ -424,6 +424,7 @@ export default {
// }
this.getTodayStartTimeAndEndTime()
this.getDataList()
this.getDict()
},
methods: {
format(shijianchuo) {
@ -540,7 +541,13 @@ export default {
this.$modal.msgError('更新失败');
}
},
async getDict() {
// 线
const res = await getCorePLList();
this.proLineList = res.data;
},
async getDataList() {
this.list = []
// if (this.monthValue.length > 0) {
// console.log(this.monthValue)
// this.listQuery.reportTime[0] = this.transformTime(this.monthValue[0])
@ -554,6 +561,7 @@ export default {
// }
console.log(this.listQuery);
const res = await this.$axios({
url: '/base/report-auto-production/page',
method: 'get',
@ -568,10 +576,19 @@ export default {
// })
res.data.list.forEach((ele,index) => {
if (ele.det === false) {
res.data.list[index].lineId = '合计'
res.data.list[index].lineName = '合计'
this.remark = res.data.list[index].remark
}
});
})
res.data.list.forEach(item => {
this.proLineList.forEach(it => {
if (item.lineId === it.id) {
console.log(item)
item.lineName = it.name
}
})
})
this.list = res.data.list
},
},

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-12-12 13:45:25
* @LastEditTime: 2024-03-05 09:06:22
* @LastEditTime: 2024-03-07 16:07:25
* @LastEditors: zhp
* @Description:
-->
@ -29,8 +29,8 @@
<el-table-column :label="'许昌安彩月成品生产汇总' + timeTips" align="center">
<el-table-column prop="lineId" label="生产线">
<template slot-scope="scope">
<el-input v-if="!disabled" v-model="scope.row.lineId" :disabled="disabled"></el-input>
<span v-else>{{ scope.row.lineId }} </span>
<el-input v-if="!disabled" v-model="scope.row.lineName" :disabled="disabled"></el-input>
<span v-else>{{ scope.row.lineName }} </span>
</template>
</el-table-column>
<el-table-column label="投入数㎡">
@ -155,6 +155,7 @@ import {
// import Editor from '@/components/Editor';
import moment from 'moment';
// import DialogForm from './dialogForm.vue';
import { getCorePLList } from '@/api/base/coreProductionLine'
// import basicPageMixin from '@/mixins/lb/basicPageMixin';
const tableProps = [
@ -427,8 +428,14 @@ export default {
// }
this.getDataList()
this.getDict()
},
methods: {
async getDict() {
// 线
const res = await getCorePLList();
this.proLineList = res.data;
},
handleExport() {
//
let params = { ...this.dataForm };
@ -565,11 +572,21 @@ export default {
// })
res.data.list.forEach((ele,index) => {
if (ele.det === false) {
res.data.list[index].lineId = '合计'
res.data.list[index].lineName = '合计'
this.remark = res.data.list[index].remark
}
});
})
res.data.list.forEach(item => {
this.proLineList.forEach(it => {
if (item.lineId === it.id) {
console.log(item)
item.lineName = it.name
}
})
})
this.list = res.data.list
// this.list = res.data.list
},
},
};

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-12-12 13:45:25
* @LastEditTime: 2024-03-04 16:51:18
* @LastEditTime: 2024-03-07 16:10:47
* @LastEditors: zhp
* @Description:
-->
@ -26,7 +26,7 @@
background: '#F2F4F9',
color: '#606266'
}">
<el-table-column :label="'许昌安彩成品生产汇总' + timeTips" align="center">
<el-table-column :label="'许昌安彩成品生产汇总' + timeTips" align="center">
<el-table-column prop="glassType" label="品种" align="center">
<template slot-scope="scope">
<el-input v-if="!disabled" v-model="scope.row.glassType" :disabled="disabled"></el-input>
@ -187,7 +187,7 @@ import {
// import Editor from '@/components/Editor';
import moment from 'moment';
// import DialogForm from './dialogForm.vue';
import { getCorePLList } from '@/api/base/coreProductionLine'
// import basicPageMixin from '@/mixins/lb/basicPageMixin';
const tableProps = [
{
@ -458,8 +458,14 @@ export default {
// this.searchBarFormConfig[0].defaultSelect = [];
// }
this.getDataList()
this.getDict()
},
methods: {
async getDict() {
// 线
const res = await getCorePLList()
this.proLineList = res.data;
},
timeSelect() {
// switch (this.queryParams.timeDim) {
// case '1':
@ -563,6 +569,15 @@ export default {
this.remark = res.data[index].remark
}
});
// res.data.list.forEach(item => {
// this.proLineList.forEach(it => {
// if (item.lineId === it.id) {
// console.log(item)
// item.lineName = it.name
// }
// })
// })
this.list = res.data
},
},

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-12-12 13:45:25
* @LastEditTime: 2024-03-04 16:51:38
* @LastEditTime: 2024-03-07 16:10:53
* @LastEditors: zhp
* @Description:
-->
@ -29,11 +29,11 @@
background: '#F2F4F9',
color: '#606266'
}">
<el-table-column :label="'许昌安彩成品生产汇总' + timeTips" align="center">
<el-table-column :label="'许昌安彩成品生产汇总' + timeTips" align="center">
<el-table-column prop="lineId" label="生产线">
<template slot-scope="scope">
<el-input v-if="!disabled" v-model="scope.row.lineId" :disabled="disabled"></el-input>
<span v-else>{{ scope.row.lineId }} </span>
<el-input v-if="!disabled" v-model="scope.row.lineName" :disabled="disabled"></el-input>
<span v-else>{{ scope.row.lineName }} </span>
</template>
</el-table-column>
<el-table-column label="投入数㎡">
@ -158,6 +158,7 @@ import {
// import Editor from '@/components/Editor';
import moment from 'moment';
// import DialogForm from './dialogForm.vue';
import { getCorePLList } from '@/api/base/coreProductionLine'
// import basicPageMixin from '@/mixins/lb/basicPageMixin';
const tableProps = [
@ -367,8 +368,14 @@ export default {
// }
this.getCurrentWeekStartTimeAndEndTime()
this.getDataList()
this.getDict()
},
methods: {
async getDict() {
// 线
const res = await getCorePLList()
this.proLineList = res.data;
},
getCurrentWeekStartTimeAndEndTime() {
const current = new Date();
// current
@ -484,10 +491,19 @@ export default {
// })
res.data.list.forEach((ele,index) => {
if (ele.det === false) {
res.data.list[index].lineId = '合计'
res.data.list[index].lineName = '合计'
this.remark = res.data.list[index].remark
}
});
})
res.data.list.forEach(item => {
this.proLineList.forEach(it => {
if (item.lineId === it.id) {
console.log(item)
item.lineName = it.name
}
})
})
this.list = res.data.list
},
},

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-12-12 13:45:25
* @LastEditTime: 2024-03-05 09:47:42
* @LastEditTime: 2024-03-07 16:11:03
* @LastEditors: zhp
* @Description:
-->
@ -29,11 +29,11 @@
color: '#606266'
}">
<el-table-column :label="'许昌安彩成品生产汇总' + timeTips" align="center">
<el-table-column :label="'许昌安彩成品生产汇总' + timeTips" align="center">
<el-table-column prop="lineId" label="生产线">
<template slot-scope="scope">
<el-input v-if="!disabled" v-model="scope.row.lineId" :disabled="disabled"></el-input>
<span v-else>{{ scope.row.lineId }} </span>
<el-input v-if="!disabled" v-model="scope.row.lineName" :disabled="disabled"></el-input>
<span v-else>{{ scope.row.lineName }} </span>
</template>
</el-table-column>
<el-table-column label="投入数㎡">
@ -159,7 +159,8 @@ import {
import moment from 'moment';
// import DialogForm from './dialogForm.vue';
import { parseTime } from '../../core/mixins/code-filter';
// import basicPageMixin from '@/mixins/lb/basicPageMixin';
import { getCorePLList } from '@/api/base/coreProductionLine'
const tableProps = [
{
// width: 128,
@ -369,8 +370,14 @@ export default {
// this.searchBarFormConfig[0].defaultSelect = [];
// }
this.getDataList()
this.getDict()
},
methods: {
async getDict() {
// 线
const res = await getCorePLList()
this.proLineList = res.data;
},
getCurrentYearFirst() {
let date = new Date();
date.setDate(1);
@ -507,10 +514,19 @@ export default {
// })
res.data.list.forEach((ele,index) => {
if (ele.det === false) {
res.data.list[index].lineId = '合计'
res.data.list[index].lineName = '合计'
this.remark = res.data.list[index].remark
}
});
})
res.data.list.forEach(item => {
this.proLineList.forEach(it => {
if (item.lineId === it.id) {
console.log(item)
item.lineName = it.name
}
})
})
this.list = res.data.list
},
},