修改bug

这个提交包含在:
‘937886381’ 2024-06-18 15:55:48 +08:00
父节点 d95853dec2
当前提交 41d554f897
共有 9 个文件被更改,包括 139 次插入94 次删除

查看文件

@ -1,7 +1,7 @@
/*
* @Author: zhp
* @Date: 2024-06-17 09:41:03
* @LastEditTime: 2024-06-17 09:54:26
* @LastEditTime: 2024-06-18 13:47:36
* @LastEditors: zhp
* @Description:
*/
@ -13,3 +13,11 @@ export function getComprehensiveDataPage(data) {
params: data
})
}
export function getProduceTransData(data) {
return request({
url: 'ip/prod-output/queryYCEReportByDateRange',
method: 'post',
data: data
})
}

查看文件

@ -232,6 +232,8 @@ aside {
background-color: #d9d9d9;
}
// 大屏滚动表格
.no-data-bg {
position: absolute;
display: inline-block;
@ -252,3 +254,13 @@ aside {
letter-spacing: 1px;
}
}
.dv-scroll-board .rows .ceil,
.dv-scroll-board .header .header-item {
border-right: 1px solid rgba(13, 23, 40, 1);
}
.dv-scroll-board .rows .ceil:last-child,
.dv-scroll-board .header .header-item:last-child {
border-right: none;
}

查看文件

@ -163,4 +163,4 @@ textarea {
.el-upload__tip {
line-height: 1.2;
}
}

查看文件

