diff --git a/src/views/plan/workbench/homePage/beta/index.vue b/src/views/plan/workbench/homePage/beta/index.vue
index 25e999b..5a0b54b 100644
--- a/src/views/plan/workbench/homePage/beta/index.vue
+++ b/src/views/plan/workbench/homePage/beta/index.vue
@@ -7,6 +7,7 @@
:CreateModel="CreateModel"
:isShowComponent="isShowComponent"
:tableHeight="tableHeight"
+ :transLabelObj="transLabelObj"
@calculateTableHeight="calculateTableHeight" />
-
+
-
+
@@ -22,6 +22,7 @@
import Customer from './customer'
import Beta from './beta'
import Formal from './formal'
+import { get } from "@/server/api.js";
export default {
components:{
Customer,
@@ -35,6 +36,7 @@ export default {
customerId: "",
CreateModel: "",
currentCustomId: '',
+ transLabelObj: {},
}
},
methods: {
@@ -47,10 +49,17 @@ export default {
},
calculateFormalTableHeight(height){
this.formalTableHeight = height
- }
+ },
+ getTransLabel() {
+ get('/user/week_to_date').then(({data})=>{
+ this.transLabelObj = data || {}
+ })
+ },
},
created() {
+ this.getTransLabel()
this.currentCustomId = this.$route.query.CustomerId
+
},
mounted () {
this.dragChangeSize((topHeight,bottomHeight) => {
diff --git a/src/views/plan/workbench/materialAnalysis/chart/commonLineChart.vue b/src/views/plan/workbench/materialAnalysis/chart/commonLineChart.vue
index f463a1c..4a9b97e 100644
--- a/src/views/plan/workbench/materialAnalysis/chart/commonLineChart.vue
+++ b/src/views/plan/workbench/materialAnalysis/chart/commonLineChart.vue
@@ -15,6 +15,10 @@ export default {
type: String,
default: ''
},
+ transLabelObj: {
+ type: Object,
+ default: {}
+ }
},
data() {
return {
@@ -23,6 +27,7 @@ export default {
seriesArray: [],
maxValue: '',
minValue: '',
+ copyXDataArray: [],
}
},
watch: {
@@ -41,11 +46,14 @@ export default {
this.xDataArray = []
this.seriesArray = []
if (currentValue && currentValue.SortKeys) {
- this.xDataArray = currentValue.SortKeys
+ this.copyXDataArray = JSON.parse(JSON.stringify(currentValue.SortKeys))
+ this.xDataArray = currentValue.SortKeys.map(el => {
+ return this.transLabelObj[el]
+ })
}
(newValue.PerCustomerDeviationDetailItem || []).forEach(el => {
receivableArray = []
- this.xDataArray.forEach(elChild => {
+ this.copyXDataArray.forEach(elChild => {
receivableArray.push(el.Item[elChild])
})
this.seriesArray.push({
@@ -116,7 +124,7 @@ export default {
data: this.xDataArray,
axisLabel: { //坐标轴刻度标签的相关设置
interval: 0,
- rotate:'80',//旋转度数
+ rotate:'10',//旋转度数
},
},
legend: {
diff --git a/src/views/plan/workbench/materialAnalysis/chart/index.vue b/src/views/plan/workbench/materialAnalysis/chart/index.vue
index 2a19352..f400db9 100644
--- a/src/views/plan/workbench/materialAnalysis/chart/index.vue
+++ b/src/views/plan/workbench/materialAnalysis/chart/index.vue
@@ -15,10 +15,10 @@
@@ -30,7 +30,7 @@ import CommonLineChart from './commonLineChart'
import LineBarChart from './lineBarChart'
export default {
name: "analysis",
- props: ["queryParams", 'versionId'],
+ props: ["queryParams", 'versionId', 'transLabelObj'],
components: {
QueryComponent,
CommonLineChart,
diff --git a/src/views/plan/workbench/materialAnalysis/chart/lineBarChart.vue b/src/views/plan/workbench/materialAnalysis/chart/lineBarChart.vue
index 2f53cb1..afd06d2 100644
--- a/src/views/plan/workbench/materialAnalysis/chart/lineBarChart.vue
+++ b/src/views/plan/workbench/materialAnalysis/chart/lineBarChart.vue
@@ -15,6 +15,10 @@ export default {
type: String,
default: ''
},
+ transLabelObj: {
+ type: Object,
+ default: {}
+ }
},
data() {
return {
@@ -23,6 +27,7 @@ export default {
seriesArray: [],
maxValue: '',
minValue: '',
+ copyXDataArray: [],
}
},
watch: {
@@ -41,11 +46,14 @@ export default {
this.xDataArray = []
this.seriesArray = []
if (currentValue && currentValue.SortKeys) {
- this.xDataArray = currentValue.SortKeys
+ this.copyXDataArray = JSON.parse(JSON.stringify(currentValue.SortKeys))
+ this.xDataArray = currentValue.SortKeys.map(el => {
+ return this.transLabelObj[el]
+ })
}
newValue.CustomerDeviationDetailItem.forEach(el => {
receivableArray = []
- this.xDataArray.forEach(elChild => {
+ this.copyXDataArray.forEach(elChild => {
receivableArray.push(el.Item[elChild])
})
this.seriesArray.push({
@@ -125,7 +133,7 @@ export default {
data: this.xDataArray,
axisLabel: { //坐标轴刻度标签的相关设置
interval: 0,
- rotate:'80',//旋转度数
+ rotate:'10',//旋转度数
},
},
yAxis: {
diff --git a/src/views/plan/workbench/materialAnalysis/index.vue b/src/views/plan/workbench/materialAnalysis/index.vue
index c76097c..149e3cd 100644
--- a/src/views/plan/workbench/materialAnalysis/index.vue
+++ b/src/views/plan/workbench/materialAnalysis/index.vue
@@ -13,7 +13,7 @@
-
+
@@ -21,6 +21,7 @@
import Filter from './filter'
import Version from './version'
import Chart from './chart'
+import { get } from "@/server/api.js";
export default {
components:{
Filter,
@@ -32,9 +33,11 @@ export default {
withTheRingRadio: 'ring',
versionId: '',
queryParams: {},
+ transLabelObj: {},
}
},
mounted () {
+ this.getTransLabel()
this.dragChangeSize();
},
methods: {
@@ -45,6 +48,11 @@ export default {
versionEmit(version) {
this.versionId = version
},
+ getTransLabel() {
+ get('/user/week_to_date').then(({data})=>{
+ this.transLabelObj = data || {}
+ })
+ },
},
}