|
@@ -471,6 +471,7 @@ export const chartSetMixin = {
|
|
|
this.formItemArray={}
|
|
|
this.formItemArray.chartInfo=[]
|
|
|
this.formItemArray.chartsList=[]
|
|
|
+ this.formItemArray.xData=[]
|
|
|
this.formItemArray.chartInfo.push({
|
|
|
label:/* '图表名称' */this.$t('Chart.Detail.chart_name'),
|
|
|
value: this.currentLang==='en'?this.chartInfo.ChartNameEn:this.chartInfo.ChartName,
|
|
@@ -501,6 +502,18 @@ export const chartSetMixin = {
|
|
|
})
|
|
|
}
|
|
|
|
|
|
+ // 商品价格曲线增加编辑X轴
|
|
|
+ if([2,5].includes(this.chartInfo.Source)){
|
|
|
+ const arr=this.commodityXData||[]
|
|
|
+ console.log(arr);
|
|
|
+ this.formItemArray.xData=arr.map(item=>{
|
|
|
+ return {
|
|
|
+ name:this.currentLang==='en'?item.NameEn:item.Name,
|
|
|
+ }
|
|
|
+ })
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
//价格曲线
|
|
|
if(this.chartInfo.Source===2) {
|
|
|
this.formItemArray.chartInfo.push({
|
|
@@ -564,13 +577,23 @@ export const chartSetMixin = {
|
|
|
async updateLang(paramsData) {
|
|
|
let res=null
|
|
|
if([2,5].includes(this.chartInfo.Source)){//商品价格
|
|
|
+ const ChartEdbInfoList=paramsData.ChartEdbInfoList.map(i=>{
|
|
|
+ return {
|
|
|
+ EdbInfoId:i.EdbInfoId,
|
|
|
+ EdbName:i.EdbName,
|
|
|
+ Unit:i.Unit
|
|
|
+ }
|
|
|
+ })
|
|
|
+ const XDataList=paramsData.xData.map(x=>x.name)
|
|
|
res=await futuresInterface.setChartLangInfo({
|
|
|
ChartInfoId: paramsData.ChartInfoId,
|
|
|
ChartName: paramsData.ChartName,
|
|
|
- Unit: paramsData.ChartEdbInfoList[0].Unit || '',
|
|
|
- EdbName: paramsData.ChartEdbInfoList[0].EdbName || '',
|
|
|
+ // Unit: paramsData.ChartEdbInfoList[0].Unit || '',
|
|
|
+ // EdbName: paramsData.ChartEdbInfoList[0].EdbName || '',
|
|
|
FutureGoodName: paramsData.FutureGoodName || '',
|
|
|
- ProfitName: paramsData.ProfitName || ''
|
|
|
+ ProfitName: paramsData.ProfitName || '',
|
|
|
+ ChartEdbInfoList:ChartEdbInfoList,
|
|
|
+ XDataList:XDataList
|
|
|
})
|
|
|
}else if(this.chartInfo.Source===3){//相关性
|
|
|
res=await chartRelevanceApi.setChartLangInfo({
|