projects/mescc/zhp #65
4
.env.dev
4
.env.dev
@ -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:
|
||||
###
|
||||
# 开发环境配置
|
||||
|
@ -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">
|
||||
|
@ -1,7 +1,7 @@
|
||||
<!--
|
||||
* @Author: zhp
|
||||
* @Date: 2024-04-15 10:49:13
|
||||
* @LastEditTime: 2024-06-25 10:34:51
|
||||
* @LastEditTime: 2024-06-26 11:00:11
|
||||
* @LastEditors: zhp
|
||||
* @Description:
|
||||
-->
|
||||
@ -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,
|
||||
@ -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,6 +350,13 @@ export default {
|
||||
}
|
||||
},
|
||||
async getDataList() {
|
||||
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) {
|
||||
@ -368,6 +374,7 @@ export default {
|
||||
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 => {
|
||||
|
@ -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
|
||||
|
@ -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))
|
||||
|
@ -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',
|
||||
|
51
src/views/produce/workOrder/statusChart.vue
Normal file
51
src/views/produce/workOrder/statusChart.vue
Normal 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>
|
@ -26,6 +26,7 @@
|
||||
placeholder="选择日期"
|
||||
value-format="yyyy-MM-dd"
|
||||
style="width: 150px"
|
||||
:picker-options="pickerOptions"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
@ -38,6 +39,7 @@
|
||||
placeholder="选择周"
|
||||
value-format="yyyy-MM-dd"
|
||||
style="width: 150px"
|
||||
:picker-options="pickerOptions"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
@ -97,6 +99,9 @@ export default {
|
||||
{ id: 2, name: "月" },
|
||||
{ id: 3, name: "年" },
|
||||
],
|
||||
pickerOptions: {
|
||||
firstDayOfWeek: 1,
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
@ -25,6 +25,7 @@
|
||||
placeholder="选择日期"
|
||||
value-format="yyyy-MM-dd"
|
||||
style="width: 150px"
|
||||
:picker-options="pickerOptions"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
@ -37,6 +38,7 @@
|
||||
placeholder="选择周"
|
||||
value-format="yyyy-MM-dd"
|
||||
style="width: 150px"
|
||||
:picker-options="pickerOptions"
|
||||
>
|
||||
</el-date-picker>
|
||||
</el-form-item>
|
||||
@ -118,6 +120,9 @@ export default {
|
||||
{ id: 0, name: "瑞昌" },
|
||||
{ id: 1, name: "邯郸" },
|
||||
],
|
||||
pickerOptions: {
|
||||
firstDayOfWeek: 1,
|
||||
},
|
||||
};
|
||||
},
|
||||
methods: {
|
||||
|
Loading…
Reference in New Issue
Block a user