|
@@ -122,7 +122,7 @@
|
|
class="span-item"
|
|
class="span-item"
|
|
style="margin-left: 7px"
|
|
style="margin-left: 7px"
|
|
@click="saveChartMapHandle"
|
|
@click="saveChartMapHandle"
|
|
- v-if="[1,2,5].includes(chartInfo.Source)"
|
|
|
|
|
|
+ v-if="[1,2,5,10].includes(chartInfo.Source)"
|
|
>
|
|
>
|
|
<span> <i class="el-icon-collection" /> 保存 </span>
|
|
<span> <i class="el-icon-collection" /> 保存 </span>
|
|
</span>
|
|
</span>
|
|
@@ -273,7 +273,7 @@
|
|
</template>
|
|
</template>
|
|
|
|
|
|
<!-- 后续新图专用上下限 和其他数据依赖不公用 柱形图 截面散点-->
|
|
<!-- 后续新图专用上下限 和其他数据依赖不公用 柱形图 截面散点-->
|
|
- <template v-if="[7,10,11].includes(chartInfo.ChartType)">
|
|
|
|
|
|
+ <template v-if="[7,10,11].includes(chartInfo.ChartType)||[2,5,10].includes(chartInfo.Source)">
|
|
<div class="range-cont left">
|
|
<div class="range-cont left">
|
|
<el-input
|
|
<el-input
|
|
style="width: 60px; display: block"
|
|
style="width: 60px; display: block"
|
|
@@ -578,7 +578,7 @@
|
|
import { dataBaseInterface,mychartInterface } from '@/api/api.js';
|
|
import { dataBaseInterface,mychartInterface } from '@/api/api.js';
|
|
import futuresInterface from '@/api/modules/futuresBaseApi';
|
|
import futuresInterface from '@/api/modules/futuresBaseApi';
|
|
import chartRelevanceApi from '@/api/modules/chartRelevanceApi';
|
|
import chartRelevanceApi from '@/api/modules/chartRelevanceApi';
|
|
-import { fittingEquationInterface,statisticFeatureInterface } from '@/api/modules/chartRelevanceApi';
|
|
|
|
|
|
+import { fittingEquationInterface,statisticFeatureInterface,crossVarietyInterface } from '@/api/modules/chartRelevanceApi';
|
|
import {
|
|
import {
|
|
seasonOptions,
|
|
seasonOptions,
|
|
copyOtherOptions
|
|
copyOtherOptions
|
|
@@ -791,11 +791,13 @@ export default {
|
|
}else if(this.chartInfo.Source===10) { //跨品种分析
|
|
}else if(this.chartInfo.Source===10) { //跨品种分析
|
|
this.tableData = res.Data.EdbInfoList;
|
|
this.tableData = res.Data.EdbInfoList;
|
|
this.crossVarietyChartData = res.Data.DataResp;
|
|
this.crossVarietyChartData = res.Data.DataResp;
|
|
|
|
+
|
|
|
|
+ /* 历史数据chartInfo里全是空 兼容下历史数据不崩 */
|
|
this.chartLimit = {
|
|
this.chartLimit = {
|
|
- min: Number(res.Data.DataResp.YMinValue),
|
|
|
|
- max: Number(res.Data.DataResp.YMaxValue),
|
|
|
|
- x_min: Number(res.Data.DataResp.XMinValue),
|
|
|
|
- x_max: Number(res.Data.DataResp.XMaxValue)
|
|
|
|
|
|
+ min: res.Data.ChartInfo.LeftMin?Number(res.Data.ChartInfo.LeftMin):Number(res.Data.DataResp.YMinValue),
|
|
|
|
+ max: res.Data.ChartInfo.LeftMax?Number(res.Data.ChartInfo.LeftMax):Number(res.Data.DataResp.YMaxValue),
|
|
|
|
+ x_min: res.Data.ChartInfo.XMin?Number(res.Data.ChartInfo.XMin):Number(res.Data.DataResp.XMinValue),
|
|
|
|
+ x_max: res.Data.ChartInfo.XMax?Number(res.Data.ChartInfo.XMax):Number(res.Data.DataResp.XMaxValue),
|
|
}
|
|
}
|
|
this.setCrossVarietyChart();
|
|
this.setCrossVarietyChart();
|
|
}
|
|
}
|
|
@@ -1114,6 +1116,7 @@ export default {
|
|
1: this.saveChartHandle,
|
|
1: this.saveChartHandle,
|
|
2: this.saveCommodityChart,
|
|
2: this.saveCommodityChart,
|
|
5: this.saveCommodityChart,//利润曲线
|
|
5: this.saveCommodityChart,//利润曲线
|
|
|
|
+ 10: this.saveCrossVarietyChart
|
|
}
|
|
}
|
|
sourceMap[this.chartInfo.Source]&&sourceMap[this.chartInfo.Source]();
|
|
sourceMap[this.chartInfo.Source]&&sourceMap[this.chartInfo.Source]();
|
|
},
|
|
},
|
|
@@ -1132,6 +1135,24 @@ export default {
|
|
this.setChartImage();
|
|
this.setChartImage();
|
|
},300),
|
|
},300),
|
|
|
|
|
|
|
|
+ saveCrossVarietyChart: _.debounce(async function() {
|
|
|
|
+ let { min,max,x_min,x_max } = this.chartLimit;
|
|
|
|
+ let params = {
|
|
|
|
+ ChartInfoId: this.chartInfo.ChartInfoId,
|
|
|
|
+ XMin: String(x_min),
|
|
|
|
+ XMax: String(x_max),
|
|
|
|
+ LeftMin: String(min),
|
|
|
|
+ LeftMax: String(max),
|
|
|
|
+ }
|
|
|
|
+ let res = await crossVarietyInterface.saveChart(params);
|
|
|
|
+
|
|
|
|
+ if(res.Ret !== 200) return
|
|
|
|
+
|
|
|
|
+ this.$message.success('保存成功')
|
|
|
|
+ //关联图表和图片
|
|
|
|
+ this.setChartImage();
|
|
|
|
+ },300),
|
|
|
|
+
|
|
/* 保存当前图表配置 */
|
|
/* 保存当前图表配置 */
|
|
saveChartHandle: _.debounce(function () {
|
|
saveChartHandle: _.debounce(function () {
|
|
//遍历每条线的指标配置
|
|
//遍历每条线的指标配置
|