Compare commits

..

No commits in common. "a78c3d79f1ae8208e69ccd9e71363d985c252fa0" and "ca0a0142dbd714f195a341e01871e2266e735524" have entirely different histories.

7 changed files with 43 additions and 134 deletions

View File

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

View File

@ -1,7 +1,7 @@
<!-- <!--
* @Author: zhp * @Author: zhp
* @Date: 2023-11-06 15:15:30 * @Date: 2023-11-06 15:15:30
* @LastEditTime: 2024-06-24 15:15:02 * @LastEditTime: 2024-06-18 14:41:07
* @LastEditors: DY * @LastEditors: DY
* @Description: * @Description:
--> -->
@ -116,10 +116,6 @@
<p class="title">标准组件平均功率(W)</p> <p class="title">标准组件平均功率(W)</p>
<p class="text">{{ dataForm.componentAveragePower }}</p> <p class="text">{{ dataForm.componentAveragePower }}</p>
</el-col> </el-col>
<el-col :span="6">
<p class="title">标准组件转化效率</p>
<p class="text">{{ dataForm.componentTransRate }}</p>
</el-col>
</el-row> </el-row>
</div> </div>
<div v-if="glass === 2"> <div v-if="glass === 2">

View File

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

View File

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

View File

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

View File

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

View File

@ -1,51 +0,0 @@
<!--
* @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>