Compare commits

...

14 Commits

Author SHA1 Message Date
d27e56cd7f 报表样式 2024-06-27 16:55:47 +08:00
241810d1c8 Merge pull request 'projects/mescc/zhp' (#66) from projects/mescc/zhp into projects/mescc/develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #66
2024-06-26 15:53:43 +08:00
‘937886381’
92a297a5e9 Merge branch 'projects/mescc/develop' into projects/mescc/zhp 2024-06-26 15:19:10 +08:00
‘937886381’
f67e781146 修改bug 2024-06-26 15:18:38 +08:00
e310c5465e Merge pull request 'projects/mescc/zhp' (#65) from projects/mescc/zhp into projects/mescc/develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #65
2024-06-26 11:04:29 +08:00
‘937886381’
f2cfe94dfc 剞劂冲突 2024-06-26 11:00:48 +08:00
‘937886381’
92c0c33fbd 修改bug 2024-06-26 10:59:23 +08:00
0a391a4de5 Merge pull request 'projects/mescc/dy' (#64) from projects/mescc/dy into projects/mescc/develop
Some checks are pending
continuous-integration/drone/push Build is pending
Reviewed-on: #64
2024-06-25 14:40:13 +08:00
helloDy
8be57f586e Merge branch 'projects/mescc/develop' into projects/mescc/dy 2024-06-25 14:36:04 +08:00
helloDy
4e5a5f9ba2 2024-06-25 14:35:23 +08:00
a78c3d79f1 Merge pull request 'projects/mescc/dy' (#63) from projects/mescc/dy into projects/mescc/develop
Some checks are pending
continuous-integration/drone/push Build is pending
Reviewed-on: #63
2024-06-24 17:00:47 +08:00
helloDy
3c5163bd66 merge 2024-06-24 16:58:08 +08:00
helloDy
8437d52c1b bug 2024-06-24 16:57:15 +08:00
ca0a0142db Merge pull request 'projects/mescc/zjl' (#62) from projects/mescc/zjl into projects/mescc/develop
All checks were successful
continuous-integration/drone/push Build is passing
Reviewed-on: #62
2024-06-24 13:33:08 +08:00
21 changed files with 1072 additions and 941 deletions

View File

@ -1,8 +1,8 @@
###
# @Author: zhp
# @Date: 2024-04-28 13:42:51
# @LastEditTime: 2024-06-24 08:29:45
# @LastEditors: zhp
# @LastEditTime: 2024-06-24 16:57:53
# @LastEditors: DY
# @Description:
###
# 开发环境配置

View File

@ -65,13 +65,13 @@ export default {
valueTuple() {
const getter = this.chipRate;
// console.log(getter)
if (this.period === "日" || this.period === "周") {
return [
getter.previous[this.factoryId],
getter.current[this.factoryId],
0,
];
}
// if (this.period === "" || this.period === "") {
// return [
// getter.previous[this.factoryId],
// getter.current[this.factoryId],
// 0,
// ];
// }
// [100, 200, 200]
return [
getter.previous[this.factoryId],
@ -105,21 +105,25 @@ export default {
items = [
{ label: `${yesterday}日良率`, },
{ label: `${year - 1}${yesterday}日良率` },
{ label: `${yesterday}日目标` },
];
} else if (this.period === '日' && this.than === '环比') {
items = [
{ label: `${yesterday}日良率` },
{ label: `${dayBeYes}日良率` },
{ label: `${yesterday}日目标` },
];
} else if (this.period === '周' && this.than === '同比') {
items = [
{ label: `本周良率`, },
{ label: `${year-1}年本周良率` },
{ label: `${year - 1}年本周良率` },
{ label: `本周目标`, },
];
} else if (this.period === '周' && this.than === '环比') {
items = [
{ label: `本周良率`, },
{ label: `上周良率`, },
{ label: `本周目标`, },
];
} else if (this.period === '月' && this.than === '同比') {
items = [
@ -147,7 +151,7 @@ export default {
: `${month}月良率`,
: `${year}良率`,
}[this.period];
console.log(vt[1]);
console.log(vt[0]);
const t = getOptions({
// single,
color: this.color == 1 ? "#4CF0E8" : "#1065ff",
@ -182,22 +186,25 @@ export default {
items = [
{ label: `${year - 1}${yesterday}日良率`, value: isNaN(this.valueTuple[0]) || this.valueTuple[0] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[0]) ) + "%" },
{ label: `${yesterday}日良率`, value: isNaN(this.valueTuple[1]) || this.valueTuple[1] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[1])) + "%" },
{ label: `${yesterday}日目标`, value: isNaN(this.valueTuple[2]) || this.valueTuple[2] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[2])) + "%" },
];
} else if (this.period === '日' && this.than === '环比') {
items = [
{ label: `${dayBeYes}日良率`, value: isNaN(this.valueTuple[0]) || this.valueTuple[0] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[0])) + "%" },
{ label: `${yesterday}日良率`, value: isNaN(this.valueTuple[1]) || this.valueTuple[1] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[1])) + "%" },
{ label: `${yesterday}日目标`, value: isNaN(this.valueTuple[2]) || this.valueTuple[2] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[2])) + "%" },
];
} else if (this.period === '周' && this.than === '同比') {
items = [
{ label: `${year-1}年本周良率`, value: isNaN(this.valueTuple[0]) || this.valueTuple[0] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[0])) + "%" },
{ label: `本周良率`, value: isNaN(this.valueTuple[1]) || this.valueTuple[1] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[1])) + "%" },
{ label: `本周目标`, value: isNaN(this.valueTuple[2]) || this.valueTuple[2] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[2])) + "%" },
];
} else if (this.period === '周' && this.than === '环比') {
items = [
{ label: `上周良率`, value: isNaN(this.valueTuple[0]) || this.valueTuple[0] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[0])) + "%" },
{ label: `本周良率`, value: isNaN(this.valueTuple[1]) || this.valueTuple[1] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[1])) + "%" },
{ label: `本周目标`, value: isNaN(this.valueTuple[2]) || this.valueTuple[2] == null ? 0 + "%" : (this.formatNumber(this.valueTuple[2])) + "%" },
];
} else if (this.period === '月' && this.than === '同比') {
items = [

View File

@ -109,6 +109,9 @@ export default ({
{
value: previousSum,
name: preName,
tooltip: {
formatter: `${preName} : ${previousSum}`
},
selected: false,
itemStyle: {
borderJoin: "round",
@ -129,10 +132,11 @@ export default ({
},
},
{
value:previousSum == 0
? 1
: 0,
name: "-",
value:previousSum === 0 ? 1 : 0,
name: preName,
tooltip: {
formatter: `${preName} : ${previousSum}`
},
itemStyle: { color: "transparent" },
label: { show: false },
},

View File

@ -17,7 +17,7 @@ export default ({
tooltip: {},
title: {
text: titleValue,
left: "44%",
left: "48%",
top: "37%",
textAlign: "center",
textStyle: {
@ -39,7 +39,7 @@ export default ({
type: "pie",
name: "当前目标",
radius: ["80%", "90%"],
center: ["45%", "52%"],
center: ["50%", "52%"],
emptyCircleStyle: {
color: "#042c5f33",
},
@ -48,7 +48,7 @@ export default ({
{
type: "pie",
radius: ["80%", "90%"],
center: ["45%", "52%"],
center: ["50%", "52%"],
avoidLabelOvervlap: false,
label: {
show: false,
@ -97,7 +97,7 @@ export default ({
{
type: "pie",
radius: ["70%", "80%"],
center: ["45%", "52%"],
center: ["50%", "52%"],
avoidLabelOvervlap: false,
label: {
show: false,

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2023-11-06 15:15:30
* @LastEditTime: 2024-06-18 14:41:07
* @LastEditTime: 2024-06-25 08:59:33
* @LastEditors: DY
* @Description:
-->
@ -58,7 +58,7 @@
<p class="text">{{ dataForm.chipCssMarriageRate }}</p>
</el-col>
<el-col :span="6">
<p class="title">芯片段OEE</p>
<p class="title">芯片段OEE(%)</p>
<p class="text">{{ dataForm.chipOee }}</p>
</el-col>
<el-col :span="6">
@ -116,6 +116,14 @@
<p class="title">标准组件平均功率(W)</p>
<p class="text">{{ dataForm.componentAveragePower }}</p>
</el-col>
<el-col :span="6">
<p class="title">标准组件转化效率</p>
<p class="text">{{ dataForm.componentTransRate }}</p>
</el-col>
<el-col :span="6">
<p class="title">芯片投入</p>
<p class="text">{{ dataForm.chipInput }}</p>
</el-col>
</el-row>
</div>
<div v-if="glass === 2">

View File

@ -1,8 +1,8 @@
<!--
* @Author: zhp
* @Date: 2024-04-15 10:49:13
* @LastEditTime: 2024-06-20 10:16:25
* @LastEditors: DY
* @LastEditTime: 2024-06-26 11:00:11
* @LastEditors: zhp
* @Description:
-->
<template>
@ -10,7 +10,7 @@
<div class="app-container" style="padding: 16px 24px 0; height: auto; flex-grow: 1;">
<el-form :model="listQuery" :inline="true" ref="dataForm" class="blueTip">
<el-form-item label="时间维度" prop="type">
<el-select size="small" clearable v-model="listQuery.type" placeholder="请选择">
<el-select v-model="listQuery.type" size="small" clearable placeholder="请选择">
<el-option v-for="item in timeList" :key="item.value" :label="item.label" :value="item.value">
</el-option>
</el-select>
@ -74,7 +74,7 @@
<!-- <el-row :gutter="24"> -->
<!-- <el-col :span="12" v-for="item in dataList" :key="item.id"> -->
<search-bar :formConfigs="formConfig1" ref="searchBarForm1" style="margin-bottom: 0" />
<line-chart class="yearChart" ref="lineChart" style="height: 40vh;width: 100%"></line-chart>
<line-chart ref="lineChart" class="yearChart" style="height: 45vh;width: 100%"></line-chart>
<!-- </el-col> -->
<!-- <el-col :span="12">
<line-chart :id=" 'second' " class="yearChart" ref="lineChart" style="height: 40vh;width: 100%"></line-chart>
@ -135,9 +135,9 @@ export default {
// reportType: 2,
startDate: undefined,
endDate:undefined,
reportTime: [],
start: undefined,
end: undefined
reportTime: null,
start: null,
end: null
},
detailOrUpdateVisible:false,
date1: undefined,
@ -210,7 +210,7 @@ export default {
{
prop: 'factory',
label: '工厂名称',
filter: (val) => factoryList[val],
filter: (val) => [val],
minWidth: 180,
showOverflowtooltip: true
},
@ -241,7 +241,7 @@ export default {
lineData: [],
chart: null,
seriesList: [],
colorList: ['#2760FF', '#8167F6', '#5B9BFF', '#FFD160']
colorList: ['#7164FF', '#63BDFF', '#8EF0AB', '#FFCE6A']
// proLineList: [],
// all: {}
};
@ -289,7 +289,6 @@ export default {
// console.log(e);
},
onValueChange(picker, k) { // k
// console.log(this.listQuery.reportTime[0], this.listQuery.reportTime[1])
if (this.listQuery.start && this.listQuery.end) {
console.log(this.listQuery.reportTime)
this.date1 = moment(this.listQuery.start.getTime() - 24 * 60 * 60 * 1000).format('YYYY-MM-DD HH:mm:ss')
@ -351,23 +350,31 @@ export default {
}
},
async getDataList() {
await getProduceDataPage(this.listQuery).then(res => {
console.log(res)
if (res.code === 0) {
this.tableData = res.data.records
this.listQuery.total = res.data.total
}
})
if (this.listQuery.type === '') {
this.$message.warning('请选择时间维度!')
return
}
if (this.listQuery.startDate === undefined) {
this.$message.warning('请选择时间范围!')
} else {
await getProduceDataPage(this.listQuery).then(res => {
console.log(res)
if (res.code === 0) {
this.tableData = res.data.records
this.listQuery.total = res.data.total
}
})
//
await getproddata(this.listQuery).then(resp => {
if (resp.data?.length > 0) {
const chartData = Object.groupBy(resp.data, (member) => member.datestr)
this.buildChart(chartData, resp.data)
} else {
this.$refs.lineChart.initChart([], [])
}
})
//
await getproddata(this.listQuery).then(resp => {
if (resp.data?.length > 0) {
const chartData = Object.groupBy(resp.data, (member) => member.datestr)
this.buildChart(chartData, resp.data)
} else {
this.$refs.lineChart.initChart([], [])
}
})
}
},
buildChart(data, dataList) {
let xAxisData = []
@ -392,6 +399,13 @@ export default {
barWidth: 20,
itemStyle: {
color: this.colorList[i]
},
label: {
show: i === 2 ? true : false,
position: 'top',
formatter(params) {
return fac.name.substring(0, 2)
}
}
}
dataList.forEach(item => {
@ -411,6 +425,18 @@ export default {
barWidth: 20,
itemStyle: {
color: this.colorList[i]
},
label: {
show: true,
position: 'top',
formatter(params) {
if (params.value === 0) {
return ''
} else {
// return ['', ''][params.seriesName.split('-')[1]]
return fac.name.substring(0, 2)
}
}
}
}
dataList.forEach(item => {

View File

@ -2,7 +2,7 @@
* @Author: zwq
* @Date: 2022-01-21 14:43:06
* @LastEditors: DY
* @LastEditTime: 2024-06-19 15:13:23
* @LastEditTime: 2024-06-24 11:13:48
* @Description:
-->
<template>
@ -40,7 +40,7 @@ export default {
},
height: {
type: String,
default: '30vh'
default: '35vh'
},
legendPosition: {
type: String,
@ -140,20 +140,24 @@ export default {
xAxis: [
{
type: 'category',
// prettier-ignore
data: xAxis
name: '日期',
data: xAxis,
axisLabel: {
rotate: 25
}
}
],
yAxis: [
{
type: 'value'
type: 'value',
name: '单位:个'
}
],
grid: {
top: '20%',
top: '10%',
left: "1%",
right: "3%",
bottom: "1%",
right: "5%",
bottom: "0%",
containLabel: true
},
series: seriesList

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2024-04-17 16:31:51
* @LastEditTime: 2024-06-17 16:55:04
* @LastEditTime: 2024-06-24 15:43:50
* @LastEditors: DY
* @Description:
-->
@ -375,7 +375,12 @@ export default {
this.visible = true
if (this.dataForm.id) {
getProduceTargetDetail(this.dataForm.id).then(res => {
this.dataForm = res.data
// this.dataForm = res.data
for (const i in res.data) {
if (res.data[i] !== null) {
this.dataForm[i] = res.data[i]
}
}
if (this.dataForm.targetType === 0 || this.dataForm.targetType === 2 || this.dataForm.targetType === 3) {
// this.dataForm.reportTime = String(this.dataForm.targetTime)
this.$set(this.dataForm, 'reportTime', String(this.dataForm.targetTime))

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2024-04-15 10:49:13
* @LastEditTime: 2024-06-17 16:32:02
* @LastEditTime: 2024-06-24 15:08:34
* @LastEditors: DY
* @Description:
-->
@ -76,7 +76,8 @@ import tableHeightMixin from "@/mixins/tableHeightMixin";
import basicPage from '@/mixins/basic-page'
import AddOrUpdate from './add-or-updata';
import { factoryList, factoryArray } from "@/utils/constants";
import { publicFormatter } from "@/utils/dict";
// import { publicFormatter } from "@/utils/dict";
import statusChart from "./statusChart.vue";
// import FileSaver from 'file-saver'
// import * as XLSX from 'xlsx'
@ -206,13 +207,13 @@ export default {
prop: 'factory',
label: '工厂名称',
filter: (val) => factoryList[val],
minWidth: 200,
minWidth: 220,
showOverflowtooltip: true
},
{
prop: 'workOrderNumber',
label: '工单号',
minWidth: 120,
minWidth: 130,
showOverflowtooltip: true
// filter: (val) => ['', '', 'BIPV', ''][val]
},
@ -246,8 +247,8 @@ export default {
{
prop: 'orderStatus',
label: '工单状态',
// filter: publicFormatter('workorder_status')
filter: (val) => ['', '未开始', '生产中', '已完成'][val],
subcomponent: statusChart
// filter: (val) => ['', '', '', ''][val],
},
{
prop: 'startTime',

View File

@ -0,0 +1,51 @@
<!--
* @Author: Do not edit
* @Date: 2024-06-24 15:03:19
* @LastEditTime: 2024-06-24 15:07:42
* @LastEditors: DY
* @Description:
-->
<template>
<div>
<span class="dot" :class="myClass"></span>
<span>{{ state }}</span>
</div>
</template>
<script>
export default {
name: "statusChart",
props: {
injectData: {
type: Object,
default: () => ({}),
},
},
computed: {
state() {
return ['', '未开始', '生产中', '已完成'][this.injectData.orderStatus]
},
myClass() {
return ['', 'yellow', 'blue', 'green'][this.injectData.orderStatus]
}
},
};
</script>
<style scoped>
.dot {
display: inline-block;
width: 6px;
height: 6px;
border-radius: 3px;
vertical-align: middle;
margin-right: 8px;
}
.green {
background: #10DC76;
}
.yellow {
background: #FFBD02;
}
.blue {
background: #3B79FF;
}
</style>

View File

@ -30,7 +30,14 @@
</div>
<!-- -->
<div>
<div style="display: inline-block; width: 79%; vertical-align: top">
<div
style="
display: inline-block;
width: 79%;
vertical-align: top;
padding-right: 20px;
"
>
<base-chart
v-show="this.chartMsg1.series[0].data.length > 0"
:chartHeight="chartHeight"

View File

@ -71,7 +71,7 @@ export default {
"<br/>" +
`${
params[i].seriesType === "line"
? '<img width="10" height="10" style="margin-right:4px;" src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTIuNzIxNjM5NXB4IiBoZWlnaHQ9IjhweCIgdmlld0JveD0iMCAwIDEyLjcyMTYzOTUgOCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4KICAgIDx0aXRsZT7nvJbnu4QgNjwvdGl0bGU+CiAgICA8ZyBpZD0iMDTmiqXooajnrqHnkIYiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGlkPSLmjIfmoIflrozmiJDmg4XlhrUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMDUxLjYzOTE4MCwgLTQyNS4wMDAwMDApIj4KICAgICAgICAgICAgPGcgaWQ9Iue8lue7hC025aSH5Lu9LTQiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEwMjEuNTAwMDAwLCAzNDQuMDAwMDAwKSI+CiAgICAgICAgICAgICAgICA8ZyBpZD0i57yW57uELTYiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDI5LjUwMDAwMCwgNzguMDAwMDAwKSI+CiAgICAgICAgICAgICAgICAgICAgPHJlY3QgaWQ9IuefqeW9oiIgeD0iMCIgeT0iMCIgd2lkdGg9IjE0IiBoZWlnaHQ9IjE0Ij48L3JlY3Q+CiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTcuMTM5MTgwMjYsMyBDOS4wMDMxMDczNywzIDEwLjU2OTI2NzMsNC4yNzQ4OTI3MiAxMS4wMTMyMjU0LDYuMDAwMjQzNDcgTDEyLjM2MDgxOTcsNiBDMTIuOTEzMTA0NSw2IDEzLjM2MDgxOTcsNi40NDc3MTUyNSAxMy4zNjA4MTk3LDcgQzEzLjM2MDgxOTcsNy41NTIyODQ3NSAxMi45MTMxMDQ1LDggMTIuMzYwODE5Nyw4IEwxMS4wMTI5NjY3LDguMDAwNzYxMzQgQzEwLjU2ODY1OTIsOS43MjU2MDIyNCA5LjAwMjc0NTUxLDExIDcuMTM5MTgwMjYsMTEgQzUuMjc1NjE1MDEsMTEgMy43MDk3MDEzMSw5LjcyNTYwMjI0IDMuMjY1MzkzNzgsOC4wMDA3NjEzNCBMMS42MzkxODAyNiw4IEMxLjA4Njg5NTUxLDggMC42MzkxODAyNTgsNy41NTIyODQ3NSAwLjYzOTE4MDI1OCw3IEMwLjYzOTE4MDI1OCw2LjQ0NzcxNTI1IDEuMDg2ODk1NTEsNiAxLjYzOTE4MDI2LDYgTDMuMjY1MTM1MDksNi4wMDAyNDM0NyBDMy43MDkwOTMyLDQuMjc0ODkyNzIgNS4yNzUyNTMxNSwzIDcuMTM5MTgwMjYsMyBaIiBpZD0i5b2i54q257uT5ZCIIiBmaWxsPSIjRkZDRTZBIiBmaWxsLXJ1bGU9Im5vbnplcm8iPjwvcGF0aD4KICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+" />'
? '<img width="11" height="11" style="margin-right:4px;" src="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPHN2ZyB3aWR0aD0iMTIuNzIxNjM5NXB4IiBoZWlnaHQ9IjhweCIgdmlld0JveD0iMCAwIDEyLjcyMTYzOTUgOCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIj4KICAgIDx0aXRsZT7nvJbnu4QgNjwvdGl0bGU+CiAgICA8ZyBpZD0iMDTmiqXooajnrqHnkIYiIHN0cm9rZT0ibm9uZSIgc3Ryb2tlLXdpZHRoPSIxIiBmaWxsPSJub25lIiBmaWxsLXJ1bGU9ImV2ZW5vZGQiPgogICAgICAgIDxnIGlkPSLmjIfmoIflrozmiJDmg4XlhrUiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0xMDUxLjYzOTE4MCwgLTQyNS4wMDAwMDApIj4KICAgICAgICAgICAgPGcgaWQ9Iue8lue7hC025aSH5Lu9LTQiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDEwMjEuNTAwMDAwLCAzNDQuMDAwMDAwKSI+CiAgICAgICAgICAgICAgICA8ZyBpZD0i57yW57uELTYiIHRyYW5zZm9ybT0idHJhbnNsYXRlKDI5LjUwMDAwMCwgNzguMDAwMDAwKSI+CiAgICAgICAgICAgICAgICAgICAgPHJlY3QgaWQ9IuefqeW9oiIgeD0iMCIgeT0iMCIgd2lkdGg9IjE0IiBoZWlnaHQ9IjE0Ij48L3JlY3Q+CiAgICAgICAgICAgICAgICAgICAgPHBhdGggZD0iTTcuMTM5MTgwMjYsMyBDOS4wMDMxMDczNywzIDEwLjU2OTI2NzMsNC4yNzQ4OTI3MiAxMS4wMTMyMjU0LDYuMDAwMjQzNDcgTDEyLjM2MDgxOTcsNiBDMTIuOTEzMTA0NSw2IDEzLjM2MDgxOTcsNi40NDc3MTUyNSAxMy4zNjA4MTk3LDcgQzEzLjM2MDgxOTcsNy41NTIyODQ3NSAxMi45MTMxMDQ1LDggMTIuMzYwODE5Nyw4IEwxMS4wMTI5NjY3LDguMDAwNzYxMzQgQzEwLjU2ODY1OTIsOS43MjU2MDIyNCA5LjAwMjc0NTUxLDExIDcuMTM5MTgwMjYsMTEgQzUuMjc1NjE1MDEsMTEgMy43MDk3MDEzMSw5LjcyNTYwMjI0IDMuMjY1MzkzNzgsOC4wMDA3NjEzNCBMMS42MzkxODAyNiw4IEMxLjA4Njg5NTUxLDggMC42MzkxODAyNTgsNy41NTIyODQ3NSAwLjYzOTE4MDI1OCw3IEMwLjYzOTE4MDI1OCw2LjQ0NzcxNTI1IDEuMDg2ODk1NTEsNiAxLjYzOTE4MDI2LDYgTDMuMjY1MTM1MDksNi4wMDAyNDM0NyBDMy43MDkwOTMyLDQuMjc0ODkyNzIgNS4yNzUyNTMxNSwzIDcuMTM5MTgwMjYsMyBaIiBpZD0i5b2i54q257uT5ZCIIiBmaWxsPSIjRkZDRTZBIiBmaWxsLXJ1bGU9Im5vbnplcm8iPjwvcGF0aD4KICAgICAgICAgICAgICAgIDwvZz4KICAgICAgICAgICAgPC9nPgogICAgICAgIDwvZz4KICAgIDwvZz4KPC9zdmc+" />'
: `<span style="display:inline-block;margin-right:4px;border-radius:2px;width:10px;height:10px;background-color:${params[i].color}"></span>`
}` +
`<span style='display:inline-block;width:180px;color:rgba(0,0,0,0.8);font-size:14px;'>${params[i].seriesName}</span>` +

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2024-06-19 15:28:34
* @LastEditTime: 2024-06-24 08:46:34
* @LastEditTime: 2024-06-26 10:42:16
* @LastEditors: zhp
* @Description:
-->
@ -9,9 +9,9 @@
<div>
<!-- 暂无数据 -->
<div class="no-data-bg" style="position: relative; left: 50%; transform: translateX(-50%)"
v-show="this.chartMsg.series.length === 0"></div>
v-show="this.chartMsg.series[0].data.length === 0"></div>
<!-- 图例 -->
<div v-show="this.chartMsg.series.length > 0">
<div v-show="this.chartMsg.series[0].data.length > 0 ">
<div class="legendData" v-if="show">
<span class="itemData" v-for="item in legendList" :key="item.id">
<span v-if="item.type === 1" class="block" :style="{ backgroundColor: item.color }"></span>
@ -63,7 +63,7 @@ export default {
: params[i].seriesName === "转化效率"
? (params[i].value ? params[i].value.toFixed(2) : 0.0) + "%"
: params[i].seriesName.search('总功率') != -1
? (params[i].value ? params[i] : 0) + "MW"
? (params[i].value ? params[i].value : 0) + "MW"
: (params[i].value ? params[i].value : 0) + "片"
}</span>`;
}
@ -83,7 +83,7 @@ export default {
dataZoom: [//
{
//
show: false,
show: true,
//
type: "slider",
//
@ -190,6 +190,7 @@ export default {
}, 500)();
},
getMes() {
console.log('222222', this.chartMsg.series);
if (this.myChart) {
this.myChart.dispose();
}

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2024-06-20 16:13:36
* @LastEditTime: 2024-06-24 08:46:42
* @LastEditTime: 2024-06-26 14:48:49
* @LastEditors: zhp
* @Description:
-->
@ -36,9 +36,9 @@ export default {
color: [],
// color: ["#8EF0AB", "#63BDFF", "#288AFF"],
grid: {
left: -30,
left: -60,
right: 0,
bottom: 30,
bottom: 31,
top: 30,
containLabel:true,
},
@ -51,7 +51,7 @@ export default {
},
},
formatter: function (params) {
// console.log('params', params);
console.log('params', params.data)
var res = `<span style='color:rgba(0,0,0,0.8)'>${params[0].axisValueLabel}</span>`;
for (var i = 0, l = params.length; i < l; i++) {
res +=
@ -59,12 +59,12 @@ export default {
`<span style='display:inline-block;margin-right:4px;border-radius:10px;width:10px;height:10px;background-color:${params[i].color}'></span>` +
`<span style='display:inline-block;width:150px;color:rgba(0,0,0,0.8);font-size:14px;'>${params[i].seriesName}</span>` +
`<span style='color:rgba(0,0,0,0.48);font-size:14px;'>${params[i].seriesName === "综合良率"
? (params[i].value ? params[i].value.toFixed(2) : 0.0) + "%"
? (params[i].data.titleValue ? params[i].data.titleValue.toFixed(2) : 0.0) + "%"
: params[i].seriesName === "转化效率"
? (params[i].value ? params[i].value.toFixed(2) : 0.0) + "%"
? (params[i].data.titleValue ? params[i].data.titleValue.toFixed(2) : 0.0) + "%"
: params[i].seriesName.search('总功率') != -1
? (params[i].value ? params[i] : 0) + "MW"
: (params[i].value ? params[i].value : 0) + "片"
? (params[i].data.titleValue ? params[i].data.titleValue : 0) + "MW"
: (params[i].data.titleValue ? params[i].data.titleValue : 0) + "片"
}</span>`;
}
return res;
@ -83,7 +83,7 @@ export default {
dataZoom: [//
{
//
show: false,
show: true,
//
type: "slider",
//
@ -190,6 +190,7 @@ export default {
}, 500)();
},
getMes() {
// console.log('222222', this.chartMsg);
if (this.myChart) {
this.myChart.dispose();
}

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2024-06-20 16:13:52
* @LastEditTime: 2024-06-24 08:46:46
* @LastEditTime: 2024-06-25 10:49:34
* @LastEditors: zhp
* @Description:
-->
@ -9,9 +9,9 @@
<div>
<!-- 暂无数据 -->
<div class="no-data-bg" style="position: relative; left: 50%; transform: translateX(-50%)"
v-show="this.chartMsg.series.length === 0"></div>
v-show="this.chartMsg.series[0].data.length === 0"></div>
<!-- 图例 -->
<div v-show="this.chartMsg.series.length > 0">
<div v-show="this.chartMsg.series[0].data.length > 0">
<div class="legendData" v-if="show">
<span class="itemData" v-for="item in legendList" :key="item.id">
<span v-if="item.type === 1" class="block" :style="{ backgroundColor: item.color }"></span>
@ -36,7 +36,7 @@ export default {
color: [],
// color: ["#8EF0AB", "#63BDFF", "#288AFF"],
grid: {
left: 30,
left: 60,
right: 0,
bottom: 30,
top: 30,
@ -83,7 +83,7 @@ export default {
dataZoom: [//
{
//
show: false,
show: true,
//
type: "slider",
//

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2024-06-21 09:05:14
* @LastEditTime: 2024-06-24 08:46:49
* @LastEditTime: 2024-06-26 14:49:15
* @LastEditors: zhp
* @Description:
-->
@ -9,9 +9,9 @@
<div>
<!-- 暂无数据 -->
<div class="no-data-bg" style="position: relative; left: 50%; transform: translateX(-50%)"
v-show="this.chartMsg.series.length === 0"></div>
v-show="this.chartMsg.series[0].data.length === 0"></div>
<!-- 图例 -->
<div v-show="this.chartMsg.series.length > 0">
<div v-show="this.chartMsg.series[0].data.length > 0">
<div class="legendData" v-if="show">
<span class="itemData" v-for="item in legendList" :key="item.id">
<span v-if="item.type === 1" class="block" :style="{ backgroundColor: item.color }"></span>
@ -36,7 +36,7 @@ export default {
color: [],
// color: ["#8EF0AB", "#63BDFF", "#288AFF"],
grid: {
left: -30,
left: 60,
right: 0,
bottom: 30,
top: 30,
@ -51,7 +51,7 @@ export default {
},
},
formatter: function (params) {
console.log('params', params)
// console.log('params', params)
let arr = []
var res = ``;
// for (var i = 0, l = params.length; i < l; i++) {
@ -66,7 +66,7 @@ export default {
: params[0].name === "转化效率"
? (params[0].value ? params[0].value.toFixed(2) : 0.0) + "%"
: params[i].seriesName.search('总功率') != -1
? (params[i].value ? params[i] : 0) + "MW"
? (params[i].value ? params[i].value : 0) + "MW"
: (params[i].value ? params[i].value : 0) + "片"
}</span>`;
// }
@ -81,7 +81,7 @@ export default {
: params[1].name === "转化效率"
? (params[1].value ? params[1].value.toFixed(2) : 0.0) + "%"
: params[i].seriesName.search('总功率') != -1
? (params[i].value ? params[i] : 0) + "MW"
? (params[i].value ? params[i].value : 0) + "MW"
: (params[i].value ? params[i].value : 0) + "片"
}</span>`;
}
@ -101,7 +101,7 @@ export default {
dataZoom: [//
{
//
show: false,
show: true,
//
type: "slider",
//

View File

@ -1,7 +1,7 @@
<!--
* @Author: zhp
* @Date: 2024-04-15 10:49:13
* @LastEditTime: 2024-06-24 09:39:27
* @LastEditTime: 2024-06-25 08:39:48
* @LastEditors: zhp
* @Description:
-->
@ -155,6 +155,11 @@ export default {
// all: {}
};
},
watch: {
currentMenu() {
this.getDataList()
},
},
computed: {
weekNum() {
return Math.round((this.end - this.start) / (24 * 60 * 60 * 1000 * 7)) + 1
@ -314,9 +319,12 @@ export default {
}
},
async getDataList() {
if (!this.listQuery.startDate && !this.listQuery.endDate) {
return this.$message('请选择起止时间')
}
this.otherProps = []
let arr = []
this.currentMenu === '邯郸' ? arr.push(1) : arr.push(2)
this.currentMenu === '邯郸' ? arr.push(1) : arr.push(0)
this.listQuery.factory = arr
const res = await getComprehensiveDataPage(this.listQuery)
// this.tableData = res.data.list

View File

@ -84,7 +84,7 @@
:chartMsg="chartMsgYearTarget" :chartId=" 'yearData'" :chartNum="chartNum" />
</el-col> -->
</el-row>
<base-table :key="showTable" :span-method="objectSpanMethod" :table-props="tableProps" :page="listQuery.current"
<base-table :key="showTable" :table-props="tableProps" :page="listQuery.current"
:limit="listQuery.size" :table-data="tableData" :max-height="tableH" />
</div>
<!-- <div class="containerBottom">
@ -174,7 +174,15 @@ export default {
yAxis: [
{
type: "value",
name: "单位/片",
name: "单位/MW",
// splitNumber: 5,
min: function (value) {//
return 0
},
max: function (value) {//
return Math.ceil(value.max)
},
alignTicks: true,
nameTextStyle: {
fontSize: 12,
align: "right",
@ -183,7 +191,13 @@ export default {
},
{
type: 'value',
alignTicks: true,
min: 0,
max: 100,
// scale: true,
interval: 25,//
// inverse: true,
splitNumber: 5,
name: "单位/%",
nameTextStyle: {
fontSize: 12,
@ -204,7 +218,7 @@ export default {
position: [-18, -16],
color: "#68C483",
formatter: function (params) {
return params.value + "MW";
return params.value
},
},
},
@ -219,7 +233,7 @@ export default {
position: [-18, -16],
color: "#68C483",
formatter: function (params) {
return params.value + "%";
return params.value
},
},
yAxisIndex: 1
@ -233,7 +247,16 @@ export default {
yAxis: [
{
type: "value",
name: "单位/片",
name: "单位/片",
min: function (value) {//
return 0
},
max: function (value) {//
return Math.ceil(value.max)
},
alignTicks: true,
// splitNumber: 5,
scale: true,
nameTextStyle: {
fontSize: 12,
align: "right",
@ -241,8 +264,16 @@ export default {
axisLabel: {},
},
{
type: "value",
type: 'value',
// inverse: true,
name: "单位/%",
scale: true,
alignTicks: true,
min: 0,
max: 100,
// scale: true,
interval: 25,//
// splitNumber: 5,
nameTextStyle: {
fontSize: 12,
align: "right",
@ -259,10 +290,10 @@ export default {
barWidth: 20,
label: {
show: true,
position: [-18, -16],
position: [-50, -16],
color: "#68C483",
formatter: function (params) {
return params.value.toFixed(2) + "MW";
return params.value.toFixed(2)
},
},
},
@ -274,10 +305,10 @@ export default {
barWidth: 20,
label: {
show: true,
position: [0, -16],
position: [10, -16],
color: "#288AFF",
formatter: function (params) {
return params.value.toFixed(2) + "MW";
return params.value.toFixed(2)
},
},
},
@ -294,7 +325,7 @@ export default {
show: true,
color: "#FFAE17",
formatter: function (params) {
return params.value.toFixed(2) + "%";
return params.value.toFixed(2)
},
},
},
@ -313,13 +344,6 @@ export default {
computed: {
tableProps() {
return [
{
prop: "factory",
label: "工厂名称",
// filter: (val) => factoryList[val],
minWidth: 200,
showOverflowtooltip: true,
},
{
prop: "item",
label: "科目",
@ -345,6 +369,9 @@ export default {
},
watch: {
//
currentMenu() {
this.getDataList()
},
isOpen(val) {
if (this.$route.name === "produceConversion") {
this.chartNum++;
@ -494,7 +521,9 @@ export default {
this.chartMsg.series[2].data = []
this.chartMsgYearTarget.series[0].data = []
this.chartMsgYearTarget.series[1].data = []
if (!this.listQuery.beginTime && !this.listQuery.endTime) {
return this.$message('请选择起止时间')
}
console.log(this.listQuery);
if (this.listQuery.type == 3) {
this.listQuery.beginTime = this.listQuery.reportTime[0]
@ -560,9 +589,6 @@ export default {
dataArr[0]['' + m + ''] = item.chipTotalPowers
dataArr[1]['' + m + ''] = item.scTotalPowers
dataArr[2]['' + m + ''] = item.conversionEfficiency
dataArr[0].factory = ele.factory === 1 ? '邯郸' : '瑞昌'
dataArr[1].factory = ele.factory === 1 ? '邯郸' : '瑞昌'
dataArr[2].factory = ele.factory === 1 ? '邯郸' : '瑞昌'
// dataArr[3]['' + m + ''] = ele.comprehensiveYieldRate
// })
@ -573,7 +599,7 @@ export default {
// })
})
})
this.title = res.data[0].yearTarget.targetTime + '目标值'
this.title = res.data[0].yearTarget.targetTime ? res.data[0].yearTarget.targetTime + '目标值' : ''
this.chartMsgYearTarget.series[0].data = [
{
value: res.data[0].yearTarget.chipTotalPower,
@ -618,7 +644,7 @@ export default {
if (i.search('value') === 0) {
this.chartMsg.series[0].data.push({
name: dataArr[0]['item'],
value: dataArr[0][i]
value: dataArr[0][i] === 0 ? null : dataArr[0][i]
})
}
}
@ -627,7 +653,7 @@ export default {
if (i.search('value') === 0) {
this.chartMsg.series[1].data.push({
name: dataArr[1]['item'],
value: dataArr[1][i]
value: dataArr[1][i] === 0 ? null : dataArr[1][i]
})
}
}
@ -636,7 +662,7 @@ export default {
if (i.search('value') === 0) {
this.chartMsg.series[2].data.push({
name: dataArr[2]['item'],
value: dataArr[2][i]
value: dataArr[2][i] === 0 ? null : dataArr[2][i]
})
}
}

View File

@ -103,7 +103,7 @@
:chartId="chartId" :chartNum="chartNum" />
<!-- </el-col> -->
</el-row>
<base-table :key="showTable" :span-method="objectSpanMethod" :table-props="tableProps" :page="listQuery.current"
<base-table :key="showTable" :table-props="tableProps" :page="listQuery.current"
:limit="listQuery.size" :table-data="tableData" :max-height="tableH" />
</div>
<!-- <div class="containerBottom">
@ -222,9 +222,10 @@ export default {
xData: [],
yName: "单位/MW",
yAxis: {
show: true,
type: "value",
name: "单位/MW",
show: false,
// splitNumber: 4,
nameTextStyle: {
fontSize: 12,
align: "right",
@ -239,10 +240,10 @@ export default {
color: ["#8EF0AB", "#288AFF"],
xData: [],
yName: "单位/MW",
yAxis:
{
yAxis:{
type: "value",
name: "单位/MW",
// splitNumber: 4,
nameTextStyle: {
fontSize: 12,
align: "right",
@ -252,13 +253,12 @@ export default {
series: [
{
name: "芯片总功率",
data: [
],
data: [],
type: "bar",
barWidth: 20,
label: {
show: true,
position: [10, -16],
position: [-30, -16],
color: "#68C483",
formatter: function (params) {
return params.value
@ -310,13 +310,6 @@ export default {
},
tableProps() {
return [
{
prop: "factory",
label: "工厂名称",
// filter: (val) => factoryList[val],
minWidth: 200,
showOverflowtooltip: true,
},
{
prop: "item",
label: "科目",
@ -342,6 +335,9 @@ export default {
},
watch: {
//
currentMenu() {
this.getDataList()
},
isOpen(val) {
if (this.$route.name === "productionSituationMW") {
this.chartNum++;
@ -494,36 +490,62 @@ export default {
this.chartMsgYearTarget.series[0].data = []
this.chartMsgYearTarget.series[1].data = []
console.log(this.listQuery);
if (!this.listQuery.startDate && !this.listQuery.endDate) {
return this.$message('请选择起止时间')
}
let arr = []
this.currentMenu === '邯郸' ? arr.push(1) : arr.push(0)
this.listQuery.factory = arr
const res = await getProductionSituationMWData(this.listQuery)
if (this.listQuery.type === 2) {
console.log(res.data.list.slice(res.data.list.length - 2, res.data.list.length));
res.data.list.forEach((ele, index) => {
let i = index + 1
// this.chartMsg.xData.push(ele.titleValue.replace(/[^\d]/g, " "))
this.otherProps.push({
label: ele.titleValue,
prop: 'value' + i
})
let maxData = []
res.data.list.forEach((ele, index) => {
let i = index + 1
// this.chartMsg.xData.push(ele.titleValue.replace(/[^\d]/g, " "))
this.otherProps.push({
label: ele.titleValue,
prop: 'value' + i
})
})
res.data.list.forEach((ele, index) => {
let i = index + 1
let m = 'value' + i
ele.productionSituationPowerDataVOList.forEach((item) => {
maxData.push(item.chipTotalPower, item.componentTotalPower)
this.dataArr[0]['' + m + ''] = item.chipTotalPower
// this.dataArr[3].factory = item.factory == 1 ? '' : ''
this.dataArr[1]['' + m + ''] = item.componentTotalPower
// this.dataArr[3]['' + m + ''] = item.bipvProductOutput
})
// ele.titleValue
// .push({
// label: ele.titleValue,
// props: 'value' + index + 1,
// })
})
this.chartMsg.yAxis.max = Math.ceil(Math.max(...maxData) / 100) * 100
this.chartMsgTarget.yAxis.max = Math.ceil(Math.max(...maxData) / 100) * 100
this.chartMsg.yAxis.min = Math.ceil(Math.min(...maxData) / 100) * 100
this.chartMsgTarget.yAxis.min = Math.ceil(Math.min(...maxData) / 100) * 100
this.chartMsg.yAxis.interval = (this.chartMsg.yAxis.max - this.chartMsg.yAxis.min) / 4
this.chartMsgTarget.yAxis.interval = (this.chartMsgTarget.yAxis.max - this.chartMsgTarget.yAxis.min) / 4
if (this.listQuery.type === 2) {
// res.data.list.forEach((ele) => {
res.data.list.slice(0, res.data.list.length - 2).forEach((ele, index) => {
res.data.list.slice(0, res.data.list.length - 3).forEach((ele, index) => {
// let i = index + 1
this.chartMsg.xData.push(ele.titleValue.replace(/[^\d]/g, " "))
this.chartMsg.xData.push(ele.titleValue.slice(0, ele.titleValue.length - 3))
ele.productionSituationPowerDataVOList.forEach((item) => {
this.chartMsg.series[0].data.push({
name: ele.titleValue,
value: item.chipTotalPower
value: item.chipTotalPower === 0 ? null : item.chipTotalPower
})
this.chartMsg.series[1].data.push({
name: ele.titleValue,
value: item.componentTotalPower
value: item.componentTotalPower === 0 ? null : item.componentTotalPower
})
})
})
this.chartMsgTarget.xData.push(res.data.list[res.data.list.length - 2].titleValue.replace(/[^\d]/g, " "))
this.chartMsgTarget.xData.push(res.data.list[res.data.list.length - 2].titleValue)
// this.chartMsgTarget.series = [{
// name: "FTO",
// data: [
@ -547,98 +569,19 @@ export default {
let arr = []
let chip = []
let std = []
let obj = {}
let targetObj = {}
res.data.list.slice(res.data.list.length - 3, res.data.list.length - 1).forEach((ele, index) => {
console.log(ele.titleValue.search('目标'));
// let i = index + 1
// this.chartMsgTarget.xData.push(ele.titleValue)
ele.productionSituationPowerDataVOList.forEach((item) => {
if (ele.titleValue.search('目标') != -1) {
chip.push({
name: "芯片总功率目标值",
// barGap: '-100%',
stack: 'a',
data: [
{ name: "芯片总功率目标值", value: item.componentTotalPower },
// { name: '', value: 22 },
// { name: "%", value: 21.66 },
// { name: "%", value: 18.4 },
],
type: "bar",
barWidth: 20,
// barGap: '-100%',
label: {
show: true,
position: [-18, -16],
color: "rgba(104,196,131,.5)",
formatter: function (params) {
return params.value
},
},
},)
std.push({
name: "标准组件总功率目标值",
stack: 'b',
data: [
{ name: "标准组件总功率目标值", value: item.componentYield },
// { name: '', value: 23 },
// { name: "%", value: 7.02 },
// { name: "%", value: 80.2 },
],
type: "bar",
barWidth: 20,
label: {
show: true,
position: [0, -16],
color: "rgba(40,138,255,.5)",
formatter: function (params) {
return params.value
},
},
})
targetObj.chipTotalPower = item.chipTotalPower === 0 ? null : item.chipTotalPower
targetObj.componentTotalPower = item.componentTotalPower === 0 ? null : item.componentTotalPower
} else {
chip.unshift({
name: "芯片总功率完成值",
// barGap: '-100%',
stack: 'a',
data: [
{ name: "芯片总功率完成值", value: item.componentTotalPower },
// { name: '', value: 55 },
// { name: "%", value: 21.66 },
// { name: "%", value: 18.4 },
],
type: "bar",
barWidth: 20,
// barGap: '-100%',
label: {
show: true,
position: [-18, -16],
color: "rgba(104,196,131)",
formatter: function (params) {
return params.value
},
},
},)
std.unshift({
name: "标准组件总功率完成值",
stack: 'b',
data: [
{ name: "标准组件总功率完成值", value: item.componentYield },
// { name: '', value: 23 },
// { name: "%", value: 7.02 },
// { name: "%", value: 80.2 },
],
type: "bar",
barWidth: 20,
label: {
show: true,
position: [0, -16],
color: "rgba(40,138,255)",
formatter: function (params) {
return params.value
},
},
})
obj.chipTotalPower = item.chipTotalPower === 0 ? null : item.chipTotalPower
obj.componentTotalPower = item.componentTotalPower === 0 ? null : item.componentTotalPower
}
// this.chartMsgTarget.series[1].data.push()
@ -646,7 +589,89 @@ export default {
// this.chartMsgTarget.series[3].data.push()
})
})
console.log('arr', arr)
chip.push({
name: "芯片总功率完成值",
// barGap: '-100%',
stack: 'a',
data: [
{ name: "芯片总功率完成值", value: obj.chipTotalPower, titleValue: obj.chipTotalPower },
// { name: '', value: 55 },
// { name: "%", value: 21.66 },
// { name: "%", value: 18.4 },
],
type: "bar",
barWidth: 20,
// barGap: '-100%',
label: {
show: true,
position: [-18, -16],
color: "rgba(104,196,131)",
formatter: function (params) {
return params.value
},
},
}, {
name: "芯片总功率目标值",
// barGap: '-100%',
stack: 'a',
data: [
{ name: "芯片总功率目标值", value: (targetObj.chipTotalPower - obj.chipTotalPower) > 0 ? (targetObj.chipTotalPower - obj.chipTotalPower) : null, titleValue: targetObj.chipTotalPower },
// { name: '', value: 22 },
// { name: "%", value: 21.66 },
// { name: "%", value: 18.4 },
],
type: "bar",
// barGap: '-100%',
label: {
show: true,
position: [-18, -16],
color: "rgba(104,196,131,.5)",
formatter: function (params) {
return params.value
},
},
})
std.push({
name: "标准组件总功率完成值",
stack: 'b',
data: [
{ name: "标准组件总功率完成值", value: obj.componentTotalPower,titleValue:obj.componentTotalPower },
// { name: '', value: 23 },
// { name: "%", value: 7.02 },
// { name: "%", value: 80.2 },
],
type: "bar",
barWidth: 20,
label: {
show: true,
position: [0, -16],
color: "rgba(40,138,255)",
formatter: function (params) {
return params.value
},
},
}, {
name: "标准组件总功率目标值",
stack: 'b',
data: [
{ name: "标准组件总功率目标值", value: (targetObj.componentTotalPower - obj.componentTotalPower) > 0 ? (targetObj.componentTotalPower - obj.componentTotalPower) : null, titleValue: targetObj.componentTotalPower },
// { name: '', value: 23 },
// { name: "%", value: 7.02 },
// { name: "%", value: 80.2 },
],
type: "bar",
barWidth: 20,
label: {
show: true,
position: [0, -16],
color: "rgba(40,138,255,.5)",
formatter: function (params) {
return params.value
},
},
})
console.log('arr', chip,std)
this.chartMsgTarget.series = [...chip, ...std]
// arr.forEach((ele) => {
@ -658,55 +683,28 @@ export default {
ele.productionSituationPowerDataVOList.forEach((item) => {
this.chartMsgYearTarget.series[0].data.push({
name: ele.titleValue,
value: item.chipTotalPower
value: item.chipTotalPower === 0 ? null : item.chipTotalPower
})
this.chartMsgYearTarget.series[1].data.push({
name: ele.titleValue,
value: item.componentTotalPower
value: item.componentTotalPower === 0 ? null : item.componentTotalPower
})
})
})
// })
console.log(this.chartMsg.xData)
res.data.list.forEach((ele, index) => {
let i = index + 1
let m = 'value' + i
ele.productionSituationPowerDataVOList.forEach((item) => {
this.dataArr[0]['' + m + ''] = item.chipTotalPower
this.dataArr[0].factory = item.factory == 1 ? '邯郸' : '瑞昌'
this.dataArr[1].factory = item.factory == 1 ? '邯郸' : '瑞昌'
// this.dataArr[3].factory = item.factory == 1 ? '' : ''
this.dataArr[1]['' + m + ''] = item.componentTotalPower
// this.dataArr[3]['' + m + ''] = item.bipvProductOutput
})
// ele.titleValue
// .push({
// label: ele.titleValue,
// props: 'value' + index + 1,
// })
})
} else if (this.listQuery.type === 1 || this.listQuery.type === 0) {
console.log(res.data.list.slice(res.data.list.length - 2, res.data.list.length));
res.data.list.forEach((ele, index) => {
let i = index + 1
// this.chartMsg.xData.push(ele.titleValue.replace(/[^\d]/g, " "))
this.otherProps.push({
label: ele.titleValue,
prop: 'value' + i
})
})
// res.data.list.forEach((ele) => {
res.data.list.slice(0, res.data.list.length - 1).forEach((ele, index) => {
res.data.list.slice(0, res.data.list.length - 2).forEach((ele, index) => {
// let i = index + 1
this.chartMsg.xData.push(ele.titleValue.replace(/[^\d]/g, " "))
this.chartMsg.xData.push(ele.titleValue.slice(0, ele.titleValue.length - 3))
ele.productionSituationPowerDataVOList.forEach((item) => {
this.chartMsg.series[0].data.push({
name: ele.titleValue,
value: item.chipTotalPower
value: item.chipTotalPower === 0 ? null : item.chipTotalPower
})
this.chartMsg.series[1].data.push({
name: ele.titleValue,
value: item.componentTotalPower
value: item.componentTotalPower === 0 ? null : item.componentTotalPower
})
})
})
@ -734,98 +732,19 @@ export default {
let arr = []
let chip = []
let std = []
res.data.list.slice(res.data.list.length - 1, res.data.list.length).forEach((ele, index) => {
let obj = {}
let targetObj = {}
res.data.list.slice(res.data.list.length - 2, res.data.list.length).forEach((ele, index) => {
console.log(ele.titleValue.search('目标'));
// let i = index + 1
// this.chartMsgTarget.xData.push(ele.titleValue)
ele.productionSituationPowerDataVOList.forEach((item) => {
if (ele.titleValue.search('目标') != -1) {
chip.push({
name: "芯片总功率目标值",
// barGap: '-100%',
stack: 'a',
data: [
{ name: "芯片总功率目标值", value: item.componentTotalPower },
// { name: '', value: 22 },
// { name: "%", value: 21.66 },
// { name: "%", value: 18.4 },
],
type: "bar",
barWidth: 20,
// barGap: '-100%',
label: {
show: true,
position: [-18, -16],
color: "rgba(104,196,131,.5)",
formatter: function (params) {
return params.value
},
},
},)
std.push({
name: "标准组件总功率目标值",
stack: 'b',
data: [
{ name: "标准组件总功率目标值", value: item.componentYield },
// { name: '', value: 23 },
// { name: "%", value: 7.02 },
// { name: "%", value: 80.2 },
],
type: "bar",
barWidth: 20,
label: {
show: true,
position: [0, -16],
color: "rgba(40,138,255,.5)",
formatter: function (params) {
return params.value
},
},
})
targetObj.chipTotalPower = item.chipTotalPower === 0 ? null : item.chipTotalPower
targetObj.componentTotalPower = item.componentTotalPower === 0 ? null : item.componentTotalPower
} else {
chip.unshift({
name: "芯片总功率完成值",
// barGap: '-100%',
stack: 'a',
data: [
{ name: "芯片总功率完成值", value: item.componentTotalPower },
// { name: '', value: 55 },
// { name: "%", value: 21.66 },
// { name: "%", value: 18.4 },
],
type: "bar",
barWidth: 20,
// barGap: '-100%',
label: {
show: true,
position: [-18, -16],
color: "rgba(104,196,131)",
formatter: function (params) {
return params.value
},
},
},)
std.unshift({
name: "标准组件总功率完成值",
stack: 'b',
data: [
{ name: "标准组件总功率完成值", value: item.componentYield },
// { name: '', value: 23 },
// { name: "%", value: 7.02 },
// { name: "%", value: 80.2 },
],
type: "bar",
barWidth: 20,
label: {
show: true,
position: [0, -16],
color: "rgba(40,138,255)",
formatter: function (params) {
return params.value
},
},
})
obj.chipTotalPower = item.chipTotalPower === 0 ? null : item.chipTotalPower
obj.componentTotalPower = item.componentTotalPower === 0 ? null : item.componentTotalPower
}
// this.chartMsgTarget.series[1].data.push()
@ -833,57 +752,101 @@ export default {
// this.chartMsgTarget.series[3].data.push()
})
})
console.log('arr', arr)
this.chartMsgTarget.series = [...chip,...std]
console.log(this.chartMsg.xData)
res.data.list.forEach((ele, index) => {
let i = index + 1
let m = 'value' + i
ele.productionSituationPowerDataVOList.forEach((item) => {
this.dataArr[0]['' + m + ''] = item.chipTotalPower
this.dataArr[0].factory = item.factory == 1 ? '邯郸' : '瑞昌'
this.dataArr[1].factory = item.factory == 1 ? '邯郸' : '瑞昌'
// this.dataArr[3].factory = item.factory == 1 ? '' : ''
this.dataArr[1]['' + m + ''] = item.componentTotalPower
})
// ele.titleValue
// .push({
// label: ele.titleValue,
// props: 'value' + index + 1,
// })
chip.push({
name: "芯片总功率完成值",
// barGap: '-100%',
stack: 'a',
data: [
{ name: "芯片总功率完成值", value: obj.chipTotalPower, titleValue: obj.chipTotalPower },
// { name: '', value: 55 },
// { name: "%", value: 21.66 },
// { name: "%", value: 18.4 },
],
type: "bar",
barWidth: 20,
// barGap: '-100%',
label: {
show: true,
position: [-18, -16],
color: "rgba(104,196,131)",
formatter: function (params) {
return params.value
},
},
}, {
name: "芯片总功率目标值",
// barGap: '-100%',
stack: 'a',
data: [
{ name: "芯片总功率目标值", value: (targetObj.chipTotalPower - obj.chipTotalPower) > 0 ? (targetObj.chipTotalPower - obj.chipTotalPower) : null, titleValue: targetObj.chipTotalPower },
// { name: '', value: 22 },
// { name: "%", value: 21.66 },
// { name: "%", value: 18.4 },
],
type: "bar",
// barGap: '-100%',
label: {
show: true,
position: [-18, -16],
color: "rgba(104,196,131,.5)",
formatter: function (params) {
return params.value
},
},
})
std.push({
name: "标准组件总功率完成值",
stack: 'b',
data: [
{ name: "标准组件总功率完成值", value: obj.componentTotalPower, titleValue: obj.componentTotalPower },
// { name: '', value: 23 },
// { name: "%", value: 7.02 },
// { name: "%", value: 80.2 },
],
type: "bar",
barWidth: 20,
label: {
show: true,
position: [0, -16],
color: "rgba(40,138,255)",
formatter: function (params) {
return params.value
},
},
}, {
name: "标准组件总功率目标值",
stack: 'b',
data: [
{ name: "标准组件总功率目标值", value: (targetObj.componentTotalPower - obj.componentTotalPower) > 0 ? (targetObj.componentTotalPower - obj.componentTotalPower) : null, titleValue: targetObj.componentTotalPower },
// { name: '', value: 23 },
// { name: "%", value: 7.02 },
// { name: "%", value: 80.2 },
],
type: "bar",
barWidth: 20,
label: {
show: true,
position: [0, -16],
color: "rgba(40,138,255,.5)",
formatter: function (params) {
return params.value
},
},
})
console.log('arr', chip, std)
this.chartMsgTarget.series = [...chip, ...std]
} else {
// if (this.currentMenu !== '') {
res.data.list.forEach((ele, index) => {
let i = index + 1
this.chartMsg.xData.push(ele.titleValue)
this.otherProps.push({
label: ele.titleValue,
prop: 'value' + i
})
})
console.log(this.otherProps)
res.data.list.forEach((ele, index) => {
let i = index + 1
let m = 'value' + i
ele.productionSituationPowerDataVOList.forEach((item) => {
this.dataArr[0]['' + m + ''] = item.chipTotalPower
this.dataArr[0].factory = item.factory == 1 ? '邯郸' : '瑞昌'
this.dataArr[1].factory = item.factory == 1 ? '邯郸' : '瑞昌'
this.dataArr[1]['' + m + ''] = item.componentTotalPower
})
// ele.titleValue
// .push({
// label: ele.titleValue,
// props: 'value' + index + 1,
// })
})
for (let i in this.dataArr[0]) {
console.log(this.dataArr[0]['item']);
this.chartMsg.series[0].name = this.dataArr[0]['item']
if (i.search('value') === 0) {
this.chartMsg.series[0].data.push({
name: this.dataArr[0]['item'],
value: this.dataArr[0][i]
value: this.dataArr[0][i] === 0 ? null : this.dataArr[0][i]
})
}
}
@ -892,7 +855,7 @@ export default {
if (i.search('value') === 0) {
this.chartMsg.series[1].data.push({
name: this.dataArr[1]['item'],
value: this.dataArr[1][i]
value: this.dataArr[1][i] === 0 ? null : this.dataArr[1][i]
})
}
}

File diff suppressed because it is too large Load Diff

View File

@ -84,7 +84,7 @@
:chartMsg="chartMsgYearTarget" :chartId=" 'yearData'" :chartNum="chartNum" />
</el-col> -->
</el-row>
<base-table :key="showTable" :span-method="objectSpanMethod" :table-props="tableProps" :page="listQuery.current"
<base-table :key="showTable" :table-props="tableProps" :page="listQuery.current"
:limit="listQuery.size" :table-data="tableData" :max-height="tableH" />
</div>
<!-- <div class="containerBottom">
@ -173,6 +173,14 @@ export default {
{
type: "value",
name: "单位/片",
splitNumber: 4,
min: function (value) {//
return Math.floor(value.min)
},
max: function (value) {//
return Math.ceil(value.max)
},
alignTicks: true,
nameTextStyle: {
fontSize: 12,
align: "right",
@ -182,6 +190,12 @@ export default {
{
type: 'value',
// inverse: true,
alignTicks: true,
min: 0,
max: 100,
// scale: true,
interval: 25,//
splitNumber: 4,
name: "单位/%",
nameTextStyle: {
fontSize: 12,
@ -232,6 +246,15 @@ export default {
{
type: "value",
name: "单位/片",
min: function (value) {//
return Math.floor(value.min)
},
max: function (value) {//
return Math.ceil(value.max)
},
alignTicks:true,
splitNumber: 4,
scale: true,
nameTextStyle: {
fontSize: 12,
align: "right",
@ -242,6 +265,12 @@ export default {
type: 'value',
// inverse: true,
name: "单位/%",
alignTicks: true,
min: 0,
max:100,
// scale: true,
interval: 25,//
splitNumber: 4,
nameTextStyle: {
fontSize: 12,
align: "right",
@ -256,12 +285,13 @@ export default {
data: [],
type: "bar",
barWidth: 20,
yAxisIndex: 0,
label: {
show: true,
position: [-18, -16],
color: "#68C483",
formatter: function (params) {
return params.value + "片";
return params.value
},
},
},
@ -269,6 +299,7 @@ export default {
name: "",
// yAxisIndex: 0,
data: [],
yAxisIndex: 0,
type: "bar",
barWidth: 20,
label: {
@ -276,7 +307,7 @@ export default {
position: [0, -16],
color: "#288AFF",
formatter: function (params) {
return params.value + "片";
return params.value
},
},
},
@ -285,13 +316,14 @@ export default {
// yAxisIndex: 0,
data: [],
type: "bar",
yAxisIndex: 0,
barWidth: 20,
label: {
show: true,
position: [0, -16],
color: "#64BDFF",
formatter: function (params) {
return params.value+ "片";
return params.value
},
},
},
@ -307,7 +339,7 @@ export default {
show: true,
color: "#FFAE17",
formatter: function (params) {
return params.value.toFixed(2) + "%";
return params.value.toFixed(2)
},
},
},
@ -326,13 +358,6 @@ export default {
computed: {
tableProps() {
return [
{
prop: "factory",
label: "工厂名称",
// filter: (val) => factoryList[val],
minWidth: 200,
showOverflowtooltip: true,
},
{
prop: "item",
label: "科目",
@ -363,6 +388,9 @@ export default {
//
type(val) {
},
currentMenu() {
this.getDataList()
},
isOpen(val) {
if (this.$route.name === "productionYield") {
@ -512,8 +540,12 @@ export default {
this.chartMsg.series[1].data = []
this.chartMsg.series[2].data = []
this.chartMsg.series[3].data = []
this.chartMsgYearTarget.xData = []
this.chartMsgYearTarget.series[0].data = []
this.chartMsgYearTarget.series[1].data = []
if (!this.listQuery.startDate && !this.listQuery.endDate) {
return this.$message('请选择起止时间')
}
let arr = []
this.currentMenu === '邯郸' ? arr.push(1) : arr.push(0)
this.listQuery.factory = arr
@ -621,10 +653,6 @@ export default {
let m = 'value' + i
ele.productYieldDataVOList.forEach((item) => {
dataArr[0]['' + m + ''] = item.ftoInput
dataArr[0].factory = item.factory == 1 ? '邯郸' : '瑞昌'
dataArr[1].factory = item.factory == 1 ? '邯郸' : '瑞昌'
dataArr[2].factory = item.factory == 1 ? '邯郸' : '瑞昌'
dataArr[3].factory = item.factory == 1 ? '邯郸' : '瑞昌'
dataArr[1]['' + m + ''] = item.chipYield
dataArr[2]['' + m + ''] = item.componentYield
dataArr[3]['' + m + ''] = item.comprehensiveYieldRate
@ -635,7 +663,7 @@ export default {
if (i.search('value') === 0) {
this.chartMsg.series[0].data.push({
name: dataArr[0]['item'],
value: dataArr[0][i]
value: dataArr[0][i] === 0 ? null : dataArr[0][i]
})
}
}
@ -644,7 +672,7 @@ export default {
if (i.search('value') === 0) {
this.chartMsg.series[1].data.push({
name: dataArr[1]['item'],
value: dataArr[1][i]
value: dataArr[1][i] === 0 ? null : dataArr[1][i]
})
}
}
@ -653,7 +681,7 @@ export default {
if (i.search('value') === 0) {
this.chartMsg.series[2].data.push({
name: dataArr[2]['item'],
value: dataArr[2][i]
value: dataArr[2][i] === 0 ? null : dataArr[2][i]
})
}
}
@ -662,7 +690,7 @@ export default {
if (i.search('value') === 0) {
this.chartMsg.series[3].data.push({
name: dataArr[3]['item'],
value: dataArr[3][i]
value: dataArr[3][i] === 0 ? null : dataArr[3][i]
})
}
}
@ -695,7 +723,7 @@ export default {
if (i.search('value') === 0) {
this.chartMsg.series[0].data.push({
name: dataArr[0]['item'],
value: dataArr[0][i]
value: dataArr[0][i] === 0 ? null : dataArr[0][i]
})
}
}
@ -704,7 +732,7 @@ export default {
if (i.search('value') === 0) {
this.chartMsg.series[1].data.push({
name: dataArr[1]['item'],
value: dataArr[1][i]
value: dataArr[1][i] === 0 ? null : dataArr[1][i]
})
}
}
@ -713,7 +741,7 @@ export default {
if (i.search('value') === 0) {
this.chartMsg.series[2].data.push({
name: dataArr[2]['item'],
value: dataArr[2][i]
value: dataArr[2][i] === 0 ? null : dataArr[2][i]
})
}
}
@ -722,7 +750,7 @@ export default {
if (i.search('value') === 0) {
this.chartMsg.series[3].data.push({
name: dataArr[3]['item'],
value: dataArr[3][i]
value: dataArr[3][i] === 0 ? null : dataArr[3][i]
})
}
}