@ -107,7 +107,7 @@ export default {
gap: 8px;
}
.factory-header > .menu2 {
width: 26vw;
width: 20vw;
display: flex;
justify-content: flex-end;
align-items: center;

查看文件

@ -73,12 +73,25 @@ export default {
},
},
axisLabel: {
// rotate:45,
interval: 0,//
rotate:45,
color: "rgba(255, 255, 255, 0.7)",
fontSize: 12,
// formatter: function (value) {
// console.log(value);
// return value;
// },
},
data: [],
},
// dataZoom: [
// {
// // show: true,
// start: 0,
// end: 50
// }
// ],
yAxis: {
type: "value",
name: "单位/片",
@ -92,7 +105,7 @@ export default {
},
axisLabel: {
color: "rgba(255, 255, 255, 0.7)",
fontSize: 12,
fontSize: 10,
},
axisLine: {
show: true,
@ -226,9 +239,9 @@ export default {
// this.actualOptions = actualOptions;
// this.initOptions(actualOptions);
// },
energyCockpits() {
this.initChart();
},
// energyCockpits() {
// this.initChart();
// },
isOpen(val) {
this.canvasReset();
},
@ -263,6 +276,9 @@ export default {
if (this.energyCockpits) {
this.energyCockpits.forEach(ele => {
this.data.push(ele.targetProduction)
if (ele.workOrderNumber.length > 4) {
ele.workOrderNumber = ele.workOrderNumber.substring(0, 4) + "..";
}
this.orderXAxis.push(ele.workOrderNumber)
});
}
@ -273,6 +289,9 @@ export default {
if (this.energyCockpits) {
this.energyCockpits.forEach(ele => {
this.data.push(ele.plannedInvestment)
if (ele.workOrderNumber.length > 4) {
ele.workOrderNumber = ele.workOrderNumber.substring(0, 4) + "..";
}
this.orderXAxis.push(ele.workOrderNumber)
});
}
@ -282,6 +301,9 @@ export default {
if (this.energyCockpits) {
this.energyCockpits.forEach(ele => {
this.data.push(ele.actualInvestment)
if (ele.workOrderNumber.length > 4) {
ele.workOrderNumber = ele.workOrderNumber.substring(0, 4) + "..";
}
this.orderXAxis.push(ele.workOrderNumber)
});
}
@ -291,6 +313,9 @@ export default {
if (this.energyCockpits) {
this.energyCockpits.forEach(ele => {
this.data.push(ele.actualProduction)
if (ele.workOrderNumber.length > 4) {
ele.workOrderNumber = ele.workOrderNumber.substring(0, 4) + "..";
}
this.orderXAxis.push(ele.workOrderNumber)
});
}
@ -300,6 +325,9 @@ export default {
if (this.energyCockpits) {
this.energyCockpits.forEach(ele => {
this.data.push(ele.wasteNum)
if (ele.workOrderNumber.length > 4) {
ele.workOrderNumber = ele.workOrderNumber.substring(0, 4) + "..";
}
this.orderXAxis.push(ele.workOrderNumber)
});
}
@ -310,6 +338,9 @@ export default {
this.energyCockpits.forEach(ele => {
console.log(ele.reworkNum);
this.data.push(ele.reworkNum)
if (ele.workOrderNumber.length > 4) {
ele.workOrderNumber = ele.workOrderNumber.substring(0, 4) + "..";
}
this.orderXAxis.push(ele.workOrderNumber)
});
}

查看文件

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2024-05-29 14:48:06
* @LastEditTime: 2024-06-17 16:40:15
* @LastEditTime: 2024-06-18 14:49:25
* @LastEditors: zhp
* @Description:
-->
@ -173,8 +173,11 @@ function getTemplate(period, dataList, than) {
// console.log('dataList',dataList);
let items = [];
var day1 = new Date();
day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000);
var day2 = new Date();
day1.setTime(day1.getTime() - 24 * 60 * 60 * 1000)
day2.setTime(day2.getTime() - 48 * 60 * 60 * 1000)
var yesterday = (day1.getMonth() + 1) + "月" + day1.getDate()
var dayBeYes = (day2.getMonth() + 1) + "月" + day2.getDate()
//
// var day2 = new Date();
// day2.setTime(day2.getTime());
@ -187,11 +190,11 @@ function getTemplate(period, dataList, than) {
if (period === 1 && than === '同比') {
items = [
{
name: `${year-1}${month}${today}`,
name: `${year - 1}${yesterday}`,
data: dataList ? dataList[0] : [],
},
{
name: `${month}${today}`,
name: `${yesterday}`,
data: dataList ? dataList[1] : [],
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
},
@ -199,11 +202,11 @@ function getTemplate(period, dataList, than) {
} else if (period ===1 && than === '环比') {
items = [
{
name: `${yesterday}`,
name: `${dayBeYes}`,
data: dataList ? dataList[0] : [],
},
{
name: `${month}${today}`,
name: `${yesterday}`,
data: dataList ? dataList[1] : [],
// : Array.from({ length: 7 }, () => Math.floor(Math.random() * 1000)),
},

查看文件

@ -1,7 +1,7 @@
<template>
<div class="order-container">
<div class="table">
<dv-scroll-board v-if="showTable" :config="config" style="width: 100%; height: 100%" ref="orderScrollBoard" />
<dv-scroll-board v-if="showTable" :config="config" style="width: 100%; height: 100%; color: rgba(255, 255, 255, .6);" ref="orderScrollBoard" />
</div>
<div class="chart">
<div class="chart-title">
@ -42,7 +42,7 @@ export default {
rowNum: 12,
waitTime: 3000,
columnWidth: [150],
align: ["center"],
align: ["left"],
carousel: "page",
},
};
@ -101,51 +101,37 @@ export default {
arr.push(
`<span title=${this.prodOrder[i].workOrderNumber || ""}>${
this.prodOrder[i].workOrderNumber || ""
}</span>`
);
arr.push(
`<span title=${this.prodOrder[i].orderStatus || ""}>${
this.prodOrder[i].orderStatus === 1 ? '未开始' : this.prodOrder[i].orderStatus === 2 ? '进行中' : '已完成' || ""
}</span>`
);
arr.push(
`<span title=${this.prodOrder[i].plannedInvestment || ""}>${
this.prodOrder[i].plannedInvestment || ""
}</span>`
);
arr.push(
`<span title=${this.prodOrder[i].actualInvestment || ""}>${this.prodOrder[i].actualInvestment || ""
}</span>`
);
arr.push(
`<span title=${this.prodOrder[i].targetProduction || ""}>${this.prodOrder[i].targetProduction || ""
}</span>`
);
arr.push(
`<span title=${this.prodOrder[i].actualProduction || ""}>${this.prodOrder[i].actualProduction || ""
}</span>`
);
arr.push(`<span style="display:inline-block;width:45px;">${
this.prodOrder[i].productionProgress
? this.prodOrder[i].productionProgress.toFixed(0) + "%"
: "0%"
}</span>
}</span>`,
`<span title=${this.prodOrder[i].orderStatus || ""}>${this.prodOrder[i].orderStatus === 1 ? '未开始' : this.prodOrder[i].orderStatus === 2 ? '进行中' : '已完成' || ""
}</span>`,
`<span title=${this.prodOrder[i].plannedInvestment || ""}>${this.prodOrder[i].plannedInvestment || ""
}</span>`,
`<span title=${this.prodOrder[i].actualInvestment || ""}>${this.prodOrder[i].actualInvestment || ""
}</span>`,
`<span title=${this.prodOrder[i].targetProduction || ""}>${this.prodOrder[i].targetProduction || ""
}</span>`,
`<span title=${this.prodOrder[i].actualProduction || ""}>${this.prodOrder[i].actualProduction || ""
}</span>`,
`<span style="display:inline-block;width:45px;">${this.prodOrder[i].productionProgress
? this.prodOrder[i].productionProgress.toFixed(0) + "%"
: "0%"
}</span>
<div style="display:inline-block;height:20px;margin-top:-5px;vertical-align:middle;">
<svg xmlns="http://www.w3.org/200/svg" height="20" width="20">
<circle cx="10" cy="10" r="6" fill="none" stroke="#283851" stroke-width="4" stroke-linecap="round"/>
<circle style="transform-origin: center;transform: rotate(-90deg);" id="J_progress_bar" cx="10" cy="10" r="6" fill="none" stroke="#47FF27" stroke-width="4" stroke-dasharray="${
this.prodOrder[i].productionProgress
? this.prodOrder[i].productionProgress.toFixed(0) *
37.68 *
0.01 +
"," +
(1 -
this.prodOrder[i].productionProgress.toFixed(0) * 0.01) *
37.68
: 0 + "," + 37.68
<circle style="transform-origin: center;transform: rotate(-90deg);" id="J_progress_bar" cx="10" cy="10" r="6" fill="none" stroke="#47FF27" stroke-width="4" stroke-dasharray="${this.prodOrder[i].productionProgress
? this.prodOrder[i].productionProgress.toFixed(0) *
37.68 *
0.01 +
"," +
(1 -
this.prodOrder[i].productionProgress.toFixed(0) * 0.01) *
37.68
: 0 + "," + 37.68
}"/>
</svg>
</div>`);
</div>`
)
outArr.push(arr);
}
this.config.data = outArr;

查看文件

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2024-04-15 10:49:13
* @LastEditTime: 2024-06-17 14:01:39
* @LastEditTime: 2024-06-18 13:41:03
* @LastEditors: zhp
* @Description:
-->
@ -352,7 +352,9 @@ export default {
this.listQuery.startDate = this.listQuery.reportTime[0] + '-01-01 00:00:00'
this.listQuery.endDate = this.listQuery.reportTime[1] + '-12-31 23:59:59'
}
this.listQuery.factory = this.currentMenu === '邯郸' ? 1 : 2
let arr = []
this.currentMenu === '邯郸' ? arr.push(1) : arr.push(2)
this.listQuery.factory = arr
const res = await getComprehensiveDataPage(this.listQuery)
this.tableData = res.data.list
this.listQuery.total = res.data.total

查看文件

@ -1,23 +1,23 @@
<template>
<div>
<!-- <div class="search"> -->
<ButtonNav style="padding: 0;" :menus="['邯郸', '瑞昌']" :button-mode="true" @change="currentMenu = $event">
</ButtonNav>
<ButtonNav style="padding: 0;" :menus="['邯郸', '瑞昌']" :button-mode="true" @change="currentMenu = $event">
</ButtonNav>
<!-- </div> -->
<div class="containerTop">
<el-form :model="listQuery" :inline="true" ref="dataForm" class="blueTip">
<el-form-item label="时间维度" prop="date">
<el-select size="small" clearable v-model="listQuery.type" placeholder="请选择">
<el-select size="small" clearable v-model="listQuery.date" placeholder="请选择">
<el-option v-for="item in timeList" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
</el-form-item>
<el-form-item v-show="listQuery.type === 0 || listQuery.type === ''" label="时间范围" prop="reportTime">
<el-form-item v-show="listQuery.date === 0 || listQuery.type === ''" label="时间范围" prop="reportTime">
<el-date-picker size="small" clearable v-model="listQuery.reportTime" type="daterange" range-separator=""
start-placeholder="开始日期" value-format="yyyy-MM-dd HH:mm:ss" @change="changeDayTime" end-placeholder="结束日期">
</el-date-picker>
</el-form-item>
<el-form-item v-show="listQuery.type === 1" label="时间范围" prop="reportTime">
<el-form-item v-show="listQuery.date === 1" label="时间范围" prop="reportTime">
<el-date-picker size="small" clearable v-model="start" type="week" format="yyyy 第 WW 周" placeholder="选择周"
style="width: 180px" @change="onValueChange">
</el-date-picker>
@ -29,13 +29,13 @@
{{ date1 }} {{ date2 }} {{ weekNum }}
</span> -->
</el-form-item>
<el-form-item v-show="listQuery.type === 2" label="时间值" prop="reportTime">
<el-form-item v-show="listQuery.date === 2" label="时间值" prop="reportTime">
<el-date-picker size="small" v-model="listQuery.reportTime" type="monthrange"
value-format="yyyy-MM-DD HH:mm:ss" range-separator="至" start-placeholder="开始月份" end-placeholder="结束月份"
@change="changeTime">
</el-date-picker>
</el-form-item>
<el-form-item v-show="listQuery.type === 3" label="时间值" prop="reportTime">
<el-form-item v-show="listQuery.date === 3" label="时间值" prop="reportTime">
<el-date-picker size="small" clearable v-model="listQuery.reportTime[0]" value-format="yyyy" type="year"
placeholder="开始时间">
</el-date-picker>
@ -83,6 +83,7 @@ import bmSearchBar from "./components/bmSearchBar.vue";
import BmLineBar from "./components/bmLineBar.vue";
import ButtonNav from '@/components/ButtonNav'
import moment from 'moment'
import { getProduceTransData } from '@/api/report';
const tableProps = [
{
prop: "factory",
@ -132,11 +133,11 @@ export default {
listQuery: {
// size: 10,
// current: 1,
factory: null,
factorys: null,
// total: 0,
type: 2,
startDate: undefined,
endDate: undefined,
date: 2,
beginTime: undefined,
endTime: undefined,
reportTime: []
},
timeList: [
@ -319,13 +320,13 @@ export default {
this.start = undefined
this.end = undefined
} else {
this.listQuery.startDate = Number(this.start)
this.listQuery.endDate = Number(this.end)
this.listQuery.beginTime = Number(this.start)
this.listQuery.endTime = Number(this.end)
}
}
if (!this.start && !this.end) {
this.listQuery.startDate = undefined
this.listQuery.endDate = undefined
this.listQuery.beginTime = undefined
this.listQuery.endTime = undefined
}
// console.log(e);
},
@ -344,12 +345,12 @@ export default {
});
this.listQuery.reportTime = [];
} else {
this.listQuery.startDate = this.listQuery.reportTime[0]
this.listQuery.endDate = this.listQuery.reportTime[1]
this.listQuery.beginTime = this.listQuery.reportTime[0]
this.listQuery.endTime = this.listQuery.reportTime[1]
}
} else {
this.listQuery.startDate = undefined
this.listQuery.endDate = undefined
this.listQuery.beginTime = undefined
this.listQuery.endTime = undefined
}
},
onValueChange(picker, k) { // k
@ -364,15 +365,15 @@ export default {
type: 'warning'
});
} else {
this.listQuery.startDate = this.date1
this.listQuery.endDate = this.date2
// this.listQuery.startDate = Number(moment(this.start.getTime()).format('YYYYWW'))
// this.listQuery.endDate = Number(moment(this.end.getTime()).format('YYYYWW'))
this.listQuery.beginTime = this.date1
this.listQuery.endTime = this.date2
// this.listQuery.beginTime = Number(moment(this.start.getTime()).format('YYYYWW'))
// this.listQuery.endTime = Number(moment(this.end.getTime()).format('YYYYWW'))
}
}
if (!this.start && !this.end) {
this.listQuery.startDate = undefined
this.listQuery.endDate = undefined
this.listQuery.beginTime = undefined
this.listQuery.endTime = undefined
}
},
changeDayTime() {
@ -385,12 +386,12 @@ export default {
});
this.listQuery.reportTime = [];
} else {
this.listQuery.startDate = this.listQuery.reportTime[0]
this.listQuery.endDate = this.listQuery.reportTime[1]
this.listQuery.beginTime = this.listQuery.reportTime[0]
this.listQuery.endTime = this.listQuery.reportTime[1]
}
} else {
this.listQuery.startDate = undefined
this.listQuery.endDate = undefined
this.listQuery.beginTime = undefined
this.listQuery.endTime = undefined
}
},
getOverView() {
@ -408,18 +409,20 @@ export default {
},
async getDataList() {
console.log(this.listQuery);
if (this.listQuery.type == 3) {
this.listQuery.startDate = this.listQuery.reportTime[0] + '-01-01 00:00:00'
this.listQuery.endDate = this.listQuery.reportTime[1] + '-12-31 23:59:59'
if (this.listQuery.date == 3) {
this.listQuery.beginTime = this.listQuery.reportTime[0] + '-01-01 00:00:00'
this.listQuery.endTime = this.listQuery.reportTime[1] + '-12-31 23:59:59'
}
this.listQuery.factory = this.currentMenu === '邯郸' ? 1 : 2
const res = await getComprehensiveDataPage(this.listQuery)
let arr = []
this.currentMenu === '邯郸' ? arr.push(1) : arr.push(2)
this.listQuery.factorys = arr
const res = await getProduceTransData(this.listQuery)
this.tableData = res.data.list
this.listQuery.total = res.data.total
if (this.listQuery.total > 0) {
this.tableData.forEach(item => {
item.startTime = item.startDate ? item.startDate[0] + '-' + item.startDate[1] + '-' + item.startDate[2] : '--'
item.endTime = item.endDate ? item.endDate[0] + '-' + item.endDate[1] + '-' + item.endDate[2] : '--'
item.startTime = item.beginTime ? item.beginTime[0] + '-' + item.beginTime[1] + '-' + item.beginTime[2] : '--'
item.endTime = item.endTime ? item.endTime[0] + '-' + item.endTime[1] + '-' + item.endTime[2] : '--'
})
}
},