diff --git a/.env.development b/.env.development
index 7471996..571c208 100644
--- a/.env.development
+++ b/.env.development
@@ -5,4 +5,4 @@ ENV = 'development'
# 这里修改成api服务器地址
VUE_APP_BASE_API = '/api'
VUE_APP_VIEW_PIC = 'http://tft.mes.picaiba.com/api/common/attachment/downloadFile?type=0&attachmentId='
-VUE_APP_REPORT_DESIGN_URL = 'http://hfxny.mes.picaiba.com/ureport/designer'
\ No newline at end of file
+VUE_APP_REPORT_DESIGN_URL = 'http://tft.mes.picaiba.com/ureport/designer'
\ No newline at end of file
diff --git a/.env.production b/.env.production
index 7a3d5ab..a00ff93 100644
--- a/.env.production
+++ b/.env.production
@@ -5,4 +5,4 @@ ENV = 'production'
# 这里修改成api服务器地址
VUE_APP_BASE_API = '/api'
VUE_APP_VIEW_PIC = 'http://tft.mes.picaiba.com/api/common/attachment/downloadFile?type=0&attachmentId='
-VUE_APP_REPORT_DESIGN_URL = 'http://hfxny.mes.picaiba.com/ureport/designer'
\ No newline at end of file
+VUE_APP_REPORT_DESIGN_URL = 'http://tft.mes.picaiba.com/ureport/designer'
\ No newline at end of file
diff --git a/src/api/deviceManagement.js b/src/api/deviceManagement.js
index 7954bd5..28455af 100644
--- a/src/api/deviceManagement.js
+++ b/src/api/deviceManagement.js
@@ -16,6 +16,13 @@ export function performanceAnalysisPlan(data) {
data
})
}
+export function performanceUpdatePlan(data) {
+ return request({
+ url: '/equipment/PerformanceAnalysis/updatePlan',
+ method: 'post',
+ data
+ })
+}
// 托盘指标分析
export function palletIndicatorAnalysisPage(data) {
return request({
@@ -24,6 +31,13 @@ export function palletIndicatorAnalysisPage(data) {
data
})
}
+export function palletIndicatorGetType(data) {
+ return request({
+ url: '/equipment/PalletIndicatorAnalysis/getType',
+ method: 'post',
+ data
+ })
+}
// 托盘指标分析
export function palletIndicatorAnalysisType(data) {
diff --git a/src/views/basicConfig/reportManagement/reportDesign.vue b/src/views/basicConfig/reportManagement/reportDesign.vue
index 86e5e95..ae6a2a4 100644
--- a/src/views/basicConfig/reportManagement/reportDesign.vue
+++ b/src/views/basicConfig/reportManagement/reportDesign.vue
@@ -8,10 +8,7 @@ export default {
name: 'ReportDesign',
data() {
return {
- // url: ''
- // url: process.env.VUE_APP_REPORT_DESIGN_URL
- // url: 'http://hfxny.mes.picaiba.com/ureport/designer'
- url: 'http://tft.mes.picaiba.com/ureport/designer'
+ url: process.env.VUE_APP_REPORT_DESIGN_URL
}
},
mounted() {
diff --git a/src/views/deviceManagement/components/deviceOeeLine.vue b/src/views/deviceManagement/components/deviceOeeLine.vue
index cff2f7a..3149c2d 100644
--- a/src/views/deviceManagement/components/deviceOeeLine.vue
+++ b/src/views/deviceManagement/components/deviceOeeLine.vue
@@ -14,6 +14,15 @@ import resize from '@/utils/chartMixins/resize'
export default {
name: 'deviceOeeLine',
mixins: [resize],
+ props: {
+ chartMsg: {
+ type: Array,
+ required: true,
+ default: () => {
+ return []
+ }
+ }
+ },
data() {
return {
chartDom: '',
@@ -22,15 +31,48 @@ export default {
}
},
mounted() {
- this.chartDom = document.getElementById('main')
- this.chart = echarts.init(this.chartDom)
- this.getChart()
+ this.$nextTick(() => {
+ this.getChart()
+ })
window.addEventListener('resize', () => {
this.chartHeight = tableHeight(214) / 2 - 35
})
},
+ watch: {
+ chartMsg: function () {
+ this.getChart()
+ }
+ },
+ beforeDestroy() {
+ if (!this.chart) {
+ return
+ }
+ this.chart.dispose()
+ this.chart = null
+ },
methods: {
getChart() {
+ if (
+ this.chart !== null &&
+ this.chart !== '' &&
+ this.chart !== undefined
+ ) {
+ this.chart.dispose() // 页面多次刷新会出现警告,Dom已经初始化了一个实例,这是销毁实例
+ }
+ this.chartDom = document.getElementById('main')
+ this.chart = echarts.init(this.chartDom)
+ let dateList = []
+ let activationList = []
+ let performanceList = []
+ let failurePercentList = []
+ let combinedEfficiencyList = []
+ for (let i = 0; i < this.chartMsg.length; i++) {
+ dateList.push(new Date(this.chartMsg[i].date).getDate())
+ activationList.push(this.chartMsg[i].activation)
+ performanceList.push(this.chartMsg[i].performance)
+ failurePercentList.push(this.chartMsg[i].failurePercent)
+ combinedEfficiencyList.push(this.chartMsg[i].combinedEfficiency)
+ }
var option = {
color: ['#5B8FF9', '#5AD8A6', '#5D7092', '#F6BD16'],
tooltip: {
@@ -49,7 +91,7 @@ export default {
xAxis: {
type: 'category',
boundaryGap: false,
- data: ['1', '2', '3', '4', '5', '6', '7']
+ data: dateList
},
yAxis: {
type: 'value'
@@ -59,25 +101,25 @@ export default {
name: '时间开动率',
type: 'line',
stack: 'Total',
- data: [120, 132, 101, 134, 90, 230, 210]
+ data: activationList
},
{
name: '性能开动率',
type: 'line',
stack: 'Total',
- data: [220, 182, 191, 234, 290, 330, 310]
+ data: performanceList
},
{
name: '设备故障率',
type: 'line',
stack: 'Total',
- data: [150, 232, 201, 154, 190, 330, 410]
+ data: failurePercentList
},
{
name: '综合效率',
type: 'line',
stack: 'Total',
- data: [320, 332, 301, 334, 390, 330, 320]
+ data: combinedEfficiencyList
}
]
}
diff --git a/src/views/deviceManagement/components/productPowerEdit.vue b/src/views/deviceManagement/components/productPowerEdit.vue
index 033b343..4ff5227 100644
--- a/src/views/deviceManagement/components/productPowerEdit.vue
+++ b/src/views/deviceManagement/components/productPowerEdit.vue
@@ -1,98 +1,168 @@
-
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
-
-
+
+
@@ -268,7 +320,11 @@ export default {
.main-box {
width: 100%;
padding: 0px 6px 0 16px;
- .left-box,
+ .left-box {
+ padding-top: 16px;
+ border-radius: 8px;
+ background-color: #fff;
+ }
.top-left,
.top-right,
.right-bottom {
diff --git a/vue.config.js b/vue.config.js
index 28ea7e6..68c3051 100644
--- a/vue.config.js
+++ b/vue.config.js
@@ -11,7 +11,7 @@ module.exports = defineConfig({
proxy: {
'/api': {
target: 'http://tft.mes.picaiba.com/api',
- // target: 'http://192.168.1.94:8080/api',
+ // target: 'http://192.168.1.22:8080/api',
ws: true,
changeOrigin: true,
pathRewrite: {