|
@@ -407,6 +407,11 @@ export default {
|
|
|
// this.tableData = [];
|
|
|
return
|
|
|
}
|
|
|
+ // 不允许添加重复的指标
|
|
|
+ if(this.tableData.some(_=>_.EdbInfoId===edb.EdbInfoId)){
|
|
|
+ this.$message.warning(this.$t('OnlineExcelPage.already_exists_msg'))
|
|
|
+ return
|
|
|
+ }
|
|
|
|
|
|
this.tableData.push({...edb,isHide:false});
|
|
|
console.log(this.xAxisList);
|
|
@@ -521,6 +526,15 @@ export default {
|
|
|
|
|
|
/* 价格曲线预览 */
|
|
|
async getCommodityPreview(dateList) {
|
|
|
+ if(!this.chartInfo.basisEdb){
|
|
|
+ this.$message.warning(this.$t('ToolBox.CommodityPriceChart.tips_msg09')||'请选择日期基准');
|
|
|
+ return
|
|
|
+ }
|
|
|
+ if(!this.chartInfo.futures_id){
|
|
|
+ this.$message.warning(this.$t('ToolBox.CommodityPriceChart.please_select_future')||'请选择期货');
|
|
|
+ return
|
|
|
+ }
|
|
|
+
|
|
|
const xDataListArr=this.xAxisList.map(_item=>{
|
|
|
return {
|
|
|
Name:_item.Name,
|
|
@@ -573,7 +587,10 @@ export default {
|
|
|
/* 利润曲线预览 */
|
|
|
async getProfitPreview(dateList) {
|
|
|
if(!this.profitInfo.list.length) return this.$message.warning(this.$t('ToolBox.CommodityPriceChart.tips_msg04')||'请先设置盘面利润配置')
|
|
|
-
|
|
|
+ if(!this.chartInfo.basisEdb){
|
|
|
+ this.$message.warning(this.$t('ToolBox.CommodityPriceChart.tips_msg09')||'请选择日期基准');
|
|
|
+ return
|
|
|
+ }
|
|
|
const xDataListArr=this.xAxisList.map(_item=>{
|
|
|
return {
|
|
|
Name:_item.Name,
|
|
@@ -700,7 +717,7 @@ export default {
|
|
|
ChartType:8,
|
|
|
DateType: 6,
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
this.chartInfo.Source === 2 ? this.handleSaveCommodity(public_param) : this.handleSaveProfit(public_param);
|
|
|
},
|
|
|
|