|
@@ -260,8 +260,11 @@ import { dataBaseInterface } from '@/api/api.js';
|
|
|
import * as preDictEdbInterface from '@/api/modules/predictEdbApi.js';
|
|
|
import { formRules } from '../databaseComponents/util';
|
|
|
import { unitArr } from '@/utils/defaultOptions';
|
|
|
-const tag_arr = [];
|
|
|
-for(let i=0;i<26;i++) tag_arr.push(String.fromCharCode(65+i));
|
|
|
+import {generateSeriesArray} from './util'
|
|
|
+const MAXEDBNUM=50//最大可添加的指标数量
|
|
|
+const tag_arr = generateSeriesArray();
|
|
|
+
|
|
|
+// for(let i=0;i<26;i++) tag_arr.push(String.fromCharCode(65+i));
|
|
|
export default {
|
|
|
name: '',
|
|
|
props: {
|
|
@@ -355,14 +358,26 @@ export default {
|
|
|
|
|
|
'addList':{
|
|
|
handler(n){
|
|
|
+ if(this.selectTimeSeriesVal=='all_edb') return
|
|
|
+ const arr=this.addList.filter(item=>item.target).map(item=>{
|
|
|
+ return {
|
|
|
+ label:`指标${item.tag}`,
|
|
|
+ value:item.tag
|
|
|
+ }
|
|
|
+ })
|
|
|
+ if(!arr.length) return
|
|
|
if(!this.selectTimeSeriesVal){
|
|
|
- const arr=this.addList.filter(item=>item.target).map(item=>{
|
|
|
- return {
|
|
|
- label:`指标${item.tag}`,
|
|
|
- value:item.tag
|
|
|
+ this.selectTimeSeriesVal=arr[0].value
|
|
|
+ }else{//已经有选择的值了
|
|
|
+ let flag=false
|
|
|
+ arr.forEach(item=>{
|
|
|
+ if(item.value==this.selectTimeSeriesVal){
|
|
|
+ flag=true
|
|
|
}
|
|
|
})
|
|
|
- this.selectTimeSeriesVal=arr[0].value
|
|
|
+ if(!flag){
|
|
|
+ this.selectTimeSeriesVal=arr[0].value
|
|
|
+ }
|
|
|
}
|
|
|
},
|
|
|
deep:true
|
|
@@ -478,7 +493,8 @@ export default {
|
|
|
},
|
|
|
/* 添加额外的指标列 */
|
|
|
addTargetHandle() {
|
|
|
- if(this.addList.length >= 26) return this.$message.warning('添加指标个数已达上限')
|
|
|
+ const MAXNUM=this.edbSource === 'predict'?26:MAXEDBNUM
|
|
|
+ if(this.addList.length >=MAXNUM) return this.$message.warning('添加指标个数已达上限')
|
|
|
let tag = this.addList[this.addList.length-1].tag;
|
|
|
let index = tag_arr.findIndex(item => item === tag);
|
|
|
const item = {
|