From 76a9e755ef42b12cfcf16ac9f293322a34d348bd Mon Sep 17 00:00:00 2001 From: zhuzhuanzhuan Date: 星期四, 16 五月 2024 16:58:00 +0800 Subject: [PATCH] 1、首页公司级和分厂级看板中的问题列表接口完成与后端数据联调 2、问题反馈页面完成所有布局及相关功能 --- src/views/dashboard/BranchFactorySignage.vue | 36 ++++++++++++++++++------------------ 1 files changed, 18 insertions(+), 18 deletions(-) diff --git a/src/views/dashboard/BranchFactorySignage.vue b/src/views/dashboard/BranchFactorySignage.vue index 2fc68ac..7cdc7b9 100644 --- a/src/views/dashboard/BranchFactorySignage.vue +++ b/src/views/dashboard/BranchFactorySignage.vue @@ -108,11 +108,12 @@ thisMonthMaintenanceRealNum: 0, nextMonthMaintenancePlanNum: 0, nextNextMonthMaintenancePlanNum: 0, - twoMaintenanceChartData: [['-', '-', '-']], + twoMaintenanceChartData: [], barChart: '', barChartData: [], doubleBarChart: '', doubleBarChartData: {}, + workshopProblemChartData: [], maintenanceConfig: {}, problemConfig: {} } @@ -120,7 +121,6 @@ mounted() { window.addEventListener('resize', this.handleWindowResize) this.getChartDataByApi() - this.drawProblemChart() }, beforeDestroy() { window.removeEventListener('resize', this.handleWindowResize) @@ -136,6 +136,7 @@ this.getTwoMaintenanceChartDataByApi() this.getBarChartDataByApi() this.getDoubleBarChartDataByApi() + this.getWorkshopProblemChartDataByApi() }, /* 璋冪敤鎺ュ彛鑾峰彇璁惧杩愯鐘舵�� */ @@ -238,7 +239,7 @@ getTwoMaintenanceChartDataByApi() { signageApi.getTwoMaintenancePlanListApi(this.productionCode) .then(res => { - if (res.success && res.result) this.twoMaintenanceChartData = res.result.map(item => [item.centerName, item.maintenanceDate, item.content]) + if (res.success && res.result.length > 0) this.twoMaintenanceChartData = res.result.map(item => [item.centerName, item.maintenanceDate, item.content]) this.drawMaintenanceChart() }) }, @@ -274,6 +275,16 @@ this.drawDoubleBarChart() }) }, + + /* 璋冪敤鎺ュ彛鑾峰彇杞﹂棿闂鍒楄〃*/ + getWorkshopProblemChartDataByApi() { + signageApi.getWorkshopProblemListApi(this.productionCode) + .then(res => { + if (res.success && res.result.length > 0) this.workshopProblemChartData = res.result.map(item => [item.content, item.createTime]) + this.drawWorkshopProblemChart() + }) + }, + /* 缁樺埗璁惧杩愯鐘舵�佺帿鐟伴ゼ鍥� */ drawRunningStateChart(productionId) { @@ -1055,27 +1066,16 @@ }, /* 缁樺埗闂婊氬姩琛� */ - drawProblemChart() { + drawWorkshopProblemChart() { this.problemConfig = { indexHeader: '搴忓彿', - header: ['鏃堕棿', '闂鍐呭'], + header: ['闂鍐呭', '鏃堕棿'], headerBGC: '#86D186', oddRowBGC: '#7CBF7C', evenRowBGC: '#7CBF7C', - data: [ - // ['2024骞�3鏈�23鍙�', '澶у娉ㄦ剰瀹夊叏闂'], - // ['2024骞�3鏈�23鍙�', '澶у娉ㄦ剰瀹夊叏闂'], - // ['2024骞�3鏈�23鍙�', '澶у娉ㄦ剰瀹夊叏闂'], - // ['2024骞�3鏈�23鍙�', '澶у娉ㄦ剰瀹夊叏闂'], - // ['2024骞�3鏈�23鍙�', '澶у娉ㄦ剰瀹夊叏闂'], - // ['2024骞�3鏈�23鍙�', '澶у娉ㄦ剰瀹夊叏闂'], - // ['2024骞�3鏈�23鍙�', '澶у娉ㄦ剰瀹夊叏闂'], - // ['2024骞�3鏈�23鍙�', '澶у娉ㄦ剰瀹夊叏闂'], - // ['2024骞�3鏈�23鍙�', '澶у娉ㄦ剰瀹夊叏闂'], - // ['2024骞�3鏈�23鍙�', '澶у娉ㄦ剰瀹夊叏闂'] - ], + data: this.workshopProblemChartData, index: true, - columnWidth: [100, 300, 300], + columnWidth: [100, 300, 150], align: ['center'] } }, -- Gitblit v1.9.3