'1'
This commit is contained in:
commit
99ac9ace51
@ -1,7 +1,7 @@
|
||||
/*
|
||||
* @Author: zhp
|
||||
* @Date: 2023-12-12 13:49:02
|
||||
* @LastEditTime: 2023-12-14 14:21:43
|
||||
* @LastEditTime: 2024-01-24 15:54:58
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
*/
|
||||
@ -55,3 +55,12 @@ export function updateSumAutoDeliveDataList(query) {
|
||||
data: query,
|
||||
})
|
||||
}
|
||||
|
||||
export function exportProductExcel(query) {
|
||||
return request({
|
||||
url: '/base/report-auto-production-backup/export-excel',
|
||||
method: 'get',
|
||||
params: query,
|
||||
responseType: 'blob'
|
||||
})
|
||||
}
|
||||
|
14
src/assets/icons/svg/arrow.svg
Normal file
14
src/assets/icons/svg/arrow.svg
Normal file
@ -0,0 +1,14 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<svg width="16px" height="16px" viewBox="0 0 16 16" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
||||
<title>编组 13</title>
|
||||
<g id="·窑炉总览" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
||||
<g id="总览" transform="translate(-1823.000000, -772.000000)">
|
||||
<g id="编组-20备份-5" transform="translate(1786.000000, 764.000000)">
|
||||
<g id="编组-13" transform="translate(37.000000, 8.000000)">
|
||||
<rect id="矩形" stroke="#979797" fill="#D8D8D8" opacity="0" x="0.5" y="0.5" width="15" height="15"></rect>
|
||||
<path d="M3.67840479,4.47768215 L12.3215952,4.47768215 C12.87388,4.47768215 13.3215952,4.9253974 13.3215952,5.47768215 C13.3215952,5.70423387 13.2446673,5.92407165 13.1034098,6.1011931 L8.78181462,11.5200015 C8.43745903,11.9517857 7.80827335,12.0226607 7.37648905,11.6783051 C7.31796217,11.6316289 7.2648616,11.5785283 7.21818538,11.5200015 L2.89659016,6.1011931 C2.55223458,5.6694088 2.62310955,5.04022312 3.05489384,4.69586753 C3.23201529,4.55461005 3.45185307,4.47768215 3.67840479,4.47768215 Z" id="路径-2" fill="#03233C"></path>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
After Width: | Height: | Size: 1.3 KiB |
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2021-07-19 15:18:30
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2024-01-22 16:04:14
|
||||
* @LastEditTime: 2024-01-24 17:07:01
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -94,12 +94,14 @@
|
||||
:table-data="funList" /> -->
|
||||
<dv-scroll-board :config="funConfig" style="width:100%;height:350px" ref='funScrollBoard' />
|
||||
</el-col>
|
||||
<span class="eqLine"></span>
|
||||
<el-col :span="6">
|
||||
<div style="font-size:20px;margin: 5px 0 10px 0;">退火风机</div>
|
||||
<!-- <base-table1 :page="1" :limit="999" :show-index="false" :table-config="EqMonitoringPropsFun"
|
||||
:table-data="annealFunList" /> -->
|
||||
<dv-scroll-board :config="annealFunConfig" style="width:100%;height:350px" ref='annealFunScrollBoard' />
|
||||
</el-col>
|
||||
<span class="eqLineTwo"></span>
|
||||
<el-col :span="12" style="float: right;">
|
||||
<div style="font-size:20px;margin: 5px 0 10px 0;">产线设备</div>
|
||||
<!-- <base-table1 :page="1" :limit="999" :show-index="false" :table-config="EqMonitoringProps"
|
||||
@ -572,7 +574,7 @@ export default {
|
||||
arr.push([
|
||||
// console.log(item)
|
||||
`
|
||||
<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''}
|
||||
<span style="color:rgba(255,255,255,0.5)" >${index || ''}
|
||||
</span>`,
|
||||
// formatDate(item.planStartTime) || '',
|
||||
`
|
||||
@ -581,7 +583,7 @@ export default {
|
||||
`<span style="color:rgba(255,255,255,0.5)">${this.funWsData.data.annealFanInfo[i] || ''}</span>`,
|
||||
])
|
||||
}
|
||||
this.annealFanConfig.data = arr
|
||||
this.annealFunConfig.data = arr
|
||||
this.$refs['annealFanScrollBoard'].updateRows(arr)
|
||||
}
|
||||
if (this.funWsData.type === 'FanInfo') {
|
||||
@ -596,7 +598,7 @@ export default {
|
||||
arr.push([
|
||||
// console.log(item)
|
||||
`
|
||||
<span style="color:rgba(255,255,255,0.5)" >${index + 1 || ''}</span>`,
|
||||
<span style="color:rgba(255,255,255,0.5)" >${index || ''}</span>`,
|
||||
// formatDate(item.planStartTime) || '',
|
||||
`
|
||||
<span style="color:rgba(255,255,255,0.5)" >${i || ''}</span>`,
|
||||
@ -884,6 +886,30 @@ export default {
|
||||
</style>
|
||||
|
||||
<style lang="scss">
|
||||
.eqLine{
|
||||
height: 290px;
|
||||
width: 1px;
|
||||
position: absolute;
|
||||
left: 25%;
|
||||
top: 12%;
|
||||
background: linear-gradient(to bottom,rgba(60,
|
||||
231,
|
||||
255,0), #3CE7FF, rgba(60,
|
||||
231,
|
||||
255, 0));
|
||||
}
|
||||
.eqLineTwo {
|
||||
height: 290px;
|
||||
width: 1px;
|
||||
position: absolute;
|
||||
left: 50%;
|
||||
top: 12%;
|
||||
background: linear-gradient(to bottom, rgba(60,
|
||||
231,
|
||||
255, 0), #3CE7FF, rgba(60,
|
||||
231,
|
||||
255, 0));
|
||||
}
|
||||
.visual-container {
|
||||
::-webkit-scrollbar {
|
||||
width: 8px;
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: gtz
|
||||
* @Date: 2022-01-19 15:58:17
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2024-01-18 13:59:40
|
||||
* @LastEditTime: 2024-01-24 17:01:21
|
||||
* @Description: file content
|
||||
* @FilePath: \mt-bus-fe\src\views\OperationalOverview\components\baseContainer\index.vue
|
||||
-->
|
||||
@ -157,7 +157,7 @@ export default {
|
||||
// background-position: 0 0;
|
||||
}
|
||||
&__eqStatus {
|
||||
background: url(../../../../assets/img/eqStatus.png) no-repeat;
|
||||
background: url(../../../../assets/img/short.png) no-repeat;
|
||||
background-size: 100% 100%;
|
||||
}
|
||||
// border-radius: 40px 0px 40px 0px;
|
||||
|
@ -83,20 +83,38 @@ export default {
|
||||
this.chart = null
|
||||
},
|
||||
methods: {
|
||||
initChart(nameList,dataList) {
|
||||
initChart(nameList, dataList) {
|
||||
console.log('1111', dataList);
|
||||
// console.log(1)
|
||||
this.chart = echarts.init(document.getElementById(this.id))
|
||||
if (dataList.length !== 0) {
|
||||
// if (dataList.length !== 0) {
|
||||
// this.$set(this.series, "data", dataList);
|
||||
this.series = [{
|
||||
type: 'bar',
|
||||
data: dataList,
|
||||
barWidth: 40
|
||||
itemStyle: {
|
||||
normal: {
|
||||
color: new echarts.graphic.LinearGradient(0, 0, 0, 1, [
|
||||
{ offset: 0, color: '#9DD5FF' },
|
||||
{ offset: 0.3, color: '#1295FF' }
|
||||
]),
|
||||
label: {
|
||||
show: true, //开启显示
|
||||
position: 'top', //在上方显示
|
||||
textStyle: { //数值样式
|
||||
color: '#ced1d5',
|
||||
fontSize: 12
|
||||
}
|
||||
},
|
||||
}
|
||||
// barBorderRadius: this.borderRadius
|
||||
},
|
||||
barWidth: 12,
|
||||
}]
|
||||
}
|
||||
if (nameList.length !== 0) {
|
||||
// }
|
||||
// if (nameList.length !== 0) {
|
||||
this.nameList = nameList
|
||||
}
|
||||
// }
|
||||
this.chart.setOption({
|
||||
tooltip: {
|
||||
trigger: 'axis',
|
||||
@ -112,6 +130,16 @@ export default {
|
||||
bottom: '3%',
|
||||
containLabel: true
|
||||
},
|
||||
// legend: {
|
||||
// itemWidth: 10,
|
||||
// itemHeight: 10,
|
||||
// // right: '20px',
|
||||
// data: nameList,
|
||||
// textStyle: {
|
||||
// fontSize: 12 * this.beilv,
|
||||
// color: '#ced1d5'
|
||||
// }
|
||||
// },
|
||||
xAxis: {
|
||||
type: 'category',
|
||||
axisLine: {
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @Author: zwq
|
||||
* @Date: 2021-07-19 15:18:30
|
||||
* @LastEditors: zhp
|
||||
* @LastEditTime: 2024-01-22 14:37:50
|
||||
* @LastEditTime: 2024-01-24 17:10:28
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
@ -826,7 +826,10 @@ export default {
|
||||
this.productLineList.forEach((item) => {
|
||||
this.SJGWsData.detData.forEach((ele) => {
|
||||
if (item.id == ele.productionLineId) {
|
||||
if (item.name.substr(0, 1) == "D") {
|
||||
nameList.push(item.name)
|
||||
|
||||
}
|
||||
}
|
||||
})
|
||||
})
|
||||
|
Binary file not shown.
Before Width: | Height: | Size: 20 KiB After Width: | Height: | Size: 132 KiB |
@ -1,7 +1,7 @@
|
||||
<template>
|
||||
<div>
|
||||
<NotMsg v-show="notMsg"/>
|
||||
<div id="defectChart" style="width:600px;height:238px;" v-show="!notMsg"></div>
|
||||
<div id="defectChart" style="width:580px;height:238px;" v-show="!notMsg"></div>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
@ -45,6 +45,7 @@ export default {
|
||||
if (this.chartTime === '日') {
|
||||
this.tempData = this.israDayStatistic
|
||||
this.updateChart()
|
||||
this.$emit('emitFun')
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -53,6 +54,7 @@ export default {
|
||||
if (this.chartTime === '周') {
|
||||
this.tempData = this.israWeekStatistic
|
||||
this.updateChart()
|
||||
this.$emit('emitFun')
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -61,6 +63,7 @@ export default {
|
||||
if (this.chartTime === '月') {
|
||||
this.tempData = this.israMonthStatistic
|
||||
this.updateChart()
|
||||
this.$emit('emitFun')
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -69,6 +72,7 @@ export default {
|
||||
if (this.chartTime === '年') {
|
||||
this.tempData = this.israYearStatistic
|
||||
this.updateChart()
|
||||
this.$emit('emitFun')
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -33,6 +33,7 @@ export default {
|
||||
return false
|
||||
}
|
||||
this.updateChart()
|
||||
this.$emit('emitFun')
|
||||
}
|
||||
},
|
||||
chartType: {// 监听类型变化,更新图
|
||||
|
86
src/views/databoard/components/DropDownBtn.vue
Normal file
86
src/views/databoard/components/DropDownBtn.vue
Normal file
@ -0,0 +1,86 @@
|
||||
<template>
|
||||
<div class="drop-down-btn">
|
||||
<button class="top-btn" @click='toggleExpand'><span style="margin-right: 3px;">{{active}}</span><svg-icon class-name="arrow" icon-class="arrow" :style="{transform:isExpand?'rotate(180deg)':'rotate(0deg)'}"/></button>
|
||||
<div v-show="isExpand" class="btn-box">
|
||||
<button
|
||||
class="btn"
|
||||
v-for="opt in options"
|
||||
:key="opt"
|
||||
@click="clickBtn(opt)"
|
||||
v-show="active !== opt">
|
||||
<span class="btn-text">
|
||||
{{ opt }}
|
||||
</span>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'DropDownBtn',
|
||||
components: {},
|
||||
props: ['options', 'active'],
|
||||
data() {
|
||||
return {
|
||||
isExpand: false
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
methods: {
|
||||
clickBtn(opt) {
|
||||
this.$emit('emitFun', opt)
|
||||
this.isExpand = !this.isExpand
|
||||
},
|
||||
toggleExpand() {
|
||||
this.isExpand = !this.isExpand
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.drop-down-btn {
|
||||
z-index: 1000;
|
||||
button {
|
||||
border: none;
|
||||
appearance: none;
|
||||
outline: none;
|
||||
color: #fff;
|
||||
font-size: 14px;
|
||||
padding: 8px 5px 8px 8px;
|
||||
height: 32px;
|
||||
}
|
||||
.top-btn {
|
||||
background: #02457E;
|
||||
border-radius: 5px;
|
||||
cursor: pointer;
|
||||
.arrow {
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
.btn-box {
|
||||
.btn {
|
||||
display: block;
|
||||
width: 100%;
|
||||
background: #03233C;
|
||||
&:hover {
|
||||
background: #02457E;
|
||||
transition: all 0.5s ease-out;
|
||||
}
|
||||
.btn-text{
|
||||
padding: 0px 5px 6px;
|
||||
border-bottom: 1px solid #010D18;
|
||||
}
|
||||
}
|
||||
.btn:last-child{
|
||||
border-bottom-right-radius: 5px;
|
||||
border-bottom-left-radius: 5px;
|
||||
.btn-text{
|
||||
height: 16px;
|
||||
border-bottom: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -30,6 +30,7 @@ export default {
|
||||
return false
|
||||
}
|
||||
this.updateChart()
|
||||
this.$emit('emitFun')
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -53,6 +53,7 @@ export default {
|
||||
handler(newVal, oldVal) {
|
||||
if (this.chartTime === '日') {
|
||||
this.updateChart()
|
||||
this.$emit('emitFun')
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -60,6 +61,7 @@ export default {
|
||||
handler(newVal, oldVal) {
|
||||
if (this.chartTime === '周') {
|
||||
this.updateChart()
|
||||
this.$emit('emitFun')
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -67,6 +69,7 @@ export default {
|
||||
handler(newVal, oldVal) {
|
||||
if (this.chartTime === '月') {
|
||||
this.updateChart()
|
||||
this.$emit('emitFun')
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -74,6 +77,7 @@ export default {
|
||||
handler(newVal, oldVal) {
|
||||
if (this.chartTime === '年') {
|
||||
this.updateChart()
|
||||
this.$emit('emitFun')
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -53,6 +53,7 @@ export default {
|
||||
handler(newVal, oldVal) {
|
||||
if (this.chartTime === '周' && this.chartType === '电耗能') {
|
||||
this.updateChart()
|
||||
this.$emit('emitFun')
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -60,6 +61,7 @@ export default {
|
||||
handler(newVal, oldVal) {
|
||||
if (this.chartTime === '月' && this.chartType === '电耗能') {
|
||||
this.updateChart()
|
||||
this.$emit('emitFun')
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -67,6 +69,7 @@ export default {
|
||||
handler(newVal, oldVal) {
|
||||
if (this.chartTime === '年' && this.chartType === '电耗能') {
|
||||
this.updateChart()
|
||||
this.$emit('emitFun')
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -74,6 +77,7 @@ export default {
|
||||
handler(newVal, oldVal) {
|
||||
if (this.chartType === '天然气I' || this.chartType === '天然气II') {
|
||||
this.updateChart()
|
||||
this.$emit('emitFun')
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -242,7 +246,7 @@ export default {
|
||||
.map((_, index) => {
|
||||
const today = new Date();
|
||||
const dtimestamp = today - (index+1) * 24 * 60 * 60 * 1000;
|
||||
return `${new Date(dtimestamp).getMonth() + 1}.${new Date(
|
||||
return `${currentMonth < 10?'0'+currentMonth:currentMonth }.${new Date(
|
||||
dtimestamp
|
||||
).getDate()}`;}).reverse()
|
||||
}else if (this.chartTime == "月") {
|
||||
@ -259,7 +263,7 @@ export default {
|
||||
return Array(12)
|
||||
.fill(1)
|
||||
.map((_, index) => {
|
||||
return `${currentYear}.${12 - index}`;}).reverse()
|
||||
return `${12 - index}`;}).reverse()
|
||||
}
|
||||
},
|
||||
isLeapYear(year) {
|
||||
|
@ -80,7 +80,7 @@ export default {
|
||||
.datetime {
|
||||
position: absolute;
|
||||
top: 45px;
|
||||
right: 240px;
|
||||
right: 425px;
|
||||
color: #fff;
|
||||
font-size: 20px;
|
||||
letter-spacing: 1px;
|
||||
|
@ -35,6 +35,7 @@ export default {
|
||||
handler(newVal, oldVal) {
|
||||
this.chartData = newVal || []
|
||||
this.updateChart()
|
||||
this.$emit('emitFun')
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -1,5 +1,5 @@
|
||||
<template>
|
||||
<div>
|
||||
<div style="height: 370px;">
|
||||
<NotMsg v-show="notMsg"/>
|
||||
<div id="numRateChart" class="num-rate-chart" style="width:900px;height:420px;" v-show='!notMsg'></div>
|
||||
</div>
|
||||
@ -30,6 +30,7 @@ export default {
|
||||
return false
|
||||
}
|
||||
this.updateChart()
|
||||
this.$emit('emitFun')
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -51,9 +52,11 @@ export default {
|
||||
let outputNum = []
|
||||
let passRate = []
|
||||
this.productline && this.productline.length > 0 && this.productline.map(item => {
|
||||
if ((item.lineName).includes('D')) {
|
||||
xData.push(item.lineName)
|
||||
outputNum.push(item.outputNum)
|
||||
passRate.push(item.passRate?item.passRate*100:null)
|
||||
}
|
||||
})
|
||||
if (
|
||||
this.chart !== null &&
|
||||
@ -64,7 +67,7 @@ export default {
|
||||
}
|
||||
this.chart = echarts.init(document.getElementById('numRateChart'));
|
||||
var option = {
|
||||
grid: { top: 82, right: 60, bottom: 20, left: 60 },
|
||||
grid: { top: 82, right: 60, bottom: 20, left: 90 },
|
||||
tooltip: {
|
||||
trigger: "axis",
|
||||
axisPointer: {
|
||||
@ -145,7 +148,6 @@ export default {
|
||||
color: "#fff",
|
||||
fontSize: 12,
|
||||
formatter: () =>{
|
||||
console.log(value)
|
||||
return value ? '{value} %': '-'
|
||||
}
|
||||
},
|
||||
|
75
src/views/databoard/components/TimePrompt.vue
Normal file
75
src/views/databoard/components/TimePrompt.vue
Normal file
@ -0,0 +1,75 @@
|
||||
<template>
|
||||
<span
|
||||
style="
|
||||
font-size: 20px;
|
||||
color:#52FFF8;
|
||||
">
|
||||
{{timestr}}
|
||||
</span>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
export default {
|
||||
name: 'TimePrompt',
|
||||
components: {},
|
||||
props: ['timestr'],
|
||||
data() {
|
||||
return {
|
||||
|
||||
};
|
||||
},
|
||||
// watch: {
|
||||
// timestr:{
|
||||
// handler(){
|
||||
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.drop-down-btn {
|
||||
z-index: 1000;
|
||||
button {
|
||||
border: none;
|
||||
appearance: none;
|
||||
outline: none;
|
||||
color: #fff;
|
||||
font-size: 14px;
|
||||
padding: 8px 5px 7px 8px;
|
||||
height: 32px;
|
||||
}
|
||||
.top-btn {
|
||||
background: #02457E;
|
||||
border-radius: 5px;
|
||||
cursor: pointer;
|
||||
.arrow {
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
.btn-box {
|
||||
.btn {
|
||||
display: block;
|
||||
width: 100%;
|
||||
background: #03233C;
|
||||
&:hover {
|
||||
background: #02457E;
|
||||
transition: all 0.5s ease-out;
|
||||
}
|
||||
.btn-text{
|
||||
padding: 0px 5px 6px;
|
||||
border-bottom: 1px solid #010D18;
|
||||
}
|
||||
}
|
||||
.btn:last-child{
|
||||
border-bottom-right-radius: 5px;
|
||||
border-bottom-left-radius: 5px;
|
||||
.btn-text{
|
||||
height: 16px;
|
||||
border-bottom: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</style>
|
@ -5,7 +5,6 @@
|
||||
<script>
|
||||
import * as echarts from 'echarts';
|
||||
import resize from './../mixins/resize'
|
||||
import { formatDate } from '@/utils'
|
||||
|
||||
export default {
|
||||
name: 'GasChart',
|
||||
@ -39,6 +38,7 @@ export default {
|
||||
handler(newVal, oldVal) {
|
||||
if (this.chartTime === '日') {
|
||||
this.updateChart()
|
||||
this.$emit('emitFun')
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -46,6 +46,7 @@ export default {
|
||||
handler(newVal, oldVal) {
|
||||
if (this.chartTime === '周') {
|
||||
this.updateChart()
|
||||
this.$emit('emitFun')
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -53,6 +54,7 @@ export default {
|
||||
handler(newVal, oldVal) {
|
||||
if (this.chartTime === '月') {
|
||||
this.updateChart()
|
||||
this.$emit('emitFun')
|
||||
}
|
||||
}
|
||||
},
|
||||
@ -60,6 +62,7 @@ export default {
|
||||
handler(newVal, oldVal) {
|
||||
if (this.chartTime === '年') {
|
||||
this.updateChart()
|
||||
this.$emit('emitFun')
|
||||
}
|
||||
}
|
||||
},
|
||||
|
@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<div style="flex: 1;">
|
||||
<Container name="各工序缺陷汇总" size="middle" style="">
|
||||
<TimePrompt class="timeShow" :timestr="timestr" />
|
||||
<div style="padding: 5px 10px;">
|
||||
<dv-scroll-board :config="config" style="width:575px;height:380px" ref='defectScrollBoard'/>
|
||||
</div>
|
||||
@ -9,9 +10,11 @@
|
||||
</template>
|
||||
<script>
|
||||
import Container from '../components/Container.vue';
|
||||
import TimePrompt from '../components/TimePrompt';
|
||||
import { switchShowTime } from '../utils'
|
||||
export default {
|
||||
name: 'DefectSum',
|
||||
components: { Container },
|
||||
components: { Container, TimePrompt },
|
||||
computed: {
|
||||
defectSum() {
|
||||
return this.$store.state.websocket.defectSum
|
||||
@ -19,6 +22,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
timestr: '',
|
||||
config: {
|
||||
header: ['序号', '产线', '工序','损耗片数','缺陷类型'],
|
||||
headerBGC: 'rgba(32, 55, 96, 0.8)',
|
||||
@ -32,6 +36,9 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.timestr = switchShowTime('日')
|
||||
},
|
||||
watch:{
|
||||
defectSum: {
|
||||
handler(newVal, oldVal) {
|
||||
@ -44,8 +51,16 @@ export default {
|
||||
]);
|
||||
this.config.data = outArr
|
||||
this.$refs['defectScrollBoard'].updateRows(outArr)
|
||||
this.timestr = switchShowTime('日')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang='scss' scoped>
|
||||
.timeShow {
|
||||
position: absolute;
|
||||
top: 20px;
|
||||
left: 240px;
|
||||
}
|
||||
</style>
|
@ -1,25 +1,41 @@
|
||||
<template>
|
||||
<Container name="能源监控" size="large" style="">
|
||||
<TimePrompt class="timeShow" :timestr="timestr" />
|
||||
<div class="chart" style="height: 370px; margin-top: 8px;">
|
||||
<EnergeMonitoringChart/>
|
||||
<EnergeMonitoringChart @emitFun='dateUpdate'/>
|
||||
</div>
|
||||
</Container>
|
||||
</template>
|
||||
<script>
|
||||
import Container from '../components/Container.vue';
|
||||
import EnergeMonitoringChart from '../components/EnergeMonitoringChart';
|
||||
import TimePrompt from '../components/TimePrompt';
|
||||
import { switchShowTime } from '../utils'
|
||||
export default {
|
||||
name: 'EnergyMonitoring',
|
||||
components: { Container, EnergeMonitoringChart },
|
||||
components: { Container, EnergeMonitoringChart, TimePrompt },
|
||||
data() {
|
||||
return {
|
||||
timestr: ''
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.timestr = switchShowTime('日')
|
||||
},
|
||||
methods: {
|
||||
// 数据更新
|
||||
dateUpdate() {
|
||||
this.timestr = switchShowTime('日')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang='scss' scoped>
|
||||
.timeShow {
|
||||
position: absolute;
|
||||
top: 18px;
|
||||
left: 170px;
|
||||
}
|
||||
.timeToggle {
|
||||
position: absolute;
|
||||
right: 20px;
|
||||
|
@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<div style="flex: 1;">
|
||||
<Container name="设备报警" size="middle" style="">
|
||||
<TimePrompt class="timeShow" :timestr="timestr" />
|
||||
<div style="padding: 5px 10px;">
|
||||
<dv-scroll-board :config="config" style="width:575px;height:380px" ref='eqScrollBoard'/>
|
||||
</div>
|
||||
@ -9,9 +10,11 @@
|
||||
</template>
|
||||
<script>
|
||||
import Container from '../components/Container.vue';
|
||||
import TimePrompt from '../components/TimePrompt';
|
||||
import { switchShowTime } from '../utils'
|
||||
export default {
|
||||
name: 'EqAlarm',
|
||||
components: { Container },
|
||||
components: { Container, TimePrompt },
|
||||
computed: {
|
||||
sjgEquipment() {
|
||||
return this.$store.state.websocket.sjgEquipment
|
||||
@ -19,6 +22,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
timestr: '',
|
||||
config: {
|
||||
header: ['序号', '设备名称', '设备编码','设备状态','是否故障'],
|
||||
headerBGC: 'rgba(32, 55, 96, 0.8)',
|
||||
@ -44,6 +48,7 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted(){
|
||||
this.timestr = switchShowTime('日')
|
||||
},
|
||||
watch:{
|
||||
sjgEquipment: {
|
||||
@ -57,8 +62,16 @@ export default {
|
||||
]);
|
||||
this.config.data = outArr
|
||||
this.$refs['eqScrollBoard'].updateRows(outArr)
|
||||
this.timestr = switchShowTime('日')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang='scss' scoped>
|
||||
.timeShow {
|
||||
position: absolute;
|
||||
top: 20px;
|
||||
left: 170px;
|
||||
}
|
||||
</style>
|
@ -1,25 +1,41 @@
|
||||
<template>
|
||||
<Container name="产线产量及良品率" size="large" style="">
|
||||
<TimePrompt class="timeShow" :timestr="timestr" />
|
||||
<div class="chart" style="height: 370px; margin-top: 8px;">
|
||||
<NumRateChart />
|
||||
<NumRateChart @emitFun='dateUpdate'/>
|
||||
</div>
|
||||
</Container>
|
||||
</template>
|
||||
<script>
|
||||
import Container from '../components/Container';
|
||||
import NumRateChart from '../components/NumRateChart';
|
||||
import TimePrompt from '../components/TimePrompt';
|
||||
import { switchShowTime } from '../utils'
|
||||
export default {
|
||||
name: 'NumRate',
|
||||
components: { Container, NumRateChart },
|
||||
components: { Container, NumRateChart, TimePrompt },
|
||||
data() {
|
||||
return {
|
||||
timestr: ''
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.timestr = switchShowTime('日')
|
||||
},
|
||||
methods: {
|
||||
// 数据更新
|
||||
dateUpdate() {
|
||||
this.timestr = switchShowTime('日')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang='scss' scoped>
|
||||
.timeShow {
|
||||
position: absolute;
|
||||
top: 20px;
|
||||
left: 265px;
|
||||
}
|
||||
.timeToggle {
|
||||
position: absolute;
|
||||
right: 20px;
|
||||
|
@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<Container name="工单监控" size="middle" style="">
|
||||
<TimePrompt class="timeShow" :timestr="timestr" />
|
||||
<div style="padding: 5px 10px;" class="WOMonitoring">
|
||||
<dv-scroll-board :config="config" style="width:900px;height:380px" ref='worderScrollBoard'/>
|
||||
</div>
|
||||
@ -7,10 +8,12 @@
|
||||
</template>
|
||||
<script>
|
||||
import Container from '../components/Container.vue';
|
||||
import TimePrompt from '../components/TimePrompt';
|
||||
import { switchShowTime } from '../utils'
|
||||
import { formatDate } from '@/utils'
|
||||
export default {
|
||||
name: 'WorkOrderMonitoring',
|
||||
components: { Container },
|
||||
components: { Container, TimePrompt },
|
||||
computed: {
|
||||
order() {
|
||||
return this.$store.state.websocket.workOrder
|
||||
@ -18,6 +21,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
timestr: '',
|
||||
config: {
|
||||
header: ['序号', '工单名称', '规格','产线','工单状态', '计划完成时间','计划产量','实际产量'],
|
||||
headerBGC: 'rgba(32, 55, 96, 0.8)',
|
||||
@ -30,7 +34,8 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
methods:{
|
||||
mounted(){
|
||||
this.timestr = switchShowTime('日')
|
||||
},
|
||||
watch:{
|
||||
order: {
|
||||
@ -47,8 +52,16 @@ export default {
|
||||
]);
|
||||
this.config.data = outArr
|
||||
this.$refs['worderScrollBoard'].updateRows(outArr)
|
||||
this.timestr = switchShowTime('日')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang='scss' scoped>
|
||||
.timeShow {
|
||||
position: absolute;
|
||||
top: 20px;
|
||||
left: 170px;
|
||||
}
|
||||
</style>
|
@ -7,6 +7,7 @@
|
||||
|
||||
<template>
|
||||
<Container name="能耗" size="middle" style="">
|
||||
<TimePrompt class="timeShow" :timestr="timestr" />
|
||||
<EnergeTop />
|
||||
<SplitLine :horizontal="true" />
|
||||
<div class="" style="flex: 2; padding: 8px">
|
||||
@ -35,7 +36,7 @@
|
||||
<SelectorBtnGroup :options="['周', '月', '年']" @emitFun='toggleDate' :active='chartTime'/>
|
||||
</div>
|
||||
<div class="chart" style="height: 200px; margin-top: 8px;">
|
||||
<GasChart :chartType='chartType' :chartTime='chartTime'/>
|
||||
<GasChart :chartType='chartType' :chartTime='chartTime' @emitFun='dateUpdate'/>
|
||||
</div>
|
||||
</div>
|
||||
</Container>
|
||||
@ -49,6 +50,8 @@ import SplitLine from '../components/line';
|
||||
import EnergeTop from './EnergeTop';
|
||||
import GasChart from '../components/GasChart.vue';
|
||||
import SelectorBtnGroup from '../components/SelectorBtnGroup';
|
||||
import TimePrompt from '../components/TimePrompt';
|
||||
import { switchShowTime } from '../utils'
|
||||
export default {
|
||||
name: 'EnergeCost',
|
||||
components: {
|
||||
@ -58,13 +61,18 @@ export default {
|
||||
EnergeTop,
|
||||
GasChart,
|
||||
SelectorBtnGroup,
|
||||
TimePrompt
|
||||
},
|
||||
props: {},
|
||||
data() {
|
||||
return {
|
||||
chartType:'电耗能',
|
||||
chartTime:'周'
|
||||
chartTime:'周',
|
||||
timestr: ''
|
||||
};
|
||||
},
|
||||
mounted() {
|
||||
this.timestr = switchShowTime(this.chartTime)
|
||||
},
|
||||
computed: {
|
||||
gasInfoMsg() {
|
||||
@ -74,37 +82,27 @@ export default {
|
||||
methods: {
|
||||
// 切换能源
|
||||
toggleType(val) {
|
||||
console.log('能源' + val)
|
||||
this.chartType = val
|
||||
// if (val === '天然气I' || val === '天然气II') {
|
||||
// if (this.chartTime === '周') {
|
||||
// this.chartType = val
|
||||
// } else {
|
||||
// this.$message.warning('暂无数据')
|
||||
// }
|
||||
// }else {
|
||||
// this.chartType = val
|
||||
// }
|
||||
},
|
||||
// 切换时间
|
||||
toggleDate(val) {
|
||||
console.log('时间' + val)
|
||||
this.chartTime = val
|
||||
// if (val === '月' || val === '年') {
|
||||
// if (this.chartType === '电耗能') {
|
||||
// this.chartTime = val
|
||||
// } else {
|
||||
// this.$message.warning('暂无数据')
|
||||
// }
|
||||
// }else{
|
||||
// this.chartTime = val
|
||||
// }
|
||||
this.timestr = switchShowTime(val)
|
||||
},
|
||||
// 数据更新
|
||||
dateUpdate() {
|
||||
this.timestr = switchShowTime(this.chartTime)
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.timeShow {
|
||||
position: absolute;
|
||||
top: 20px;
|
||||
left: 120px;
|
||||
}
|
||||
.lgd {
|
||||
color: #fff;
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<div class="gas-handle" style="flex: 2">
|
||||
<Container name="烟气处理" size="large" style="">
|
||||
<TimePrompt class="timeShow" :timestr="timestr" />
|
||||
<div
|
||||
class=""
|
||||
style="
|
||||
@ -99,7 +100,7 @@
|
||||
<SelectorBtnGroup :options="['日', '周', '月', '年']" @emitFun='toggleDate' :active='chartTime' />
|
||||
</div>
|
||||
<div class="chart" style="height: 250px;margin-top: 10px;">
|
||||
<FlueGasChart :chartType='chartType' :chartTime='chartTime'/>
|
||||
<FlueGasChart :chartType='chartType' :chartTime='chartTime' @emitFun='dateUpdate'/>
|
||||
</div>
|
||||
</div>
|
||||
</Container>
|
||||
@ -113,6 +114,8 @@ import KilnLine from '../components/line';
|
||||
// import Switcher from '../components/Switcher';
|
||||
import SelectorBtnGroup from '../components/SelectorBtnGroup';
|
||||
import FlueGasChart from '../components/FlueGasChart';
|
||||
import TimePrompt from '../components/TimePrompt';
|
||||
import { switchShowTime } from '../utils'
|
||||
|
||||
export default {
|
||||
name: 'GasHandle',
|
||||
@ -122,18 +125,23 @@ export default {
|
||||
KilnLine,
|
||||
SelectorBtnGroup,
|
||||
FlueGasChart,
|
||||
TimePrompt
|
||||
},
|
||||
props: {},
|
||||
data() {
|
||||
return {
|
||||
chartType:'氧气含量',
|
||||
chartTime:'日'
|
||||
chartTime:'日',
|
||||
timestr: ''
|
||||
};
|
||||
},
|
||||
computed: {
|
||||
exhaustGasInfo() {
|
||||
return this.$store.state.websocket.exhaustGasInfo
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.timestr = switchShowTime(this.chartTime)
|
||||
},
|
||||
methods: {
|
||||
// 烟气
|
||||
@ -143,14 +151,23 @@ export default {
|
||||
},
|
||||
// 切换时间
|
||||
toggleDate(val) {
|
||||
console.log('时间' + val)
|
||||
this.chartTime = val
|
||||
this.timestr = switchShowTime(val)
|
||||
},
|
||||
// 数据更新
|
||||
dateUpdate() {
|
||||
this.timestr = switchShowTime(this.chartTime)
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.timeShow {
|
||||
position: absolute;
|
||||
top: 20px;
|
||||
left: 170px;
|
||||
}
|
||||
.gas-handle {
|
||||
}
|
||||
|
||||
|
@ -1,34 +1,8 @@
|
||||
<!--
|
||||
filename: IsraCheck.vue
|
||||
author: liubin
|
||||
date: 2023-12-06 09:50:13
|
||||
description:
|
||||
-->
|
||||
|
||||
<template>
|
||||
<Container name="ISRA缺陷检测" size="middle" style="">
|
||||
<ISRAChart />
|
||||
<!-- <div style="padding: 12px; display: flex; flex-direction: column; gap: 8px; height: 100%;">
|
||||
<div class="f" style="flex: 9;">
|
||||
|
||||
</div>
|
||||
<ul
|
||||
class="legend"
|
||||
style="
|
||||
flex: 1;
|
||||
padding: 8px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
gap: 20px;
|
||||
color: #fff;
|
||||
font-size: 14px;
|
||||
">
|
||||
<li class="fault-1">缺陷1</li>
|
||||
<li class="fault-2">缺陷2</li>
|
||||
<li class="fault-3">缺陷3</li>
|
||||
<li class="fault-4">缺陷4</li>
|
||||
</ul>
|
||||
</div> -->
|
||||
<TimePrompt class="timeShow" :timestr="timestr" />
|
||||
<ISRAChart @emitFun='dateUpdate'/>
|
||||
</Container>
|
||||
</template>
|
||||
|
||||
@ -36,20 +10,36 @@
|
||||
import Container from '../components/Container';
|
||||
import ShadowRect from '../components/ShadowRect.vue';
|
||||
import ISRAChart from '../components/ISRAChart.vue';
|
||||
|
||||
import TimePrompt from '../components/TimePrompt';
|
||||
import { switchShowTime } from '../utils'
|
||||
export default {
|
||||
name: 'IsraCheck',
|
||||
components: { Container, ShadowRect, ISRAChart },
|
||||
components: { Container, ShadowRect, ISRAChart, TimePrompt },
|
||||
props: {},
|
||||
data() {
|
||||
return {};
|
||||
return {
|
||||
timestr: ''
|
||||
};
|
||||
},
|
||||
computed: {},
|
||||
methods: {},
|
||||
mounted() {
|
||||
this.timestr = switchShowTime('日')
|
||||
},
|
||||
methods: {
|
||||
// 数据更新
|
||||
dateUpdate() {
|
||||
this.timestr = switchShowTime('日')
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped lang="scss">
|
||||
.timeShow {
|
||||
position: absolute;
|
||||
top: 19px;
|
||||
left: 210px;
|
||||
}
|
||||
ul,
|
||||
li {
|
||||
margin: 0;
|
||||
|
44
src/views/databoard/utils/index.js
Normal file
44
src/views/databoard/utils/index.js
Normal file
@ -0,0 +1,44 @@
|
||||
import moment from "moment";
|
||||
export const switchShowTime = (type) => {
|
||||
let nowTime = new Date
|
||||
let startTime = ''
|
||||
let endTime = ''
|
||||
let currentYear = nowTime.getFullYear();
|
||||
let startYear = null
|
||||
switch(type) {
|
||||
case '日':
|
||||
let hour = nowTime.getHours()
|
||||
if (hour > 6) {
|
||||
startTime = moment(nowTime).format('yyyy.MM.DD')+' 7点'
|
||||
endTime = moment(moment(nowTime)+86400000).format('yyyy.MM.DD')+' 7点'
|
||||
}else{
|
||||
endTime = moment(nowTime).format('yyyy.MM.DD')+' 7点'
|
||||
startTime = moment(moment(nowTime)-86400000).format('yyyy.MM.DD')+' 7点'
|
||||
}
|
||||
return startTime+'-'+endTime
|
||||
case '周':
|
||||
let timestamp = nowTime- 24 * 60 * 60 * 1000
|
||||
endTime = moment(timestamp).format('yyyy.MM.DD')
|
||||
startTime = moment(timestamp-24 * 60 * 60 * 1000 * 6).format('yyyy.MM.DD')
|
||||
return startTime+'-'+endTime
|
||||
case '月':
|
||||
let day = 29;
|
||||
let lastMonth = nowTime.getMonth() === 0 ? 12 : nowTime.getMonth();
|
||||
if (lastMonth === 2) {
|
||||
day = isLeapYear(currentYear) ? 29 : 28;
|
||||
}
|
||||
if (lastMonth === 12) {
|
||||
startYear = currentYear - 1
|
||||
}
|
||||
startTime = startYear+'.'+lastMonth+'.'+day
|
||||
endTime = currentYear+'.'+(nowTime.getMonth()+1)+'.28'
|
||||
return startTime+'-'+endTime
|
||||
default:// 年
|
||||
startTime = (currentYear - 1)+'.12.29'
|
||||
endTime = currentYear+'.12.28'
|
||||
return startTime+'-'+endTime
|
||||
}
|
||||
}
|
||||
const isLeapYear = (year) => {
|
||||
return year % 400 == 0 || (year % 4 == 0 && year % 100 != 0);
|
||||
}
|
@ -1,36 +1,51 @@
|
||||
<template>
|
||||
<Container name="产线当日缺陷分类" size="middle">
|
||||
<SelectorBtnGroup class="typeToggle" :options="['Y61', 'Y62', 'Y63', 'Y64', 'Y65']" @emitFun='toggleType' :active='chartType' />
|
||||
<TimePrompt class="timeShow" :timestr="timestr" />
|
||||
<DropDownBtn class="typeToggle" :options="['Y61', 'Y62', 'Y63', 'Y64', 'Y65']" @emitFun='toggleType' :active='chartType' />
|
||||
<div class="chart" style="height: 375px; margin-top: 8px;">
|
||||
<DefectClassChart :chartType='chartType'/>
|
||||
<DefectClassChart :chartType='chartType' @emitFun='dateUpdate'/>
|
||||
</div>
|
||||
</Container>
|
||||
</template>
|
||||
<script>
|
||||
import Container from '../components/Container';
|
||||
import SelectorBtnGroup from '../components/SelectorBtnGroup';
|
||||
import DropDownBtn from '../components/DropDownBtn';
|
||||
import DefectClassChart from '../components/DefectClassChart';
|
||||
import TimePrompt from '../components/TimePrompt';
|
||||
import { switchShowTime } from '../utils'
|
||||
export default {
|
||||
name: 'DefectClass',
|
||||
components: { Container, SelectorBtnGroup, DefectClassChart },
|
||||
components: { Container, DropDownBtn, DefectClassChart, TimePrompt },
|
||||
data() {
|
||||
return {
|
||||
chartType:'Y61'
|
||||
chartType:'Y61',
|
||||
timestr: ''
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.timestr = switchShowTime('日')
|
||||
},
|
||||
methods: {
|
||||
// 切换产线
|
||||
toggleType(val) {
|
||||
console.log('产线' + val)
|
||||
this.chartType = val
|
||||
},
|
||||
// 数据更新
|
||||
dateUpdate() {
|
||||
this.timestr = switchShowTime('日')
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang='scss' scoped>
|
||||
.timeShow {
|
||||
position: absolute;
|
||||
top: 18px;
|
||||
left: 260px;
|
||||
}
|
||||
.typeToggle {
|
||||
position: absolute;
|
||||
right: 20px;
|
||||
top: 30px;
|
||||
top: 15px;
|
||||
}
|
||||
</style>
|
@ -1,38 +1,54 @@
|
||||
<template>
|
||||
<div style="flex: 1;">
|
||||
<Container name="产线缺陷统计" size="small">
|
||||
<SelectorBtnGroup class="timeToggle" :options="['日', '周', '月', '年']" @emitFun='toggleDate' :active='chartTime' />
|
||||
<TimePrompt class="timeShow" :timestr="timestr" />
|
||||
<DropDownBtn class="timeToggle" :options="['日', '周', '月', '年']" @emitFun='toggleDate' :active='chartTime' />
|
||||
<div class="chart" style="height: 238px; margin-top: 8px;">
|
||||
<DefectChart :chartTime='chartTime'/>
|
||||
<DefectChart :chartTime='chartTime' @emitFun='dateUpdate'/>
|
||||
</div>
|
||||
</Container>
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
import Container from '../components/Container';
|
||||
import SelectorBtnGroup from '../components/SelectorBtnGroup';
|
||||
import DropDownBtn from '../components/DropDownBtn';
|
||||
import TimePrompt from '../components/TimePrompt';
|
||||
import DefectChart from '../components/DefectChart';
|
||||
import { switchShowTime } from '../utils'
|
||||
export default {
|
||||
name: 'DefectStatistics',
|
||||
components: { Container, SelectorBtnGroup, DefectChart },
|
||||
components: { Container, DropDownBtn, DefectChart, TimePrompt },
|
||||
data() {
|
||||
return {
|
||||
chartTime:'日'
|
||||
chartTime:'日',
|
||||
timestr: ''
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.timestr = switchShowTime(this.chartTime)
|
||||
},
|
||||
methods: {
|
||||
// 切换时间
|
||||
toggleDate(val) {
|
||||
console.log('时间' + val)
|
||||
this.chartTime = val
|
||||
this.timestr = switchShowTime(val)
|
||||
},
|
||||
// 数据更新
|
||||
dateUpdate() {
|
||||
this.timestr = switchShowTime(this.chartTime)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang='scss' scoped>
|
||||
.timeShow {
|
||||
position: absolute;
|
||||
top: 20px;
|
||||
left: 210px;
|
||||
}
|
||||
.timeToggle {
|
||||
position: absolute;
|
||||
right: 20px;
|
||||
top: 20px;
|
||||
top: 15px;
|
||||
}
|
||||
</style>
|
@ -1,6 +1,7 @@
|
||||
<template>
|
||||
<div style="flex: 1;" class="orderContainer">
|
||||
<Container name="订单完成情况" size="small" style="">
|
||||
<TimePrompt class="timeShow" :timestr="timestr" />
|
||||
<div style="padding: 5px 10px;">
|
||||
<dv-scroll-board :config="config" style="width:575px;height:230px" ref='orderScrollBoard'/>
|
||||
</div>
|
||||
@ -9,10 +10,12 @@
|
||||
</template>
|
||||
<script>
|
||||
import Container from '../components/Container'
|
||||
import TimePrompt from '../components/TimePrompt';
|
||||
import { formatDate } from '@/utils'
|
||||
import { switchShowTime } from '../utils'
|
||||
export default {
|
||||
name: 'OrderStatus',
|
||||
components: { Container },
|
||||
components: { Container, TimePrompt },
|
||||
computed: {
|
||||
order() {
|
||||
return this.$store.state.websocket.order
|
||||
@ -20,6 +23,7 @@ export default {
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
timestr: '',
|
||||
config: {
|
||||
header: ['上线时间', '客户名称', '规格','完成度'],
|
||||
headerBGC: 'rgba(32, 55, 96, 0.8)',
|
||||
@ -31,7 +35,9 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {},
|
||||
mounted() {
|
||||
this.timestr = switchShowTime('日')
|
||||
},
|
||||
watch:{
|
||||
order:{
|
||||
handler() {
|
||||
@ -49,8 +55,16 @@ export default {
|
||||
]);
|
||||
this.config.data = outArr
|
||||
this.$refs['orderScrollBoard'].updateRows(outArr)
|
||||
this.timestr = switchShowTime('日')
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang='scss' scoped>
|
||||
.timeShow {
|
||||
position: absolute;
|
||||
top: 20px;
|
||||
left: 210px;
|
||||
}
|
||||
</style>
|
@ -1,5 +1,6 @@
|
||||
<template>
|
||||
<Container name="本日生产良品率" size="large">
|
||||
<TimePrompt class="timeShow" :timestr="timestr" />
|
||||
<div style="padding: 5px 10px;">
|
||||
<dv-scroll-board :config="config" style="width:575px;height:230px" ref='yieldRateScrollBoard'/>
|
||||
</div>
|
||||
@ -22,7 +23,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="chart" style="height: 230px;">
|
||||
<YieldRateChart :chartTime='chartTime' :chartType='chartType'/>
|
||||
<YieldRateChart :chartTime='chartTime' :chartType='chartType' @emitFun='dateUpdate'/>
|
||||
</div>
|
||||
</div>
|
||||
</Container>
|
||||
@ -33,10 +34,12 @@ import ScrollBoard from '../components/ScrollBoard'
|
||||
import KilnLine from '../components/line'
|
||||
import Switcher from '../components/Switcher'
|
||||
import SelectorBtnGroup from '../components/SelectorBtnGroup';
|
||||
import YieldRateChart from '../components/YieldRateChart'
|
||||
import YieldRateChart from '../components/YieldRateChart';
|
||||
import TimePrompt from '../components/TimePrompt';
|
||||
import { switchShowTime } from '../utils';
|
||||
export default {
|
||||
name: 'YieldRate',
|
||||
components: { Container, ScrollBoard, KilnLine, Switcher, SelectorBtnGroup, YieldRateChart },
|
||||
components: { Container, ScrollBoard, KilnLine, Switcher, SelectorBtnGroup, YieldRateChart, TimePrompt },
|
||||
computed: {
|
||||
yieldRateTable() {
|
||||
return this.$store.state.websocket.yieldRateTable
|
||||
@ -55,7 +58,8 @@ export default {
|
||||
rowNum: 5
|
||||
},
|
||||
chartType:false,
|
||||
chartTime: "日"
|
||||
chartTime: "日",
|
||||
timestr: ""
|
||||
}
|
||||
},
|
||||
watch:{
|
||||
@ -73,6 +77,9 @@ export default {
|
||||
}
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.timestr = switchShowTime(this.chartTime)
|
||||
},
|
||||
methods: {
|
||||
changeType(val) {
|
||||
this.chartType = val
|
||||
@ -80,11 +87,21 @@ export default {
|
||||
// 切换时间
|
||||
toggleDate(val) {
|
||||
this.chartTime = val
|
||||
this.timestr = switchShowTime(this.chartTime)
|
||||
},
|
||||
// 数据更新
|
||||
dateUpdate() {
|
||||
this.timestr = switchShowTime(this.chartTime)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style lang='scss' scoped>
|
||||
.timeShow {
|
||||
position: absolute;
|
||||
top: 20px;
|
||||
left: 235px;
|
||||
}
|
||||
.lgd {
|
||||
color: #fff;
|
||||
|
||||
|
179
src/views/report/glass/day.vue
Normal file
179
src/views/report/glass/day.vue
Normal file
@ -0,0 +1,179 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2024-01-24 15:15:24
|
||||
* @LastEditTime: 2024-01-24 15:38:53
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<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" @change="changeTime" type="date" 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
|
||||
:limit.sync="listQuery.pageSize"
|
||||
:page.sync="listQuery.pageNo"
|
||||
:total="listQuery.total"
|
||||
@pagination="getDataList" /> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { parseTime } from '../../core/mixins/code-filter';
|
||||
import { getGlassPage, exportGlasscExcel } from '@/api/report/glass';
|
||||
import inputTable from './inputTable.vue';
|
||||
import { getCorePLList } from '@/api/base/coreProductionLine';
|
||||
import moment from 'moment'
|
||||
|
||||
export default {
|
||||
components: { inputTable },
|
||||
data() {
|
||||
return {
|
||||
urlOptions: {
|
||||
getDataListURL: getGlassPage,
|
||||
exportURL: exportGlasscExcel
|
||||
},
|
||||
listQuery: {
|
||||
pageSize: 10,
|
||||
pageNo: 1,
|
||||
total: 0,
|
||||
reportType: 2,
|
||||
reportTime: []
|
||||
},
|
||||
reportTime: '',
|
||||
startTimeStamp: '',
|
||||
endTimeStamp: '',
|
||||
tableData: [],
|
||||
proLineList: [],
|
||||
all: {}
|
||||
};
|
||||
},
|
||||
created() {
|
||||
this.getDict()
|
||||
},
|
||||
methods: {
|
||||
async getDict() {
|
||||
// 产线列表
|
||||
const res = await getCorePLList();
|
||||
this.proLineList = res.data;
|
||||
},
|
||||
// 获取数据列表
|
||||
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
|
||||
}
|
||||
})
|
||||
if (item.det === false) {
|
||||
this.all = {
|
||||
id: item.id,
|
||||
remark: item.remark
|
||||
}
|
||||
}
|
||||
return item.det === true
|
||||
});
|
||||
this.listQuery.total = response.data.length;
|
||||
this.dataListLoading = false;
|
||||
});
|
||||
},
|
||||
add0(m) {
|
||||
return m < 10 ? '0' + m : m
|
||||
},
|
||||
format(shijianchuo) {
|
||||
//shijianchuo是整数,否则要parseInt转换
|
||||
var time = moment(new Date(shijianchuo)).format('YYYY-MM-DD HH:mm:ss')
|
||||
// console.log(time)
|
||||
// var y = time.getFullYear();
|
||||
// var m = time.getMonth() + 1;
|
||||
// var d = time.getDate();
|
||||
// var h = time.getHours();
|
||||
// var mm = time.getMinutes();
|
||||
// var s = time.getSeconds();
|
||||
return time
|
||||
},
|
||||
changeTime(val) {
|
||||
if (val) {
|
||||
// console.log(val)
|
||||
// console.log(val.setHours(7, 0, 0))
|
||||
// console.log(val.setHours(7, 0, 0) + 24 * 60 * 60 * 1000)
|
||||
// let time = this.format(val.setHours(7, 0, 0))
|
||||
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);
|
||||
} else {
|
||||
this.listQuery.reportTime = []
|
||||
}
|
||||
},
|
||||
|
||||
//时间戳转为yy-mm-dd hh:mm:ss
|
||||
timeFun(unixtimestamp) {
|
||||
var unixtimestamp = new Date(unixtimestamp);
|
||||
var year = 1900 + unixtimestamp.getYear();
|
||||
var month = "0" + (unixtimestamp.getMonth() + 1);
|
||||
var date = "0" + unixtimestamp.getDate();
|
||||
return year + "-" + month.substring(month.length - 2, month.length) + "-" + date.substring(date.length - 2, date.length)
|
||||
},
|
||||
buttonClick(val) {
|
||||
this.listQuery.reportTime = val.reportTime ? val.reportTime : undefined;
|
||||
switch (val.btnName) {
|
||||
case 'search':
|
||||
this.listQuery.pageNo = 1;
|
||||
this.listQuery.pageSize = 10;
|
||||
this.getDataList();
|
||||
break;
|
||||
case 'export':
|
||||
this.handleExport();
|
||||
break;
|
||||
default:
|
||||
console.log(val);
|
||||
}
|
||||
},
|
||||
/** 导出按钮操作 */
|
||||
handleExport() {
|
||||
// 处理查询参数
|
||||
let params = { ...this.listQuery };
|
||||
params.pageNo = undefined;
|
||||
params.pageSize = undefined;
|
||||
this.$modal.confirm('是否确认导出所有数据项?').then(() => {
|
||||
this.exportLoading = true;
|
||||
return this.urlOptions.exportURL(params);
|
||||
}).then(response => {
|
||||
this.$download.excel(response, '原片生产周报.xls');
|
||||
this.exportLoading = false;
|
||||
}).catch(() => { });
|
||||
}
|
||||
},
|
||||
};
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
/* .blueTip { */
|
||||
/* padding-bottom: 10px; */
|
||||
/* } */
|
||||
.blueTip::before{
|
||||
display: inline-block;
|
||||
content: '';
|
||||
width: 4px;
|
||||
height: 18px;
|
||||
background: #0B58FF;
|
||||
border-radius: 1px;
|
||||
margin-right: 8PX;
|
||||
margin-top: 8px;
|
||||
}
|
||||
</style>
|
37
src/views/report/productionDayReport/InputArea.vue
Normal file
37
src/views/report/productionDayReport/InputArea.vue
Normal file
@ -0,0 +1,37 @@
|
||||
<template>
|
||||
<div class="tableInner">
|
||||
<el-input v-model="list[itemProp]" @blur="changeInput" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: 'InputArea',
|
||||
props: {
|
||||
injectData: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
},
|
||||
itemProp: {
|
||||
type: String
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
list: this.injectData
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
changeInput() {
|
||||
console.log(this.list)
|
||||
this.$emit('emitData', this.list)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.tableInner .el-input__inner {
|
||||
border: none;
|
||||
padding: 0;
|
||||
height: 33px;
|
||||
}
|
||||
</style>
|
570
src/views/report/productionDayReport/index.vue
Normal file
570
src/views/report/productionDayReport/index.vue
Normal file
@ -0,0 +1,570 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-12-12 13:45:25
|
||||
* @LastEditTime: 2024-01-24 16:53:41
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :inline="true" :model="dataForm" class="demo-form-inline">
|
||||
<el-form-item label="日" prop="reportTime">
|
||||
<el-date-picker v-model="reportTime" @change="changeTime" type="date" placeholder="选择日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-button type="primary" @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>
|
||||
<el-row style="float: right; margin-bottom: 5px">
|
||||
<el-button size="small" @click="editDataList()">编辑</el-button>
|
||||
<el-button size="small" v-if="isSave" @click="saveDataList()">保存</el-button>
|
||||
</el-row>
|
||||
<el-table :data="list" style="width: 100%" :header-cell-style="{
|
||||
background: '#F2F4F9',
|
||||
color: '#606266'
|
||||
}">
|
||||
<el-table-column :label="'许昌安彩月成品生产汇总' + timeTips" align="center">
|
||||
<el-table-column prop="lineId" label="生产线">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-if="scope.row.det === true" v-model="scope.row.lineId" :disabled="disabled"></el-input>
|
||||
<span v-else>{{ scope.row.lineId }} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="投入数㎡">
|
||||
<el-table-column prop="inputNow" label="本周">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-if="scope.row.det === true" v-model="scope.row.inputNow" :disabled="disabled"></el-input>
|
||||
<span v-else>{{ scope.row.inputNow }} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="inputHis" label="上周">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-if="scope.row.det === true" v-model="scope.row.inputHis" :disabled="disabled"></el-input>
|
||||
<span v-else>{{ scope.row.inputHis }} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="inputTrend" label="增减">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-if="scope.row.det === true" v-model="scope.row.inputTrend" :disabled="disabled"></el-input>
|
||||
<span v-else>{{ scope.row.inputTrend }} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="完成良品产量">
|
||||
<el-table-column prop="goodProductNow" label="本周">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductNow" :disabled="disabled">
|
||||
</el-input>
|
||||
<span v-else>{{ scope.row.goodProductNow }} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="goodProductHis" label="上周">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductHis" :disabled="disabled">
|
||||
</el-input>
|
||||
<span v-else>{{ scope.row.goodProductHis }} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="goodProductTrend" label="增减">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductTrend" :disabled="disabled">
|
||||
</el-input>
|
||||
<span v-else>{{ scope.row.goodProductTrend }} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="原片漏检率">
|
||||
<el-table-column prop="missCheckNow" label="本周">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-if="scope.row.det === true" v-model="scope.row.missCheckNow" :disabled="disabled"></el-input>
|
||||
<span v-else>{{ scope.row.missCheckNow }} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="missCheckHis" label="上周">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-if="scope.row.det === true" v-model="scope.row.missCheckHis" :disabled="disabled"></el-input>
|
||||
<span v-else>{{ scope.row.missCheckHis }} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="missCheckTrend" label="增减">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-if="scope.row.det === true" v-model="scope.row.missCheckTrend" :disabled="disabled">
|
||||
</el-input>
|
||||
<span v-else>{{ scope.row.missCheckTrend }} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="综合良品率">
|
||||
<el-table-column prop="goodProductPassNow" label="本周">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductPassNow" :disabled="disabled">
|
||||
</el-input>
|
||||
<span v-else>{{ scope.row.goodProductPassNow }} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="goodProductPassHis" label="上周">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductPassHis" :disabled="disabled">
|
||||
</el-input>
|
||||
<span v-else>{{ scope.row.goodProductPassHis }} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="goodProductPassTrend" label="增减">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductPassTrend" :disabled="disabled">
|
||||
</el-input>
|
||||
<span v-else>{{ scope.row.goodProductPassTrend }} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<div style="height: 50px;" class="remark" slot="append">
|
||||
<h3 style="float: left;text-align: center;margin-left: 20px;">备注:</h3>
|
||||
<el-input :disabled="disabled" style="float:right;width: 96%;margin-top: 8px;" v-model="remark"></el-input>
|
||||
</div>
|
||||
</el-table>
|
||||
<!-- 搜索工作栏 -->
|
||||
<!-- <SearchBar :formConfigs="searchBarFormConfig" ref="search-bar" @headBtnClick="handleSearchBarBtnClick" /> -->
|
||||
|
||||
<!-- 列表 -->
|
||||
<!-- <base-table :table-props="tableProps" :page="1" :limit="10" :summary-method="getSummaries" show-summary
|
||||
:table-data="list">
|
||||
</base-table> -->
|
||||
<!-- 分页组件 -->
|
||||
<!-- <pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNo"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList" /> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getProductionDataList,
|
||||
updateProductionDataList,
|
||||
updateSumProductionDataList,
|
||||
exportProductExcel
|
||||
} from '@/api/report/production';
|
||||
// import Editor from '@/components/Editor';
|
||||
import moment from 'moment';
|
||||
// import DialogForm from './dialogForm.vue';
|
||||
|
||||
// import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
||||
const tableProps = [
|
||||
{
|
||||
// width: 128,
|
||||
prop: 'lineId',
|
||||
label: '生产线',
|
||||
},
|
||||
{
|
||||
// width: 128,
|
||||
prop: '',
|
||||
label: '投入数㎡',
|
||||
align: 'center',
|
||||
children: [
|
||||
{
|
||||
prop: 'inputNow',
|
||||
label: '本周'
|
||||
},
|
||||
{
|
||||
prop: 'inputHis',
|
||||
label: '上周'
|
||||
},
|
||||
{
|
||||
prop: 'inputTrend',
|
||||
label: '增减'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
// width: 128,
|
||||
prop: '',
|
||||
label: '完成良品产量',
|
||||
align: 'center',
|
||||
children: [
|
||||
{
|
||||
prop: 'goodProductNow',
|
||||
label: '本周'
|
||||
},
|
||||
{
|
||||
prop: 'goodProductHis',
|
||||
label: '上周'
|
||||
},
|
||||
{
|
||||
prop: 'goodProductTrend',
|
||||
label: '增减'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
// width: 128,
|
||||
prop: '',
|
||||
label: '原片漏检率',
|
||||
align: 'center',
|
||||
children: [
|
||||
{
|
||||
prop: 'missCheckNow',
|
||||
label: '本周'
|
||||
},
|
||||
{
|
||||
prop: 'missCheckHis',
|
||||
label: '上周'
|
||||
},
|
||||
{
|
||||
prop: 'missCheckTrend',
|
||||
label: '增减'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
// width: 128,
|
||||
prop: '',
|
||||
label: '综合良品率',
|
||||
align: 'center',
|
||||
children: [
|
||||
{
|
||||
prop: 'goodProductPassNow',
|
||||
label: '本周'
|
||||
},
|
||||
{
|
||||
prop: 'goodProductPassHis',
|
||||
label: '上周'
|
||||
},
|
||||
{
|
||||
prop: 'goodProductPassTrend',
|
||||
label: '增减'
|
||||
}
|
||||
]
|
||||
},
|
||||
];
|
||||
export default {
|
||||
name: 'statisticalData',
|
||||
// components: {
|
||||
// DialogForm,
|
||||
// },
|
||||
// mixins: [basicPageMixin],
|
||||
data() {
|
||||
return {
|
||||
list: [],
|
||||
remark: '',
|
||||
monthValue:[],
|
||||
// dynamicProps: [],
|
||||
tableProps,
|
||||
urlOptions: {
|
||||
exportURL: exportProductExcel
|
||||
},
|
||||
isSave:false,
|
||||
disabled: true,
|
||||
sumArr: [],
|
||||
timeTips:'',
|
||||
searchBarFormConfig: [
|
||||
// {
|
||||
// type: 'select',
|
||||
// label: '工单名称',
|
||||
// placeholder: '请选择工单名称',
|
||||
// param: 'workOrderIdList',
|
||||
// selectOptions: [],
|
||||
// multiple: true,
|
||||
// labelField: 'name',
|
||||
// valueField: 'id',
|
||||
// defaultSelect: []
|
||||
// },
|
||||
// {
|
||||
// type: 'select',
|
||||
// label: '产品',
|
||||
// placeholder: '请选择产品',
|
||||
// param: 'productionId',
|
||||
// selectOptions: [],
|
||||
// },
|
||||
// {
|
||||
// type: 'input',
|
||||
// label: '检测内容',
|
||||
// placeholder: '请输入检测内容',
|
||||
// param: 'inspectionDetContent',
|
||||
// },
|
||||
{
|
||||
type: 'datePicker',
|
||||
label: '时间段',
|
||||
dateType: 'daterange', // datetimerange
|
||||
// format: 'yyyy-MM-dd HH:mm:ss',
|
||||
format: 'yyyy-MM-dd HH:mm:ss',
|
||||
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
||||
rangeSeparator: '-',
|
||||
startPlaceholder: '开始日期',
|
||||
endPlaceholder: '结束日期',
|
||||
defaultTime: ['00:00:00', '23:59:59'],
|
||||
param: 'checkTime',
|
||||
// width: 350,
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '查询',
|
||||
name: 'search',
|
||||
color: 'primary',
|
||||
},
|
||||
// {
|
||||
// type: this.$auth.hasPermi(
|
||||
// 'base:quality-inspection-record:create'
|
||||
// )
|
||||
// ? 'button'
|
||||
// : '',
|
||||
// btnName: '新增',
|
||||
// name: 'add',
|
||||
// plain: true,
|
||||
// color: 'success',
|
||||
// },
|
||||
],
|
||||
pickerOptions: {
|
||||
disabledDate(date) {
|
||||
return date.getTime() > Date.now()
|
||||
}
|
||||
},
|
||||
// tableBtn: [
|
||||
// this.$auth.hasPermi('base:quality-inspection-record:update')
|
||||
// ? {
|
||||
// type: 'edit',
|
||||
// btnName: '修改',
|
||||
// }
|
||||
// : undefined,
|
||||
// this.$auth.hasPermi('base:quality-inspection-record:delete')
|
||||
// ? {
|
||||
// type: 'delete',
|
||||
// btnName: '删除',
|
||||
// }
|
||||
// : undefined,
|
||||
// ].filter((v) => v),
|
||||
// tableProps: [
|
||||
// {
|
||||
// prop: 'createTime',
|
||||
// label: '添加时间',
|
||||
// fixed: true,
|
||||
// width: 180,
|
||||
// filter: (val) => moment(val).format('yyyy-MM-DD HH:mm:ss'),
|
||||
// },
|
||||
// {
|
||||
// // width: 128,
|
||||
// prop: 'inspectionDetContent',
|
||||
// label: '检测内容',
|
||||
// },
|
||||
// {
|
||||
// // width: 128,
|
||||
// prop: 'lineName',
|
||||
// label: '产线',
|
||||
// },
|
||||
// {
|
||||
// // width: 128,
|
||||
// prop: 'checkPerson',
|
||||
// label: '检测人员',
|
||||
// },
|
||||
// {
|
||||
// // width: 160,
|
||||
// prop: 'checkTime',
|
||||
// label: '检测时间',
|
||||
// filter: (val) =>
|
||||
// val != null ? moment(val).format('yyyy-MM-DD HH:mm:ss') : '-',
|
||||
// },
|
||||
// {
|
||||
// width: 90,
|
||||
// prop: 'source',
|
||||
// label: '来源',
|
||||
// filter: (val) => ['未知', '手动', '自动'][val],
|
||||
// },
|
||||
// ],
|
||||
// 搜索框需要的 keys, 与上面 queryParams 的除 pageNo, pageSize 之外的 key 一一对应
|
||||
|
||||
// searchBarKeys: ['inspectionDetContent', 'checkTime', 'productionLineId'],
|
||||
// form: {
|
||||
// id: undefined,
|
||||
// inspectionDetId: undefined,
|
||||
// inspectionDetContent: undefined,
|
||||
// productionLineId: undefined,
|
||||
// sectionId: undefined,
|
||||
// checkPerson: undefined,
|
||||
// checkTime: undefined,
|
||||
// source: undefined,
|
||||
// explainText: undefined,
|
||||
// remark: undefined,
|
||||
// },
|
||||
// 查询参数
|
||||
dataForm: {
|
||||
// workOrderIdList:undefined,
|
||||
// productionId: undefined,
|
||||
// startTime: undefined,
|
||||
// endTime: undefined,
|
||||
reportTime: [],
|
||||
reportType:2,
|
||||
// productionLineId: null,
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
// this.getProductLineList();
|
||||
},
|
||||
mounted() {
|
||||
// if (this.$route.params.startTime && this.$route.params.endTime) {
|
||||
// this.searchBarFormConfig[0].defaultSelect = [
|
||||
// this.$route.params.startTime,
|
||||
// this.$route.params.endTime,
|
||||
// ];
|
||||
// this.queryParams.param = {};
|
||||
// this.$set(
|
||||
// this.queryParams.param,
|
||||
// 'startTime',
|
||||
// this.$route.params.startTime
|
||||
// );
|
||||
// this.$set(this.queryParams.param, 'endTime', this.$route.params.endTime);
|
||||
// } else {
|
||||
// this.searchBarFormConfig[0].defaultSelect = [];
|
||||
// }
|
||||
this.getDataList()
|
||||
},
|
||||
methods: {
|
||||
format(shijianchuo) {
|
||||
//shijianchuo是整数,否则要parseInt转换
|
||||
var time = moment(new Date(shijianchuo)).format('YYYY-MM-DD HH:mm:ss')
|
||||
// console.log(time)
|
||||
// var y = time.getFullYear();
|
||||
// var m = time.getMonth() + 1;
|
||||
// var d = time.getDate();
|
||||
// var h = time.getHours();
|
||||
// var mm = time.getMinutes();
|
||||
// var s = time.getSeconds();
|
||||
return time
|
||||
},
|
||||
changeTime(val) {
|
||||
if (val) {
|
||||
// console.log(val)
|
||||
// console.log(val.setHours(7, 0, 0))
|
||||
// console.log(val.setHours(7, 0, 0) + 24 * 60 * 60 * 1000)
|
||||
// let time = this.format(val.setHours(7, 0, 0))
|
||||
this.dataForm.reportTime[0] = this.format(val.setHours(7, 0, 0)) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
||||
this.dataForm.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.dataForm.reportTime);
|
||||
} else {
|
||||
this.dataForm.reportTime = []
|
||||
}
|
||||
},
|
||||
handleExport() {
|
||||
// 处理查询参数
|
||||
let params = { ...this.dataForm };
|
||||
params.pageNo = undefined;
|
||||
params.pageSize = undefined;
|
||||
this.$modal.confirm('是否确认导出所有数据项?').then(() => {
|
||||
this.exportLoading = true;
|
||||
return this.urlOptions.exportURL(params);
|
||||
}).then(response => {
|
||||
this.$download.excel(response, '成品生产月报.xls');
|
||||
this.exportLoading = false;
|
||||
}).catch(() => { });
|
||||
},
|
||||
timeSelect() {
|
||||
// switch (this.queryParams.timeDim) {
|
||||
// case '1':
|
||||
// if (this.timeValue[1] - this.timeValue[0] > 7 * 24 * 3600000) {
|
||||
// this.$modal.msgError('最大时间范围为7天,请重新选择')
|
||||
// this.timeValue = []
|
||||
// }
|
||||
// break
|
||||
// case '2':
|
||||
if (this.monthValue[1] - this.monthValue[0] > 729 * 24 * 3600000) {
|
||||
this.$modal.msgError('最大时间范围为24个月,请重新选择')// 同理上面
|
||||
this.monthValue = []
|
||||
}
|
||||
// break
|
||||
// case '4':
|
||||
// if (this.monthValue[1] - this.monthValue[0] > 729 * 24 * 3600000) {
|
||||
// this.$modal.msgError('最大时间范围为24个月,请重新选择')// 同理上面
|
||||
// this.monthValue = []
|
||||
// }
|
||||
// break
|
||||
// default:
|
||||
},
|
||||
transformTime(timeStamp) {// 本月最后一天
|
||||
let year = moment(timeStamp).format('YYYY')
|
||||
let month = moment(timeStamp).format('MM')
|
||||
let newData = moment(new Date(year, month, 0)).format('YYYY-MM-DD') + ' 23:59:59'
|
||||
let value = newData
|
||||
console.log(value);
|
||||
return value
|
||||
},
|
||||
// selectTime() {
|
||||
// switch (this.queryParams.type) {
|
||||
// case 1:
|
||||
// this.queryParams.searchTime = this.monthValue
|
||||
// break;
|
||||
// case 2:
|
||||
// this.queryParams.searchTime = this.weekValue
|
||||
// break;
|
||||
// default:
|
||||
// this.queryParams.searchTime = this.dateValue
|
||||
// }
|
||||
// },
|
||||
editDataList() {
|
||||
this.disabled = false
|
||||
this.isSave = true
|
||||
},
|
||||
async saveDataList() {
|
||||
let obj = {}
|
||||
this.list.forEach((ele, index) => {
|
||||
if (ele.det === false) {
|
||||
this.list[index].lineId = ''
|
||||
this.list[index].remark = this.remark
|
||||
obj = ele
|
||||
this.list.splice(index,1)
|
||||
}
|
||||
})
|
||||
let updateArr = this.list
|
||||
// console.log(JSON.stringify(updateArr[1]))
|
||||
const result = await Promise.all([
|
||||
await updateSumProductionDataList(obj),
|
||||
await updateProductionDataList(updateArr),
|
||||
]);
|
||||
if (result[0] == true && result[1] == true) {
|
||||
// console.log(res)
|
||||
this.disabled = true
|
||||
this.isSave = false
|
||||
this.getDataList()
|
||||
} else {
|
||||
this.$modal.msgError('更新失败');
|
||||
}
|
||||
},
|
||||
async getDataList() {
|
||||
if (this.monthValue.length > 0) {
|
||||
console.log(this.monthValue)
|
||||
this.dataForm.reportTime[0] = this.transformTime(this.monthValue[0])
|
||||
// this.queryParams.startTime = this.monthValue[0]
|
||||
this.dataForm.reportTime[1] = this.transformTime(this.monthValue[1])
|
||||
this.timeTips = moment(this.monthValue[0]).format('YYYY-MM-DD') + ' - ' + moment(this.monthValue[1]).format('YYYY-MM-DD')
|
||||
console.log(this.timeTips);
|
||||
} else {
|
||||
// this.$modal.msgError('月范围不能为空')
|
||||
// return false
|
||||
}
|
||||
|
||||
console.log(this.dataForm);
|
||||
const res = await this.$axios({
|
||||
url: '/base/report-auto-production/page',
|
||||
method: 'get',
|
||||
params: this.dataForm
|
||||
})
|
||||
console.log(res)
|
||||
// let sum = undefined
|
||||
// res.data.list.forEach((ele, index) => {
|
||||
// if (ele.det === false) {
|
||||
// sum = res.data.list.splice(index, 1)
|
||||
// }
|
||||
// })
|
||||
res.data.list.forEach((ele,index) => {
|
||||
if (ele.det === false) {
|
||||
res.data.list[index].lineId = '合计'
|
||||
this.remark = res.data.list[index].remark
|
||||
}
|
||||
});
|
||||
this.list = res.data.list
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-12-12 13:45:25
|
||||
* @LastEditTime: 2023-12-14 14:56:38
|
||||
* @LastEditTime: 2024-01-24 15:57:10
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -15,10 +15,13 @@
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-button type="primary" @click="getDataList()">查询</el-button>
|
||||
<el-button type="primary" icon="el-icon-edit-outline" @click="editDataList()">编辑</el-button>
|
||||
<el-button v-if="isSave" type="success" @click="saveDataList()">保存</el-button>
|
||||
|
||||
<el-button v-if="this.$auth.hasPermi('report:glass-month:export')" type="primary" size="small" plain
|
||||
@click="handleExport">导出</el-button>
|
||||
</el-form>
|
||||
<el-row style="float: right; margin-bottom: 5px">
|
||||
<el-button size="small" @click="editDataList()">编辑</el-button>
|
||||
<el-button size="small" v-if="isSave" @click="saveDataList()">保存</el-button>
|
||||
</el-row>
|
||||
<el-table :data="list" style="width: 100%" :header-cell-style="{
|
||||
background: '#F2F4F9',
|
||||
color: '#606266'
|
||||
@ -144,7 +147,8 @@
|
||||
import {
|
||||
getProductionDataList,
|
||||
updateProductionDataList,
|
||||
updateSumProductionDataList
|
||||
updateSumProductionDataList,
|
||||
exportProductExcel
|
||||
} from '@/api/report/production';
|
||||
// import Editor from '@/components/Editor';
|
||||
import moment from 'moment';
|
||||
@ -251,9 +255,9 @@ export default {
|
||||
monthValue:[],
|
||||
// dynamicProps: [],
|
||||
tableProps,
|
||||
// dataForm: {
|
||||
// reportTime:undefined
|
||||
// },
|
||||
urlOptions: {
|
||||
exportURL: exportProductExcel
|
||||
},
|
||||
isSave:false,
|
||||
disabled: true,
|
||||
sumArr: [],
|
||||
@ -420,6 +424,19 @@ export default {
|
||||
this.getDataList()
|
||||
},
|
||||
methods: {
|
||||
handleExport() {
|
||||
// 处理查询参数
|
||||
let params = { ...this.dataForm };
|
||||
params.pageNo = undefined;
|
||||
params.pageSize = undefined;
|
||||
this.$modal.confirm('是否确认导出所有数据项?').then(() => {
|
||||
this.exportLoading = true;
|
||||
return this.urlOptions.exportURL(params);
|
||||
}).then(response => {
|
||||
this.$download.excel(response, '成品生产月报.xls');
|
||||
this.exportLoading = false;
|
||||
}).catch(() => { });
|
||||
},
|
||||
timeSelect() {
|
||||
// switch (this.queryParams.timeDim) {
|
||||
// case '1':
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-12-12 13:45:25
|
||||
* @LastEditTime: 2023-12-14 14:56:40
|
||||
* @LastEditTime: 2024-01-24 15:50:10
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -15,10 +15,13 @@
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-button type="primary" @click="getDataList()">查询</el-button>
|
||||
<el-button type="primary" icon="el-icon-edit-outline" @click="editDataList()">编辑</el-button>
|
||||
<el-button v-if="isSave" type="success" @click="saveDataList()">保存</el-button>
|
||||
|
||||
<!-- <el-button type="primary" icon="el-icon-edit-outline" @click="editDataList()">编辑</el-button>
|
||||
<el-button v-if="isSave" type="success" @click="saveDataList()">保存</el-button> -->
|
||||
</el-form>
|
||||
<el-row style="float: right; margin-bottom: 5px">
|
||||
<el-button size="small" @click="editDataList()">编辑</el-button>
|
||||
<el-button size="small" v-if="isSave" @click="saveDataList()">保存</el-button>
|
||||
</el-row>
|
||||
<el-table :data="list" style="width: 100%" :header-cell-style="{
|
||||
background: '#F2F4F9',
|
||||
color: '#606266'
|
||||
|
37
src/views/report/productionWeekReport copy/InputArea.vue
Normal file
37
src/views/report/productionWeekReport copy/InputArea.vue
Normal file
@ -0,0 +1,37 @@
|
||||
<template>
|
||||
<div class="tableInner">
|
||||
<el-input v-model="list[itemProp]" @blur="changeInput" />
|
||||
</div>
|
||||
</template>
|
||||
<script>
|
||||
export default {
|
||||
name: 'InputArea',
|
||||
props: {
|
||||
injectData: {
|
||||
type: Object,
|
||||
default: () => ({})
|
||||
},
|
||||
itemProp: {
|
||||
type: String
|
||||
}
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
list: this.injectData
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
changeInput() {
|
||||
console.log(this.list)
|
||||
this.$emit('emitData', this.list)
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
<style>
|
||||
.tableInner .el-input__inner {
|
||||
border: none;
|
||||
padding: 0;
|
||||
height: 33px;
|
||||
}
|
||||
</style>
|
468
src/views/report/productionWeekReport copy/index.vue
Normal file
468
src/views/report/productionWeekReport copy/index.vue
Normal file
@ -0,0 +1,468 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-12-12 13:45:25
|
||||
* @LastEditTime: 2024-01-24 15:55:48
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
<template>
|
||||
<div class="app-container">
|
||||
<el-form :inline="true" :model="dataForm" class="demo-form-inline">
|
||||
<el-form-item>
|
||||
<el-form-item label="日" prop="reportTime">
|
||||
<el-date-picker v-model="reportTime" @change="changeTime" type="date" placeholder="选择日期">
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
</el-form-item>
|
||||
<el-button type="primary" @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>
|
||||
<el-row style="float: right; margin-bottom: 5px">
|
||||
<el-button size="small" @click="editDataList()">编辑</el-button>
|
||||
<el-button size="small" v-if="isSave" @click="saveDataList()">保存</el-button>
|
||||
</el-row>
|
||||
<el-table :data="list" style="width: 100%" :header-cell-style="{
|
||||
background: '#F2F4F9',
|
||||
color: '#606266'
|
||||
}">
|
||||
<el-table-column :label="'许昌安彩月成品生产汇总' + timeTips" align="center">
|
||||
<el-table-column prop="lineId" label="生产线">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-if="scope.row.det === true" v-model="scope.row.lineId" :disabled="disabled"></el-input>
|
||||
<span v-else>{{ scope.row.lineId }} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column label="投入数㎡">
|
||||
<el-table-column prop="inputNow" label="本周">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-if="scope.row.det === true" v-model="scope.row.inputNow" :disabled="disabled"></el-input>
|
||||
<span v-else>{{ scope.row.inputNow }} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="inputHis" label="上周">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-if="scope.row.det === true" v-model="scope.row.inputHis" :disabled="disabled"></el-input>
|
||||
<span v-else>{{ scope.row.inputHis }} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="inputTrend" label="增减">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-if="scope.row.det === true" v-model="scope.row.inputTrend" :disabled="disabled"></el-input>
|
||||
<span v-else>{{ scope.row.inputTrend }} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="完成良品产量">
|
||||
<el-table-column prop="goodProductNow" label="本周">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductNow" :disabled="disabled">
|
||||
</el-input>
|
||||
<span v-else>{{ scope.row.goodProductNow }} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="goodProductHis" label="上周">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductHis" :disabled="disabled">
|
||||
</el-input>
|
||||
<span v-else>{{ scope.row.goodProductHis }} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="goodProductTrend" label="增减">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductTrend" :disabled="disabled">
|
||||
</el-input>
|
||||
<span v-else>{{ scope.row.goodProductTrend }} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="原片漏检率">
|
||||
<el-table-column prop="missCheckNow" label="本周">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-if="scope.row.det === true" v-model="scope.row.missCheckNow" :disabled="disabled"></el-input>
|
||||
<span v-else>{{ scope.row.missCheckNow }} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="missCheckHis" label="上周">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-if="scope.row.det === true" v-model="scope.row.missCheckHis" :disabled="disabled"></el-input>
|
||||
<span v-else>{{ scope.row.missCheckHis }} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="missCheckTrend" label="增减">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-if="scope.row.det === true" v-model="scope.row.missCheckTrend" :disabled="disabled">
|
||||
</el-input>
|
||||
<span v-else>{{ scope.row.missCheckTrend }} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<el-table-column label="综合良品率">
|
||||
<el-table-column prop="goodProductPassNow" label="本周">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductPassNow" :disabled="disabled">
|
||||
</el-input>
|
||||
<span v-else>{{ scope.row.goodProductPassNow }} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="goodProductPassHis" label="上周">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductPassHis" :disabled="disabled">
|
||||
</el-input>
|
||||
<span v-else>{{ scope.row.goodProductPassHis }} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
<el-table-column prop="goodProductPassTrend" label="增减">
|
||||
<template slot-scope="scope">
|
||||
<el-input v-if="scope.row.det === true" v-model="scope.row.goodProductPassTrend" :disabled="disabled">
|
||||
</el-input>
|
||||
<span v-else>{{ scope.row.goodProductPassTrend }} </span>
|
||||
</template>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
</el-table-column>
|
||||
<div style="height: 50px;" class="remark" slot="append">
|
||||
<h3 style="float: left;text-align: center;margin-left: 20px;">备注:</h3>
|
||||
<el-input :disabled="disabled" style="float:right;width: 96%;margin-top: 8px;" v-model="remark"></el-input>
|
||||
</div>
|
||||
</el-table>
|
||||
<!-- 搜索工作栏 -->
|
||||
<!-- <SearchBar :formConfigs="searchBarFormConfig" ref="search-bar" @headBtnClick="handleSearchBarBtnClick" /> -->
|
||||
|
||||
<!-- 列表 -->
|
||||
<!-- <base-table :table-props="tableProps" :page="1" :limit="10" :summary-method="getSummaries" show-summary
|
||||
:table-data="list">
|
||||
</base-table> -->
|
||||
<!-- 分页组件 -->
|
||||
<!-- <pagination
|
||||
v-show="total > 0"
|
||||
:total="total"
|
||||
:page.sync="queryParams.pageNo"
|
||||
:limit.sync="queryParams.pageSize"
|
||||
@pagination="getList" /> -->
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {
|
||||
getProductionDataList,
|
||||
updateProductionDataList,
|
||||
updateSumProductionDataList,
|
||||
exportProductExcel
|
||||
} from '@/api/report/production';
|
||||
// import Editor from '@/components/Editor';
|
||||
import moment from 'moment';
|
||||
// import DialogForm from './dialogForm.vue';
|
||||
|
||||
// import basicPageMixin from '@/mixins/lb/basicPageMixin';
|
||||
const tableProps = [
|
||||
{
|
||||
// width: 128,
|
||||
prop: 'lineId',
|
||||
label: '生产线',
|
||||
},
|
||||
{
|
||||
// width: 128,
|
||||
prop: '',
|
||||
label: '投入数㎡',
|
||||
align: 'center',
|
||||
children: [
|
||||
{
|
||||
prop: 'inputNow',
|
||||
label: '本周'
|
||||
},
|
||||
{
|
||||
prop: 'inputHis',
|
||||
label: '上周'
|
||||
},
|
||||
{
|
||||
prop: 'inputTrend',
|
||||
label: '增减'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
// width: 128,
|
||||
prop: '',
|
||||
label: '完成良品产量',
|
||||
align: 'center',
|
||||
children: [
|
||||
{
|
||||
prop: 'goodProductNow',
|
||||
label: '本周'
|
||||
},
|
||||
{
|
||||
prop: 'goodProductHis',
|
||||
label: '上周'
|
||||
},
|
||||
{
|
||||
prop: 'goodProductTrend',
|
||||
label: '增减'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
// width: 128,
|
||||
prop: '',
|
||||
label: '原片漏检率',
|
||||
align: 'center',
|
||||
children: [
|
||||
{
|
||||
prop: 'missCheckNow',
|
||||
label: '本周'
|
||||
},
|
||||
{
|
||||
prop: 'missCheckHis',
|
||||
label: '上周'
|
||||
},
|
||||
{
|
||||
prop: 'missCheckTrend',
|
||||
label: '增减'
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
// width: 128,
|
||||
prop: '',
|
||||
label: '综合良品率',
|
||||
align: 'center',
|
||||
children: [
|
||||
{
|
||||
prop: 'goodProductPassNow',
|
||||
label: '本周'
|
||||
},
|
||||
{
|
||||
prop: 'goodProductPassHis',
|
||||
label: '上周'
|
||||
},
|
||||
{
|
||||
prop: 'goodProductPassTrend',
|
||||
label: '增减'
|
||||
}
|
||||
]
|
||||
},
|
||||
];
|
||||
export default {
|
||||
name: 'statisticalData',
|
||||
// components: {
|
||||
// DialogForm,
|
||||
// },
|
||||
// mixins: [basicPageMixin],
|
||||
data() {
|
||||
return {
|
||||
list: [],
|
||||
remark: '',
|
||||
urlOptions: {
|
||||
// getDataListURL: getGlassPage,
|
||||
exportURL: exportProductExcel
|
||||
},
|
||||
// dynamicProps: [],
|
||||
tableProps,
|
||||
timeTips:'',
|
||||
// dataForm: {
|
||||
// reportTime:undefined
|
||||
// },
|
||||
isSave:false,
|
||||
disabled: true,
|
||||
sumArr: [],
|
||||
weekValue1: null,//最多24周
|
||||
weekValue2: null,
|
||||
searchBarFormConfig: [
|
||||
// {
|
||||
// type: 'select',
|
||||
// label: '工单名称',
|
||||
// placeholder: '请选择工单名称',
|
||||
// param: 'workOrderIdList',
|
||||
// selectOptions: [],
|
||||
// multiple: true,
|
||||
// labelField: 'name',
|
||||
// valueField: 'id',
|
||||
// defaultSelect: []
|
||||
// },
|
||||
// {
|
||||
// type: 'select',
|
||||
// label: '产品',
|
||||
// placeholder: '请选择产品',
|
||||
// param: 'productionId',
|
||||
// selectOptions: [],
|
||||
// },
|
||||
// {
|
||||
// type: 'input',
|
||||
// label: '检测内容',
|
||||
// placeholder: '请输入检测内容',
|
||||
// param: 'inspectionDetContent',
|
||||
// },
|
||||
{
|
||||
type: 'datePicker',
|
||||
label: '时间段',
|
||||
dateType: 'daterange', // datetimerange
|
||||
// format: 'yyyy-MM-dd HH:mm:ss',
|
||||
format: 'yyyy-MM-dd HH:mm:ss',
|
||||
valueFormat: 'yyyy-MM-dd HH:mm:ss',
|
||||
rangeSeparator: '-',
|
||||
startPlaceholder: '开始日期',
|
||||
endPlaceholder: '结束日期',
|
||||
defaultTime: ['00:00:00', '23:59:59'],
|
||||
param: 'checkTime',
|
||||
// width: 350,
|
||||
},
|
||||
{
|
||||
type: 'button',
|
||||
btnName: '查询',
|
||||
name: 'search',
|
||||
color: 'primary',
|
||||
},
|
||||
// {
|
||||
// type: this.$auth.hasPermi(
|
||||
// 'base:quality-inspection-record:create'
|
||||
// )
|
||||
// ? 'button'
|
||||
// : '',
|
||||
// btnName: '新增',
|
||||
// name: 'add',
|
||||
// plain: true,
|
||||
// color: 'success',
|
||||
// },
|
||||
],
|
||||
pickerOptionsWeek: {
|
||||
disabledDate(time) {
|
||||
let day = Date.now()
|
||||
let limitTime = moment(day).day(-1)
|
||||
return time.getTime() > new Date(limitTime).getTime()
|
||||
}
|
||||
},
|
||||
reportTime:undefined,
|
||||
dataForm: {
|
||||
// workOrderIdList:undefined,
|
||||
// productionId: undefined,
|
||||
// startTime: undefined,
|
||||
// endTime: undefined,
|
||||
reportTime: [],
|
||||
reportType:2
|
||||
// productionLineId: null,
|
||||
},
|
||||
};
|
||||
},
|
||||
created() {
|
||||
// this.getProductLineList();
|
||||
},
|
||||
mounted() {
|
||||
// if (this.$route.params.startTime && this.$route.params.endTime) {
|
||||
// this.searchBarFormConfig[0].defaultSelect = [
|
||||
// this.$route.params.startTime,
|
||||
// this.$route.params.endTime,
|
||||
// ];
|
||||
// this.queryParams.param = {};
|
||||
// this.$set(
|
||||
// this.queryParams.param,
|
||||
// 'startTime',
|
||||
// this.$route.params.startTime
|
||||
// );
|
||||
// this.$set(this.queryParams.param, 'endTime', this.$route.params.endTime);
|
||||
// } else {
|
||||
// this.searchBarFormConfig[0].defaultSelect = [];
|
||||
// }
|
||||
this.getDataList()
|
||||
},
|
||||
methods: {
|
||||
format(shijianchuo) {
|
||||
//shijianchuo是整数,否则要parseInt转换
|
||||
var time = moment(new Date(shijianchuo)).format('YYYY-MM-DD HH:mm:ss')
|
||||
// console.log(time)
|
||||
// var y = time.getFullYear();
|
||||
// var m = time.getMonth() + 1;
|
||||
// var d = time.getDate();
|
||||
// var h = time.getHours();
|
||||
// var mm = time.getMinutes();
|
||||
// var s = time.getSeconds();
|
||||
return time
|
||||
},
|
||||
changeTime(val) {
|
||||
if (val) {
|
||||
// console.log(val)
|
||||
// console.log(val.setHours(7, 0, 0))
|
||||
// console.log(val.setHours(7, 0, 0) + 24 * 60 * 60 * 1000)
|
||||
// let time = this.format(val.setHours(7, 0, 0))
|
||||
this.dataForm.reportTime[0] = this.format(val.setHours(7, 0, 0)) //+ ' 00:00:00' //new Date(this.startTimeStamp + ' 00:00:00').getTime() / 1000
|
||||
this.dataForm.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.dataForm.reportTime);
|
||||
} else {
|
||||
this.dataForm.reportTime = []
|
||||
}
|
||||
},
|
||||
editDataList() {
|
||||
this.disabled = false
|
||||
this.isSave = true
|
||||
},
|
||||
async saveDataList() {
|
||||
let obj = {}
|
||||
this.list.forEach((ele, index) => {
|
||||
if (ele.det === false) {
|
||||
this.list[index].lineId = ''
|
||||
this.list[index].remark = this.remark
|
||||
obj = ele
|
||||
this.list.splice(index,1)
|
||||
}
|
||||
})
|
||||
let updateArr = this.list
|
||||
// console.log(JSON.stringify(updateArr[1]))
|
||||
const result = await Promise.all([
|
||||
await updateSumProductionDataList(obj),
|
||||
await updateProductionDataList(updateArr),
|
||||
]);
|
||||
if (result[0].data == true && result[1].data == true) {
|
||||
// console.log(res)
|
||||
this.disabled = true
|
||||
this.isSave = false
|
||||
this.getDataList()
|
||||
} else {
|
||||
this.$modal.msgError('更新失败');
|
||||
}
|
||||
},
|
||||
handleExport() {
|
||||
// 处理查询参数
|
||||
let params = { ...this.dataForm };
|
||||
params.pageNo = undefined;
|
||||
params.pageSize = undefined;
|
||||
this.$modal.confirm('是否确认导出所有数据项?').then(() => {
|
||||
this.exportLoading = true;
|
||||
return this.urlOptions.exportURL(params);
|
||||
}).then(response => {
|
||||
this.$download.excel(response, '成品生产日报.xls');
|
||||
this.exportLoading = false;
|
||||
}).catch(() => { });
|
||||
},
|
||||
async getDataList() {
|
||||
// if (this.weekValue1 && this.weekValue2) {
|
||||
// this.dataForm.reportTime[0] = moment(this.weekValue1).day(0).format('YYYY-MM-DD') + ' 00:00:00'
|
||||
// // this.queryParams.startTime = this.monthValue[0]
|
||||
// this.dataForm.reportTime[1] = moment(this.weekValue2).day(6).format('YYYY-MM-DD') + ' 23:59:59'
|
||||
// this.timeTips = moment(this.weekValue1).day(0).format('YYYY-MM-DD') + ' - ' + moment(this.weekValue2).day(0).format('YYYY-MM-DD')
|
||||
// } else {
|
||||
// }
|
||||
this.loading = true;
|
||||
// 执行查询
|
||||
const res = await this.$axios({
|
||||
url: '/base/report-auto-production/page',
|
||||
method: 'get',
|
||||
params: this.dataForm
|
||||
})
|
||||
// console.log(this.queryParams);
|
||||
console.log(res)
|
||||
// let sum = undefined
|
||||
// res.data.list.forEach((ele, index) => {
|
||||
// if (ele.det === false) {
|
||||
// sum = res.data.list.splice(index, 1)
|
||||
// }
|
||||
// })
|
||||
res.data.list.forEach((ele,index) => {
|
||||
if (ele.det === false) {
|
||||
res.data.list[index].lineId = '合计'
|
||||
this.remark = res.data.list[index].remark
|
||||
}
|
||||
});
|
||||
this.list = res.data.list
|
||||
},
|
||||
},
|
||||
};
|
||||
</script>
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-12-12 13:45:25
|
||||
* @LastEditTime: 2023-12-14 14:56:37
|
||||
* @LastEditTime: 2024-01-24 15:59:13
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -17,10 +17,14 @@
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-button type="primary" @click="getDataList()">查询</el-button>
|
||||
<el-button type="primary" icon="el-icon-edit-outline" @click="editDataList()">编辑</el-button>
|
||||
<el-button v-if="isSave" type="success" @click="saveDataList()">保存</el-button>
|
||||
|
||||
<!-- <el-button type="primary" @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>
|
||||
<el-row style="float: right; margin-bottom: 5px">
|
||||
<el-button size="small" @click="editDataList()">编辑</el-button>
|
||||
<el-button size="small" v-if="isSave" @click="saveDataList()">保存</el-button>
|
||||
</el-row>
|
||||
<el-table :data="list" style="width: 100%" :header-cell-style="{
|
||||
background: '#F2F4F9',
|
||||
color: '#606266'
|
||||
@ -146,7 +150,8 @@
|
||||
import {
|
||||
getProductionDataList,
|
||||
updateProductionDataList,
|
||||
updateSumProductionDataList
|
||||
updateSumProductionDataList,
|
||||
exportProductExcel
|
||||
} from '@/api/report/production';
|
||||
// import Editor from '@/components/Editor';
|
||||
import moment from 'moment';
|
||||
@ -252,6 +257,9 @@ export default {
|
||||
remark:'',
|
||||
// dynamicProps: [],
|
||||
tableProps,
|
||||
urlOptions: {
|
||||
exportURL: exportProductExcel
|
||||
},
|
||||
timeTips:'',
|
||||
// dataForm: {
|
||||
// reportTime:undefined
|
||||
@ -358,6 +366,19 @@ export default {
|
||||
this.getDataList()
|
||||
},
|
||||
methods: {
|
||||
handleExport() {
|
||||
// 处理查询参数
|
||||
let params = { ...this.dataForm };
|
||||
params.pageNo = undefined;
|
||||
params.pageSize = undefined;
|
||||
this.$modal.confirm('是否确认导出所有数据项?').then(() => {
|
||||
this.exportLoading = true;
|
||||
return this.urlOptions.exportURL(params);
|
||||
}).then(response => {
|
||||
this.$download.excel(response, '成品生产周报.xls');
|
||||
this.exportLoading = false;
|
||||
}).catch(() => { });
|
||||
},
|
||||
startWeek() {
|
||||
if (this.weekValue1 && this.weekValue2) {
|
||||
let a = new Date(this.weekValue1).getTime()
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2023-12-12 13:45:25
|
||||
* @LastEditTime: 2023-12-14 14:56:45
|
||||
* @LastEditTime: 2024-01-24 15:59:21
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -17,10 +17,15 @@
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
<el-button type="primary" @click="getDataList()">查询</el-button>
|
||||
<el-button type="primary" icon="el-icon-edit-outline" @click="editDataList()">编辑</el-button>
|
||||
<el-button v-if="isSave" type="success" @click="saveDataList()">保存</el-button>
|
||||
|
||||
<el-button v-if="this.$auth.hasPermi('report:glass-month:export')" type="primary" size="small" plain
|
||||
@click="handleExport">导出</el-button>
|
||||
<!-- <el-button type="primary" icon="el-icon-edit-outline" @click="editDataList()">编辑</el-button>
|
||||
<el-button v-if="isSave" type="success" @click="saveDataList()">保存</el-button> -->
|
||||
</el-form>
|
||||
<el-row style="float: right; margin-bottom: 5px">
|
||||
<el-button size="small" @click="editDataList()">编辑</el-button>
|
||||
<el-button size="small" v-if="isSave" @click="saveDataList()">保存</el-button>
|
||||
</el-row>
|
||||
<el-table :data="list" style="width: 100%" :header-cell-style="{
|
||||
background: '#F2F4F9',
|
||||
color: '#606266'
|
||||
@ -147,7 +152,8 @@
|
||||
import {
|
||||
getProductionDataList,
|
||||
updateProductionDataList,
|
||||
updateSumProductionDataList
|
||||
updateSumProductionDataList,
|
||||
exportProductExcel
|
||||
} from '@/api/report/production';
|
||||
// import Editor from '@/components/Editor';
|
||||
import moment from 'moment';
|
||||
@ -250,6 +256,9 @@ export default {
|
||||
data() {
|
||||
return {
|
||||
list: [],
|
||||
urlOptions: {
|
||||
exportURL: exportProductExcel
|
||||
},
|
||||
remark: '',
|
||||
timeTips:'',
|
||||
yearValue1: null,//最多10年
|
||||
@ -357,6 +366,19 @@ export default {
|
||||
this.getDataList()
|
||||
},
|
||||
methods: {
|
||||
handleExport() {
|
||||
// 处理查询参数
|
||||
let params = { ...this.dataForm };
|
||||
params.pageNo = undefined;
|
||||
params.pageSize = undefined;
|
||||
this.$modal.confirm('是否确认导出所有数据项?').then(() => {
|
||||
this.exportLoading = true;
|
||||
return this.urlOptions.exportURL(params);
|
||||
}).then(response => {
|
||||
this.$download.excel(response, '成品生产月报.xls');
|
||||
this.exportLoading = false;
|
||||
}).catch(() => { });
|
||||
},
|
||||
startYear() {
|
||||
if (this.yearValue2 && this.yearValue2 < this.yearValue1) {
|
||||
this.$modal.msgError('开始时间不能晚于结束时间,请重新选择')
|
||||
|
Loading…
Reference in New Issue
Block a user